@cntrl-site/components 1.0.70 → 1.0.71

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 +62 -49
  2. package/dist/index.mjs +2780 -2767
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),a=require("react"),mt=require("classnames"),C=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Yn=require("react-dom");function ud(e){return e.type==="object"&&e.version===1}const pd="ControlSlider-module__wrapper___sHEkd",md="ControlSlider-module__hoverArrow___A-dOH",gd="ControlSlider-module__sliderItem___QQSkR",hd="ControlSlider-module__sliderImage___9hRl-",fd="ControlSlider-module__arrow___05ghY",yd="ControlSlider-module__arrowVertical___tBfVN",vd="ControlSlider-module__nextArrow___-30Yc",xd="ControlSlider-module__arrowInner___aEra3",bd="ControlSlider-module__arrowIcon___S4ztF",wd="ControlSlider-module__arrowImg___2dwJW",Sd="ControlSlider-module__mirror___brd6U",$d="ControlSlider-module__pagination___bicLF",Cd="ControlSlider-module__paginationInner___bT-P-",Td="ControlSlider-module__paginationVertical___zYqKw",Ld="ControlSlider-module__paginationItem___nTRbk",Rd="ControlSlider-module__dot___p1Qun",Id="ControlSlider-module__activeDot___LHFaj",Ed="ControlSlider-module__paginationInsideBottom___R3FWn",Md="ControlSlider-module__paginationInsideTop___V-qb-",Pd="ControlSlider-module__paginationOutsideBottom___14w8D",kd="ControlSlider-module__paginationOutsideTop___SCLqB",Ad="ControlSlider-module__paginationInsideLeft___yOBRZ",Fd="ControlSlider-module__paginationInsideRight___Rtt3o",Wd="ControlSlider-module__paginationOutsideLeft___lahaw",_d="ControlSlider-module__paginationOutsideRight___EtuQa",Hd="ControlSlider-module__imgWrapper___UjEgB",Nd="ControlSlider-module__captionBlock___dJ6-j",Od="ControlSlider-module__captionTextWrapper___HFlpf",Dd="ControlSlider-module__captionText___uGBVc",jd="ControlSlider-module__active___WZK4G",zd="ControlSlider-module__withPointerEvents___t-18M",Bd="ControlSlider-module__topLeftAlignment___zjnGM",Vd="ControlSlider-module__topCenterAlignment___gD1xW",Gd="ControlSlider-module__topRightAlignment___NMapS",qd="ControlSlider-module__middleLeftAlignment___OnUrY",Ud="ControlSlider-module__middleCenterAlignment___Tdkl0",Xd="ControlSlider-module__middleRightAlignment___wEbfX",Kd="ControlSlider-module__bottomLeftAlignment___cTP2-",Yd="ControlSlider-module__bottomCenterAlignment___c54fB",Zd="ControlSlider-module__bottomRightAlignment___kEwrz",Jd="ControlSlider-module__clickOverlay___DZA28",Qd="ControlSlider-module__contain___pLyq7",eu="ControlSlider-module__cover___KdDat",ut={wrapper:pd,hoverArrow:md,sliderItem:gd,sliderImage:hd,arrow:fd,arrowVertical:yd,nextArrow:vd,arrowInner:xd,arrowIcon:bd,arrowImg:wd,mirror:Sd,pagination:$d,paginationInner:Cd,paginationVertical:Td,paginationItem:Ld,dot:Rd,activeDot:Id,paginationInsideBottom:Ed,paginationInsideTop:Md,paginationOutsideBottom:Pd,paginationOutsideTop:kd,paginationInsideLeft:Ad,paginationInsideRight:Fd,paginationOutsideLeft:Wd,paginationOutsideRight:_d,imgWrapper:Hd,captionBlock:Nd,captionTextWrapper:Od,captionText:Dd,active:jd,withPointerEvents:zd,topLeftAlignment:Bd,topCenterAlignment:Vd,topRightAlignment:Gd,middleLeftAlignment:qd,middleCenterAlignment:Ud,middleRightAlignment:Xd,bottomLeftAlignment:Kd,bottomCenterAlignment:Yd,bottomRightAlignment:Zd,clickOverlay:Jd,contain:Qd,cover:eu};function tu(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 nu(e,t,n){return t&&tu(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var gs="(prefers-reduced-motion: reduce)",Pi=1,iu=2,_i=3,Ki=4,Lo=5,nr=6,cr=7,ou={CREATED:Pi,MOUNTED:iu,IDLE:_i,MOVING:Ki,SCROLLING:Lo,DRAGGING:nr,DESTROYED:cr};function Wn(e){e.length=0}function Zn(e,t,n){return Array.prototype.slice.call(e,t,n)}function Xt(e){return e.bind.apply(e,[null].concat(Zn(arguments,1)))}var Nl=setTimeout,ya=function(){};function hs(e){return requestAnimationFrame(e)}function xr(e,t){return typeof t===e}function go(e){return!Fa(e)&&xr("object",e)}var Aa=Array.isArray,Ol=Xt(xr,"function"),qn=Xt(xr,"string"),Ro=Xt(xr,"undefined");function Fa(e){return e===null}function Dl(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Io(e){return Aa(e)?e:[e]}function yn(e,t){Io(e).forEach(t)}function Wa(e,t){return e.indexOf(t)>-1}function ir(e,t){return e.push.apply(e,Io(t)),e}function Mn(e,t,n){e&&yn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Tn(e,t){Mn(e,qn(t)?t.split(" "):t,!0)}function Eo(e,t){yn(t,e.appendChild.bind(e))}function _a(e,t){yn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function ho(e,t){return Dl(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function jl(e,t){var n=e?Zn(e.children):[];return t?n.filter(function(i){return ho(i,t)}):n}function Mo(e,t){return t?jl(e,t)[0]:e.firstElementChild}var fo=Object.keys;function mi(e,t,n){return e&&(n?fo(e).reverse():fo(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function yo(e){return Zn(arguments,1).forEach(function(t){mi(t,function(n,i){e[i]=t[i]})}),e}function zn(e){return Zn(arguments,1).forEach(function(t){mi(t,function(n,i){Aa(n)?e[i]=n.slice():go(n)?e[i]=zn({},go(e[i])?e[i]:{},n):e[i]=n})}),e}function fs(e,t){yn(t||fo(e),function(n){delete e[n]})}function Ln(e,t){yn(e,function(n){yn(t,function(i){n&&n.removeAttribute(i)})})}function Ct(e,t,n){go(t)?mi(t,function(i,o){Ct(e,o,i)}):yn(e,function(i){Fa(n)||n===""?Ln(i,t):i.setAttribute(t,String(n))})}function ki(e,t,n){var i=document.createElement(e);return t&&(qn(t)?Tn(i,t):Ct(i,t)),n&&Eo(n,i),i}function xn(e,t,n){if(Ro(n))return getComputedStyle(e)[t];Fa(n)||(e.style[t]=""+n)}function vo(e,t){xn(e,"display",t)}function zl(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function bn(e,t){return e.getAttribute(t)}function ys(e,t){return e&&e.classList.contains(t)}function mn(e){return e.getBoundingClientRect()}function hi(e){yn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Bl(e){return Mo(new DOMParser().parseFromString(e,"text/html").body)}function En(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Vl(e,t){return e&&e.querySelector(t)}function Ha(e,t){return t?Zn(e.querySelectorAll(t)):[]}function Pn(e,t){Mn(e,t,!1)}function va(e){return e.timeStamp}function ii(e){return qn(e)?e:e?e+"px":""}var Po="splide",Na="data-"+Po;function co(e,t){if(!e)throw new Error("["+Po+"] "+(t||""))}var Un=Math.min,dr=Math.max,ur=Math.floor,xo=Math.ceil,cn=Math.abs;function Gl(e,t,n){return cn(e-t)<n}function or(e,t,n,i){var o=Un(t,n),s=dr(t,n);return i?o<e&&e<s:o<=e&&e<=s}function Ri(e,t,n){var i=Un(t,n),o=dr(t,n);return Un(dr(i,e),o)}function xa(e){return+(e>0)-+(e<0)}function ba(e,t){return yn(t,function(n){e=e.replace("%s",""+n)}),e}function Oa(e){return e<10?"0"+e:""+e}var vs={};function ru(e){return""+e+Oa(vs[e]=(vs[e]||0)+1)}function ql(){var e=[];function t(l,d,c,u){o(l,d,function(p,v,y){var g="addEventListener"in p,h=g?p.removeEventListener.bind(p,v,c,u):p.removeListener.bind(p,c);g?p.addEventListener(v,c,u):p.addListener(c),e.push([p,v,y,c,h])})}function n(l,d,c){o(l,d,function(u,p,v){e=e.filter(function(y){return y[0]===u&&y[1]===p&&y[2]===v&&(!c||y[3]===c)?(y[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){yn(l,function(u){u&&yn(d,function(p){p.split(" ").forEach(function(v){var y=v.split(".");c(u,y[0],y[1])})})})}function s(){e.forEach(function(l){l[4]()}),Wn(e)}return{bind:t,unbind:n,dispatch:i,destroy:s}}var Jn="mounted",wa="ready",_n="move",Yi="moved",Da="click",Ul="active",Xl="inactive",Kl="visible",Yl="hidden",Qt="refresh",sn="updated",Hi="resize",br="resized",Zl="drag",Jl="dragging",Ql="dragged",wr="scroll",vi="scrolled",au="overflow",ja="destroy",ec="arrows:mounted",tc="arrows:updated",nc="pagination:mounted",ic="pagination:updated",za="navigation:mounted",Ba="autoplay:play",oc="autoplay:playing",Va="autoplay:pause",Ga="lazyload:loaded",rc="sk",ac="sh",pr="ei";function Yt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=ql();function i(s,l){n.bind(t,Io(s).join(" "),function(d){l.apply(l,Aa(d.detail)?d.detail:[])})}function o(s){n.dispatch(t,s,Zn(arguments,1))}return e&&e.event.on(ja,n.destroy),yo(n,{bus:t,on:i,off:Xt(n.unbind,t),emit:o})}function Sr(e,t,n,i){var o=Date.now,s,l=0,d,c=!0,u=0;function p(){if(!c){if(l=e?Un((o()-s)/e,1):1,n&&n(l),l>=1&&(t(),s=o(),i&&++u>=i))return y();d=hs(p)}}function v(I){I||h(),s=o()-(I?l*e:0),c=!1,d=hs(p)}function y(){c=!0}function g(){s=o(),l=0,n&&n(l)}function h(){d&&cancelAnimationFrame(d),l=0,d=0,c=!0}function m(I){e=I}function b(){return c}return{start:v,rewind:g,pause:y,cancel:h,set:m,isPaused:b}}function su(e){var t=e;function n(o){t=o}function i(o){return Wa(Io(o),t)}return{set:n,is:i}}function lu(e,t){var n=Sr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function cu(e,t,n){var i=e.state,o=n.breakpoints||{},s=n.reducedMotion||{},l=ql(),d=[];function c(){var h=n.mediaQuery==="min";fo(o).sort(function(m,b){return h?+m-+b:+b-+m}).forEach(function(m){p(o[m],"("+(h?"min":"max")+"-width:"+m+"px)")}),p(s,gs),v()}function u(h){h&&l.destroy()}function p(h,m){var b=matchMedia(m);l.bind(b,"change",v),d.push([h,b])}function v(){var h=i.is(cr),m=n.direction,b=d.reduce(function(I,R){return zn(I,R[1].matches?R[0]:{})},{});fs(n),g(b),n.destroy?e.destroy(n.destroy==="completely"):h?(u(!0),e.mount()):m!==n.direction&&e.refresh()}function y(h){matchMedia(gs).matches&&(h?zn(n,s):fs(n,fo(s)))}function g(h,m,b){zn(n,h),m&&zn(Object.getPrototypeOf(n),h),(b||!i.is(Pi))&&e.emit(sn,n)}return{setup:c,destroy:u,reduce:y,set:g}}var $r="Arrow",Cr=$r+"Left",Tr=$r+"Right",sc=$r+"Up",lc=$r+"Down",xs="rtl",Lr="ttb",Dr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[sc,Tr],ArrowRight:[lc,Cr]};function du(e,t,n){function i(s,l,d){d=d||n.direction;var c=d===xs&&!l?1:d===Lr?0:-1;return Dr[s]&&Dr[s][c]||s.replace(/width|left|right/i,function(u,p){var v=Dr[u.toLowerCase()][c]||u;return p>0?v.charAt(0).toUpperCase()+v.slice(1):v})}function o(s){return s*(n.direction===xs?1:-1)}return{resolve:i,orient:o}}var kn="role",Ai="tabindex",uu="disabled",wn="aria-",ko=wn+"controls",cc=wn+"current",bs=wn+"selected",hn=wn+"label",qa=wn+"labelledby",dc=wn+"hidden",Ua=wn+"orientation",bo=wn+"roledescription",ws=wn+"live",Ss=wn+"busy",$s=wn+"atomic",Xa=[kn,Ai,uu,ko,cc,hn,qa,dc,Ua,bo],Rn=Po+"__",Qn="is-",jr=Po,Cs=Rn+"track",pu=Rn+"list",Rr=Rn+"slide",uc=Rr+"--clone",mu=Rr+"__container",Ka=Rn+"arrows",Ir=Rn+"arrow",pc=Ir+"--prev",mc=Ir+"--next",Er=Rn+"pagination",gc=Er+"__page",gu=Rn+"progress",hu=gu+"__bar",fu=Rn+"toggle",yu=Rn+"spinner",vu=Rn+"sr",xu=Qn+"initialized",fi=Qn+"active",hc=Qn+"prev",fc=Qn+"next",Sa=Qn+"visible",$a=Qn+"loading",yc=Qn+"focus-in",vc=Qn+"overflow",bu=[fi,Sa,hc,fc,$a,yc,vc],wu={slide:Rr,clone:uc,arrows:Ka,arrow:Ir,prev:pc,next:mc,pagination:Er,page:gc,spinner:yu};function Su(e,t){if(Ol(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!ho(n,t);)n=n.parentElement;return n}var $u=5,Ts=200,xc="touchstart mousedown",zr="touchmove mousemove",Br="touchend touchcancel mouseup click";function Cu(e,t,n){var i=Yt(e),o=i.on,s=i.bind,l=e.root,d=n.i18n,c={},u=[],p=[],v=[],y,g,h;function m(){T(),G(),R()}function b(){o(Qt,I),o(Qt,m),o(sn,R),s(document,xc+" keydown",function(A){h=A.type==="keydown"},{capture:!0}),s(l,"focusin",function(){Mn(l,yc,!!h)})}function I(A){var L=Xa.concat("style");Wn(u),Pn(l,p),Pn(y,v),Ln([y,g],L),Ln(l,A?L:["style",bo])}function R(){Pn(l,p),Pn(y,v),p=V(jr),v=V(Cs),Tn(l,p),Tn(y,v),Ct(l,hn,n.label),Ct(l,qa,n.labelledby)}function T(){y=k("."+Cs),g=Mo(y,"."+pu),co(y&&g,"A track/list element is missing."),ir(u,jl(g,"."+Rr+":not(."+uc+")")),mi({arrows:Ka,pagination:Er,prev:pc,next:mc,bar:hu,toggle:fu},function(A,L){c[L]=k("."+A)}),yo(c,{root:l,track:y,list:g,slides:u})}function G(){var A=l.id||ru(Po),L=n.role;l.id=A,y.id=y.id||A+"-track",g.id=g.id||A+"-list",!bn(l,kn)&&l.tagName!=="SECTION"&&L&&Ct(l,kn,L),Ct(l,bo,d.carousel),Ct(g,kn,"presentation")}function k(A){var L=Vl(l,A);return L&&Su(L,"."+jr)===l?L:void 0}function V(A){return[A+"--"+n.type,A+"--"+n.direction,n.drag&&A+"--draggable",n.isNavigation&&A+"--nav",A===jr&&fi]}return yo(c,{setup:m,mount:b,destroy:I})}var Ni="slide",Zi="loop",Ao="fade";function Tu(e,t,n,i){var o=Yt(e),s=o.on,l=o.emit,d=o.bind,c=e.Components,u=e.root,p=e.options,v=p.isNavigation,y=p.updateOnMove,g=p.i18n,h=p.pagination,m=p.slideFocus,b=c.Direction.resolve,I=bn(i,"style"),R=bn(i,hn),T=n>-1,G=Mo(i,"."+mu),k;function V(){T||(i.id=u.id+"-slide"+Oa(t+1),Ct(i,kn,h?"tabpanel":"group"),Ct(i,bo,g.slide),Ct(i,hn,R||ba(g.slideLabel,[t+1,e.length]))),A()}function A(){d(i,"click",Xt(l,Da,ne)),d(i,"keydown",Xt(l,rc,ne)),s([Yi,ac,vi],W),s(za,D),y&&s(_n,x)}function L(){k=!0,o.destroy(),Pn(i,bu),Ln(i,Xa),Ct(i,"style",I),Ct(i,hn,R||"")}function D(){var S=e.splides.map(function(E){var O=E.splide.Components.Slides.getAt(t);return O?O.slide.id:""}).join(" ");Ct(i,hn,ba(g.slideX,(T?n:t)+1)),Ct(i,ko,S),Ct(i,kn,m?"button":""),m&&Ln(i,bo)}function x(){k||W()}function W(){if(!k){var S=e.index;M(),Y(),Mn(i,hc,t===S-1),Mn(i,fc,t===S+1)}}function M(){var S=X();S!==ys(i,fi)&&(Mn(i,fi,S),Ct(i,cc,v&&S||""),l(S?Ul:Xl,ne))}function Y(){var S=j(),E=!S&&(!X()||T);if(e.state.is([Ki,Lo])||Ct(i,dc,E||""),Ct(Ha(i,p.focusableNodes||""),Ai,E?-1:""),m&&Ct(i,Ai,E?-1:0),S!==ys(i,Sa)&&(Mn(i,Sa,S),l(S?Kl:Yl,ne)),!S&&document.activeElement===i){var O=c.Slides.getAt(e.index);O&&zl(O.slide)}}function F(S,E,O){xn(O&&G||i,S,E)}function X(){var S=e.index;return S===t||p.cloneStatus&&S===n}function j(){if(e.is(Ao))return X();var S=mn(c.Elements.track),E=mn(i),O=b("left",!0),ae=b("right",!0);return ur(S[O])<=xo(E[O])&&ur(E[ae])<=xo(S[ae])}function B(S,E){var O=cn(S-t);return!T&&(p.rewind||e.is(Zi))&&(O=Un(O,e.length-O)),O<=E}var ne={index:t,slideIndex:n,slide:i,container:G,isClone:T,mount:V,destroy:L,update:W,style:F,isWithin:B};return ne}function Lu(e,t,n){var i=Yt(e),o=i.on,s=i.emit,l=i.bind,d=t.Elements,c=d.slides,u=d.list,p=[];function v(){y(),o(Qt,g),o(Qt,y)}function y(){c.forEach(function(W,M){m(W,M,-1)})}function g(){k(function(W){W.destroy()}),Wn(p)}function h(){k(function(W){W.update()})}function m(W,M,Y){var F=Tu(e,M,Y,W);F.mount(),p.push(F),p.sort(function(X,j){return X.index-j.index})}function b(W){return W?V(function(M){return!M.isClone}):p}function I(W){var M=t.Controller,Y=M.toIndex(W),F=M.hasFocus()?1:n.perPage;return V(function(X){return or(X.index,Y,Y+F-1)})}function R(W){return V(W)[0]}function T(W,M){yn(W,function(Y){if(qn(Y)&&(Y=Bl(Y)),Dl(Y)){var F=c[M];F?_a(Y,F):Eo(u,Y),Tn(Y,n.classes.slide),L(Y,Xt(s,Hi))}}),s(Qt)}function G(W){hi(V(W).map(function(M){return M.slide})),s(Qt)}function k(W,M){b(M).forEach(W)}function V(W){return p.filter(Ol(W)?W:function(M){return qn(W)?ho(M.slide,W):Wa(Io(W),M.index)})}function A(W,M,Y){k(function(F){F.style(W,M,Y)})}function L(W,M){var Y=Ha(W,"img"),F=Y.length;F?Y.forEach(function(X){l(X,"load error",function(){--F||M()})}):M()}function D(W){return W?c.length:p.length}function x(){return p.length>n.perPage}return{mount:v,destroy:g,update:h,register:m,get:b,getIn:I,getAt:R,add:T,remove:G,forEach:k,filter:V,style:A,getLength:D,isEnough:x}}function Ru(e,t,n){var i=Yt(e),o=i.on,s=i.bind,l=i.emit,d=t.Slides,c=t.Direction.resolve,u=t.Elements,p=u.root,v=u.track,y=u.list,g=d.getAt,h=d.style,m,b,I;function R(){T(),s(window,"resize load",lu(Xt(l,Hi))),o([sn,Qt],T),o(Hi,G)}function T(){m=n.direction===Lr,xn(p,"maxWidth",ii(n.width)),xn(v,c("paddingLeft"),k(!1)),xn(v,c("paddingRight"),k(!0)),G(!0)}function G(ne){var S=mn(p);(ne||b.width!==S.width||b.height!==S.height)&&(xn(v,"height",V()),h(c("marginRight"),ii(n.gap)),h("width",L()),h("height",D(),!0),b=S,l(br),I!==(I=B())&&(Mn(p,vc,I),l(au,I)))}function k(ne){var S=n.padding,E=c(ne?"right":"left");return S&&ii(S[E]||(go(S)?0:S))||"0px"}function V(){var ne="";return m&&(ne=A(),co(ne,"height or heightRatio is missing."),ne="calc("+ne+" - "+k(!1)+" - "+k(!0)+")"),ne}function A(){return ii(n.height||mn(y).width*n.heightRatio)}function L(){return n.autoWidth?null:ii(n.fixedWidth)||(m?"":x())}function D(){return ii(n.fixedHeight)||(m?n.autoHeight?null:x():A())}function x(){var ne=ii(n.gap);return"calc((100%"+(ne&&" + "+ne)+")/"+(n.perPage||1)+(ne&&" - "+ne)+")"}function W(){return mn(y)[c("width")]}function M(ne,S){var E=g(ne||0);return E?mn(E.slide)[c("width")]+(S?0:X()):0}function Y(ne,S){var E=g(ne);if(E){var O=mn(E.slide)[c("right")],ae=mn(y)[c("left")];return cn(O-ae)+(S?0:X())}return 0}function F(ne){return Y(e.length-1)-Y(0)+M(0,ne)}function X(){var ne=g(0);return ne&&parseFloat(xn(ne.slide,c("marginRight")))||0}function j(ne){return parseFloat(xn(v,c("padding"+(ne?"Right":"Left"))))||0}function B(){return e.is(Ao)||F(!0)>W()}return{mount:R,resize:G,listSize:W,slideSize:M,sliderSize:F,totalSize:Y,getPadding:j,isOverflow:B}}var Iu=2;function Eu(e,t,n){var i=Yt(e),o=i.on,s=t.Elements,l=t.Slides,d=t.Direction.resolve,c=[],u;function p(){o(Qt,v),o([sn,Hi],g),(u=b())&&(h(u),t.Layout.resize(!0))}function v(){y(),p()}function y(){hi(c),Wn(c),i.destroy()}function g(){var I=b();u!==I&&(u<I||!I)&&i.emit(Qt)}function h(I){var R=l.get().slice(),T=R.length;if(T){for(;R.length<I;)ir(R,R);ir(R.slice(-I),R.slice(0,I)).forEach(function(G,k){var V=k<I,A=m(G.slide,k);V?_a(A,R[0].slide):Eo(s.list,A),ir(c,A),l.register(A,k-I+(V?0:T),G.index)})}}function m(I,R){var T=I.cloneNode(!0);return Tn(T,n.classes.clone),T.id=e.root.id+"-clone"+Oa(R+1),T}function b(){var I=n.clones;if(!e.is(Zi))I=0;else if(Ro(I)){var R=n[d("fixedWidth")]&&t.Layout.slideSize(0),T=R&&xo(mn(s.track)[d("width")]/R);I=T||n[d("autoWidth")]&&e.length||n.perPage*Iu}return I}return{mount:p,destroy:y}}function Mu(e,t,n){var i=Yt(e),o=i.on,s=i.emit,l=e.state.set,d=t.Layout,c=d.slideSize,u=d.getPadding,p=d.totalSize,v=d.listSize,y=d.sliderSize,g=t.Direction,h=g.resolve,m=g.orient,b=t.Elements,I=b.list,R=b.track,T;function G(){T=t.Transition,o([Jn,br,sn,Qt],k)}function k(){t.Controller.isBusy()||(t.Scroll.cancel(),A(e.index),t.Slides.update())}function V(E,O,ae,ie){E!==O&&ne(E>ae)&&(W(),L(x(F(),E>ae),!0)),l(Ki),s(_n,O,ae,E),T.start(O,function(){l(_i),s(Yi,O,ae,E),ie&&ie()})}function A(E){L(Y(E,!0))}function L(E,O){if(!e.is(Ao)){var ae=O?E:D(E);xn(I,"transform","translate"+h("X")+"("+ae+"px)"),E!==ae&&s(ac)}}function D(E){if(e.is(Zi)){var O=M(E),ae=O>t.Controller.getEnd(),ie=O<0;(ie||ae)&&(E=x(E,ae))}return E}function x(E,O){var ae=E-B(O),ie=y();return E-=m(ie*(xo(cn(ae)/ie)||1))*(O?1:-1),E}function W(){L(F(),!0),T.cancel()}function M(E){for(var O=t.Slides.get(),ae=0,ie=1/0,$=0;$<O.length;$++){var re=O[$].index,P=cn(Y(re,!0)-E);if(P<=ie)ie=P,ae=re;else break}return ae}function Y(E,O){var ae=m(p(E-1)-j(E));return O?X(ae):ae}function F(){var E=h("left");return mn(I)[E]-mn(R)[E]+m(u(!1))}function X(E){return n.trimSpace&&e.is(Ni)&&(E=Ri(E,0,m(y(!0)-v()))),E}function j(E){var O=n.focus;return O==="center"?(v()-c(E,!0))/2:+O*c(E)||0}function B(E){return Y(E?t.Controller.getEnd():0,!!n.trimSpace)}function ne(E){var O=m(x(F(),E));return E?O>=0:O<=I[h("scrollWidth")]-mn(R)[h("width")]}function S(E,O){O=Ro(O)?F():O;var ae=E!==!0&&m(O)<m(B(!1)),ie=E!==!1&&m(O)>m(B(!0));return ae||ie}return{mount:G,move:V,jump:A,translate:L,shift:x,cancel:W,toIndex:M,toPosition:Y,getPosition:F,getLimit:B,exceededLimit:S,reposition:k}}function Pu(e,t,n){var i=Yt(e),o=i.on,s=i.emit,l=t.Move,d=l.getPosition,c=l.getLimit,u=l.toPosition,p=t.Slides,v=p.isEnough,y=p.getLength,g=n.omitEnd,h=e.is(Zi),m=e.is(Ni),b=Xt(F,!1),I=Xt(F,!0),R=n.start||0,T,G=R,k,V,A;function L(){D(),o([sn,Qt,pr],D),o(br,x)}function D(){k=y(!0),V=n.perMove,A=n.perPage,T=ne();var P=Ri(R,0,g?T:k-1);P!==R&&(R=P,l.reposition())}function x(){T!==ne()&&s(pr)}function W(P,te,K){if(!re()){var fe=Y(P),We=B(fe);We>-1&&(te||We!==R)&&(ae(We),l.move(fe,We,G,K))}}function M(P,te,K,fe){t.Scroll.scroll(P,te,K,function(){var We=B(l.toIndex(d()));ae(g?Un(We,T):We),fe&&fe()})}function Y(P){var te=R;if(qn(P)){var K=P.match(/([+\-<>])(\d+)?/)||[],fe=K[1],We=K[2];fe==="+"||fe==="-"?te=X(R+ +(""+fe+(+We||1)),R):fe===">"?te=We?S(+We):b(!0):fe==="<"&&(te=I(!0))}else te=h?P:Ri(P,0,T);return te}function F(P,te){var K=V||($()?1:A),fe=X(R+K*(P?-1:1),R,!(V||$()));return fe===-1&&m&&!Gl(d(),c(!P),1)?P?0:T:te?fe:B(fe)}function X(P,te,K){if(v()||$()){var fe=j(P);fe!==P&&(te=P,P=fe,K=!1),P<0||P>T?!V&&(or(0,P,te,!0)||or(T,te,P,!0))?P=S(E(P)):h?P=K?P<0?-(k%A||A):k:P:n.rewind?P=P<0?T:0:P=-1:K&&P!==te&&(P=S(E(te)+(P<te?-1:1)))}else P=-1;return P}function j(P){if(m&&n.trimSpace==="move"&&P!==R)for(var te=d();te===u(P,!0)&&or(P,0,e.length-1,!n.rewind);)P<R?--P:++P;return P}function B(P){return h?(P+k)%k||0:P}function ne(){for(var P=k-($()||h&&V?1:A);g&&P-- >0;)if(u(k-1,!0)!==u(P,!0)){P++;break}return Ri(P,0,k-1)}function S(P){return Ri($()?P:A*P,0,T)}function E(P){return $()?Un(P,T):ur((P>=T?k-1:P)/A)}function O(P){var te=l.toIndex(P);return m?Ri(te,0,T):te}function ae(P){P!==R&&(G=R,R=P)}function ie(P){return P?G:R}function $(){return!Ro(n.focus)||n.isNavigation}function re(){return e.state.is([Ki,Lo])&&!!n.waitForTransition}return{mount:L,go:W,scroll:M,getNext:b,getPrev:I,getAdjacent:F,getEnd:ne,setIndex:ae,getIndex:ie,toIndex:S,toPage:E,toDest:O,hasFocus:$,isBusy:re}}var ku="http://www.w3.org/2000/svg",Au="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",Do=40;function Fu(e,t,n){var i=Yt(e),o=i.on,s=i.bind,l=i.emit,d=n.classes,c=n.i18n,u=t.Elements,p=t.Controller,v=u.arrows,y=u.track,g=v,h=u.prev,m=u.next,b,I,R={};function T(){k(),o(sn,G)}function G(){V(),T()}function k(){var M=n.arrows;M&&!(h&&m)&&D(),h&&m&&(yo(R,{prev:h,next:m}),vo(g,M?"":"none"),Tn(g,I=Ka+"--"+n.direction),M&&(A(),W(),Ct([h,m],ko,y.id),l(ec,h,m)))}function V(){i.destroy(),Pn(g,I),b?(hi(v?[h,m]:g),h=m=null):Ln([h,m],Xa)}function A(){o([Jn,Yi,Qt,vi,pr],W),s(m,"click",Xt(L,">")),s(h,"click",Xt(L,"<"))}function L(M){p.go(M,!0)}function D(){g=v||ki("div",d.arrows),h=x(!0),m=x(!1),b=!0,Eo(g,[h,m]),!v&&_a(g,y)}function x(M){var Y='<button class="'+d.arrow+" "+(M?d.prev:d.next)+'" type="button"><svg xmlns="'+ku+'" viewBox="0 0 '+Do+" "+Do+'" width="'+Do+'" height="'+Do+'" focusable="false"><path d="'+(n.arrowPath||Au)+'" />';return Bl(Y)}function W(){if(h&&m){var M=e.index,Y=p.getPrev(),F=p.getNext(),X=Y>-1&&M<Y?c.last:c.prev,j=F>-1&&M>F?c.first:c.next;h.disabled=Y<0,m.disabled=F<0,Ct(h,hn,X),Ct(m,hn,j),l(tc,h,m,Y,F)}}return{arrows:R,mount:T,destroy:V,update:W}}var Wu=Na+"-interval";function _u(e,t,n){var i=Yt(e),o=i.on,s=i.bind,l=i.emit,d=Sr(n.interval,e.go.bind(e,">"),A),c=d.isPaused,u=t.Elements,p=t.Elements,v=p.root,y=p.toggle,g=n.autoplay,h,m,b=g==="pause";function I(){g&&(R(),y&&Ct(y,ko,u.track.id),b||T(),V())}function R(){n.pauseOnHover&&s(v,"mouseenter mouseleave",function(D){h=D.type==="mouseenter",k()}),n.pauseOnFocus&&s(v,"focusin focusout",function(D){m=D.type==="focusin",k()}),y&&s(y,"click",function(){b?T():G(!0)}),o([_n,wr,Qt],d.rewind),o(_n,L)}function T(){c()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),m=h=b=!1,V(),l(Ba))}function G(D){D===void 0&&(D=!0),b=!!D,V(),c()||(d.pause(),l(Va))}function k(){b||(h||m?G(!1):T())}function V(){y&&(Mn(y,fi,!b),Ct(y,hn,n.i18n[b?"play":"pause"]))}function A(D){var x=u.bar;x&&xn(x,"width",D*100+"%"),l(oc,D)}function L(D){var x=t.Slides.getAt(D);d.set(x&&+bn(x.slide,Wu)||n.interval)}return{mount:I,destroy:d.cancel,play:T,pause:G,isPaused:c}}function Hu(e,t,n){var i=Yt(e),o=i.on;function s(){n.cover&&(o(Ga,Xt(d,!0)),o([Jn,sn,Qt],Xt(l,!0)))}function l(c){t.Slides.forEach(function(u){var p=Mo(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),vo(u,c?"none":"")}return{mount:s,destroy:Xt(l,!1)}}var Nu=10,Ou=600,Du=.6,ju=1.5,zu=800;function Bu(e,t,n){var i=Yt(e),o=i.on,s=i.emit,l=e.state.set,d=t.Move,c=d.getPosition,u=d.getLimit,p=d.exceededLimit,v=d.translate,y=e.is(Ni),g,h,m=1;function b(){o(_n,G),o([sn,Qt],k)}function I(A,L,D,x,W){var M=c();if(G(),D&&(!y||!p())){var Y=t.Layout.sliderSize(),F=xa(A)*Y*ur(cn(A)/Y)||0;A=d.toPosition(t.Controller.toDest(A%Y))+F}var X=Gl(M,A,1);m=1,L=X?0:L||dr(cn(A-M)/ju,zu),h=x,g=Sr(L,R,Xt(T,M,A,W),1),l(Lo),s(wr),g.start()}function R(){l(_i),h&&h(),s(vi)}function T(A,L,D,x){var W=c(),M=A+(L-A)*V(x),Y=(M-W)*m;v(W+Y),y&&!D&&p()&&(m*=Du,cn(Y)<Nu&&I(u(p(!0)),Ou,!1,h,!0))}function G(){g&&g.cancel()}function k(){g&&!g.isPaused()&&(G(),R())}function V(A){var L=n.easingFunc;return L?L(A):1-Math.pow(1-A,4)}return{mount:b,destroy:G,scroll:I,cancel:k}}var Ii={passive:!1,capture:!0};function Vu(e,t,n){var i=Yt(e),o=i.on,s=i.emit,l=i.bind,d=i.unbind,c=e.state,u=t.Move,p=t.Scroll,v=t.Controller,y=t.Elements.track,g=t.Media.reduce,h=t.Direction,m=h.resolve,b=h.orient,I=u.getPosition,R=u.exceededLimit,T,G,k,V,A,L=!1,D,x,W;function M(){l(y,zr,ya,Ii),l(y,Br,ya,Ii),l(y,xc,F,Ii),l(y,"click",B,{capture:!0}),l(y,"dragstart",En),o([Jn,sn],Y)}function Y(){var U=n.drag;ce(!U),V=U==="free"}function F(U){if(D=!1,!x){var Q=We(U);fe(U.target)&&(Q||!U.button)&&(v.isBusy()?En(U,!0):(W=Q?y:window,A=c.is([Ki,Lo]),k=null,l(W,zr,X,Ii),l(W,Br,j,Ii),u.cancel(),p.cancel(),ne(U)))}}function X(U){if(c.is(nr)||(c.set(nr),s(Zl)),U.cancelable)if(A){u.translate(T+K($(U)));var Q=re(U)>Ts,Z=L!==(L=R());(Q||Z)&&ne(U),D=!0,s(Jl),En(U)}else O(U)&&(A=E(U),En(U))}function j(U){c.is(nr)&&(c.set(_i),s(Ql)),A&&(S(U),En(U)),d(W,zr,X),d(W,Br,j),A=!1}function B(U){!x&&D&&En(U,!0)}function ne(U){k=G,G=U,T=I()}function S(U){var Q=ae(U),Z=ie(Q),ke=n.rewind&&n.rewindByDrag;g(!1),V?v.scroll(Z,0,n.snap):e.is(Ao)?v.go(b(xa(Q))<0?ke?"<":"-":ke?">":"+"):e.is(Ni)&&L&&ke?v.go(R(!0)?">":"<"):v.go(v.toDest(Z),!0),g(!0)}function E(U){var Q=n.dragMinThreshold,Z=go(Q),ke=Z&&Q.mouse||0,we=(Z?Q.touch:+Q)||10;return cn($(U))>(We(U)?we:ke)}function O(U){return cn($(U))>cn($(U,!0))}function ae(U){if(e.is(Zi)||!L){var Q=re(U);if(Q&&Q<Ts)return $(U)/Q}return 0}function ie(U){return I()+xa(U)*Un(cn(U)*(n.flickPower||600),V?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function $(U,Q){return te(U,Q)-te(P(U),Q)}function re(U){return va(U)-va(P(U))}function P(U){return G===U&&k||G}function te(U,Q){return(We(U)?U.changedTouches[0]:U)["page"+m(Q?"Y":"X")]}function K(U){return U/(L&&e.is(Ni)?$u:1)}function fe(U){var Q=n.noDrag;return!ho(U,"."+gc+", ."+Ir)&&(!Q||!ho(U,Q))}function We(U){return typeof TouchEvent<"u"&&U instanceof TouchEvent}function me(){return A}function ce(U){x=U}return{mount:M,disable:ce,isDragging:me}}var Gu={Spacebar:" ",Right:Tr,Left:Cr,Up:sc,Down:lc};function Ya(e){return e=qn(e)?e:e.key,Gu[e]||e}var Ls="keydown";function qu(e,t,n){var i=Yt(e),o=i.on,s=i.bind,l=i.unbind,d=e.root,c=t.Direction.resolve,u,p;function v(){y(),o(sn,g),o(sn,y),o(_n,m)}function y(){var I=n.keyboard;I&&(u=I==="global"?window:d,s(u,Ls,b))}function g(){l(u,Ls)}function h(I){p=I}function m(){var I=p;p=!0,Nl(function(){p=I})}function b(I){if(!p){var R=Ya(I);R===c(Cr)?e.go("<"):R===c(Tr)&&e.go(">")}}return{mount:v,destroy:g,disable:h}}var uo=Na+"-lazy",rr=uo+"-srcset",Uu="["+uo+"], ["+rr+"]";function Xu(e,t,n){var i=Yt(e),o=i.on,s=i.off,l=i.bind,d=i.emit,c=n.lazyLoad==="sequential",u=[Yi,vi],p=[];function v(){n.lazyLoad&&(y(),o(Qt,y))}function y(){Wn(p),g(),c?I():(s(u),o(u,h),h())}function g(){t.Slides.forEach(function(R){Ha(R.slide,Uu).forEach(function(T){var G=bn(T,uo),k=bn(T,rr);if(G!==T.src||k!==T.srcset){var V=n.classes.spinner,A=T.parentElement,L=Mo(A,"."+V)||ki("span",V,A);p.push([T,R,L]),T.src||vo(T,"none")}})})}function h(){p=p.filter(function(R){var T=n.perPage*((n.preloadPages||1)+1)-1;return R[1].isWithin(e.index,T)?m(R):!0}),p.length||s(u)}function m(R){var T=R[0];Tn(R[1].slide,$a),l(T,"load error",Xt(b,R)),Ct(T,"src",bn(T,uo)),Ct(T,"srcset",bn(T,rr)),Ln(T,uo),Ln(T,rr)}function b(R,T){var G=R[0],k=R[1];Pn(k.slide,$a),T.type!=="error"&&(hi(R[2]),vo(G,""),d(Ga,G,k),d(Hi)),c&&I()}function I(){p.length&&m(p.shift())}return{mount:v,destroy:Xt(Wn,p),check:h}}function Ku(e,t,n){var i=Yt(e),o=i.on,s=i.emit,l=i.bind,d=t.Slides,c=t.Elements,u=t.Controller,p=u.hasFocus,v=u.getIndex,y=u.go,g=t.Direction.resolve,h=c.pagination,m=[],b,I;function R(){T(),o([sn,Qt,pr],R);var x=n.pagination;h&&vo(h,x?"":"none"),x&&(o([_n,wr,vi],D),G(),D(),s(nc,{list:b,items:m},L(e.index)))}function T(){b&&(hi(h?Zn(b.children):b),Pn(b,I),Wn(m),b=null),i.destroy()}function G(){var x=e.length,W=n.classes,M=n.i18n,Y=n.perPage,F=p()?u.getEnd()+1:xo(x/Y);b=h||ki("ul",W.pagination,c.track.parentElement),Tn(b,I=Er+"--"+A()),Ct(b,kn,"tablist"),Ct(b,hn,M.select),Ct(b,Ua,A()===Lr?"vertical":"");for(var X=0;X<F;X++){var j=ki("li",null,b),B=ki("button",{class:W.page,type:"button"},j),ne=d.getIn(X).map(function(E){return E.slide.id}),S=!p()&&Y>1?M.pageX:M.slideX;l(B,"click",Xt(k,X)),n.paginationKeyboard&&l(B,"keydown",Xt(V,X)),Ct(j,kn,"presentation"),Ct(B,kn,"tab"),Ct(B,ko,ne.join(" ")),Ct(B,hn,ba(S,X+1)),Ct(B,Ai,-1),m.push({li:j,button:B,page:X})}}function k(x){y(">"+x,!0)}function V(x,W){var M=m.length,Y=Ya(W),F=A(),X=-1;Y===g(Tr,!1,F)?X=++x%M:Y===g(Cr,!1,F)?X=(--x+M)%M:Y==="Home"?X=0:Y==="End"&&(X=M-1);var j=m[X];j&&(zl(j.button),y(">"+X),En(W,!0))}function A(){return n.paginationDirection||n.direction}function L(x){return m[u.toPage(x)]}function D(){var x=L(v(!0)),W=L(v());if(x){var M=x.button;Pn(M,fi),Ln(M,bs),Ct(M,Ai,-1)}if(W){var Y=W.button;Tn(Y,fi),Ct(Y,bs,!0),Ct(Y,Ai,"")}s(ic,{list:b,items:m},x,W)}return{items:m,mount:R,destroy:T,getAt:L,update:D}}var Yu=[" ","Enter"];function Zu(e,t,n){var i=n.isNavigation,o=n.slideFocus,s=[];function l(){e.splides.forEach(function(h){h.isParent||(u(e,h.splide),u(h.splide,e))}),i&&p()}function d(){s.forEach(function(h){h.destroy()}),Wn(s)}function c(){d(),l()}function u(h,m){var b=Yt(h);b.on(_n,function(I,R,T){m.go(m.is(Zi)?T:I)}),s.push(b)}function p(){var h=Yt(e),m=h.on;m(Da,y),m(rc,g),m([Jn,sn],v),s.push(h),h.emit(za,e.splides)}function v(){Ct(t.Elements.list,Ua,n.direction===Lr?"vertical":"")}function y(h){e.go(h.index)}function g(h,m){Wa(Yu,Ya(m))&&(y(h),En(m))}return{setup:Xt(t.Media.set,{slideFocus:Ro(o)?i:o},!0),mount:l,destroy:d,remount:c}}function Ju(e,t,n){var i=Yt(e),o=i.bind,s=0;function l(){n.wheel&&o(t.Elements.track,"wheel",d,Ii)}function d(u){if(u.cancelable){var p=u.deltaY,v=p<0,y=va(u),g=n.wheelMinThreshold||0,h=n.wheelSleep||0;cn(p)>g&&y-s>h&&(e.go(v?"<":">"),s=y),c(v)&&En(u)}}function c(u){return!n.releaseWheel||e.state.is(Ki)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var Qu=90;function ep(e,t,n){var i=Yt(e),o=i.on,s=t.Elements.track,l=n.live&&!n.isNavigation,d=ki("span",vu),c=Sr(Qu,Xt(p,!1));function u(){l&&(y(!t.Autoplay.isPaused()),Ct(s,$s,!0),d.textContent="…",o(Ba,Xt(y,!0)),o(Va,Xt(y,!1)),o([Yi,vi],Xt(p,!0)))}function p(g){Ct(s,Ss,g),g?(Eo(s,d),c.start()):(hi(d),c.cancel())}function v(){Ln(s,[ws,$s,Ss]),hi(d)}function y(g){l&&Ct(s,ws,g?"off":"polite")}return{mount:u,disable:y,destroy:v}}var tp=Object.freeze({__proto__:null,Media:cu,Direction:du,Elements:Cu,Slides:Lu,Layout:Ru,Clones:Eu,Move:Mu,Controller:Pu,Arrows:Fu,Autoplay:_u,Cover:Hu,Scroll:Bu,Drag:Vu,Keyboard:qu,LazyLoad:Xu,Pagination:Ku,Sync:Zu,Wheel:Ju,Live:ep}),np={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"},ip={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:wu,i18n:np,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function op(e,t,n){var i=t.Slides;function o(){Yt(e).on([Jn,Qt],s)}function s(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function l(d,c){i.style("transition","opacity "+n.speed+"ms "+n.easing),Nl(c)}return{mount:o,start:l,cancel:ya}}function rp(e,t,n){var i=t.Move,o=t.Controller,s=t.Scroll,l=t.Elements.list,d=Xt(xn,l,"transition"),c;function u(){Yt(e).bind(l,"transitionend",function(g){g.target===l&&c&&(v(),c())})}function p(g,h){var m=i.toPosition(g,!0),b=i.getPosition(),I=y(g);cn(m-b)>=1&&I>=1?n.useScroll?s.scroll(m,I,!1,h):(d("transform "+I+"ms "+n.easing),i.translate(m,!0),c=h):(i.jump(g),h())}function v(){d(""),s.cancel()}function y(g){var h=n.rewindSpeed;if(e.is(Ni)&&h){var m=o.getIndex(!0),b=o.getEnd();if(m===0&&g>=b||m>=b&&g===0)return h}return n.speed}return{mount:u,start:p,cancel:v}}var ap=(function(){function e(n,i){this.event=Yt(),this.Components={},this.state=su(Pi),this.splides=[],this._o={},this._E={};var o=qn(n)?Vl(document,n):n;co(o,o+" is invalid."),this.root=o,i=zn({label:bn(o,hn)||"",labelledby:bn(o,qa)||""},ip,e.defaults,i||{});try{zn(i,JSON.parse(bn(o,Na)))}catch{co(!1,"Invalid JSON")}this._o=Object.create(zn({},i))}var t=e.prototype;return t.mount=function(i,o){var s=this,l=this.state,d=this.Components;co(l.is([Pi,cr]),"Already mounted!"),l.set(Pi),this._C=d,this._T=o||this._T||(this.is(Ao)?op:rp),this._E=i||this._E;var c=yo({},tp,this._E,{Transition:this._T});return mi(c,function(u,p){var v=u(s,d,s._o);d[p]=v,v.setup&&v.setup()}),mi(d,function(u){u.mount&&u.mount()}),this.emit(Jn),Tn(this.root,xu),l.set(_i),this.emit(wa),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(_i)&&(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(Zn(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(Qt),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,s=this.state;return s.is(Pi)?Yt(this).on(wa,this.destroy.bind(this,i)):(mi(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(ja),o.destroy(),i&&Wn(this.splides),s.set(cr)),this},nu(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})(),Za=ap;Za.defaults={};Za.STATES=ou;var Rs=[[Jn,"onMounted"],[wa,"onReady"],[_n,"onMove"],[Yi,"onMoved"],[Da,"onClick"],[Ul,"onActive"],[Xl,"onInactive"],[Kl,"onVisible"],[Yl,"onHidden"],[Qt,"onRefresh"],[sn,"onUpdated"],[Hi,"onResize"],[br,"onResized"],[Zl,"onDrag"],[Jl,"onDragging"],[Ql,"onDragged"],[wr,"onScroll"],[vi,"onScrolled"],[ja,"onDestroy"],[ec,"onArrowsMounted"],[tc,"onArrowsUpdated"],[nc,"onPaginationMounted"],[ic,"onPaginationUpdated"],[za,"onNavigationMounted"],[Ba,"onAutoplayPlay"],[oc,"onAutoplayPlaying"],[Va,"onAutoplayPause"],[Ga,"onLazyLoadLoaded"]];function Ja(...e){return e.filter(Boolean).join(" ")}function mr(e){return e!==null&&typeof e=="object"}function Ca(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!Ca(n,t[i]));if(mr(e)&&mr(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!Ca(e[o],t[o]))}return e===t}function sp(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function lp(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 Ta(e,t){const n=e;return lp(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():mr(i)?n[o]=Ta(mr(n[o])?n[o]:{},i):n[o]=i}),n}var cp=({children:e,className:t,...n})=>a.createElement("div",{className:Ja("splide__track",t),...n},a.createElement("ul",{className:"splide__list"},e)),Qa=class extends a.Component{constructor(){super(...arguments),this.splideRef=a.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new Za(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Ta({},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&&!Ca(this.options,e)&&(this.splide.options=e,this.options=Ta({},e));const t=this.getSlides();sp(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){Rs.forEach(([t,n])=>{const i=this.props[n];typeof i=="function"&&e.on(t,(...o)=>{i(e,...o)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:i,...o}=this.props;return a.createElement(t,{className:Ja("splide",e),ref:this.splideRef,...this.omit(o,["options",...Rs.map(s=>s[1])])},n?a.createElement(cp,null,i):i)}},es=({children:e,className:t,...n})=>a.createElement("li",{className:Ja("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),a=require("react"),mt=require("classnames"),C=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Yn=require("react-dom");function ud(e){return e.type==="object"&&e.version===1}const pd="ControlSlider-module__wrapper___sHEkd",md="ControlSlider-module__hoverArrow___A-dOH",gd="ControlSlider-module__sliderItem___QQSkR",hd="ControlSlider-module__sliderImage___9hRl-",fd="ControlSlider-module__arrow___05ghY",yd="ControlSlider-module__arrowVertical___tBfVN",vd="ControlSlider-module__nextArrow___-30Yc",xd="ControlSlider-module__arrowInner___aEra3",bd="ControlSlider-module__arrowIcon___S4ztF",wd="ControlSlider-module__arrowImg___2dwJW",Sd="ControlSlider-module__mirror___brd6U",$d="ControlSlider-module__pagination___bicLF",Cd="ControlSlider-module__paginationInner___bT-P-",Td="ControlSlider-module__paginationVertical___zYqKw",Ld="ControlSlider-module__paginationItem___nTRbk",Rd="ControlSlider-module__dot___p1Qun",Id="ControlSlider-module__activeDot___LHFaj",Ed="ControlSlider-module__paginationInsideBottom___R3FWn",Md="ControlSlider-module__paginationInsideTop___V-qb-",Pd="ControlSlider-module__paginationOutsideBottom___14w8D",kd="ControlSlider-module__paginationOutsideTop___SCLqB",Ad="ControlSlider-module__paginationInsideLeft___yOBRZ",Fd="ControlSlider-module__paginationInsideRight___Rtt3o",Wd="ControlSlider-module__paginationOutsideLeft___lahaw",_d="ControlSlider-module__paginationOutsideRight___EtuQa",Hd="ControlSlider-module__imgWrapper___UjEgB",Nd="ControlSlider-module__captionBlock___dJ6-j",Od="ControlSlider-module__captionTextWrapper___HFlpf",Dd="ControlSlider-module__captionText___uGBVc",jd="ControlSlider-module__active___WZK4G",zd="ControlSlider-module__withPointerEvents___t-18M",Bd="ControlSlider-module__topLeftAlignment___zjnGM",Vd="ControlSlider-module__topCenterAlignment___gD1xW",Gd="ControlSlider-module__topRightAlignment___NMapS",qd="ControlSlider-module__middleLeftAlignment___OnUrY",Ud="ControlSlider-module__middleCenterAlignment___Tdkl0",Xd="ControlSlider-module__middleRightAlignment___wEbfX",Kd="ControlSlider-module__bottomLeftAlignment___cTP2-",Yd="ControlSlider-module__bottomCenterAlignment___c54fB",Zd="ControlSlider-module__bottomRightAlignment___kEwrz",Jd="ControlSlider-module__clickOverlay___DZA28",Qd="ControlSlider-module__contain___pLyq7",eu="ControlSlider-module__cover___KdDat",dt={wrapper:pd,hoverArrow:md,sliderItem:gd,sliderImage:hd,arrow:fd,arrowVertical:yd,nextArrow:vd,arrowInner:xd,arrowIcon:bd,arrowImg:wd,mirror:Sd,pagination:$d,paginationInner:Cd,paginationVertical:Td,paginationItem:Ld,dot:Rd,activeDot:Id,paginationInsideBottom:Ed,paginationInsideTop:Md,paginationOutsideBottom:Pd,paginationOutsideTop:kd,paginationInsideLeft:Ad,paginationInsideRight:Fd,paginationOutsideLeft:Wd,paginationOutsideRight:_d,imgWrapper:Hd,captionBlock:Nd,captionTextWrapper:Od,captionText:Dd,active:jd,withPointerEvents:zd,topLeftAlignment:Bd,topCenterAlignment:Vd,topRightAlignment:Gd,middleLeftAlignment:qd,middleCenterAlignment:Ud,middleRightAlignment:Xd,bottomLeftAlignment:Kd,bottomCenterAlignment:Yd,bottomRightAlignment:Zd,clickOverlay:Jd,contain:Qd,cover:eu};function tu(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 nu(e,t,n){return t&&tu(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var gs="(prefers-reduced-motion: reduce)",Pi=1,iu=2,_i=3,Ki=4,Lo=5,nr=6,cr=7,ou={CREATED:Pi,MOUNTED:iu,IDLE:_i,MOVING:Ki,SCROLLING:Lo,DRAGGING:nr,DESTROYED:cr};function Wn(e){e.length=0}function Zn(e,t,n){return Array.prototype.slice.call(e,t,n)}function Xt(e){return e.bind.apply(e,[null].concat(Zn(arguments,1)))}var Nl=setTimeout,ya=function(){};function hs(e){return requestAnimationFrame(e)}function xr(e,t){return typeof t===e}function go(e){return!Fa(e)&&xr("object",e)}var Aa=Array.isArray,Ol=Xt(xr,"function"),qn=Xt(xr,"string"),Ro=Xt(xr,"undefined");function Fa(e){return e===null}function Dl(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Io(e){return Aa(e)?e:[e]}function yn(e,t){Io(e).forEach(t)}function Wa(e,t){return e.indexOf(t)>-1}function ir(e,t){return e.push.apply(e,Io(t)),e}function Mn(e,t,n){e&&yn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Tn(e,t){Mn(e,qn(t)?t.split(" "):t,!0)}function Eo(e,t){yn(t,e.appendChild.bind(e))}function _a(e,t){yn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function ho(e,t){return Dl(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function jl(e,t){var n=e?Zn(e.children):[];return t?n.filter(function(i){return ho(i,t)}):n}function Mo(e,t){return t?jl(e,t)[0]:e.firstElementChild}var fo=Object.keys;function mi(e,t,n){return e&&(n?fo(e).reverse():fo(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function yo(e){return Zn(arguments,1).forEach(function(t){mi(t,function(n,i){e[i]=t[i]})}),e}function zn(e){return Zn(arguments,1).forEach(function(t){mi(t,function(n,i){Aa(n)?e[i]=n.slice():go(n)?e[i]=zn({},go(e[i])?e[i]:{},n):e[i]=n})}),e}function fs(e,t){yn(t||fo(e),function(n){delete e[n]})}function Ln(e,t){yn(e,function(n){yn(t,function(i){n&&n.removeAttribute(i)})})}function Tt(e,t,n){go(t)?mi(t,function(i,o){Tt(e,o,i)}):yn(e,function(i){Fa(n)||n===""?Ln(i,t):i.setAttribute(t,String(n))})}function ki(e,t,n){var i=document.createElement(e);return t&&(qn(t)?Tn(i,t):Tt(i,t)),n&&Eo(n,i),i}function xn(e,t,n){if(Ro(n))return getComputedStyle(e)[t];Fa(n)||(e.style[t]=""+n)}function vo(e,t){xn(e,"display",t)}function zl(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function bn(e,t){return e.getAttribute(t)}function ys(e,t){return e&&e.classList.contains(t)}function mn(e){return e.getBoundingClientRect()}function hi(e){yn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Bl(e){return Mo(new DOMParser().parseFromString(e,"text/html").body)}function En(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Vl(e,t){return e&&e.querySelector(t)}function Ha(e,t){return t?Zn(e.querySelectorAll(t)):[]}function Pn(e,t){Mn(e,t,!1)}function va(e){return e.timeStamp}function ii(e){return qn(e)?e:e?e+"px":""}var Po="splide",Na="data-"+Po;function co(e,t){if(!e)throw new Error("["+Po+"] "+(t||""))}var Un=Math.min,dr=Math.max,ur=Math.floor,xo=Math.ceil,cn=Math.abs;function Gl(e,t,n){return cn(e-t)<n}function or(e,t,n,i){var o=Un(t,n),s=dr(t,n);return i?o<e&&e<s:o<=e&&e<=s}function Ri(e,t,n){var i=Un(t,n),o=dr(t,n);return Un(dr(i,e),o)}function xa(e){return+(e>0)-+(e<0)}function ba(e,t){return yn(t,function(n){e=e.replace("%s",""+n)}),e}function Oa(e){return e<10?"0"+e:""+e}var vs={};function ru(e){return""+e+Oa(vs[e]=(vs[e]||0)+1)}function ql(){var e=[];function t(l,d,c,u){o(l,d,function(p,v,y){var g="addEventListener"in p,h=g?p.removeEventListener.bind(p,v,c,u):p.removeListener.bind(p,c);g?p.addEventListener(v,c,u):p.addListener(c),e.push([p,v,y,c,h])})}function n(l,d,c){o(l,d,function(u,p,v){e=e.filter(function(y){return y[0]===u&&y[1]===p&&y[2]===v&&(!c||y[3]===c)?(y[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){yn(l,function(u){u&&yn(d,function(p){p.split(" ").forEach(function(v){var y=v.split(".");c(u,y[0],y[1])})})})}function s(){e.forEach(function(l){l[4]()}),Wn(e)}return{bind:t,unbind:n,dispatch:i,destroy:s}}var Jn="mounted",wa="ready",_n="move",Yi="moved",Da="click",Ul="active",Xl="inactive",Kl="visible",Yl="hidden",Qt="refresh",sn="updated",Hi="resize",br="resized",Zl="drag",Jl="dragging",Ql="dragged",wr="scroll",vi="scrolled",au="overflow",ja="destroy",ec="arrows:mounted",tc="arrows:updated",nc="pagination:mounted",ic="pagination:updated",za="navigation:mounted",Ba="autoplay:play",oc="autoplay:playing",Va="autoplay:pause",Ga="lazyload:loaded",rc="sk",ac="sh",pr="ei";function Yt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=ql();function i(s,l){n.bind(t,Io(s).join(" "),function(d){l.apply(l,Aa(d.detail)?d.detail:[])})}function o(s){n.dispatch(t,s,Zn(arguments,1))}return e&&e.event.on(ja,n.destroy),yo(n,{bus:t,on:i,off:Xt(n.unbind,t),emit:o})}function Sr(e,t,n,i){var o=Date.now,s,l=0,d,c=!0,u=0;function p(){if(!c){if(l=e?Un((o()-s)/e,1):1,n&&n(l),l>=1&&(t(),s=o(),i&&++u>=i))return y();d=hs(p)}}function v(I){I||h(),s=o()-(I?l*e:0),c=!1,d=hs(p)}function y(){c=!0}function g(){s=o(),l=0,n&&n(l)}function h(){d&&cancelAnimationFrame(d),l=0,d=0,c=!0}function m(I){e=I}function b(){return c}return{start:v,rewind:g,pause:y,cancel:h,set:m,isPaused:b}}function su(e){var t=e;function n(o){t=o}function i(o){return Wa(Io(o),t)}return{set:n,is:i}}function lu(e,t){var n=Sr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function cu(e,t,n){var i=e.state,o=n.breakpoints||{},s=n.reducedMotion||{},l=ql(),d=[];function c(){var h=n.mediaQuery==="min";fo(o).sort(function(m,b){return h?+m-+b:+b-+m}).forEach(function(m){p(o[m],"("+(h?"min":"max")+"-width:"+m+"px)")}),p(s,gs),v()}function u(h){h&&l.destroy()}function p(h,m){var b=matchMedia(m);l.bind(b,"change",v),d.push([h,b])}function v(){var h=i.is(cr),m=n.direction,b=d.reduce(function(I,R){return zn(I,R[1].matches?R[0]:{})},{});fs(n),g(b),n.destroy?e.destroy(n.destroy==="completely"):h?(u(!0),e.mount()):m!==n.direction&&e.refresh()}function y(h){matchMedia(gs).matches&&(h?zn(n,s):fs(n,fo(s)))}function g(h,m,b){zn(n,h),m&&zn(Object.getPrototypeOf(n),h),(b||!i.is(Pi))&&e.emit(sn,n)}return{setup:c,destroy:u,reduce:y,set:g}}var $r="Arrow",Cr=$r+"Left",Tr=$r+"Right",sc=$r+"Up",lc=$r+"Down",xs="rtl",Lr="ttb",Dr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[sc,Tr],ArrowRight:[lc,Cr]};function du(e,t,n){function i(s,l,d){d=d||n.direction;var c=d===xs&&!l?1:d===Lr?0:-1;return Dr[s]&&Dr[s][c]||s.replace(/width|left|right/i,function(u,p){var v=Dr[u.toLowerCase()][c]||u;return p>0?v.charAt(0).toUpperCase()+v.slice(1):v})}function o(s){return s*(n.direction===xs?1:-1)}return{resolve:i,orient:o}}var kn="role",Ai="tabindex",uu="disabled",wn="aria-",ko=wn+"controls",cc=wn+"current",bs=wn+"selected",hn=wn+"label",qa=wn+"labelledby",dc=wn+"hidden",Ua=wn+"orientation",bo=wn+"roledescription",ws=wn+"live",Ss=wn+"busy",$s=wn+"atomic",Xa=[kn,Ai,uu,ko,cc,hn,qa,dc,Ua,bo],Rn=Po+"__",Qn="is-",jr=Po,Cs=Rn+"track",pu=Rn+"list",Rr=Rn+"slide",uc=Rr+"--clone",mu=Rr+"__container",Ka=Rn+"arrows",Ir=Rn+"arrow",pc=Ir+"--prev",mc=Ir+"--next",Er=Rn+"pagination",gc=Er+"__page",gu=Rn+"progress",hu=gu+"__bar",fu=Rn+"toggle",yu=Rn+"spinner",vu=Rn+"sr",xu=Qn+"initialized",fi=Qn+"active",hc=Qn+"prev",fc=Qn+"next",Sa=Qn+"visible",$a=Qn+"loading",yc=Qn+"focus-in",vc=Qn+"overflow",bu=[fi,Sa,hc,fc,$a,yc,vc],wu={slide:Rr,clone:uc,arrows:Ka,arrow:Ir,prev:pc,next:mc,pagination:Er,page:gc,spinner:yu};function Su(e,t){if(Ol(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!ho(n,t);)n=n.parentElement;return n}var $u=5,Ts=200,xc="touchstart mousedown",zr="touchmove mousemove",Br="touchend touchcancel mouseup click";function Cu(e,t,n){var i=Yt(e),o=i.on,s=i.bind,l=e.root,d=n.i18n,c={},u=[],p=[],v=[],y,g,h;function m(){T(),G(),R()}function b(){o(Qt,I),o(Qt,m),o(sn,R),s(document,xc+" keydown",function(A){h=A.type==="keydown"},{capture:!0}),s(l,"focusin",function(){Mn(l,yc,!!h)})}function I(A){var L=Xa.concat("style");Wn(u),Pn(l,p),Pn(y,v),Ln([y,g],L),Ln(l,A?L:["style",bo])}function R(){Pn(l,p),Pn(y,v),p=V(jr),v=V(Cs),Tn(l,p),Tn(y,v),Tt(l,hn,n.label),Tt(l,qa,n.labelledby)}function T(){y=k("."+Cs),g=Mo(y,"."+pu),co(y&&g,"A track/list element is missing."),ir(u,jl(g,"."+Rr+":not(."+uc+")")),mi({arrows:Ka,pagination:Er,prev:pc,next:mc,bar:hu,toggle:fu},function(A,L){c[L]=k("."+A)}),yo(c,{root:l,track:y,list:g,slides:u})}function G(){var A=l.id||ru(Po),L=n.role;l.id=A,y.id=y.id||A+"-track",g.id=g.id||A+"-list",!bn(l,kn)&&l.tagName!=="SECTION"&&L&&Tt(l,kn,L),Tt(l,bo,d.carousel),Tt(g,kn,"presentation")}function k(A){var L=Vl(l,A);return L&&Su(L,"."+jr)===l?L:void 0}function V(A){return[A+"--"+n.type,A+"--"+n.direction,n.drag&&A+"--draggable",n.isNavigation&&A+"--nav",A===jr&&fi]}return yo(c,{setup:m,mount:b,destroy:I})}var Ni="slide",Zi="loop",Ao="fade";function Tu(e,t,n,i){var o=Yt(e),s=o.on,l=o.emit,d=o.bind,c=e.Components,u=e.root,p=e.options,v=p.isNavigation,y=p.updateOnMove,g=p.i18n,h=p.pagination,m=p.slideFocus,b=c.Direction.resolve,I=bn(i,"style"),R=bn(i,hn),T=n>-1,G=Mo(i,"."+mu),k;function V(){T||(i.id=u.id+"-slide"+Oa(t+1),Tt(i,kn,h?"tabpanel":"group"),Tt(i,bo,g.slide),Tt(i,hn,R||ba(g.slideLabel,[t+1,e.length]))),A()}function A(){d(i,"click",Xt(l,Da,ne)),d(i,"keydown",Xt(l,rc,ne)),s([Yi,ac,vi],W),s(za,D),y&&s(_n,x)}function L(){k=!0,o.destroy(),Pn(i,bu),Ln(i,Xa),Tt(i,"style",I),Tt(i,hn,R||"")}function D(){var S=e.splides.map(function(E){var O=E.splide.Components.Slides.getAt(t);return O?O.slide.id:""}).join(" ");Tt(i,hn,ba(g.slideX,(T?n:t)+1)),Tt(i,ko,S),Tt(i,kn,m?"button":""),m&&Ln(i,bo)}function x(){k||W()}function W(){if(!k){var S=e.index;M(),Y(),Mn(i,hc,t===S-1),Mn(i,fc,t===S+1)}}function M(){var S=X();S!==ys(i,fi)&&(Mn(i,fi,S),Tt(i,cc,v&&S||""),l(S?Ul:Xl,ne))}function Y(){var S=j(),E=!S&&(!X()||T);if(e.state.is([Ki,Lo])||Tt(i,dc,E||""),Tt(Ha(i,p.focusableNodes||""),Ai,E?-1:""),m&&Tt(i,Ai,E?-1:0),S!==ys(i,Sa)&&(Mn(i,Sa,S),l(S?Kl:Yl,ne)),!S&&document.activeElement===i){var O=c.Slides.getAt(e.index);O&&zl(O.slide)}}function F(S,E,O){xn(O&&G||i,S,E)}function X(){var S=e.index;return S===t||p.cloneStatus&&S===n}function j(){if(e.is(Ao))return X();var S=mn(c.Elements.track),E=mn(i),O=b("left",!0),ae=b("right",!0);return ur(S[O])<=xo(E[O])&&ur(E[ae])<=xo(S[ae])}function B(S,E){var O=cn(S-t);return!T&&(p.rewind||e.is(Zi))&&(O=Un(O,e.length-O)),O<=E}var ne={index:t,slideIndex:n,slide:i,container:G,isClone:T,mount:V,destroy:L,update:W,style:F,isWithin:B};return ne}function Lu(e,t,n){var i=Yt(e),o=i.on,s=i.emit,l=i.bind,d=t.Elements,c=d.slides,u=d.list,p=[];function v(){y(),o(Qt,g),o(Qt,y)}function y(){c.forEach(function(W,M){m(W,M,-1)})}function g(){k(function(W){W.destroy()}),Wn(p)}function h(){k(function(W){W.update()})}function m(W,M,Y){var F=Tu(e,M,Y,W);F.mount(),p.push(F),p.sort(function(X,j){return X.index-j.index})}function b(W){return W?V(function(M){return!M.isClone}):p}function I(W){var M=t.Controller,Y=M.toIndex(W),F=M.hasFocus()?1:n.perPage;return V(function(X){return or(X.index,Y,Y+F-1)})}function R(W){return V(W)[0]}function T(W,M){yn(W,function(Y){if(qn(Y)&&(Y=Bl(Y)),Dl(Y)){var F=c[M];F?_a(Y,F):Eo(u,Y),Tn(Y,n.classes.slide),L(Y,Xt(s,Hi))}}),s(Qt)}function G(W){hi(V(W).map(function(M){return M.slide})),s(Qt)}function k(W,M){b(M).forEach(W)}function V(W){return p.filter(Ol(W)?W:function(M){return qn(W)?ho(M.slide,W):Wa(Io(W),M.index)})}function A(W,M,Y){k(function(F){F.style(W,M,Y)})}function L(W,M){var Y=Ha(W,"img"),F=Y.length;F?Y.forEach(function(X){l(X,"load error",function(){--F||M()})}):M()}function D(W){return W?c.length:p.length}function x(){return p.length>n.perPage}return{mount:v,destroy:g,update:h,register:m,get:b,getIn:I,getAt:R,add:T,remove:G,forEach:k,filter:V,style:A,getLength:D,isEnough:x}}function Ru(e,t,n){var i=Yt(e),o=i.on,s=i.bind,l=i.emit,d=t.Slides,c=t.Direction.resolve,u=t.Elements,p=u.root,v=u.track,y=u.list,g=d.getAt,h=d.style,m,b,I;function R(){T(),s(window,"resize load",lu(Xt(l,Hi))),o([sn,Qt],T),o(Hi,G)}function T(){m=n.direction===Lr,xn(p,"maxWidth",ii(n.width)),xn(v,c("paddingLeft"),k(!1)),xn(v,c("paddingRight"),k(!0)),G(!0)}function G(ne){var S=mn(p);(ne||b.width!==S.width||b.height!==S.height)&&(xn(v,"height",V()),h(c("marginRight"),ii(n.gap)),h("width",L()),h("height",D(),!0),b=S,l(br),I!==(I=B())&&(Mn(p,vc,I),l(au,I)))}function k(ne){var S=n.padding,E=c(ne?"right":"left");return S&&ii(S[E]||(go(S)?0:S))||"0px"}function V(){var ne="";return m&&(ne=A(),co(ne,"height or heightRatio is missing."),ne="calc("+ne+" - "+k(!1)+" - "+k(!0)+")"),ne}function A(){return ii(n.height||mn(y).width*n.heightRatio)}function L(){return n.autoWidth?null:ii(n.fixedWidth)||(m?"":x())}function D(){return ii(n.fixedHeight)||(m?n.autoHeight?null:x():A())}function x(){var ne=ii(n.gap);return"calc((100%"+(ne&&" + "+ne)+")/"+(n.perPage||1)+(ne&&" - "+ne)+")"}function W(){return mn(y)[c("width")]}function M(ne,S){var E=g(ne||0);return E?mn(E.slide)[c("width")]+(S?0:X()):0}function Y(ne,S){var E=g(ne);if(E){var O=mn(E.slide)[c("right")],ae=mn(y)[c("left")];return cn(O-ae)+(S?0:X())}return 0}function F(ne){return Y(e.length-1)-Y(0)+M(0,ne)}function X(){var ne=g(0);return ne&&parseFloat(xn(ne.slide,c("marginRight")))||0}function j(ne){return parseFloat(xn(v,c("padding"+(ne?"Right":"Left"))))||0}function B(){return e.is(Ao)||F(!0)>W()}return{mount:R,resize:G,listSize:W,slideSize:M,sliderSize:F,totalSize:Y,getPadding:j,isOverflow:B}}var Iu=2;function Eu(e,t,n){var i=Yt(e),o=i.on,s=t.Elements,l=t.Slides,d=t.Direction.resolve,c=[],u;function p(){o(Qt,v),o([sn,Hi],g),(u=b())&&(h(u),t.Layout.resize(!0))}function v(){y(),p()}function y(){hi(c),Wn(c),i.destroy()}function g(){var I=b();u!==I&&(u<I||!I)&&i.emit(Qt)}function h(I){var R=l.get().slice(),T=R.length;if(T){for(;R.length<I;)ir(R,R);ir(R.slice(-I),R.slice(0,I)).forEach(function(G,k){var V=k<I,A=m(G.slide,k);V?_a(A,R[0].slide):Eo(s.list,A),ir(c,A),l.register(A,k-I+(V?0:T),G.index)})}}function m(I,R){var T=I.cloneNode(!0);return Tn(T,n.classes.clone),T.id=e.root.id+"-clone"+Oa(R+1),T}function b(){var I=n.clones;if(!e.is(Zi))I=0;else if(Ro(I)){var R=n[d("fixedWidth")]&&t.Layout.slideSize(0),T=R&&xo(mn(s.track)[d("width")]/R);I=T||n[d("autoWidth")]&&e.length||n.perPage*Iu}return I}return{mount:p,destroy:y}}function Mu(e,t,n){var i=Yt(e),o=i.on,s=i.emit,l=e.state.set,d=t.Layout,c=d.slideSize,u=d.getPadding,p=d.totalSize,v=d.listSize,y=d.sliderSize,g=t.Direction,h=g.resolve,m=g.orient,b=t.Elements,I=b.list,R=b.track,T;function G(){T=t.Transition,o([Jn,br,sn,Qt],k)}function k(){t.Controller.isBusy()||(t.Scroll.cancel(),A(e.index),t.Slides.update())}function V(E,O,ae,ie){E!==O&&ne(E>ae)&&(W(),L(x(F(),E>ae),!0)),l(Ki),s(_n,O,ae,E),T.start(O,function(){l(_i),s(Yi,O,ae,E),ie&&ie()})}function A(E){L(Y(E,!0))}function L(E,O){if(!e.is(Ao)){var ae=O?E:D(E);xn(I,"transform","translate"+h("X")+"("+ae+"px)"),E!==ae&&s(ac)}}function D(E){if(e.is(Zi)){var O=M(E),ae=O>t.Controller.getEnd(),ie=O<0;(ie||ae)&&(E=x(E,ae))}return E}function x(E,O){var ae=E-B(O),ie=y();return E-=m(ie*(xo(cn(ae)/ie)||1))*(O?1:-1),E}function W(){L(F(),!0),T.cancel()}function M(E){for(var O=t.Slides.get(),ae=0,ie=1/0,$=0;$<O.length;$++){var se=O[$].index,P=cn(Y(se,!0)-E);if(P<=ie)ie=P,ae=se;else break}return ae}function Y(E,O){var ae=m(p(E-1)-j(E));return O?X(ae):ae}function F(){var E=h("left");return mn(I)[E]-mn(R)[E]+m(u(!1))}function X(E){return n.trimSpace&&e.is(Ni)&&(E=Ri(E,0,m(y(!0)-v()))),E}function j(E){var O=n.focus;return O==="center"?(v()-c(E,!0))/2:+O*c(E)||0}function B(E){return Y(E?t.Controller.getEnd():0,!!n.trimSpace)}function ne(E){var O=m(x(F(),E));return E?O>=0:O<=I[h("scrollWidth")]-mn(R)[h("width")]}function S(E,O){O=Ro(O)?F():O;var ae=E!==!0&&m(O)<m(B(!1)),ie=E!==!1&&m(O)>m(B(!0));return ae||ie}return{mount:G,move:V,jump:A,translate:L,shift:x,cancel:W,toIndex:M,toPosition:Y,getPosition:F,getLimit:B,exceededLimit:S,reposition:k}}function Pu(e,t,n){var i=Yt(e),o=i.on,s=i.emit,l=t.Move,d=l.getPosition,c=l.getLimit,u=l.toPosition,p=t.Slides,v=p.isEnough,y=p.getLength,g=n.omitEnd,h=e.is(Zi),m=e.is(Ni),b=Xt(F,!1),I=Xt(F,!0),R=n.start||0,T,G=R,k,V,A;function L(){D(),o([sn,Qt,pr],D),o(br,x)}function D(){k=y(!0),V=n.perMove,A=n.perPage,T=ne();var P=Ri(R,0,g?T:k-1);P!==R&&(R=P,l.reposition())}function x(){T!==ne()&&s(pr)}function W(P,te,K){if(!se()){var he=Y(P),We=B(he);We>-1&&(te||We!==R)&&(ae(We),l.move(he,We,G,K))}}function M(P,te,K,he){t.Scroll.scroll(P,te,K,function(){var We=B(l.toIndex(d()));ae(g?Un(We,T):We),he&&he()})}function Y(P){var te=R;if(qn(P)){var K=P.match(/([+\-<>])(\d+)?/)||[],he=K[1],We=K[2];he==="+"||he==="-"?te=X(R+ +(""+he+(+We||1)),R):he===">"?te=We?S(+We):b(!0):he==="<"&&(te=I(!0))}else te=h?P:Ri(P,0,T);return te}function F(P,te){var K=V||($()?1:A),he=X(R+K*(P?-1:1),R,!(V||$()));return he===-1&&m&&!Gl(d(),c(!P),1)?P?0:T:te?he:B(he)}function X(P,te,K){if(v()||$()){var he=j(P);he!==P&&(te=P,P=he,K=!1),P<0||P>T?!V&&(or(0,P,te,!0)||or(T,te,P,!0))?P=S(E(P)):h?P=K?P<0?-(k%A||A):k:P:n.rewind?P=P<0?T:0:P=-1:K&&P!==te&&(P=S(E(te)+(P<te?-1:1)))}else P=-1;return P}function j(P){if(m&&n.trimSpace==="move"&&P!==R)for(var te=d();te===u(P,!0)&&or(P,0,e.length-1,!n.rewind);)P<R?--P:++P;return P}function B(P){return h?(P+k)%k||0:P}function ne(){for(var P=k-($()||h&&V?1:A);g&&P-- >0;)if(u(k-1,!0)!==u(P,!0)){P++;break}return Ri(P,0,k-1)}function S(P){return Ri($()?P:A*P,0,T)}function E(P){return $()?Un(P,T):ur((P>=T?k-1:P)/A)}function O(P){var te=l.toIndex(P);return m?Ri(te,0,T):te}function ae(P){P!==R&&(G=R,R=P)}function ie(P){return P?G:R}function $(){return!Ro(n.focus)||n.isNavigation}function se(){return e.state.is([Ki,Lo])&&!!n.waitForTransition}return{mount:L,go:W,scroll:M,getNext:b,getPrev:I,getAdjacent:F,getEnd:ne,setIndex:ae,getIndex:ie,toIndex:S,toPage:E,toDest:O,hasFocus:$,isBusy:se}}var ku="http://www.w3.org/2000/svg",Au="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",Do=40;function Fu(e,t,n){var i=Yt(e),o=i.on,s=i.bind,l=i.emit,d=n.classes,c=n.i18n,u=t.Elements,p=t.Controller,v=u.arrows,y=u.track,g=v,h=u.prev,m=u.next,b,I,R={};function T(){k(),o(sn,G)}function G(){V(),T()}function k(){var M=n.arrows;M&&!(h&&m)&&D(),h&&m&&(yo(R,{prev:h,next:m}),vo(g,M?"":"none"),Tn(g,I=Ka+"--"+n.direction),M&&(A(),W(),Tt([h,m],ko,y.id),l(ec,h,m)))}function V(){i.destroy(),Pn(g,I),b?(hi(v?[h,m]:g),h=m=null):Ln([h,m],Xa)}function A(){o([Jn,Yi,Qt,vi,pr],W),s(m,"click",Xt(L,">")),s(h,"click",Xt(L,"<"))}function L(M){p.go(M,!0)}function D(){g=v||ki("div",d.arrows),h=x(!0),m=x(!1),b=!0,Eo(g,[h,m]),!v&&_a(g,y)}function x(M){var Y='<button class="'+d.arrow+" "+(M?d.prev:d.next)+'" type="button"><svg xmlns="'+ku+'" viewBox="0 0 '+Do+" "+Do+'" width="'+Do+'" height="'+Do+'" focusable="false"><path d="'+(n.arrowPath||Au)+'" />';return Bl(Y)}function W(){if(h&&m){var M=e.index,Y=p.getPrev(),F=p.getNext(),X=Y>-1&&M<Y?c.last:c.prev,j=F>-1&&M>F?c.first:c.next;h.disabled=Y<0,m.disabled=F<0,Tt(h,hn,X),Tt(m,hn,j),l(tc,h,m,Y,F)}}return{arrows:R,mount:T,destroy:V,update:W}}var Wu=Na+"-interval";function _u(e,t,n){var i=Yt(e),o=i.on,s=i.bind,l=i.emit,d=Sr(n.interval,e.go.bind(e,">"),A),c=d.isPaused,u=t.Elements,p=t.Elements,v=p.root,y=p.toggle,g=n.autoplay,h,m,b=g==="pause";function I(){g&&(R(),y&&Tt(y,ko,u.track.id),b||T(),V())}function R(){n.pauseOnHover&&s(v,"mouseenter mouseleave",function(D){h=D.type==="mouseenter",k()}),n.pauseOnFocus&&s(v,"focusin focusout",function(D){m=D.type==="focusin",k()}),y&&s(y,"click",function(){b?T():G(!0)}),o([_n,wr,Qt],d.rewind),o(_n,L)}function T(){c()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),m=h=b=!1,V(),l(Ba))}function G(D){D===void 0&&(D=!0),b=!!D,V(),c()||(d.pause(),l(Va))}function k(){b||(h||m?G(!1):T())}function V(){y&&(Mn(y,fi,!b),Tt(y,hn,n.i18n[b?"play":"pause"]))}function A(D){var x=u.bar;x&&xn(x,"width",D*100+"%"),l(oc,D)}function L(D){var x=t.Slides.getAt(D);d.set(x&&+bn(x.slide,Wu)||n.interval)}return{mount:I,destroy:d.cancel,play:T,pause:G,isPaused:c}}function Hu(e,t,n){var i=Yt(e),o=i.on;function s(){n.cover&&(o(Ga,Xt(d,!0)),o([Jn,sn,Qt],Xt(l,!0)))}function l(c){t.Slides.forEach(function(u){var p=Mo(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),vo(u,c?"none":"")}return{mount:s,destroy:Xt(l,!1)}}var Nu=10,Ou=600,Du=.6,ju=1.5,zu=800;function Bu(e,t,n){var i=Yt(e),o=i.on,s=i.emit,l=e.state.set,d=t.Move,c=d.getPosition,u=d.getLimit,p=d.exceededLimit,v=d.translate,y=e.is(Ni),g,h,m=1;function b(){o(_n,G),o([sn,Qt],k)}function I(A,L,D,x,W){var M=c();if(G(),D&&(!y||!p())){var Y=t.Layout.sliderSize(),F=xa(A)*Y*ur(cn(A)/Y)||0;A=d.toPosition(t.Controller.toDest(A%Y))+F}var X=Gl(M,A,1);m=1,L=X?0:L||dr(cn(A-M)/ju,zu),h=x,g=Sr(L,R,Xt(T,M,A,W),1),l(Lo),s(wr),g.start()}function R(){l(_i),h&&h(),s(vi)}function T(A,L,D,x){var W=c(),M=A+(L-A)*V(x),Y=(M-W)*m;v(W+Y),y&&!D&&p()&&(m*=Du,cn(Y)<Nu&&I(u(p(!0)),Ou,!1,h,!0))}function G(){g&&g.cancel()}function k(){g&&!g.isPaused()&&(G(),R())}function V(A){var L=n.easingFunc;return L?L(A):1-Math.pow(1-A,4)}return{mount:b,destroy:G,scroll:I,cancel:k}}var Ii={passive:!1,capture:!0};function Vu(e,t,n){var i=Yt(e),o=i.on,s=i.emit,l=i.bind,d=i.unbind,c=e.state,u=t.Move,p=t.Scroll,v=t.Controller,y=t.Elements.track,g=t.Media.reduce,h=t.Direction,m=h.resolve,b=h.orient,I=u.getPosition,R=u.exceededLimit,T,G,k,V,A,L=!1,D,x,W;function M(){l(y,zr,ya,Ii),l(y,Br,ya,Ii),l(y,xc,F,Ii),l(y,"click",B,{capture:!0}),l(y,"dragstart",En),o([Jn,sn],Y)}function Y(){var U=n.drag;ce(!U),V=U==="free"}function F(U){if(D=!1,!x){var Q=We(U);he(U.target)&&(Q||!U.button)&&(v.isBusy()?En(U,!0):(W=Q?y:window,A=c.is([Ki,Lo]),k=null,l(W,zr,X,Ii),l(W,Br,j,Ii),u.cancel(),p.cancel(),ne(U)))}}function X(U){if(c.is(nr)||(c.set(nr),s(Zl)),U.cancelable)if(A){u.translate(T+K($(U)));var Q=se(U)>Ts,Z=L!==(L=R());(Q||Z)&&ne(U),D=!0,s(Jl),En(U)}else O(U)&&(A=E(U),En(U))}function j(U){c.is(nr)&&(c.set(_i),s(Ql)),A&&(S(U),En(U)),d(W,zr,X),d(W,Br,j),A=!1}function B(U){!x&&D&&En(U,!0)}function ne(U){k=G,G=U,T=I()}function S(U){var Q=ae(U),Z=ie(Q),ke=n.rewind&&n.rewindByDrag;g(!1),V?v.scroll(Z,0,n.snap):e.is(Ao)?v.go(b(xa(Q))<0?ke?"<":"-":ke?">":"+"):e.is(Ni)&&L&&ke?v.go(R(!0)?">":"<"):v.go(v.toDest(Z),!0),g(!0)}function E(U){var Q=n.dragMinThreshold,Z=go(Q),ke=Z&&Q.mouse||0,we=(Z?Q.touch:+Q)||10;return cn($(U))>(We(U)?we:ke)}function O(U){return cn($(U))>cn($(U,!0))}function ae(U){if(e.is(Zi)||!L){var Q=se(U);if(Q&&Q<Ts)return $(U)/Q}return 0}function ie(U){return I()+xa(U)*Un(cn(U)*(n.flickPower||600),V?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function $(U,Q){return te(U,Q)-te(P(U),Q)}function se(U){return va(U)-va(P(U))}function P(U){return G===U&&k||G}function te(U,Q){return(We(U)?U.changedTouches[0]:U)["page"+m(Q?"Y":"X")]}function K(U){return U/(L&&e.is(Ni)?$u:1)}function he(U){var Q=n.noDrag;return!ho(U,"."+gc+", ."+Ir)&&(!Q||!ho(U,Q))}function We(U){return typeof TouchEvent<"u"&&U instanceof TouchEvent}function pe(){return A}function ce(U){x=U}return{mount:M,disable:ce,isDragging:pe}}var Gu={Spacebar:" ",Right:Tr,Left:Cr,Up:sc,Down:lc};function Ya(e){return e=qn(e)?e:e.key,Gu[e]||e}var Ls="keydown";function qu(e,t,n){var i=Yt(e),o=i.on,s=i.bind,l=i.unbind,d=e.root,c=t.Direction.resolve,u,p;function v(){y(),o(sn,g),o(sn,y),o(_n,m)}function y(){var I=n.keyboard;I&&(u=I==="global"?window:d,s(u,Ls,b))}function g(){l(u,Ls)}function h(I){p=I}function m(){var I=p;p=!0,Nl(function(){p=I})}function b(I){if(!p){var R=Ya(I);R===c(Cr)?e.go("<"):R===c(Tr)&&e.go(">")}}return{mount:v,destroy:g,disable:h}}var uo=Na+"-lazy",rr=uo+"-srcset",Uu="["+uo+"], ["+rr+"]";function Xu(e,t,n){var i=Yt(e),o=i.on,s=i.off,l=i.bind,d=i.emit,c=n.lazyLoad==="sequential",u=[Yi,vi],p=[];function v(){n.lazyLoad&&(y(),o(Qt,y))}function y(){Wn(p),g(),c?I():(s(u),o(u,h),h())}function g(){t.Slides.forEach(function(R){Ha(R.slide,Uu).forEach(function(T){var G=bn(T,uo),k=bn(T,rr);if(G!==T.src||k!==T.srcset){var V=n.classes.spinner,A=T.parentElement,L=Mo(A,"."+V)||ki("span",V,A);p.push([T,R,L]),T.src||vo(T,"none")}})})}function h(){p=p.filter(function(R){var T=n.perPage*((n.preloadPages||1)+1)-1;return R[1].isWithin(e.index,T)?m(R):!0}),p.length||s(u)}function m(R){var T=R[0];Tn(R[1].slide,$a),l(T,"load error",Xt(b,R)),Tt(T,"src",bn(T,uo)),Tt(T,"srcset",bn(T,rr)),Ln(T,uo),Ln(T,rr)}function b(R,T){var G=R[0],k=R[1];Pn(k.slide,$a),T.type!=="error"&&(hi(R[2]),vo(G,""),d(Ga,G,k),d(Hi)),c&&I()}function I(){p.length&&m(p.shift())}return{mount:v,destroy:Xt(Wn,p),check:h}}function Ku(e,t,n){var i=Yt(e),o=i.on,s=i.emit,l=i.bind,d=t.Slides,c=t.Elements,u=t.Controller,p=u.hasFocus,v=u.getIndex,y=u.go,g=t.Direction.resolve,h=c.pagination,m=[],b,I;function R(){T(),o([sn,Qt,pr],R);var x=n.pagination;h&&vo(h,x?"":"none"),x&&(o([_n,wr,vi],D),G(),D(),s(nc,{list:b,items:m},L(e.index)))}function T(){b&&(hi(h?Zn(b.children):b),Pn(b,I),Wn(m),b=null),i.destroy()}function G(){var x=e.length,W=n.classes,M=n.i18n,Y=n.perPage,F=p()?u.getEnd()+1:xo(x/Y);b=h||ki("ul",W.pagination,c.track.parentElement),Tn(b,I=Er+"--"+A()),Tt(b,kn,"tablist"),Tt(b,hn,M.select),Tt(b,Ua,A()===Lr?"vertical":"");for(var X=0;X<F;X++){var j=ki("li",null,b),B=ki("button",{class:W.page,type:"button"},j),ne=d.getIn(X).map(function(E){return E.slide.id}),S=!p()&&Y>1?M.pageX:M.slideX;l(B,"click",Xt(k,X)),n.paginationKeyboard&&l(B,"keydown",Xt(V,X)),Tt(j,kn,"presentation"),Tt(B,kn,"tab"),Tt(B,ko,ne.join(" ")),Tt(B,hn,ba(S,X+1)),Tt(B,Ai,-1),m.push({li:j,button:B,page:X})}}function k(x){y(">"+x,!0)}function V(x,W){var M=m.length,Y=Ya(W),F=A(),X=-1;Y===g(Tr,!1,F)?X=++x%M:Y===g(Cr,!1,F)?X=(--x+M)%M:Y==="Home"?X=0:Y==="End"&&(X=M-1);var j=m[X];j&&(zl(j.button),y(">"+X),En(W,!0))}function A(){return n.paginationDirection||n.direction}function L(x){return m[u.toPage(x)]}function D(){var x=L(v(!0)),W=L(v());if(x){var M=x.button;Pn(M,fi),Ln(M,bs),Tt(M,Ai,-1)}if(W){var Y=W.button;Tn(Y,fi),Tt(Y,bs,!0),Tt(Y,Ai,"")}s(ic,{list:b,items:m},x,W)}return{items:m,mount:R,destroy:T,getAt:L,update:D}}var Yu=[" ","Enter"];function Zu(e,t,n){var i=n.isNavigation,o=n.slideFocus,s=[];function l(){e.splides.forEach(function(h){h.isParent||(u(e,h.splide),u(h.splide,e))}),i&&p()}function d(){s.forEach(function(h){h.destroy()}),Wn(s)}function c(){d(),l()}function u(h,m){var b=Yt(h);b.on(_n,function(I,R,T){m.go(m.is(Zi)?T:I)}),s.push(b)}function p(){var h=Yt(e),m=h.on;m(Da,y),m(rc,g),m([Jn,sn],v),s.push(h),h.emit(za,e.splides)}function v(){Tt(t.Elements.list,Ua,n.direction===Lr?"vertical":"")}function y(h){e.go(h.index)}function g(h,m){Wa(Yu,Ya(m))&&(y(h),En(m))}return{setup:Xt(t.Media.set,{slideFocus:Ro(o)?i:o},!0),mount:l,destroy:d,remount:c}}function Ju(e,t,n){var i=Yt(e),o=i.bind,s=0;function l(){n.wheel&&o(t.Elements.track,"wheel",d,Ii)}function d(u){if(u.cancelable){var p=u.deltaY,v=p<0,y=va(u),g=n.wheelMinThreshold||0,h=n.wheelSleep||0;cn(p)>g&&y-s>h&&(e.go(v?"<":">"),s=y),c(v)&&En(u)}}function c(u){return!n.releaseWheel||e.state.is(Ki)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var Qu=90;function ep(e,t,n){var i=Yt(e),o=i.on,s=t.Elements.track,l=n.live&&!n.isNavigation,d=ki("span",vu),c=Sr(Qu,Xt(p,!1));function u(){l&&(y(!t.Autoplay.isPaused()),Tt(s,$s,!0),d.textContent="…",o(Ba,Xt(y,!0)),o(Va,Xt(y,!1)),o([Yi,vi],Xt(p,!0)))}function p(g){Tt(s,Ss,g),g?(Eo(s,d),c.start()):(hi(d),c.cancel())}function v(){Ln(s,[ws,$s,Ss]),hi(d)}function y(g){l&&Tt(s,ws,g?"off":"polite")}return{mount:u,disable:y,destroy:v}}var tp=Object.freeze({__proto__:null,Media:cu,Direction:du,Elements:Cu,Slides:Lu,Layout:Ru,Clones:Eu,Move:Mu,Controller:Pu,Arrows:Fu,Autoplay:_u,Cover:Hu,Scroll:Bu,Drag:Vu,Keyboard:qu,LazyLoad:Xu,Pagination:Ku,Sync:Zu,Wheel:Ju,Live:ep}),np={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"},ip={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:wu,i18n:np,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function op(e,t,n){var i=t.Slides;function o(){Yt(e).on([Jn,Qt],s)}function s(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function l(d,c){i.style("transition","opacity "+n.speed+"ms "+n.easing),Nl(c)}return{mount:o,start:l,cancel:ya}}function rp(e,t,n){var i=t.Move,o=t.Controller,s=t.Scroll,l=t.Elements.list,d=Xt(xn,l,"transition"),c;function u(){Yt(e).bind(l,"transitionend",function(g){g.target===l&&c&&(v(),c())})}function p(g,h){var m=i.toPosition(g,!0),b=i.getPosition(),I=y(g);cn(m-b)>=1&&I>=1?n.useScroll?s.scroll(m,I,!1,h):(d("transform "+I+"ms "+n.easing),i.translate(m,!0),c=h):(i.jump(g),h())}function v(){d(""),s.cancel()}function y(g){var h=n.rewindSpeed;if(e.is(Ni)&&h){var m=o.getIndex(!0),b=o.getEnd();if(m===0&&g>=b||m>=b&&g===0)return h}return n.speed}return{mount:u,start:p,cancel:v}}var ap=(function(){function e(n,i){this.event=Yt(),this.Components={},this.state=su(Pi),this.splides=[],this._o={},this._E={};var o=qn(n)?Vl(document,n):n;co(o,o+" is invalid."),this.root=o,i=zn({label:bn(o,hn)||"",labelledby:bn(o,qa)||""},ip,e.defaults,i||{});try{zn(i,JSON.parse(bn(o,Na)))}catch{co(!1,"Invalid JSON")}this._o=Object.create(zn({},i))}var t=e.prototype;return t.mount=function(i,o){var s=this,l=this.state,d=this.Components;co(l.is([Pi,cr]),"Already mounted!"),l.set(Pi),this._C=d,this._T=o||this._T||(this.is(Ao)?op:rp),this._E=i||this._E;var c=yo({},tp,this._E,{Transition:this._T});return mi(c,function(u,p){var v=u(s,d,s._o);d[p]=v,v.setup&&v.setup()}),mi(d,function(u){u.mount&&u.mount()}),this.emit(Jn),Tn(this.root,xu),l.set(_i),this.emit(wa),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(_i)&&(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(Zn(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(Qt),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,s=this.state;return s.is(Pi)?Yt(this).on(wa,this.destroy.bind(this,i)):(mi(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(ja),o.destroy(),i&&Wn(this.splides),s.set(cr)),this},nu(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})(),Za=ap;Za.defaults={};Za.STATES=ou;var Rs=[[Jn,"onMounted"],[wa,"onReady"],[_n,"onMove"],[Yi,"onMoved"],[Da,"onClick"],[Ul,"onActive"],[Xl,"onInactive"],[Kl,"onVisible"],[Yl,"onHidden"],[Qt,"onRefresh"],[sn,"onUpdated"],[Hi,"onResize"],[br,"onResized"],[Zl,"onDrag"],[Jl,"onDragging"],[Ql,"onDragged"],[wr,"onScroll"],[vi,"onScrolled"],[ja,"onDestroy"],[ec,"onArrowsMounted"],[tc,"onArrowsUpdated"],[nc,"onPaginationMounted"],[ic,"onPaginationUpdated"],[za,"onNavigationMounted"],[Ba,"onAutoplayPlay"],[oc,"onAutoplayPlaying"],[Va,"onAutoplayPause"],[Ga,"onLazyLoadLoaded"]];function Ja(...e){return e.filter(Boolean).join(" ")}function mr(e){return e!==null&&typeof e=="object"}function Ca(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!Ca(n,t[i]));if(mr(e)&&mr(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!Ca(e[o],t[o]))}return e===t}function sp(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function lp(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 Ta(e,t){const n=e;return lp(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():mr(i)?n[o]=Ta(mr(n[o])?n[o]:{},i):n[o]=i}),n}var cp=({children:e,className:t,...n})=>a.createElement("div",{className:Ja("splide__track",t),...n},a.createElement("ul",{className:"splide__list"},e)),Qa=class extends a.Component{constructor(){super(...arguments),this.splideRef=a.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new Za(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Ta({},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&&!Ca(this.options,e)&&(this.splide.options=e,this.options=Ta({},e));const t=this.getSlides();sp(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){Rs.forEach(([t,n])=>{const i=this.props[n];typeof i=="function"&&e.on(t,(...o)=>{i(e,...o)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:i,...o}=this.props;return a.createElement(t,{className:Ja("splide",e),ref:this.splideRef,...this.omit(o,["options",...Rs.map(s=>s[1])])},n?a.createElement(cp,null,i):i)}},es=({children:e,className:t,...n})=>a.createElement("li",{className:Ja("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 dp="RichTextRenderer-module__link___BWeZ2",up={link:dp},pp=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))},Mr=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>pp(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function rn(e){const{color:t,...n}=e;return n}function Kt(e,t){var o,s,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:Mr(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:C.scalingValue(e.letterSpacing,t),wordSpacing:C.scalingValue(e.wordSpacing,t),fontSize:C.scalingValue(n,t),lineHeight:i!==void 0?C.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(s=e.textAppearance)==null?void 0:s.textDecoration,fontVariant:(l=e.textAppearance)==null?void 0:l.fontVariant,textAlign:e.textAlign,color:e.color}}const yi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:up.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:mp(i),children:i.text},o));return r.jsx(r.Fragment,{children:e.map((n,i)=>{const o=n.children;return r.jsx("div",{children:t(o)},i)})})};function mp(e){return{...e.fontFamily&&{fontFamily:Mr(e.fontFamily)},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}const gp="SvgImage-module__svg___q3xE-",hp="SvgImage-module__img___VsTm-",Is={svg:gp,img:hp},fp=e=>{const t=e.trim().toLowerCase();return!!(t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")||t.includes(".svg")||t.startsWith("blob:"))},yp=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,an=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[s,l]=a.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return a.useEffect(()=>{if(typeof window<"u"&&window.CSS){const d=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');l(d)}},[]),!fp(e)||!s?r.jsx("img",{src:e,alt:"",className:mt(Is.img,i),style:o}):r.jsx("span",{"data-supports-mask":s,className:mt(Is.svg,i),style:{"--svg":yp(e),"--fill":t,"--hover-fill":n,...o??{}}})},vp={"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 xp({settings:e,content:t,styles:n,isEditor:i}){const[o,s]=a.useState(null),{widthSettings:l,fontSettings:d,letterSpacing:c,textAlign:u,wordSpacing:p,fontSizeLineHeight:v,textAppearance:y,color:g}=n.imageCaption??{},[h,m]=a.useState(void 0),[b,I]=a.useState(null),[R,T]=a.useState(0),[G,k]=a.useState(0),{direction:V,transition:A,controls:L,pagination:D,imageCaption:x,triggers:W}=e,M=a.useRef(A.type),{x:Y,y:F}=e.controls.offset,X=j=>{o&&o.go(j)};return a.useEffect(()=>{if(!b)return;const j=new ResizeObserver(B=>{if(!o)return;const[ne]=B;m({width:Math.round(ne.contentRect.width),height:Math.round(ne.contentRect.height)})});return j.observe(b),()=>j.unobserve(b)},[b]),a.useEffect(()=>{!o||M.current===A.type||(k(j=>j+1),M.current=A.type)},[A.type]),r.jsx("div",{className:mt(ut.wrapper,{[ut.editor]:i}),ref:I,children:r.jsxs("div",{className:ut.sliderInner,style:{width:h?h.width:"100%",height:h?h.height:"100%",backgroundColor:A.backgroundColor&&A.type==="fade in"?A.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:mt(ut.captionBlock),children:r.jsx("div",{className:ut.captionTextWrapper,children:t.map((j,B)=>r.jsx("div",{className:mt(ut.captionText,vp[x.alignment],{[ut.withPointerEvents]:B===R&&i,[ut.active]:B===R}),style:{fontFamily:Mr(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:l.sizing==="auto"?"max-content":C.scalingValue(l.width,i),letterSpacing:C.scalingValue(c,i),wordSpacing:C.scalingValue(p,i),textAlign:u,fontSize:C.scalingValue(v.fontSize,i),lineHeight:C.scalingValue(v.lineHeight,i),textTransform:y.textTransform??"none",textDecoration:y.textDecoration??"none",fontVariant:y.fontVariant??"normal",color:g,transitionDuration:A.duration?`${Math.round(parseInt(A.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:ut.captionTextInner,style:{"--link-hover-color":x.linkHoverColor,"--link-color":x.linkColor,position:"relative",top:C.scalingValue(x.offset.y,i),left:C.scalingValue(x.offset.x,i)},children:r.jsx(yi,{content:j.imageCaption})})},B))})}),r.jsx(Qa,{onMove:j=>{T(j.index)},ref:s,options:{arrows:!1,speed:A.duration?parseInt(A.duration):500,autoplay:W.autoPlay!==null,...W.autoPlay!==null&&{interval:parseInt(W.autoPlay)*1e3},direction:V==="horiz"||A.type==="fade in"?"ltr":"ttb",pagination:!1,drag:W.triggersList.drag,perPage:1,width:h?h.width:"100%",height:h?h.height:"100%",type:A.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((j,B)=>r.jsx(es,{children:r.jsx("div",{className:ut.sliderItem,children:r.jsx("div",{className:ut.imgWrapper,children:r.jsx("img",{className:mt(ut.sliderImage,{[ut.contain]:j.image.objectFit==="contain",[ut.cover]:j.image.objectFit==="cover"}),src:j.image.url,alt:j.image.name??""})})})},B))},G),L.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:mt(ut.arrow,{[ut.arrowVertical]:V==="vert",[ut.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:r.jsxs("button",{onClick:()=>{X("-1")},className:ut.arrowInner,style:{transform:`translate(${C.scalingValue(Y,i)}, ${C.scalingValue(F*(V==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${V==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&r.jsx(an,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:mt(ut.arrowImg,ut.mirror)}),!L.arrowsImgUrl&&r.jsx(Es,{color:L.color,className:mt(ut.arrowIcon,ut.arrowImg,ut.mirror)})]})}),r.jsx("div",{className:mt(ut.arrow,ut.nextArrow,{[ut.arrowVertical]:V==="vert",[ut.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:r.jsxs("button",{className:ut.arrowInner,onClick:()=>X("+1"),style:{transform:`translate(${C.scalingValue(Y*(V==="horiz"?-1:1),i)}, ${C.scalingValue(F,i)}) scale(${e.controls.scale/100}) rotate(${V==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&r.jsx(an,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:ut.arrowImg}),!L.arrowsImgUrl&&r.jsx(Es,{color:L.color,className:mt(ut.arrowIcon,ut.arrowImg)})]})})]}),W.triggersList.click&&r.jsx("div",{className:ut.clickOverlay,onClick:()=>{o&&o.go("+1")}}),D.isActive&&r.jsx("div",{className:mt(ut.pagination,{[ut.paginationInsideBottom]:D.position==="inside-1"&&V==="horiz",[ut.paginationInsideTop]:D.position==="inside-2"&&V==="horiz",[ut.paginationOutsideBottom]:D.position==="outside-1"&&V==="horiz",[ut.paginationOutsideTop]:D.position==="outside-2"&&V==="horiz",[ut.paginationInsideLeft]:D.position==="inside-1"&&V==="vert",[ut.paginationInsideRight]:D.position==="inside-2"&&V==="vert",[ut.paginationOutsideLeft]:D.position==="outside-1"&&V==="vert",[ut.paginationOutsideRight]:D.position==="outside-2"&&V==="vert",[ut.paginationVertical]:V==="vert"}),children:r.jsx("div",{className:ut.paginationInner,style:{backgroundColor:D.colors[2],transform:`scale(${D.scale/100}) translate(${C.scalingValue(D.offset.x,i)}, ${C.scalingValue(D.offset.y,i)}) rotate(${V==="horiz"?"0deg":"90deg"})`},children:t.map((j,B)=>r.jsx("button",{onClick:()=>{o&&o.go(B)},className:mt(ut.paginationItem),children:r.jsx("div",{className:mt(ut.dot,{[ut.activeDot]:B===R}),style:{backgroundColor:B===R?D.colors[0]:D.colors[1],"--pagination-hover-color":D.hover}})},B))})})]})})}function Es({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const bp={element:xp,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"]}},wp="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Sp="ImageRevealSlider-module__image___Qjt-e",$p="ImageRevealSlider-module__link___N-iLG",Cp="ImageRevealSlider-module__cursor___2U03d",wi={imageRevealSlider:wp,image:Sp,link:$p,cursor:Cp};function Ms(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const s=i.width?Number.parseFloat(i.width):o.naturalWidth,l=o.naturalHeight/o.naturalWidth*s,d=s/2,c=l/2;if(e>=i.x-d&&e<=i.x+d&&t>=i.y-c&&t<=i.y+c)return!0}return!1}function Vr(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Tp(e,t,n,i){let o,s;if(t==="custom"){o=n;const l=await Vr(e);s=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await Vr(e);s=l.height/l.width*o}else{const l=await Vr(e);o=l.width,s=l.height}return{width:o,height:s,finalWidth:`${o}px`}}function Lp({settings:e,content:t,isEditor:n}){const[i,o]=a.useState(null),[s,l]=a.useState([]),[d,c]=a.useState(0),u=a.useRef(0),[p,v]=a.useState({x:0,y:0}),[y,g]=a.useState(1),[h,m]=a.useState("none"),b=a.useRef({x:0,y:0}),[I,R]=a.useState(!1),{sizeType:T,imageWidth:G,randomRangeImageWidth:k}=e.imageSize,{revealPosition:V,visible:A}=e.position,{cursorType:L,target:D,defaultCursorScale:x,defaultCursor:W,hoverCursorScale:M,hoverCursor:Y}=e.cursor;a.useEffect(()=>{if(!i)return;const j=(S,E)=>{const O=i.getBoundingClientRect(),ae=S-O.left,ie=E-O.top;if(v({x:ae,y:ie}),L==="system"){m("none"),g(1);return}const $=ae,re=ie,P=document.elementFromPoint(O.left+$,O.top+re);if(P&&P.closest("a")){m("none"),g(1);return}const te=Ms($,re,s)||D==="area"?{img:Y??"none",scale:M}:{img:W??"none",scale:x};m(te.img),g(te.scale)},B=S=>{S.stopPropagation(),b.current={x:S.clientX,y:S.clientY},j(S.clientX,S.clientY)},ne=()=>{I&&j(b.current.x,b.current.y)};return i.addEventListener("mousemove",B),window.addEventListener("scroll",ne,!0),()=>{i.removeEventListener("mousemove",B),window.removeEventListener("scroll",ne,!0)}},[i,I,p,L,D,Y,W,M,x,s]),a.useEffect(()=>{I||(m("none"),g(0))},[I]);const F=async(j,B,ne,S={})=>{const{width:E,height:O,finalWidth:ae}=await Tp(j.image.url,T,G,k);let ie=0,$=0;V==="same"?(ie=B/2,$=ne/2):(ie=S.x??Math.random()*B,$=S.y??Math.random()*ne);const re=Math.min(Math.max(ie,E/2),B-E/2),P=Math.min(Math.max($,O/2),ne-O/2);return{id:u.current++,url:j.image.url,link:j.link,name:j.image.name,x:re,y:P,width:ae}};a.useEffect(()=>{if(!i||t.length===0)return;const j=i.getBoundingClientRect(),B=j.width,ne=j.height,S=[];(async()=>{const O=t[0],ae=await F(O,B,ne);S.push(ae),l(S),c(1)})()},[T,G,k,V,i]),a.useEffect(()=>{A==="last One"&&l(j=>j.length>0?[j[j.length-1]]:[])},[A]);const X=async j=>{if(!i)return;const B=i.getBoundingClientRect(),ne=j.clientX-B.left,S=j.clientY-B.top;if(D==="image"&&!Ms(ne,S,s))return;let E=0,O=0;V==="on Click"?(E=ne,O=S):V==="same"?(E=B.width/2,O=B.height/2):(E=Math.random()*B.width,O=Math.random()*B.height);const ae=t[d],ie=await F(ae,B.width,B.height,{x:E,y:O});l($=>A==="all"?[...$,ie]:[ie]),c($=>$>=t.length-1?0:$+1)};return r.jsxs("div",{ref:o,onClick:X,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),className:wi.imageRevealSlider,style:{cursor:h==="none"?"default":"none"},children:[s.map(j=>r.jsx("div",{className:wi.wrapper,style:{top:`${j.y}px`,left:`${j.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:j.width??"auto",height:"auto",cursor:h==="none"?"default":"none"},children:D==="area"&&j.link?r.jsx("a",{href:j.link,target:"_blank",className:wi.link,children:r.jsx("img",{src:j.url,alt:j.name,className:wi.image},j.id)}):r.jsx("img",{src:j.url,alt:j.name,className:wi.image},j.id)},j.id)),I&&r.jsx("div",{className:wi.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${y})`,backgroundImage:`url('${h}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Rp={element:Lp,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:""}]}}}},Ip="LightBox-module__hidden___9s-9x",Ep="LightBox-module__heroImage___sTxNF",Mp="LightBox-module__background___rm9ml",Pp="LightBox-module__editor___4ACaY",kp="LightBox-module__contentStyle___Bgnsq",Ap="LightBox-module__imageStyle___tLIlB",Fp="LightBox-module__imgWrapper___LuFUp",Wp="LightBox-module__contain___8-yaS",_p="LightBox-module__cover___hNvOG",Hp="LightBox-module__caption___b6L2I",Np="LightBox-module__captionTextInner___rCGNH",Op="LightBox-module__lightboxSplide___XFuWC",Dp="LightBox-module__arrow___iz38X",jp="LightBox-module__arrowVertical___Zfz81",zp="LightBox-module__nextArrow___zkAQN",Bp="LightBox-module__arrowInner___p48sW",Vp="LightBox-module__arrowIcon___3VaFf",Gp="LightBox-module__arrowImg___pNV88",qp="LightBox-module__mirror___pjeXc",Up="LightBox-module__thumbsWrapper___GB-nU",Xp="LightBox-module__thumbsContainerVertical___wttk5",Kp="LightBox-module__thumbsContainer___osSma",Yp="LightBox-module__thumbsAlignStart___MO6tY",Zp="LightBox-module__thumbsAlignCenter___Q4sUx",Jp="LightBox-module__thumbsAlignEnd___p4y9R",Qp="LightBox-module__thumbItem___HvnF3",em="LightBox-module__closeButton___g2khP",tm="LightBox-module__fadeIn___0m5GW",nm="LightBox-module__slideInLeft___gPYwC",im="LightBox-module__slideInRight___S-pPp",om="LightBox-module__slideInTop___DFdAj",rm="LightBox-module__slideInBottom___m27kZ",am="LightBox-module__fadeOut___55qBR",sm="LightBox-module__slideOutLeft___NvU7P",lm="LightBox-module__slideOutRight___SK7eC",cm="LightBox-module__slideOutTop___Vgg0z",dm="LightBox-module__slideOutBottom___nJ0Ef",um="LightBox-module__scaleSlide___vZriG",Xe={hidden:Ip,heroImage:Ep,background:Mp,editor:Pp,contentStyle:kp,imageStyle:Ap,imgWrapper:Fp,contain:Wp,cover:_p,caption:Hp,captionTextInner:Np,lightboxSplide:Op,arrow:Dp,arrowVertical:jp,nextArrow:zp,arrowInner:Bp,arrowIcon:Vp,arrowImg:Gp,mirror:qp,thumbsWrapper:Up,thumbsContainerVertical:Xp,thumbsContainer:Kp,thumbsAlignStart:Yp,thumbsAlignCenter:Zp,thumbsAlignEnd:Jp,thumbItem:Qp,closeButton:em,fadeIn:tm,slideInLeft:nm,slideInRight:im,slideInTop:om,slideInBottom:rm,fadeOut:am,slideOutLeft:sm,slideOutRight:lm,slideOutTop:cm,slideOutBottom:dm,scaleSlide:um},jo=(e,t,n)=>{const i={},[o,s]=e.split("-");return o==="top"?(i.top="0",i.bottom="auto"):o==="middle"?(i.top="50%",i.bottom="auto"):o==="bottom"&&(i.top="auto",i.bottom="0"),s==="left"?(i.left="0",i.right="auto"):s==="center"?(i.left="50%",i.right="auto"):s==="right"&&(i.left="auto",i.right="0"),o==="middle"&&s==="center"?i.transform=`translate(calc(-50% + ${C.scalingValue(t.x,n)}), calc(-50% + ${C.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${C.scalingValue(t.x,n)}, calc(-50% + ${C.scalingValue(t.y,n)}))`:s==="center"?i.transform=`translate(calc(-50% + ${C.scalingValue(t.x,n)}), ${C.scalingValue(t.y,n)})`:i.transform=`translate(${C.scalingValue(t.x,n)}, ${C.scalingValue(t.y,n)})`,i};function bc(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 pm(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 wc(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,s=n/i;if(s>o){const d=e;return{renderedW:d,renderedH:d/s}}const l=t;return{renderedW:l*s,renderedH:l}}function mm(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,s=n/i;if(s>o){const d=t;return{renderedW:d*s,renderedH:d}}const l=e;return{renderedW:l,renderedH:l/s}}function Sc(e,t,n,i,o){const{x:s,y:l}=pm(o);return{offsetX:s*(e-n),offsetY:l*(t-i)}}function gm(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,s=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight,{objectFit:l,objectPosition:d}=window.getComputedStyle(e),c=l==="cover"?mm:wc,{renderedW:u,renderedH:p}=c(n,i,o,s),{offsetX:v,offsetY:y}=Sc(n,i,u,p,d),g=(v+u/2)/n*100,h=(y+p/2)/i*100;return`${g}% ${h}%`}function hm(e){return gm(e)}function gr(e){const t=e.getBoundingClientRect(),n=bc(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,l=e.naturalHeight,{renderedW:d,renderedH:c}=wc(i,o,s,l),u=window.getComputedStyle(e).objectPosition,{offsetX:p,offsetY:v}=Sc(i,o,d,c,u),y=t.left+n.left,g=t.top+n.top;return{x:p+y,y:v+g,width:d,height:c}}function Ps(e){const t=e.getBoundingClientRect(),n=bc(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function ks(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 fm(e,t){const n=(()=>{if(e==="fade in")return Xe.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return Xe.slideInLeft;case"right":return Xe.slideInRight;case"top":return Xe.slideInTop;case"bottom":return Xe.slideInBottom;default:return Xe.slideInRight}return Xe.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return Xe.fadeIn;if(e==="slide in")switch(t){case"left":return Xe.slideInLeft;case"right":return Xe.slideInRight;case"top":return Xe.slideInTop;case"bottom":return Xe.slideInBottom;default:return Xe.slideInRight}return Xe.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return Xe.fadeOut;if(e==="slide in")switch(t){case"left":return Xe.slideOutLeft;case"right":return Xe.slideOutRight;case"top":return Xe.slideOutTop;case"bottom":return Xe.slideOutBottom;default:return Xe.slideOutRight}return Xe.fadeOut})(),s=(()=>{if(e==="fade in")return Xe.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return Xe.slideOutLeft;case"right":return Xe.slideOutRight;case"top":return Xe.slideOutTop;case"bottom":return Xe.slideOutBottom;default:return Xe.slideOutRight}return Xe.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:s}}const ym=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:s,isPreviewMode:l})=>{const[d,c]=a.useState(!1),{url:u}=e.thumbnailBlock.cover;return a.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),r.jsxs(r.Fragment,{children:[r.jsx("img",{src:u,alt:"Cover",className:Xe.heroImage,onClick:()=>c(!0)}),r.jsx(vm,{isOpen:d,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:s})]})},vm=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:s,isEditor:l,metadata:d})=>{var be;const{widthSettings:c,fontSettings:u,letterSpacing:p,textAlign:v,wordSpacing:y,fontSizeLineHeight:g,textAppearance:h,color:m}=i.imageCaption??{},[b,I]=a.useState(0),[R,T]=a.useState(0),[G,k]=a.useState(!1),[V,A]=a.useState(!1),[L,D]=a.useState({}),x=a.useRef(null),W=a.useRef(null),M=a.useRef(null),Y=a.useRef(!1),F=a.useRef(null),X=a.useRef(null),j=a.useRef(null),B=a.useRef(null),ne=a.useRef(!1),S=a.useRef(null),[E,O]=a.useState(!1),{appear:ae,triggers:ie,slider:$,thumbnail:re,controls:P,area:te,caption:K,layout:fe}=o.lightboxBlock,{appearClass:We,backdropAppearClass:me,backdropDisappearClass:ce,disappearClass:U}=fm(ae.type,ae.direction),Q=(d==null?void 0:d.itemId)??null;a.useEffect(()=>{const z=()=>{setTimeout(()=>{var he,ye;(ye=(he=x.current)==null?void 0:he.splide)==null||ye.refresh()},16)},se=()=>{T(he=>he+1)};return window.addEventListener("ArticleEditor.Layout:change",z),window.addEventListener("ArticleEditor.ComponentContent:change",se),()=>{window.removeEventListener("ArticleEditor.Layout:change",z),window.removeEventListener("ArticleEditor.ComponentContent:change",se)}},[]),a.useEffect(()=>{if(!e||!re.isActive){O(!1);return}const z=S.current;if(!z)return;const se=()=>{$.direction==="horiz"?O(z.scrollWidth>z.clientWidth):O(z.scrollHeight>z.clientHeight)};se();const he=new ResizeObserver(se);return he.observe(z),()=>he.disconnect()},[e,re.isActive,n.length,L,$.direction]);const Z=a.useCallback(()=>{const z=window.matchMedia("(max-width: 768px)").matches,se=ks(te.color);z&&!l&&se>.9&&(document.body.style.backgroundColor=""),k(!0),Y.current=!0;const he=ye=>{ye.target===F.current&&ye.animationName&&(F.current&&X.current&&F.current.removeEventListener("animationend",X.current),X.current=null,Y.current&&(Y.current=!1,t()),k(!1))};F.current&&(X.current=he,F.current.addEventListener("animationend",he))},[t,te.color,l]),ke=(z,se,he)=>{var ye,Me;if(z){if(ie.type==="click"&&ie.switch==="image")ie.repeat==="close"&&b===n.length-1?Z():(ye=x.current)==null||ye.go("+1");else if(ie.type==="click"&&ie.switch==="50/50"){const Le=z.getBoundingClientRect(),_=se-Le.left,pe=he-Le.top,oe=Le.width,H=Le.height;let ee;$.direction==="horiz"?ee=_<oe/2?"-1":"+1":ee=pe<H/2?"-1":"+1",(Me=x.current)==null||Me.go(ee)}}},we=z=>{if(ne.current){ne.current=!1;return}const se=n[b],he=(se==null?void 0:se.image.objectFit)==="cover";let ye,Me;if("changedTouches"in z&&z.changedTouches.length>0)ye=z.changedTouches[0].clientX,Me=z.changedTouches[0].clientY;else if("clientX"in z)ye=z.clientX,Me=z.clientY;else return;let Le;if(he&&M.current){const _=Ps(M.current);Le=ye>=_.left&&ye<=_.right&&Me>=_.top&&Me<=_.bottom}else{const _=M.current?gr(M.current):null;if(!_){z.target===z.currentTarget&&Z();return}Le=ye>=_.x&&ye<=_.x+_.width&&Me>=_.y&&Me<=_.y+_.height}Le?ke(M.current,ye,Me):Z()},Pe=z=>{const se=z.target;(se.classList.contains(Xe.thumbsWrapper)||se.classList.contains(Xe.thumbsContainer))&&we(z)};a.useEffect(()=>{if(!e)return;const z=se=>{var he,ye;if(se.key==="Escape"){Z();return}if(se.key==="ArrowRight"){I(Me=>(Me+1)%Math.max(n.length,1)),(he=x.current)==null||he.go("+1");return}se.key==="ArrowLeft"&&(I(Me=>(Me-1+Math.max(n.length,1))%Math.max(n.length,1)),(ye=x.current)==null||ye.go("-1"))};return window.addEventListener("keydown",z),()=>{window.removeEventListener("keydown",z)}},[e,Z,n.length]),a.useEffect(()=>{if(e){if(I(0),T(se=>se+1),Y.current=!1,k(!1),A(!1),D({}),!Q)return;const z=new CustomEvent("page-overlay",{detail:{itemId:Q}});window.dispatchEvent(z)}return()=>{F.current&&X.current&&(F.current.removeEventListener("animationend",X.current),X.current=null),A(!1)}},[e,Q]),a.useEffect(()=>{W.current!==null&&W.current!==$.type&&T(z=>z+1),W.current=$.type},[$.type]),a.useEffect(()=>{if(!e)return;const z=document.body.style.overflow,se=window.matchMedia("(max-width: 768px)").matches,he=ks(te.color);document.body.style.overflow="hidden",A(!1);const ye=Le=>{Le.target===F.current&&!Y.current&&Le.animationName&&(se&&!l&&he>.9&&(document.body.style.backgroundColor=te.color),A(!0),F.current&&j.current&&F.current.removeEventListener("animationend",j.current),j.current=null)};F.current&&(j.current=ye,F.current.addEventListener("animationend",ye));const Me=Le=>{const _=Le.target;_&&(_.closest(`.${Xe.thumbsWrapper}`)||_.closest(`.${Xe.thumbsContainer}`))||$.type!=="slide"&&Le.preventDefault()};return document.addEventListener("touchmove",Me,{passive:!1}),()=>{document.body.style.overflow=z,document.removeEventListener("touchmove",Me),F.current&&j.current&&(F.current.removeEventListener("animationend",j.current),j.current=null),A(!1)}},[e,l,te.color,$.type]),a.useEffect(()=>{if(!e)return;const z=se=>{var ye,Me;if(Y.current){se.stopPropagation();return}if(ne.current){ne.current=!1;return}const he=se.target;if(!(he&&(he.closest(`.${Xe.thumbsContainer}`)||he.closest(`.${Xe.thumbItem}`)||he.closest(`.${Xe.arrow}`)||he.closest(`.${Xe.closeButton}`)||he.closest(`.${Xe.caption}`)))){if($.type==="slide"&&ie.type==="drag"&&((Me=(ye=x.current)==null?void 0:ye.splide)!=null&&Me.root)){const Le=x.current.splide.root;if(he&&(Le.contains(he)||Le===he))return}if(se.touches.length===0&&se.changedTouches.length>0){const Le=n[b],_=(Le==null?void 0:Le.image.objectFit)==="cover",pe=se.changedTouches[0];let oe;if(_&&M.current){const H=Ps(M.current);oe=pe.clientX>=H.left&&pe.clientX<=H.right&&pe.clientY>=H.top&&pe.clientY<=H.bottom}else{const H=M.current?gr(M.current):null;if(!H)return;oe=pe.clientX>=H.x&&pe.clientX<=H.x+H.width&&pe.clientY>=H.y&&pe.clientY<=H.y+H.height}if(!oe){se.stopPropagation(),Y.current=!0;const H=ee=>{ee.stopPropagation(),ee.preventDefault(),document.removeEventListener("click",H,!0)};document.addEventListener("click",H,!0),Z()}}}};return document.addEventListener("touchend",z,{passive:!0}),()=>{document.removeEventListener("touchend",z)}},[e,Z,b,n]);const de=($.type==="scale"||$.type==="fade")&&$.direction==="vert"&&ie.type==="drag";a.useEffect(()=>{var ee,Fe;if(!e||!de||!((Fe=(ee=x.current)==null?void 0:ee.splide)!=null&&Fe.root))return;const z=x.current.splide.root,se=30,he=(le,N)=>{if(B.current){const Ue=Math.abs(le-B.current.x),je=Math.abs(N-B.current.y);(Ue>0||je>0)&&(ne.current=!0)}},ye=le=>{B.current&&(le.preventDefault(),he(le.clientX,le.clientY))},Me=le=>{B.current&&le.touches.length>0&&(le.preventDefault(),he(le.touches[0].clientX,le.touches[0].clientY))},Le=(le,N)=>{if(!B.current||!x.current){B.current=null;return}const Ue=Math.abs(le-B.current.x),je=Math.abs(N-B.current.y);je>se&&je>Ue&&x.current.go(N<B.current.y?"+1":"-1"),B.current=null},_=le=>{B.current&&Le(le.clientX,le.clientY),document.removeEventListener("pointerup",_),document.removeEventListener("pointercancel",_),document.removeEventListener("pointermove",ye)},pe=le=>{if(B.current){if(le.changedTouches.length>0){const N=le.changedTouches[0];Le(N.clientX,N.clientY)}document.removeEventListener("touchend",pe),document.removeEventListener("touchcancel",pe),document.removeEventListener("touchmove",Me)}},oe=le=>{B.current={x:le.clientX,y:le.clientY},ne.current=!1,document.addEventListener("pointermove",ye,{passive:!1}),document.addEventListener("pointerup",_),document.addEventListener("pointercancel",_)},H=le=>{le.touches.length>0&&(B.current={x:le.touches[0].clientX,y:le.touches[0].clientY},ne.current=!1,document.addEventListener("touchmove",Me,{passive:!1}),document.addEventListener("touchend",pe),document.addEventListener("touchcancel",pe))};return z.addEventListener("pointerdown",oe),z.addEventListener("touchstart",H),()=>{z.removeEventListener("pointerdown",oe),z.removeEventListener("touchstart",H),document.removeEventListener("pointermove",ye),document.removeEventListener("pointerup",_),document.removeEventListener("pointercancel",_),document.removeEventListener("touchmove",Me),document.removeEventListener("touchend",pe),document.removeEventListener("touchcancel",pe),B.current=null,ne.current=!1}},[e,de,R]);const ge={backgroundColor:te.color,backdropFilter:`blur(${te.blur}px)`,animationDuration:`${parseInt(ae.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:Yn.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:l?null:F,className:mt(Xe.background,G?ce:me,{[Xe.editor]:l},{[Xe.hidden]:!e}),style:{...ge,...V&&!l&&!G?{position:"absolute"}:{}}}),r.jsxs("div",{ref:l?F:null,className:mt(Xe.contentStyle,G?U:We,{[Xe.editor]:l},{[Xe.hidden]:!e}),style:{animationDuration:`${parseInt(ae.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(Qa,{onMove:z=>I(z.index),ref:x,className:Xe.lightboxSplide,options:{arrows:!1,speed:$.duration?parseInt($.duration):500,direction:$.direction==="horiz"||$.type==="fade"||$.type==="scale"?"ltr":"ttb",pagination:!1,drag:ie.type==="drag"&&!de,perPage:1,width:"100%",height:"100%",type:$.type==="fade"||$.type==="scale"?"fade":"loop",padding:0,rewind:ie.repeat!=="close",start:0},style:{"--splide-speed":$.duration},children:n.map((z,se)=>{const he=jo(fe.position,fe.offset,l),ye=`${C.scalingValue(fe.padding.top,l)} ${C.scalingValue(fe.padding.right,l)} ${C.scalingValue(fe.padding.bottom,l)} ${C.scalingValue(fe.padding.left,l)}`,Me=$.type==="scale"?(()=>{const{transform:Le,..._}=he;return{..._,position:"absolute",padding:ye,boxSizing:"border-box","--position-transform":Le||"none"}})():{...he,position:"absolute",padding:ye,boxSizing:"border-box"};return r.jsx(es,{children:r.jsx("div",{className:Xe.imgWrapper,onClick:we,children:r.jsx("img",{ref:se===b?M:null,className:mt(Xe.imageStyle,{[Xe.contain]:z.image.objectFit==="contain",[Xe.cover]:z.image.objectFit==="cover",[Xe.scaleSlide]:$.type==="scale"}),src:z.image.url,alt:z.image.name??"",style:{...Me,pointerEvents:z.image.objectFit==="contain"?"none":"auto"}})})},se)})},R),P.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:mt(Xe.arrow,{[Xe.arrowVertical]:$.direction==="vert"}),style:{color:P.color,"--arrow-hover-color":P.hover},children:r.jsxs("button",{className:Xe.arrowInner,style:{transform:`translate(${C.scalingValue(P.offset.x,l)}, ${C.scalingValue(P.offset.y*($.direction==="horiz"?1:-1),l)}) scale(${P.scale}) rotate(${$.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var z;return(z=x.current)==null?void 0:z.go("-1")},"aria-label":"Previous",children:[P.arrowsImgUrl&&r.jsx(an,{url:P.arrowsImgUrl,fill:P.color,hoverFill:P.hover,className:mt(Xe.arrowImg,Xe.mirror)}),!P.arrowsImgUrl&&r.jsx(As,{color:P.color,className:mt(Xe.arrowIcon,Xe.arrowImg,Xe.mirror)})]})}),r.jsx("div",{className:mt(Xe.arrow,Xe.nextArrow,{[Xe.arrowVertical]:$.direction==="vert"}),style:{color:P.color,"--arrow-hover-color":P.hover},children:r.jsxs("button",{className:Xe.arrowInner,style:{transform:`translate(${C.scalingValue(P.offset.x*($.direction==="horiz"?-1:1),l)}, ${C.scalingValue(P.offset.y,l)}) scale(${P.scale}) rotate(${$.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var z;return(z=x.current)==null?void 0:z.go("+1")},"aria-label":"Next",children:[P.arrowsImgUrl&&r.jsx(an,{url:P.arrowsImgUrl,fill:P.color,hoverFill:P.hover,className:Xe.arrowImg}),!P.arrowsImgUrl&&r.jsx(As,{color:P.color,className:mt(Xe.arrowIcon,Xe.arrowImg)})]})})]}),te.closeIconUrl&&(()=>{const z=jo(te.closeIconAlign,te.closeIconOffset,l),se=`scale(${te.closeIconScale})`,he=z.transform?`${z.transform} ${se}`:se;return r.jsx("button",{className:Xe.closeButton,style:{...z,transform:he},onClick:Z,"aria-label":"Close lightbox",children:r.jsx(an,{url:te.closeIconUrl,fill:te.closeIconColor??"#000000",hoverFill:te.closeIconHover??"#cccccc"})})})(),K&&K.isActive&&i.imageCaption&&((be=n[b])==null?void 0:be.imageCaption)&&r.jsx("div",{className:Xe.caption,style:{...jo(K.alignment,K.offset,l),fontFamily:Mr(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:c.sizing==="auto"?"max-content":C.scalingValue(c.width,l),letterSpacing:C.scalingValue(p,l),wordSpacing:C.scalingValue(y,l),textAlign:v,fontSize:C.scalingValue(g.fontSize,l),lineHeight:C.scalingValue(g.lineHeight,l),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:m},onClick:z=>z.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:Xe.captionTextInner,style:{"--link-color":K.linkColor,"--link-hover-color":K.linkHoverColor},children:r.jsx(yi,{content:n[b].imageCaption})})}),re.isActive&&(()=>{const[z,se]=re.position.split("-"),he=$.direction==="horiz"?`${z}-left`:re.position,ye=jo(he,re.offset,l),Me=()=>{if($.direction==="horiz"){if(se==="left")return"flex-start";if(se==="center")return"center";if(se==="right")return"flex-end"}else{if(z==="top")return"flex-start";if(z==="middle")return"center";if(z==="bottom")return"flex-end"}return"flex-start"};return r.jsx("div",{ref:S,className:Xe.thumbsWrapper,onClick:Le=>Pe(Le),style:{position:l?"absolute":"fixed",...ye,...$.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:mt(Xe.thumbsContainer,{[Xe.thumbsContainerVertical]:$.direction==="vert",[Xe.thumbsAlignStart]:re.align==="start",[Xe.thumbsAlignCenter]:re.align==="center",[Xe.thumbsAlignEnd]:re.align==="end"}),style:{gap:C.scalingValue(re.grid.gap,l),justifyContent:E?"flex-start":Me()},children:n.map((Le,_)=>{const pe=_===b,oe=L[_],ee=re.grid.size*(pe?re.activeState.scale:1),Fe=()=>{if(re.fit!=="fit")return{};if(!oe)return $.direction==="horiz"?{height:C.scalingValue(ee,l)}:{width:C.scalingValue(ee,l)};const le=oe.width/oe.height;if($.direction==="horiz"){const N=ee,Ue=N*le;return{width:C.scalingValue(Ue,l),height:C.scalingValue(N,l)}}else{const N=ee,Ue=N/le;return{width:C.scalingValue(N,l),height:C.scalingValue(Ue,l)}}};return r.jsx("button",{className:Xe.thumbItem,style:{...$.direction==="horiz"&&re.fit!=="fit"?{height:C.scalingValue(ee,l)}:{},...$.direction==="vert"&&re.fit!=="fit"?{width:C.scalingValue(ee,l)}:{},...re.fit==="cover"?{width:C.scalingValue(ee,l),height:C.scalingValue(ee,l)}:{},...Fe(),transition:pe?"all 0.25s ease-out":"none",opacity:pe?re.activeState.opacity/100:re.opacity/100,"--thumb-hover":re.activeState.opacity/100},onClick:le=>{var N;le.stopPropagation(),I(_),(N=x.current)==null||N.go(_)},onMouseEnter:()=>{var le;re.triggers==="hov"&&((le=x.current)==null||le.go(_))},children:r.jsx("img",{src:Le.image.url,alt:Le.image.name??"",onLoad:le=>{const N=le.currentTarget;N.naturalWidth&&N.naturalHeight&&D(Ue=>({...Ue,[_]:{width:N.naturalWidth,height:N.naturalHeight}}))},style:{objectFit:re.fit==="cover"?"cover":"contain",...re.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...re.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Le.image.name}-${_}`)})})})})()]})]}),document.getElementById(s))};function As({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const xm={element:ym,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 zo(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function bm(e){return`
6
+ */const dp="RichTextRenderer-module__link___BWeZ2",up={link:dp},pp=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))},Mr=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>pp(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function rn(e){const{color:t,...n}=e;return n}function Kt(e,t){var o,s,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:Mr(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:C.scalingValue(e.letterSpacing,t),wordSpacing:C.scalingValue(e.wordSpacing,t),fontSize:C.scalingValue(n,t),lineHeight:i!==void 0?C.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(s=e.textAppearance)==null?void 0:s.textDecoration,fontVariant:(l=e.textAppearance)==null?void 0:l.fontVariant,textAlign:e.textAlign,color:e.color}}const yi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:up.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:mp(i),children:i.text},o));return r.jsx(r.Fragment,{children:e.map((n,i)=>{const o=n.children;return r.jsx("div",{children:t(o)},i)})})};function mp(e){return{...e.fontFamily&&{fontFamily:Mr(e.fontFamily)},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}const gp="SvgImage-module__svg___q3xE-",hp="SvgImage-module__img___VsTm-",Is={svg:gp,img:hp},fp=e=>{const t=e.trim().toLowerCase();return!!(t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")||t.includes(".svg")||t.startsWith("blob:"))},yp=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,an=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[s,l]=a.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return a.useEffect(()=>{if(typeof window<"u"&&window.CSS){const d=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');l(d)}},[]),!fp(e)||!s?r.jsx("img",{src:e,alt:"",className:mt(Is.img,i),style:o}):r.jsx("span",{"data-supports-mask":s,className:mt(Is.svg,i),style:{"--svg":yp(e),"--fill":t,"--hover-fill":n,...o??{}}})},vp={"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 xp({settings:e,content:t,styles:n,isEditor:i}){const[o,s]=a.useState(null),{widthSettings:l,fontSettings:d,letterSpacing:c,textAlign:u,wordSpacing:p,fontSizeLineHeight:v,textAppearance:y,color:g}=n.imageCaption??{},[h,m]=a.useState(void 0),[b,I]=a.useState(null),[R,T]=a.useState(0),[G,k]=a.useState(0),{direction:V,transition:A,controls:L,pagination:D,imageCaption:x,triggers:W}=e,M=a.useRef(A.type),{x:Y,y:F}=e.controls.offset,X=j=>{o&&o.go(j)};return a.useEffect(()=>{if(!b)return;const j=new ResizeObserver(B=>{if(!o)return;const[ne]=B;m({width:Math.round(ne.contentRect.width),height:Math.round(ne.contentRect.height)})});return j.observe(b),()=>j.unobserve(b)},[b]),a.useEffect(()=>{!o||M.current===A.type||(k(j=>j+1),M.current=A.type)},[A.type]),r.jsx("div",{className:mt(dt.wrapper,{[dt.editor]:i}),ref:I,children:r.jsxs("div",{className:dt.sliderInner,style:{width:h?h.width:"100%",height:h?h.height:"100%",backgroundColor:A.backgroundColor&&A.type==="fade in"?A.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:mt(dt.captionBlock),children:r.jsx("div",{className:dt.captionTextWrapper,children:t.map((j,B)=>r.jsx("div",{className:mt(dt.captionText,vp[x.alignment],{[dt.withPointerEvents]:B===R&&i,[dt.active]:B===R}),style:{fontFamily:Mr(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:l.sizing==="auto"?"max-content":C.scalingValue(l.width,i),letterSpacing:C.scalingValue(c,i),wordSpacing:C.scalingValue(p,i),textAlign:u,fontSize:C.scalingValue(v.fontSize,i),lineHeight:C.scalingValue(v.lineHeight,i),textTransform:y.textTransform??"none",textDecoration:y.textDecoration??"none",fontVariant:y.fontVariant??"normal",color:g,transitionDuration:A.duration?`${Math.round(parseInt(A.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:dt.captionTextInner,style:{"--link-hover-color":x.linkHoverColor,"--link-color":x.linkColor,position:"relative",top:C.scalingValue(x.offset.y,i),left:C.scalingValue(x.offset.x,i)},children:r.jsx(yi,{content:j.imageCaption})})},B))})}),r.jsx(Qa,{onMove:j=>{T(j.index)},ref:s,options:{arrows:!1,speed:A.duration?parseInt(A.duration):500,autoplay:W.autoPlay!==null,...W.autoPlay!==null&&{interval:parseInt(W.autoPlay)*1e3},direction:V==="horiz"||A.type==="fade in"?"ltr":"ttb",pagination:!1,drag:W.triggersList.drag,perPage:1,width:h?h.width:"100%",height:h?h.height:"100%",type:A.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((j,B)=>r.jsx(es,{children:r.jsx("div",{className:dt.sliderItem,children:r.jsx("div",{className:dt.imgWrapper,children:r.jsx("img",{className:mt(dt.sliderImage,{[dt.contain]:j.image.objectFit==="contain",[dt.cover]:j.image.objectFit==="cover"}),src:j.image.url,alt:j.image.name??""})})})},B))},G),L.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:mt(dt.arrow,{[dt.arrowVertical]:V==="vert",[dt.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:r.jsxs("button",{onClick:()=>{X("-1")},className:dt.arrowInner,style:{transform:`translate(${C.scalingValue(Y,i)}, ${C.scalingValue(F*(V==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${V==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&r.jsx(an,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:mt(dt.arrowImg,dt.mirror)}),!L.arrowsImgUrl&&r.jsx(Es,{color:L.color,className:mt(dt.arrowIcon,dt.arrowImg,dt.mirror)})]})}),r.jsx("div",{className:mt(dt.arrow,dt.nextArrow,{[dt.arrowVertical]:V==="vert",[dt.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:r.jsxs("button",{className:dt.arrowInner,onClick:()=>X("+1"),style:{transform:`translate(${C.scalingValue(Y*(V==="horiz"?-1:1),i)}, ${C.scalingValue(F,i)}) scale(${e.controls.scale/100}) rotate(${V==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&r.jsx(an,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:dt.arrowImg}),!L.arrowsImgUrl&&r.jsx(Es,{color:L.color,className:mt(dt.arrowIcon,dt.arrowImg)})]})})]}),W.triggersList.click&&r.jsx("div",{className:dt.clickOverlay,onClick:()=>{o&&o.go("+1")}}),D.isActive&&r.jsx("div",{className:mt(dt.pagination,{[dt.paginationInsideBottom]:D.position==="inside-1"&&V==="horiz",[dt.paginationInsideTop]:D.position==="inside-2"&&V==="horiz",[dt.paginationOutsideBottom]:D.position==="outside-1"&&V==="horiz",[dt.paginationOutsideTop]:D.position==="outside-2"&&V==="horiz",[dt.paginationInsideLeft]:D.position==="inside-1"&&V==="vert",[dt.paginationInsideRight]:D.position==="inside-2"&&V==="vert",[dt.paginationOutsideLeft]:D.position==="outside-1"&&V==="vert",[dt.paginationOutsideRight]:D.position==="outside-2"&&V==="vert",[dt.paginationVertical]:V==="vert"}),children:r.jsx("div",{className:dt.paginationInner,style:{backgroundColor:D.colors[2],transform:`scale(${D.scale/100}) translate(${C.scalingValue(D.offset.x,i)}, ${C.scalingValue(D.offset.y,i)}) rotate(${V==="horiz"?"0deg":"90deg"})`},children:t.map((j,B)=>r.jsx("button",{onClick:()=>{o&&o.go(B)},className:mt(dt.paginationItem),children:r.jsx("div",{className:mt(dt.dot,{[dt.activeDot]:B===R}),style:{backgroundColor:B===R?D.colors[0]:D.colors[1],"--pagination-hover-color":D.hover}})},B))})})]})})}function Es({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const bp={element:xp,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"]}},wp="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Sp="ImageRevealSlider-module__image___Qjt-e",$p="ImageRevealSlider-module__link___N-iLG",Cp="ImageRevealSlider-module__cursor___2U03d",wi={imageRevealSlider:wp,image:Sp,link:$p,cursor:Cp};function Ms(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const s=i.width?Number.parseFloat(i.width):o.naturalWidth,l=o.naturalHeight/o.naturalWidth*s,d=s/2,c=l/2;if(e>=i.x-d&&e<=i.x+d&&t>=i.y-c&&t<=i.y+c)return!0}return!1}function Vr(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Tp(e,t,n,i){let o,s;if(t==="custom"){o=n;const l=await Vr(e);s=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await Vr(e);s=l.height/l.width*o}else{const l=await Vr(e);o=l.width,s=l.height}return{width:o,height:s,finalWidth:`${o}px`}}function Lp({settings:e,content:t,isEditor:n}){const[i,o]=a.useState(null),[s,l]=a.useState([]),[d,c]=a.useState(0),u=a.useRef(0),[p,v]=a.useState({x:0,y:0}),[y,g]=a.useState(1),[h,m]=a.useState("none"),b=a.useRef({x:0,y:0}),[I,R]=a.useState(!1),{sizeType:T,imageWidth:G,randomRangeImageWidth:k}=e.imageSize,{revealPosition:V,visible:A}=e.position,{cursorType:L,target:D,defaultCursorScale:x,defaultCursor:W,hoverCursorScale:M,hoverCursor:Y}=e.cursor;a.useEffect(()=>{if(!i)return;const j=(S,E)=>{const O=i.getBoundingClientRect(),ae=S-O.left,ie=E-O.top;if(v({x:ae,y:ie}),L==="system"){m("none"),g(1);return}const $=ae,se=ie,P=document.elementFromPoint(O.left+$,O.top+se);if(P&&P.closest("a")){m("none"),g(1);return}const te=Ms($,se,s)||D==="area"?{img:Y??"none",scale:M}:{img:W??"none",scale:x};m(te.img),g(te.scale)},B=S=>{S.stopPropagation(),b.current={x:S.clientX,y:S.clientY},j(S.clientX,S.clientY)},ne=()=>{I&&j(b.current.x,b.current.y)};return i.addEventListener("mousemove",B),window.addEventListener("scroll",ne,!0),()=>{i.removeEventListener("mousemove",B),window.removeEventListener("scroll",ne,!0)}},[i,I,p,L,D,Y,W,M,x,s]),a.useEffect(()=>{I||(m("none"),g(0))},[I]);const F=async(j,B,ne,S={})=>{const{width:E,height:O,finalWidth:ae}=await Tp(j.image.url,T,G,k);let ie=0,$=0;V==="same"?(ie=B/2,$=ne/2):(ie=S.x??Math.random()*B,$=S.y??Math.random()*ne);const se=Math.min(Math.max(ie,E/2),B-E/2),P=Math.min(Math.max($,O/2),ne-O/2);return{id:u.current++,url:j.image.url,link:j.link,name:j.image.name,x:se,y:P,width:ae}};a.useEffect(()=>{if(!i||t.length===0)return;const j=i.getBoundingClientRect(),B=j.width,ne=j.height,S=[];(async()=>{const O=t[0],ae=await F(O,B,ne);S.push(ae),l(S),c(1)})()},[T,G,k,V,i]),a.useEffect(()=>{A==="last One"&&l(j=>j.length>0?[j[j.length-1]]:[])},[A]);const X=async j=>{if(!i)return;const B=i.getBoundingClientRect(),ne=j.clientX-B.left,S=j.clientY-B.top;if(D==="image"&&!Ms(ne,S,s))return;let E=0,O=0;V==="on Click"?(E=ne,O=S):V==="same"?(E=B.width/2,O=B.height/2):(E=Math.random()*B.width,O=Math.random()*B.height);const ae=t[d],ie=await F(ae,B.width,B.height,{x:E,y:O});l($=>A==="all"?[...$,ie]:[ie]),c($=>$>=t.length-1?0:$+1)};return r.jsxs("div",{ref:o,onClick:X,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),className:wi.imageRevealSlider,style:{cursor:h==="none"?"default":"none"},children:[s.map(j=>r.jsx("div",{className:wi.wrapper,style:{top:`${j.y}px`,left:`${j.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:j.width??"auto",height:"auto",cursor:h==="none"?"default":"none"},children:D==="area"&&j.link?r.jsx("a",{href:j.link,target:"_blank",className:wi.link,children:r.jsx("img",{src:j.url,alt:j.name,className:wi.image},j.id)}):r.jsx("img",{src:j.url,alt:j.name,className:wi.image},j.id)},j.id)),I&&r.jsx("div",{className:wi.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${y})`,backgroundImage:`url('${h}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Rp={element:Lp,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:""}]}}}},Ip="LightBox-module__hidden___9s-9x",Ep="LightBox-module__heroImage___sTxNF",Mp="LightBox-module__background___rm9ml",Pp="LightBox-module__editor___4ACaY",kp="LightBox-module__contentStyle___Bgnsq",Ap="LightBox-module__imageStyle___tLIlB",Fp="LightBox-module__imgWrapper___LuFUp",Wp="LightBox-module__contain___8-yaS",_p="LightBox-module__cover___hNvOG",Hp="LightBox-module__caption___b6L2I",Np="LightBox-module__captionTextInner___rCGNH",Op="LightBox-module__lightboxSplide___XFuWC",Dp="LightBox-module__arrow___iz38X",jp="LightBox-module__arrowVertical___Zfz81",zp="LightBox-module__nextArrow___zkAQN",Bp="LightBox-module__arrowInner___p48sW",Vp="LightBox-module__arrowIcon___3VaFf",Gp="LightBox-module__arrowImg___pNV88",qp="LightBox-module__mirror___pjeXc",Up="LightBox-module__thumbsWrapper___GB-nU",Xp="LightBox-module__thumbsContainerVertical___wttk5",Kp="LightBox-module__thumbsContainer___osSma",Yp="LightBox-module__thumbsAlignStart___MO6tY",Zp="LightBox-module__thumbsAlignCenter___Q4sUx",Jp="LightBox-module__thumbsAlignEnd___p4y9R",Qp="LightBox-module__thumbItem___HvnF3",em="LightBox-module__closeButton___g2khP",tm="LightBox-module__fadeIn___0m5GW",nm="LightBox-module__slideInLeft___gPYwC",im="LightBox-module__slideInRight___S-pPp",om="LightBox-module__slideInTop___DFdAj",rm="LightBox-module__slideInBottom___m27kZ",am="LightBox-module__fadeOut___55qBR",sm="LightBox-module__slideOutLeft___NvU7P",lm="LightBox-module__slideOutRight___SK7eC",cm="LightBox-module__slideOutTop___Vgg0z",dm="LightBox-module__slideOutBottom___nJ0Ef",um="LightBox-module__scaleSlide___vZriG",Ke={hidden:Ip,heroImage:Ep,background:Mp,editor:Pp,contentStyle:kp,imageStyle:Ap,imgWrapper:Fp,contain:Wp,cover:_p,caption:Hp,captionTextInner:Np,lightboxSplide:Op,arrow:Dp,arrowVertical:jp,nextArrow:zp,arrowInner:Bp,arrowIcon:Vp,arrowImg:Gp,mirror:qp,thumbsWrapper:Up,thumbsContainerVertical:Xp,thumbsContainer:Kp,thumbsAlignStart:Yp,thumbsAlignCenter:Zp,thumbsAlignEnd:Jp,thumbItem:Qp,closeButton:em,fadeIn:tm,slideInLeft:nm,slideInRight:im,slideInTop:om,slideInBottom:rm,fadeOut:am,slideOutLeft:sm,slideOutRight:lm,slideOutTop:cm,slideOutBottom:dm,scaleSlide:um},jo=(e,t,n)=>{const i={},[o,s]=e.split("-");return o==="top"?(i.top="0",i.bottom="auto"):o==="middle"?(i.top="50%",i.bottom="auto"):o==="bottom"&&(i.top="auto",i.bottom="0"),s==="left"?(i.left="0",i.right="auto"):s==="center"?(i.left="50%",i.right="auto"):s==="right"&&(i.left="auto",i.right="0"),o==="middle"&&s==="center"?i.transform=`translate(calc(-50% + ${C.scalingValue(t.x,n)}), calc(-50% + ${C.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${C.scalingValue(t.x,n)}, calc(-50% + ${C.scalingValue(t.y,n)}))`:s==="center"?i.transform=`translate(calc(-50% + ${C.scalingValue(t.x,n)}), ${C.scalingValue(t.y,n)})`:i.transform=`translate(${C.scalingValue(t.x,n)}, ${C.scalingValue(t.y,n)})`,i};function bc(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 pm(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 wc(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,s=n/i;if(s>o){const d=e;return{renderedW:d,renderedH:d/s}}const l=t;return{renderedW:l*s,renderedH:l}}function mm(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,s=n/i;if(s>o){const d=t;return{renderedW:d*s,renderedH:d}}const l=e;return{renderedW:l,renderedH:l/s}}function Sc(e,t,n,i,o){const{x:s,y:l}=pm(o);return{offsetX:s*(e-n),offsetY:l*(t-i)}}function gm(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,s=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight,{objectFit:l,objectPosition:d}=window.getComputedStyle(e),c=l==="cover"?mm:wc,{renderedW:u,renderedH:p}=c(n,i,o,s),{offsetX:v,offsetY:y}=Sc(n,i,u,p,d),g=(v+u/2)/n*100,h=(y+p/2)/i*100;return`${g}% ${h}%`}function hm(e){return gm(e)}function gr(e){const t=e.getBoundingClientRect(),n=bc(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,l=e.naturalHeight,{renderedW:d,renderedH:c}=wc(i,o,s,l),u=window.getComputedStyle(e).objectPosition,{offsetX:p,offsetY:v}=Sc(i,o,d,c,u),y=t.left+n.left,g=t.top+n.top;return{x:p+y,y:v+g,width:d,height:c}}function Ps(e){const t=e.getBoundingClientRect(),n=bc(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function ks(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 fm(e,t){const n=(()=>{if(e==="fade in")return Ke.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return Ke.slideInLeft;case"right":return Ke.slideInRight;case"top":return Ke.slideInTop;case"bottom":return Ke.slideInBottom;default:return Ke.slideInRight}return Ke.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return Ke.fadeIn;if(e==="slide in")switch(t){case"left":return Ke.slideInLeft;case"right":return Ke.slideInRight;case"top":return Ke.slideInTop;case"bottom":return Ke.slideInBottom;default:return Ke.slideInRight}return Ke.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return Ke.fadeOut;if(e==="slide in")switch(t){case"left":return Ke.slideOutLeft;case"right":return Ke.slideOutRight;case"top":return Ke.slideOutTop;case"bottom":return Ke.slideOutBottom;default:return Ke.slideOutRight}return Ke.fadeOut})(),s=(()=>{if(e==="fade in")return Ke.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return Ke.slideOutLeft;case"right":return Ke.slideOutRight;case"top":return Ke.slideOutTop;case"bottom":return Ke.slideOutBottom;default:return Ke.slideOutRight}return Ke.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:s}}const ym=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:s,isPreviewMode:l})=>{const[d,c]=a.useState(!1),{url:u}=e.thumbnailBlock.cover;return a.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),r.jsxs(r.Fragment,{children:[r.jsx("img",{src:u,alt:"Cover",className:Ke.heroImage,onClick:()=>c(!0)}),r.jsx(vm,{isOpen:d,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:s})]})},vm=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:s,isEditor:l,metadata:d})=>{var be;const{widthSettings:c,fontSettings:u,letterSpacing:p,textAlign:v,wordSpacing:y,fontSizeLineHeight:g,textAppearance:h,color:m}=i.imageCaption??{},[b,I]=a.useState(0),[R,T]=a.useState(0),[G,k]=a.useState(!1),[V,A]=a.useState(!1),[L,D]=a.useState({}),x=a.useRef(null),W=a.useRef(null),M=a.useRef(null),Y=a.useRef(!1),F=a.useRef(null),X=a.useRef(null),j=a.useRef(null),B=a.useRef(null),ne=a.useRef(!1),S=a.useRef(null),[E,O]=a.useState(!1),{appear:ae,triggers:ie,slider:$,thumbnail:se,controls:P,area:te,caption:K,layout:he}=o.lightboxBlock,{appearClass:We,backdropAppearClass:pe,backdropDisappearClass:ce,disappearClass:U}=fm(ae.type,ae.direction),Q=(d==null?void 0:d.itemId)??null;a.useEffect(()=>{const z=()=>{setTimeout(()=>{var fe,ye;(ye=(fe=x.current)==null?void 0:fe.splide)==null||ye.refresh()},16)},oe=()=>{T(fe=>fe+1)};return window.addEventListener("ArticleEditor.Layout:change",z),window.addEventListener("ArticleEditor.ComponentContent:change",oe),()=>{window.removeEventListener("ArticleEditor.Layout:change",z),window.removeEventListener("ArticleEditor.ComponentContent:change",oe)}},[]),a.useEffect(()=>{if(!e||!se.isActive){O(!1);return}const z=S.current;if(!z)return;const oe=()=>{$.direction==="horiz"?O(z.scrollWidth>z.clientWidth):O(z.scrollHeight>z.clientHeight)};oe();const fe=new ResizeObserver(oe);return fe.observe(z),()=>fe.disconnect()},[e,se.isActive,n.length,L,$.direction]);const Z=a.useCallback(()=>{const z=window.matchMedia("(max-width: 768px)").matches,oe=ks(te.color);z&&!l&&oe>.9&&(document.body.style.backgroundColor=""),k(!0),Y.current=!0;const fe=ye=>{ye.target===F.current&&ye.animationName&&(F.current&&X.current&&F.current.removeEventListener("animationend",X.current),X.current=null,Y.current&&(Y.current=!1,t()),k(!1))};F.current&&(X.current=fe,F.current.addEventListener("animationend",fe))},[t,te.color,l]),ke=(z,oe,fe)=>{var ye,Me;if(z){if(ie.type==="click"&&ie.switch==="image")ie.repeat==="close"&&b===n.length-1?Z():(ye=x.current)==null||ye.go("+1");else if(ie.type==="click"&&ie.switch==="50/50"){const Se=z.getBoundingClientRect(),_=oe-Se.left,me=fe-Se.top,re=Se.width,H=Se.height;let ee;$.direction==="horiz"?ee=_<re/2?"-1":"+1":ee=me<H/2?"-1":"+1",(Me=x.current)==null||Me.go(ee)}}},we=z=>{if(ne.current){ne.current=!1;return}const oe=n[b],fe=(oe==null?void 0:oe.image.objectFit)==="cover";let ye,Me;if("changedTouches"in z&&z.changedTouches.length>0)ye=z.changedTouches[0].clientX,Me=z.changedTouches[0].clientY;else if("clientX"in z)ye=z.clientX,Me=z.clientY;else return;let Se;if(fe&&M.current){const _=Ps(M.current);Se=ye>=_.left&&ye<=_.right&&Me>=_.top&&Me<=_.bottom}else{const _=M.current?gr(M.current):null;if(!_){z.target===z.currentTarget&&Z();return}Se=ye>=_.x&&ye<=_.x+_.width&&Me>=_.y&&Me<=_.y+_.height}Se?ke(M.current,ye,Me):Z()},Ae=z=>{const oe=z.target;(oe.classList.contains(Ke.thumbsWrapper)||oe.classList.contains(Ke.thumbsContainer))&&we(z)};a.useEffect(()=>{if(!e)return;const z=oe=>{var fe,ye;if(oe.key==="Escape"){Z();return}if(oe.key==="ArrowRight"){I(Me=>(Me+1)%Math.max(n.length,1)),(fe=x.current)==null||fe.go("+1");return}oe.key==="ArrowLeft"&&(I(Me=>(Me-1+Math.max(n.length,1))%Math.max(n.length,1)),(ye=x.current)==null||ye.go("-1"))};return window.addEventListener("keydown",z),()=>{window.removeEventListener("keydown",z)}},[e,Z,n.length]),a.useEffect(()=>{if(e){if(I(0),T(oe=>oe+1),Y.current=!1,k(!1),A(!1),D({}),!Q)return;const z=new CustomEvent("page-overlay",{detail:{itemId:Q}});window.dispatchEvent(z)}return()=>{F.current&&X.current&&(F.current.removeEventListener("animationend",X.current),X.current=null),A(!1)}},[e,Q]),a.useEffect(()=>{W.current!==null&&W.current!==$.type&&T(z=>z+1),W.current=$.type},[$.type]),a.useEffect(()=>{if(!e)return;const z=document.body.style.overflow,oe=window.matchMedia("(max-width: 768px)").matches,fe=ks(te.color);document.body.style.overflow="hidden",A(!1);const ye=Se=>{Se.target===F.current&&!Y.current&&Se.animationName&&(oe&&!l&&fe>.9&&(document.body.style.backgroundColor=te.color),A(!0),F.current&&j.current&&F.current.removeEventListener("animationend",j.current),j.current=null)};F.current&&(j.current=ye,F.current.addEventListener("animationend",ye));const Me=Se=>{const _=Se.target;_&&(_.closest(`.${Ke.thumbsWrapper}`)||_.closest(`.${Ke.thumbsContainer}`))||$.type!=="slide"&&Se.preventDefault()};return document.addEventListener("touchmove",Me,{passive:!1}),()=>{document.body.style.overflow=z,document.removeEventListener("touchmove",Me),F.current&&j.current&&(F.current.removeEventListener("animationend",j.current),j.current=null),A(!1)}},[e,l,te.color,$.type]),a.useEffect(()=>{if(!e)return;const z=oe=>{var ye,Me;if(Y.current){oe.stopPropagation();return}if(ne.current){ne.current=!1;return}const fe=oe.target;if(!(fe&&(fe.closest(`.${Ke.thumbsContainer}`)||fe.closest(`.${Ke.thumbItem}`)||fe.closest(`.${Ke.arrow}`)||fe.closest(`.${Ke.closeButton}`)||fe.closest(`.${Ke.caption}`)))){if($.type==="slide"&&ie.type==="drag"&&((Me=(ye=x.current)==null?void 0:ye.splide)!=null&&Me.root)){const Se=x.current.splide.root;if(fe&&(Se.contains(fe)||Se===fe))return}if(oe.touches.length===0&&oe.changedTouches.length>0){const Se=n[b],_=(Se==null?void 0:Se.image.objectFit)==="cover",me=oe.changedTouches[0];let re;if(_&&M.current){const H=Ps(M.current);re=me.clientX>=H.left&&me.clientX<=H.right&&me.clientY>=H.top&&me.clientY<=H.bottom}else{const H=M.current?gr(M.current):null;if(!H)return;re=me.clientX>=H.x&&me.clientX<=H.x+H.width&&me.clientY>=H.y&&me.clientY<=H.y+H.height}if(!re){oe.stopPropagation(),Y.current=!0;const H=ee=>{ee.stopPropagation(),ee.preventDefault(),document.removeEventListener("click",H,!0)};document.addEventListener("click",H,!0),Z()}}}};return document.addEventListener("touchend",z,{passive:!0}),()=>{document.removeEventListener("touchend",z)}},[e,Z,b,n]);const ue=($.type==="scale"||$.type==="fade")&&$.direction==="vert"&&ie.type==="drag";a.useEffect(()=>{var ee,Fe;if(!e||!ue||!((Fe=(ee=x.current)==null?void 0:ee.splide)!=null&&Fe.root))return;const z=x.current.splide.root,oe=30,fe=(le,N)=>{if(B.current){const Xe=Math.abs(le-B.current.x),je=Math.abs(N-B.current.y);(Xe>0||je>0)&&(ne.current=!0)}},ye=le=>{B.current&&(le.preventDefault(),fe(le.clientX,le.clientY))},Me=le=>{B.current&&le.touches.length>0&&(le.preventDefault(),fe(le.touches[0].clientX,le.touches[0].clientY))},Se=(le,N)=>{if(!B.current||!x.current){B.current=null;return}const Xe=Math.abs(le-B.current.x),je=Math.abs(N-B.current.y);je>oe&&je>Xe&&x.current.go(N<B.current.y?"+1":"-1"),B.current=null},_=le=>{B.current&&Se(le.clientX,le.clientY),document.removeEventListener("pointerup",_),document.removeEventListener("pointercancel",_),document.removeEventListener("pointermove",ye)},me=le=>{if(B.current){if(le.changedTouches.length>0){const N=le.changedTouches[0];Se(N.clientX,N.clientY)}document.removeEventListener("touchend",me),document.removeEventListener("touchcancel",me),document.removeEventListener("touchmove",Me)}},re=le=>{B.current={x:le.clientX,y:le.clientY},ne.current=!1,document.addEventListener("pointermove",ye,{passive:!1}),document.addEventListener("pointerup",_),document.addEventListener("pointercancel",_)},H=le=>{le.touches.length>0&&(B.current={x:le.touches[0].clientX,y:le.touches[0].clientY},ne.current=!1,document.addEventListener("touchmove",Me,{passive:!1}),document.addEventListener("touchend",me),document.addEventListener("touchcancel",me))};return z.addEventListener("pointerdown",re),z.addEventListener("touchstart",H),()=>{z.removeEventListener("pointerdown",re),z.removeEventListener("touchstart",H),document.removeEventListener("pointermove",ye),document.removeEventListener("pointerup",_),document.removeEventListener("pointercancel",_),document.removeEventListener("touchmove",Me),document.removeEventListener("touchend",me),document.removeEventListener("touchcancel",me),B.current=null,ne.current=!1}},[e,ue,R]);const ge={backgroundColor:te.color,backdropFilter:`blur(${te.blur}px)`,animationDuration:`${parseInt(ae.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:Yn.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:l?null:F,className:mt(Ke.background,G?ce:pe,{[Ke.editor]:l},{[Ke.hidden]:!e}),style:{...ge,...V&&!l&&!G?{position:"absolute"}:{}}}),r.jsxs("div",{ref:l?F:null,className:mt(Ke.contentStyle,G?U:We,{[Ke.editor]:l},{[Ke.hidden]:!e}),style:{animationDuration:`${parseInt(ae.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(Qa,{onMove:z=>I(z.index),ref:x,className:Ke.lightboxSplide,options:{arrows:!1,speed:$.duration?parseInt($.duration):500,direction:$.direction==="horiz"||$.type==="fade"||$.type==="scale"?"ltr":"ttb",pagination:!1,drag:ie.type==="drag"&&!ue,perPage:1,width:"100%",height:"100%",type:$.type==="fade"||$.type==="scale"?"fade":"loop",padding:0,rewind:ie.repeat!=="close",start:0},style:{"--splide-speed":$.duration},children:n.map((z,oe)=>{const fe=jo(he.position,he.offset,l),ye=`${C.scalingValue(he.padding.top,l)} ${C.scalingValue(he.padding.right,l)} ${C.scalingValue(he.padding.bottom,l)} ${C.scalingValue(he.padding.left,l)}`,Me=$.type==="scale"?(()=>{const{transform:Se,..._}=fe;return{..._,position:"absolute",padding:ye,boxSizing:"border-box","--position-transform":Se||"none"}})():{...fe,position:"absolute",padding:ye,boxSizing:"border-box"};return r.jsx(es,{children:r.jsx("div",{className:Ke.imgWrapper,onClick:we,children:r.jsx("img",{ref:oe===b?M:null,className:mt(Ke.imageStyle,{[Ke.contain]:z.image.objectFit==="contain",[Ke.cover]:z.image.objectFit==="cover",[Ke.scaleSlide]:$.type==="scale"}),src:z.image.url,alt:z.image.name??"",style:{...Me,pointerEvents:z.image.objectFit==="contain"?"none":"auto"}})})},oe)})},R),P.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:mt(Ke.arrow,{[Ke.arrowVertical]:$.direction==="vert"}),style:{color:P.color,"--arrow-hover-color":P.hover},children:r.jsxs("button",{className:Ke.arrowInner,style:{transform:`translate(${C.scalingValue(P.offset.x,l)}, ${C.scalingValue(P.offset.y*($.direction==="horiz"?1:-1),l)}) scale(${P.scale}) rotate(${$.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var z;return(z=x.current)==null?void 0:z.go("-1")},"aria-label":"Previous",children:[P.arrowsImgUrl&&r.jsx(an,{url:P.arrowsImgUrl,fill:P.color,hoverFill:P.hover,className:mt(Ke.arrowImg,Ke.mirror)}),!P.arrowsImgUrl&&r.jsx(As,{color:P.color,className:mt(Ke.arrowIcon,Ke.arrowImg,Ke.mirror)})]})}),r.jsx("div",{className:mt(Ke.arrow,Ke.nextArrow,{[Ke.arrowVertical]:$.direction==="vert"}),style:{color:P.color,"--arrow-hover-color":P.hover},children:r.jsxs("button",{className:Ke.arrowInner,style:{transform:`translate(${C.scalingValue(P.offset.x*($.direction==="horiz"?-1:1),l)}, ${C.scalingValue(P.offset.y,l)}) scale(${P.scale}) rotate(${$.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var z;return(z=x.current)==null?void 0:z.go("+1")},"aria-label":"Next",children:[P.arrowsImgUrl&&r.jsx(an,{url:P.arrowsImgUrl,fill:P.color,hoverFill:P.hover,className:Ke.arrowImg}),!P.arrowsImgUrl&&r.jsx(As,{color:P.color,className:mt(Ke.arrowIcon,Ke.arrowImg)})]})})]}),te.closeIconUrl&&(()=>{const z=jo(te.closeIconAlign,te.closeIconOffset,l),oe=`scale(${te.closeIconScale})`,fe=z.transform?`${z.transform} ${oe}`:oe;return r.jsx("button",{className:Ke.closeButton,style:{...z,transform:fe},onClick:Z,"aria-label":"Close lightbox",children:r.jsx(an,{url:te.closeIconUrl,fill:te.closeIconColor??"#000000",hoverFill:te.closeIconHover??"#cccccc"})})})(),K&&K.isActive&&i.imageCaption&&((be=n[b])==null?void 0:be.imageCaption)&&r.jsx("div",{className:Ke.caption,style:{...jo(K.alignment,K.offset,l),fontFamily:Mr(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:c.sizing==="auto"?"max-content":C.scalingValue(c.width,l),letterSpacing:C.scalingValue(p,l),wordSpacing:C.scalingValue(y,l),textAlign:v,fontSize:C.scalingValue(g.fontSize,l),lineHeight:C.scalingValue(g.lineHeight,l),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:m},onClick:z=>z.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:Ke.captionTextInner,style:{"--link-color":K.linkColor,"--link-hover-color":K.linkHoverColor},children:r.jsx(yi,{content:n[b].imageCaption})})}),se.isActive&&(()=>{const[z,oe]=se.position.split("-"),fe=$.direction==="horiz"?`${z}-left`:se.position,ye=jo(fe,se.offset,l),Me=()=>{if($.direction==="horiz"){if(oe==="left")return"flex-start";if(oe==="center")return"center";if(oe==="right")return"flex-end"}else{if(z==="top")return"flex-start";if(z==="middle")return"center";if(z==="bottom")return"flex-end"}return"flex-start"};return r.jsx("div",{ref:S,className:Ke.thumbsWrapper,onClick:Se=>Ae(Se),style:{position:l?"absolute":"fixed",...ye,...$.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:mt(Ke.thumbsContainer,{[Ke.thumbsContainerVertical]:$.direction==="vert",[Ke.thumbsAlignStart]:se.align==="start",[Ke.thumbsAlignCenter]:se.align==="center",[Ke.thumbsAlignEnd]:se.align==="end"}),style:{gap:C.scalingValue(se.grid.gap,l),justifyContent:E?"flex-start":Me()},children:n.map((Se,_)=>{const me=_===b,re=L[_],ee=se.grid.size*(me?se.activeState.scale:1),Fe=()=>{if(se.fit!=="fit")return{};if(!re)return $.direction==="horiz"?{height:C.scalingValue(ee,l)}:{width:C.scalingValue(ee,l)};const le=re.width/re.height;if($.direction==="horiz"){const N=ee,Xe=N*le;return{width:C.scalingValue(Xe,l),height:C.scalingValue(N,l)}}else{const N=ee,Xe=N/le;return{width:C.scalingValue(N,l),height:C.scalingValue(Xe,l)}}};return r.jsx("button",{className:Ke.thumbItem,style:{...$.direction==="horiz"&&se.fit!=="fit"?{height:C.scalingValue(ee,l)}:{},...$.direction==="vert"&&se.fit!=="fit"?{width:C.scalingValue(ee,l)}:{},...se.fit==="cover"?{width:C.scalingValue(ee,l),height:C.scalingValue(ee,l)}:{},...Fe(),transition:me?"all 0.25s ease-out":"none",opacity:me?se.activeState.opacity/100:se.opacity/100,"--thumb-hover":se.activeState.opacity/100},onClick:le=>{var N;le.stopPropagation(),I(_),(N=x.current)==null||N.go(_)},onMouseEnter:()=>{var le;se.triggers==="hov"&&((le=x.current)==null||le.go(_))},children:r.jsx("img",{src:Se.image.url,alt:Se.image.name??"",onLoad:le=>{const N=le.currentTarget;N.naturalWidth&&N.naturalHeight&&D(Xe=>({...Xe,[_]:{width:N.naturalWidth,height:N.naturalHeight}}))},style:{objectFit:se.fit==="cover"?"cover":"contain",...se.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...se.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Se.image.name}-${_}`)})})})})()]})]}),document.getElementById(s))};function As({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const xm={element:ym,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 zo(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function bm(e){return`
7
7
  .${e}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
@@ -155,7 +155,7 @@
155
155
  pointer-events: auto;
156
156
  z-index: 10;
157
157
  }
158
- `}function wm({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:s}){const l=!!n,d=i&&t||!t,{prefix:c}=C.useScopedStyles(),{type:u="A",fieldsToShow:p=2,fields:v=[],buttonLabel:y,gap:g,fieldsGap:h,buttonCorners:m,buttonStroke:b,buttonPadding:I,isButtonFullWidth:R,inputCorners:T,inputStroke:G,inputPadding:k,inputColor:V,inputTextColor:A,inputBorderColor:L,placeholderColor:D,buttonColor:x,buttonTextColor:W,buttonBorderColor:M,labelTextColor:Y,successColor:F,errorColor:X,fontFamily:j,inputFontSettings:B,inputFontSize:ne,inputLineHeight:S,inputLetterSpacing:E,inputWordSpacing:O,inputTextAppearance:ae,buttonFontSettings:ie,buttonFontSize:$,buttonLineHeight:re,buttonLetterSpacing:P,buttonWordSpacing:te,buttonTextAppearance:K,labelFontSettings:fe,labelFontSize:We,labelLineHeight:me,labelLetterSpacing:ce,labelWordSpacing:U,labelTextAppearance:Q,statusFontSettings:Z,statusFontSize:ke,statusLineHeight:we,statusLetterSpacing:Pe,statusWordSpacing:de,statusTextAppearance:ge,successMessage:be,errorMessage:z,stateOverrides:se}=e,he=u==="B",ye=v.slice(0,Math.min(p,v.length)),Me={fontSettings:{fontFamily:j,fontWeight:(B==null?void 0:B.fontWeight)??400,fontStyle:(B==null?void 0:B.fontStyle)??"normal"},fontSize:ne??.01,lineHeight:S,letterSpacing:E??0,wordSpacing:O??0,textAppearance:ae,color:A},Le=rn(Kt(Me,t)),_=C.scalingValue(G??0,t),pe=C.scalingValue((S??ne??.01)+((k==null?void 0:k.top)??0)+((k==null?void 0:k.bottom)??0)+(u==="C"?G??0:(G??0)*2),t),oe={...Le,borderStyle:"solid",borderRadius:u==="C"?0:C.scalingValue(T??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:_,borderLeftWidth:0}:{borderWidth:_},paddingTop:C.scalingValue((k==null?void 0:k.top)??0,t),paddingRight:C.scalingValue((k==null?void 0:k.right)??0,t),paddingBottom:C.scalingValue((k==null?void 0:k.bottom)??0,t),paddingLeft:C.scalingValue((k==null?void 0:k.left)??0,t),height:pe,minHeight:pe},H={fontSettings:{fontFamily:j,fontWeight:(ie==null?void 0:ie.fontWeight)??400,fontStyle:(ie==null?void 0:ie.fontStyle)??"normal"},fontSize:$??.01,lineHeight:re,letterSpacing:P??0,wordSpacing:te??0,textAppearance:K,color:W},ee=rn(Kt(H,t)),Fe=C.scalingValue(b??0,t),le={fontSettings:{fontFamily:j,fontWeight:(fe==null?void 0:fe.fontWeight)??400,fontStyle:(fe==null?void 0:fe.fontStyle)??"normal"},fontSize:We??.01,lineHeight:me,letterSpacing:ce??0,wordSpacing:U??0,textAppearance:Q,color:Y},N=Kt(le,t),Ue={fontSettings:{fontFamily:j,fontWeight:(Z==null?void 0:Z.fontWeight)??400,fontStyle:(Z==null?void 0:Z.fontStyle)??"normal"},fontSize:ke??.01,lineHeight:we,letterSpacing:Pe??0,wordSpacing:de??0,textAppearance:ge,color:F},je=rn(Kt(Ue,t)),gt=C.buildColorVars(c,{inputColor:V,inputTextColor:A,inputBorderColor:L,placeholderColor:D!=null&&D.trim()?D:"#cccccc",buttonColor:x,buttonTextColor:W,buttonBorderColor:M,labelTextColor:Y,successColor:F,errorColor:X},Sm,$m,se),[rt,ht]=a.useState(()=>Object.fromEntries(ye.map(Ie=>[Ie.name,""]))),[lt,Ge]=a.useState("idle"),[ve,_e]=a.useState(null),ze=s==="success"?"success":s==="error"?"error":lt,Ke=s==="error"?z:ve,Se=s==="filled",De=a.useMemo(()=>{if(!Se)return rt;let Ie=null;for(const qe of ye)(rt[qe.name]??"").trim().length>0||(Ie=Ie??{...rt},Ie[qe.name]="Filled");return Ie??rt},[rt,Se,ye]),Ve=ze==="error"?C.getFormFieldValidationError(ye,De):null,Ae=`${s&&s!=="default"?`${c}-state-${s}`:""}`.trim(),$e=o==null?void 0:o.submitUrl,tt=(Ie,qe)=>{ht(Ee=>({...Ee,[Ie]:qe}))},Ze=async Ie=>{if(Ie.preventDefault(),!d)return;const qe=Object.fromEntries(ye.map(Je=>{var Qe;return[Je.name,((Qe=rt[Je.name])==null?void 0:Qe.trim())??""]}).filter(([,Je])=>Je));if(!$e){Ge("error"),_e("No integrations were found for this form.");return}if(Object.keys(qe).length===0)return;const Ee=C.getFormFieldValidationError(ye,rt);if(Ee){Ge("error"),_e(Ee);return}Ge("submitting"),_e(null);try{const Je=await fetch($e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(qe)});if(!Je.ok){const Qe=await Je.text();throw new Error(Qe||`Request failed: ${Je.status}`)}Ge("success"),ht(Object.fromEntries(ye.map(Qe=>[Qe.name,""])))}catch(Je){Ge("error"),_e(Je instanceof Error?Je.message:"Something went wrong")}};return r.jsxs("div",{className:`${c}-wrapper ${c}-type-${u} ${Ae}`.trim(),style:gt,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:bm(c)}}),r.jsxs("form",{onSubmit:Ze,className:`${c}-form`,children:[r.jsx("div",{className:`${c}-fields`,children:ye.map((Ie,qe)=>r.jsxs(a.Fragment,{children:[qe>0&&r.jsx("div",{"data-controls":l?"fieldsGap":void 0,className:l?`${c}-control`:void 0,style:{height:C.scalingValue(h??0,t)}}),r.jsxs("div",{className:`${c}-field-group${he?` ${c}-labeled`:""}`,children:[he&&r.jsx("span",{className:`${c}-field-label`,style:N?{...N,lineHeight:N.fontSize}:void 0,children:Ie.label||Ie.name}),Ie.type==="textarea"?r.jsx("textarea",{name:Ie.name,autoComplete:"off",value:De[Ie.name]??"",onChange:Ee=>tt(Ie.name,Ee.target.value),placeholder:Ie.placeholder,className:`${c}-input`,style:oe,rows:1,"data-filled":Se||(De[Ie.name]??"").trim().length>0,"data-field-type":"textarea"}):r.jsx("input",{type:Ie.type==="phone"?"tel":Ie.type==="email"?"email":"text",name:Ie.name,autoComplete:"off",value:De[Ie.name]??"",onChange:Ee=>tt(Ie.name,Ee.target.value),placeholder:Ie.placeholder,required:Ie.isRequired??Ie.type==="email",className:`${c}-input`,style:oe,"data-filled":Se||(De[Ie.name]??"").trim().length>0})]})]},qe))}),r.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${c}-control`:void 0,style:{height:C.scalingValue(g??0,t)}}),r.jsx("div",{className:`${c}-overlay-anchor`,children:r.jsx("button",{type:d?"submit":"button",className:`${c}-button`,style:{borderStyle:"solid",borderRadius:C.scalingValue(m??0,t),borderWidth:Fe,paddingTop:C.scalingValue((I==null?void 0:I.top)??0,t),paddingRight:C.scalingValue((I==null?void 0:I.right)??0,t),paddingBottom:C.scalingValue((I==null?void 0:I.bottom)??0,t),paddingLeft:C.scalingValue((I==null?void 0:I.left)??0,t),pointerEvents:d?"auto":void 0,...ee,...R?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:r.jsx("span",{className:`${c}-overlay-anchor`,style:R?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:lt==="submitting"?"...":y})})})]}),ze==="success"&&r.jsx("p",{className:`${c}-success`,style:{...je},children:be}),ze==="error"&&r.jsx("p",{className:`${c}-error`,style:{...je},role:"alert",children:Ve??Ke??z})]})}const Sm={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"},$m=["hover","focus","filled","success","error"],Cm=`import React, { useMemo, useState } from 'react';
158
+ `}function wm({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:s}){const l=!!n,d=i&&t||!t,{prefix:c}=C.useScopedStyles(),{type:u="A",fieldsToShow:p=2,fields:v=[],buttonLabel:y,gap:g,fieldsGap:h,buttonCorners:m,buttonStroke:b,buttonPadding:I,isButtonFullWidth:R,inputCorners:T,inputStroke:G,inputPadding:k,inputColor:V,inputTextColor:A,inputBorderColor:L,placeholderColor:D,buttonColor:x,buttonTextColor:W,buttonBorderColor:M,labelTextColor:Y,successColor:F,errorColor:X,fontFamily:j,inputFontSettings:B,inputFontSize:ne,inputLineHeight:S,inputLetterSpacing:E,inputWordSpacing:O,inputTextAppearance:ae,buttonFontSettings:ie,buttonFontSize:$,buttonLineHeight:se,buttonLetterSpacing:P,buttonWordSpacing:te,buttonTextAppearance:K,labelFontSettings:he,labelFontSize:We,labelLineHeight:pe,labelLetterSpacing:ce,labelWordSpacing:U,labelTextAppearance:Q,statusFontSettings:Z,statusFontSize:ke,statusLineHeight:we,statusLetterSpacing:Ae,statusWordSpacing:ue,statusTextAppearance:ge,successMessage:be,errorMessage:z,stateOverrides:oe}=e,fe=u==="B",ye=v.slice(0,Math.min(p,v.length)),Me={fontSettings:{fontFamily:j,fontWeight:(B==null?void 0:B.fontWeight)??400,fontStyle:(B==null?void 0:B.fontStyle)??"normal"},fontSize:ne??.01,lineHeight:S,letterSpacing:E??0,wordSpacing:O??0,textAppearance:ae,color:A},Se=rn(Kt(Me,t)),_=C.scalingValue(G??0,t),me=C.scalingValue((S??ne??.01)+((k==null?void 0:k.top)??0)+((k==null?void 0:k.bottom)??0)+(u==="C"?G??0:(G??0)*2),t),re={...Se,borderStyle:"solid",borderRadius:u==="C"?0:C.scalingValue(T??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:_,borderLeftWidth:0}:{borderWidth:_},paddingTop:C.scalingValue((k==null?void 0:k.top)??0,t),paddingRight:C.scalingValue((k==null?void 0:k.right)??0,t),paddingBottom:C.scalingValue((k==null?void 0:k.bottom)??0,t),paddingLeft:C.scalingValue((k==null?void 0:k.left)??0,t),height:me,minHeight:me},H={fontSettings:{fontFamily:j,fontWeight:(ie==null?void 0:ie.fontWeight)??400,fontStyle:(ie==null?void 0:ie.fontStyle)??"normal"},fontSize:$??.01,lineHeight:se,letterSpacing:P??0,wordSpacing:te??0,textAppearance:K,color:W},ee=rn(Kt(H,t)),Fe=C.scalingValue(b??0,t),le={fontSettings:{fontFamily:j,fontWeight:(he==null?void 0:he.fontWeight)??400,fontStyle:(he==null?void 0:he.fontStyle)??"normal"},fontSize:We??.01,lineHeight:pe,letterSpacing:ce??0,wordSpacing:U??0,textAppearance:Q,color:Y},N=Kt(le,t),Xe={fontSettings:{fontFamily:j,fontWeight:(Z==null?void 0:Z.fontWeight)??400,fontStyle:(Z==null?void 0:Z.fontStyle)??"normal"},fontSize:ke??.01,lineHeight:we,letterSpacing:Ae??0,wordSpacing:ue??0,textAppearance:ge,color:F},je=rn(Kt(Xe,t)),ut=C.buildColorVars(c,{inputColor:V,inputTextColor:A,inputBorderColor:L,placeholderColor:D!=null&&D.trim()?D:"#cccccc",buttonColor:x,buttonTextColor:W,buttonBorderColor:M,labelTextColor:Y,successColor:F,errorColor:X},Sm,$m,oe),[tt,ft]=a.useState(()=>Object.fromEntries(ye.map(Ee=>[Ee.name,""]))),[st,Ue]=a.useState("idle"),[ve,_e]=a.useState(null),ze=s==="success"?"success":s==="error"?"error":st,Ye=s==="error"?z:ve,Ce=s==="filled",Oe=a.useMemo(()=>{if(!Ce)return tt;let Ee=null;for(const Ge of ye)(tt[Ge.name]??"").trim().length>0||(Ee=Ee??{...tt},Ee[Ge.name]="Filled");return Ee??tt},[tt,Ce,ye]),Ve=ze==="error"?C.getFormFieldValidationError(ye,Oe):null,Ie=`${s&&s!=="default"?`${c}-state-${s}`:""}`.trim(),qe=o==null?void 0:o.submitUrl,lt=(Ee,Ge)=>{ft(Pe=>({...Pe,[Ee]:Ge}))},Ze=async Ee=>{if(Ee.preventDefault(),!d)return;const Ge=Object.fromEntries(ye.map(Je=>{var nt;return[Je.name,((nt=tt[Je.name])==null?void 0:nt.trim())??""]}).filter(([,Je])=>Je));if(!qe){Ue("error"),_e("No integrations were found for this form.");return}if(Object.keys(Ge).length===0)return;const Pe=C.getFormFieldValidationError(ye,tt);if(Pe){Ue("error"),_e(Pe);return}Ue("submitting"),_e(null);try{const Je=await fetch(qe,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ge)});if(!Je.ok){const nt=await Je.text();throw new Error(nt||`Request failed: ${Je.status}`)}Ue("success"),ft(Object.fromEntries(ye.map(nt=>[nt.name,""])))}catch(Je){Ue("error"),_e(Je instanceof Error?Je.message:"Something went wrong")}};return r.jsxs("div",{className:`${c}-wrapper ${c}-type-${u} ${Ie}`.trim(),style:ut,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:bm(c)}}),r.jsxs("form",{onSubmit:Ze,className:`${c}-form`,children:[r.jsx("div",{className:`${c}-fields`,children:ye.map((Ee,Ge)=>r.jsxs(a.Fragment,{children:[Ge>0&&r.jsx("div",{"data-controls":l?"fieldsGap":void 0,className:l?`${c}-control`:void 0,style:{height:C.scalingValue(h??0,t)}}),r.jsxs("div",{className:`${c}-field-group${fe?` ${c}-labeled`:""}`,children:[fe&&r.jsx("span",{className:`${c}-field-label`,style:N?{...N,lineHeight:N.fontSize}:void 0,children:Ee.label||Ee.name}),Ee.type==="textarea"?r.jsx("textarea",{name:Ee.name,autoComplete:"off",value:Oe[Ee.name]??"",onChange:Pe=>lt(Ee.name,Pe.target.value),placeholder:Ee.placeholder,className:`${c}-input`,style:re,rows:1,"data-filled":Ce||(Oe[Ee.name]??"").trim().length>0,"data-field-type":"textarea"}):r.jsx("input",{type:Ee.type==="phone"?"tel":Ee.type==="email"?"email":"text",name:Ee.name,autoComplete:"off",value:Oe[Ee.name]??"",onChange:Pe=>lt(Ee.name,Pe.target.value),placeholder:Ee.placeholder,required:Ee.isRequired??Ee.type==="email",className:`${c}-input`,style:re,"data-filled":Ce||(Oe[Ee.name]??"").trim().length>0})]})]},Ge))}),r.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${c}-control`:void 0,style:{height:C.scalingValue(g??0,t)}}),r.jsx("div",{className:`${c}-overlay-anchor`,children:r.jsx("button",{type:d?"submit":"button",className:`${c}-button`,style:{borderStyle:"solid",borderRadius:C.scalingValue(m??0,t),borderWidth:Fe,paddingTop:C.scalingValue((I==null?void 0:I.top)??0,t),paddingRight:C.scalingValue((I==null?void 0:I.right)??0,t),paddingBottom:C.scalingValue((I==null?void 0:I.bottom)??0,t),paddingLeft:C.scalingValue((I==null?void 0:I.left)??0,t),pointerEvents:d?"auto":void 0,...ee,...R?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:r.jsx("span",{className:`${c}-overlay-anchor`,style:R?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:st==="submitting"?"...":y})})})]}),ze==="success"&&r.jsx("p",{className:`${c}-success`,style:{...je},children:be}),ze==="error"&&r.jsx("p",{className:`${c}-error`,style:{...je},role:"alert",children:Ve??Ye??z})]})}const Sm={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"},$m=["hover","focus","filled","success","error"],Cm=`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';
@@ -982,7 +982,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
982
982
  font-size: ${Vo(14)};
983
983
  color: var(--${e}-error-error-color, var(--${e}-error-color));
984
984
  }
985
- `}const Mm=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:s}=C.useScopedStyles(),l=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:c,buttonLabel:u,fieldsToShow:p=1,fontFamily:v,inputFontSettings:y,inputFontSize:g,inputLineHeight:h,inputLetterSpacing:m,inputWordSpacing:b,inputTextAppearance:I,buttonFontSettings:R,buttonFontSize:T,buttonLineHeight:G,buttonLetterSpacing:k,buttonWordSpacing:V,buttonTextAppearance:A,statusFontSettings:L,statusFontSize:D,statusLineHeight:x,statusLetterSpacing:W,statusWordSpacing:M,statusTextAppearance:Y,iconMaxWidth:F,minHeight:X,corners:j,stroke:B,stateOverrides:ne,inputPadding:S,buttonPadding:E,successMessage:O="Thanks for subscribing!",errorMessage:ae="Please, fill all required fields."}=e,ie=d.slice(0,Math.min(p,d.length)),[$,re]=a.useState(()=>Object.fromEntries(ie.map(le=>[le.name,""]))),[P,te]=a.useState("idle"),[K,fe]=a.useState(null),We=o==="success"?"success":o==="error"?"error":P,me=o==="error"?ae:K,ce=o==="filled",U=a.useMemo(()=>{if(!ce)return $;let le=null;for(const N of ie)($[N.name]??"").trim().length>0||(le=le??{...$},le[N.name]="Filled");return le??$},[ce,$,ie]),Q=We==="error"?C.getFormFieldValidationError(ie,U):null,Z=o&&o!=="default"?`${s}-state-${o}`:"",ke=ie.some(le=>(U[le.name]??"").trim().length>0),we=Z!==`${s}-state-filled`&&ke?`${s}-state-filled`:"",Pe=`${Z} ${we}`.trim(),de=i==null?void 0:i.submitUrl,ge=u??"",be=(c==null?void 0:c.icon)??"",z=(c==null?void 0:c.mode)==="On",se=ge||"Submit",he={fontSettings:{fontFamily:v,fontWeight:(y==null?void 0:y.fontWeight)??400,fontStyle:(y==null?void 0:y.fontStyle)??"normal"},fontSize:g??.01,lineHeight:h,letterSpacing:m??0,wordSpacing:b??0,textAppearance:I,color:e.inputTextColor??"#111111"},ye={fontSettings:{fontFamily:v,fontWeight:(R==null?void 0:R.fontWeight)??400,fontStyle:(R==null?void 0:R.fontStyle)??"normal"},fontSize:T??.01,lineHeight:G,letterSpacing:k??0,wordSpacing:V??0,textAppearance:A,color:e.buttonTextColor??"#ffffff"},Me={fontSettings:{fontFamily:v,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:D??.01,lineHeight:x,letterSpacing:W??0,wordSpacing:M??0,textAppearance:Y,color:e.successColor??"#22c55e"},Le=rn(Kt(he,t)),_=rn(Kt(ye,t)),pe=rn(Kt(Me,t)),oe=C.buildColorVars(s,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(he==null?void 0:he.color)??"#111111",buttonTextColor:e.buttonTextColor??(ye==null?void 0:ye.color)??"#ffffff"},Pm,km,ne),H={borderRadius:C.scalingValue(j,t),borderWidth:C.scalingValue(B,t),borderStyle:"solid"},ee={borderLeftWidth:C.scalingValue(B,t)},Fe=async le=>{if(le.preventDefault(),!l)return;const N=Object.fromEntries(ie.map(je=>{var gt;return[je.name,((gt=$[je.name])==null?void 0:gt.trim())??""]}).filter(([,je])=>je));if(!de){te("error"),fe("No integrations were found for this form.");return}if(Object.keys(N).length===0)return;const Ue=C.getFormFieldValidationError(ie,$);if(Ue){te("error"),fe(Ue);return}te("submitting"),fe(null);try{const je=await fetch(de,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(N)});if(!je.ok){const gt=await je.text();throw new Error(gt||`Request failed: ${je.status}`)}te("success"),re(Object.fromEntries(ie.map(gt=>[gt.name,""])))}catch(je){te("error"),fe(je instanceof Error?je.message:"Something went wrong")}};return r.jsxs("div",{className:`${s}-wrapper ${Pe}`.trim(),style:oe,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Em(s)}}),r.jsxs("form",{onSubmit:Fe,className:`${s}-form`,style:{...H,height:C.scalingValue(X,t),minHeight:C.scalingValue(X,t)},children:[r.jsx("div",{className:`${s}-inputWrap ${s}-overlayAnchor`,style:{flex:1,minWidth:0},children:ie.map(le=>r.jsx("input",{type:le.type==="email"?"email":le.type==="phone"?"tel":"text",name:le.name,autoComplete:"off",value:U[le.name]??"",onChange:N=>re(Ue=>({...Ue,[le.name]:N.target.value})),placeholder:le.placeholder,required:le.isRequired??le.type==="email",className:`${s}-input`,style:{...Le,paddingRight:C.scalingValue(S.right,t),paddingLeft:C.scalingValue(S.left,t),paddingTop:C.scalingValue(S.top,t),paddingBottom:C.scalingValue(S.bottom,t)}},le.name))}),r.jsx("div",{className:`${s}-overlayAnchor`,children:r.jsx("button",{type:l?"submit":"button",className:`${s}-submitBtn`,"aria-label":se,style:{..._,...ee,paddingRight:C.scalingValue(E.right,t),paddingLeft:C.scalingValue(E.left,t),paddingTop:C.scalingValue(E.top,t),paddingBottom:C.scalingValue(E.bottom,t),pointerEvents:l?"auto":void 0},children:P==="submitting"?"...":z?be&&r.jsx(an,{url:be,className:`${s}-submitBtnIcon`,style:{maxWidth:C.scalingValue(F??0,t)},fill:`var(--${s}-button-text-color)`,hoverFill:`var(--${s}-button-text-color)`}):ge})})]}),We==="success"&&r.jsx("p",{className:`${s}-success`,style:{...pe},children:O}),We==="error"&&r.jsx("p",{className:`${s}-error`,style:{...pe},role:"alert",children:Q??me??ae})]})},Pm={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"},km=["hover","focus","filled","success","error"],Am=`import React, { useMemo, useState } from 'react';
985
+ `}const Mm=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:s}=C.useScopedStyles(),l=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:c,buttonLabel:u,fieldsToShow:p=1,fontFamily:v,inputFontSettings:y,inputFontSize:g,inputLineHeight:h,inputLetterSpacing:m,inputWordSpacing:b,inputTextAppearance:I,buttonFontSettings:R,buttonFontSize:T,buttonLineHeight:G,buttonLetterSpacing:k,buttonWordSpacing:V,buttonTextAppearance:A,statusFontSettings:L,statusFontSize:D,statusLineHeight:x,statusLetterSpacing:W,statusWordSpacing:M,statusTextAppearance:Y,iconMaxWidth:F,minHeight:X,corners:j,stroke:B,stateOverrides:ne,inputPadding:S,buttonPadding:E,successMessage:O="Thanks for subscribing!",errorMessage:ae="Please, fill all required fields."}=e,ie=d.slice(0,Math.min(p,d.length)),[$,se]=a.useState(()=>Object.fromEntries(ie.map(le=>[le.name,""]))),[P,te]=a.useState("idle"),[K,he]=a.useState(null),We=o==="success"?"success":o==="error"?"error":P,pe=o==="error"?ae:K,ce=o==="filled",U=a.useMemo(()=>{if(!ce)return $;let le=null;for(const N of ie)($[N.name]??"").trim().length>0||(le=le??{...$},le[N.name]="Filled");return le??$},[ce,$,ie]),Q=We==="error"?C.getFormFieldValidationError(ie,U):null,Z=o&&o!=="default"?`${s}-state-${o}`:"",ke=ie.some(le=>(U[le.name]??"").trim().length>0),we=Z!==`${s}-state-filled`&&ke?`${s}-state-filled`:"",Ae=`${Z} ${we}`.trim(),ue=i==null?void 0:i.submitUrl,ge=u??"",be=(c==null?void 0:c.icon)??"",z=(c==null?void 0:c.mode)==="On",oe=ge||"Submit",fe={fontSettings:{fontFamily:v,fontWeight:(y==null?void 0:y.fontWeight)??400,fontStyle:(y==null?void 0:y.fontStyle)??"normal"},fontSize:g??.01,lineHeight:h,letterSpacing:m??0,wordSpacing:b??0,textAppearance:I,color:e.inputTextColor??"#111111"},ye={fontSettings:{fontFamily:v,fontWeight:(R==null?void 0:R.fontWeight)??400,fontStyle:(R==null?void 0:R.fontStyle)??"normal"},fontSize:T??.01,lineHeight:G,letterSpacing:k??0,wordSpacing:V??0,textAppearance:A,color:e.buttonTextColor??"#ffffff"},Me={fontSettings:{fontFamily:v,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:D??.01,lineHeight:x,letterSpacing:W??0,wordSpacing:M??0,textAppearance:Y,color:e.successColor??"#22c55e"},Se=rn(Kt(fe,t)),_=rn(Kt(ye,t)),me=rn(Kt(Me,t)),re=C.buildColorVars(s,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(fe==null?void 0:fe.color)??"#111111",buttonTextColor:e.buttonTextColor??(ye==null?void 0:ye.color)??"#ffffff"},Pm,km,ne),H={borderRadius:C.scalingValue(j,t),borderWidth:C.scalingValue(B,t),borderStyle:"solid"},ee={borderLeftWidth:C.scalingValue(B,t)},Fe=async le=>{if(le.preventDefault(),!l)return;const N=Object.fromEntries(ie.map(je=>{var ut;return[je.name,((ut=$[je.name])==null?void 0:ut.trim())??""]}).filter(([,je])=>je));if(!ue){te("error"),he("No integrations were found for this form.");return}if(Object.keys(N).length===0)return;const Xe=C.getFormFieldValidationError(ie,$);if(Xe){te("error"),he(Xe);return}te("submitting"),he(null);try{const je=await fetch(ue,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(N)});if(!je.ok){const ut=await je.text();throw new Error(ut||`Request failed: ${je.status}`)}te("success"),se(Object.fromEntries(ie.map(ut=>[ut.name,""])))}catch(je){te("error"),he(je instanceof Error?je.message:"Something went wrong")}};return r.jsxs("div",{className:`${s}-wrapper ${Ae}`.trim(),style:re,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Em(s)}}),r.jsxs("form",{onSubmit:Fe,className:`${s}-form`,style:{...H,height:C.scalingValue(X,t),minHeight:C.scalingValue(X,t)},children:[r.jsx("div",{className:`${s}-inputWrap ${s}-overlayAnchor`,style:{flex:1,minWidth:0},children:ie.map(le=>r.jsx("input",{type:le.type==="email"?"email":le.type==="phone"?"tel":"text",name:le.name,autoComplete:"off",value:U[le.name]??"",onChange:N=>se(Xe=>({...Xe,[le.name]:N.target.value})),placeholder:le.placeholder,required:le.isRequired??le.type==="email",className:`${s}-input`,style:{...Se,paddingRight:C.scalingValue(S.right,t),paddingLeft:C.scalingValue(S.left,t),paddingTop:C.scalingValue(S.top,t),paddingBottom:C.scalingValue(S.bottom,t)}},le.name))}),r.jsx("div",{className:`${s}-overlayAnchor`,children:r.jsx("button",{type:l?"submit":"button",className:`${s}-submitBtn`,"aria-label":oe,style:{..._,...ee,paddingRight:C.scalingValue(E.right,t),paddingLeft:C.scalingValue(E.left,t),paddingTop:C.scalingValue(E.top,t),paddingBottom:C.scalingValue(E.bottom,t),pointerEvents:l?"auto":void 0},children:P==="submitting"?"...":z?be&&r.jsx(an,{url:be,className:`${s}-submitBtnIcon`,style:{maxWidth:C.scalingValue(F??0,t)},fill:`var(--${s}-button-text-color)`,hoverFill:`var(--${s}-button-text-color)`}):ge})})]}),We==="success"&&r.jsx("p",{className:`${s}-success`,style:{...me},children:O}),We==="error"&&r.jsx("p",{className:`${s}-error`,style:{...me},role:"alert",children:Q??pe??ae})]})},Pm={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"},km=["hover","focus","filled","success","error"],Am=`import React, { useMemo, useState } from 'react';
986
986
  import { CommonComponentProps } from '../props';
987
987
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
988
988
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -1693,7 +1693,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1693
1693
  .${e}-image-hover-grayscale:hover video {
1694
1694
  filter: grayscale(100%);
1695
1695
  }
1696
- `}const Dm=30,jm=20,qr=3,zm=12,Bm=32,Vm=3,Gm=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")},qm=(e,t)=>Array.from({length:t},()=>e).flat(),Um=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},$c=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),Fs=(e,t)=>{if(t<=0||e.children.length<t)return 0;const n=e.children[0],i=e.children[t-1];if(!n||!i)return 0;const o=getComputedStyle(e),s=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=i.getBoundingClientRect().right-n.getBoundingClientRect().left;if(l>0)return l;const d=Array.from({length:t},(u,p)=>e.children[p]),c=$c(d);return c<=0?0:c+s*Math.max(0,t-1)},Xm=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=$c(Array.from(e.children));if(i<=0)return 0;const o=getComputedStyle(e),s=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=Number.parseFloat(o.paddingRight)||0;return i+s*Math.max(0,e.children.length-1)+l},Km=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},Ym=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Km(i,e))},Zm=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??"")},Jm=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,Qm=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:s,imageHoverClass:l,isFirstSet:d,scaled:c,onFirstSetImageDone:u})=>{var M,Y,F,X;const p=a.useRef(null),v=!!((M=e.image)!=null&&M.url&&Zm(e.image));a.useLayoutEffect(()=>{d&&Jm(p.current)&&(u==null||u())},[d,(Y=e.image)==null?void 0:Y.url,u]);const y=n.display==="cover",g=n.ratioValue??"1:1",h=n.reversed??!1,[m,b]=g.split(":").map(Number),T=(h?b:m)/(h?m:b),G=i/T,k=G>o?o:G,V=G>o?o*T:i,A=c(V),L=c(k),D={borderRadius:c(s)},x=y?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...D}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:c(i),maxHeight:c(o),objectFit:"contain",...D},W=((F=e.image)==null?void 0:F.url)&&(v?r.jsx("video",{ref:j=>{p.current=j},src:e.image.url,style:x,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto",onLoadedData:d?u:void 0,onError:d?u:void 0}):r.jsx("img",{ref:j=>{p.current=j},src:e.image.url,alt:((X=e.image)==null?void 0:X.name)??"",style:x,onLoad:d?u:void 0,onError:d?u:void 0}));return r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...y?{width:A}:{width:"max-content",maxWidth:c(i),minWidth:0}},children:r.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...y?{width:A,height:L,overflow:"hidden",...D}:{width:"max-content",maxWidth:c(i),height:c(o)}},children:W&&e.link?r.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:mt(`${t}-marquee-link`,!y&&`${t}-marquee-link-contain`),children:W}):W})})},eg=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=C.useScopedStyles(),[l,d]=a.useState(0),c=l>0?Math.round(l):0,u=a.useMemo(()=>Om(s,c),[s,c]),{speed:p,direction:v,pauseOnHover:y,gap:g,imageMaxWidth:h,imageMaxHeight:m,hoverEffect:b,cornerRadius:I=0}=e,R=a.useMemo(()=>Um(e.imageFit),[e.imageFit]),T=(t==null?void 0:t.length)??0,G=!!o,k=!n||!!i,V=k&&b!=="off"&&b!=="randomize"?`${s}-image-hover-${b}`:void 0,A=n?!!i:!0,D=((t==null?void 0:t.length)??0)>0&&(A||!!n),x=Math.max(0,p)*Dm,W=we=>C.scalingValue(we,n??!1),M=a.useRef(null),Y=a.useRef(null),F=a.useRef(null),[X,j]=a.useState(0),B=A&&y==="on",[ne,S]=a.useState(!1),[E,O]=a.useState({}),ae=a.useRef(E);ae.current=E;const ie=a.useRef(null),$=a.useRef(0),re=a.useRef(null),P=a.useMemo(()=>(t??[]).map(we=>{var Pe;return((Pe=we.image)==null?void 0:Pe.url)??""}).join("\0"),[t]),[te,K]=a.useState(qr),fe=a.useMemo(()=>{const we=t??[];return we.length===0||!(A||!!n)?we:qm(we,te)},[t,A,te,n]),We=a.useMemo(()=>(t??[]).filter(we=>{var Pe;return!!((Pe=we.image)!=null&&Pe.url)}).length,[t]),me=D?Vm:1;a.useLayoutEffect(()=>{$.current=0,O({}),ie.current=null,K(qr),d(0)},[P]),a.useEffect(()=>{if(!k||b!=="randomize")return;const we=M.current;if(!we)return;const Pe=z=>{O(se=>{const he=Array.from(z).filter(Me=>Me in se&&!Ym(we,Me));if(he.length===0)return se;const ye={...se};return he.forEach(Me=>{delete ye[Me]}),ye})},de=new IntersectionObserver(z=>{const se=new Set;for(const he of z){const ye=he.target.dataset.marqueeItemIndex,Me=ye!==void 0?Number(ye):NaN;Number.isNaN(Me)||se.add(Me)}se.size>0&&Pe(se)},{root:we,threshold:0});Object.keys(E).forEach(z=>{const se=Number(z);we.querySelectorAll(`[data-marquee-item-index="${se}"]`).forEach(he=>de.observe(he))});const ge={current:0},be=()=>{const z=Object.keys(ae.current);z.length!==0&&(Pe(z.map(Number)),ge.current=requestAnimationFrame(be))};return Object.keys(ae.current).length>0&&(ge.current=requestAnimationFrame(be)),()=>{cancelAnimationFrame(ge.current),de.disconnect()}},[b,E,k]),a.useLayoutEffect(()=>{if(!D)return;const we=M.current,Pe=F.current;if(!we||!Pe)return;const de={current:0},ge=()=>{const se=we.getBoundingClientRect().width||we.offsetWidth,he=Xm(Pe),ye=ie.current,Me=typeof ye=="number"&&Math.abs(ye-he)<=.25;ie.current=he;let Le=te,_=0;if((A||n)&&T>0&&se>0){const H=Fs(Pe,T);if(H>=Bm){_=H;const ee=Math.min(zm,Math.max(qr,Math.ceil(se/H)+1));Le=ee,ee!==te&&K(ee)}}const oe=Le!==te&&_>0?_*Le:he>0?he:_>0?_*Le:(()=>{const H=Fs(Pe,T);return H>0?H*Le:0})();oe>0?d(H=>H<=0?oe:!Me||Math.round(H)===Math.round(oe)?H:oe):!Me&&l<=0&&(cancelAnimationFrame(de.current),de.current=requestAnimationFrame(ge))},be=()=>{cancelAnimationFrame(de.current),de.current=requestAnimationFrame(ge)};re.current=be,be();const z=new ResizeObserver(be);return z.observe(we),z.observe(Pe),()=>{re.current=null,cancelAnimationFrame(de.current),z.disconnect()}},[A,D,l,P,te,T,n]),a.useLayoutEffect(()=>{if(!D||c<=0)return;const we=Y.current;we&&Gm(we)},[D,c,v,x]),a.useLayoutEffect(()=>{if(!D||l<=0){j(0);return}const we=Y.current,Pe=F.current;if(!we||!Pe)return;const de=()=>{const be=we.offsetHeight||we.getBoundingClientRect().height,z=Array.from(Pe.children).reduce((he,ye)=>Math.max(he,ye.offsetHeight||ye.getBoundingClientRect().height),0),se=be>0?be:z;j(se>0?se:0)};de();const ge=new ResizeObserver(de);return ge.observe(we),ge.observe(Pe),()=>ge.disconnect()},[D,me,fe,n,g,h,m,l,R,E]),a.useLayoutEffect(()=>{if(!n||!G||!D||typeof window>"u")return;const we=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(we)},[n,G,D,v,l,X,g,fe]);const ce=()=>{B&&S(!0)},U=()=>{B&&S(!1)},Q=a.useCallback(()=>{var we;$.current=Math.min(We,$.current+1),(we=re.current)==null||we.call(re)},[We]),Z=a.useCallback((we,Pe)=>{O(de=>{const ge=de[we]??Pe,be=(t??[]).filter(se=>se!==ge);if(be.length===0)return de;const z=be[Math.floor(Math.random()*be.length)];return{...de,[we]:z}})},[t]),ke=(we,Pe,de,ge)=>{const be=k&&b==="randomize"&&R.display==="cover"?E[de]??we:we,z=`max(${W(g)}, ${jm}px)`,se=`calc(-0.5 * (${z} + ${W(g)}))`;return r.jsxs("div",{className:`${s}-marquee-card`,"data-marquee-item-index":de,onMouseEnter:k&&b==="randomize"&&R.display==="cover"?()=>Z(de,we):void 0,children:[r.jsx(Qm,{item:be,prefix:s,imageFit:R,imageMaxWidth:h,imageMaxHeight:m,cornerRadius:I,imageHoverClass:V,isEditor:n,isFirstSet:ge,scaled:W,onFirstSetImageDone:Q}),G&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${s}-gap-control`,style:{position:"absolute",top:0,right:se,width:z,height:"100%"}})]},`${Pe}-${de}`)};if(D){const we=A?B&&ne?"paused":"running":"paused",Pe=c>0&&x>0?c/x*1e3:0,de=`${Math.max(0,Pe)/1e3}s`;return r.jsxs("div",{ref:M,className:mt(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Marquee",style:X>0?{height:X}:void 0,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{ref:Y,className:`${s}-marquee-track`,"data-direction":v,onMouseEnter:ce,onMouseLeave:U,style:{WebkitAnimationDuration:de,animationDuration:de,WebkitAnimationPlayState:we,animationPlayState:we},children:Array.from({length:me},(ge,be)=>r.jsx("div",{ref:be===0?F:void 0,className:mt(`${s}-marquee-row`,`${s}-marquee-set`),style:{gap:W(g),paddingRight:W(g)},"aria-hidden":be>0,children:fe.map((z,se)=>ke(z,be,se,be===0&&se<T))},`set-${be}`))})]})}return r.jsxs("div",{ref:M,className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{className:mt(`${s}-marquee-row`,`${s}-marquee-static`),style:{gap:W(g),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((we,Pe)=>ke(we,0,Pe))},"marquee-static")]})},tg=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
1696
+ `}const Dm=30,jm=20,qr=3,zm=12,Bm=32,Vm=3,Gm=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")},qm=(e,t)=>Array.from({length:t},()=>e).flat(),Um=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},$c=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),Fs=(e,t)=>{if(t<=0||e.children.length<t)return 0;const n=e.children[0],i=e.children[t-1];if(!n||!i)return 0;const o=getComputedStyle(e),s=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=i.getBoundingClientRect().right-n.getBoundingClientRect().left;if(l>0)return l;const d=Array.from({length:t},(u,p)=>e.children[p]),c=$c(d);return c<=0?0:c+s*Math.max(0,t-1)},Xm=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=$c(Array.from(e.children));if(i<=0)return 0;const o=getComputedStyle(e),s=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=Number.parseFloat(o.paddingRight)||0;return i+s*Math.max(0,e.children.length-1)+l},Km=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},Ym=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Km(i,e))},Zm=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??"")},Jm=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,Qm=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:s,imageHoverClass:l,isFirstSet:d,scaled:c,onFirstSetImageDone:u})=>{var M,Y,F,X;const p=a.useRef(null),v=!!((M=e.image)!=null&&M.url&&Zm(e.image));a.useLayoutEffect(()=>{d&&Jm(p.current)&&(u==null||u())},[d,(Y=e.image)==null?void 0:Y.url,u]);const y=n.display==="cover",g=n.ratioValue??"1:1",h=n.reversed??!1,[m,b]=g.split(":").map(Number),T=(h?b:m)/(h?m:b),G=i/T,k=G>o?o:G,V=G>o?o*T:i,A=c(V),L=c(k),D={borderRadius:c(s)},x=y?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...D}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:c(i),maxHeight:c(o),objectFit:"contain",...D},W=((F=e.image)==null?void 0:F.url)&&(v?r.jsx("video",{ref:j=>{p.current=j},src:e.image.url,style:x,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto",onLoadedData:d?u:void 0,onError:d?u:void 0}):r.jsx("img",{ref:j=>{p.current=j},src:e.image.url,alt:((X=e.image)==null?void 0:X.name)??"",style:x,onLoad:d?u:void 0,onError:d?u:void 0}));return r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...y?{width:A}:{width:"max-content",maxWidth:c(i),minWidth:0}},children:r.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...y?{width:A,height:L,overflow:"hidden",...D}:{width:"max-content",maxWidth:c(i),height:c(o)}},children:W&&e.link?r.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:mt(`${t}-marquee-link`,!y&&`${t}-marquee-link-contain`),children:W}):W})})},eg=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=C.useScopedStyles(),[l,d]=a.useState(0),c=l>0?Math.round(l):0,u=a.useMemo(()=>Om(s,c),[s,c]),{speed:p,direction:v,pauseOnHover:y,gap:g,imageMaxWidth:h,imageMaxHeight:m,hoverEffect:b,cornerRadius:I=0}=e,R=a.useMemo(()=>Um(e.imageFit),[e.imageFit]),T=(t==null?void 0:t.length)??0,G=!!o,k=!n||!!i,V=k&&b!=="off"&&b!=="randomize"?`${s}-image-hover-${b}`:void 0,A=n?!!i:!0,D=((t==null?void 0:t.length)??0)>0&&(A||!!n),x=Math.max(0,p)*Dm,W=we=>C.scalingValue(we,n??!1),M=a.useRef(null),Y=a.useRef(null),F=a.useRef(null),[X,j]=a.useState(0),B=A&&y==="on",[ne,S]=a.useState(!1),[E,O]=a.useState({}),ae=a.useRef(E);ae.current=E;const ie=a.useRef(null),$=a.useRef(0),se=a.useRef(null),P=a.useMemo(()=>(t??[]).map(we=>{var Ae;return((Ae=we.image)==null?void 0:Ae.url)??""}).join("\0"),[t]),[te,K]=a.useState(qr),he=a.useMemo(()=>{const we=t??[];return we.length===0||!(A||!!n)?we:qm(we,te)},[t,A,te,n]),We=a.useMemo(()=>(t??[]).filter(we=>{var Ae;return!!((Ae=we.image)!=null&&Ae.url)}).length,[t]),pe=D?Vm:1;a.useLayoutEffect(()=>{$.current=0,O({}),ie.current=null,K(qr),d(0)},[P]),a.useEffect(()=>{if(!k||b!=="randomize")return;const we=M.current;if(!we)return;const Ae=z=>{O(oe=>{const fe=Array.from(z).filter(Me=>Me in oe&&!Ym(we,Me));if(fe.length===0)return oe;const ye={...oe};return fe.forEach(Me=>{delete ye[Me]}),ye})},ue=new IntersectionObserver(z=>{const oe=new Set;for(const fe of z){const ye=fe.target.dataset.marqueeItemIndex,Me=ye!==void 0?Number(ye):NaN;Number.isNaN(Me)||oe.add(Me)}oe.size>0&&Ae(oe)},{root:we,threshold:0});Object.keys(E).forEach(z=>{const oe=Number(z);we.querySelectorAll(`[data-marquee-item-index="${oe}"]`).forEach(fe=>ue.observe(fe))});const ge={current:0},be=()=>{const z=Object.keys(ae.current);z.length!==0&&(Ae(z.map(Number)),ge.current=requestAnimationFrame(be))};return Object.keys(ae.current).length>0&&(ge.current=requestAnimationFrame(be)),()=>{cancelAnimationFrame(ge.current),ue.disconnect()}},[b,E,k]),a.useLayoutEffect(()=>{if(!D)return;const we=M.current,Ae=F.current;if(!we||!Ae)return;const ue={current:0},ge=()=>{const oe=we.getBoundingClientRect().width||we.offsetWidth,fe=Xm(Ae),ye=ie.current,Me=typeof ye=="number"&&Math.abs(ye-fe)<=.25;ie.current=fe;let Se=te,_=0;if((A||n)&&T>0&&oe>0){const H=Fs(Ae,T);if(H>=Bm){_=H;const ee=Math.min(zm,Math.max(qr,Math.ceil(oe/H)+1));Se=ee,ee!==te&&K(ee)}}const re=Se!==te&&_>0?_*Se:fe>0?fe:_>0?_*Se:(()=>{const H=Fs(Ae,T);return H>0?H*Se:0})();re>0?d(H=>H<=0?re:!Me||Math.round(H)===Math.round(re)?H:re):!Me&&l<=0&&(cancelAnimationFrame(ue.current),ue.current=requestAnimationFrame(ge))},be=()=>{cancelAnimationFrame(ue.current),ue.current=requestAnimationFrame(ge)};se.current=be,be();const z=new ResizeObserver(be);return z.observe(we),z.observe(Ae),()=>{se.current=null,cancelAnimationFrame(ue.current),z.disconnect()}},[A,D,l,P,te,T,n]),a.useLayoutEffect(()=>{if(!D||c<=0)return;const we=Y.current;we&&Gm(we)},[D,c,v,x]),a.useLayoutEffect(()=>{if(!D||l<=0){j(0);return}const we=Y.current,Ae=F.current;if(!we||!Ae)return;const ue=()=>{const be=we.offsetHeight||we.getBoundingClientRect().height,z=Array.from(Ae.children).reduce((fe,ye)=>Math.max(fe,ye.offsetHeight||ye.getBoundingClientRect().height),0),oe=be>0?be:z;j(oe>0?oe:0)};ue();const ge=new ResizeObserver(ue);return ge.observe(we),ge.observe(Ae),()=>ge.disconnect()},[D,pe,he,n,g,h,m,l,R,E]),a.useLayoutEffect(()=>{if(!n||!G||!D||typeof window>"u")return;const we=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(we)},[n,G,D,v,l,X,g,he]);const ce=()=>{B&&S(!0)},U=()=>{B&&S(!1)},Q=a.useCallback(()=>{var we;$.current=Math.min(We,$.current+1),(we=se.current)==null||we.call(se)},[We]),Z=a.useCallback((we,Ae)=>{O(ue=>{const ge=ue[we]??Ae,be=(t??[]).filter(oe=>oe!==ge);if(be.length===0)return ue;const z=be[Math.floor(Math.random()*be.length)];return{...ue,[we]:z}})},[t]),ke=(we,Ae,ue,ge)=>{const be=k&&b==="randomize"&&R.display==="cover"?E[ue]??we:we,z=`max(${W(g)}, ${jm}px)`,oe=`calc(-0.5 * (${z} + ${W(g)}))`;return r.jsxs("div",{className:`${s}-marquee-card`,"data-marquee-item-index":ue,onMouseEnter:k&&b==="randomize"&&R.display==="cover"?()=>Z(ue,we):void 0,children:[r.jsx(Qm,{item:be,prefix:s,imageFit:R,imageMaxWidth:h,imageMaxHeight:m,cornerRadius:I,imageHoverClass:V,isEditor:n,isFirstSet:ge,scaled:W,onFirstSetImageDone:Q}),G&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${s}-gap-control`,style:{position:"absolute",top:0,right:oe,width:z,height:"100%"}})]},`${Ae}-${ue}`)};if(D){const we=A?B&&ne?"paused":"running":"paused",Ae=c>0&&x>0?c/x*1e3:0,ue=`${Math.max(0,Ae)/1e3}s`;return r.jsxs("div",{ref:M,className:mt(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Marquee",style:X>0?{height:X}:void 0,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{ref:Y,className:`${s}-marquee-track`,"data-direction":v,onMouseEnter:ce,onMouseLeave:U,style:{WebkitAnimationDuration:ue,animationDuration:ue,WebkitAnimationPlayState:we,animationPlayState:we},children:Array.from({length:pe},(ge,be)=>r.jsx("div",{ref:be===0?F:void 0,className:mt(`${s}-marquee-row`,`${s}-marquee-set`),style:{gap:W(g),paddingRight:W(g)},"aria-hidden":be>0,children:he.map((z,oe)=>ke(z,be,oe,be===0&&oe<T))},`set-${be}`))})]})}return r.jsxs("div",{ref:M,className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{className:mt(`${s}-marquee-row`,`${s}-marquee-static`),style:{gap:W(g),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((we,Ae)=>ke(we,0,Ae))},"marquee-static")]})},tg=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
1697
1697
  import cn from 'classnames';
1698
1698
  import { CommonComponentProps } from '../props';
1699
1699
  import { scalingValue } from '../utils/scalingValue';
@@ -2476,7 +2476,7 @@ type MarqueeProps = {
2476
2476
  isPreviewMode?: boolean;
2477
2477
  isEditMode?: boolean;
2478
2478
  } & CommonComponentProps;
2479
- `,ng={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:""}]}},ig={element:eg,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:ng,sourceCode:tg,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function og(e,t){const n=`calc(-1 * var(--${e}-distance, 0px))`,i=t?`
2479
+ `,ng={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:""}]}},ig={element:eg,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:ng,sourceCode:tg,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function og(e,t,n){const i=t>0?`${t}px`:"0px",o=n?`
2480
2480
  .${e}-item-image-wrap {
2481
2481
  display: flex;
2482
2482
  flex: 0 0 auto;
@@ -2530,11 +2530,11 @@ type MarqueeProps = {
2530
2530
 
2531
2531
  @keyframes ${e}-marquee-left {
2532
2532
  from { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
2533
- to { -webkit-transform: translate3d(${n}, 0, 0); transform: translate3d(${n}, 0, 0); }
2533
+ to { -webkit-transform: translate3d(-${i}, 0, 0); transform: translate3d(-${i}, 0, 0); }
2534
2534
  }
2535
2535
 
2536
2536
  @keyframes ${e}-marquee-right {
2537
- from { -webkit-transform: translate3d(${n}, 0, 0); transform: translate3d(${n}, 0, 0); }
2537
+ from { -webkit-transform: translate3d(-${i}, 0, 0); transform: translate3d(-${i}, 0, 0); }
2538
2538
  to { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
2539
2539
  }
2540
2540
 
@@ -2596,7 +2596,7 @@ type MarqueeProps = {
2596
2596
  .${e}-text {
2597
2597
  display: inline-block;
2598
2598
  }
2599
- ${i}
2599
+ ${o}
2600
2600
  .${e}-cap-ref {
2601
2601
  position: absolute;
2602
2602
  visibility: hidden;
@@ -2605,15 +2605,15 @@ ${i}
2605
2605
  left: -9999px;
2606
2606
  top: 0;
2607
2607
  }
2608
- `}const rg=30,Ur=3,ag=12,sg=3,La=.72,lg=100,cg=10,dg=e=>Math.max(0,e)/lg,ug=e=>Math.max(0,e)/cg,pg=(e,t,n)=>{const i=e.getAnimations()[0];if(!i||t<=0||n<=0)return;const s=(Number(i.currentTime??0)||0)%t/t;i.currentTime=s*n},mg=(e,t)=>Array.from({length:t*e.length},(n,i)=>e[i%e.length]),Si={ctx:void 0},gg=()=>Si.ctx!==void 0?Si.ctx:typeof document>"u"?(Si.ctx=null,Si.ctx):(Si.ctx=document.createElement("canvas").getContext("2d"),Si.ctx),hg=(e,t,n,i)=>{e.style.transform=`translate3d(${t}px, ${n}px, 0) rotate(${i}deg)`},fg=e=>{e.style.transform=""},yg=e=>{if(!e||e==="none")return 0;try{return new DOMMatrixReadOnly(e).m41}catch{return 0}},vg=(e,t)=>{const n=(i,o)=>{if(!i||i===t)return o;const s=o+i.offsetLeft,l=i.offsetParent;return!l||l===i?s:n(l,s)};return n(e,e.offsetWidth/2)},xg=96,bg=(e,t,n)=>{if(t<=0||e<=0||n<2)return null;const i=2*Math.PI/t,o=new Float64Array(n+1),s=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,y=v+c;o[p+1]=y,s[p+1]=s[p]+(d(v)+d(y))*.5*c}),{wavelength:i,periodArc:s[n],x:o,s}},wg=(e,t)=>{if(e.periodArc<=0)return t;const n=t<0?-1:1,i=Math.abs(t),o=Math.floor(i/e.periodArc),s=i-o*e.periodArc,{s:l,x:d}=e,c=(g,h)=>{if(h-g<=1)return[g,h];const m=g+h>>1;return l[m]<=s?c(m,h):c(g,m)},[u,p]=c(0,l.length-1),v=l[p]-l[u],y=v>0?(s-l[u])/v:0;return n*(o*e.wavelength+d[u]+(d[p]-d[u])*y)},Sg=(e,t,n,i)=>{const o=Math.max(0,n),s=e>0?2*Math.PI*o/e:0,l=p=>i+t*Math.sin(s*p),d=p=>t*s*Math.cos(s*p),c=Math.max(4,Math.ceil(o*4)),u=Array.from({length:c},(p,v)=>{const y=v/c*e,g=(v+1)/c*e,h=g-y,m=l(y),b=l(g),I=y+h/3,R=m+d(y)*h/3,T=g-h/3,G=b-d(g)*h/3;return`C${I.toFixed(2)} ${R.toFixed(2)} ${T.toFixed(2)} ${G.toFixed(2)} ${g.toFixed(2)} ${b.toFixed(2)}`});return[`M0 ${l(0).toFixed(2)}`,...u].join(" ")},$g=({item:e,prefix:t,textCss:n,capHeightPx:i,opticalOffsetY:o,imageGapPx:s,isCurve:l})=>{var g;const d=o!==0?{...n,transform:`translateY(${o}px)`}:n,c=i>0?{height:`${i}px`}:{fontSize:n.fontSize,height:`${La}em`},u=((g=e.image)==null?void 0:g.url)&&r.jsx("img",{src:e.image.url,alt:e.image.name??"",className:`${t}-item-image`,style:c}),p=u&&(l?r.jsx("span",{className:`${t}-item-image-wrap`,"data-marquee-wave-node":!0,children:u}):u),v=l?r.jsx("span",{className:`${t}-text`,style:d,children:Array.from(e.text).map((h,m)=>r.jsx("span",{className:`${t}-glyph`,"data-marquee-wave-node":!0,children:r.jsx("span",{className:`${t}-glyph-inner`,children:h===" "?" ":h})},m))}):r.jsx("span",{className:`${t}-text`,style:d,children:e.text}),y=r.jsxs(r.Fragment,{children:[p,v]});return r.jsx("div",{className:`${t}-item`,"data-marquee-text-item":!0,style:{gap:s},children:e.link?r.jsx("a",{href:e.link,className:`${t}-item-link`,style:{gap:s},children:y}):y})},Cg=({settings:e,content:t,isEditor:n,isPreviewMode:i})=>{const{prefix:o}=C.useScopedStyles(),[s,l]=a.useState(0),d=s>0?Math.round(s):0,{speed:c,direction:u,pauseOnHover:p,gap:v,layoutType:y,curveAmplitude:g,curveFrequency:h,textFontFamily:m,textFontSettings:b,textFontSize:I,textLineHeight:R,textLetterSpacing:T,textWordSpacing:G,textTextAppearance:k,textColor:V,backgroundColor:A,ribbonWidth:L}=e,D=L??R,x=y==="curve",W=dg(g),M=ug(h),Y=a.useMemo(()=>og(o,x),[o,x]),F=a.useMemo(()=>Kt({fontSettings:{fontFamily:m,fontWeight:b.fontWeight,fontStyle:b.fontStyle},letterSpacing:T,wordSpacing:G,fontSize:I,lineHeight:R,textAppearance:k,color:V},n),[m,b,T,G,I,R,k,V,n]),X=Ae=>C.scalingValue(Ae,n??!1),j=((t==null?void 0:t.length)??0)>0,B=n?!!i:!0,ne=j&&(B||!!n),S=Math.max(0,c)*rg,E=B&&p==="on",[O,ae]=a.useState(!1),ie=B?E&&O?"paused":"running":"paused",$=ie==="running"&&S>0&&d>0,re=d>0&&S>0?d/S*1e3:0,P=a.useRef(null),te=a.useRef(null),K=a.useRef(null),fe=a.useRef(null),We=a.useRef(null),me=a.useRef(null),ce=a.useRef($),U=a.useRef(null),Q=a.useRef(null),Z=a.useRef(0),ke=a.useRef(W),we=a.useRef(M);ce.current=$,ke.current=W,we.current=M;const[Pe,de]=a.useState(0),[ge,be]=a.useState(0),[z,se]=a.useState(0),[he,ye]=a.useState(0),[Me,Le]=a.useState(0),_=a.useMemo(()=>(t??[]).map(Ae=>{var $e;return`${Ae.text}\0${(($e=Ae.image)==null?void 0:$e.url)??""}\0${Ae.link??""}`}).join("\0"),[t]),[pe,oe]=a.useState(Ur),H=a.useMemo(()=>{const Ae=t??[];return Ae.length===0||!(B||n)?Ae:mg(Ae,pe)},[t,B,pe,n]),ee=ne?sg:1;a.useLayoutEffect(()=>{oe(Ur),l(0)},[_]),a.useLayoutEffect(()=>{var Ie;const Ae=me.current;if(!Ae)return;const $e=()=>{const qe=getComputedStyle(Ae),Ee=parseFloat(qe.fontSize)||0;if(Ee<=0)return;const Je=gg();if(!Je){de(Ee*La),be(0);return}Je.font=`${qe.fontStyle} ${qe.fontWeight} ${Ee}px ${qe.fontFamily}`;const Qe=Je.measureText("H"),st=Qe.actualBoundingBoxAscent>0?Qe.actualBoundingBoxAscent:Ee*La,St=Math.max(0,Qe.actualBoundingBoxDescent||0),Pt=Qe.fontBoundingBoxAscent||0,Nt=Qe.fontBoundingBoxDescent||0;de(yt=>Math.abs(yt-st)>.5?st:yt);const dt=Pt>0||Nt>0?(Nt-St-(Pt-st))/2:0;be(yt=>Math.abs(yt-dt)>.25?dt:yt)};$e();const tt=typeof document<"u"?document.fonts:void 0;(Ie=tt==null?void 0:tt.ready)==null||Ie.then($e).catch(()=>{});const Ze=new ResizeObserver($e);return Ze.observe(Ae),()=>Ze.disconnect()},[F.fontFamily,F.fontWeight,F.fontStyle,F.fontSize,F.lineHeight]),a.useLayoutEffect(()=>{if(!ne)return;const Ae=P.current,$e=fe.current;if(!Ae||!$e)return;const tt={id:0},Ze=()=>{const qe=Ae.offsetWidth||Ae.getBoundingClientRect().width,Ee=$e.offsetWidth||$e.getBoundingClientRect().width;if(j&&qe>0&&Ee>0){const Je=Ee/pe;if(Je>0){const Qe=Math.min(ag,Math.max(Ur,Math.ceil(qe/Je)+1));if(Qe!==pe){oe(Qe);return}}}Ee>0&&l(Ee)};tt.id=requestAnimationFrame(Ze);const Ie=new ResizeObserver(()=>{cancelAnimationFrame(tt.id),tt.id=requestAnimationFrame(Ze)});return Ie.observe(Ae),Ie.observe($e),()=>{cancelAnimationFrame(tt.id),Ie.disconnect()}},[ne,_,pe,j,Pe]),a.useLayoutEffect(()=>{const Ae=We.current;if(!Ae)return;const $e={id:0},tt=()=>{const Ie=Ae.offsetHeight;Ie>0&&Le(qe=>Math.abs(qe-Ie)>.5?Ie:qe)};$e.id=requestAnimationFrame(tt);const Ze=new ResizeObserver(()=>{cancelAnimationFrame($e.id),$e.id=requestAnimationFrame(tt)});return Ze.observe(Ae),()=>{cancelAnimationFrame($e.id),Ze.disconnect()}},[D,n]),a.useLayoutEffect(()=>{if(!x){se(0),ye(0);return}const Ae=P.current,$e=fe.current;if(!Ae||!$e)return;const tt={id:0},Ze=()=>{const qe=Ae.offsetWidth,Ee=$e.offsetHeight;qe>0&&ye(Je=>Math.abs(Je-qe)>.5?qe:Je),Ee>0&&se(Je=>Math.abs(Je-Ee)>.5?Ee:Je)};tt.id=requestAnimationFrame(Ze);const Ie=new ResizeObserver(()=>{cancelAnimationFrame(tt.id),tt.id=requestAnimationFrame(Ze)});return Ie.observe(Ae),Ie.observe($e),()=>{cancelAnimationFrame(tt.id),Ie.disconnect()}},[x,_,Pe,R,I,ne]),a.useLayoutEffect(()=>{if(!ne||d<=0)return;const Ae=K.current;Ae&&(pg(Ae,Z.current,re),Z.current=re)},[ne,d,u,S,re]),a.useLayoutEffect(()=>{if(!x||!j)return;const Ae=P.current;if(!Ae)return;const $e={raf:0,cancelled:!1,lut:null,lutKey:"",itemsCache:[],cacheDirty:!0},tt=()=>{for(const st of $e.itemsCache)for(const St of st.glyphs)fg(St.inner)},Ze=()=>{const st=te.current??Ae;$e.itemsCache=Array.from(Ae.querySelectorAll("[data-marquee-text-item]"),St=>{const Pt=[];return St.querySelectorAll("[data-marquee-wave-node]").forEach(Nt=>{const dt=Nt.firstElementChild;dt&&Pt.push({inner:dt,layoutLocalX:vg(Nt,st)})}),{item:St,glyphs:Pt}}),$e.cacheDirty=!1},Ie=()=>{$e.cacheDirty&&Ze();const St=(te.current??Ae).offsetWidth||1,Pt=St*ke.current,Nt=we.current,dt=2*Math.PI*Nt/St,yt=`${St}|${Pt}|${dt}`;yt!==$e.lutKey&&($e.lutKey=yt,$e.lut=bg(Pt,dt,xg));const Ot=K.current,Ft=Ot?yg(getComputedStyle(Ot).transform):0,bt=Ae.getBoundingClientRect(),Wt=bt.left,Gt=bt.right,Zt=$e.lut&&$e.lut.wavelength>0?Math.max(0,($e.lut.periodArc/$e.lut.wavelength-1)*St):0;for(const{item:en,glyphs:Tt}of $e.itemsCache){const _t=en.getBoundingClientRect();if(!(_t.right<Wt||_t.left>Gt+Zt))for(const nn of Tt){const ct=nn.layoutLocalX+Ft,Te=$e.lut?wg($e.lut,ct):ct,Ne=dt*Te,nt=Pt*Math.sin(Ne),pt=Pt*dt*Math.cos(Ne),vt=Math.atan(pt)*(180/Math.PI);hg(nn.inner,Te-ct,nt,vt)}}},qe=()=>{$e.cancelled||($e.raf=0,Ie(),ce.current&&!document.hidden&&($e.raf=requestAnimationFrame(qe)))},Ee=()=>{$e.cancelled||$e.raf||($e.raf=requestAnimationFrame(qe))},Je=()=>{$e.cacheDirty=!0,Ie(),Ee()};U.current=Ee,Q.current=Je,Ie(),Ee();const Qe=()=>{if(document.hidden){cancelAnimationFrame($e.raf),$e.raf=0;return}cancelAnimationFrame($e.raf),$e.raf=0,Je()};return document.addEventListener("visibilitychange",Qe),window.addEventListener("pageshow",Qe),window.addEventListener("focus",Qe),()=>{$e.cancelled=!0,U.current=null,Q.current=null,cancelAnimationFrame($e.raf),document.removeEventListener("visibilitychange",Qe),window.removeEventListener("pageshow",Qe),window.removeEventListener("focus",Qe),tt()}},[x,j]),a.useLayoutEffect(()=>{var Ae;!x||!j||(Ae=Q.current)==null||Ae.call(Q)},[x,j,s,_,pe,Pe,W,M,he]),a.useLayoutEffect(()=>{var Ae;(Ae=U.current)==null||Ae.call(U)},[$,u]);const Fe=()=>{E&&ae(!0)},le=()=>{E&&ae(!1)},N=x?W*100:0,Ue=X(D),je={minHeight:Ue,...x?{paddingTop:`${N}%`,paddingBottom:`${N}%`}:{}},gt={height:Ue,...x?{visibility:"hidden"}:{backgroundColor:A}},rt={gap:X(v),minHeight:Ue},ht=he*W,lt=Me>0?Me:z,Ge=Math.max(z,lt),ve=x&&he>0&&Ge>0?Sg(he,ht,M,ht+Ge/2):"",_e=ht*2+Ge,ze=ve?r.jsx("svg",{className:`${o}-curve-bg`,viewBox:`0 0 ${he} ${_e}`,preserveAspectRatio:"none","aria-hidden":!0,children:r.jsx("path",{d:ve,fill:"none",stroke:A,strokeWidth:lt,strokeLinecap:"round",strokeLinejoin:"round"})}):null,Ke=r.jsx("div",{ref:We,className:`${o}-ribbon`,style:gt,"aria-hidden":!0}),Se=(Ae,$e,tt)=>r.jsx($g,{item:Ae,prefix:o,textCss:F,capHeightPx:Pe,opticalOffsetY:ge,imageGapPx:X(v),isCurve:x},`${$e}-${tt}`),De=r.jsx("span",{ref:me,"aria-hidden":!0,className:`${o}-cap-ref`,style:F,children:"H"}),Ve=`${Math.max(0,re)/1e3}s`,et=ne?r.jsx("div",{ref:K,className:`${o}-marquee-track`,"data-direction":u,onMouseEnter:Fe,onMouseLeave:le,style:{[`--${o}-distance`]:`${d}px`,WebkitAnimationDuration:Ve,animationDuration:Ve,WebkitAnimationPlayState:ie,animationPlayState:ie},children:Array.from({length:ee},(Ae,$e)=>r.jsx("div",{ref:$e===0?fe:void 0,className:`${o}-marquee-set`,style:{...rt,paddingRight:X(v)},"aria-hidden":$e>0,children:H.map((tt,Ze)=>Se(tt,$e,Ze))},`set-${$e}`))}):r.jsx("div",{ref:fe,className:mt(`${o}-marquee-set`,`${o}-marquee-static`),style:rt,children:t==null?void 0:t.map((Ae,$e)=>Se(Ae,0,$e))});return r.jsxs("div",{ref:P,className:`${o}-wrapper`,"aria-label":"Marquee text",children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Y}}),De,r.jsxs("div",{ref:te,className:`${o}-marquee-wrapper`,style:je,children:[Ke,ze,et]})]})},Tg=`import { useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
2608
+ `}const rg=30,Ur=3,ag=12,sg=3,La=.72,lg=100,cg=10,dg=e=>Math.max(0,e)/lg,ug=e=>Math.max(0,e)/cg,pg=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")},mg=(e,t)=>Array.from({length:t*e.length},(n,i)=>e[i%e.length]),Si={ctx:void 0},gg=()=>Si.ctx!==void 0?Si.ctx:typeof document>"u"?(Si.ctx=null,Si.ctx):(Si.ctx=document.createElement("canvas").getContext("2d"),Si.ctx),hg=(e,t,n,i)=>{e.style.transform=`translate3d(${t}px, ${n}px, 0) rotate(${i}deg)`},fg=e=>{e.style.transform=""},yg=e=>{if(!e||e==="none")return 0;try{return new DOMMatrixReadOnly(e).m41}catch{return 0}},vg=(e,t)=>{const n=(i,o)=>{if(!i||i===t)return o;const s=o+i.offsetLeft,l=i.offsetParent;return!l||l===i?s:n(l,s)};return n(e,e.offsetWidth/2)},xg=96,bg=(e,t,n)=>{if(t<=0||e<=0||n<2)return null;const i=2*Math.PI/t,o=new Float64Array(n+1),s=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,y=v+c;o[p+1]=y,s[p+1]=s[p]+(d(v)+d(y))*.5*c}),{wavelength:i,periodArc:s[n],x:o,s}},wg=(e,t)=>{if(e.periodArc<=0)return t;const n=t<0?-1:1,i=Math.abs(t),o=Math.floor(i/e.periodArc),s=i-o*e.periodArc,{s:l,x:d}=e,c=(g,h)=>{if(h-g<=1)return[g,h];const m=g+h>>1;return l[m]<=s?c(m,h):c(g,m)},[u,p]=c(0,l.length-1),v=l[p]-l[u],y=v>0?(s-l[u])/v:0;return n*(o*e.wavelength+d[u]+(d[p]-d[u])*y)},Sg=(e,t,n,i)=>{const o=Math.max(0,n),s=e>0?2*Math.PI*o/e:0,l=p=>i+t*Math.sin(s*p),d=p=>t*s*Math.cos(s*p),c=Math.max(4,Math.ceil(o*4)),u=Array.from({length:c},(p,v)=>{const y=v/c*e,g=(v+1)/c*e,h=g-y,m=l(y),b=l(g),I=y+h/3,R=m+d(y)*h/3,T=g-h/3,G=b-d(g)*h/3;return`C${I.toFixed(2)} ${R.toFixed(2)} ${T.toFixed(2)} ${G.toFixed(2)} ${g.toFixed(2)} ${b.toFixed(2)}`});return[`M0 ${l(0).toFixed(2)}`,...u].join(" ")},$g=({item:e,prefix:t,textCss:n,capHeightPx:i,opticalOffsetY:o,imageGapPx:s,isCurve:l})=>{var g;const d=o!==0?{...n,transform:`translateY(${o}px)`}:n,c=i>0?{height:`${i}px`}:{fontSize:n.fontSize,height:`${La}em`},u=((g=e.image)==null?void 0:g.url)&&r.jsx("img",{src:e.image.url,alt:e.image.name??"",className:`${t}-item-image`,style:c}),p=u&&(l?r.jsx("span",{className:`${t}-item-image-wrap`,"data-marquee-wave-node":!0,children:u}):u),v=l?r.jsx("span",{className:`${t}-text`,style:d,children:Array.from(e.text).map((h,m)=>r.jsx("span",{className:`${t}-glyph`,"data-marquee-wave-node":!0,children:r.jsx("span",{className:`${t}-glyph-inner`,children:h===" "?" ":h})},m))}):r.jsx("span",{className:`${t}-text`,style:d,children:e.text}),y=r.jsxs(r.Fragment,{children:[p,v]});return r.jsx("div",{className:`${t}-item`,"data-marquee-text-item":!0,style:{gap:s},children:e.link?r.jsx("a",{href:e.link,className:`${t}-item-link`,style:{gap:s},children:y}):y})},Cg=({settings:e,content:t,isEditor:n,isPreviewMode:i})=>{const{prefix:o}=C.useScopedStyles(),[s,l]=a.useState(0),d=s>0?Math.round(s):0,{speed:c,direction:u,pauseOnHover:p,gap:v,layoutType:y,curveAmplitude:g,curveFrequency:h,textFontFamily:m,textFontSettings:b,textFontSize:I,textLineHeight:R,textLetterSpacing:T,textWordSpacing:G,textTextAppearance:k,textColor:V,backgroundColor:A,ribbonWidth:L}=e,D=L??R,x=y==="curve",W=dg(g),M=ug(h),Y=a.useMemo(()=>og(o,d,x),[o,d,x]),F=a.useMemo(()=>Kt({fontSettings:{fontFamily:m,fontWeight:b.fontWeight,fontStyle:b.fontStyle},letterSpacing:T,wordSpacing:G,fontSize:I,lineHeight:R,textAppearance:k,color:V},n),[m,b,T,G,I,R,k,V,n]),X=Re=>C.scalingValue(Re,n??!1),j=((t==null?void 0:t.length)??0)>0,B=n?!!i:!0,ne=j&&(B||!!n),S=Math.max(0,c)*rg,E=B&&p==="on",[O,ae]=a.useState(!1),ie=B?E&&O?"paused":"running":"paused",$=ie==="running"&&S>0&&d>0,se=d>0&&S>0?d/S*1e3:0,P=a.useRef(null),te=a.useRef(null),K=a.useRef(null),he=a.useRef(null),We=a.useRef(null),pe=a.useRef(null),ce=a.useRef($),U=a.useRef(null),Q=a.useRef(null),Z=a.useRef(W),ke=a.useRef(M);ce.current=$,Z.current=W,ke.current=M;const[we,Ae]=a.useState(0),[ue,ge]=a.useState(0),[be,z]=a.useState(0),[oe,fe]=a.useState(0),[ye,Me]=a.useState(0),Se=a.useMemo(()=>(t??[]).map(Re=>{var Ie;return`${Re.text}\0${((Ie=Re.image)==null?void 0:Ie.url)??""}\0${Re.link??""}`}).join("\0"),[t]),[_,me]=a.useState(Ur),re=a.useMemo(()=>{const Re=t??[];return Re.length===0||!(B||n)?Re:mg(Re,_)},[t,B,_,n]),H=ne?sg:1;a.useLayoutEffect(()=>{me(Ur),l(0)},[Se]),a.useLayoutEffect(()=>{var Ze;const Re=pe.current;if(!Re)return;const Ie=()=>{const Ee=getComputedStyle(Re),Ge=parseFloat(Ee.fontSize)||0;if(Ge<=0)return;const Pe=gg();if(!Pe){Ae(Ge*La),ge(0);return}Pe.font=`${Ee.fontStyle} ${Ee.fontWeight} ${Ge}px ${Ee.fontFamily}`;const Je=Pe.measureText("H"),nt=Je.actualBoundingBoxAscent>0?Je.actualBoundingBoxAscent:Ge*La,et=Math.max(0,Je.actualBoundingBoxDescent||0),St=Je.fontBoundingBoxAscent||0,Wt=Je.fontBoundingBoxDescent||0;Ae(gt=>Math.abs(gt-nt)>.5?nt:gt);const At=St>0||Wt>0?(Wt-et-(St-nt))/2:0;ge(gt=>Math.abs(gt-At)>.25?At:gt)};Ie();const qe=typeof document<"u"?document.fonts:void 0;(Ze=qe==null?void 0:qe.ready)==null||Ze.then(Ie).catch(()=>{});const lt=new ResizeObserver(Ie);return lt.observe(Re),()=>lt.disconnect()},[F.fontFamily,F.fontWeight,F.fontStyle,F.fontSize,F.lineHeight]),a.useLayoutEffect(()=>{if(!ne)return;const Re=P.current,Ie=he.current;if(!Re||!Ie)return;const qe={id:0},lt=()=>{const Pe=Re.offsetWidth||Re.getBoundingClientRect().width,Je=Ie.offsetWidth||Ie.getBoundingClientRect().width;if(j&&Pe>0&&Je>0){const nt=Je/_;if(nt>0){const et=Math.min(ag,Math.max(Ur,Math.ceil(Pe/nt)+1));if(et!==_){me(et);return}}}Je>0&&l(Je)},Ze=()=>{cancelAnimationFrame(qe.id),qe.id=requestAnimationFrame(lt)};Ze();const Ee=new ResizeObserver(Ze);Ee.observe(Re),Ee.observe(Ie);const Ge=()=>{document.hidden||Ze()};return document.addEventListener("visibilitychange",Ge),window.addEventListener("pageshow",Ge),window.addEventListener("focus",Ge),()=>{cancelAnimationFrame(qe.id),Ee.disconnect(),document.removeEventListener("visibilitychange",Ge),window.removeEventListener("pageshow",Ge),window.removeEventListener("focus",Ge)}},[ne,Se,_,j,we]),a.useLayoutEffect(()=>{const Re=We.current;if(!Re)return;const Ie={id:0},qe=()=>{const Ze=Re.offsetHeight;Ze>0&&Me(Ee=>Math.abs(Ee-Ze)>.5?Ze:Ee)};Ie.id=requestAnimationFrame(qe);const lt=new ResizeObserver(()=>{cancelAnimationFrame(Ie.id),Ie.id=requestAnimationFrame(qe)});return lt.observe(Re),()=>{cancelAnimationFrame(Ie.id),lt.disconnect()}},[D,n]),a.useLayoutEffect(()=>{if(!x){z(0),fe(0);return}const Re=P.current,Ie=he.current;if(!Re||!Ie)return;const qe={id:0},lt=()=>{const Ee=Re.offsetWidth,Ge=Ie.offsetHeight;Ee>0&&fe(Pe=>Math.abs(Pe-Ee)>.5?Ee:Pe),Ge>0&&z(Pe=>Math.abs(Pe-Ge)>.5?Ge:Pe)};qe.id=requestAnimationFrame(lt);const Ze=new ResizeObserver(()=>{cancelAnimationFrame(qe.id),qe.id=requestAnimationFrame(lt)});return Ze.observe(Re),Ze.observe(Ie),()=>{cancelAnimationFrame(qe.id),Ze.disconnect()}},[x,Se,we,R,I,ne]),a.useLayoutEffect(()=>{if(!ne||d<=0)return;const Re=K.current;Re&&pg(Re)},[ne,d,u,S]),a.useLayoutEffect(()=>{if(!x||!j)return;const Re=P.current;if(!Re)return;const Ie={raf:0,cancelled:!1,lut:null,lutKey:"",itemsCache:[],cacheDirty:!0},qe=()=>{for(const nt of Ie.itemsCache)for(const et of nt.glyphs)fg(et.inner)},lt=()=>{const nt=te.current??Re;Ie.itemsCache=Array.from(Re.querySelectorAll("[data-marquee-text-item]"),et=>{const St=[];return et.querySelectorAll("[data-marquee-wave-node]").forEach(Wt=>{const At=Wt.firstElementChild;At&&St.push({inner:At,layoutLocalX:vg(Wt,nt)})}),{item:et,glyphs:St}}),Ie.cacheDirty=!1},Ze=()=>{Ie.cacheDirty&&lt();const et=(te.current??Re).offsetWidth||1,St=et*Z.current,Wt=ke.current,At=2*Math.PI*Wt/et,gt=`${et}|${St}|${At}`;gt!==Ie.lutKey&&(Ie.lutKey=gt,Ie.lut=bg(St,At,xg));const xt=K.current,zt=xt?yg(getComputedStyle(xt).transform):0,Ft=Re.getBoundingClientRect(),bt=Ft.left,_t=Ft.right,Gt=Ie.lut&&Ie.lut.wavelength>0?Math.max(0,(Ie.lut.periodArc/Ie.lut.wavelength-1)*et):0;for(const{item:Zt,glyphs:en}of Ie.itemsCache){const $t=Zt.getBoundingClientRect();if(!($t.right<bt||$t.left>_t+Gt))for(const Ht of en){const nn=Ht.layoutLocalX+zt,ct=Ie.lut?wg(Ie.lut,nn):nn,Te=At*ct,Ne=St*Math.sin(Te),it=St*At*Math.cos(Te),pt=Math.atan(it)*(180/Math.PI);hg(Ht.inner,ct-nn,Ne,pt)}}},Ee=()=>{Ie.cancelled||(Ie.raf=0,Ze(),ce.current&&!document.hidden&&(Ie.raf=requestAnimationFrame(Ee)))},Ge=()=>{Ie.cancelled||Ie.raf||(Ie.raf=requestAnimationFrame(Ee))},Pe=()=>{Ie.cacheDirty=!0,Ze(),Ge()};U.current=Ge,Q.current=Pe,Ze(),Ge();const Je=()=>{if(document.hidden){cancelAnimationFrame(Ie.raf),Ie.raf=0;return}cancelAnimationFrame(Ie.raf),Ie.raf=0,Pe()};return document.addEventListener("visibilitychange",Je),window.addEventListener("pageshow",Je),window.addEventListener("focus",Je),()=>{Ie.cancelled=!0,U.current=null,Q.current=null,cancelAnimationFrame(Ie.raf),document.removeEventListener("visibilitychange",Je),window.removeEventListener("pageshow",Je),window.removeEventListener("focus",Je),qe()}},[x,j]),a.useLayoutEffect(()=>{var Re;!x||!j||(Re=Q.current)==null||Re.call(Q)},[x,j,s,Se,_,we,W,M,oe]),a.useLayoutEffect(()=>{var Re;(Re=U.current)==null||Re.call(U)},[$,u]);const ee=()=>{E&&ae(!0)},Fe=()=>{E&&ae(!1)},le=x?W*100:0,N=X(D),Xe={minHeight:N,...x?{paddingTop:`${le}%`,paddingBottom:`${le}%`}:{}},je={height:N,...x?{visibility:"hidden"}:{backgroundColor:A}},ut={gap:X(v),minHeight:N},tt=oe*W,ft=ye>0?ye:be,st=Math.max(be,ft),Ue=x&&oe>0&&st>0?Sg(oe,tt,M,tt+st/2):"",ve=tt*2+st,_e=Ue?r.jsx("svg",{className:`${o}-curve-bg`,viewBox:`0 0 ${oe} ${ve}`,preserveAspectRatio:"none","aria-hidden":!0,children:r.jsx("path",{d:Ue,fill:"none",stroke:A,strokeWidth:ft,strokeLinecap:"round",strokeLinejoin:"round"})}):null,ze=r.jsx("div",{ref:We,className:`${o}-ribbon`,style:je,"aria-hidden":!0}),Ye=(Re,Ie,qe)=>r.jsx($g,{item:Re,prefix:o,textCss:F,capHeightPx:we,opticalOffsetY:ue,imageGapPx:X(v),isCurve:x},`${Ie}-${qe}`),Ce=r.jsx("span",{ref:pe,"aria-hidden":!0,className:`${o}-cap-ref`,style:F,children:"H"}),Oe=`${Math.max(0,se)/1e3}s`,Ve=ne?r.jsx("div",{ref:K,className:`${o}-marquee-track`,"data-direction":u,onMouseEnter:ee,onMouseLeave:Fe,style:{WebkitAnimationDuration:Oe,animationDuration:Oe,WebkitAnimationPlayState:ie,animationPlayState:ie},children:Array.from({length:H},(Re,Ie)=>r.jsx("div",{ref:Ie===0?he:void 0,className:`${o}-marquee-set`,style:{...ut,paddingRight:X(v)},"aria-hidden":Ie>0,children:re.map((qe,lt)=>Ye(qe,Ie,lt))},`set-${Ie}`))}):r.jsx("div",{ref:he,className:mt(`${o}-marquee-set`,`${o}-marquee-static`),style:ut,children:t==null?void 0:t.map((Re,Ie)=>Ye(Re,0,Ie))});return r.jsxs("div",{ref:P,className:`${o}-wrapper`,"aria-label":"Marquee text",children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Y}}),Ce,r.jsxs("div",{ref:te,className:`${o}-marquee-wrapper`,style:Xe,children:[ze,_e,Ve]})]})},Tg=`import { useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
2609
2609
  import cn from 'classnames';
2610
2610
  import { CommonComponentProps } from '../props';
2611
2611
  import { scalingValue } from '../utils/scalingValue';
2612
2612
  import { useScopedStyles } from '../utils/useScopedStyles';
2613
2613
  import { textStylesToCss } from '../utils/textStylesToCss';
2614
2614
 
2615
- function getCSS(P: string, isCurve: boolean): string {
2616
- const distance = \`calc(-1 * var(--\${P}-distance, 0px))\`;
2615
+ function getCSS(P: string, setWidthPx: number, isCurve: boolean): string {
2616
+ const distance = setWidthPx > 0 ? \`\${setWidthPx}px\` : '0px';
2617
2617
  const curveCss = isCurve ? \`
2618
2618
  .\${P}-item-image-wrap {
2619
2619
  display: flex;
@@ -2669,11 +2669,11 @@ function getCSS(P: string, isCurve: boolean): string {
2669
2669
 
2670
2670
  @keyframes \${P}-marquee-left {
2671
2671
  from { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
2672
- to { -webkit-transform: translate3d(\${distance}, 0, 0); transform: translate3d(\${distance}, 0, 0); }
2672
+ to { -webkit-transform: translate3d(-\${distance}, 0, 0); transform: translate3d(-\${distance}, 0, 0); }
2673
2673
  }
2674
2674
 
2675
2675
  @keyframes \${P}-marquee-right {
2676
- from { -webkit-transform: translate3d(\${distance}, 0, 0); transform: translate3d(\${distance}, 0, 0); }
2676
+ from { -webkit-transform: translate3d(-\${distance}, 0, 0); transform: translate3d(-\${distance}, 0, 0); }
2677
2677
  to { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
2678
2678
  }
2679
2679
 
@@ -2758,12 +2758,12 @@ const CURVE_FREQUENCY_SCALE = 10;
2758
2758
  const normalizeCurveAmplitude = (value: number): number => Math.max(0, value) / CURVE_AMPLITUDE_SCALE;
2759
2759
  const normalizeCurveFrequency = (value: number): number => Math.max(0, value) / CURVE_FREQUENCY_SCALE;
2760
2760
 
2761
- const syncTrackAnimationPhase = (track: HTMLElement, prevDurationMs: number, nextDurationMs: number) => {
2762
- const anim = track.getAnimations()[0];
2763
- if (!anim || prevDurationMs <= 0 || nextDurationMs <= 0) return;
2764
- const elapsedMs = Number(anim.currentTime ?? 0) || 0;
2765
- const progress = (elapsedMs % prevDurationMs) / prevDurationMs;
2766
- anim.currentTime = progress * nextDurationMs;
2761
+ const restartTrackAnimation = (track: HTMLElement) => {
2762
+ track.style.setProperty('animation-name', 'none');
2763
+ track.style.setProperty('-webkit-animation-name', 'none');
2764
+ void track.offsetHeight;
2765
+ track.style.removeProperty('animation-name');
2766
+ track.style.removeProperty('-webkit-animation-name');
2767
2767
  };
2768
2768
 
2769
2769
  const expandSetContent = (items: MarqueeTextItem[], repeat: number): MarqueeTextItem[] => (
@@ -2967,7 +2967,7 @@ export const MarqueeText = ({ settings, content, isEditor, isPreviewMode }: Marq
2967
2967
  const isCurveLayout = layoutType === 'curve';
2968
2968
  const amplitudeRatio = normalizeCurveAmplitude(curveAmplitude);
2969
2969
  const curvePeriods = normalizeCurveFrequency(curveFrequency);
2970
- const scopedCss = useMemo(() => getCSS(P, isCurveLayout), [P, isCurveLayout]);
2970
+ const scopedCss = useMemo(() => getCSS(P, animationDistance, isCurveLayout), [P, animationDistance, isCurveLayout]);
2971
2971
 
2972
2972
  const textCss = useMemo<CSSProperties>(() => textStylesToCss({
2973
2973
  fontSettings: {
@@ -3007,7 +3007,6 @@ export const MarqueeText = ({ settings, content, isEditor, isPreviewMode }: Marq
3007
3007
  const waveShouldLoopRef = useRef(waveShouldLoop);
3008
3008
  const waveKickRef = useRef<(() => void) | null>(null);
3009
3009
  const waveInvalidateRef = useRef<(() => void) | null>(null);
3010
- const prevDurationMsRef = useRef(0);
3011
3010
  const amplitudeRatioRef = useRef(amplitudeRatio);
3012
3011
  const curvePeriodsRef = useRef(curvePeriods);
3013
3012
  waveShouldLoopRef.current = waveShouldLoop;
@@ -3097,16 +3096,32 @@ export const MarqueeText = ({ settings, content, isEditor, isPreviewMode }: Marq
3097
3096
  }
3098
3097
  if (rawSetWidth > 0) setSetWidth(rawSetWidth);
3099
3098
  };
3100
- raf.id = requestAnimationFrame(measure);
3101
- const ro = new ResizeObserver(() => {
3099
+ const scheduleMeasure = () => {
3102
3100
  cancelAnimationFrame(raf.id);
3103
3101
  raf.id = requestAnimationFrame(measure);
3104
- });
3102
+ };
3103
+ scheduleMeasure();
3104
+ const ro = new ResizeObserver(scheduleMeasure);
3105
3105
  ro.observe(wrapper);
3106
3106
  ro.observe(set);
3107
+ // A rAF queued while the tab is hidden can go stale on mobile (background-tab
3108
+ // throttling may never fire it), leaving setWidth/animationDistance stuck at
3109
+ // whatever they were and the CSS scroll animation frozen. Force a fresh
3110
+ // measurement whenever visibility/focus returns instead of trusting that
3111
+ // queued frame to fire on its own.
3112
+ const onVisible = () => {
3113
+ if (document.hidden) return;
3114
+ scheduleMeasure();
3115
+ };
3116
+ document.addEventListener('visibilitychange', onVisible);
3117
+ window.addEventListener('pageshow', onVisible);
3118
+ window.addEventListener('focus', onVisible);
3107
3119
  return () => {
3108
3120
  cancelAnimationFrame(raf.id);
3109
3121
  ro.disconnect();
3122
+ document.removeEventListener('visibilitychange', onVisible);
3123
+ window.removeEventListener('pageshow', onVisible);
3124
+ window.removeEventListener('focus', onVisible);
3110
3125
  };
3111
3126
  }, [useMarqueeTrack, contentKey, contentSequenceRepeat, hasContent, capHeightPx]);
3112
3127
 
@@ -3163,9 +3178,8 @@ export const MarqueeText = ({ settings, content, isEditor, isPreviewMode }: Marq
3163
3178
  if (!useMarqueeTrack || animationDistance <= 0) return;
3164
3179
  const track = trackRef.current;
3165
3180
  if (!track) return;
3166
- syncTrackAnimationPhase(track, prevDurationMsRef.current, durationMs);
3167
- prevDurationMsRef.current = durationMs;
3168
- }, [useMarqueeTrack, animationDistance, direction, pxPerSec, durationMs]);
3181
+ restartTrackAnimation(track);
3182
+ }, [useMarqueeTrack, animationDistance, direction, pxPerSec]);
3169
3183
 
3170
3184
  useLayoutEffect(() => {
3171
3185
  if (!isCurveLayout || !hasContent) return;
@@ -3395,7 +3409,6 @@ export const MarqueeText = ({ settings, content, isEditor, isPreviewMode }: Marq
3395
3409
  onMouseEnter={onTrackEnter}
3396
3410
  onMouseLeave={onTrackLeave}
3397
3411
  style={{
3398
- [\`--\${P}-distance\`]: \`\${animationDistance}px\`,
3399
3412
  WebkitAnimationDuration: durationS,
3400
3413
  animationDuration: durationS,
3401
3414
  WebkitAnimationPlayState: playState,
@@ -3569,7 +3582,7 @@ type MarqueeTextProps = {
3569
3582
  pointer-events: auto;
3570
3583
  z-index: 10;
3571
3584
  }
3572
- `}const Mg=30,Ws=2,Pg=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=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=C.useScopedStyles(),{align:l,speed:d,direction:c,pauseOnHover:u,gap:p,cardWidth:v,corners:y,stroke:g,strokeColor:h,bgColor:m,padding:b,logoMarginTop:I,logoWidth:R,logoHeight:T,captionMarginTop:G}=e,k=!!o,V=((t==null?void 0:t.length)??0)>0,A=d>0&&(!n||i),L=V&&(A||n),D=Math.max(0,d)*Mg,x=_=>C.scalingValue(_,n??!1),W=a.useRef(null),M=a.useRef(null),Y=a.useRef(null),[F,X]=a.useState(0),[j,B]=a.useState(0),ne=j>0?j:0,S=a.useMemo(()=>Eg(s,ne),[s,ne]),[E,O]=a.useState(0),ae=A&&u==="on",[ie,$]=a.useState(!1),re=a.useRef(null),[P,te]=a.useState(0),[K,fe]=a.useState(0),We=a.useRef(null),me=_=>{var oe,H,ee,Fe,le;return{fontSettings:{fontFamily:(e==null?void 0:e[`${_}FontFamily`])??"Arial",fontWeight:((oe=e==null?void 0:e[`${_}FontSettings`])==null?void 0:oe.fontWeight)??400,fontStyle:((H=e==null?void 0:e[`${_}FontSettings`])==null?void 0:H.fontStyle)??"normal"},textAppearance:{textTransform:((ee=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:ee.textTransform)??"none",textDecoration:((Fe=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:Fe.textDecoration)??"none",fontVariant:((le=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:le.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${_}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${_}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${_}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${_}LineHeight`])??.01,color:(e==null?void 0:e[`${_}Color`])??"#000000"}},ce=me("text"),U=me("caption"),Q=a.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(_=>{var pe,oe;return(((pe=_.text)==null?void 0:pe.length)??0)>0||(((oe=_.caption)==null?void 0:oe.length)??0)>0}),[t]),Z=a.useMemo(()=>!L||(t==null?void 0:t.length)===0?1:j<=0||F<=0?Ws:Math.max(Ws,Math.ceil(F/j)+1),[L,t==null?void 0:t.length,j,F]);a.useLayoutEffect(()=>{if(!L)return;const _=W.current,pe=Y.current;if(!_||!pe)return;let oe=0;const H=()=>{const le=_.getBoundingClientRect().width,N=pe.getBoundingClientRect().width,Ue=We.current,je=typeof Ue=="number"&&Math.abs(Ue-N)<=.25;if(We.current=N,X(le),typeof N=="number"&&N>0&&j<=0){B(N);return}je&&N!==j?B(N):!je&&j<=0&&(cancelAnimationFrame(oe),oe=requestAnimationFrame(H))},ee=()=>{cancelAnimationFrame(oe),oe=requestAnimationFrame(H)};ee();const Fe=new ResizeObserver(ee);return Fe.observe(_),Fe.observe(pe),()=>{cancelAnimationFrame(oe),Fe.disconnect()}},[A,L,j]);const ke=ne>0&&D>0?ne/D*1e3:0,we=`${Math.max(0,ke)/1e3}s`;a.useLayoutEffect(()=>{if(!L||ne<=0)return;const _=M.current;_&&Pg(_)},[L,ne,c]),a.useLayoutEffect(()=>{if(!L){O(0);return}const _=Y.current,pe=M.current;if(!_||!pe)return;const oe=()=>{let ee=0;for(let Fe=0;Fe<_.children.length;Fe++){const N=_.children[Fe].firstElementChild;N&&(ee=Math.max(ee,N.offsetHeight))}ee<=0&&(ee=pe.offsetHeight),O(ee>0?ee:0)};oe();const H=new ResizeObserver(oe);return H.observe(_),H.observe(pe),()=>{H.disconnect()}},[L,Z,t,n,p,v,b,g,y,R,T,P,K]);const Pe=()=>{ae&&$(!0)},de=()=>{ae&&$(!1)},ge=a.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),be=a.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]),z=a.useCallback((_,pe,oe,H)=>r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:ge,width:"100%"},children:[r.jsx("div",{"data-controls":k?H==null?void 0:H.controlsName:void 0,"data-controls-axis":k?"y":void 0,className:k?`${s}-control`:void 0,style:{height:x((H==null?void 0:H.marginTop)??0)}}),r.jsx("div",{...H!=null&&H.dataMeasureKind?{"data-testimonial-measure":H.dataMeasureKind}:{},style:{...Kt(_,n),textAlign:be,pointerEvents:"auto",...typeof(H==null?void 0:H.minHeightPx)=="number"&&H.minHeightPx>0?{minHeight:H.minHeightPx}:{}},children:r.jsx(yi,{content:pe})})]},oe),[ge,be,n,k,s,x]),se=a.useCallback((_,pe,oe)=>{var H,ee,Fe;return r.jsxs("div",{style:{padding:`${x(b.top)} ${x(b.right)} ${x(b.bottom)} ${x(b.left)}`,width:x(v+g*2),height:"100%",borderRadius:x(y),border:`${x(g)} solid ${h}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[r.jsx("div",{className:`${s}-cover`,style:{background:m}}),r.jsxs("div",{className:`${s}-elements-overlay`,style:{alignItems:ge,textAlign:be},children:[_.text&&z(ce,_.text,"text",oe!=null&&oe.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(oe==null?void 0:oe.textMinHeightPx)=="number"&&oe.textMinHeightPx>0?{minHeightPx:oe.textMinHeightPx}:void 0),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:ge,width:"100%"},children:[r.jsx("div",{"data-controls":k&&!(oe!=null&&oe.dataMeasureAttrs)?"logoMarginTop":void 0,className:k&&!(oe!=null&&oe.dataMeasureAttrs)?`${s}-control`:void 0,style:{height:x(I)}}),r.jsx("div",{style:{width:x(R),height:x(T)},children:((H=_.logo)==null?void 0:H.url)&&r.jsx("img",{src:_.logo.url,alt:((ee=_.logo)==null?void 0:ee.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Fe=_.logo)==null?void 0:Fe.objectFit)||"contain"}})})]}),_.caption&&z(U,_.caption,"caption",{...oe!=null&&oe.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:G,...oe!=null&&oe.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(oe==null?void 0:oe.captionMinHeightPx)=="number"&&oe.captionMinHeightPx>0?{minHeightPx:oe.captionMinHeightPx}:{}})]})]},pe)},[m,G,U,v,y,T,I,R,ge,be,b.bottom,b.left,b.right,b.top,z,g,h,ce,n,k,s]),he=a.useCallback(_=>{te(_.maxTextPx),fe(_.maxCaptionPx)},[]);a.useLayoutEffect(()=>{if(!Q){he({maxTextPx:0,maxCaptionPx:0});return}const _=re.current;if(!_)return;const pe=()=>{C.readTestimonialTextMeasure(_,he)};pe();const oe=new ResizeObserver(pe);return oe.observe(_),()=>{oe.disconnect()}},[Q,he,t,se]);const ye=Q?{textMinHeightPx:P,captionMinHeightPx:K}:void 0,Me=Q?r.jsx("div",{ref:re,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((_,pe)=>se(_,`measure-${pe}`,{dataMeasureAttrs:!0}))}):null,Le=(_,pe)=>r.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[se(_,`card-${pe}`,ye),k&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${x(p)})`,width:x(p),height:"100%",pointerEvents:"auto",zIndex:2}})]},pe);if(L){const _=A?ae&&ie?"paused":"running":"paused";return r.jsxs("div",{ref:W,className:mt(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...E>0?{height:E}:{}},children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:S}}),Me,r.jsx("div",{ref:M,className:`${s}-marquee-track`,"data-direction":c,onMouseEnter:Pe,onMouseLeave:de,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:we,WebkitAnimationDuration:we,animationPlayState:_,WebkitAnimationPlayState:_},children:Array.from({length:Z},(pe,oe)=>r.jsx("div",{ref:oe===0?Y:void 0,className:`${s}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:x(p),paddingRight:x(p)},"aria-hidden":oe>0,children:t==null?void 0:t.map((H,ee)=>Le(H,`${oe}-${ee}`))},`set-${oe}`))})]})}return r.jsxs("div",{className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:S}}),Me,r.jsx("div",{style:{gap:x(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((_,pe)=>Le(_,pe))})]})},Ag=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
3585
+ `}const Mg=30,Ws=2,Pg=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=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=C.useScopedStyles(),{align:l,speed:d,direction:c,pauseOnHover:u,gap:p,cardWidth:v,corners:y,stroke:g,strokeColor:h,bgColor:m,padding:b,logoMarginTop:I,logoWidth:R,logoHeight:T,captionMarginTop:G}=e,k=!!o,V=((t==null?void 0:t.length)??0)>0,A=d>0&&(!n||i),L=V&&(A||n),D=Math.max(0,d)*Mg,x=_=>C.scalingValue(_,n??!1),W=a.useRef(null),M=a.useRef(null),Y=a.useRef(null),[F,X]=a.useState(0),[j,B]=a.useState(0),ne=j>0?j:0,S=a.useMemo(()=>Eg(s,ne),[s,ne]),[E,O]=a.useState(0),ae=A&&u==="on",[ie,$]=a.useState(!1),se=a.useRef(null),[P,te]=a.useState(0),[K,he]=a.useState(0),We=a.useRef(null),pe=_=>{var re,H,ee,Fe,le;return{fontSettings:{fontFamily:(e==null?void 0:e[`${_}FontFamily`])??"Arial",fontWeight:((re=e==null?void 0:e[`${_}FontSettings`])==null?void 0:re.fontWeight)??400,fontStyle:((H=e==null?void 0:e[`${_}FontSettings`])==null?void 0:H.fontStyle)??"normal"},textAppearance:{textTransform:((ee=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:ee.textTransform)??"none",textDecoration:((Fe=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:Fe.textDecoration)??"none",fontVariant:((le=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:le.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${_}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${_}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${_}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${_}LineHeight`])??.01,color:(e==null?void 0:e[`${_}Color`])??"#000000"}},ce=pe("text"),U=pe("caption"),Q=a.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(_=>{var me,re;return(((me=_.text)==null?void 0:me.length)??0)>0||(((re=_.caption)==null?void 0:re.length)??0)>0}),[t]),Z=a.useMemo(()=>!L||(t==null?void 0:t.length)===0?1:j<=0||F<=0?Ws:Math.max(Ws,Math.ceil(F/j)+1),[L,t==null?void 0:t.length,j,F]);a.useLayoutEffect(()=>{if(!L)return;const _=W.current,me=Y.current;if(!_||!me)return;let re=0;const H=()=>{const le=_.getBoundingClientRect().width,N=me.getBoundingClientRect().width,Xe=We.current,je=typeof Xe=="number"&&Math.abs(Xe-N)<=.25;if(We.current=N,X(le),typeof N=="number"&&N>0&&j<=0){B(N);return}je&&N!==j?B(N):!je&&j<=0&&(cancelAnimationFrame(re),re=requestAnimationFrame(H))},ee=()=>{cancelAnimationFrame(re),re=requestAnimationFrame(H)};ee();const Fe=new ResizeObserver(ee);return Fe.observe(_),Fe.observe(me),()=>{cancelAnimationFrame(re),Fe.disconnect()}},[A,L,j]);const ke=ne>0&&D>0?ne/D*1e3:0,we=`${Math.max(0,ke)/1e3}s`;a.useLayoutEffect(()=>{if(!L||ne<=0)return;const _=M.current;_&&Pg(_)},[L,ne,c]),a.useLayoutEffect(()=>{if(!L){O(0);return}const _=Y.current,me=M.current;if(!_||!me)return;const re=()=>{let ee=0;for(let Fe=0;Fe<_.children.length;Fe++){const N=_.children[Fe].firstElementChild;N&&(ee=Math.max(ee,N.offsetHeight))}ee<=0&&(ee=me.offsetHeight),O(ee>0?ee:0)};re();const H=new ResizeObserver(re);return H.observe(_),H.observe(me),()=>{H.disconnect()}},[L,Z,t,n,p,v,b,g,y,R,T,P,K]);const Ae=()=>{ae&&$(!0)},ue=()=>{ae&&$(!1)},ge=a.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),be=a.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]),z=a.useCallback((_,me,re,H)=>r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:ge,width:"100%"},children:[r.jsx("div",{"data-controls":k?H==null?void 0:H.controlsName:void 0,"data-controls-axis":k?"y":void 0,className:k?`${s}-control`:void 0,style:{height:x((H==null?void 0:H.marginTop)??0)}}),r.jsx("div",{...H!=null&&H.dataMeasureKind?{"data-testimonial-measure":H.dataMeasureKind}:{},style:{...Kt(_,n),textAlign:be,pointerEvents:"auto",...typeof(H==null?void 0:H.minHeightPx)=="number"&&H.minHeightPx>0?{minHeight:H.minHeightPx}:{}},children:r.jsx(yi,{content:me})})]},re),[ge,be,n,k,s,x]),oe=a.useCallback((_,me,re)=>{var H,ee,Fe;return r.jsxs("div",{style:{padding:`${x(b.top)} ${x(b.right)} ${x(b.bottom)} ${x(b.left)}`,width:x(v+g*2),height:"100%",borderRadius:x(y),border:`${x(g)} solid ${h}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[r.jsx("div",{className:`${s}-cover`,style:{background:m}}),r.jsxs("div",{className:`${s}-elements-overlay`,style:{alignItems:ge,textAlign:be},children:[_.text&&z(ce,_.text,"text",re!=null&&re.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(re==null?void 0:re.textMinHeightPx)=="number"&&re.textMinHeightPx>0?{minHeightPx:re.textMinHeightPx}:void 0),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:ge,width:"100%"},children:[r.jsx("div",{"data-controls":k&&!(re!=null&&re.dataMeasureAttrs)?"logoMarginTop":void 0,className:k&&!(re!=null&&re.dataMeasureAttrs)?`${s}-control`:void 0,style:{height:x(I)}}),r.jsx("div",{style:{width:x(R),height:x(T)},children:((H=_.logo)==null?void 0:H.url)&&r.jsx("img",{src:_.logo.url,alt:((ee=_.logo)==null?void 0:ee.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Fe=_.logo)==null?void 0:Fe.objectFit)||"contain"}})})]}),_.caption&&z(U,_.caption,"caption",{...re!=null&&re.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:G,...re!=null&&re.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(re==null?void 0:re.captionMinHeightPx)=="number"&&re.captionMinHeightPx>0?{minHeightPx:re.captionMinHeightPx}:{}})]})]},me)},[m,G,U,v,y,T,I,R,ge,be,b.bottom,b.left,b.right,b.top,z,g,h,ce,n,k,s]),fe=a.useCallback(_=>{te(_.maxTextPx),he(_.maxCaptionPx)},[]);a.useLayoutEffect(()=>{if(!Q){fe({maxTextPx:0,maxCaptionPx:0});return}const _=se.current;if(!_)return;const me=()=>{C.readTestimonialTextMeasure(_,fe)};me();const re=new ResizeObserver(me);return re.observe(_),()=>{re.disconnect()}},[Q,fe,t,oe]);const ye=Q?{textMinHeightPx:P,captionMinHeightPx:K}:void 0,Me=Q?r.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((_,me)=>oe(_,`measure-${me}`,{dataMeasureAttrs:!0}))}):null,Se=(_,me)=>r.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[oe(_,`card-${me}`,ye),k&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${x(p)})`,width:x(p),height:"100%",pointerEvents:"auto",zIndex:2}})]},me);if(L){const _=A?ae&&ie?"paused":"running":"paused";return r.jsxs("div",{ref:W,className:mt(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...E>0?{height:E}:{}},children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:S}}),Me,r.jsx("div",{ref:M,className:`${s}-marquee-track`,"data-direction":c,onMouseEnter:Ae,onMouseLeave:ue,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:we,WebkitAnimationDuration:we,animationPlayState:_,WebkitAnimationPlayState:_},children:Array.from({length:Z},(me,re)=>r.jsx("div",{ref:re===0?Y:void 0,className:`${s}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:x(p),paddingRight:x(p)},"aria-hidden":re>0,children:t==null?void 0:t.map((H,ee)=>Se(H,`${re}-${ee}`))},`set-${re}`))})]})}return r.jsxs("div",{className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:S}}),Me,r.jsx("div",{style:{gap:x(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((_,me)=>Se(_,me))})]})},Ag=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
3573
3586
  import cn from 'classnames';
3574
3587
  import { CommonComponentProps } from '../props';
3575
3588
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -4324,7 +4337,7 @@ type TestimonialsSettings = {
4324
4337
  width: 100%;
4325
4338
  height: 100%;
4326
4339
  }
4327
- `}const Hg=3e3,Ng=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=C.useScopedStyles(),l=t||[],{speed:d,align:c,width:u,imageMarginTop:p,textMarginTop:v,captionMarginTop:y,imageWidth:g,imageHeight:h,controlsWidth:m,controlsColor:b,controlsHoverColor:I}=e,R=d>0&&(!n||!!i),[T,G]=a.useState(0),[k,V]=a.useState(null),[A,L]=a.useState(!1),D=a.useRef(null),x=a.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),W=a.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);a.useEffect(()=>{G(0),V(null),L(!1)},[l.length]);const M=l[T],Y=k===null?null:l[k],F=me=>{var U,Q,Z,ke,we;return{fontSettings:{fontFamily:(e==null?void 0:e[`${me}FontFamily`])??"Arial",fontWeight:((U=e==null?void 0:e[`${me}FontSettings`])==null?void 0:U.fontWeight)??400,fontStyle:((Q=e==null?void 0:e[`${me}FontSettings`])==null?void 0:Q.fontStyle)??"normal"},textAppearance:{textTransform:((Z=e==null?void 0:e[`${me}TextAppearance`])==null?void 0:Z.textTransform)??"none",textDecoration:((ke=e==null?void 0:e[`${me}TextAppearance`])==null?void 0:ke.textDecoration)??"none",fontVariant:((we=e==null?void 0:e[`${me}TextAppearance`])==null?void 0:we.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${me}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${me}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${me}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${me}WordSpacing`])??0,color:(e==null?void 0:e[`${me}Color`])??"#000000"}},X=F("text"),j=F("caption"),B=l.length>1&&l.some(me=>{var ce,U;return(((ce=me.text)==null?void 0:ce.length)??0)>0||(((U=me.caption)==null?void 0:U.length)??0)>0}),ne=a.useRef(null),[S,E]=a.useState(0),[O,ae]=a.useState(0),ie=e.controls??{mode:"Off",icon:null},$=l.length>1,re=a.useCallback((me,ce)=>!$||ce===me?me:(D.current&&window.clearTimeout(D.current),V(me),L(!0),D.current=window.setTimeout(()=>{V(null),L(!1),D.current=null},300),ce),[$]),P=a.useCallback(()=>{$&&G(me=>re(me,(me-1+l.length)%l.length))},[$,re,l.length]),te=a.useCallback(()=>{$&&G(me=>re(me,(me+1)%l.length))},[$,re,l.length]);a.useEffect(()=>{if(!R||!$)return;const me=Math.max(300,Hg/d),ce=window.setInterval(()=>{G(U=>re(U,(U+1)%l.length))},me);return()=>{window.clearInterval(ce)}},[R,$,re,l.length,d]),a.useEffect(()=>()=>{D.current&&window.clearTimeout(D.current)},[]);const K=(me,ce)=>{var we,Pe,de,ge;const U=ce==null?void 0:ce.textMinHeightPx,Q=ce==null?void 0:ce.captionMinHeightPx,Z=ce==null?void 0:ce.dataMeasureAttrs,ke=o&&!(ce!=null&&ce.dataMeasureAttrs)&&!(ce!=null&&ce.hideControls);return r.jsxs(r.Fragment,{children:[me.text&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:x,width:"100%"},children:[r.jsx("div",{"data-controls":ke?"textMarginTop":void 0,className:ke?`${s}-control`:void 0,style:{height:C.scalingValue(v??0,n??!1)}}),r.jsx("div",{...Z&&{"data-testimonial-measure":"text"},style:{...Kt(X,n),...U&&U>0?{minHeight:U}:{},textAlign:W,pointerEvents:"auto"},children:r.jsx(yi,{content:me.text})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:x,width:"100%"},children:[r.jsx("div",{"data-controls":ke?"imageMarginTop":void 0,className:ke?`${s}-control`:void 0,style:{height:C.scalingValue(p??0,n??!1)}}),r.jsx("div",{style:{width:C.scalingValue(g??0,n??!1),height:C.scalingValue(h??0,n??!1)},children:((we=me.image)==null?void 0:we.url)&&r.jsx("img",{src:(Pe=me.image)==null?void 0:Pe.url,alt:((de=me.image)==null?void 0:de.name)??"",className:`${s}-icon`,style:{objectFit:((ge=me.image)==null?void 0:ge.objectFit)||"contain"}})})]}),me.caption&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:x,width:"100%"},children:[r.jsx("div",{"data-controls":ke?"captionMarginTop":void 0,className:ke?`${s}-control`:void 0,style:{height:C.scalingValue(y??0,n??!1)}}),r.jsx("div",{...Z?{"data-testimonial-measure":"caption"}:{},style:{...Kt(j,n),...Q&&Q>0?{minHeight:Q}:{},textAlign:W,pointerEvents:"auto"},children:r.jsx(yi,{content:me.caption})})]})]})},fe=a.useCallback(me=>{E(me.maxTextPx),ae(me.maxCaptionPx)},[]);if(a.useLayoutEffect(()=>{if(!B){fe({maxTextPx:0,maxCaptionPx:0});return}const me=ne.current;if(!me)return;const ce=()=>{C.readTestimonialTextMeasure(me,fe)};ce();const U=new ResizeObserver(ce);return U.observe(me),()=>{U.disconnect()}},[B,fe,t]),!M)return r.jsx(r.Fragment,{});const We=B?{textMinHeightPx:S,captionMinHeightPx:O}:void 0;return r.jsx(r.Fragment,{children:r.jsxs("div",{className:`${s}-container`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:_g(s)}}),r.jsxs("div",{className:`${s}-wrapper`,style:{width:C.scalingValue(u??0,n??!1),alignItems:x},children:[B&&r.jsx("div",{ref:ne,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((me,ce)=>r.jsx("div",{style:{width:"100%"},children:K(me,{dataMeasureAttrs:!0})},ce))}),r.jsxs("div",{className:`${s}-fade-stack`,children:[Y&&A&&r.jsx("div",{className:mt(`${s}-fade-item-prev`,`${s}-fade-out`),children:K(Y,{...We,hideControls:!0})}),r.jsx("div",{className:mt(`${s}-fade-item-current`,A?`${s}-fade-in`:void 0),children:K(M,We)})]})]}),ie.mode==="On"&&r.jsxs("div",{className:`${s}-controls`,children:[r.jsx("div",{className:`${s}-arrow`,style:{width:C.scalingValue(m??.02,n??!1),height:C.scalingValue(m??.02,n??!1),"--arrow-hover-color":I},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:P,disabled:!$,"aria-label":"Previous testimonial",children:ie.icon&&r.jsx(an,{url:ie.icon,fill:b,hoverFill:I,className:mt(`${s}-arrow-img`,`${s}-mirror`)})})}),r.jsx("div",{className:mt(`${s}-arrow`,`${s}-next-arrow`),style:{width:C.scalingValue(m??.02,n??!1),height:C.scalingValue(m??.02,n??!1),"--arrow-hover-color":I},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:te,disabled:!$,"aria-label":"Next testimonial",children:ie.icon&&r.jsx(an,{url:ie.icon,fill:b,hoverFill:I,className:`${s}-arrow-img`})})})]})]})})},Og=`import cn from 'classnames';
4340
+ `}const Hg=3e3,Ng=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=C.useScopedStyles(),l=t||[],{speed:d,align:c,width:u,imageMarginTop:p,textMarginTop:v,captionMarginTop:y,imageWidth:g,imageHeight:h,controlsWidth:m,controlsColor:b,controlsHoverColor:I}=e,R=d>0&&(!n||!!i),[T,G]=a.useState(0),[k,V]=a.useState(null),[A,L]=a.useState(!1),D=a.useRef(null),x=a.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),W=a.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);a.useEffect(()=>{G(0),V(null),L(!1)},[l.length]);const M=l[T],Y=k===null?null:l[k],F=pe=>{var U,Q,Z,ke,we;return{fontSettings:{fontFamily:(e==null?void 0:e[`${pe}FontFamily`])??"Arial",fontWeight:((U=e==null?void 0:e[`${pe}FontSettings`])==null?void 0:U.fontWeight)??400,fontStyle:((Q=e==null?void 0:e[`${pe}FontSettings`])==null?void 0:Q.fontStyle)??"normal"},textAppearance:{textTransform:((Z=e==null?void 0:e[`${pe}TextAppearance`])==null?void 0:Z.textTransform)??"none",textDecoration:((ke=e==null?void 0:e[`${pe}TextAppearance`])==null?void 0:ke.textDecoration)??"none",fontVariant:((we=e==null?void 0:e[`${pe}TextAppearance`])==null?void 0:we.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${pe}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${pe}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${pe}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${pe}WordSpacing`])??0,color:(e==null?void 0:e[`${pe}Color`])??"#000000"}},X=F("text"),j=F("caption"),B=l.length>1&&l.some(pe=>{var ce,U;return(((ce=pe.text)==null?void 0:ce.length)??0)>0||(((U=pe.caption)==null?void 0:U.length)??0)>0}),ne=a.useRef(null),[S,E]=a.useState(0),[O,ae]=a.useState(0),ie=e.controls??{mode:"Off",icon:null},$=l.length>1,se=a.useCallback((pe,ce)=>!$||ce===pe?pe:(D.current&&window.clearTimeout(D.current),V(pe),L(!0),D.current=window.setTimeout(()=>{V(null),L(!1),D.current=null},300),ce),[$]),P=a.useCallback(()=>{$&&G(pe=>se(pe,(pe-1+l.length)%l.length))},[$,se,l.length]),te=a.useCallback(()=>{$&&G(pe=>se(pe,(pe+1)%l.length))},[$,se,l.length]);a.useEffect(()=>{if(!R||!$)return;const pe=Math.max(300,Hg/d),ce=window.setInterval(()=>{G(U=>se(U,(U+1)%l.length))},pe);return()=>{window.clearInterval(ce)}},[R,$,se,l.length,d]),a.useEffect(()=>()=>{D.current&&window.clearTimeout(D.current)},[]);const K=(pe,ce)=>{var we,Ae,ue,ge;const U=ce==null?void 0:ce.textMinHeightPx,Q=ce==null?void 0:ce.captionMinHeightPx,Z=ce==null?void 0:ce.dataMeasureAttrs,ke=o&&!(ce!=null&&ce.dataMeasureAttrs)&&!(ce!=null&&ce.hideControls);return r.jsxs(r.Fragment,{children:[pe.text&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:x,width:"100%"},children:[r.jsx("div",{"data-controls":ke?"textMarginTop":void 0,className:ke?`${s}-control`:void 0,style:{height:C.scalingValue(v??0,n??!1)}}),r.jsx("div",{...Z&&{"data-testimonial-measure":"text"},style:{...Kt(X,n),...U&&U>0?{minHeight:U}:{},textAlign:W,pointerEvents:"auto"},children:r.jsx(yi,{content:pe.text})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:x,width:"100%"},children:[r.jsx("div",{"data-controls":ke?"imageMarginTop":void 0,className:ke?`${s}-control`:void 0,style:{height:C.scalingValue(p??0,n??!1)}}),r.jsx("div",{style:{width:C.scalingValue(g??0,n??!1),height:C.scalingValue(h??0,n??!1)},children:((we=pe.image)==null?void 0:we.url)&&r.jsx("img",{src:(Ae=pe.image)==null?void 0:Ae.url,alt:((ue=pe.image)==null?void 0:ue.name)??"",className:`${s}-icon`,style:{objectFit:((ge=pe.image)==null?void 0:ge.objectFit)||"contain"}})})]}),pe.caption&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:x,width:"100%"},children:[r.jsx("div",{"data-controls":ke?"captionMarginTop":void 0,className:ke?`${s}-control`:void 0,style:{height:C.scalingValue(y??0,n??!1)}}),r.jsx("div",{...Z?{"data-testimonial-measure":"caption"}:{},style:{...Kt(j,n),...Q&&Q>0?{minHeight:Q}:{},textAlign:W,pointerEvents:"auto"},children:r.jsx(yi,{content:pe.caption})})]})]})},he=a.useCallback(pe=>{E(pe.maxTextPx),ae(pe.maxCaptionPx)},[]);if(a.useLayoutEffect(()=>{if(!B){he({maxTextPx:0,maxCaptionPx:0});return}const pe=ne.current;if(!pe)return;const ce=()=>{C.readTestimonialTextMeasure(pe,he)};ce();const U=new ResizeObserver(ce);return U.observe(pe),()=>{U.disconnect()}},[B,he,t]),!M)return r.jsx(r.Fragment,{});const We=B?{textMinHeightPx:S,captionMinHeightPx:O}:void 0;return r.jsx(r.Fragment,{children:r.jsxs("div",{className:`${s}-container`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:_g(s)}}),r.jsxs("div",{className:`${s}-wrapper`,style:{width:C.scalingValue(u??0,n??!1),alignItems:x},children:[B&&r.jsx("div",{ref:ne,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((pe,ce)=>r.jsx("div",{style:{width:"100%"},children:K(pe,{dataMeasureAttrs:!0})},ce))}),r.jsxs("div",{className:`${s}-fade-stack`,children:[Y&&A&&r.jsx("div",{className:mt(`${s}-fade-item-prev`,`${s}-fade-out`),children:K(Y,{...We,hideControls:!0})}),r.jsx("div",{className:mt(`${s}-fade-item-current`,A?`${s}-fade-in`:void 0),children:K(M,We)})]})]}),ie.mode==="On"&&r.jsxs("div",{className:`${s}-controls`,children:[r.jsx("div",{className:`${s}-arrow`,style:{width:C.scalingValue(m??.02,n??!1),height:C.scalingValue(m??.02,n??!1),"--arrow-hover-color":I},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:P,disabled:!$,"aria-label":"Previous testimonial",children:ie.icon&&r.jsx(an,{url:ie.icon,fill:b,hoverFill:I,className:mt(`${s}-arrow-img`,`${s}-mirror`)})})}),r.jsx("div",{className:mt(`${s}-arrow`,`${s}-next-arrow`),style:{width:C.scalingValue(m??.02,n??!1),height:C.scalingValue(m??.02,n??!1),"--arrow-hover-color":I},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:te,disabled:!$,"aria-label":"Next testimonial",children:ie.icon&&r.jsx(an,{url:ie.icon,fill:b,hoverFill:I,className:`${s}-arrow-img`})})})]})]})})},Og=`import cn from 'classnames';
4328
4341
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
4329
4342
  import { CommonComponentProps } from '../props';
4330
4343
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -5167,7 +5180,7 @@ type TestimonialsSettings = {
5167
5180
  z-index: 2;
5168
5181
  width: 100%;
5169
5182
  }
5170
- `}function Gg(){return Math.random()<.5?"ltr":"ttb"}function qg(e){const t=e.Components.Autoplay;t&&(t.pause(!1),t.play())}function Ug(e){const t=Gg();e.options.direction!==t&&(e.options={...e.options,direction:t}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{qg(e)})})}const vn=500,Xg=750,Hn="cubic-bezier(0.22, 1, 0.36, 1)",Kg=72,Yg=50;function Zg(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 Jg(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Qg(e){const[t]=e.media;return t!=null&&t.url?t:null}function Cc(e){return!Array.isArray(e)||e.length===0?[]:Zg(e)?e.flatMap(t=>{const n=Jg(t);if(!n)return[];const i=Qg(t);return[{displayMedia:n,lightboxMedia:i!=null&&i.url?i:null}]}):e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function gi(e){return e.type==="video"}function eh(e){const t=new Set,n=[];for(const i of e){const o=Cc(i.gallery);for(const s of o){const l=s.lightboxMedia;l!=null&&l.url&&!t.has(l.url)&&(t.add(l.url),n.push(l))}}return n}function th({mediaList:e}){return e.length===0?null:r.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>gi(t)?r.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):r.jsx("img",{src:t.url,alt:""},t.url))})}function nh(e){e.pause(),e.removeAttribute("src"),e.load()}function Os({media:e,className:t,style:n,onMediaClick:i}){return gi(e)?r.jsx("video",{src:e.url,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):r.jsx("img",{src:e.url,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function Ds(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function ih(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 s=e.width/n;return{width:e.width,height:s,left:e.left,top:e.top+(e.height-s)/2}}const o=e.height*n;return{width:o,height:e.height,left:e.left+(e.width-o)/2,top:e.top}}function oh({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:s,onMouseMove:l}){return a.useEffect(()=>{const d=n.current;if(d)return()=>{nh(d)}},[e,n]),r.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:s,onMouseMove:l,style:i})}function rh({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:s,onPrev:l,onNext:d,counterClassName:c,counterStyle:u}){const p=i==="cover",v=a.useRef(null),y=a.useRef(null),g=a.useRef(null),h=a.useRef(null),m=a.useRef(0),b=a.useRef(0),I=a.useRef("none"),R=a.useRef(!1),T=a.useRef(!1),G=a.useRef(null),k=a.useRef(0),V=a.useRef(null),A=a.useRef(!1),L=a.useRef(null),D=a.useRef(null),x=a.useRef(null),W=a.useRef(()=>{}),[M,Y]=a.useState(null),[F,X]=a.useState(null),[j,B]=a.useState("opening"),[ne,S]=a.useState(0),[E,O]=a.useState(0),[ae,ie]=a.useState(null),[$,re]=a.useState(!1),[P,te]=a.useState(!1),[K,fe]=a.useState(!1),[We,me]=a.useState(null),ce=a.useRef(n),U=a.useRef(void 0),Q=t[n],Z=Q?gi(Q):!1,ke=E!==0||$,we=ae!==null,Pe=a.useCallback(Se=>{const De=Se.currentTarget,Ve=De instanceof HTMLVideoElement?{width:De.videoWidth,height:De.videoHeight}:{width:De.naturalWidth,height:De.naturalHeight};!Ve.width||!Ve.height||me(Ve)},[]);a.useEffect(()=>{G.current=F},[F]),a.useEffect(()=>{const Se=v.current;if(!Se)return;const De=()=>X(Ds(Se));De();const Ve=new ResizeObserver(De);return Ve.observe(Se),()=>Ve.disconnect()},[]);const de=a.useCallback(()=>{L.current!==null&&(window.clearTimeout(L.current),L.current=null)},[]),ge=a.useCallback(()=>{const Se=D.current;D.current=null,de(),V.current=null,A.current=!1,ie(null),re(!1),O(0),k.current=0,te(!1),R.current=!1,b.current=0,I.current="none",Se===1?d():Se===-1&&l()},[de,d,l]),be=a.useCallback(()=>{de(),D.current=null,V.current=null,A.current=!1,ie(null),re(!1),O(0),k.current=0},[de]),z=a.useCallback(()=>{de(),L.current=window.setTimeout(()=>{D.current!==null&&ge()},vn+32)},[de,ge]),se=a.useCallback((Se,De)=>{var et;const Ve=((et=G.current)==null?void 0:et.width)??0;if(de(),V.current=Se,ie(Se),A.current=!0,re(!0),De){D.current=Se;const Ae=-Se*Ve;k.current=Ae,O(Ae),z();return}k.current=0,O(0),L.current=window.setTimeout(()=>{L.current=null,be()},vn+32)},[de,be,z]),he=a.useCallback(Se=>{if(!(t.length<=1)){if(A.current){if(D.current===Se){x.current=Se,ge();return}be()}de(),V.current=Se,ie(Se),A.current=!1,re(!1),k.current=0,O(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{se(Se,!0)})})}},[t.length,se,ge,be,de]);W.current=he;const ye=a.useCallback(Se=>{Se.propertyName!=="transform"||!A.current||D.current!==null&&ge()},[ge]),Me=a.useCallback(()=>{const Se=y.current;if(!Se)return;const De=Ds(Se);!De.width||!De.height||Y(De)},[]);a.useEffect(()=>{Me();const Se=y.current;if(!Se)return;const De=new ResizeObserver(()=>Me());return De.observe(Se),()=>De.disconnect()},[Me]),a.useEffect(()=>{j==="opening"&&M&&B("open")},[j,M]),a.useEffect(()=>{if(j!=="closing")return;const Se=setTimeout(()=>s(),vn);return()=>clearTimeout(Se)},[j,s]),a.useEffect(()=>()=>{de()},[de]),a.useLayoutEffect(()=>{ce.current===n&&U.current===(Q==null?void 0:Q.url)||(de(),D.current=null,ie(null),S(0),O(0),re(!1),fe(!1),te(!1),me(null),m.current=0,b.current=0,I.current="none",R.current=!1,A.current=!1,k.current=0,V.current=null,h.current=null,T.current=!1,ce.current=n,U.current=Q==null?void 0:Q.url)},[n,Q==null?void 0:Q.url,de]),a.useLayoutEffect(()=>{const Se=x.current;Se!==null&&(x.current=null,requestAnimationFrame(()=>{W.current(Se)}))},[n,Q==null?void 0:Q.url]),a.useEffect(()=>{if(j!=="open")return;let Se=null;const De=()=>{Se&&(document.removeEventListener("click",Se,!0),Se=null)},Ve=()=>{De(),Se=Ze=>{Ze.stopPropagation(),Ze.preventDefault(),De()},document.addEventListener("click",Se,!0)},et=Ze=>{const Ie=Ze<0?1:-1;if(Math.abs(Ze)>Yg&&t.length>1){se(Ie,!0);return}se(Ie,!1)},Ae=Ze=>{if(Ze.touches.length!==1||A.current)return;const Ie=Ze.touches[0];T.current=!0,h.current={x:Ie.clientX,y:Ie.clientY},I.current="none",b.current=0,R.current=!1},$e=Ze=>{if(!h.current||Ze.touches.length!==1||A.current)return;const Ie=Ze.touches[0],qe=Ie.clientX-h.current.x,Ee=Ie.clientY-h.current.y;if(I.current==="none"){if(Math.abs(qe)<10&&Math.abs(Ee)<10)return;if(Math.abs(qe)>Math.abs(Ee)){if(t.length<=1)return;I.current="horizontal"}else if(Ee>0)I.current="vertical";else return}if(I.current==="horizontal"){R.current=!0,te(!0),b.current=qe;const Je=qe<0?1:-1;V.current!==Je&&(V.current=Je,ie(Je)),k.current=qe,O(qe),Ze.preventDefault();return}I.current==="vertical"&&(R.current=!0,te(!0),m.current=Ee,S(Ee),Ze.preventDefault())},tt=()=>{if(!h.current)return;const Ze=I.current,Ie=R.current;if(Ie&&Ze==="horizontal")et(b.current),Ve();else if(Ie&&Ze==="vertical")if(m.current>Kg){const Ee=window.innerHeight;m.current=Ee,fe(!0),S(Ee),B("closing")}else m.current=0,S(0),Ve();else Ze==="horizontal"&&Math.abs(b.current)>0&&(et(b.current),Ve());h.current=null,I.current="none",b.current=0,R.current=!1,te(!1)};return document.addEventListener("touchstart",Ae,{passive:!0}),document.addEventListener("touchmove",$e,{passive:!1}),document.addEventListener("touchend",tt),document.addEventListener("touchcancel",tt),()=>{document.removeEventListener("touchstart",Ae),document.removeEventListener("touchmove",$e),document.removeEventListener("touchend",tt),document.removeEventListener("touchcancel",tt),De()}},[j,t.length,se]),a.useEffect(()=>{const Se=De=>{De.key==="Escape"&&(De.preventDefault(),De.stopPropagation(),j!=="closing"&&B("closing"))};return window.addEventListener("keydown",Se,!0),()=>window.removeEventListener("keydown",Se,!0)},[j]);const Le=()=>{j!=="closing"&&B("closing")},_=j==="open",pe=j==="closing",oe=ne>0?Math.max(0,1-ne/500):1,H=ne>0?Math.max(.35,1-ne/500):1,ee=M?p?M:ih(M,We):null,Fe=Se=>{if(Se.stopPropagation(),T.current){T.current=!1;return}if(t.length<=1)return;const De=ee??Se.currentTarget.getBoundingClientRect(),Ve=Se.clientY-De.top,et=Math.min(52,De.height*.2);if(!(Ve>De.height-et)){if(Se.clientX-De.left<De.width/2){he(-1);return}he(1)}},le=Se=>{if(t.length<=1)return;const De=ee??Se.currentTarget.getBoundingClientRect(),Ve=Se.clientX-De.left,et=Se.clientY-De.top,Ae=Math.min(52,De.height*.2);if(et>De.height-Ae){Se.currentTarget.style.cursor="default";return}Se.currentTarget.style.cursor=Ve<De.width/2?"w-resize":"e-resize"},N={position:"fixed",top:F==null?void 0:F.top,left:F==null?void 0:F.left,width:F==null?void 0:F.width,height:F==null?void 0:F.height,zIndex:9998},Ue=p?"cover":"contain",je=E!==0||ne>0?`translate(${E}px, ${ne}px)`:void 0,gt=P&&!$?"none":$?`transform ${vn}ms ${Hn}`:K?`transform ${vn}ms ${Hn}, opacity ${vn}ms ${Hn}`:j==="opening"||pe?`opacity ${vn}ms ${Hn}`:"none",rt={...N,transform:je,opacity:ne>0?H:j==="opening"||pe?0:1,transition:gt,pointerEvents:"none"},ht={position:"absolute",top:((ee==null?void 0:ee.top)??0)-((F==null?void 0:F.top)??0),left:((ee==null?void 0:ee.left)??0)-((F==null?void 0:F.left)??0),width:ee==null?void 0:ee.width,height:ee==null?void 0:ee.height,objectFit:Ue,pointerEvents:Z&&_&&!ke?"auto":"none",touchAction:Z&&_?"none":void 0},lt=(F==null?void 0:F.width)??0,Ge=we?(n+ae+t.length)%t.length:null,ve=Ge!==null?t[Ge]:null,_e={...N,transform:we?`translateX(${ae*lt+E}px)`:void 0,opacity:1,transition:$?`transform ${vn}ms ${Hn}`:"none",pointerEvents:"none"},ze={position:"absolute",top:((M==null?void 0:M.top)??0)-((F==null?void 0:F.top)??0),left:((M==null?void 0:M.left)??0)-((F==null?void 0:F.left)??0),width:M==null?void 0:M.width,height:M==null?void 0:M.height,objectFit:Ue,pointerEvents:"none"},Ke=ee?{position:"fixed",top:ee.top,height:ee.height,width:ee.width/2,zIndex:9999}:null;return r.jsxs("div",{ref:v,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:j==="open"?"none":void 0},onClick:Le,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:_?oe:0,transition:P?"none":`opacity ${vn}ms ${Hn}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:p?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:y,style:{position:"absolute",inset:0}}),r.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:_?1:0,transition:`opacity ${vn}ms ${Hn}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&r.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:y,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:_?1:0,transition:`opacity ${vn}ms ${Hn}`},children:t.length>1&&r.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),M&&F&&ve&&r.jsx("div",{style:_e,onTransitionEnd:ye,children:gi(ve)?r.jsx("video",{src:ve.url,muted:!0,playsInline:!0,preload:"auto",style:ze},`neighbor-${Ge}-${ve.url}`):r.jsx("img",{src:ve.url,alt:ve.name,style:ze},`neighbor-${Ge}-${ve.url}`)}),M&&F&&Q&&r.jsx("div",{style:rt,onTransitionEnd:ye,children:Z?r.jsx(oh,{src:Q.url,phase:j,mediaRef:g,mediaStyle:ht,onLoadedMetadata:Pe,onClick:Fe,onMouseMove:le},`${n}-${Q.url}`):r.jsx("img",{ref:g,src:Q.url,alt:Q.name,onLoad:Pe,style:ht},`${n}-${Q.url}`)}),_&&Ke&&t.length>1&&!Z&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...Ke,left:ee.left,cursor:"w-resize",pointerEvents:P?"none":"auto"},onClick:Se=>{if(T.current){T.current=!1;return}Se.stopPropagation(),he(-1)}}),r.jsx("div",{style:{...Ke,left:ee.left+ee.width/2,cursor:"e-resize",pointerEvents:P?"none":"auto"},onClick:Se=>{if(T.current){T.current=!1;return}Se.stopPropagation(),he(1)}})]})]})}function ah(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function sh({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:s,activeEvent:l,layoutId:d,portalId:c}){const{prefix:u}=C.useScopedStyles(),{type:p="a",gridLayout:v,textBoxWidth:y=100,verticalGap:g,entriesCount:h,lightbox:m,imageDisplay:b,imageCorners:I,lightboxImageDisplay:R,slider:T,sliderTiming:G,direction:k,transition:V,titleMarginTop:A,subtitleMarginTop:L,titleColor:D,subtitleColor:x,lightboxCounterColor:W,titleFontFamily:M,titleFontSettings:Y,titleFontSize:F,titleLineHeight:X,titleLetterSpacing:j,titleWordSpacing:B,titleTextAppearance:ne,subtitleFontFamily:S,subtitleFontSettings:E,subtitleFontSize:O,subtitleLineHeight:ae,subtitleLetterSpacing:ie,subtitleWordSpacing:$,subtitleTextAppearance:re,lightboxCounterFontFamily:P,lightboxCounterFontSettings:te,lightboxCounterFontSize:K,lightboxCounterLineHeight:fe,lightboxCounterLetterSpacing:We,lightboxCounterWordSpacing:me,lightboxCounterTextAppearance:ce,showText:U="always",alignEntries:Q="off",align:Z="top"}=e,ke={fontSettings:{fontFamily:M,fontWeight:(Y==null?void 0:Y.fontWeight)??400,fontStyle:(Y==null?void 0:Y.fontStyle)??"normal"},fontSize:F??.01,lineHeight:X,letterSpacing:j??0,wordSpacing:B??0,textAppearance:ne,color:D},Pe={...rn(Kt(ke,n))},de={fontSettings:{fontFamily:S,fontWeight:(E==null?void 0:E.fontWeight)??400,fontStyle:(E==null?void 0:E.fontStyle)??"normal"},fontSize:O??.01,lineHeight:ae,letterSpacing:ie??0,wordSpacing:$??0,textAppearance:re,color:x},be={...rn(Kt(de,n))},z={fontSettings:{fontFamily:P,fontWeight:(te==null?void 0:te.fontWeight)??400,fontStyle:(te==null?void 0:te.fontStyle)??"normal"},fontSize:K??.01,lineHeight:fe,letterSpacing:We??0,wordSpacing:me??0,textAppearance:ce,color:W},he={...rn(Kt(z,n)),...Kr(K,fe,u,n)},ye=Xr(F,X,`${u}-item-title`,`${u}-text-tight-leading`),Me=Xr(O,ae,`${u}-item-subtitle`,`${u}-text-tight-leading`),Le=Kr(F,X,u,n),_=Kr(O,ae,u,n),pe=Xr(K,fe,`${u}-lightbox-counter`,`${u}-text-tight-leading`),oe=C.buildColorVars(u,{titleColor:D,subtitleColor:x,lightboxCounterColor:W},lh,ch),Fe=`${l&&l!=="default"?`${u}-state-${l}`:""}${U==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),le=h===0?1/0:h,N=(t??[]).slice(0,le),Ue=a.useMemo(()=>m==="on"?eh(N):[],[N,m]),je=v.entryWidth??.2,gt=(b==null?void 0:b.display)==="cover",rt=(b==null?void 0:b.ratioValue)??"1:1",ht=(b==null?void 0:b.reversed)??!1,[lt,Ge]=rt.split(":").map(Number),ze=`${ht?Ge:lt} / ${ht?lt:Ge}`,Ke=v.columnsCount,Se=C.scalingValue(je??0,n),De=Se,Ve=!gt&&T!=="off",et=N.length%Ke||Ke,Ae=et<Ke&&N.length>0,$e=N.length-et,tt=Ae?Math.floor((Ke-et)/2)+1:1,Ze=I?C.scalingValue(I,n):void 0,Ie={width:De,...gt?{aspectRatio:ze,height:"auto",overflow:"hidden"}:{height:"auto"},...Ze?{borderRadius:Ze,overflow:"hidden"}:{}},qe=`${u}-item-image-wrapper${Ve?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),Ee=p==="d"||p==="e"||p==="f",Je=Q==="on",Qe=`calc(${C.scalingValue(je??0,n)} * (${y} / 100))`,st=C.scalingValue(je*y/100,n),St=gt?{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}:{}},[Pt,Nt]=a.useState(0),dt=a.useRef(null),yt=V==="fade"||k==="horizontal"?"ltr":k==="vertical"?"ttb":"ltr";a.useEffect(()=>{const ct=dt.current;if(!ct)return;const Te=new ResizeObserver(Ne=>{Nt(Math.round(Ne[0].contentRect.width))});return Te.observe(ct),()=>Te.disconnect()},[]);const Ot=(()=>{const ct={...oe},Te=dt.current?getComputedStyle(dt.current).getPropertyValue("--cntrl-article-width").trim():"";return Te&&(ct["--cntrl-article-width"]=Te),ct})(),[Ft,bt]=a.useState(!1),[Wt,Gt]=a.useState([]),[Zt,en]=a.useState(0),Tt=m==="on"&&(!n||i),_t=(ct,Te)=>{n&&!i||m!=="off"&&(Gt(ct),en(Te),bt(!0))};a.useEffect(()=>{if(!Ft||m!=="on"||typeof document>"u")return;const ct=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ct}},[Ft,m]),a.useEffect(()=>{!n||i||bt(!1)},[n,i]);const nn=a.useMemo(()=>Vg(u),[u]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:nn}}),m==="on"&&r.jsx(th,{mediaList:Ue}),r.jsx("div",{style:oe,children:r.jsx("div",{ref:dt,className:`${u}-wrapper ${u}-type-${p}${Je?` ${u}-align-entries`:""} ${u}-image-align-${Z} ${Fe}`.trim(),style:{gridTemplateColumns:`repeat(${Ke}, ${Se})`,rowGap:Je?0:C.scalingValue(g??0,n),columnGap:C.scalingValue(v.horizontalGap??0,n),width:C.scalingValue(v.wrapperWidth??0,n),...Je?{[`--${u}-align-entries-row-gap`]:C.scalingValue(g??0,n)}:{}},children:N.map((ct,Te)=>{var Ht;const Ne=Ns(ct.title),nt=Ns(ct.subtitle),pt=(((Ht=ct.link)==null?void 0:Ht.length)??0)>0&&m==="off"?ct.link:void 0,vt=Math.floor(Te/Ke)===Math.ceil(N.length/Ke)-1,It=Ae&&Te>=$e?`${tt+(Te-$e)}`:void 0,ft=Ee?r.jsxs("div",{className:`${u}-item-text-block`,children:[Ne&&r.jsx("p",{className:ye,style:{width:Qe,...Pe,...Le},children:ct.title}),Ne&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:C.scalingValue(A??0,n),width:st}}),nt&&r.jsx("p",{className:Me,style:{width:Qe,...be,..._},children:ct.subtitle}),nt&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:C.scalingValue(L??0,n),width:st}})]}):null,Bt=Je?r.jsxs("div",{className:`${u}-item-title-row`,children:[!Ee&&r.jsx("div",{"data-controls":o&&Ne?"titleMarginTop":void 0,className:o&&Ne?`${u}-control`:void 0,style:{height:Ne?C.scalingValue(A??0,n):0,width:st}}),Ne&&r.jsx("p",{className:ye,style:{width:Qe,...Pe,...Le},children:ct.title}),Ee&&Ne&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:C.scalingValue(A??0,n),width:st}})]}):null,At=Je?r.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!Ee&&r.jsx("div",{"data-controls":o&&nt?"subtitleMarginTop":void 0,className:o&&nt?`${u}-control`:void 0,style:{height:nt?C.scalingValue(L??0,n):0,width:st}}),nt&&r.jsx("p",{className:Me,style:{width:Qe,...be,..._},children:ct.subtitle}),Ee&&nt&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:C.scalingValue(L??0,n),width:st}})]}):null,kt=pt?r.jsxs("a",{href:pt,target:"_blank",className:`${u}-item-text-link`,children:[Bt,At]}):r.jsxs(r.Fragment,{children:[Bt,At]}),qt=Cc(ct.gallery),Ut=qt.filter($t=>$t.lightboxMedia).map($t=>$t.lightboxMedia),Dt=r.jsx("div",{className:qe,style:Ie,children:qt.length===0?null:T==="off"?(()=>{const{displayMedia:$t,lightboxMedia:w}=qt[0],xe=w?Ut.findIndex(Re=>Re.url===w.url):-1;return r.jsx(Os,{media:$t,className:`${u}-item-${gi($t)?"video":"image"}`.trim(),style:St,onMediaClick:Tt&&xe>=0?()=>_t(Ut,xe):void 0})})():r.jsxs(r.Fragment,{children:[Ve&&r.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:qt.map(({displayMedia:$t})=>gi($t)?r.jsx("video",{src:$t.url,muted:!0,playsInline:!0},`sizer-${$t.url}`):r.jsx("img",{src:$t.url,alt:""},`sizer-${$t.url}`))}),r.jsx(Qa,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:G*1e3,width:"100%",height:"100%",speed:Xg,type:V==="fade"?"fade":"loop",rewind:V==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:yt},onMoved:$t=>{k!=="random"||V==="fade"||Ug($t)},children:qt.map(({displayMedia:$t,lightboxMedia:w},xe)=>{const Re=w?Ut.findIndex(He=>He.url===w.url):-1;return r.jsx(es,{children:r.jsx(Os,{media:$t,className:`${u}-item-${gi($t)?"video":"image"}`.trim(),style:St,onMediaClick:Tt&&Re>=0?()=>_t(Ut,Re):void 0})},xe)})},`${V}-${je}-${k}-${G}-${Pt}-${d}`)]})}),jt=Ee?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&Ne?"titleMarginTop":void 0,className:o&&Ne?`${u}-control`:void 0,style:{height:Ne?C.scalingValue(A??0,n):0,width:st}}),r.jsx("p",{className:ye,style:{width:Qe,...Pe,...Le},children:ct.title}),r.jsx("div",{"data-controls":o&&nt?"subtitleMarginTop":void 0,className:o&&nt?`${u}-control`:void 0,style:{height:nt?C.scalingValue(L??0,n):0,width:st}}),r.jsx("p",{className:Me,style:{width:Qe,...be,..._},children:ct.subtitle})]});return r.jsx("div",{className:`${u}-item`.trim(),style:It&&!Je?{gridColumn:It}:void 0,children:r.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${Je&&vt?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(y??0)>100?`calc(${Se} * (${y} / 100))`:Se,...It&&Je?{gridColumn:It}:{}},children:Je?r.jsx(r.Fragment,{children:Ee?r.jsxs(r.Fragment,{children:[kt,r.jsx("a",{href:pt,target:"_blank",className:`${u}-item-image-link`,children:Dt})]}):r.jsxs(r.Fragment,{children:[r.jsx("a",{href:pt,target:"_blank",className:`${u}-item-image-link`,children:Dt}),kt]})}):pt?r.jsxs(r.Fragment,{children:[r.jsxs("a",{href:pt,target:"_blank",className:`${u}-item-image-link`,children:[ft,Dt]}),!Ee&&r.jsx("a",{href:pt,target:"_blank",className:`${u}-item-text-link`,children:jt})]}):r.jsxs(r.Fragment,{children:[ft,Dt,jt]})})},Te)})})}),(!n||i)&&Ft&&typeof document<"u"&&m==="on"&&(()=>{const ct=(c?document.getElementById(c):null)??document.body;return Yn.createPortal(r.jsx("div",{style:Ot,"data-selection":"none",children:r.jsx(rh,{prefix:u,items:Wt,index:Zt,imageDisplay:ah(R),isEditor:n,onClose:()=>bt(!1),onPrev:()=>en(Te=>(Te-1+Wt.length)%Wt.length),onNext:()=>en(Te=>(Te+1)%Wt.length),counterClassName:pe,counterStyle:he})}),ct)})()]})}const lh={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},ch=["hover","focus","filled","success","error"],dh=`import { Splide, SplideSlide } from '@splidejs/react-splide';
5183
+ `}function Gg(){return Math.random()<.5?"ltr":"ttb"}function qg(e){const t=e.Components.Autoplay;t&&(t.pause(!1),t.play())}function Ug(e){const t=Gg();e.options.direction!==t&&(e.options={...e.options,direction:t}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{qg(e)})})}const vn=500,Xg=750,Hn="cubic-bezier(0.22, 1, 0.36, 1)",Kg=72,Yg=50;function Zg(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 Jg(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Qg(e){const[t]=e.media;return t!=null&&t.url?t:null}function Cc(e){return!Array.isArray(e)||e.length===0?[]:Zg(e)?e.flatMap(t=>{const n=Jg(t);if(!n)return[];const i=Qg(t);return[{displayMedia:n,lightboxMedia:i!=null&&i.url?i:null}]}):e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function gi(e){return e.type==="video"}function eh(e){const t=new Set,n=[];for(const i of e){const o=Cc(i.gallery);for(const s of o){const l=s.lightboxMedia;l!=null&&l.url&&!t.has(l.url)&&(t.add(l.url),n.push(l))}}return n}function th({mediaList:e}){return e.length===0?null:r.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>gi(t)?r.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):r.jsx("img",{src:t.url,alt:""},t.url))})}function nh(e){e.pause(),e.removeAttribute("src"),e.load()}function Os({media:e,className:t,style:n,onMediaClick:i}){return gi(e)?r.jsx("video",{src:e.url,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):r.jsx("img",{src:e.url,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function Ds(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function ih(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 s=e.width/n;return{width:e.width,height:s,left:e.left,top:e.top+(e.height-s)/2}}const o=e.height*n;return{width:o,height:e.height,left:e.left+(e.width-o)/2,top:e.top}}function oh({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:s,onMouseMove:l}){return a.useEffect(()=>{const d=n.current;if(d)return()=>{nh(d)}},[e,n]),r.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:s,onMouseMove:l,style:i})}function rh({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:s,onPrev:l,onNext:d,counterClassName:c,counterStyle:u}){const p=i==="cover",v=a.useRef(null),y=a.useRef(null),g=a.useRef(null),h=a.useRef(null),m=a.useRef(0),b=a.useRef(0),I=a.useRef("none"),R=a.useRef(!1),T=a.useRef(!1),G=a.useRef(null),k=a.useRef(0),V=a.useRef(null),A=a.useRef(!1),L=a.useRef(null),D=a.useRef(null),x=a.useRef(null),W=a.useRef(()=>{}),[M,Y]=a.useState(null),[F,X]=a.useState(null),[j,B]=a.useState("opening"),[ne,S]=a.useState(0),[E,O]=a.useState(0),[ae,ie]=a.useState(null),[$,se]=a.useState(!1),[P,te]=a.useState(!1),[K,he]=a.useState(!1),[We,pe]=a.useState(null),ce=a.useRef(n),U=a.useRef(void 0),Q=t[n],Z=Q?gi(Q):!1,ke=E!==0||$,we=ae!==null,Ae=a.useCallback(Ce=>{const Oe=Ce.currentTarget,Ve=Oe instanceof HTMLVideoElement?{width:Oe.videoWidth,height:Oe.videoHeight}:{width:Oe.naturalWidth,height:Oe.naturalHeight};!Ve.width||!Ve.height||pe(Ve)},[]);a.useEffect(()=>{G.current=F},[F]),a.useEffect(()=>{const Ce=v.current;if(!Ce)return;const Oe=()=>X(Ds(Ce));Oe();const Ve=new ResizeObserver(Oe);return Ve.observe(Ce),()=>Ve.disconnect()},[]);const ue=a.useCallback(()=>{L.current!==null&&(window.clearTimeout(L.current),L.current=null)},[]),ge=a.useCallback(()=>{const Ce=D.current;D.current=null,ue(),V.current=null,A.current=!1,ie(null),se(!1),O(0),k.current=0,te(!1),R.current=!1,b.current=0,I.current="none",Ce===1?d():Ce===-1&&l()},[ue,d,l]),be=a.useCallback(()=>{ue(),D.current=null,V.current=null,A.current=!1,ie(null),se(!1),O(0),k.current=0},[ue]),z=a.useCallback(()=>{ue(),L.current=window.setTimeout(()=>{D.current!==null&&ge()},vn+32)},[ue,ge]),oe=a.useCallback((Ce,Oe)=>{var Re;const Ve=((Re=G.current)==null?void 0:Re.width)??0;if(ue(),V.current=Ce,ie(Ce),A.current=!0,se(!0),Oe){D.current=Ce;const Ie=-Ce*Ve;k.current=Ie,O(Ie),z();return}k.current=0,O(0),L.current=window.setTimeout(()=>{L.current=null,be()},vn+32)},[ue,be,z]),fe=a.useCallback(Ce=>{if(!(t.length<=1)){if(A.current){if(D.current===Ce){x.current=Ce,ge();return}be()}ue(),V.current=Ce,ie(Ce),A.current=!1,se(!1),k.current=0,O(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{oe(Ce,!0)})})}},[t.length,oe,ge,be,ue]);W.current=fe;const ye=a.useCallback(Ce=>{Ce.propertyName!=="transform"||!A.current||D.current!==null&&ge()},[ge]),Me=a.useCallback(()=>{const Ce=y.current;if(!Ce)return;const Oe=Ds(Ce);!Oe.width||!Oe.height||Y(Oe)},[]);a.useEffect(()=>{Me();const Ce=y.current;if(!Ce)return;const Oe=new ResizeObserver(()=>Me());return Oe.observe(Ce),()=>Oe.disconnect()},[Me]),a.useEffect(()=>{j==="opening"&&M&&B("open")},[j,M]),a.useEffect(()=>{if(j!=="closing")return;const Ce=setTimeout(()=>s(),vn);return()=>clearTimeout(Ce)},[j,s]),a.useEffect(()=>()=>{ue()},[ue]),a.useLayoutEffect(()=>{ce.current===n&&U.current===(Q==null?void 0:Q.url)||(ue(),D.current=null,ie(null),S(0),O(0),se(!1),he(!1),te(!1),pe(null),m.current=0,b.current=0,I.current="none",R.current=!1,A.current=!1,k.current=0,V.current=null,h.current=null,T.current=!1,ce.current=n,U.current=Q==null?void 0:Q.url)},[n,Q==null?void 0:Q.url,ue]),a.useLayoutEffect(()=>{const Ce=x.current;Ce!==null&&(x.current=null,requestAnimationFrame(()=>{W.current(Ce)}))},[n,Q==null?void 0:Q.url]),a.useEffect(()=>{if(j!=="open")return;let Ce=null;const Oe=()=>{Ce&&(document.removeEventListener("click",Ce,!0),Ce=null)},Ve=()=>{Oe(),Ce=Ze=>{Ze.stopPropagation(),Ze.preventDefault(),Oe()},document.addEventListener("click",Ce,!0)},Re=Ze=>{const Ee=Ze<0?1:-1;if(Math.abs(Ze)>Yg&&t.length>1){oe(Ee,!0);return}oe(Ee,!1)},Ie=Ze=>{if(Ze.touches.length!==1||A.current)return;const Ee=Ze.touches[0];T.current=!0,h.current={x:Ee.clientX,y:Ee.clientY},I.current="none",b.current=0,R.current=!1},qe=Ze=>{if(!h.current||Ze.touches.length!==1||A.current)return;const Ee=Ze.touches[0],Ge=Ee.clientX-h.current.x,Pe=Ee.clientY-h.current.y;if(I.current==="none"){if(Math.abs(Ge)<10&&Math.abs(Pe)<10)return;if(Math.abs(Ge)>Math.abs(Pe)){if(t.length<=1)return;I.current="horizontal"}else if(Pe>0)I.current="vertical";else return}if(I.current==="horizontal"){R.current=!0,te(!0),b.current=Ge;const Je=Ge<0?1:-1;V.current!==Je&&(V.current=Je,ie(Je)),k.current=Ge,O(Ge),Ze.preventDefault();return}I.current==="vertical"&&(R.current=!0,te(!0),m.current=Pe,S(Pe),Ze.preventDefault())},lt=()=>{if(!h.current)return;const Ze=I.current,Ee=R.current;if(Ee&&Ze==="horizontal")Re(b.current),Ve();else if(Ee&&Ze==="vertical")if(m.current>Kg){const Pe=window.innerHeight;m.current=Pe,he(!0),S(Pe),B("closing")}else m.current=0,S(0),Ve();else Ze==="horizontal"&&Math.abs(b.current)>0&&(Re(b.current),Ve());h.current=null,I.current="none",b.current=0,R.current=!1,te(!1)};return document.addEventListener("touchstart",Ie,{passive:!0}),document.addEventListener("touchmove",qe,{passive:!1}),document.addEventListener("touchend",lt),document.addEventListener("touchcancel",lt),()=>{document.removeEventListener("touchstart",Ie),document.removeEventListener("touchmove",qe),document.removeEventListener("touchend",lt),document.removeEventListener("touchcancel",lt),Oe()}},[j,t.length,oe]),a.useEffect(()=>{const Ce=Oe=>{Oe.key==="Escape"&&(Oe.preventDefault(),Oe.stopPropagation(),j!=="closing"&&B("closing"))};return window.addEventListener("keydown",Ce,!0),()=>window.removeEventListener("keydown",Ce,!0)},[j]);const Se=()=>{j!=="closing"&&B("closing")},_=j==="open",me=j==="closing",re=ne>0?Math.max(0,1-ne/500):1,H=ne>0?Math.max(.35,1-ne/500):1,ee=M?p?M:ih(M,We):null,Fe=Ce=>{if(Ce.stopPropagation(),T.current){T.current=!1;return}if(t.length<=1)return;const Oe=ee??Ce.currentTarget.getBoundingClientRect(),Ve=Ce.clientY-Oe.top,Re=Math.min(52,Oe.height*.2);if(!(Ve>Oe.height-Re)){if(Ce.clientX-Oe.left<Oe.width/2){fe(-1);return}fe(1)}},le=Ce=>{if(t.length<=1)return;const Oe=ee??Ce.currentTarget.getBoundingClientRect(),Ve=Ce.clientX-Oe.left,Re=Ce.clientY-Oe.top,Ie=Math.min(52,Oe.height*.2);if(Re>Oe.height-Ie){Ce.currentTarget.style.cursor="default";return}Ce.currentTarget.style.cursor=Ve<Oe.width/2?"w-resize":"e-resize"},N={position:"fixed",top:F==null?void 0:F.top,left:F==null?void 0:F.left,width:F==null?void 0:F.width,height:F==null?void 0:F.height,zIndex:9998},Xe=p?"cover":"contain",je=E!==0||ne>0?`translate(${E}px, ${ne}px)`:void 0,ut=P&&!$?"none":$?`transform ${vn}ms ${Hn}`:K?`transform ${vn}ms ${Hn}, opacity ${vn}ms ${Hn}`:j==="opening"||me?`opacity ${vn}ms ${Hn}`:"none",tt={...N,transform:je,opacity:ne>0?H:j==="opening"||me?0:1,transition:ut,pointerEvents:"none"},ft={position:"absolute",top:((ee==null?void 0:ee.top)??0)-((F==null?void 0:F.top)??0),left:((ee==null?void 0:ee.left)??0)-((F==null?void 0:F.left)??0),width:ee==null?void 0:ee.width,height:ee==null?void 0:ee.height,objectFit:Xe,pointerEvents:Z&&_&&!ke?"auto":"none",touchAction:Z&&_?"none":void 0},st=(F==null?void 0:F.width)??0,Ue=we?(n+ae+t.length)%t.length:null,ve=Ue!==null?t[Ue]:null,_e={...N,transform:we?`translateX(${ae*st+E}px)`:void 0,opacity:1,transition:$?`transform ${vn}ms ${Hn}`:"none",pointerEvents:"none"},ze={position:"absolute",top:((M==null?void 0:M.top)??0)-((F==null?void 0:F.top)??0),left:((M==null?void 0:M.left)??0)-((F==null?void 0:F.left)??0),width:M==null?void 0:M.width,height:M==null?void 0:M.height,objectFit:Xe,pointerEvents:"none"},Ye=ee?{position:"fixed",top:ee.top,height:ee.height,width:ee.width/2,zIndex:9999}:null;return r.jsxs("div",{ref:v,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:j==="open"?"none":void 0},onClick:Se,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:_?re:0,transition:P?"none":`opacity ${vn}ms ${Hn}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:p?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:y,style:{position:"absolute",inset:0}}),r.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:_?1:0,transition:`opacity ${vn}ms ${Hn}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&r.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:y,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:_?1:0,transition:`opacity ${vn}ms ${Hn}`},children:t.length>1&&r.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),M&&F&&ve&&r.jsx("div",{style:_e,onTransitionEnd:ye,children:gi(ve)?r.jsx("video",{src:ve.url,muted:!0,playsInline:!0,preload:"auto",style:ze},`neighbor-${Ue}-${ve.url}`):r.jsx("img",{src:ve.url,alt:ve.name,style:ze},`neighbor-${Ue}-${ve.url}`)}),M&&F&&Q&&r.jsx("div",{style:tt,onTransitionEnd:ye,children:Z?r.jsx(oh,{src:Q.url,phase:j,mediaRef:g,mediaStyle:ft,onLoadedMetadata:Ae,onClick:Fe,onMouseMove:le},`${n}-${Q.url}`):r.jsx("img",{ref:g,src:Q.url,alt:Q.name,onLoad:Ae,style:ft},`${n}-${Q.url}`)}),_&&Ye&&t.length>1&&!Z&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...Ye,left:ee.left,cursor:"w-resize",pointerEvents:P?"none":"auto"},onClick:Ce=>{if(T.current){T.current=!1;return}Ce.stopPropagation(),fe(-1)}}),r.jsx("div",{style:{...Ye,left:ee.left+ee.width/2,cursor:"e-resize",pointerEvents:P?"none":"auto"},onClick:Ce=>{if(T.current){T.current=!1;return}Ce.stopPropagation(),fe(1)}})]})]})}function ah(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function sh({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:s,activeEvent:l,layoutId:d,portalId:c}){const{prefix:u}=C.useScopedStyles(),{type:p="a",gridLayout:v,textBoxWidth:y=100,verticalGap:g,entriesCount:h,lightbox:m,imageDisplay:b,imageCorners:I,lightboxImageDisplay:R,slider:T,sliderTiming:G,direction:k,transition:V,titleMarginTop:A,subtitleMarginTop:L,titleColor:D,subtitleColor:x,lightboxCounterColor:W,titleFontFamily:M,titleFontSettings:Y,titleFontSize:F,titleLineHeight:X,titleLetterSpacing:j,titleWordSpacing:B,titleTextAppearance:ne,subtitleFontFamily:S,subtitleFontSettings:E,subtitleFontSize:O,subtitleLineHeight:ae,subtitleLetterSpacing:ie,subtitleWordSpacing:$,subtitleTextAppearance:se,lightboxCounterFontFamily:P,lightboxCounterFontSettings:te,lightboxCounterFontSize:K,lightboxCounterLineHeight:he,lightboxCounterLetterSpacing:We,lightboxCounterWordSpacing:pe,lightboxCounterTextAppearance:ce,showText:U="always",alignEntries:Q="off",align:Z="top"}=e,ke={fontSettings:{fontFamily:M,fontWeight:(Y==null?void 0:Y.fontWeight)??400,fontStyle:(Y==null?void 0:Y.fontStyle)??"normal"},fontSize:F??.01,lineHeight:X,letterSpacing:j??0,wordSpacing:B??0,textAppearance:ne,color:D},Ae={...rn(Kt(ke,n))},ue={fontSettings:{fontFamily:S,fontWeight:(E==null?void 0:E.fontWeight)??400,fontStyle:(E==null?void 0:E.fontStyle)??"normal"},fontSize:O??.01,lineHeight:ae,letterSpacing:ie??0,wordSpacing:$??0,textAppearance:se,color:x},be={...rn(Kt(ue,n))},z={fontSettings:{fontFamily:P,fontWeight:(te==null?void 0:te.fontWeight)??400,fontStyle:(te==null?void 0:te.fontStyle)??"normal"},fontSize:K??.01,lineHeight:he,letterSpacing:We??0,wordSpacing:pe??0,textAppearance:ce,color:W},fe={...rn(Kt(z,n)),...Kr(K,he,u,n)},ye=Xr(F,X,`${u}-item-title`,`${u}-text-tight-leading`),Me=Xr(O,ae,`${u}-item-subtitle`,`${u}-text-tight-leading`),Se=Kr(F,X,u,n),_=Kr(O,ae,u,n),me=Xr(K,he,`${u}-lightbox-counter`,`${u}-text-tight-leading`),re=C.buildColorVars(u,{titleColor:D,subtitleColor:x,lightboxCounterColor:W},lh,ch),Fe=`${l&&l!=="default"?`${u}-state-${l}`:""}${U==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),le=h===0?1/0:h,N=(t??[]).slice(0,le),Xe=a.useMemo(()=>m==="on"?eh(N):[],[N,m]),je=v.entryWidth??.2,ut=(b==null?void 0:b.display)==="cover",tt=(b==null?void 0:b.ratioValue)??"1:1",ft=(b==null?void 0:b.reversed)??!1,[st,Ue]=tt.split(":").map(Number),ze=`${ft?Ue:st} / ${ft?st:Ue}`,Ye=v.columnsCount,Ce=C.scalingValue(je??0,n),Oe=Ce,Ve=!ut&&T!=="off",Re=N.length%Ye||Ye,Ie=Re<Ye&&N.length>0,qe=N.length-Re,lt=Ie?Math.floor((Ye-Re)/2)+1:1,Ze=I?C.scalingValue(I,n):void 0,Ee={width:Oe,...ut?{aspectRatio:ze,height:"auto",overflow:"hidden"}:{height:"auto"},...Ze?{borderRadius:Ze,overflow:"hidden"}:{}},Ge=`${u}-item-image-wrapper${Ve?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),Pe=p==="d"||p==="e"||p==="f",Je=Q==="on",nt=`calc(${C.scalingValue(je??0,n)} * (${y} / 100))`,et=C.scalingValue(je*y/100,n),St=ut?{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}:{}},[Wt,At]=a.useState(0),gt=a.useRef(null),xt=V==="fade"||k==="horizontal"?"ltr":k==="vertical"?"ttb":"ltr";a.useEffect(()=>{const ct=gt.current;if(!ct)return;const Te=new ResizeObserver(Ne=>{At(Math.round(Ne[0].contentRect.width))});return Te.observe(ct),()=>Te.disconnect()},[]);const zt=(()=>{const ct={...re},Te=gt.current?getComputedStyle(gt.current).getPropertyValue("--cntrl-article-width").trim():"";return Te&&(ct["--cntrl-article-width"]=Te),ct})(),[Ft,bt]=a.useState(!1),[_t,Gt]=a.useState([]),[Zt,en]=a.useState(0),$t=m==="on"&&(!n||i),Ht=(ct,Te)=>{n&&!i||m!=="off"&&(Gt(ct),en(Te),bt(!0))};a.useEffect(()=>{if(!Ft||m!=="on"||typeof document>"u")return;const ct=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ct}},[Ft,m]),a.useEffect(()=>{!n||i||bt(!1)},[n,i]);const nn=a.useMemo(()=>Vg(u),[u]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:nn}}),m==="on"&&r.jsx(th,{mediaList:Xe}),r.jsx("div",{style:re,children:r.jsx("div",{ref:gt,className:`${u}-wrapper ${u}-type-${p}${Je?` ${u}-align-entries`:""} ${u}-image-align-${Z} ${Fe}`.trim(),style:{gridTemplateColumns:`repeat(${Ye}, ${Ce})`,rowGap:Je?0:C.scalingValue(g??0,n),columnGap:C.scalingValue(v.horizontalGap??0,n),width:C.scalingValue(v.wrapperWidth??0,n),...Je?{[`--${u}-align-entries-row-gap`]:C.scalingValue(g??0,n)}:{}},children:N.map((ct,Te)=>{var Nt;const Ne=Ns(ct.title),it=Ns(ct.subtitle),pt=(((Nt=ct.link)==null?void 0:Nt.length)??0)>0&&m==="off"?ct.link:void 0,yt=Math.floor(Te/Ye)===Math.ceil(N.length/Ye)-1,It=Ie&&Te>=qe?`${lt+(Te-qe)}`:void 0,ht=Pe?r.jsxs("div",{className:`${u}-item-text-block`,children:[Ne&&r.jsx("p",{className:ye,style:{width:nt,...Ae,...Se},children:ct.title}),Ne&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:C.scalingValue(A??0,n),width:et}}),it&&r.jsx("p",{className:Me,style:{width:nt,...be,..._},children:ct.subtitle}),it&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:C.scalingValue(L??0,n),width:et}})]}):null,Bt=Je?r.jsxs("div",{className:`${u}-item-title-row`,children:[!Pe&&r.jsx("div",{"data-controls":o&&Ne?"titleMarginTop":void 0,className:o&&Ne?`${u}-control`:void 0,style:{height:Ne?C.scalingValue(A??0,n):0,width:et}}),Ne&&r.jsx("p",{className:ye,style:{width:nt,...Ae,...Se},children:ct.title}),Pe&&Ne&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:C.scalingValue(A??0,n),width:et}})]}):null,kt=Je?r.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!Pe&&r.jsx("div",{"data-controls":o&&it?"subtitleMarginTop":void 0,className:o&&it?`${u}-control`:void 0,style:{height:it?C.scalingValue(L??0,n):0,width:et}}),it&&r.jsx("p",{className:Me,style:{width:nt,...be,..._},children:ct.subtitle}),Pe&&it&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:C.scalingValue(L??0,n),width:et}})]}):null,Pt=pt?r.jsxs("a",{href:pt,target:"_blank",className:`${u}-item-text-link`,children:[Bt,kt]}):r.jsxs(r.Fragment,{children:[Bt,kt]}),qt=Cc(ct.gallery),Ut=qt.filter(Ct=>Ct.lightboxMedia).map(Ct=>Ct.lightboxMedia),Ot=r.jsx("div",{className:Ge,style:Ee,children:qt.length===0?null:T==="off"?(()=>{const{displayMedia:Ct,lightboxMedia:w}=qt[0],xe=w?Ut.findIndex(Le=>Le.url===w.url):-1;return r.jsx(Os,{media:Ct,className:`${u}-item-${gi(Ct)?"video":"image"}`.trim(),style:St,onMediaClick:$t&&xe>=0?()=>Ht(Ut,xe):void 0})})():r.jsxs(r.Fragment,{children:[Ve&&r.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:qt.map(({displayMedia:Ct})=>gi(Ct)?r.jsx("video",{src:Ct.url,muted:!0,playsInline:!0},`sizer-${Ct.url}`):r.jsx("img",{src:Ct.url,alt:""},`sizer-${Ct.url}`))}),r.jsx(Qa,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:G*1e3,width:"100%",height:"100%",speed:Xg,type:V==="fade"?"fade":"loop",rewind:V==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:xt},onMoved:Ct=>{k!=="random"||V==="fade"||Ug(Ct)},children:qt.map(({displayMedia:Ct,lightboxMedia:w},xe)=>{const Le=w?Ut.findIndex(He=>He.url===w.url):-1;return r.jsx(es,{children:r.jsx(Os,{media:Ct,className:`${u}-item-${gi(Ct)?"video":"image"}`.trim(),style:St,onMediaClick:$t&&Le>=0?()=>Ht(Ut,Le):void 0})},xe)})},`${V}-${je}-${k}-${G}-${Wt}-${d}`)]})}),Dt=Pe?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&Ne?"titleMarginTop":void 0,className:o&&Ne?`${u}-control`:void 0,style:{height:Ne?C.scalingValue(A??0,n):0,width:et}}),r.jsx("p",{className:ye,style:{width:nt,...Ae,...Se},children:ct.title}),r.jsx("div",{"data-controls":o&&it?"subtitleMarginTop":void 0,className:o&&it?`${u}-control`:void 0,style:{height:it?C.scalingValue(L??0,n):0,width:et}}),r.jsx("p",{className:Me,style:{width:nt,...be,..._},children:ct.subtitle})]});return r.jsx("div",{className:`${u}-item`.trim(),style:It&&!Je?{gridColumn:It}:void 0,children:r.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${Je&&yt?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(y??0)>100?`calc(${Ce} * (${y} / 100))`:Ce,...It&&Je?{gridColumn:It}:{}},children:Je?r.jsx(r.Fragment,{children:Pe?r.jsxs(r.Fragment,{children:[Pt,r.jsx("a",{href:pt,target:"_blank",className:`${u}-item-image-link`,children:Ot})]}):r.jsxs(r.Fragment,{children:[r.jsx("a",{href:pt,target:"_blank",className:`${u}-item-image-link`,children:Ot}),Pt]})}):pt?r.jsxs(r.Fragment,{children:[r.jsxs("a",{href:pt,target:"_blank",className:`${u}-item-image-link`,children:[ht,Ot]}),!Pe&&r.jsx("a",{href:pt,target:"_blank",className:`${u}-item-text-link`,children:Dt})]}):r.jsxs(r.Fragment,{children:[ht,Ot,Dt]})})},Te)})})}),(!n||i)&&Ft&&typeof document<"u"&&m==="on"&&(()=>{const ct=(c?document.getElementById(c):null)??document.body;return Yn.createPortal(r.jsx("div",{style:zt,"data-selection":"none",children:r.jsx(rh,{prefix:u,items:_t,index:Zt,imageDisplay:ah(R),isEditor:n,onClose:()=>bt(!1),onPrev:()=>en(Te=>(Te-1+_t.length)%_t.length),onNext:()=>en(Te=>(Te+1)%_t.length),counterClassName:me,counterStyle:fe})}),ct)})()]})}const lh={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},ch=["hover","focus","filled","success","error"],dh=`import { Splide, SplideSlide } from '@splidejs/react-splide';
5171
5184
  import '@splidejs/react-splide/css/core';
5172
5185
  import { CommonComponentProps } from '../props';
5173
5186
  import {
@@ -7220,7 +7233,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
7220
7233
  };
7221
7234
 
7222
7235
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
7223
- `,Yr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},uh=["titleColor","subtitleColor","lightboxCounterColor"],ph={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:{...Yr.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:{...Yr.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:{...Yr.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:[...uh],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},mh={element:sh,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:ph,sourceCode:dh},gh=50,js=10,ts="cntrl-lightbox-journal",Pr=ts,Ra=`${ts}-`,kr=e=>`${ts}-${e}`,ns=e=>e===Pr||e.startsWith(Ra),zs=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Bs=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=zs(t.get(kr(e)));if(i)return i}const n=zs(t.get(Pr));if(n)return n;for(const[i]of t){if(!i.startsWith(Ra))continue;const o=i.slice(Ra.length);if(!/^\d+$/.test(o))continue;const s=Number.parseInt(o,10);if(Number.isFinite(s)&&s>=1)return s}return null},Vs=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Tc=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{ns(l)&&i.searchParams.delete(l)}),t?i.searchParams.set(kr(t),String(e)):i.searchParams.set(Pr,String(e));const o=n?"replaceState":"pushState",s=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",s)},hh=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===kr(e)||i===Pr:ns(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)}},Lc=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(kr(e)):[...t.keys()].some(n=>ns(n))},fh=(e,t)=>{if(Lc(t)){if(e){window.history.back();return}hh(t)}},yh=20,vh=2,Zr=e=>`max(${e}, ${yh}px)`,Oi=e=>((e==null?void 0:e.image)??[]).slice(0,vh),Rc=e=>e.reduce((t,n)=>t+Oi(n).length,0),xh=(e,t)=>{const n=e.slice(0,t).reduce((o,s)=>o+Oi(s).length,1),i=Oi(e[t]).length;return{start:n,end:n+i-1}},bh=(e,t)=>{const n=Rc(e),{start:i,end:o}=xh(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},ar=(e,t)=>t==="B"?e.flatMap((n,i)=>Oi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Oi(n)})),wh=(e,t,n,i)=>{var s;if(n==="B")return`${t+1} / ${e.length}`;const o=((s=e[t])==null?void 0:s.entryIndex)??0;return bh(i,o)},Gs=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Sh=(e,t,n)=>e==="B"?t.length>1:Rc(n)>1,gn=.004,Bn=.004,Fi={title1Width:.13,title2Width:.13,title3Width:.14},Vn=(e,t,n,i,o)=>{const s=[];return t.title1&&s.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&s.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&s.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),s},Di=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,l)=>s+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:l},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...l]};const c=Math.min(s,d);return{overflow:s-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},wo=(e,t)=>Di(e,t),ln=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Gn=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Di(e.length,n),effective:wo(e.length,n)}},Ic=(e,t,n,i)=>e.slice(0,i).reduce((o,s,l)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[l]??0),0),Ec=(e,t,n,i)=>e.slice(0,i+1).reduce((o,s,l)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[l]??0),0),Xn=["title1","title2","title3","count"],ot=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,is={title1:"1",title2:"2",title3:"3",count:"Count"},os=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")],$h=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Xn.map(e=>[is[e],os(e)]))}),Ch={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Th={title1:.02,title2:.02,title3:.02,count:.017},ui=(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[Ch[t]]}},pi=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??Th[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Kt(i,n)};function Mc({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:l}){const{title1Width:d,title2Width:c,title3Width:u,title1MarginLeft:p=0,title2MarginLeft:v=0,title3MarginLeft:y=0,titleRowMarginBottom:g=0,titleHeaderLayout:h="desktop",contentMarginTop:m=0,iconMarginRight:b=0,closeIcon:I=null,closeIconMaxWidth:R=0,closeIconColor:T="#000000",closeIconHoverColor:G="#cccccc"}=n,k=C.scalingValue(m,i),V=C.scalingValue(b,i),A=C.scalingValue(g,i),L=h==="mobile",D=pi("title1",ui(n,"title1"),i),x=pi("title2",ui(n,"title2"),i),W=pi("title3",ui(n,"title3"),i),M=a.useMemo(()=>({title1Width:d??Fi.title1Width,title2Width:c??Fi.title2Width,title3Width:u??Fi.title3Width}),[d,c,u]),Y=a.useMemo(()=>({title2MarginLeft:v,title3MarginLeft:y}),[v,y]),F=a.useMemo(()=>Vn(e,t,D,x,W),[e,t,D,x,W]),X=a.useMemo(()=>F.map(H=>M[H.widthKey]),[F,M]),j=a.useMemo(()=>Di(F.length,X),[F.length,X]),B=a.useMemo(()=>wo(F.length,X),[F.length,X]),ne=a.useMemo(()=>F.filter(H=>H.prefix==="title1"),[F]),S=a.useMemo(()=>F.filter(H=>H.prefix==="title2"||H.prefix==="title3"),[F]),E=a.useMemo(()=>Gn(ne,M),[ne,M]),O=a.useMemo(()=>Gn(S,M),[S,M]),ae=!!(t.title1||t.title2||t.title3),ie=I!==null;if(!(ae||ie))return null;const re=(p??0)>0||o,P=(H,ee)=>{const Fe=F.findIndex(N=>N.prefix===H.prefix);if(!L||ee==="single-row")return{effectiveWidth:B[Fe]??0,resolvedWidth:j[Fe]??0,maxWidth:ln(Fe,j)};if(ee==="two-row-top"){const N=ne.findIndex(Ue=>Ue.prefix===H.prefix);return{effectiveWidth:E.effective[N]??0,resolvedWidth:E.resolved[N]??0,maxWidth:ln(N,E.resolved)}}const le=S.findIndex(N=>N.prefix===H.prefix);return{effectiveWidth:O.effective[le]??0,resolvedWidth:O.resolved[le]??0,maxWidth:ln(le,O.resolved)}},te=(H,ee,Fe)=>{if(!L||Fe==="single-row"){const gt=H.findIndex(Ge=>Ge.prefix===ee.prefix),rt=H.map(Ge=>M[Ge.widthKey]),ht=Di(H.length,rt);return{effectiveWidth:wo(H.length,rt)[gt]??0,resolvedWidth:ht[gt]??0,maxWidth:ln(gt,ht)}}if(Fe==="two-row-top"){const gt=H.filter(Ge=>Ge.prefix==="title1"),rt=gt.findIndex(Ge=>Ge.prefix===ee.prefix),{resolved:ht,effective:lt}=Gn(gt,M);return{effectiveWidth:lt[rt]??0,resolvedWidth:ht[rt]??0,maxWidth:ln(rt,ht)}}const le=H.filter(gt=>gt.prefix==="title2"||gt.prefix==="title3"),N=le.findIndex(gt=>gt.prefix===ee.prefix),{resolved:Ue,effective:je}=Gn(le,M);return{effectiveWidth:je[N]??0,resolvedWidth:Ue[N]??0,maxWidth:ln(N,Ue)}},K=H=>Ec(F,j,Y,H)+(L?0:p??0),fe=()=>L?0:p??0,We=H=>S.slice(0,H).reduce((ee,Fe,le)=>ee+(Fe.marginLeftKey?Y[Fe.marginLeftKey]??0:0)+(O.resolved[le]??0),0),me=H=>{const ee=S[H];return We(H)+(ee.marginLeftKey?Y[ee.marginLeftKey]??0:0)+(O.resolved[H]??0)},ce=(H,ee,Fe)=>{const le=H.marginLeftKey?Y[H.marginLeftKey]??0:0,{effectiveWidth:N,resolvedWidth:Ue,maxWidth:je}=Fe??P(H,ee),gt=Math.max(le,Bn),rt=o&&ee==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":H.prefix,style:{width:C.scalingValue(N,i),...le>0?{marginLeft:C.scalingValue(le,i)}:{}},children:[r.jsx("p",{className:H.className,style:H.style,children:H.text}),rt&&H.marginLeftKey?r.jsx("div",{"data-controls":H.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ue),style:{position:"absolute",top:0,left:C.scalingValue(-le,i),width:C.scalingValue(gt,i),height:"100%",pointerEvents:"auto"}}):null,rt?r.jsx("div",{"data-controls":H.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:C.scalingValue(-gn/2,i),width:C.scalingValue(gn,i),height:"100%",pointerEvents:"auto"}}):null]},H.className)},U=(H="two-row")=>{const ee=F.findIndex(N=>N.prefix==="title1"),Fe=ee>=0?j[ee]:M.title1Width,le=H==="two-row"&&o;return r.jsx("div",{...le?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Fe)}:{},style:{width:C.scalingValue(p??0,i),flexShrink:0,alignSelf:"stretch",...le?{pointerEvents:"auto"}:{}}})},Q=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:D,"aria-hidden":"true",children:" "}),Z=H=>{const ee=Vn(e,H,D,x,W);return r.jsx(r.Fragment,{children:ee.map(Fe=>ce(Fe,"single-row",te(ee,Fe,"single-row")))})},ke=H=>{const ee=Vn(e,H,D,x,W),Fe=ee.find(le=>le.prefix==="title1");return Fe?ce(Fe,"two-row-top",te(ee,Fe,"two-row-top")):null},we=(H,ee=!1)=>{const Fe=Vn(e,H,D,x,W),le=Fe.filter(je=>je.prefix==="title2"||je.prefix==="title3"),N=o&&ee;return le.length>0||N||(g??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[le.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[r.jsx("div",{className:`${e}-titles-stack`,children:le.map(je=>ce(je,"two-row-bottom",te(Fe,je,"two-row-bottom")))}),ee&&o?r.jsxs(r.Fragment,{children:[ye(),Me()]}):null]}):null,(g??0)>0||N?r.jsx("div",{"data-controls":N?"titleRowMarginBottom":void 0,"data-controls-axis":N?"y":void 0,"data-controls-reverse":N?"":void 0,className:N?`${e}-control`:void 0,style:{height:A,width:"100%",flexShrink:0,pointerEvents:N?"auto":"none"}}):null]}):null},Pe=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:C.scalingValue(R??0,i),height:C.scalingValue(R??0,i),marginRight:V,"--close-icon-hover-color":G},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:H=>{H.stopPropagation(),l==null||l()},"aria-label":"Close",children:r.jsx(an,{url:I??"",fill:T,hoverFill:i&&!s?T:G,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:V,height:"100%",pointerEvents:"auto"}})]}),de=()=>ie?r.jsx("div",{className:`${e}-titles-row-header-controls`,children:Pe()}):null,ge=H=>r.jsx("div",{className:`${e}-titles-row-titles`,children:r.jsx("div",{className:`${e}-titles-stack`,children:H})}),be=H=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[ie||ae?Q():null,re?U("two-row"):null,ge(H),de()]}),z=(H,ee=!1)=>r.jsxs(r.Fragment,{children:[be(ke(H)),we(H,ee)]}),se=()=>{const H=L?-1:F.findIndex(le=>le.prefix==="title1"),ee=!L&&(o||(p??0)>0)?(()=>{const le=p??0,N=H>=0?j[H]:M.title1Width,Ue=Math.max(le,Bn);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(N),style:{position:"absolute",top:0,left:0,width:C.scalingValue(Ue,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Fe=F.flatMap((le,N)=>{if(!le.marginLeftKey)return[];const Ue=Y[le.marginLeftKey]??0,je=Ic(F,j,Y,N)+fe(),gt=Math.max(Ue,Bn);return r.jsx("div",{"data-controls":le.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(j[N]),style:{position:"absolute",top:0,left:C.scalingValue(je,i),width:C.scalingValue(gt,i),height:"100%",pointerEvents:"auto"}},le.marginLeftKey)});return ee?[ee,...Fe]:Fe},he=()=>F.map((H,ee)=>{const Fe=ln(ee,j),N=K(ee)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":H.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Fe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:C.scalingValue(N,i),width:C.scalingValue(gn,i),height:"100%",pointerEvents:"auto"}})},`${H.widthKey}-junction`)}),ye=()=>S.flatMap((H,ee)=>{if(!H.marginLeftKey)return[];const Fe=Y[H.marginLeftKey]??0,le=We(ee),N=Math.max(Fe,Bn),{resolvedWidth:Ue}=P(H,"two-row-bottom");return r.jsx("div",{"data-controls":H.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ue),style:{position:"absolute",top:0,left:C.scalingValue(le,i),width:C.scalingValue(N,i),height:"100%",pointerEvents:"auto"}},H.marginLeftKey)}),Me=()=>S.map((H,ee)=>{const{maxWidth:Fe}=P(H,"two-row-bottom"),N=me(ee)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":H.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Fe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:C.scalingValue(N,i),width:C.scalingValue(gn,i),height:"100%",pointerEvents:"auto"}})},`${H.widthKey}-junction`)}),Le=()=>!o||L?null:r.jsxs(r.Fragment,{children:[se(),he()]}),_=!!(t.title2||t.title3||(g??0)>0||o),pe=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[ie||ae?Q():null,re?U("single-row"):null,ae?ge(Z(t)):r.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),de(),Le()]}),oe=()=>r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,..._?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:_?void 0:{flex:"0 0 auto",height:"auto"},children:z(t,!0)}),Le()]});return r.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:k,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...L?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${L?` ${e}-lightbox-content-area-stacked`:""}`,children:r.jsx("div",{className:`${e}-text-bar-cell${L?` ${e}-text-bar-cell-stacked`:""}`,style:L?void 0:{flex:1,minWidth:0,width:"100%"},children:L?oe():pe()})})})]})}function Lh(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Rh(e){return`
7236
+ `,Yr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},uh=["titleColor","subtitleColor","lightboxCounterColor"],ph={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:{...Yr.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:{...Yr.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:{...Yr.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:[...uh],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},mh={element:sh,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:ph,sourceCode:dh},gh=50,js=10,ts="cntrl-lightbox-journal",Pr=ts,Ra=`${ts}-`,kr=e=>`${ts}-${e}`,ns=e=>e===Pr||e.startsWith(Ra),zs=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Bs=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=zs(t.get(kr(e)));if(i)return i}const n=zs(t.get(Pr));if(n)return n;for(const[i]of t){if(!i.startsWith(Ra))continue;const o=i.slice(Ra.length);if(!/^\d+$/.test(o))continue;const s=Number.parseInt(o,10);if(Number.isFinite(s)&&s>=1)return s}return null},Vs=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Tc=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{ns(l)&&i.searchParams.delete(l)}),t?i.searchParams.set(kr(t),String(e)):i.searchParams.set(Pr,String(e));const o=n?"replaceState":"pushState",s=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",s)},hh=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===kr(e)||i===Pr:ns(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)}},Lc=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(kr(e)):[...t.keys()].some(n=>ns(n))},fh=(e,t)=>{if(Lc(t)){if(e){window.history.back();return}hh(t)}},yh=20,vh=2,Zr=e=>`max(${e}, ${yh}px)`,Oi=e=>((e==null?void 0:e.image)??[]).slice(0,vh),Rc=e=>e.reduce((t,n)=>t+Oi(n).length,0),xh=(e,t)=>{const n=e.slice(0,t).reduce((o,s)=>o+Oi(s).length,1),i=Oi(e[t]).length;return{start:n,end:n+i-1}},bh=(e,t)=>{const n=Rc(e),{start:i,end:o}=xh(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},ar=(e,t)=>t==="B"?e.flatMap((n,i)=>Oi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Oi(n)})),wh=(e,t,n,i)=>{var s;if(n==="B")return`${t+1} / ${e.length}`;const o=((s=e[t])==null?void 0:s.entryIndex)??0;return bh(i,o)},Gs=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Sh=(e,t,n)=>e==="B"?t.length>1:Rc(n)>1,gn=.004,Bn=.004,Fi={title1Width:.13,title2Width:.13,title3Width:.14},Vn=(e,t,n,i,o)=>{const s=[];return t.title1&&s.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&s.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&s.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),s},Di=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,l)=>s+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:l},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...l]};const c=Math.min(s,d);return{overflow:s-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},wo=(e,t)=>Di(e,t),ln=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Gn=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Di(e.length,n),effective:wo(e.length,n)}},Ic=(e,t,n,i)=>e.slice(0,i).reduce((o,s,l)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[l]??0),0),Ec=(e,t,n,i)=>e.slice(0,i+1).reduce((o,s,l)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[l]??0),0),Xn=["title1","title2","title3","count"],rt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,is={title1:"1",title2:"2",title3:"3",count:"Count"},os=e=>[rt(e,"fontFamily"),rt(e,"fontSettings"),{type:"row",items:[rt(e,"fontSize"),rt(e,"lineHeight"),rt(e,"letterSpacing"),rt(e,"wordSpacing")]},rt(e,"textAlign"),rt(e,"textAppearance")],$h=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Xn.map(e=>[is[e],os(e)]))}),Ch={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Th={title1:.02,title2:.02,title3:.02,count:.017},ui=(e,t)=>{const n=i=>{const o=rt(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[Ch[t]]}},pi=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??Th[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Kt(i,n)};function Mc({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:l}){const{title1Width:d,title2Width:c,title3Width:u,title1MarginLeft:p=0,title2MarginLeft:v=0,title3MarginLeft:y=0,titleRowMarginBottom:g=0,titleHeaderLayout:h="desktop",contentMarginTop:m=0,iconMarginRight:b=0,closeIcon:I=null,closeIconMaxWidth:R=0,closeIconColor:T="#000000",closeIconHoverColor:G="#cccccc"}=n,k=C.scalingValue(m,i),V=C.scalingValue(b,i),A=C.scalingValue(g,i),L=h==="mobile",D=pi("title1",ui(n,"title1"),i),x=pi("title2",ui(n,"title2"),i),W=pi("title3",ui(n,"title3"),i),M=a.useMemo(()=>({title1Width:d??Fi.title1Width,title2Width:c??Fi.title2Width,title3Width:u??Fi.title3Width}),[d,c,u]),Y=a.useMemo(()=>({title2MarginLeft:v,title3MarginLeft:y}),[v,y]),F=a.useMemo(()=>Vn(e,t,D,x,W),[e,t,D,x,W]),X=a.useMemo(()=>F.map(H=>M[H.widthKey]),[F,M]),j=a.useMemo(()=>Di(F.length,X),[F.length,X]),B=a.useMemo(()=>wo(F.length,X),[F.length,X]),ne=a.useMemo(()=>F.filter(H=>H.prefix==="title1"),[F]),S=a.useMemo(()=>F.filter(H=>H.prefix==="title2"||H.prefix==="title3"),[F]),E=a.useMemo(()=>Gn(ne,M),[ne,M]),O=a.useMemo(()=>Gn(S,M),[S,M]),ae=!!(t.title1||t.title2||t.title3),ie=I!==null;if(!(ae||ie))return null;const se=(p??0)>0||o,P=(H,ee)=>{const Fe=F.findIndex(N=>N.prefix===H.prefix);if(!L||ee==="single-row")return{effectiveWidth:B[Fe]??0,resolvedWidth:j[Fe]??0,maxWidth:ln(Fe,j)};if(ee==="two-row-top"){const N=ne.findIndex(Xe=>Xe.prefix===H.prefix);return{effectiveWidth:E.effective[N]??0,resolvedWidth:E.resolved[N]??0,maxWidth:ln(N,E.resolved)}}const le=S.findIndex(N=>N.prefix===H.prefix);return{effectiveWidth:O.effective[le]??0,resolvedWidth:O.resolved[le]??0,maxWidth:ln(le,O.resolved)}},te=(H,ee,Fe)=>{if(!L||Fe==="single-row"){const ut=H.findIndex(Ue=>Ue.prefix===ee.prefix),tt=H.map(Ue=>M[Ue.widthKey]),ft=Di(H.length,tt);return{effectiveWidth:wo(H.length,tt)[ut]??0,resolvedWidth:ft[ut]??0,maxWidth:ln(ut,ft)}}if(Fe==="two-row-top"){const ut=H.filter(Ue=>Ue.prefix==="title1"),tt=ut.findIndex(Ue=>Ue.prefix===ee.prefix),{resolved:ft,effective:st}=Gn(ut,M);return{effectiveWidth:st[tt]??0,resolvedWidth:ft[tt]??0,maxWidth:ln(tt,ft)}}const le=H.filter(ut=>ut.prefix==="title2"||ut.prefix==="title3"),N=le.findIndex(ut=>ut.prefix===ee.prefix),{resolved:Xe,effective:je}=Gn(le,M);return{effectiveWidth:je[N]??0,resolvedWidth:Xe[N]??0,maxWidth:ln(N,Xe)}},K=H=>Ec(F,j,Y,H)+(L?0:p??0),he=()=>L?0:p??0,We=H=>S.slice(0,H).reduce((ee,Fe,le)=>ee+(Fe.marginLeftKey?Y[Fe.marginLeftKey]??0:0)+(O.resolved[le]??0),0),pe=H=>{const ee=S[H];return We(H)+(ee.marginLeftKey?Y[ee.marginLeftKey]??0:0)+(O.resolved[H]??0)},ce=(H,ee,Fe)=>{const le=H.marginLeftKey?Y[H.marginLeftKey]??0:0,{effectiveWidth:N,resolvedWidth:Xe,maxWidth:je}=Fe??P(H,ee),ut=Math.max(le,Bn),tt=o&&ee==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":H.prefix,style:{width:C.scalingValue(N,i),...le>0?{marginLeft:C.scalingValue(le,i)}:{}},children:[r.jsx("p",{className:H.className,style:H.style,children:H.text}),tt&&H.marginLeftKey?r.jsx("div",{"data-controls":H.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Xe),style:{position:"absolute",top:0,left:C.scalingValue(-le,i),width:C.scalingValue(ut,i),height:"100%",pointerEvents:"auto"}}):null,tt?r.jsx("div",{"data-controls":H.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:C.scalingValue(-gn/2,i),width:C.scalingValue(gn,i),height:"100%",pointerEvents:"auto"}}):null]},H.className)},U=(H="two-row")=>{const ee=F.findIndex(N=>N.prefix==="title1"),Fe=ee>=0?j[ee]:M.title1Width,le=H==="two-row"&&o;return r.jsx("div",{...le?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Fe)}:{},style:{width:C.scalingValue(p??0,i),flexShrink:0,alignSelf:"stretch",...le?{pointerEvents:"auto"}:{}}})},Q=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:D,"aria-hidden":"true",children:" "}),Z=H=>{const ee=Vn(e,H,D,x,W);return r.jsx(r.Fragment,{children:ee.map(Fe=>ce(Fe,"single-row",te(ee,Fe,"single-row")))})},ke=H=>{const ee=Vn(e,H,D,x,W),Fe=ee.find(le=>le.prefix==="title1");return Fe?ce(Fe,"two-row-top",te(ee,Fe,"two-row-top")):null},we=(H,ee=!1)=>{const Fe=Vn(e,H,D,x,W),le=Fe.filter(je=>je.prefix==="title2"||je.prefix==="title3"),N=o&&ee;return le.length>0||N||(g??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[le.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[r.jsx("div",{className:`${e}-titles-stack`,children:le.map(je=>ce(je,"two-row-bottom",te(Fe,je,"two-row-bottom")))}),ee&&o?r.jsxs(r.Fragment,{children:[ye(),Me()]}):null]}):null,(g??0)>0||N?r.jsx("div",{"data-controls":N?"titleRowMarginBottom":void 0,"data-controls-axis":N?"y":void 0,"data-controls-reverse":N?"":void 0,className:N?`${e}-control`:void 0,style:{height:A,width:"100%",flexShrink:0,pointerEvents:N?"auto":"none"}}):null]}):null},Ae=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:C.scalingValue(R??0,i),height:C.scalingValue(R??0,i),marginRight:V,"--close-icon-hover-color":G},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:H=>{H.stopPropagation(),l==null||l()},"aria-label":"Close",children:r.jsx(an,{url:I??"",fill:T,hoverFill:i&&!s?T:G,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:V,height:"100%",pointerEvents:"auto"}})]}),ue=()=>ie?r.jsx("div",{className:`${e}-titles-row-header-controls`,children:Ae()}):null,ge=H=>r.jsx("div",{className:`${e}-titles-row-titles`,children:r.jsx("div",{className:`${e}-titles-stack`,children:H})}),be=H=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[ie||ae?Q():null,se?U("two-row"):null,ge(H),ue()]}),z=(H,ee=!1)=>r.jsxs(r.Fragment,{children:[be(ke(H)),we(H,ee)]}),oe=()=>{const H=L?-1:F.findIndex(le=>le.prefix==="title1"),ee=!L&&(o||(p??0)>0)?(()=>{const le=p??0,N=H>=0?j[H]:M.title1Width,Xe=Math.max(le,Bn);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(N),style:{position:"absolute",top:0,left:0,width:C.scalingValue(Xe,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Fe=F.flatMap((le,N)=>{if(!le.marginLeftKey)return[];const Xe=Y[le.marginLeftKey]??0,je=Ic(F,j,Y,N)+he(),ut=Math.max(Xe,Bn);return r.jsx("div",{"data-controls":le.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(j[N]),style:{position:"absolute",top:0,left:C.scalingValue(je,i),width:C.scalingValue(ut,i),height:"100%",pointerEvents:"auto"}},le.marginLeftKey)});return ee?[ee,...Fe]:Fe},fe=()=>F.map((H,ee)=>{const Fe=ln(ee,j),N=K(ee)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":H.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Fe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:C.scalingValue(N,i),width:C.scalingValue(gn,i),height:"100%",pointerEvents:"auto"}})},`${H.widthKey}-junction`)}),ye=()=>S.flatMap((H,ee)=>{if(!H.marginLeftKey)return[];const Fe=Y[H.marginLeftKey]??0,le=We(ee),N=Math.max(Fe,Bn),{resolvedWidth:Xe}=P(H,"two-row-bottom");return r.jsx("div",{"data-controls":H.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Xe),style:{position:"absolute",top:0,left:C.scalingValue(le,i),width:C.scalingValue(N,i),height:"100%",pointerEvents:"auto"}},H.marginLeftKey)}),Me=()=>S.map((H,ee)=>{const{maxWidth:Fe}=P(H,"two-row-bottom"),N=pe(ee)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":H.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Fe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:C.scalingValue(N,i),width:C.scalingValue(gn,i),height:"100%",pointerEvents:"auto"}})},`${H.widthKey}-junction`)}),Se=()=>!o||L?null:r.jsxs(r.Fragment,{children:[oe(),fe()]}),_=!!(t.title2||t.title3||(g??0)>0||o),me=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[ie||ae?Q():null,se?U("single-row"):null,ae?ge(Z(t)):r.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),ue(),Se()]}),re=()=>r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,..._?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:_?void 0:{flex:"0 0 auto",height:"auto"},children:z(t,!0)}),Se()]});return r.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:k,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...L?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${L?` ${e}-lightbox-content-area-stacked`:""}`,children:r.jsx("div",{className:`${e}-text-bar-cell${L?` ${e}-text-bar-cell-stacked`:""}`,style:L?void 0:{flex:1,minWidth:0,width:"100%"},children:L?re():me()})})})]})}function Lh(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Rh(e){return`
7224
7237
  .${e}-wrapper {
7225
7238
  display: grid;
7226
7239
  align-items: start;
@@ -7540,7 +7553,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
7540
7553
  pointer-events: auto;
7541
7554
  flex-shrink: 0;
7542
7555
  }
7543
- `}const qs={url:"",name:"",objectFit:"cover"},$n=500,to=650,un="cubic-bezier(0.22, 1, 0.36, 1)",Ih=72,Eh=50,Mh=1e4,Ph=650,kh=500;function Ah(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,s=e.top-t.top;return`translate(${o}px, ${s}px) scale(${n}, ${i})`}function Pc(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=gr(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 Fh(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?Pc(i,n):null}function Wh(e){return e.reduce((t,n,i)=>{const o=rs(n.gallery),l=as(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 ao(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 Us(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return ao(e,i,n)}const _h=.03;function kc(e){return e.width*_h}const Jr={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Go(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Xs(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Hh(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Ia(e,t,n){const i=e.getBoundingClientRect(),o=i.width,s=i.height,l=t/n,d=o/s;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(s-u)/2}}const c=s*l;return{width:c,height:s,left:i.left+(o-c)/2,top:i.top}}function Nh(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Ia(e,t.width,t.height)}function Oh(e,t){if(Ji(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 Dh(e){const t=new Set,n=[];for(const i of e){const o=rs(i.gallery),s=as(o);for(const l of s)for(const d of[l.displayMedia,l.lightboxMedia])d!=null&&d.url&&!t.has(d.url)&&(t.add(d.url),n.push(d))}return n}function jh({mediaList:e}){return e.length===0?null:r.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Ji(t)?r.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):r.jsx("img",{src:t.url,alt:""},t.url))})}function ji(e,t,n){const{width:i,height:o,top:s}=e,{left:l,width:d}=n,c=kc(n);return t==="left"?{left:l+c-i,top:s,width:i,height:o}:{left:l+d-c,top:s,width:i,height:o}}function hr(e,t,n){const i=ji(e,t,n);return{...i,left:2*i.left-e.left}}function zh(e,t,n){const{left:i,width:o}=n,s=kc(n);return t==="left"?{left:i,top:e.top,width:s,height:e.height}:{left:i+o-s,top:e.top,width:s,height:e.height}}function Ac(e,t,n,i){const o=ji(e,"left",i),s=ji(e,"right",i),l=hr(e,"left",i),d=hr(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:s,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:s};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:s};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:s,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function Bh(e,t,n,i){const{start:o,end:s}=Ac(e,t,n,i);return{x:s.left-o.left,y:s.top-o.top}}function Vh(e,t,n){const i=ji(e,t,n),o=hr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Fc(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 rs(e){if(!e)return;if(Fc(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??qs,i??o??qs]}]}function Gh(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function qh(e){const[t]=e.media;return t!=null&&t.url?t:null}function as(e){if(!Array.isArray(e)||e.length===0)return[];if(Fc(e)){const t=[];for(const n of e){const i=Gh(n);if(!i)continue;const o=qh(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 Ji(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function Uh({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return Ji(e)?r.jsx("video",{src:e.url,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onClick:o}):r.jsx("img",{src:e.url,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function Xh({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:s,onTransitionEnd:l}){const d=a.useRef(null);return a.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),r.jsx("div",{style:i,onTransitionEnd:l,children:r.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:s,onClick:c=>c.stopPropagation(),style:o},e)})}function qo({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Ji(e)?r.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const s=o.currentTarget;s.videoWidth>0&&s.videoHeight>0&&(i==null||i(e.url,s.videoWidth,s.videoHeight))},onTransitionEnd:n}):r.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const s=o.currentTarget;s.naturalWidth>0&&s.naturalHeight>0&&(i==null||i(e.url,s.naturalWidth,s.naturalHeight))},onTransitionEnd:n})}function Kh({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:p,layoutId:v,sourceRect:y,resolveCloseSourceRect:g,onClose:h,onPrev:m,onNext:b}){const I=a.useRef(null),R=a.useRef(null),T=a.useRef(null),G=a.useRef(new Map),[k,V]=a.useState(0),A=a.useRef(null),L=a.useRef(0),D=a.useRef(0),x=a.useRef("none"),W=a.useRef(!1),M=a.useRef(!1),Y=a.useRef(!1),F=a.useRef(null),X=a.useRef(null),j=a.useRef(null),B=a.useRef(()=>{}),ne=a.useRef(null),S=a.useRef(null),E=a.useRef(null),O=a.useRef(!1),[ae,ie]=a.useState(null),[$,re]=a.useState(Jr),[P,te]=a.useState(0),[K,fe]=a.useState("opening"),[We,me]=a.useState(0),[ce,U]=a.useState(0),[Q,Z]=a.useState(!1),[ke,we]=a.useState(null),[Pe,de]=a.useState(null),[ge,be]=a.useState(null),[z,se]=a.useState(!1),[he,ye]=a.useState(null),[Me,Le]=a.useState(!1),_=a.useRef(!1),[pe,oe]=a.useState(!1),[H,ee]=a.useState(!1),Fe=a.useRef(n),le=a.useRef(void 0),N=t[n],Ue=N?Ji(N):!1,je=ce!==0||Q,gt=!l&&(!s||!!d),rt=c&&!l,ht=u.length>1,lt=a.useCallback((w,xe)=>t.length<=1?null:t[(w+xe+t.length)%t.length]??null,[t]),Ge=ht?ao(u,p,-1):lt(n,-1),ve=ht?ao(u,p,1):lt(n,1),_e=ke===-1&&je?ht&&Pe!==null?ao(u,Pe,-1):ge!==null?lt(ge,-1):null:null,ze=ke===1&&je?ht&&Pe!==null?ao(u,Pe,1):ge!==null?lt(ge,1):null:null,Ke=_e&&_e.url!==(Ge==null?void 0:Ge.url)?_e:null,Se=ze&&ze.url!==(ve==null?void 0:ve.url)?ze:null,De=Ge&&rt?(()=>{const w=ht?Us(u,p,-1):t.length>2?lt((n-1+t.length)%t.length,-1):null;return w&&w.url!==Ge.url?w:null})():null,Ve=ve&&rt?(()=>{const w=ht?Us(u,p,1):t.length>2?lt((n+1)%t.length,1):null;return w&&w.url!==ve.url?w:null})():null,et=Ke??De,Ae=Se??Ve,$e=a.useCallback((w,xe,Re)=>{if(!w||!xe||!Re)return;const He=G.current,at=He.get(w);(at==null?void 0:at.width)===xe&&(at==null?void 0:at.height)===Re||(He.set(w,{width:xe,height:Re}),V(Mt=>Mt+1))},[]),tt=a.useCallback(w=>{if(!(w!=null&&w.url))return null;const xe=G.current.get(w.url);return Nh(R.current,xe)},[k,P]),Ze=a.useCallback(()=>{if(!N)return;const w=tt(N);if(w){ie(w);return}const xe=R.current;xe&&ie(Xs(xe))},[N,tt]),Ie=a.useCallback(w=>{if(ht){const xe=u.length;de((p+w+xe)%xe),be(null);return}t.length>1&&(be((n+w+t.length)%t.length),de(null))},[ht,u.length,p,t.length,n]),qe=a.useCallback(w=>{Y.current=w,Z(w)},[]),Ee=a.useCallback(()=>{F.current!==null&&(window.clearTimeout(F.current),F.current=null)},[]),Je=a.useCallback(()=>{Ee(),F.current=window.setTimeout(()=>{Ee(),qe(!1)},to+32)},[Ee,qe]),Qe=a.useCallback(()=>{const w=I.current;if(!w){re({left:0,top:0,width:typeof window<"u"?window.innerWidth:Jr.width,height:typeof window<"u"?window.innerHeight:Jr.height});return}const xe=w.getBoundingClientRect();re({left:xe.left,top:xe.top,width:xe.width,height:xe.height})},[]),st=a.useCallback((w,xe)=>{if(je){if(pe&&!Q)return`translate(${ce}px, 0px)`;if(Q&&ke!==null){const Re=tt(w);if(!Re)return;const{x:He,y:at}=Bh(Re,xe,ke,$);return`translate(${He}px, ${at}px)`}if(Q)return"translate(0px, 0px)"}},[je,pe,Q,ce,ke,$,tt]),St=a.useCallback(()=>{const w=X.current;X.current=null,Ee(),qe(!1),we(null),de(null),be(null),U(0),oe(!1),W.current=!1,D.current=0,x.current="none",w===-1?m():w===1&&b()},[Ee,qe,m,b]),Pt=a.useCallback(()=>{Ee(),F.current=window.setTimeout(()=>{X.current!==null&&St()},to+32)},[Ee,St]),Nt=a.useCallback(()=>{Ee(),X.current=null,qe(!1),we(null),de(null),be(null),U(0),oe(!1),W.current=!1,D.current=0,x.current="none"},[Ee,qe]),dt=a.useCallback(w=>{if(!(!rt||!ae)){if(Y.current){if(X.current===w){j.current=w,St();return}Nt()}Ee(),Ie(w),X.current=w,we(w),qe(!0),Pt()}},[rt,ae,St,Nt,Ee,Ie,qe,Pt]);B.current=dt;const yt=a.useCallback(()=>{ne.current=null,O.current=!1,S.current!==null&&(window.clearInterval(S.current),S.current=null),E.current!==null&&(window.clearTimeout(E.current),E.current=null)},[]),Ot=a.useCallback(w=>{S.current!==null&&window.clearInterval(S.current);const xe=O.current?kh:Ph;S.current=window.setInterval(()=>{B.current(w)},xe)},[]),Ft=a.useCallback(w=>{ne.current!==w&&(yt(),ne.current=w,O.current=!1,B.current(w),Ot(w),E.current=window.setTimeout(()=>{E.current=null,ne.current===w&&(O.current=!0,Ot(w))},Mh))},[yt,Ot]),bt=a.useCallback(()=>{const w=R.current;if(!w)return;const xe=N==null?void 0:N.url,Re=xe?G.current.get(xe):void 0;if(Re!=null&&Re.width&&(Re!=null&&Re.height)){ie(Ia(w,Re.width,Re.height));return}const He=T.current;if(He&&xe&&(He.src===xe||He.currentSrc===xe)){const{width:Mt,height:it}=Hh(He);if(Mt&&it){$e(xe,Mt,it),ie(Ia(w,Mt,it));return}}const at=Xs(w);!at.width||!at.height||ie(at)},[N==null?void 0:N.url,$e]),Wt=a.useCallback(w=>{if(T.current=w,!!w){if(w instanceof HTMLVideoElement){w.readyState>=1&&w.videoWidth>0&&bt();return}w.complete&&w.naturalWidth>0&&bt()}},[bt]),Gt=a.useCallback(()=>{Qe(),bt(),te(w=>w+1)},[Qe,bt]);a.useEffect(()=>{Gt();const w=R.current,xe=I.current,Re=new ResizeObserver(()=>Gt());return w&&Re.observe(w),xe&&Re.observe(xe),window.addEventListener("resize",Gt),()=>{Re.disconnect(),window.removeEventListener("resize",Gt)}},[Gt,n,v]),a.useLayoutEffect(()=>{if(!N)return;const w=T.current;if(w){if(w instanceof HTMLImageElement&&w.complete&&w.naturalWidth>0){bt();return}w instanceof HTMLVideoElement&&w.readyState>=1&&w.videoWidth>0&&bt()}},[N==null?void 0:N.url,n,bt]),a.useEffect(()=>{Ze()},[Ze,k]),a.useEffect(()=>{const w=new Set,xe=[],Re=He=>{!(He!=null&&He.url)||w.has(He.url)||(w.add(He.url),xe.push(He))};t.forEach(Re),u.forEach(He=>He.items.forEach(Re)),xe.forEach(He=>{G.current.has(He.url)||Oh(He,$e)})},[t,u,$e]),a.useEffect(()=>{if(K!=="opening"||!ae)return;if(!y){fe("open");return}se(!1);const w=requestAnimationFrame(()=>{requestAnimationFrame(()=>{se(!0),fe("open")})});return()=>cancelAnimationFrame(w)},[K,ae,y]),a.useEffect(()=>{if(K!=="closing")return;const w=setTimeout(()=>h(),$n);return()=>clearTimeout(w)},[K,h]),a.useEffect(()=>()=>{Ee()},[Ee]),a.useLayoutEffect(()=>{Fe.current===n&&le.current===(N==null?void 0:N.url)||(Ee(),X.current=null,we(null),de(null),be(null),me(0),U(0),qe(!1),ee(!1),oe(!1),L.current=0,D.current=0,x.current="none",W.current=!1,A.current=null,M.current=!1,T.current=null,Ze(),Fe.current=n,le.current=N==null?void 0:N.url)},[n,N==null?void 0:N.url,qe,Ee,Ze]),a.useLayoutEffect(()=>{const w=j.current;w!==null&&(j.current=null,requestAnimationFrame(()=>{B.current(w)}))},[n,p,N==null?void 0:N.url]),a.useLayoutEffect(()=>{if(K==="opening"){_.current=!1,Le(!1);return}if(K!=="open"||_.current)return;if(!Ge&&!ve){_.current=!0;return}Le(!1);const w=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Le(!0),_.current=!0})});return()=>cancelAnimationFrame(w)},[K,Ge==null?void 0:Ge.url,ve==null?void 0:ve.url]),a.useEffect(()=>{if(K!=="open")return;const w=()=>{const it=xt=>{xt.stopPropagation(),xt.preventDefault(),document.removeEventListener("click",it,!0)};document.addEventListener("click",it,!0)},xe=it=>{const xt=it<0?1:-1;Ee(),Ie(xt),X.current=xt,we(xt),qe(!0),Pt()},Re=it=>{if(Math.abs(it)>Eh&&rt){xe(it);return}X.current=null,we(null),de(null),be(null),qe(!0),U(0),Je()},He=it=>{if(it.touches.length!==1||Y.current)return;const xt=it.touches[0];M.current=!0,A.current={x:xt.clientX,y:xt.clientY},x.current="none",D.current=0,W.current=!1},at=it=>{if(!A.current||it.touches.length!==1||Y.current)return;const xt=it.touches[0],zt=xt.clientX-A.current.x,Lt=xt.clientY-A.current.y;if(x.current==="none"){if(Math.abs(zt)<10&&Math.abs(Lt)<10)return;if(Math.abs(zt)>Math.abs(Lt)){if(!rt)return;x.current="horizontal"}else if(Lt>0){if(!gt)return;x.current="vertical"}else return}if(x.current==="horizontal"){W.current=!0,oe(!0),D.current=zt,U(zt),it.preventDefault();return}x.current==="vertical"&&(W.current=!0,oe(!0),L.current=Lt,me(Lt),it.preventDefault())},Mt=()=>{if(!A.current)return;const it=x.current,xt=W.current;if(xt&&it==="horizontal")Re(D.current),w();else if(xt&&it==="vertical"){const zt=L.current;if(gt&&zt>Ih){const Lt=window.innerHeight;L.current=Lt,ee(!0),me(Lt),fe("closing")}else L.current=0,me(0);w()}else it==="horizontal"&&Math.abs(D.current)>0&&(Re(D.current),w());A.current=null,x.current="none",D.current=0,W.current=!1,oe(!1)};return document.addEventListener("touchstart",He,{passive:!0}),document.addEventListener("touchmove",at,{passive:!1}),document.addEventListener("touchend",Mt),document.addEventListener("touchcancel",Mt),()=>{document.removeEventListener("touchstart",He),document.removeEventListener("touchmove",at),document.removeEventListener("touchend",Mt),document.removeEventListener("touchcancel",Mt)}},[K,rt,qe,Je,Ee,gt,Pt,Ie]);const Zt=a.useCallback(()=>{const w=(g==null?void 0:g())??y??null;w&&ae&&(ye(w),se(!0)),fe("closing")},[g,y,ae]);a.useEffect(()=>{const w=He=>{if(He.key==="Escape"){if(s&&d||K==="closing")return;yt(),Zt();return}if(He.key!=="ArrowLeft"&&He.key!=="ArrowRight"||K!=="open"||!rt)return;He.preventDefault();const at=He.key==="ArrowLeft"?-1:1;He.repeat&&ne.current===at||Ft(at)},xe=He=>{if(He.key!=="ArrowLeft"&&He.key!=="ArrowRight")return;const at=He.key==="ArrowLeft"?-1:1;ne.current===at&&yt()},Re=()=>{yt()};return window.addEventListener("keydown",w),window.addEventListener("keyup",xe),window.addEventListener("blur",Re),()=>{window.removeEventListener("keydown",w),window.removeEventListener("keyup",xe),window.removeEventListener("blur",Re),yt()}},[K,s,d,Zt,rt,Ft,yt]),a.useEffect(()=>{K!=="open"&&yt()},[K,yt]);const en=()=>{K==="closing"||l||Zt()},Tt=K==="open",_t=K==="closing",nn=We>0?Math.max(0,1-We/500):1,ct=We>0?Math.max(.35,1-We/500):1,Te=a.useCallback(w=>{if(!(w.propertyName!=="transform"||!Y.current)){if(X.current!==null){St();return}Ee(),qe(!1)}},[Ee,qe,St]),Ne=K==="closing"?he??y:y,nt=Ne&&ae&&(K==="opening"||_t)?Ah(Ne,ae):void 0,pt=je&&N?st(N,"center"):We>0?`translateY(${We}px)`:nt,vt=ae?Go(ae,$):null,It=!!(Ne&&ae),ft=It&&(K==="closing"||K==="open"&&z),Bt={position:"absolute",top:vt==null?void 0:vt.top,left:vt==null?void 0:vt.left,width:vt==null?void 0:vt.width,height:vt==null?void 0:vt.height,objectFit:"contain",transformOrigin:"top left",transform:pt,opacity:We>0?ct:It?1:K==="opening"||_t?0:1,transition:pe&&!Q?"none":Q?`transform ${to}ms ${un}`:H?`transform ${$n}ms ${un}, opacity ${$n}ms ${un}`:ft?`transform ${$n}ms ${un}`:K==="opening"||_t?`opacity ${$n}ms ${un}`:"none",pointerEvents:Ue&&Tt&&!je?"auto":"none",touchAction:Ue&&Tt?"none":void 0,zIndex:1,overflow:Ue?"hidden":void 0},At={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Tt&&!je?"auto":"none"},kt=(w,xe,Re="adjacent")=>{const He=tt(w);if(!He)return{display:"none"};const at=Re==="far"?xe==="left"?"far-left":"far-right":xe==="left"?"left-adjacent":"right-adjacent",{start:Mt}=ke!==null?Ac(He,at,ke,$):{start:Re==="far"?hr(He,xe,$):ji(He,xe,$)},it=Go(Mt,$),xt=st(w,at),zt=!je&&Re==="adjacent"&&Tt&&!Me?Vh(He,xe,$):null,Lt=Re==="far"&&je&&ke===(xe==="left"?-1:1),on=pe&&!Q?!1:Q,dn=Re==="adjacent"&&Tt&&Me&&!je;return{position:"absolute",top:it.top,left:it.left,width:it.width,height:it.height,objectFit:"contain",transform:xt??(zt?`translate(${zt.x}px, ${zt.y}px)`:void 0),opacity:Re==="far"?Tt&&Lt?1:0:Tt?1:0,transition:on?Re==="far"?`transform ${to}ms ${un}`:`transform ${to}ms ${un}, opacity ${$n}ms ${un}`:dn?`transform ${$n}ms ${un}`:K==="opening"||_t?`opacity ${$n}ms ${un}`:"none",pointerEvents:"none",zIndex:1}},qt=(w,xe)=>{const Re=tt(w);return Re?zh(ji(Re,xe,$),xe,$):null},Ut=w=>xe=>{if(!l){if(M.current){M.current=!1;return}xe.stopPropagation(),dt(w)}},Dt=Ge?qt(Ge,"left"):null,jt=ve?qt(ve,"right"):null,Ht=Dt?Go(Dt,$):null,$t=jt?Go(jt,$):null;return r.jsxs("div",{ref:I,className:[`${e}-lightbox`,s?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:K==="open"?"none":void 0},onClick:en,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Tt?nn:0,transition:pe?"none":`opacity ${$n}ms ${un}`,pointerEvents:"none"}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[r.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:R,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:Tt?1:0,transition:pe?"none":`opacity ${$n}ms ${un}`,pointerEvents:"none"},children:r.jsx(Mc,{prefix:e,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,onClose:en})})]}),Tt&&et&&r.jsx(qo,{media:et,style:kt(et,"left","far"),onMeasure:$e,onTransitionEnd:Te},`far-prev-${et.url}`),Tt&&Ge&&r.jsxs(r.Fragment,{children:[r.jsx(qo,{media:Ge,style:kt(Ge,"left"),onMeasure:$e,onTransitionEnd:Te},`prev-${Ge.url}`),Ht&&r.jsx("div",{style:{position:"absolute",top:Ht.top,left:Ht.left,width:Ht.width,height:Ht.height,cursor:l||pe?"default":"pointer",pointerEvents:l||pe?"none":"auto",zIndex:3},onClick:Ut(-1)})]}),Tt&&ve&&r.jsxs(r.Fragment,{children:[r.jsx(qo,{media:ve,style:kt(ve,"right"),onMeasure:$e,onTransitionEnd:Te},`next-${ve.url}`),$t&&r.jsx("div",{style:{position:"absolute",top:$t.top,left:$t.left,width:$t.width,height:$t.height,cursor:l||pe?"default":"pointer",pointerEvents:l||pe?"none":"auto",zIndex:3},onClick:Ut(1)})]}),Tt&&Ae&&r.jsx(qo,{media:Ae,style:kt(Ae,"right","far"),onMeasure:$e,onTransitionEnd:Te},`far-next-${Ae.url}`),ae&&N&&(Ue?r.jsx(Xh,{src:N.url,phase:K,onMediaElement:Wt,wrapperStyle:Bt,videoStyle:At,onLoadedMetadata:bt,onTransitionEnd:Te},`${n}-${N.url}`):r.jsx("img",{ref:Wt,src:N.url,alt:N.name,onLoad:bt,onTransitionEnd:Te,style:Bt},`${n}-${N.url}`))]})}function Yh({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:s,portalId:l}){const{prefix:d}=C.useScopedStyles(),{gridLayout:c,verticalGap:u,align:p="top",imageDisplay:v}=e,y=(v==null?void 0:v.display)==="cover",g=(v==null?void 0:v.ratioValue)??"1:1",h=(v==null?void 0:v.reversed)??!1,[m,b]=g.split(":").map(Number),T=`${h?b:m} / ${h?m:b}`,G=c.entryWidth??.2,k=c.columnsCount,V=C.scalingValue(G,n),A=C.scalingValue(c.horizontalGap??0,n),L=V,D=V,x={width:L,...y?{aspectRatio:T,height:"auto",overflow:"hidden"}:{height:"auto"}},W=y?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},M=a.useRef(null),[Y,F]=a.useState(!1),[X,j]=a.useState([]),[B,ne]=a.useState(0),[S,E]=a.useState(0),[O,ae]=a.useState(null),[ie,$]=a.useState({title1:"",title2:"",title3:""}),re=(()=>{const ge={},be=M.current?getComputedStyle(M.current).getPropertyValue("--cntrl-article-width").trim():"";return be&&(ge["--cntrl-article-width"]=be),ge})(),P=!n||i||o,te=a.useMemo(()=>Rh(d),[d]),K=t??[],fe=K.length%k||k,We=fe<k&&K.length>0,me=K.length-fe,ce=We?Math.floor((k-fe)/2)+1:1,U=a.useMemo(()=>Wh(K),[K]),Q=a.useMemo(()=>Dh(K),[K]),Z=(ge,be,z)=>{if(n&&!o&&!i)return;const se=U.findIndex(ye=>ye.gridIndex===ge);if(se<0)return;const he=U[se];E(se),j(he.items),ne(be),$(he.entry),ae(z??null),F(!0)},ke=a.useCallback(()=>{F(!1),ae(null)},[]),we=a.useCallback(()=>{const ge=U[S];return!ge||!M.current?O:Fh(M.current,ge.gridIndex,y?"cover":"contain")??O},[U,S,O,y]),Pe=a.useCallback(ge=>{if(U.length>1){const be=U.length,z=(S+ge+be)%be,se=U[z],he=Math.min(B,se.items.length-1);E(z),j(se.items),ne(he),$(se.entry);return}ne(be=>(be+ge+X.length)%X.length)},[U,S,B,X.length]),de=U.length>1||X.length>1;return a.useEffect(()=>{if(!Y||typeof document>"u")return;const ge=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ge}},[Y]),a.useEffect(()=>{!n||o||i||F(!1)},[n,o,i]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:te}}),r.jsx(jh,{mediaList:Q}),r.jsx("div",{ref:M,className:`${d}-wrapper ${d}-align-entries ${d}-image-align-${p}`.trim(),style:{gridTemplateColumns:`repeat(${k}, ${V})`,rowGap:0,columnGap:A,width:C.scalingValue(c.wrapperWidth??0,n),[`--${d}-align-entries-row-gap`]:C.scalingValue(u??0,n)},children:K.map((ge,be)=>{const z=rs(ge.gallery),se=as(z),he=se.filter(oe=>oe.lightboxMedia).map(oe=>oe.lightboxMedia),ye=Math.floor(be/k)===Math.ceil(K.length/k)-1,Me=We&&be>=me?`${ce+(be-me)}`:void 0,Le=se[0],_=Le!=null&&Le.lightboxMedia?he.findIndex(oe=>oe.url===Le.lightboxMedia.url):-1,pe=r.jsx("div",{className:`${d}-item-image-wrapper`,style:x,children:se.length>0&&r.jsx(Uh,{media:Le.displayMedia,gridIndex:be,className:`${d}-item-${Ji(Le.displayMedia)?"video":"image"}`.trim(),style:W,onMediaClick:P&&_>=0?oe=>Z(be,_,Pc(oe.currentTarget,y?"cover":"contain")):void 0})});return r.jsx("div",{className:`${d}-item`,children:r.jsxs("div",{className:[o?`${d}-item-inner`:`${d}-item-inner-hidden`,ye?`${d}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:V,...Me?{gridColumn:Me}:{}},children:[r.jsx("div",{className:`${d}-item-title-row`,children:r.jsx("div",{style:{height:0,width:D}})}),r.jsx("a",{className:`${d}-item-image-link`,children:pe}),r.jsx("div",{className:`${d}-item-subtitle-row`,children:r.jsx("div",{style:{height:0,width:D}})})]})},be)})}),Y&&typeof document<"u"&&(()=>{const ge=(l?document.getElementById(l):null)??document.body;return Yn.createPortal(r.jsx("div",{style:re,"data-selection":"none",children:r.jsx(Kh,{prefix:d,items:X,index:B,entry:ie,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:de,lightboxEntries:U,entryIdx:S,layoutId:s,sourceRect:O,resolveCloseSourceRect:we,onClose:ke,onPrev:()=>Pe(-1),onNext:()=>Pe(1)})}),ge)})()]})}const Zh=`import { CommonComponentProps } from '../props';
7556
+ `}const qs={url:"",name:"",objectFit:"cover"},$n=500,to=650,un="cubic-bezier(0.22, 1, 0.36, 1)",Ih=72,Eh=50,Mh=1e4,Ph=650,kh=500;function Ah(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,s=e.top-t.top;return`translate(${o}px, ${s}px) scale(${n}, ${i})`}function Pc(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=gr(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 Fh(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?Pc(i,n):null}function Wh(e){return e.reduce((t,n,i)=>{const o=rs(n.gallery),l=as(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 ao(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 Us(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return ao(e,i,n)}const _h=.03;function kc(e){return e.width*_h}const Jr={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Go(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Xs(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Hh(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Ia(e,t,n){const i=e.getBoundingClientRect(),o=i.width,s=i.height,l=t/n,d=o/s;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(s-u)/2}}const c=s*l;return{width:c,height:s,left:i.left+(o-c)/2,top:i.top}}function Nh(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Ia(e,t.width,t.height)}function Oh(e,t){if(Ji(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 Dh(e){const t=new Set,n=[];for(const i of e){const o=rs(i.gallery),s=as(o);for(const l of s)for(const d of[l.displayMedia,l.lightboxMedia])d!=null&&d.url&&!t.has(d.url)&&(t.add(d.url),n.push(d))}return n}function jh({mediaList:e}){return e.length===0?null:r.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Ji(t)?r.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):r.jsx("img",{src:t.url,alt:""},t.url))})}function ji(e,t,n){const{width:i,height:o,top:s}=e,{left:l,width:d}=n,c=kc(n);return t==="left"?{left:l+c-i,top:s,width:i,height:o}:{left:l+d-c,top:s,width:i,height:o}}function hr(e,t,n){const i=ji(e,t,n);return{...i,left:2*i.left-e.left}}function zh(e,t,n){const{left:i,width:o}=n,s=kc(n);return t==="left"?{left:i,top:e.top,width:s,height:e.height}:{left:i+o-s,top:e.top,width:s,height:e.height}}function Ac(e,t,n,i){const o=ji(e,"left",i),s=ji(e,"right",i),l=hr(e,"left",i),d=hr(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:s,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:s};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:s};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:s,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function Bh(e,t,n,i){const{start:o,end:s}=Ac(e,t,n,i);return{x:s.left-o.left,y:s.top-o.top}}function Vh(e,t,n){const i=ji(e,t,n),o=hr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Fc(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 rs(e){if(!e)return;if(Fc(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??qs,i??o??qs]}]}function Gh(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function qh(e){const[t]=e.media;return t!=null&&t.url?t:null}function as(e){if(!Array.isArray(e)||e.length===0)return[];if(Fc(e)){const t=[];for(const n of e){const i=Gh(n);if(!i)continue;const o=qh(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 Ji(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function Uh({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return Ji(e)?r.jsx("video",{src:e.url,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onClick:o}):r.jsx("img",{src:e.url,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function Xh({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:s,onTransitionEnd:l}){const d=a.useRef(null);return a.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),r.jsx("div",{style:i,onTransitionEnd:l,children:r.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:s,onClick:c=>c.stopPropagation(),style:o},e)})}function qo({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Ji(e)?r.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const s=o.currentTarget;s.videoWidth>0&&s.videoHeight>0&&(i==null||i(e.url,s.videoWidth,s.videoHeight))},onTransitionEnd:n}):r.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const s=o.currentTarget;s.naturalWidth>0&&s.naturalHeight>0&&(i==null||i(e.url,s.naturalWidth,s.naturalHeight))},onTransitionEnd:n})}function Kh({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:p,layoutId:v,sourceRect:y,resolveCloseSourceRect:g,onClose:h,onPrev:m,onNext:b}){const I=a.useRef(null),R=a.useRef(null),T=a.useRef(null),G=a.useRef(new Map),[k,V]=a.useState(0),A=a.useRef(null),L=a.useRef(0),D=a.useRef(0),x=a.useRef("none"),W=a.useRef(!1),M=a.useRef(!1),Y=a.useRef(!1),F=a.useRef(null),X=a.useRef(null),j=a.useRef(null),B=a.useRef(()=>{}),ne=a.useRef(null),S=a.useRef(null),E=a.useRef(null),O=a.useRef(!1),[ae,ie]=a.useState(null),[$,se]=a.useState(Jr),[P,te]=a.useState(0),[K,he]=a.useState("opening"),[We,pe]=a.useState(0),[ce,U]=a.useState(0),[Q,Z]=a.useState(!1),[ke,we]=a.useState(null),[Ae,ue]=a.useState(null),[ge,be]=a.useState(null),[z,oe]=a.useState(!1),[fe,ye]=a.useState(null),[Me,Se]=a.useState(!1),_=a.useRef(!1),[me,re]=a.useState(!1),[H,ee]=a.useState(!1),Fe=a.useRef(n),le=a.useRef(void 0),N=t[n],Xe=N?Ji(N):!1,je=ce!==0||Q,ut=!l&&(!s||!!d),tt=c&&!l,ft=u.length>1,st=a.useCallback((w,xe)=>t.length<=1?null:t[(w+xe+t.length)%t.length]??null,[t]),Ue=ft?ao(u,p,-1):st(n,-1),ve=ft?ao(u,p,1):st(n,1),_e=ke===-1&&je?ft&&Ae!==null?ao(u,Ae,-1):ge!==null?st(ge,-1):null:null,ze=ke===1&&je?ft&&Ae!==null?ao(u,Ae,1):ge!==null?st(ge,1):null:null,Ye=_e&&_e.url!==(Ue==null?void 0:Ue.url)?_e:null,Ce=ze&&ze.url!==(ve==null?void 0:ve.url)?ze:null,Oe=Ue&&tt?(()=>{const w=ft?Us(u,p,-1):t.length>2?st((n-1+t.length)%t.length,-1):null;return w&&w.url!==Ue.url?w:null})():null,Ve=ve&&tt?(()=>{const w=ft?Us(u,p,1):t.length>2?st((n+1)%t.length,1):null;return w&&w.url!==ve.url?w:null})():null,Re=Ye??Oe,Ie=Ce??Ve,qe=a.useCallback((w,xe,Le)=>{if(!w||!xe||!Le)return;const He=G.current,at=He.get(w);(at==null?void 0:at.width)===xe&&(at==null?void 0:at.height)===Le||(He.set(w,{width:xe,height:Le}),V(Mt=>Mt+1))},[]),lt=a.useCallback(w=>{if(!(w!=null&&w.url))return null;const xe=G.current.get(w.url);return Nh(R.current,xe)},[k,P]),Ze=a.useCallback(()=>{if(!N)return;const w=lt(N);if(w){ie(w);return}const xe=R.current;xe&&ie(Xs(xe))},[N,lt]),Ee=a.useCallback(w=>{if(ft){const xe=u.length;ue((p+w+xe)%xe),be(null);return}t.length>1&&(be((n+w+t.length)%t.length),ue(null))},[ft,u.length,p,t.length,n]),Ge=a.useCallback(w=>{Y.current=w,Z(w)},[]),Pe=a.useCallback(()=>{F.current!==null&&(window.clearTimeout(F.current),F.current=null)},[]),Je=a.useCallback(()=>{Pe(),F.current=window.setTimeout(()=>{Pe(),Ge(!1)},to+32)},[Pe,Ge]),nt=a.useCallback(()=>{const w=I.current;if(!w){se({left:0,top:0,width:typeof window<"u"?window.innerWidth:Jr.width,height:typeof window<"u"?window.innerHeight:Jr.height});return}const xe=w.getBoundingClientRect();se({left:xe.left,top:xe.top,width:xe.width,height:xe.height})},[]),et=a.useCallback((w,xe)=>{if(je){if(me&&!Q)return`translate(${ce}px, 0px)`;if(Q&&ke!==null){const Le=lt(w);if(!Le)return;const{x:He,y:at}=Bh(Le,xe,ke,$);return`translate(${He}px, ${at}px)`}if(Q)return"translate(0px, 0px)"}},[je,me,Q,ce,ke,$,lt]),St=a.useCallback(()=>{const w=X.current;X.current=null,Pe(),Ge(!1),we(null),ue(null),be(null),U(0),re(!1),W.current=!1,D.current=0,x.current="none",w===-1?m():w===1&&b()},[Pe,Ge,m,b]),Wt=a.useCallback(()=>{Pe(),F.current=window.setTimeout(()=>{X.current!==null&&St()},to+32)},[Pe,St]),At=a.useCallback(()=>{Pe(),X.current=null,Ge(!1),we(null),ue(null),be(null),U(0),re(!1),W.current=!1,D.current=0,x.current="none"},[Pe,Ge]),gt=a.useCallback(w=>{if(!(!tt||!ae)){if(Y.current){if(X.current===w){j.current=w,St();return}At()}Pe(),Ee(w),X.current=w,we(w),Ge(!0),Wt()}},[tt,ae,St,At,Pe,Ee,Ge,Wt]);B.current=gt;const xt=a.useCallback(()=>{ne.current=null,O.current=!1,S.current!==null&&(window.clearInterval(S.current),S.current=null),E.current!==null&&(window.clearTimeout(E.current),E.current=null)},[]),zt=a.useCallback(w=>{S.current!==null&&window.clearInterval(S.current);const xe=O.current?kh:Ph;S.current=window.setInterval(()=>{B.current(w)},xe)},[]),Ft=a.useCallback(w=>{ne.current!==w&&(xt(),ne.current=w,O.current=!1,B.current(w),zt(w),E.current=window.setTimeout(()=>{E.current=null,ne.current===w&&(O.current=!0,zt(w))},Mh))},[xt,zt]),bt=a.useCallback(()=>{const w=R.current;if(!w)return;const xe=N==null?void 0:N.url,Le=xe?G.current.get(xe):void 0;if(Le!=null&&Le.width&&(Le!=null&&Le.height)){ie(Ia(w,Le.width,Le.height));return}const He=T.current;if(He&&xe&&(He.src===xe||He.currentSrc===xe)){const{width:Mt,height:ot}=Hh(He);if(Mt&&ot){qe(xe,Mt,ot),ie(Ia(w,Mt,ot));return}}const at=Xs(w);!at.width||!at.height||ie(at)},[N==null?void 0:N.url,qe]),_t=a.useCallback(w=>{if(T.current=w,!!w){if(w instanceof HTMLVideoElement){w.readyState>=1&&w.videoWidth>0&&bt();return}w.complete&&w.naturalWidth>0&&bt()}},[bt]),Gt=a.useCallback(()=>{nt(),bt(),te(w=>w+1)},[nt,bt]);a.useEffect(()=>{Gt();const w=R.current,xe=I.current,Le=new ResizeObserver(()=>Gt());return w&&Le.observe(w),xe&&Le.observe(xe),window.addEventListener("resize",Gt),()=>{Le.disconnect(),window.removeEventListener("resize",Gt)}},[Gt,n,v]),a.useLayoutEffect(()=>{if(!N)return;const w=T.current;if(w){if(w instanceof HTMLImageElement&&w.complete&&w.naturalWidth>0){bt();return}w instanceof HTMLVideoElement&&w.readyState>=1&&w.videoWidth>0&&bt()}},[N==null?void 0:N.url,n,bt]),a.useEffect(()=>{Ze()},[Ze,k]),a.useEffect(()=>{const w=new Set,xe=[],Le=He=>{!(He!=null&&He.url)||w.has(He.url)||(w.add(He.url),xe.push(He))};t.forEach(Le),u.forEach(He=>He.items.forEach(Le)),xe.forEach(He=>{G.current.has(He.url)||Oh(He,qe)})},[t,u,qe]),a.useEffect(()=>{if(K!=="opening"||!ae)return;if(!y){he("open");return}oe(!1);const w=requestAnimationFrame(()=>{requestAnimationFrame(()=>{oe(!0),he("open")})});return()=>cancelAnimationFrame(w)},[K,ae,y]),a.useEffect(()=>{if(K!=="closing")return;const w=setTimeout(()=>h(),$n);return()=>clearTimeout(w)},[K,h]),a.useEffect(()=>()=>{Pe()},[Pe]),a.useLayoutEffect(()=>{Fe.current===n&&le.current===(N==null?void 0:N.url)||(Pe(),X.current=null,we(null),ue(null),be(null),pe(0),U(0),Ge(!1),ee(!1),re(!1),L.current=0,D.current=0,x.current="none",W.current=!1,A.current=null,M.current=!1,T.current=null,Ze(),Fe.current=n,le.current=N==null?void 0:N.url)},[n,N==null?void 0:N.url,Ge,Pe,Ze]),a.useLayoutEffect(()=>{const w=j.current;w!==null&&(j.current=null,requestAnimationFrame(()=>{B.current(w)}))},[n,p,N==null?void 0:N.url]),a.useLayoutEffect(()=>{if(K==="opening"){_.current=!1,Se(!1);return}if(K!=="open"||_.current)return;if(!Ue&&!ve){_.current=!0;return}Se(!1);const w=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Se(!0),_.current=!0})});return()=>cancelAnimationFrame(w)},[K,Ue==null?void 0:Ue.url,ve==null?void 0:ve.url]),a.useEffect(()=>{if(K!=="open")return;const w=()=>{const ot=vt=>{vt.stopPropagation(),vt.preventDefault(),document.removeEventListener("click",ot,!0)};document.addEventListener("click",ot,!0)},xe=ot=>{const vt=ot<0?1:-1;Pe(),Ee(vt),X.current=vt,we(vt),Ge(!0),Wt()},Le=ot=>{if(Math.abs(ot)>Eh&&tt){xe(ot);return}X.current=null,we(null),ue(null),be(null),Ge(!0),U(0),Je()},He=ot=>{if(ot.touches.length!==1||Y.current)return;const vt=ot.touches[0];M.current=!0,A.current={x:vt.clientX,y:vt.clientY},x.current="none",D.current=0,W.current=!1},at=ot=>{if(!A.current||ot.touches.length!==1||Y.current)return;const vt=ot.touches[0],jt=vt.clientX-A.current.x,Lt=vt.clientY-A.current.y;if(x.current==="none"){if(Math.abs(jt)<10&&Math.abs(Lt)<10)return;if(Math.abs(jt)>Math.abs(Lt)){if(!tt)return;x.current="horizontal"}else if(Lt>0){if(!ut)return;x.current="vertical"}else return}if(x.current==="horizontal"){W.current=!0,re(!0),D.current=jt,U(jt),ot.preventDefault();return}x.current==="vertical"&&(W.current=!0,re(!0),L.current=Lt,pe(Lt),ot.preventDefault())},Mt=()=>{if(!A.current)return;const ot=x.current,vt=W.current;if(vt&&ot==="horizontal")Le(D.current),w();else if(vt&&ot==="vertical"){const jt=L.current;if(ut&&jt>Ih){const Lt=window.innerHeight;L.current=Lt,ee(!0),pe(Lt),he("closing")}else L.current=0,pe(0);w()}else ot==="horizontal"&&Math.abs(D.current)>0&&(Le(D.current),w());A.current=null,x.current="none",D.current=0,W.current=!1,re(!1)};return document.addEventListener("touchstart",He,{passive:!0}),document.addEventListener("touchmove",at,{passive:!1}),document.addEventListener("touchend",Mt),document.addEventListener("touchcancel",Mt),()=>{document.removeEventListener("touchstart",He),document.removeEventListener("touchmove",at),document.removeEventListener("touchend",Mt),document.removeEventListener("touchcancel",Mt)}},[K,tt,Ge,Je,Pe,ut,Wt,Ee]);const Zt=a.useCallback(()=>{const w=(g==null?void 0:g())??y??null;w&&ae&&(ye(w),oe(!0)),he("closing")},[g,y,ae]);a.useEffect(()=>{const w=He=>{if(He.key==="Escape"){if(s&&d||K==="closing")return;xt(),Zt();return}if(He.key!=="ArrowLeft"&&He.key!=="ArrowRight"||K!=="open"||!tt)return;He.preventDefault();const at=He.key==="ArrowLeft"?-1:1;He.repeat&&ne.current===at||Ft(at)},xe=He=>{if(He.key!=="ArrowLeft"&&He.key!=="ArrowRight")return;const at=He.key==="ArrowLeft"?-1:1;ne.current===at&&xt()},Le=()=>{xt()};return window.addEventListener("keydown",w),window.addEventListener("keyup",xe),window.addEventListener("blur",Le),()=>{window.removeEventListener("keydown",w),window.removeEventListener("keyup",xe),window.removeEventListener("blur",Le),xt()}},[K,s,d,Zt,tt,Ft,xt]),a.useEffect(()=>{K!=="open"&&xt()},[K,xt]);const en=()=>{K==="closing"||l||Zt()},$t=K==="open",Ht=K==="closing",nn=We>0?Math.max(0,1-We/500):1,ct=We>0?Math.max(.35,1-We/500):1,Te=a.useCallback(w=>{if(!(w.propertyName!=="transform"||!Y.current)){if(X.current!==null){St();return}Pe(),Ge(!1)}},[Pe,Ge,St]),Ne=K==="closing"?fe??y:y,it=Ne&&ae&&(K==="opening"||Ht)?Ah(Ne,ae):void 0,pt=je&&N?et(N,"center"):We>0?`translateY(${We}px)`:it,yt=ae?Go(ae,$):null,It=!!(Ne&&ae),ht=It&&(K==="closing"||K==="open"&&z),Bt={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:pt,opacity:We>0?ct:It?1:K==="opening"||Ht?0:1,transition:me&&!Q?"none":Q?`transform ${to}ms ${un}`:H?`transform ${$n}ms ${un}, opacity ${$n}ms ${un}`:ht?`transform ${$n}ms ${un}`:K==="opening"||Ht?`opacity ${$n}ms ${un}`:"none",pointerEvents:Xe&&$t&&!je?"auto":"none",touchAction:Xe&&$t?"none":void 0,zIndex:1,overflow:Xe?"hidden":void 0},kt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:$t&&!je?"auto":"none"},Pt=(w,xe,Le="adjacent")=>{const He=lt(w);if(!He)return{display:"none"};const at=Le==="far"?xe==="left"?"far-left":"far-right":xe==="left"?"left-adjacent":"right-adjacent",{start:Mt}=ke!==null?Ac(He,at,ke,$):{start:Le==="far"?hr(He,xe,$):ji(He,xe,$)},ot=Go(Mt,$),vt=et(w,at),jt=!je&&Le==="adjacent"&&$t&&!Me?Vh(He,xe,$):null,Lt=Le==="far"&&je&&ke===(xe==="left"?-1:1),on=me&&!Q?!1:Q,dn=Le==="adjacent"&&$t&&Me&&!je;return{position:"absolute",top:ot.top,left:ot.left,width:ot.width,height:ot.height,objectFit:"contain",transform:vt??(jt?`translate(${jt.x}px, ${jt.y}px)`:void 0),opacity:Le==="far"?$t&&Lt?1:0:$t?1:0,transition:on?Le==="far"?`transform ${to}ms ${un}`:`transform ${to}ms ${un}, opacity ${$n}ms ${un}`:dn?`transform ${$n}ms ${un}`:K==="opening"||Ht?`opacity ${$n}ms ${un}`:"none",pointerEvents:"none",zIndex:1}},qt=(w,xe)=>{const Le=lt(w);return Le?zh(ji(Le,xe,$),xe,$):null},Ut=w=>xe=>{if(!l){if(M.current){M.current=!1;return}xe.stopPropagation(),gt(w)}},Ot=Ue?qt(Ue,"left"):null,Dt=ve?qt(ve,"right"):null,Nt=Ot?Go(Ot,$):null,Ct=Dt?Go(Dt,$):null;return r.jsxs("div",{ref:I,className:[`${e}-lightbox`,s?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:K==="open"?"none":void 0},onClick:en,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:$t?nn:0,transition:me?"none":`opacity ${$n}ms ${un}`,pointerEvents:"none"}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[r.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:R,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:$t?1:0,transition:me?"none":`opacity ${$n}ms ${un}`,pointerEvents:"none"},children:r.jsx(Mc,{prefix:e,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,onClose:en})})]}),$t&&Re&&r.jsx(qo,{media:Re,style:Pt(Re,"left","far"),onMeasure:qe,onTransitionEnd:Te},`far-prev-${Re.url}`),$t&&Ue&&r.jsxs(r.Fragment,{children:[r.jsx(qo,{media:Ue,style:Pt(Ue,"left"),onMeasure:qe,onTransitionEnd:Te},`prev-${Ue.url}`),Nt&&r.jsx("div",{style:{position:"absolute",top:Nt.top,left:Nt.left,width:Nt.width,height:Nt.height,cursor:l||me?"default":"pointer",pointerEvents:l||me?"none":"auto",zIndex:3},onClick:Ut(-1)})]}),$t&&ve&&r.jsxs(r.Fragment,{children:[r.jsx(qo,{media:ve,style:Pt(ve,"right"),onMeasure:qe,onTransitionEnd:Te},`next-${ve.url}`),Ct&&r.jsx("div",{style:{position:"absolute",top:Ct.top,left:Ct.left,width:Ct.width,height:Ct.height,cursor:l||me?"default":"pointer",pointerEvents:l||me?"none":"auto",zIndex:3},onClick:Ut(1)})]}),$t&&Ie&&r.jsx(qo,{media:Ie,style:Pt(Ie,"right","far"),onMeasure:qe,onTransitionEnd:Te},`far-next-${Ie.url}`),ae&&N&&(Xe?r.jsx(Xh,{src:N.url,phase:K,onMediaElement:_t,wrapperStyle:Bt,videoStyle:kt,onLoadedMetadata:bt,onTransitionEnd:Te},`${n}-${N.url}`):r.jsx("img",{ref:_t,src:N.url,alt:N.name,onLoad:bt,onTransitionEnd:Te,style:Bt},`${n}-${N.url}`))]})}function Yh({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:s,portalId:l}){const{prefix:d}=C.useScopedStyles(),{gridLayout:c,verticalGap:u,align:p="top",imageDisplay:v}=e,y=(v==null?void 0:v.display)==="cover",g=(v==null?void 0:v.ratioValue)??"1:1",h=(v==null?void 0:v.reversed)??!1,[m,b]=g.split(":").map(Number),T=`${h?b:m} / ${h?m:b}`,G=c.entryWidth??.2,k=c.columnsCount,V=C.scalingValue(G,n),A=C.scalingValue(c.horizontalGap??0,n),L=V,D=V,x={width:L,...y?{aspectRatio:T,height:"auto",overflow:"hidden"}:{height:"auto"}},W=y?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},M=a.useRef(null),[Y,F]=a.useState(!1),[X,j]=a.useState([]),[B,ne]=a.useState(0),[S,E]=a.useState(0),[O,ae]=a.useState(null),[ie,$]=a.useState({title1:"",title2:"",title3:""}),se=(()=>{const ge={},be=M.current?getComputedStyle(M.current).getPropertyValue("--cntrl-article-width").trim():"";return be&&(ge["--cntrl-article-width"]=be),ge})(),P=!n||i||o,te=a.useMemo(()=>Rh(d),[d]),K=t??[],he=K.length%k||k,We=he<k&&K.length>0,pe=K.length-he,ce=We?Math.floor((k-he)/2)+1:1,U=a.useMemo(()=>Wh(K),[K]),Q=a.useMemo(()=>Dh(K),[K]),Z=(ge,be,z)=>{if(n&&!o&&!i)return;const oe=U.findIndex(ye=>ye.gridIndex===ge);if(oe<0)return;const fe=U[oe];E(oe),j(fe.items),ne(be),$(fe.entry),ae(z??null),F(!0)},ke=a.useCallback(()=>{F(!1),ae(null)},[]),we=a.useCallback(()=>{const ge=U[S];return!ge||!M.current?O:Fh(M.current,ge.gridIndex,y?"cover":"contain")??O},[U,S,O,y]),Ae=a.useCallback(ge=>{if(U.length>1){const be=U.length,z=(S+ge+be)%be,oe=U[z],fe=Math.min(B,oe.items.length-1);E(z),j(oe.items),ne(fe),$(oe.entry);return}ne(be=>(be+ge+X.length)%X.length)},[U,S,B,X.length]),ue=U.length>1||X.length>1;return a.useEffect(()=>{if(!Y||typeof document>"u")return;const ge=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ge}},[Y]),a.useEffect(()=>{!n||o||i||F(!1)},[n,o,i]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:te}}),r.jsx(jh,{mediaList:Q}),r.jsx("div",{ref:M,className:`${d}-wrapper ${d}-align-entries ${d}-image-align-${p}`.trim(),style:{gridTemplateColumns:`repeat(${k}, ${V})`,rowGap:0,columnGap:A,width:C.scalingValue(c.wrapperWidth??0,n),[`--${d}-align-entries-row-gap`]:C.scalingValue(u??0,n)},children:K.map((ge,be)=>{const z=rs(ge.gallery),oe=as(z),fe=oe.filter(re=>re.lightboxMedia).map(re=>re.lightboxMedia),ye=Math.floor(be/k)===Math.ceil(K.length/k)-1,Me=We&&be>=pe?`${ce+(be-pe)}`:void 0,Se=oe[0],_=Se!=null&&Se.lightboxMedia?fe.findIndex(re=>re.url===Se.lightboxMedia.url):-1,me=r.jsx("div",{className:`${d}-item-image-wrapper`,style:x,children:oe.length>0&&r.jsx(Uh,{media:Se.displayMedia,gridIndex:be,className:`${d}-item-${Ji(Se.displayMedia)?"video":"image"}`.trim(),style:W,onMediaClick:P&&_>=0?re=>Z(be,_,Pc(re.currentTarget,y?"cover":"contain")):void 0})});return r.jsx("div",{className:`${d}-item`,children:r.jsxs("div",{className:[o?`${d}-item-inner`:`${d}-item-inner-hidden`,ye?`${d}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:V,...Me?{gridColumn:Me}:{}},children:[r.jsx("div",{className:`${d}-item-title-row`,children:r.jsx("div",{style:{height:0,width:D}})}),r.jsx("a",{className:`${d}-item-image-link`,children:me}),r.jsx("div",{className:`${d}-item-subtitle-row`,children:r.jsx("div",{style:{height:0,width:D}})})]})},be)})}),Y&&typeof document<"u"&&(()=>{const ge=(l?document.getElementById(l):null)??document.body;return Yn.createPortal(r.jsx("div",{style:se,"data-selection":"none",children:r.jsx(Kh,{prefix:d,items:X,index:B,entry:ie,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:ue,lightboxEntries:U,entryIdx:S,layoutId:s,sourceRect:O,resolveCloseSourceRect:we,onClose:ke,onPrev:()=>Ae(-1),onNext:()=>Ae(1)})}),ge)})()]})}const Zh=`import { CommonComponentProps } from '../props';
7544
7557
  import { scalingValue, useScopedStyles } from '../utils/index';
7545
7558
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
7546
7559
  import { createPortal } from 'react-dom';
@@ -9883,7 +9896,7 @@ export function Hive({
9883
9896
  </>
9884
9897
  );
9885
9898
  }
9886
- `,Jh="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>'),oi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",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 Qh(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")]={...oi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ot(e,"fontSize")]={...oi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ot(e,"lineHeight")]={...oi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ot(e,"letterSpacing")]={...oi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ot(e,"wordSpacing")]={...oi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ot(e,"textAlign")]={...oi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ot(e,"textAppearance")]={...oi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const zi=Xn.filter(e=>e!=="count"),ef=zi.reduce((e,t)=>({...e,...Qh(t)}),{}),tf=zi.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 Qr(e){return zi.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 nf={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(zi.map(e=>[is[e],os(e)]))},of={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},rf=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...of,gallery:[{media:[{url:`https://cdn.cntrl.site/component-assets/hive_${t}.jpg`,name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]});return e})(),af={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:rf},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"}},...ef},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:Jh,closeIconColor:"#000000",closeIconHoverColor:"#999999",...tf},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,...Qr({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,...Qr({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,...Qr({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:[nf]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},sf={element:Yh,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:`${ot(e,"fontFamily")}`}))]},fontRelations:{...zi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${ot(t,"fontFamily")}`}),{})},schema:af,sourceCode:Zh};function lf(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 cf({media:e,className:t,style:n}){const i=a.useRef(null);return a.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const s=o.play();s&&s.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?r.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):r.jsx("img",{className:t,src:e.url,alt:"",style:n})}function ea(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function df(e){return String(e??"").trim().length>0}function Ks(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 Ys(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 Zs(e,t,n,i,o,s,l){const d=C.scalingValue(s,l),c=C.scalingValue(0,l),u=e===0,p=e===t-1&&!o;return{borderTopWidth:u&&n?d:c,borderBottomWidth:!p||i?d:c}}function uf(e,t,n){const i=C.scalingValue(t,n),o=C.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Js=10,Qs=10,no={positionEase:.14,rotationEase:.09,rotationFactor:2.5,maxRotation:20};function pf(e,t,n){return Math.max(t,Math.min(n,e))}function ta(e,t,n){return e+(t-e)*n}function mf(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+Js,y:n.clientY-d.top+Js}}switch(e){case"left":return{x:Qs+i/2,y:l};case"center":return{x:o/2,y:l};case"right":return{x:o-Qs-i/2,y:l};default:return{x:o/2,y:l}}}function gf(e,t){const n=a.useRef(null),i=a.useRef({x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1}),o=a.useRef(null),s=a.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=a.useCallback(()=>{o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)},[]),d=a.useCallback(()=>{const g=i.current;t?(g.x=ta(g.x,g.targetX,no.positionEase),g.y=ta(g.y,g.targetY,no.positionEase),g.rotation=ta(g.rotation,g.targetRotation,no.rotationEase)):(g.x=g.targetX,g.y=g.targetY,g.rotation=g.targetRotation),s();const h=Math.abs(g.x-g.targetX)<.4&&Math.abs(g.y-g.targetY)<.4,m=Math.abs(g.rotation-g.targetRotation)<.08;!h||!m?o.current=requestAnimationFrame(d):o.current=null},[s,t]),c=a.useCallback(()=>{o.current===null&&(o.current=requestAnimationFrame(d))},[d]),u=a.useCallback((g,h)=>{const m=i.current;m.targetX=g,m.targetY=h,m.targetRotation=0,m.x=g,m.y=h,m.rotation=0,m.lastX=g,m.hasLastX=!0,s(),t&&c()},[s,t,c]),p=a.useCallback((g,h)=>{if(!e)return;const m=i.current;if(t&&m.hasLastX){const b=g-m.lastX;m.targetRotation=pf(b*no.rotationFactor,-20,no.maxRotation)}else m.targetRotation=0;if(m.lastX=g,m.hasLastX=!0,m.targetX=g,m.targetY=h,t){c();return}m.x=g,m.y=h,m.rotation=m.targetRotation,s()},[e,s,t,c]),v=a.useCallback(g=>{l(),i.current.hasLastX=!1,g==null||g()},[l]),y=a.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 a.useEffect(()=>(e||y(),l),[e,y,l]),{anchorRef:n,onShow:u,onCursorMove:p,exit:v,reset:y}}function hf(e){return`
9899
+ `,Jh="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>'),oi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",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 Qh(e){const t={};return t[rt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[rt(e,"fontSettings")]={...oi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[rt(e,"fontSize")]={...oi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[rt(e,"lineHeight")]={...oi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[rt(e,"letterSpacing")]={...oi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[rt(e,"wordSpacing")]={...oi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[rt(e,"textAlign")]={...oi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[rt(e,"textAppearance")]={...oi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const zi=Xn.filter(e=>e!=="count"),ef=zi.reduce((e,t)=>({...e,...Qh(t)}),{}),tf=zi.reduce((e,t)=>({...e,[rt(t,"fontFamily")]:"Arial",[rt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[rt(t,"letterSpacing")]:0,[rt(t,"wordSpacing")]:0,[rt(t,"textAlign")]:"left",[rt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Qr(e){return zi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[rt(n,"fontSize")]=i),o!==void 0&&(t[rt(n,"lineHeight")]=o),t},{})}const nf={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(zi.map(e=>[is[e],os(e)]))},of={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},rf=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...of,gallery:[{media:[{url:`https://cdn.cntrl.site/component-assets/hive_${t}.jpg`,name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]});return e})(),af={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:rf},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"}},...ef},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:Jh,closeIconColor:"#000000",closeIconHoverColor:"#999999",...tf},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,...Qr({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,...Qr({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,...Qr({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:[nf]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},sf={element:Yh,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:`${rt(e,"fontFamily")}`}))]},fontRelations:{...zi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${rt(t,"fontFamily")}`}),{})},schema:af,sourceCode:Zh};function lf(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 cf({media:e,className:t,style:n}){const i=a.useRef(null);return a.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const s=o.play();s&&s.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?r.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):r.jsx("img",{className:t,src:e.url,alt:"",style:n})}function ea(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function df(e){return String(e??"").trim().length>0}function Ks(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 Ys(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 Zs(e,t,n,i,o,s,l){const d=C.scalingValue(s,l),c=C.scalingValue(0,l),u=e===0,p=e===t-1&&!o;return{borderTopWidth:u&&n?d:c,borderBottomWidth:!p||i?d:c}}function uf(e,t,n){const i=C.scalingValue(t,n),o=C.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Js=10,Qs=10,no={positionEase:.14,rotationEase:.09,rotationFactor:2.5,maxRotation:20};function pf(e,t,n){return Math.max(t,Math.min(n,e))}function ta(e,t,n){return e+(t-e)*n}function mf(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+Js,y:n.clientY-d.top+Js}}switch(e){case"left":return{x:Qs+i/2,y:l};case"center":return{x:o/2,y:l};case"right":return{x:o-Qs-i/2,y:l};default:return{x:o/2,y:l}}}function gf(e,t){const n=a.useRef(null),i=a.useRef({x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1}),o=a.useRef(null),s=a.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=a.useCallback(()=>{o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)},[]),d=a.useCallback(()=>{const g=i.current;t?(g.x=ta(g.x,g.targetX,no.positionEase),g.y=ta(g.y,g.targetY,no.positionEase),g.rotation=ta(g.rotation,g.targetRotation,no.rotationEase)):(g.x=g.targetX,g.y=g.targetY,g.rotation=g.targetRotation),s();const h=Math.abs(g.x-g.targetX)<.4&&Math.abs(g.y-g.targetY)<.4,m=Math.abs(g.rotation-g.targetRotation)<.08;!h||!m?o.current=requestAnimationFrame(d):o.current=null},[s,t]),c=a.useCallback(()=>{o.current===null&&(o.current=requestAnimationFrame(d))},[d]),u=a.useCallback((g,h)=>{const m=i.current;m.targetX=g,m.targetY=h,m.targetRotation=0,m.x=g,m.y=h,m.rotation=0,m.lastX=g,m.hasLastX=!0,s(),t&&c()},[s,t,c]),p=a.useCallback((g,h)=>{if(!e)return;const m=i.current;if(t&&m.hasLastX){const b=g-m.lastX;m.targetRotation=pf(b*no.rotationFactor,-20,no.maxRotation)}else m.targetRotation=0;if(m.lastX=g,m.hasLastX=!0,m.targetX=g,m.targetY=h,t){c();return}m.x=g,m.y=h,m.rotation=m.targetRotation,s()},[e,s,t,c]),v=a.useCallback(g=>{l(),i.current.hasLastX=!1,g==null||g()},[l]),y=a.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 a.useEffect(()=>(e||y(),l),[e,y,l]),{anchorRef:n,onShow:u,onCursorMove:p,exit:v,reset:y}}function hf(e){return`
9887
9900
  .${e}-wrapper {
9888
9901
  display: grid;
9889
9902
  align-items: start;
@@ -10259,7 +10272,7 @@ a.${e}-list-item {
10259
10272
  overflow-wrap: anywhere;
10260
10273
  word-break: break-word;
10261
10274
  }
10262
- `}const Kn=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],ss=["AColumn","BColumn","CColumn","DColumn","EColumn"],An="cutLabel",So=[...ss,An],Ar=["A","B","C","D","E"];function Wc(e){return`${e}ColumnVerticalAlign`}const Ea=["Top","Center","Bottom"];function ls(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Ar.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function ff(e){const t=ls(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function yf(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Ar.includes(n)?n:null}function _c(e,t,n){const i=yf(e);return i?i===t?!1:ff(n[Wc(i)]):!0}function $o(e){const t=ls(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Ar.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function vf(e,t,n){if(Hc(e,t,n))return $o(e);const i=$o(e);return i.kind==="baseline"?{kind:"top"}:i}function xf(e){const t=$o(e);return t.kind==="baseline"?{kind:"top"}:t}function Hc(e,t,n){return _c(e,n,t)?$o(e).kind==="baseline":!1}function bf(e){const t={};let n=!1;for(const i of Ar){const o=Wc(i),s=e[o];if(e.type==="b"){const l=String(s??"Top").trim();l!=="Top"&&l!=="Center"&&l!=="Bottom"&&(t[o]="Top",n=!0);continue}_c(s,i,e)||(t[o]="Top",n=!0)}return n?t:null}function wf(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Sf(e){const t=$o(e).kind;return t==="baseline"?"center":t}function $f(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function el(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Cf(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:i}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),s=o-i;return n.remove(),s}function na(e,t,n,i){const o=e.titleEl;if(!o)return 0;const s=o.closest(`.${n}`);if(!s)return 0;const l=Cf(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+l;const d=s.getBoundingClientRect(),c=o.getBoundingClientRect().height;let u=0;return e.kind==="center"?u=(d.height-c)/2:e.kind==="bottom"&&(u=d.height-c),d.top-t+u+l}function Tf(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const s=o.querySelector(`.${n}`);s&&(s.style.minHeight=`${i}px`,s.style.height=`${i}px`)}),i)}function Lf(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Rf={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Et(e,t){return`${e}${t.replace(/^text/,"Text")}`}const If={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Ef(e){return[Et(e,"textFontFamily"),Et(e,"textFontSettings"),{type:"row",items:[Et(e,"textFontSize"),Et(e,"textLineHeight"),Et(e,"textLetterSpacing"),Et(e,"textWordSpacing")]},Et(e,"textTextAlign"),Et(e,"textTextAppearance"),`${e}VerticalAlign`]}function Mf(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(So.map(e=>[If[e],Ef(e)]))}}function fr(e,t){const n=i=>{const o=Et(t,i);return e[o]};return{textFontFamily:n("textFontFamily")??"Arial",textFontSettings:n("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:n("textFontSize"),textLineHeight:n("textLineHeight"),textLetterSpacing:n("textLetterSpacing")??0,textWordSpacing:n("textWordSpacing")??0,textTextAlign:n("textTextAlign")??(t===An?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function tl(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 rn(Kt(n,t))}function nl(e,t,n,i){const o=fr(e,t),s=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<s?`${n} ${i}`:n}function il(e,t,n,i){const o=fr(e,t),s=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=s?{}:{[`--${n}-title-leading-gap`]:C.scalingValue((s-l)/2,i)}}const fn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Bi=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],Vi=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Gi=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],Pf={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},kf=["hover","focus","filled","success","error"],ol=.004,Ei=.004,ia=Ei,cs=50,Co=1440,To=cs/Co;function Nc(e){const t=typeof e=="number"&&e>0?e:Co;return cs/t}function Af(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 Co}const Oc={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function po(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function Ff(e,t=1){const n=t/e;return Object.fromEntries(fn.map(i=>[i,n]))}function Wf(){return Object.fromEntries([...Bi.map(e=>[e,0]),...Vi.map(e=>[e,0])])}function _f(){return Object.fromEntries(Gi.map(e=>[e,0]))}function Uo(e){return Object.fromEntries(fn.map(t=>[t,typeof e[t]=="number"?e[t]:Oc[t]]))}function Dc(e,t,n){const i=e-To,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const s=i/o;return{paddingLeft:t*s,paddingRight:n*s}}function sr(e,t,n){const i=ds(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((s,l)=>s+l,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function Hf(e,t,n){const i={};for(let o=0;o<e;o+=1){const s=Bi[o],l=Vi[o],d=typeof n[s]=="number"?n[s]:0,c=typeof n[l]=="number"?n[l]:0,u=Dc(t[o]??0,d,c);u.paddingLeft!==d&&(i[s]=u.paddingLeft),u.paddingRight!==c&&(i[l]=u.paddingRight)}return i}function ds(e,t,n){if(e<=0)return[];const i=fn.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)+To;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]-To;if(p<=0)continue;const v=Math.min(c,p);d[u]-=v,c-=v}return[...d,i[e-1]]}function Nf(e,t,n){if(e<=1)return{};const i=ds(e,t,n),o={};for(let s=0;s<e-1;s+=1){const l=fn[s];i[s]!==n[l]&&(o[l]=i[s])}return o}function rl(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Kn]}function Of(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function Df(e,t,n,i){const o=Math.min(i,e.length,fn.length),s={};for(let l=0;l<o;l+=1){const d=e[l],c=t.indexOf(d);if(c===-1)continue;const u=fn[c],p=Bi[c],v=Vi[c],y=Gi[c],g=fn[l],h=Bi[l],m=Vi[l],b=Gi[l],I=n[u],R=n[p],T=n[v],G=n[y];typeof I=="number"&&(s[g]=I),typeof R=="number"&&(s[h]=R),typeof T=="number"&&(s[m]=T),typeof G=="number"&&(s[b]=G)}return s}function jc(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 jf(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=po(e),s=e.type==="b"||e.type===void 0&&t.type==="b",l={...e,...Ff(n,o),...Wf()};if(s)for(const d of Gi)typeof t[d]=="number"&&(l[d]=t[d]);else Object.assign(l,_f());return jc(e,l)?l:e}function zf(e,t,n){const i=bf(e);i&&(e={...e,...i});const o=Nc(n==null?void 0:n.designWidth),s=e.columns,l=t.columns,d=po(e),c=po(t),u=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof s=="number"?s:typeof l=="number"?l:Kn.length,v=T=>{if(u)return T;const G=Uo({...t,...T}),k=po(T),V=sr(p,k,G),A=Hf(p,V,{...t,...T});return Object.keys(A).length===0?T:{...T,...A}};if(typeof s=="number"&&s!==l)return e;const y=rl(e),g=rl(t);if(!Of(y,g))return v({...e,...Df(y,g,t,p)});if(d<c&&typeof p=="number"&&!u){const T=Uo({...t,...e});return v({...e,...Nf(p,d,T)})}if(u){const T=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,G=Math.max(0,(d-o)/2);return T>G?{...e,textPaddingLR:G}:e}const h=Uo({...t,...e}),m=sr(p,c,Uo(t)),I=sr(p,d,h).some((T,G)=>T<(m[G]??T)),R=fn.some(T=>{const G=e[T],k=t[T];return typeof G=="number"&&typeof k=="number"&&G!==k});return I||R?v(e):e}function Bf(e,t,n,i){const o=t.slice(0,e).reduce((l,d)=>l+d,0),s=n.slice(e+1,t.length-1).reduce((l,d)=>l+d,0);return Math.max(To,i-o-s-To)}function Vf(e,t){return Math.random()*(t-e)+e}function Gf(e){return Object.fromEntries(fn.map(t=>[t,typeof e[t]=="number"?e[t]:Oc[t]]))}function oa(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function qf(e,t,n,i,o,s){return e.slice(0,t).map((l,d)=>{const c=Bi[d],u=Vi[d],p=Gi[d];return{key:l,textPrefix:Rf[l],widthKey:fn[d],width:n[fn[d]],paddingLeftKey:c,paddingRightKey:u,paddingBottomKey:p,paddingLeft:i[c],paddingRight:o[u],paddingBottom:s[p]}})}function Uf({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s,layoutId:l,onUpdateSettings:d}){const{prefix:c}=C.useScopedStyles(),u=!!o,{columns:p,type:v,wrapperWidth:y,entriesCount:g,cellMinHeight:h,dividerWidth:m,showVisibility:b,cut:I,showCut:R,cutCellMinHeight:T,cutLabel:G,imageSize:k,imageOnHover:V,imagePosition:A="cursor",imageInterpolation:L="on",entryHoverEffect:D,entryHoverShowOption:x,rowPaddingTop:W,rowPaddingBottom:M,rowPaddingTopB:Y,columnsOrder:F,textPaddingLR:X,textColor:j,backgroundColor:B,dividerColor:ne,textHoverColor:S,backgroundHoverColor:E,dividerHoverColor:O}=e,[ae,ie]=a.useState(void 0),[$,re]=a.useState(null),P=a.useRef(null),te=V==="on"&&(!n||i),K=A==="cursor",fe=K&&L==="on",{anchorRef:We,onShow:me,onCursorMove:ce,exit:U}=gf(!!(te&&$!==null),fe),Q=(I??0)>0,Z=v==="b",ke=a.useRef(null),we=a.useRef(null),[Pe,de]=a.useState(null),[ge,be]=a.useState(Co),z=Nc(ge),se=Math.max(0,((y??0)-z)/2),he=Math.min(X??0,se),ye=Math.max(he,Ei),Me=((y??0)+z)/2;a.useLayoutEffect(()=>{if(!n){be(Co);return}const Te=()=>{be(Af(ke.current))};Te();const Ne=ke.current;if(!Ne)return;const nt=new ResizeObserver(Te);nt.observe(Ne);let pt=Ne;for(;pt&&!pt.style.getPropertyValue("--cntrl-article-width");)pt=pt.parentElement;return pt&&nt.observe(pt),()=>nt.disconnect()},[n,l]),a.useEffect(()=>{ie(void 0)},[I,R,t,g]),a.useEffect(()=>{n&&!i&&ie(void 0)},[n,i]);const Le=C.buildColorVars(c,{textColor:j,backgroundColor:B,dividerColor:ne,textHoverColor:S,backgroundHoverColor:E,dividerHoverColor:O},Pf,kf),_=s&&s!=="default"?`${c}-state-${s}`:"",oe=`${!n||i?D==="default"?`${c}-entry-hover-default`:D==="blinds"?`${c}-entry-hover-blinds`:D==="reveal"?`${c}-entry-hover-reveal`:"":""} ${_}`.trim(),H=D==="reveal"&&(!n||i),ee=(b==null?void 0:b[0])??!1,Fe=(b==null?void 0:b[1])??!1,le=a.useRef(e),N=a.useRef(l);a.useEffect(()=>{if(!d||!n){le.current=e,N.current=l;return}if(N.current!==l){le.current=e,N.current=l;return}const Te=le.current;if(!(Te!==e))return;if(typeof Te.columns=="number"&&typeof e.columns=="number"&&Te.columns!==e.columns){le.current=e;return}const nt=zf(e,Te,{designWidth:ge});le.current=e,jc(e,nt)&&d(nt)},[e,d,n,l,ge]);const Ue=a.useMemo(()=>Gf(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),je=a.useMemo(()=>oa(e,Bi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),gt=a.useMemo(()=>oa(e,Vi),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),rt=a.useMemo(()=>oa(e,Gi),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),ht=a.useMemo(()=>Array.isArray(F)&&F.length>0?F:[...Kn],[F]),lt=a.useMemo(()=>qf(ht,p,Ue,je,gt,rt),[ht,p,Ue,je,gt,rt]),Ge=po(e),ve=a.useMemo(()=>fn.slice(0,p).map(Te=>Ue[Te]),[p,Ue]),_e=a.useMemo(()=>ds(p,Ge,Ue),[p,Ge,Ue]),ze=a.useMemo(()=>sr(p,Ge,Ue),[p,Ge,Ue]),Ke=a.useMemo(()=>lt.map((Te,Ne)=>Dc(ze[Ne]??0,Te.paddingLeft,Te.paddingRight)),[lt,ze]),Se=a.useMemo(()=>{const Te=g===0?1/0:g;return(t??[]).slice(0,Te).map((nt,pt)=>({id:pt,cells:Object.fromEntries(Kn.map(vt=>[vt,nt[vt]??""])),image:nt.image,link:nt.link}))},[t,g]),De=Q?ae??I:Se.length,Ve=a.useMemo(()=>Q?Se.slice(0,De):Se,[Se,Q,De]),et=Q&&De<Se.length,Ae=Ve.length>1||et,$e=[ee?`${c}-divider-top`:"",Fe||Ae?`${c}-divider-bottom`:""].filter(Boolean).join(" "),tt=!n||i,Ze=()=>{if(!tt)return;const Te=ae??I;if(!R){ie(Se.length);return}ie(Math.min(Te+R,Se.length))},Ie=Te=>C.scalingValue(Te,n??!1),qe=Z?Y??0:W??0,Ee=M??0,Je=h??0,Qe=Math.max(Ee,ia),st=Zs(0,Ve.length,ee,Fe,et,m??0,n??!1).borderTopWidth,St=Z?"rowPaddingTopB":"rowPaddingTop",Pt=lt[0],Nt=lt[lt.length-1],dt=Ke[0],yt=Ke[Ke.length-1],Ot=Pt&&dt?Math.max(dt.paddingLeft,Ei):0,Ft=Nt&&yt?Math.max(yt.paddingRight,Ei):0,bt=Ge,Wt=(Te,Ne)=>mf(A,ke.current,K?Te:null,Ne),Gt=(Te,Ne)=>{if(!te)return;const nt=Te.image;if(!(nt!=null&&nt.url)){U(()=>re(null));return}const pt=(k==null?void 0:k.min)??80,vt=(k==null?void 0:k.max)??320,It=($==null?void 0:$.rowId)===Te.id,ft=It?$.widthPx:Vf(pt,vt),{x:Bt,y:At}=Wt(Ne,ft);if(It&&K){ce(Bt,At);return}re({rowId:Te.id,url:nt.url,objectFit:"contain",isVideo:lf(nt),widthPx:ft}),P.current={x:Bt,y:At}},Zt=Te=>{if(!te||!$||!K)return;const{x:Ne,y:nt}=Wt(Te,$.widthPx);ce(Ne,nt)},en=()=>{$&&U(()=>re(null))},Tt=Te=>{H&&Ks(Te,c),!(!te||!$)&&U(()=>re(null))},_t=Te=>{H&&Ys(Te,c)};a.useLayoutEffect(()=>{if(!$||!P.current)return;const{x:Te,y:Ne}=P.current;P.current=null,me(Te,Ne)},[$==null?void 0:$.rowId,$==null?void 0:$.url,me]),a.useLayoutEffect(()=>{if(!u||Z){de(null);return}const Te=we.current,Ne=Te==null?void 0:Te.parentElement;if(!Te||!Ne){de(null);return}const nt=()=>{const vt=Te.querySelector("[data-list-row]");if(!vt){de(null);return}const It=Ne.getBoundingClientRect(),ft=vt.getBoundingClientRect();de(ft.top-It.top+ft.height/2)};nt();const pt=new ResizeObserver(nt);return pt.observe(Te),pt.observe(Ne),()=>pt.disconnect()},[u,Z,Ve,qe,Ee,Je,t,e,lt,ze,ge,m,ee,Fe,et]);const nn=a.useMemo(()=>!Z&&ss.some(Te=>{const Ne=Te.charAt(0),nt=e[`${Te}VerticalAlign`];return Hc(nt,e,Ne)}),[Z,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);a.useLayoutEffect(()=>{var Bt;const Te=ke.current;if(!Te)return;const Ne=()=>{Te.querySelectorAll("[data-list-col]").forEach(At=>{At.style.transform="";const kt=At.querySelector(`.${c}-list-col`);kt&&(kt.style.minHeight="",kt.style.height="");const qt=At.querySelector(`.${c}-list-col-title`);qt&&(qt.style.transform="")})};if(Z||!nn){Ne();return}const nt=()=>{const At=Array.from(Te.querySelectorAll("[data-list-row]")),kt=`${c}-list-col`,qt=`${c}-baseline-probe`;At.forEach(Ut=>{Ut.querySelectorAll("[data-list-col]").forEach(Dt=>{Dt.style.transform="";const jt=Dt.querySelector(`.${kt}`);jt&&(jt.style.minHeight="",jt.style.height="");const Ht=Dt.querySelector(`.${c}-list-col-title`);Ht&&(Ht.style.transform="")})}),At.forEach(Ut=>{const Dt=Array.from(Ut.querySelectorAll("[data-list-col]"));Tf(Ut,Dt,kt)}),Te.offsetHeight,At.forEach(Ut=>{const Dt=Array.from(Ut.querySelectorAll("[data-list-col]")),jt=Ut.getBoundingClientRect().top,Ht=new Map,$t=Dt.map(Re=>{const He=Re.querySelector(`.${c}-list-col-title`),at={el:Re,titleEl:He,letter:Re.getAttribute("data-col-letter")??"",kind:Re.getAttribute("data-valign")??"top",anchor:Re.getAttribute("data-valign-anchor")};return Ht.set(at.letter,at),at}),w=new Map,xe=(Re,He)=>{const at=w.get(Re.letter);if(at!==void 0)return at;const Mt=Re.anchor?Ht.get(Re.anchor):void 0;if(Re.kind!=="baseline"||!Mt||He.has(Re.letter)){const on=na(Re,jt,kt,qt);return w.set(Re.letter,on),on}He.add(Re.letter);const it=xe(Mt,He);He.delete(Re.letter);const xt=na(Re,jt,kt,qt),zt=it-xt;Lf(Re.titleEl,zt);const Lt=na(Re,jt,kt,qt);return w.set(Re.letter,Lt),Lt};$t.forEach(Re=>xe(Re,new Set))})};let pt=null;const vt=()=>{pt===null&&(pt=requestAnimationFrame(()=>{pt=null,nt()}))};nt();const It=new ResizeObserver(()=>vt());It.observe(Te);let ft=!1;return typeof document<"u"&&((Bt=document.fonts)!=null&&Bt.ready)&&document.fonts.ready.then(()=>{ft||vt()}),()=>{ft=!0,pt!==null&&(cancelAnimationFrame(pt),pt=null),It.disconnect(),Ne()}},[nn,Z,e,t,ge,Ve,ze]);const ct=a.useMemo(()=>hf(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ct}}),r.jsx("div",{style:Le,children:r.jsxs("div",{ref:ke,className:`${c}-wrapper ${oe}${$e?` ${$e}`:""}${Z?` ${c}-type-b`:""}`.trim(),style:{width:C.scalingValue(y??0,n)},onMouseMove:te?Zt:void 0,onMouseLeave:te?en:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[Ve.map((Te,Ne)=>{var It;const nt=(((It=Te.link)==null?void 0:It.length)??0)>0,pt=nt&&(!n||i)?"a":"div",vt=Zs(Ne,Ve.length,ee,Fe,et,m??0,n??!1);return r.jsxs(pt,{ref:Ne===0?ft=>{we.current=ft}:void 0,className:`${c}-list-item${nt||x==="always"?` ${c}-list-item-has-link`:""}${et&&Ne===Ve.length-1?` ${c}-list-item-before-cut`:""}`,...nt?{href:Te.link,target:"_blank"}:{},style:vt,onMouseEnter:ft=>{H&&(nt||x==="always")&&Ks(ft,c),te&&Gt(Te,ft)},onMouseLeave:ft=>{H&&(nt||x==="always")&&Ys(ft,c)},children:[qe>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ie(qe)}}),r.jsxs("div",{className:`${c}-list-cols-row${Z?"":` ${c}-list-cols-row-h`}${u&&Ne===0&&Z?` ${c}-list-cols-row-controls`:""}`,...Z?{}:{"data-list-row":""},style:Z?void 0:{minHeight:Ie(Je)},children:[lt.map((ft,Bt)=>{const At=Bt===lt.length-1,kt=Ke[Bt],qt=ft.paddingBottom,Ut=df(Te.cells[ft.key]),Dt=Z&&Ut&&qt>0,jt=Z?{minHeight:Ie(Je)}:{width:Ie(ze[Bt])},Ht=Z?{paddingLeft:Ie(he),paddingRight:Ie(he)}:{paddingLeft:Ie(kt.paddingLeft),paddingRight:Ie(kt.paddingRight)},$t=ft.textPrefix.charAt(0),w=Z?xf(e[`${ft.textPrefix}VerticalAlign`]):vf(e[`${ft.textPrefix}VerticalAlign`],e,$t),xe=Z&&Ut&&u&&Ne===0;return Z&&!Ut?null:r.jsxs("div",{className:Z?`${c}-list-col-wrap`:void 0,...Z?{}:{"data-list-col":"","data-col-letter":$t,"data-valign":w.kind,...w.kind==="baseline"?{"data-valign-anchor":w.anchorLetter}:{}},children:[r.jsx("div",{className:`${c}-list-col${At?` ${c}-list-col-last`:""}`,style:{...Ht,...jt,...Z?{justifyContent:el(w.kind)}:{}},"data-test":ft.width,children:r.jsx("span",{className:nl(e,ft.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{...tl(fr(e,ft.textPrefix),n),...il(e,ft.textPrefix,c,n),...Z?{}:wf(w.kind)},children:Te.cells[ft.key]??null})}),Dt&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ie(qt)}}),xe&&r.jsx("div",{"data-controls":ft.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:Ie(Math.max(qt,ia))}})]},ft.key)}),u&&Ne===0&&Z&&r.jsxs(r.Fragment,{children:[r.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(Me),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:0,width:Ie(ye),height:"100%"}}),r.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(Me),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:Ie(Math.max(ye,Ge-ye)),width:Ie(ye),height:"100%"}})]})]}),!Z&&Ee>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ie(Ee)}}),u&&Ne===0&&!Z&&r.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:Ie(Qe)}})]},Te.id)}),u&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.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":Z?"center":"left-y",className:`${c}-control-anchor`,style:{top:st,left:0,width:"100%",height:Ie(Math.max(qe,ia))}})},"row-padding-handles"),u&&!Z&&Pt&&Nt&&r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx("div",{"data-controls":Pt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ze[0]-((dt==null?void 0:dt.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Pe??void 0,className:`${c}-control-anchor`,style:{top:0,left:0,width:Ie(Ot),height:"100%"}}),r.jsx("div",{"data-controls":Nt.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ze[lt.length-1]-((yt==null?void 0:yt.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Pe??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ie(bt-Ft),width:Ie(Ft),height:"100%"}})]},"column-edge-padding-handles"),u&&!Z&&lt.slice(0,-1).map((Te,Ne)=>{const nt=lt[Ne+1],pt=_e.slice(0,Ne+1).reduce((At,kt)=>At+kt,0),vt=Ke[Ne],It=Ke[Ne+1],ft=Math.max(vt.paddingRight,Ei),Bt=Math.max(It.paddingLeft,Ei);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx("div",{"data-controls":Te.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ze[Ne]-vt.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Pe??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ie(pt-ft),width:Ie(ft),height:"100%"}}),r.jsx("div",{"data-controls":nt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ze[Ne+1]-It.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Pe??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ie(pt),width:Ie(Bt),height:"100%"}})]},`${Te.paddingRightKey}-padding`)}),u&&!Z&&lt.slice(0,-1).map((Te,Ne)=>{const nt=Bf(Ne,_e,ve,Ge),vt=_e.slice(0,Ne+1).reduce((It,ft)=>It+ft,0)-ol/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":Te.widthKey,"data-controls-axis":"x","data-controls-min":String(cs),"data-controls-max-fraction":String(nt),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Ie(vt),width:Ie(ol),height:"calc(100%)",pointerEvents:"auto"}})},`${Te.widthKey}-junction`)})]}),et&&(()=>{const Te=fr(e,An),Ne=Sf(e.cutLabelVerticalAlign),nt=Te.textTextAlign==="justify"||Z;return r.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:Ie(T??0),cursor:tt?"pointer":"default",...uf(Fe,m??0,n??!1)},onClick:tt?Ze:void 0,onMouseEnter:H||te?Tt:void 0,onMouseLeave:H?_t:void 0,children:r.jsx("div",{className:`${c}-list-cols-row`,style:{...Z?{paddingLeft:Ie(he),paddingRight:Ie(he)}:{},justifyContent:$f(Te.textTextAlign),alignItems:el(Ne)},children:r.jsx("span",{className:nl(e,An,`${c}-cut-label`,`${c}-text-tight-leading`),style:{...tl(Te,n),...il(e,An,c,n),...nt?{width:"100%"}:{}},children:G})})})})(),te&&$&&(()=>{const Te=`${$.widthPx}px`,Ne={width:Te,height:"auto",maxHeight:Te,objectFit:"contain"};return r.jsx("div",{ref:We,className:`${c}-hover-media-anchor`,children:r.jsx(cf,{media:$,className:$.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:Ne},`${$.rowId}-${$.url}`)})})()]})})]})}const Xf=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
10275
+ `}const Kn=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],ss=["AColumn","BColumn","CColumn","DColumn","EColumn"],An="cutLabel",So=[...ss,An],Ar=["A","B","C","D","E"];function Wc(e){return`${e}ColumnVerticalAlign`}const Ea=["Top","Center","Bottom"];function ls(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Ar.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function ff(e){const t=ls(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function yf(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Ar.includes(n)?n:null}function _c(e,t,n){const i=yf(e);return i?i===t?!1:ff(n[Wc(i)]):!0}function $o(e){const t=ls(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Ar.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function vf(e,t,n){if(Hc(e,t,n))return $o(e);const i=$o(e);return i.kind==="baseline"?{kind:"top"}:i}function xf(e){const t=$o(e);return t.kind==="baseline"?{kind:"top"}:t}function Hc(e,t,n){return _c(e,n,t)?$o(e).kind==="baseline":!1}function bf(e){const t={};let n=!1;for(const i of Ar){const o=Wc(i),s=e[o];if(e.type==="b"){const l=String(s??"Top").trim();l!=="Top"&&l!=="Center"&&l!=="Bottom"&&(t[o]="Top",n=!0);continue}_c(s,i,e)||(t[o]="Top",n=!0)}return n?t:null}function wf(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Sf(e){const t=$o(e).kind;return t==="baseline"?"center":t}function $f(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function el(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Cf(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:i}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),s=o-i;return n.remove(),s}function na(e,t,n,i){const o=e.titleEl;if(!o)return 0;const s=o.closest(`.${n}`);if(!s)return 0;const l=Cf(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+l;const d=s.getBoundingClientRect(),c=o.getBoundingClientRect().height;let u=0;return e.kind==="center"?u=(d.height-c)/2:e.kind==="bottom"&&(u=d.height-c),d.top-t+u+l}function Tf(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const s=o.querySelector(`.${n}`);s&&(s.style.minHeight=`${i}px`,s.style.height=`${i}px`)}),i)}function Lf(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Rf={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Et(e,t){return`${e}${t.replace(/^text/,"Text")}`}const If={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Ef(e){return[Et(e,"textFontFamily"),Et(e,"textFontSettings"),{type:"row",items:[Et(e,"textFontSize"),Et(e,"textLineHeight"),Et(e,"textLetterSpacing"),Et(e,"textWordSpacing")]},Et(e,"textTextAlign"),Et(e,"textTextAppearance"),`${e}VerticalAlign`]}function Mf(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(So.map(e=>[If[e],Ef(e)]))}}function fr(e,t){const n=i=>{const o=Et(t,i);return e[o]};return{textFontFamily:n("textFontFamily")??"Arial",textFontSettings:n("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:n("textFontSize"),textLineHeight:n("textLineHeight"),textLetterSpacing:n("textLetterSpacing")??0,textWordSpacing:n("textWordSpacing")??0,textTextAlign:n("textTextAlign")??(t===An?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function tl(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 rn(Kt(n,t))}function nl(e,t,n,i){const o=fr(e,t),s=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<s?`${n} ${i}`:n}function il(e,t,n,i){const o=fr(e,t),s=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=s?{}:{[`--${n}-title-leading-gap`]:C.scalingValue((s-l)/2,i)}}const fn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Bi=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],Vi=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Gi=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],Pf={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},kf=["hover","focus","filled","success","error"],ol=.004,Ei=.004,ia=Ei,cs=50,Co=1440,To=cs/Co;function Nc(e){const t=typeof e=="number"&&e>0?e:Co;return cs/t}function Af(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 Co}const Oc={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function po(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function Ff(e,t=1){const n=t/e;return Object.fromEntries(fn.map(i=>[i,n]))}function Wf(){return Object.fromEntries([...Bi.map(e=>[e,0]),...Vi.map(e=>[e,0])])}function _f(){return Object.fromEntries(Gi.map(e=>[e,0]))}function Uo(e){return Object.fromEntries(fn.map(t=>[t,typeof e[t]=="number"?e[t]:Oc[t]]))}function Dc(e,t,n){const i=e-To,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const s=i/o;return{paddingLeft:t*s,paddingRight:n*s}}function sr(e,t,n){const i=ds(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((s,l)=>s+l,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function Hf(e,t,n){const i={};for(let o=0;o<e;o+=1){const s=Bi[o],l=Vi[o],d=typeof n[s]=="number"?n[s]:0,c=typeof n[l]=="number"?n[l]:0,u=Dc(t[o]??0,d,c);u.paddingLeft!==d&&(i[s]=u.paddingLeft),u.paddingRight!==c&&(i[l]=u.paddingRight)}return i}function ds(e,t,n){if(e<=0)return[];const i=fn.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)+To;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]-To;if(p<=0)continue;const v=Math.min(c,p);d[u]-=v,c-=v}return[...d,i[e-1]]}function Nf(e,t,n){if(e<=1)return{};const i=ds(e,t,n),o={};for(let s=0;s<e-1;s+=1){const l=fn[s];i[s]!==n[l]&&(o[l]=i[s])}return o}function rl(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Kn]}function Of(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function Df(e,t,n,i){const o=Math.min(i,e.length,fn.length),s={};for(let l=0;l<o;l+=1){const d=e[l],c=t.indexOf(d);if(c===-1)continue;const u=fn[c],p=Bi[c],v=Vi[c],y=Gi[c],g=fn[l],h=Bi[l],m=Vi[l],b=Gi[l],I=n[u],R=n[p],T=n[v],G=n[y];typeof I=="number"&&(s[g]=I),typeof R=="number"&&(s[h]=R),typeof T=="number"&&(s[m]=T),typeof G=="number"&&(s[b]=G)}return s}function jc(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 jf(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=po(e),s=e.type==="b"||e.type===void 0&&t.type==="b",l={...e,...Ff(n,o),...Wf()};if(s)for(const d of Gi)typeof t[d]=="number"&&(l[d]=t[d]);else Object.assign(l,_f());return jc(e,l)?l:e}function zf(e,t,n){const i=bf(e);i&&(e={...e,...i});const o=Nc(n==null?void 0:n.designWidth),s=e.columns,l=t.columns,d=po(e),c=po(t),u=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof s=="number"?s:typeof l=="number"?l:Kn.length,v=T=>{if(u)return T;const G=Uo({...t,...T}),k=po(T),V=sr(p,k,G),A=Hf(p,V,{...t,...T});return Object.keys(A).length===0?T:{...T,...A}};if(typeof s=="number"&&s!==l)return e;const y=rl(e),g=rl(t);if(!Of(y,g))return v({...e,...Df(y,g,t,p)});if(d<c&&typeof p=="number"&&!u){const T=Uo({...t,...e});return v({...e,...Nf(p,d,T)})}if(u){const T=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,G=Math.max(0,(d-o)/2);return T>G?{...e,textPaddingLR:G}:e}const h=Uo({...t,...e}),m=sr(p,c,Uo(t)),I=sr(p,d,h).some((T,G)=>T<(m[G]??T)),R=fn.some(T=>{const G=e[T],k=t[T];return typeof G=="number"&&typeof k=="number"&&G!==k});return I||R?v(e):e}function Bf(e,t,n,i){const o=t.slice(0,e).reduce((l,d)=>l+d,0),s=n.slice(e+1,t.length-1).reduce((l,d)=>l+d,0);return Math.max(To,i-o-s-To)}function Vf(e,t){return Math.random()*(t-e)+e}function Gf(e){return Object.fromEntries(fn.map(t=>[t,typeof e[t]=="number"?e[t]:Oc[t]]))}function oa(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function qf(e,t,n,i,o,s){return e.slice(0,t).map((l,d)=>{const c=Bi[d],u=Vi[d],p=Gi[d];return{key:l,textPrefix:Rf[l],widthKey:fn[d],width:n[fn[d]],paddingLeftKey:c,paddingRightKey:u,paddingBottomKey:p,paddingLeft:i[c],paddingRight:o[u],paddingBottom:s[p]}})}function Uf({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s,layoutId:l,onUpdateSettings:d}){const{prefix:c}=C.useScopedStyles(),u=!!o,{columns:p,type:v,wrapperWidth:y,entriesCount:g,cellMinHeight:h,dividerWidth:m,showVisibility:b,cut:I,showCut:R,cutCellMinHeight:T,cutLabel:G,imageSize:k,imageOnHover:V,imagePosition:A="cursor",imageInterpolation:L="on",entryHoverEffect:D,entryHoverShowOption:x,rowPaddingTop:W,rowPaddingBottom:M,rowPaddingTopB:Y,columnsOrder:F,textPaddingLR:X,textColor:j,backgroundColor:B,dividerColor:ne,textHoverColor:S,backgroundHoverColor:E,dividerHoverColor:O}=e,[ae,ie]=a.useState(void 0),[$,se]=a.useState(null),P=a.useRef(null),te=V==="on"&&(!n||i),K=A==="cursor",he=K&&L==="on",{anchorRef:We,onShow:pe,onCursorMove:ce,exit:U}=gf(!!(te&&$!==null),he),Q=(I??0)>0,Z=v==="b",ke=a.useRef(null),we=a.useRef(null),[Ae,ue]=a.useState(null),[ge,be]=a.useState(Co),z=Nc(ge),oe=Math.max(0,((y??0)-z)/2),fe=Math.min(X??0,oe),ye=Math.max(fe,Ei),Me=((y??0)+z)/2;a.useLayoutEffect(()=>{if(!n){be(Co);return}const Te=()=>{be(Af(ke.current))};Te();const Ne=ke.current;if(!Ne)return;const it=new ResizeObserver(Te);it.observe(Ne);let pt=Ne;for(;pt&&!pt.style.getPropertyValue("--cntrl-article-width");)pt=pt.parentElement;return pt&&it.observe(pt),()=>it.disconnect()},[n,l]),a.useEffect(()=>{ie(void 0)},[I,R,t,g]),a.useEffect(()=>{n&&!i&&ie(void 0)},[n,i]);const Se=C.buildColorVars(c,{textColor:j,backgroundColor:B,dividerColor:ne,textHoverColor:S,backgroundHoverColor:E,dividerHoverColor:O},Pf,kf),_=s&&s!=="default"?`${c}-state-${s}`:"",re=`${!n||i?D==="default"?`${c}-entry-hover-default`:D==="blinds"?`${c}-entry-hover-blinds`:D==="reveal"?`${c}-entry-hover-reveal`:"":""} ${_}`.trim(),H=D==="reveal"&&(!n||i),ee=(b==null?void 0:b[0])??!1,Fe=(b==null?void 0:b[1])??!1,le=a.useRef(e),N=a.useRef(l);a.useEffect(()=>{if(!d||!n){le.current=e,N.current=l;return}if(N.current!==l){le.current=e,N.current=l;return}const Te=le.current;if(!(Te!==e))return;if(typeof Te.columns=="number"&&typeof e.columns=="number"&&Te.columns!==e.columns){le.current=e;return}const it=zf(e,Te,{designWidth:ge});le.current=e,jc(e,it)&&d(it)},[e,d,n,l,ge]);const Xe=a.useMemo(()=>Gf(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),je=a.useMemo(()=>oa(e,Bi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),ut=a.useMemo(()=>oa(e,Vi),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),tt=a.useMemo(()=>oa(e,Gi),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),ft=a.useMemo(()=>Array.isArray(F)&&F.length>0?F:[...Kn],[F]),st=a.useMemo(()=>qf(ft,p,Xe,je,ut,tt),[ft,p,Xe,je,ut,tt]),Ue=po(e),ve=a.useMemo(()=>fn.slice(0,p).map(Te=>Xe[Te]),[p,Xe]),_e=a.useMemo(()=>ds(p,Ue,Xe),[p,Ue,Xe]),ze=a.useMemo(()=>sr(p,Ue,Xe),[p,Ue,Xe]),Ye=a.useMemo(()=>st.map((Te,Ne)=>Dc(ze[Ne]??0,Te.paddingLeft,Te.paddingRight)),[st,ze]),Ce=a.useMemo(()=>{const Te=g===0?1/0:g;return(t??[]).slice(0,Te).map((it,pt)=>({id:pt,cells:Object.fromEntries(Kn.map(yt=>[yt,it[yt]??""])),image:it.image,link:it.link}))},[t,g]),Oe=Q?ae??I:Ce.length,Ve=a.useMemo(()=>Q?Ce.slice(0,Oe):Ce,[Ce,Q,Oe]),Re=Q&&Oe<Ce.length,Ie=Ve.length>1||Re,qe=[ee?`${c}-divider-top`:"",Fe||Ie?`${c}-divider-bottom`:""].filter(Boolean).join(" "),lt=!n||i,Ze=()=>{if(!lt)return;const Te=ae??I;if(!R){ie(Ce.length);return}ie(Math.min(Te+R,Ce.length))},Ee=Te=>C.scalingValue(Te,n??!1),Ge=Z?Y??0:W??0,Pe=M??0,Je=h??0,nt=Math.max(Pe,ia),et=Zs(0,Ve.length,ee,Fe,Re,m??0,n??!1).borderTopWidth,St=Z?"rowPaddingTopB":"rowPaddingTop",Wt=st[0],At=st[st.length-1],gt=Ye[0],xt=Ye[Ye.length-1],zt=Wt&&gt?Math.max(gt.paddingLeft,Ei):0,Ft=At&&xt?Math.max(xt.paddingRight,Ei):0,bt=Ue,_t=(Te,Ne)=>mf(A,ke.current,K?Te:null,Ne),Gt=(Te,Ne)=>{if(!te)return;const it=Te.image;if(!(it!=null&&it.url)){U(()=>se(null));return}const pt=(k==null?void 0:k.min)??80,yt=(k==null?void 0:k.max)??320,It=($==null?void 0:$.rowId)===Te.id,ht=It?$.widthPx:Vf(pt,yt),{x:Bt,y:kt}=_t(Ne,ht);if(It&&K){ce(Bt,kt);return}se({rowId:Te.id,url:it.url,objectFit:"contain",isVideo:lf(it),widthPx:ht}),P.current={x:Bt,y:kt}},Zt=Te=>{if(!te||!$||!K)return;const{x:Ne,y:it}=_t(Te,$.widthPx);ce(Ne,it)},en=()=>{$&&U(()=>se(null))},$t=Te=>{H&&Ks(Te,c),!(!te||!$)&&U(()=>se(null))},Ht=Te=>{H&&Ys(Te,c)};a.useLayoutEffect(()=>{if(!$||!P.current)return;const{x:Te,y:Ne}=P.current;P.current=null,pe(Te,Ne)},[$==null?void 0:$.rowId,$==null?void 0:$.url,pe]),a.useLayoutEffect(()=>{if(!u||Z){ue(null);return}const Te=we.current,Ne=Te==null?void 0:Te.parentElement;if(!Te||!Ne){ue(null);return}const it=()=>{const yt=Te.querySelector("[data-list-row]");if(!yt){ue(null);return}const It=Ne.getBoundingClientRect(),ht=yt.getBoundingClientRect();ue(ht.top-It.top+ht.height/2)};it();const pt=new ResizeObserver(it);return pt.observe(Te),pt.observe(Ne),()=>pt.disconnect()},[u,Z,Ve,Ge,Pe,Je,t,e,st,ze,ge,m,ee,Fe,Re]);const nn=a.useMemo(()=>!Z&&ss.some(Te=>{const Ne=Te.charAt(0),it=e[`${Te}VerticalAlign`];return Hc(it,e,Ne)}),[Z,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);a.useLayoutEffect(()=>{var Bt;const Te=ke.current;if(!Te)return;const Ne=()=>{Te.querySelectorAll("[data-list-col]").forEach(kt=>{kt.style.transform="";const Pt=kt.querySelector(`.${c}-list-col`);Pt&&(Pt.style.minHeight="",Pt.style.height="");const qt=kt.querySelector(`.${c}-list-col-title`);qt&&(qt.style.transform="")})};if(Z||!nn){Ne();return}const it=()=>{const kt=Array.from(Te.querySelectorAll("[data-list-row]")),Pt=`${c}-list-col`,qt=`${c}-baseline-probe`;kt.forEach(Ut=>{Ut.querySelectorAll("[data-list-col]").forEach(Ot=>{Ot.style.transform="";const Dt=Ot.querySelector(`.${Pt}`);Dt&&(Dt.style.minHeight="",Dt.style.height="");const Nt=Ot.querySelector(`.${c}-list-col-title`);Nt&&(Nt.style.transform="")})}),kt.forEach(Ut=>{const Ot=Array.from(Ut.querySelectorAll("[data-list-col]"));Tf(Ut,Ot,Pt)}),Te.offsetHeight,kt.forEach(Ut=>{const Ot=Array.from(Ut.querySelectorAll("[data-list-col]")),Dt=Ut.getBoundingClientRect().top,Nt=new Map,Ct=Ot.map(Le=>{const He=Le.querySelector(`.${c}-list-col-title`),at={el:Le,titleEl:He,letter:Le.getAttribute("data-col-letter")??"",kind:Le.getAttribute("data-valign")??"top",anchor:Le.getAttribute("data-valign-anchor")};return Nt.set(at.letter,at),at}),w=new Map,xe=(Le,He)=>{const at=w.get(Le.letter);if(at!==void 0)return at;const Mt=Le.anchor?Nt.get(Le.anchor):void 0;if(Le.kind!=="baseline"||!Mt||He.has(Le.letter)){const on=na(Le,Dt,Pt,qt);return w.set(Le.letter,on),on}He.add(Le.letter);const ot=xe(Mt,He);He.delete(Le.letter);const vt=na(Le,Dt,Pt,qt),jt=ot-vt;Lf(Le.titleEl,jt);const Lt=na(Le,Dt,Pt,qt);return w.set(Le.letter,Lt),Lt};Ct.forEach(Le=>xe(Le,new Set))})};let pt=null;const yt=()=>{pt===null&&(pt=requestAnimationFrame(()=>{pt=null,it()}))};it();const It=new ResizeObserver(()=>yt());It.observe(Te);let ht=!1;return typeof document<"u"&&((Bt=document.fonts)!=null&&Bt.ready)&&document.fonts.ready.then(()=>{ht||yt()}),()=>{ht=!0,pt!==null&&(cancelAnimationFrame(pt),pt=null),It.disconnect(),Ne()}},[nn,Z,e,t,ge,Ve,ze]);const ct=a.useMemo(()=>hf(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ct}}),r.jsx("div",{style:Se,children:r.jsxs("div",{ref:ke,className:`${c}-wrapper ${re}${qe?` ${qe}`:""}${Z?` ${c}-type-b`:""}`.trim(),style:{width:C.scalingValue(y??0,n)},onMouseMove:te?Zt:void 0,onMouseLeave:te?en:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[Ve.map((Te,Ne)=>{var It;const it=(((It=Te.link)==null?void 0:It.length)??0)>0,pt=it&&(!n||i)?"a":"div",yt=Zs(Ne,Ve.length,ee,Fe,Re,m??0,n??!1);return r.jsxs(pt,{ref:Ne===0?ht=>{we.current=ht}:void 0,className:`${c}-list-item${it||x==="always"?` ${c}-list-item-has-link`:""}${Re&&Ne===Ve.length-1?` ${c}-list-item-before-cut`:""}`,...it?{href:Te.link,target:"_blank"}:{},style:yt,onMouseEnter:ht=>{H&&(it||x==="always")&&Ks(ht,c),te&&Gt(Te,ht)},onMouseLeave:ht=>{H&&(it||x==="always")&&Ys(ht,c)},children:[Ge>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ee(Ge)}}),r.jsxs("div",{className:`${c}-list-cols-row${Z?"":` ${c}-list-cols-row-h`}${u&&Ne===0&&Z?` ${c}-list-cols-row-controls`:""}`,...Z?{}:{"data-list-row":""},style:Z?void 0:{minHeight:Ee(Je)},children:[st.map((ht,Bt)=>{const kt=Bt===st.length-1,Pt=Ye[Bt],qt=ht.paddingBottom,Ut=df(Te.cells[ht.key]),Ot=Z&&Ut&&qt>0,Dt=Z?{minHeight:Ee(Je)}:{width:Ee(ze[Bt])},Nt=Z?{paddingLeft:Ee(fe),paddingRight:Ee(fe)}:{paddingLeft:Ee(Pt.paddingLeft),paddingRight:Ee(Pt.paddingRight)},Ct=ht.textPrefix.charAt(0),w=Z?xf(e[`${ht.textPrefix}VerticalAlign`]):vf(e[`${ht.textPrefix}VerticalAlign`],e,Ct),xe=Z&&Ut&&u&&Ne===0;return Z&&!Ut?null:r.jsxs("div",{className:Z?`${c}-list-col-wrap`:void 0,...Z?{}:{"data-list-col":"","data-col-letter":Ct,"data-valign":w.kind,...w.kind==="baseline"?{"data-valign-anchor":w.anchorLetter}:{}},children:[r.jsx("div",{className:`${c}-list-col${kt?` ${c}-list-col-last`:""}`,style:{...Nt,...Dt,...Z?{justifyContent:el(w.kind)}:{}},"data-test":ht.width,children:r.jsx("span",{className:nl(e,ht.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{...tl(fr(e,ht.textPrefix),n),...il(e,ht.textPrefix,c,n),...Z?{}:wf(w.kind)},children:Te.cells[ht.key]??null})}),Ot&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ee(qt)}}),xe&&r.jsx("div",{"data-controls":ht.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:Ee(Math.max(qt,ia))}})]},ht.key)}),u&&Ne===0&&Z&&r.jsxs(r.Fragment,{children:[r.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(Me),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:0,width:Ee(ye),height:"100%"}}),r.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(Me),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:Ee(Math.max(ye,Ue-ye)),width:Ee(ye),height:"100%"}})]})]}),!Z&&Pe>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ee(Pe)}}),u&&Ne===0&&!Z&&r.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:Ee(nt)}})]},Te.id)}),u&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.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":Z?"center":"left-y",className:`${c}-control-anchor`,style:{top:et,left:0,width:"100%",height:Ee(Math.max(Ge,ia))}})},"row-padding-handles"),u&&!Z&&Wt&&At&&r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx("div",{"data-controls":Wt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ze[0]-((gt==null?void 0:gt.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Ae??void 0,className:`${c}-control-anchor`,style:{top:0,left:0,width:Ee(zt),height:"100%"}}),r.jsx("div",{"data-controls":At.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ze[st.length-1]-((xt==null?void 0:xt.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Ae??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ee(bt-Ft),width:Ee(Ft),height:"100%"}})]},"column-edge-padding-handles"),u&&!Z&&st.slice(0,-1).map((Te,Ne)=>{const it=st[Ne+1],pt=_e.slice(0,Ne+1).reduce((kt,Pt)=>kt+Pt,0),yt=Ye[Ne],It=Ye[Ne+1],ht=Math.max(yt.paddingRight,Ei),Bt=Math.max(It.paddingLeft,Ei);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx("div",{"data-controls":Te.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ze[Ne]-yt.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Ae??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ee(pt-ht),width:Ee(ht),height:"100%"}}),r.jsx("div",{"data-controls":it.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ze[Ne+1]-It.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Ae??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ee(pt),width:Ee(Bt),height:"100%"}})]},`${Te.paddingRightKey}-padding`)}),u&&!Z&&st.slice(0,-1).map((Te,Ne)=>{const it=Bf(Ne,_e,ve,Ue),yt=_e.slice(0,Ne+1).reduce((It,ht)=>It+ht,0)-ol/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":Te.widthKey,"data-controls-axis":"x","data-controls-min":String(cs),"data-controls-max-fraction":String(it),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Ee(yt),width:Ee(ol),height:"calc(100%)",pointerEvents:"auto"}})},`${Te.widthKey}-junction`)})]}),Re&&(()=>{const Te=fr(e,An),Ne=Sf(e.cutLabelVerticalAlign),it=Te.textTextAlign==="justify"||Z;return r.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:Ee(T??0),cursor:lt?"pointer":"default",...uf(Fe,m??0,n??!1)},onClick:lt?Ze:void 0,onMouseEnter:H||te?$t:void 0,onMouseLeave:H?Ht:void 0,children:r.jsx("div",{className:`${c}-list-cols-row`,style:{...Z?{paddingLeft:Ee(fe),paddingRight:Ee(fe)}:{},justifyContent:$f(Te.textTextAlign),alignItems:el(Ne)},children:r.jsx("span",{className:nl(e,An,`${c}-cut-label`,`${c}-text-tight-leading`),style:{...tl(Te,n),...il(e,An,c,n),...it?{width:"100%"}:{}},children:G})})})})(),te&&$&&(()=>{const Te=`${$.widthPx}px`,Ne={width:Te,height:"auto",maxHeight:Te,objectFit:"contain"};return r.jsx("div",{ref:We,className:`${c}-hover-media-anchor`,children:r.jsx(cf,{media:$,className:$.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:Ne},`${$.rowId}-${$.url}`)})})()]})})]})}const Xf=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
10263
10276
  import { CommonComponentProps } from '../props';
10264
10277
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
10265
10278
  import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
@@ -13512,7 +13525,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13512
13525
  pointer-events: none;
13513
13526
  z-index: 2;
13514
13527
  }
13515
- `}function pl(e,t,n,i,o,s,l,d){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:s??0,textAppearance:l,color:d??"#000000"}}function fy({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s}){const{prefix:l}=C.useScopedStyles(),d=o??!1,{wrapperWidth:c=1,cellMinHeight:u=0,dividerWidth:p=694e-6,dividerStyle:v="solid",entryHoverEffect:y="default",autoclose:g="off",icon:h,iconMaxWidth:m=.00833,iconPaddingRight:b=0,iconAnimation:I="rotate 45",questionColor:R="#000000",answerColor:T="#000000",dividerColor:G="#0000001F",iconColor:k="#000000",questionHoverColor:V="#666666",iconHoverColor:A="#666666",iconActiveColor:L="#000000",dividerHoverColor:D="#000000",questionFontFamily:x,questionFontSettings:W,questionFontSize:M,questionLineHeight:Y,questionLetterSpacing:F,questionWordSpacing:X,questionTextAppearance:j,answerFontFamily:B,answerFontSettings:ne,answerFontSize:S,answerLineHeight:E,answerLetterSpacing:O,answerWordSpacing:ae,answerTextAppearance:ie,questionPaddingLeft:$=0,questionPaddingTop:re=0,questionPaddingBottom:P=0,answerPaddingLeft:te=0,answerPaddingRight:K=0,answerPaddingTop:fe=0,answerPaddingBottom:We=0}=e,me=t??[],[ce,U]=a.useState(()=>new Set),Q=!n||i;a.useEffect(()=>{U(new Set)},[g]),a.useEffect(()=>{n&&!o&&!i&&U(new Set)},[n,o,i]);const Z=Ke=>C.scalingValue(Ke,n??!1),ke=Math.max($,Nn),we=Math.max(re,Nn),Pe=Math.max(P,Nn),de=Math.max(te,Nn),ge=Math.max(K,Nn),be=Math.max(fe,Nn),z=Math.max(We,Nn),se=Math.max(0,(c??1)-b-m),he=Math.max(0,(c??1)-K),ye=Math.max(0,(c??1)-te),Me=Math.max(b,Nn),Le=Math.max(0,(c??1)-$-m),_=a.useMemo(()=>ce.size===0?0:Math.min(...ce),[ce]),pe=a.useCallback(Ke=>ce.has(Ke),[ce]),oe=Q&&y==="default"?`${l}-entry-hover-default`:"",H=h??"",ee=H!=="",Fe=I.replace(/^rotate /,""),le=`${l}-icon-anim-${Fe}`,N=rn(Kt(pl(x,W,M,Y,F,X,j,R),n)),Ue=rn(Kt(pl(B,ne,S,E,O,ae,ie,T),n)),je=dl(M,Y,`${l}-question`,`${l}-text-tight-leading`),gt=dl(S,E,`${l}-answer-text`,`${l}-text-tight-leading`),rt=ul(M,Y,l,n),ht=ul(S,E,l,n),lt=C.buildColorVars(l,{questionColor:R,answerColor:T,dividerColor:G,iconColor:k,questionHoverColor:V,iconHoverColor:A,iconActiveColor:L,dividerHoverColor:D},py,my),Ge=s&&s!=="default"?`${l}-state-${s}`:"",ve=a.useCallback(Ke=>{Q&&U(Se=>{if(Se.has(Ke)){const Ve=new Set(Se);return Ve.delete(Ke),Ve}if(g==="on")return new Set([Ke]);const De=new Set(Se);return De.add(Ke),De})},[Q,g]),_e=a.useMemo(()=>hy(l),[l]),ze={[`--${l}-divider-width`]:C.scalingValue(p,n??!1),[`--${l}-divider-style`]:v,[`--${l}-icon-max-width`]:C.scalingValue(m,n??!1),...u>0?{[`--${l}-question-min-height`]:C.scalingValue(u,n??!1)}:{}};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:_e}}),r.jsx("div",{style:lt,children:r.jsx("div",{className:mt(`${l}-wrapper`,n&&!i&&`${l}-editor`,oe,Ge),style:{width:C.scalingValue(c,n??!1),maxWidth:"100%",...ze},children:me.map((Ke,Se)=>{var tt;const De=pe(Se),Ve=((tt=Ke.question)==null?void 0:tt.trim())??"",et=Ke.answer,Ae=((et==null?void 0:et.length)??0)>0,$e=d&&Se===_;return r.jsxs("div",{className:mt(`${l}-item`,De&&`${l}-item-open`),"data-faq-item":"",children:[r.jsxs("div",{className:`${l}-question-controls`,children:[$e&&r.jsxs(r.Fragment,{children:[r.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:Z(we)}}),r.jsx("div",{"data-controls":"questionPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(se),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:Z(ke),height:"100%"}}),r.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(Le),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:Z(Me),height:"100%"}})]}),r.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":De,style:{...N,...rt,paddingLeft:Z($),paddingRight:Z(b)},onClick:()=>ve(Se),children:[re>0&&r.jsx("span",{className:`${l}-padding-handle`,style:{height:Z(re)},"aria-hidden":"true"}),r.jsxs("span",{className:`${l}-question-row`,children:[r.jsx("span",{className:je,children:Ve}),Ae&&(ee?r.jsx("span",{className:`${l}-icon ${l}-icon-custom ${le}`,"aria-hidden":"true",children:r.jsx(an,{url:H,fill:`var(--${l}-icon-color)`,hoverFill:`var(--${l}-icon-hover-color, var(--${l}-icon-color))`,className:`${l}-icon-image`})}):r.jsx("span",{className:`${l}-icon ${l}-icon-default ${le}`,"aria-hidden":"true"}))]}),P>0&&r.jsx("span",{className:`${l}-padding-handle`,style:{height:Z(P)},"aria-hidden":"true"})]}),$e&&r.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:Z(Pe)}})]}),Ae&&et&&r.jsx("div",{className:`${l}-panel`,"aria-hidden":!De,children:r.jsx("div",{className:`${l}-panel-inner`,children:r.jsxs("div",{className:`${l}-answer-controls`,children:[$e&&De&&r.jsxs(r.Fragment,{children:[r.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:Z(be)}}),r.jsx("div",{"data-controls":"answerPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(he),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:Z(de),height:"100%"}}),r.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(ye),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:Z(ge),height:"100%"}})]}),fe>0&&r.jsx("div",{className:`${l}-padding-handle`,style:{height:Z(fe)}}),r.jsx("div",{className:`${l}-answer`,style:{...Ue,...ht,paddingLeft:Z(te),paddingRight:Z(K)},children:r.jsx("div",{className:gt,children:r.jsx(yi,{content:et})})}),We>0&&r.jsx("div",{className:`${l}-padding-handle`,style:{height:Z(We)}}),$e&&De&&r.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:Z(z)}})]})})})]},Se)})})})]})}const yy=`import { useCallback, useEffect, useMemo, useState } from 'react';
13528
+ `}function pl(e,t,n,i,o,s,l,d){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:s??0,textAppearance:l,color:d??"#000000"}}function fy({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s}){const{prefix:l}=C.useScopedStyles(),d=o??!1,{wrapperWidth:c=1,cellMinHeight:u=0,dividerWidth:p=694e-6,dividerStyle:v="solid",entryHoverEffect:y="default",autoclose:g="off",icon:h,iconMaxWidth:m=.00833,iconPaddingRight:b=0,iconAnimation:I="rotate 45",questionColor:R="#000000",answerColor:T="#000000",dividerColor:G="#0000001F",iconColor:k="#000000",questionHoverColor:V="#666666",iconHoverColor:A="#666666",iconActiveColor:L="#000000",dividerHoverColor:D="#000000",questionFontFamily:x,questionFontSettings:W,questionFontSize:M,questionLineHeight:Y,questionLetterSpacing:F,questionWordSpacing:X,questionTextAppearance:j,answerFontFamily:B,answerFontSettings:ne,answerFontSize:S,answerLineHeight:E,answerLetterSpacing:O,answerWordSpacing:ae,answerTextAppearance:ie,questionPaddingLeft:$=0,questionPaddingTop:se=0,questionPaddingBottom:P=0,answerPaddingLeft:te=0,answerPaddingRight:K=0,answerPaddingTop:he=0,answerPaddingBottom:We=0}=e,pe=t??[],[ce,U]=a.useState(()=>new Set),Q=!n||i;a.useEffect(()=>{U(new Set)},[g]),a.useEffect(()=>{n&&!o&&!i&&U(new Set)},[n,o,i]);const Z=Ye=>C.scalingValue(Ye,n??!1),ke=Math.max($,Nn),we=Math.max(se,Nn),Ae=Math.max(P,Nn),ue=Math.max(te,Nn),ge=Math.max(K,Nn),be=Math.max(he,Nn),z=Math.max(We,Nn),oe=Math.max(0,(c??1)-b-m),fe=Math.max(0,(c??1)-K),ye=Math.max(0,(c??1)-te),Me=Math.max(b,Nn),Se=Math.max(0,(c??1)-$-m),_=a.useMemo(()=>ce.size===0?0:Math.min(...ce),[ce]),me=a.useCallback(Ye=>ce.has(Ye),[ce]),re=Q&&y==="default"?`${l}-entry-hover-default`:"",H=h??"",ee=H!=="",Fe=I.replace(/^rotate /,""),le=`${l}-icon-anim-${Fe}`,N=rn(Kt(pl(x,W,M,Y,F,X,j,R),n)),Xe=rn(Kt(pl(B,ne,S,E,O,ae,ie,T),n)),je=dl(M,Y,`${l}-question`,`${l}-text-tight-leading`),ut=dl(S,E,`${l}-answer-text`,`${l}-text-tight-leading`),tt=ul(M,Y,l,n),ft=ul(S,E,l,n),st=C.buildColorVars(l,{questionColor:R,answerColor:T,dividerColor:G,iconColor:k,questionHoverColor:V,iconHoverColor:A,iconActiveColor:L,dividerHoverColor:D},py,my),Ue=s&&s!=="default"?`${l}-state-${s}`:"",ve=a.useCallback(Ye=>{Q&&U(Ce=>{if(Ce.has(Ye)){const Ve=new Set(Ce);return Ve.delete(Ye),Ve}if(g==="on")return new Set([Ye]);const Oe=new Set(Ce);return Oe.add(Ye),Oe})},[Q,g]),_e=a.useMemo(()=>hy(l),[l]),ze={[`--${l}-divider-width`]:C.scalingValue(p,n??!1),[`--${l}-divider-style`]:v,[`--${l}-icon-max-width`]:C.scalingValue(m,n??!1),...u>0?{[`--${l}-question-min-height`]:C.scalingValue(u,n??!1)}:{}};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:_e}}),r.jsx("div",{style:st,children:r.jsx("div",{className:mt(`${l}-wrapper`,n&&!i&&`${l}-editor`,re,Ue),style:{width:C.scalingValue(c,n??!1),maxWidth:"100%",...ze},children:pe.map((Ye,Ce)=>{var lt;const Oe=me(Ce),Ve=((lt=Ye.question)==null?void 0:lt.trim())??"",Re=Ye.answer,Ie=((Re==null?void 0:Re.length)??0)>0,qe=d&&Ce===_;return r.jsxs("div",{className:mt(`${l}-item`,Oe&&`${l}-item-open`),"data-faq-item":"",children:[r.jsxs("div",{className:`${l}-question-controls`,children:[qe&&r.jsxs(r.Fragment,{children:[r.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:Z(we)}}),r.jsx("div",{"data-controls":"questionPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(oe),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:Z(ke),height:"100%"}}),r.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(Se),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:Z(Me),height:"100%"}})]}),r.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":Oe,style:{...N,...tt,paddingLeft:Z($),paddingRight:Z(b)},onClick:()=>ve(Ce),children:[se>0&&r.jsx("span",{className:`${l}-padding-handle`,style:{height:Z(se)},"aria-hidden":"true"}),r.jsxs("span",{className:`${l}-question-row`,children:[r.jsx("span",{className:je,children:Ve}),Ie&&(ee?r.jsx("span",{className:`${l}-icon ${l}-icon-custom ${le}`,"aria-hidden":"true",children:r.jsx(an,{url:H,fill:`var(--${l}-icon-color)`,hoverFill:`var(--${l}-icon-hover-color, var(--${l}-icon-color))`,className:`${l}-icon-image`})}):r.jsx("span",{className:`${l}-icon ${l}-icon-default ${le}`,"aria-hidden":"true"}))]}),P>0&&r.jsx("span",{className:`${l}-padding-handle`,style:{height:Z(P)},"aria-hidden":"true"})]}),qe&&r.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:Z(Ae)}})]}),Ie&&Re&&r.jsx("div",{className:`${l}-panel`,"aria-hidden":!Oe,children:r.jsx("div",{className:`${l}-panel-inner`,children:r.jsxs("div",{className:`${l}-answer-controls`,children:[qe&&Oe&&r.jsxs(r.Fragment,{children:[r.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:Z(be)}}),r.jsx("div",{"data-controls":"answerPaddingLeft","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-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:Z(ue),height:"100%"}}),r.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(ye),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:Z(ge),height:"100%"}})]}),he>0&&r.jsx("div",{className:`${l}-padding-handle`,style:{height:Z(he)}}),r.jsx("div",{className:`${l}-answer`,style:{...Xe,...ft,paddingLeft:Z(te),paddingRight:Z(K)},children:r.jsx("div",{className:ut,children:r.jsx(yi,{content:Re})})}),We>0&&r.jsx("div",{className:`${l}-padding-handle`,style:{height:Z(We)}}),qe&&Oe&&r.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:Z(z)}})]})})})]},Ce)})})})]})}const yy=`import { useCallback, useEffect, useMemo, useState } from 'react';
13516
13529
  import cn from 'classnames';
13517
13530
  import { CommonComponentProps } from '../props';
13518
13531
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
@@ -14260,7 +14273,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
14260
14273
  </>
14261
14274
  );
14262
14275
  }
14263
- `;function On(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const ml={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},vy=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],xy={type:"object",version:1,content:{type:"array",display:{type:"array"},items:{type:"object",properties:{question:{type:"string",label:"Question",placeholder:"Add question...",display:{type:"text-input"}},answer:{label:"Answer",placeholder:"Add answer...",display:{type:"rich-text"}}}},default:[{question:"What are the three main parts of The Divine Comedy?",answer:[{type:"paragraph",children:[{text:"The poem is divided into Inferno, Purgatorio, and Paradiso. These three sections follow Dante’s journey through Hell, Purgatory, and Heaven."}]}]},{question:"Who guides Dante through Hell and most of Purgatory?",answer:[{type:"paragraph",children:[{text:"Dante is guided by Virgil, the ancient Roman poet. Virgil represents human reason and wisdom, but because he lived before Christianity, he cannot guide Dante all the way into Heaven."}]}]},{question:"What does the dark wood at the beginning of the poem symbolize?",answer:[{type:"paragraph",children:[{text:"The dark wood symbolizes Dante’s spiritual confusion and moral crisis. It shows that he has lost the “straight way” in life and needs guidance to return to truth and salvation."}]}]},{question:"What is “contrapasso” in Inferno?",answer:[{type:"paragraph",children:[{text:"“Contrapasso” is the principle that punishments in Hell reflect the sins committed during life. For example, people who caused division are themselves physically divided, showing how their punishment mirrors their wrongdoing."}]}]},{question:"Who guides Dante through Heaven?",answer:[{type:"paragraph",children:[{text:"Beatrice guides Dante through Paradiso. She represents divine love, grace, and spiritual understanding, helping Dante move beyond human reason toward a vision of God."}]}]},{question:"Why is The Divine Comedy important in literary history?",answer:[{type:"paragraph",children:[{text:"The Divine Comedy is important because it is one of the greatest works of world literature and helped shape the Italian language. Dante wrote it in the Tuscan dialect rather than Latin, making serious literature more accessible to ordinary readers."}]}]},{question:"What is the overall journey of The Divine Comedy about?",answer:[{type:"paragraph",children:[{text:"The poem is about Dante’s spiritual journey from sin and despair toward repentance, wisdom, and union with God. On a deeper level, it represents the soul’s path from confusion to divine truth."}]}]}]},settings:{sizing:"auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},dividerWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},dividerStyle:{type:"string",scope:"common",title:"Style",display:{type:"toggle-cycle",enum:["solid","dashed","dotted"]}},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default"]}},autoclose:{type:"string",scope:"common",title:"Autoclose",display:{type:"toggle-cycle",enum:["on","off"]}},icon:{type:["string","null"],scope:"common",display:{type:"settings-image-input"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:On("Icon Padding Right"),iconAnimation:{type:"string",scope:"common",title:"Icon Animation",display:{type:"toggle-cycle",enum:["rotate 180","rotate 90","rotate 45"]}},questionColor:{type:"string",scope:"common",title:"Question Default",display:{type:"palette-color-picker"}},answerColor:{type:"string",scope:"common",title:"Answer Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"palette-color-picker"}},questionHoverColor:{type:"string",scope:"common",title:"Question Hover",display:{type:"palette-color-picker"}},iconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"palette-color-picker"}},iconActiveColor:{type:"string",scope:"common",title:"Icon Active",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}},questionFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},questionFontSettings:{...ml.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:{...ml.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},answerFontSize:{type:"number",scope:"layout",title:"Answer Font Size",display:{type:"font-size"}},answerLineHeight:{type:"number",scope:"layout",title:"Answer Line Height",display:{type:"line-height-input"}},answerLetterSpacing:{type:"number",scope:"layout",title:"Answer Letter Spacing",display:{type:"letter-spacing-input"}},answerWordSpacing:{type:"number",scope:"layout",title:"Answer Word Spacing",display:{type:"word-spacing-input"}},answerTextAppearance:{type:"object",scope:"layout",title:"Answer Text Appearance",display:{type:"text-appearance"}},questionPaddingLeft:On("Question Padding Left"),questionPaddingTop:On("Question Padding Top"),questionPaddingBottom:On("Question Padding Bottom"),answerPaddingLeft:On("Answer Padding Left"),answerPaddingRight:On("Answer Padding Right"),answerPaddingTop:On("Answer Padding Top"),answerPaddingBottom:On("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/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:[...vy],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},by={element:fy,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:xy,sourceCode:yy},Fn=e=>e.display==="cover",Fr=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},gl=100,wy=.2,hl=8,Bc=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,s]=a.useState(0),[l,d]=a.useState(!1),c=a.useRef(null),u=a.useRef(0);u.current=o;const p=a.useMemo(()=>typeof window>"u"?gl:Math.max(gl,window.innerHeight*wy),[]),v=a.useCallback(x=>Math.max(0,1-x/(p*1.5)),[p]),y=a.useCallback(x=>Math.max(0,1-x/(p*.45)),[p]),g=a.useCallback(x=>{const W=typeof window<"u"?window.innerHeight:800,M=Math.max(.88,1-x/W*.12);return`translateY(${x}px) scale(${M})`},[]),h=a.useCallback(()=>{c.current=null},[]),m=a.useCallback(()=>{d(!0),s(0),window.setTimeout(()=>d(!1),n),h()},[n,h]),b=a.useCallback(()=>{const x=typeof window<"u"?window.innerHeight:800;d(!0),s(x),window.setTimeout(()=>{t(),h(),d(!1)},Math.min(n,200))},[n,t,h]),I=a.useCallback(x=>{!e||l||x.pointerType==="touch"&&(i!=null&&i(x.target)||(c.current={startX:x.clientX,startY:x.clientY,isLocked:null,pointerId:x.pointerId}))},[e,l,i]),R=a.useCallback(x=>{const W=c.current;if(!e||!W||x.pointerType!=="touch"||W.pointerId!==x.pointerId)return;const M=x.clientX-W.startX,Y=x.clientY-W.startY;if(W.isLocked===null){if(Math.abs(M)<hl&&Math.abs(Y)<hl)return;if(Y>0&&Y>Math.abs(M))W.isLocked=!0,x.currentTarget.setPointerCapture(x.pointerId);else{W.isLocked=!1,h();return}}if(!W.isLocked)return;x.preventDefault();const F=Math.max(0,Y);u.current=F,s(F)},[e,h]),T=a.useCallback(x=>{const W=c.current;if(!e||!W||x.pointerType!=="touch"||W.pointerId!==x.pointerId)return;const M=W.isLocked===!0;if(x.currentTarget.hasPointerCapture(x.pointerId)&&x.currentTarget.releasePointerCapture(x.pointerId),!M){h();return}x.clientY-W.startY>=p?b():m()},[p,b,e,h,m]),G=a.useCallback(x=>{T(x)},[T]),k=a.useCallback(x=>{T(x)},[T]),V=o>0,A=l?`transform ${n}ms ease`:"none",L=l?`opacity ${n}ms ease`:"none",D=o>0||l;return{isSwipeDragging:V,backdropStyle:{opacity:v(o),transition:L},mediaAreaStyle:{transform:g(o),transition:A,touchAction:V?"none":void 0,willChange:V?"transform":void 0},overlayContentStyle:D?{opacity:y(o),transition:L}:void 0,swipeHandlers:e?{onPointerDown:I,onPointerMove:R,onPointerUp:G,onPointerCancel:k}:{},dismissAreaStyle:e?{touchAction:V?"none":"pan-x"}:void 0}},Sy="[data-lightbox-scrollable]",Vc=()=>{a.useEffect(()=>{const e=window.scrollY,t=document.body.style.overflow,n=document.body.style.position,i=document.body.style.top,o=document.body.style.width,s=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const l=d=>{const c=d.target;c instanceof Element&&c.closest(Sy)||d.preventDefault()};return document.addEventListener("touchmove",l,{passive:!1}),()=>{document.removeEventListener("touchmove",l),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=s,window.scrollTo({top:e,left:0,behavior:"instant"})}},[])},$y=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Cy=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},Ty=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},Ly=(e,t,n,{duration:i,easing:o,onComplete:s})=>{const l=e.scrollLeft,d=n-l,c=l-n,u=(h,m)=>{Cy(t),e.scrollLeft=h,m&&(s==null||s())};if(Math.abs(d)<.5)return u(n,!0),()=>{};let p=!1,v=0;const y=()=>{t.removeEventListener("transitionend",g),clearTimeout(v)},g=h=>{h.target!==t||h.propertyName!=="transform"||p||(p=!0,y(),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)`,v=window.setTimeout(()=>{p||(p=!0,y(),u(n,!0))},i+64),()=>{p||(p=!0,y(),u(l-Ty(t),!1))}},mo=300,Ry=900,Iy=1500,Ey="cubic-bezier(0.16, 1, 0.3, 1)",My=3e3,Py=2,ky=16,Ay=.05,Fy=1,Ko=.3,Wy=50,_y=20,$i=.004,qi=["title1","title2","title3"],Hy={title1:"1",title2:"2",title3:"3"},Ny={title1:"title1Color",title2:"title2Color",title3:"title3Color"},Oy={title1:.02,title2:.02,title3:.02},Yo=e=>`max(${e}, ${_y}px)`,Dy=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]}},jy=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=Dy(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Vt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,zy=e=>[Vt(e,"fontFamily"),Vt(e,"fontSettings"),{type:"row",items:[Vt(e,"fontSize"),Vt(e,"lineHeight"),Vt(e,"letterSpacing"),Vt(e,"wordSpacing")]},Vt(e,"textAlign"),Vt(e,"textAppearance")],By=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(qi.map(e=>[Hy[e],zy(e)]))}),us=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,l)=>s+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:l},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...l]};const c=Math.min(s,d);return{overflow:s-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},Gc=(e,t)=>us(e,t),Zo=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},fl=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:us(e.length,n),effective:Gc(e.length,n)}},Vy=(e,t,n,i,o,s,l)=>{const d=[];return t&&d.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&d.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:s,text:n}),i&&d.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:l,text:i}),d},ra=(e,t)=>{const n=i=>{const o=Vt(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[Ny[t]]}},Gy=(e,t,n,i)=>e.slice(0,i).reduce((o,s,l)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[l]??0),0),aa=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??Oy[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Kt(i,n)},qy=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:l})=>{const{backgroundColor:d,thumbnailSize:c,thumbnailGap:u,thumbnailMarginBottom:p,imageGap:v,closeIcon:y,closeIconMaxWidth:g,closeIconColor:h,closeIconHoverColor:m,thumbnailTrigger:b,thumbnailVisibility:I,thumbnailObjectFit:R,thumbnailActive:T,thumbnailActiveColor:G,title1Width:k,title2Width:V,title3Width:A,title1MarginLeft:L=0,title2MarginLeft:D=0,title3MarginLeft:x=0,titleRowMarginBottom:W=0,titleHeaderLayout:M="desktop",contentMarginTop:Y,iconMarginLeft:F}=n,X=f=>C.scalingValue(f,i??!1),j=c??n.thumnailSize??.03,B=X(j),ne=X(u),S=X(p??.02),E=X(v??0),O=X(Y??0),ae=Yo(O),ie=X(F??0),[$,re]=a.useState(0),P=a.useRef($);P.current=$;const te=t[$],{title1:K,title2:fe,title3:We}=jy(te),me=aa("title1",ra(n,"title1"),i),ce=aa("title2",ra(n,"title2"),i),U=aa("title3",ra(n,"title3"),i),Q=M==="mobile",Z=!o&&(!i||s),ke=Z,we=Z,Pe=Z,de=Fn(R),ge=de?{"--image-aspect-ratio":Fr(R)}:void 0,be=!!(K||fe||We),z=a.useMemo(()=>Vy(e,K,fe,We,me,ce,U),[e,$,K,fe,We,me,ce,U]),se=a.useMemo(()=>({title1Width:k,title2Width:V,title3Width:A}),[k,V,A]),he=a.useMemo(()=>z.map(f=>se[f.widthKey]),[z,se]),ye=a.useMemo(()=>us(z.length,he),[z.length,he]),Me=a.useMemo(()=>Gc(z.length,he),[z.length,he]),Le=a.useMemo(()=>z.filter(f=>f.prefix==="title1"),[z]),_=a.useMemo(()=>z.filter(f=>f.prefix==="title2"||f.prefix==="title3"),[z]),pe=a.useMemo(()=>fl(Le,se),[Le,se]),oe=a.useMemo(()=>fl(_,se),[_,se]),H=a.useCallback((f,q)=>{const J=z.indexOf(f);if(!Q||q==="single-row")return{effectiveWidth:Me[J]??0,resolvedWidth:ye[J]??0,maxWidth:Zo(J,ye)};if(q==="two-row-top"){const Oe=Le.indexOf(f);return{effectiveWidth:pe.effective[Oe]??0,resolvedWidth:pe.resolved[Oe]??0,maxWidth:Zo(Oe,pe.resolved)}}const Ce=_.indexOf(f);return{effectiveWidth:oe.effective[Ce]??0,resolvedWidth:oe.resolved[Ce]??0,maxWidth:Zo(Ce,oe.resolved)}},[_,oe,Me,ye,z,Le,pe,Q]),ee=a.useCallback(f=>C.scalingValue(f,i??!1),[i]),Fe=ee(W??0),le=a.useMemo(()=>({title1MarginLeft:L,title2MarginLeft:D,title3MarginLeft:x}),[L,D,x]),N=a.useCallback(f=>z.slice(0,f+1).reduce((q,J,Ce)=>q+(J!=null&&J.marginLeftKey?le[J.marginLeftKey]??0:0)+(ye[Ce]??0),0)+(Q?0:L??0),[z,le,ye,Q,L]),Ue=a.useCallback(()=>Q?0:L??0,[Q,L]),je=a.useCallback(f=>_.slice(0,f).reduce((q,J,Ce)=>q+(J.marginLeftKey?le[J.marginLeftKey]??0:0)+(oe.resolved[Ce]??0),0),[_,oe.resolved,le]),gt=a.useCallback(f=>{const q=_[f];return je(f)+(q.marginLeftKey?le[q.marginLeftKey]??0:0)+(oe.resolved[f]??0)},[_,oe.resolved,je,le]),rt=(f,q)=>{const J=f.marginLeftKey?le[f.marginLeftKey]??0:0,{effectiveWidth:Ce,resolvedWidth:Oe,maxWidth:Ye}=H(f,q),wt=o&&q==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":f.prefix,style:{...q==="single-row"?{gridArea:f.prefix}:{},width:ee(Ce),...J>0?{marginLeft:ee(J)}:{}},children:[r.jsx("p",{className:f.className,style:f.style,children:f.text}),wt&&f.marginLeftKey&&r.jsx("div",{"data-controls":f.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Oe),style:{position:"absolute",top:0,left:ee(-J),width:`max(${ee(J)}, 10px)`,height:"100%",pointerEvents:"auto"}}),wt&&r.jsx("div",{"data-controls":f.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ye),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:ee(-$i/2),width:ee($i),height:"100%",pointerEvents:"auto"}})]},f.className)},ht=()=>{const f=Q?-1:z.findIndex(Ce=>Ce.prefix==="title1"),q=!Q&&(o||(L??0)>0)?(()=>{const Ce=L??0,Oe=f>=0?ye[f]:k??0;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Oe),style:{position:"absolute",top:0,left:0,width:`max(${ee(Ce)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,J=z.flatMap((Ce,Oe)=>{if(!Ce.marginLeftKey)return[];const Ye=le[Ce.marginLeftKey]??0,wt=Gy(z,ye,le,Oe)+Ue();return r.jsx("div",{"data-controls":Ce.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ye[Oe]),style:{position:"absolute",top:0,left:ee(wt),width:`max(${ee(Ye)}, 10px)`,height:"100%",pointerEvents:"auto"}},Ce.marginLeftKey)});return q?[q,...J]:J},lt=()=>z.map((f,q)=>{const J=Zo(q,ye),Oe=N(q)-$i/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":f.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(J),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:ee(Oe),width:ee($i),height:"100%",pointerEvents:"auto"}})},`${f.widthKey}-junction`)}),Ge=()=>_.flatMap((f,q)=>{if(!f.marginLeftKey)return[];const J=le[f.marginLeftKey]??0,Ce=je(q),{resolvedWidth:Oe}=H(f,"two-row-bottom");return r.jsx("div",{"data-controls":f.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Oe),style:{position:"absolute",top:0,left:ee(Ce),width:`max(${ee(J)}, 10px)`,height:"100%",pointerEvents:"auto"}},f.marginLeftKey)}),ve=()=>_.map((f,q)=>{const{maxWidth:J}=H(f,"two-row-bottom"),Oe=gt(q)-$i/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":f.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(J),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:ee(Oe),width:ee($i),height:"100%",pointerEvents:"auto"}})},`${f.widthKey}-junction`)}),_e=a.useRef(null),ze=a.useRef(null),Ke=a.useRef(null),Se=a.useRef(null),De=a.useRef([]),Ve=a.useRef([]),et=a.useRef(0),Ae=a.useRef(null),$e=a.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),tt=a.useRef(null),Ze=a.useRef(null),Ie=a.useRef(0),qe=a.useRef("forward"),Ee=a.useRef(0),Je=a.useRef(null),Qe=a.useRef(!1),st=t.length>1&&(!o||!!s),St=st?3:1,Pt=a.useMemo(()=>Array.from({length:St},()=>t).flat(),[t,St]),[Nt,dt]=a.useState(!1),[yt,Ot]=a.useState(!1),[Ft,bt]=a.useState(!0),Wt=a.useRef(null),Gt=a.useRef(null),Zt=a.useRef(!1),en=a.useRef(!1),Tt=a.useRef(null),_t=a.useRef(null),nn=ke&&!Ft,ct=a.useCallback(()=>{ke&&(bt(!0),_t.current&&clearTimeout(_t.current),_t.current=setTimeout(()=>{$e.current.isActive||bt(!1)},My))},[ke]),Te=a.useCallback(()=>{o||en.current||(en.current=!0,Ot(!1),Tt.current=setTimeout(()=>{l()},mo))},[o,l]),Ne=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":nn?"true":"false",style:{width:C.scalingValue(g??0,i),height:C.scalingValue(g??0,i),marginRight:ie,"--close-icon-hover-color":m},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Te,"aria-label":"Close",children:r.jsx(an,{url:y,fill:h,hoverFill:i&&!s?h:m,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:ie,height:"100%",pointerEvents:"auto"}})]}),nt=(f="two-row")=>r.jsx("div",{...f==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:ee(L??0),flexShrink:0,...f==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...f==="two-row"&&o?{pointerEvents:"auto"}:{}}}),pt=()=>{const f=z.find(Ce=>Ce.prefix==="title1"),q=z.filter(Ce=>Ce.prefix==="title2"||Ce.prefix==="title3"),J=q.length>0||o||(W??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(L??0)>0||o?nt():null,f&&rt(f,"two-row-top"),y&&Ne()]}),J?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[q.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[q.map(Ce=>rt(Ce,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[Ge(),ve()]})]}):null,r.jsx("div",{"data-controls":o?"titleRowMarginBottom":void 0,"data-controls-axis":o?"y":void 0,"data-controls-reverse":o?"":void 0,className:o?`${e}-control`:void 0,style:{height:Fe,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},vt=()=>r.jsxs(r.Fragment,{children:[(L??0)>0||o?nt("single-row"):null,z.map(f=>rt(f,"single-row")),o?r.jsxs(r.Fragment,{children:[ht(),lt()]}):null,y?Ne():null]}),It=a.useCallback(f=>!!(f.closest("[data-controls]")||f.closest(`.${e}-thumbnails`)||f.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:ft,backdropStyle:Bt,mediaAreaStyle:At,overlayContentStyle:kt,swipeHandlers:qt,dismissAreaStyle:Ut}=Bc({enabled:Z??!1,onClose:Te,animMs:mo,isBlockedTarget:It}),Dt=()=>{if(!st||t.length===0)return et.current=0,0;const f=Ve.current[0],q=Ve.current[t.length];if(!f||!q)return et.current;const J=q.offsetLeft-f.offsetLeft;return J>0&&(et.current=J),et.current},jt=(f=!1)=>{if(!st)return;const q=ze.current,J=Dt();!q||J<=0||J<q.clientWidth*.25||(q.scrollLeft<=0?(q.scrollLeft+=J,f&&($e.current.scrollLeft+=J),Qe.current&&(Ee.current+=J)):q.scrollLeft>=J*2&&(q.scrollLeft-=J,f&&($e.current.scrollLeft-=J),Qe.current&&(Ee.current-=J)))},Ht=(f,q=(J=>(J=ze.current)==null?void 0:J.scrollLeft)()??0)=>{if(!st)return f;let Ce=t.length+f,Oe=1/0;for(let Ye=0;Ye<St;Ye++){const wt=Ye*t.length+f,Rt=Ve.current[wt];if(!Rt)continue;const tn=Math.abs(Rt.offsetLeft-q);tn<Oe&&(Oe=tn,Ce=wt)}return Ce},$t=f=>{const q=ze.current;return!f||!q?!1:f.offsetWidth>q.clientWidth+1},w=f=>{const q=ze.current;if(!f||!q||!$t(f))return!1;const J=f.offsetLeft,Ce=J+f.offsetWidth;return q.scrollLeft>=J-1&&q.scrollLeft+q.clientWidth<=Ce+1},xe=(f=(q=>(q=ze.current)==null?void 0:q.scrollLeft)()??0)=>{for(let Ce=0;Ce<Ve.current.length;Ce+=1){const Oe=Ve.current[Ce];if(Oe&&w(Oe))return Ce}let J={flatIndex:0,distance:1/0};return Ve.current.forEach((Ce,Oe)=>{if(!Ce)return;const Ye=Math.abs(Ce.offsetLeft-f);Ye<J.distance&&(J={flatIndex:Oe,distance:Ye})}),J.flatIndex},Re=f=>{ze.current&&Ve.current.forEach(q=>{q&&(q.style.scrollSnapAlign=$t(q)&&f==="backward"?"end":"start")})},He=(f,q,J)=>{const Ce=f-q,Oe=xe(q),Ye=Ve.current[Oe];if(w(Ye))return xe(f)%t.length;const wt=Ve.current[Oe+1],Rt=Ye?wt?wt.offsetLeft-Ye.offsetLeft:Ye.offsetWidth:0,tn=Rt>0?Ce>Rt*Ko?1:Ce<-Rt*Ko?-1:0:0;return tn===0?J:st?(J+tn+t.length)%t.length:Math.max(0,Math.min(t.length-1,J+tn))},at=a.useCallback((f=!1)=>{if(I!=="on"||o)return;const q=Se.current,J=P.current,Ce=De.current[J];if(!q||!Ce||q.scrollWidth<=q.clientWidth)return;const Oe=q.scrollLeft,Ye=Oe+q.clientWidth,wt=Ce.offsetLeft,Rt=wt+Ce.offsetWidth;if(wt>=Oe&&Rt<=Ye)return;const tn=q.scrollWidth-q.clientWidth;let Jt=Oe;if(!f&&Wt.current===null){const bi=De.current[J-1],eo=De.current[J+1],Oo=bi?Ce.offsetLeft-bi.offsetLeft:eo?eo.offsetLeft-Ce.offsetLeft:Ce.offsetWidth;Rt>Ye?Jt+=Oo:wt<Oe&&(Jt-=Oo)}else Rt>Ye?Jt=Rt-q.clientWidth:Jt=wt;q.scrollLeft=Math.max(0,Math.min(tn,Jt))},[o,I]),Mt=a.useCallback((f=!1)=>{f&&(Zt.current=!0),Gt.current===null&&(Gt.current=requestAnimationFrame(()=>{Gt.current=null;const q=Zt.current;Zt.current=!1,at(q)}))},[at]),it=a.useCallback(f=>{if(f===P.current)return;const q=P.current;P.current=f;const J=Math.abs(f-q)>1,Ce=st&&t.length>1&&(q===t.length-1&&f===0||q===0&&f===t.length-1);re(f),Mt(J||Ce)},[t.length,st,Mt]),xt=()=>{if(!ze.current||t.length===0||Wt.current!==null||$e.current.isActive&&$e.current.hasMoved)return;const f=ze.current.scrollLeft,q=xe(f)%t.length;q!==P.current&&it(q)},zt=()=>{Wt.current=null},Lt=f=>{const q=ze.current;q&&(q.style.scrollSnapType=f?"":"none")},on=()=>{var f;(f=Ze.current)==null||f.call(Ze),Ze.current=null},dn=()=>{Je.current!==null&&(cancelAnimationFrame(Je.current),Je.current=null),Qe.current=!1},ei=()=>{const f=ze.current;if(!f){Je.current=null,Qe.current=!1;return}const q=Ee.current-f.scrollLeft;if(Math.abs(q)<.5){f.scrollLeft=Ee.current,jt(),xt(),Je.current=null,Qe.current=!1;return}f.scrollLeft+=q*Ay,jt(),xt(),ct(),Je.current=requestAnimationFrame(ei)},ti=()=>{const f=Ke.current;f&&(f.style.transition="",f.style.transform="",f.style.willChange="")},Wo=(f,q,J,Ce)=>{ti(),f.scrollLeft=q,Ie.current=f.scrollLeft,jt(),J!==void 0?(P.current=J,re(J)):xt(),Lt(!0),Ce==null||Ce()},_o=(f,{behavior:q="smooth",activeIndex:J,onComplete:Ce}={})=>{const Oe=ze.current,Ye=Ke.current;if(!Oe||!Ye)return;if(dn(),on(),Lt(!1),q==="auto"){Wo(Oe,f,J,Ce);return}const wt=Math.abs(f-Oe.scrollLeft),Rt=$y(wt,Ry,Iy,Oe.clientWidth*.55);Ze.current=Ly(Oe,Ye,f,{duration:Rt,easing:Ey,onComplete:()=>{Ze.current=null,Wo(Oe,f,J,Ce)}})},_r=(f="smooth")=>{const q=ze.current;if(!q||t.length===0)return;const J=xe()%t.length,Ce=Ht(J,q.scrollLeft),Oe=Ve.current[Ce];Oe&&_o(Oe.offsetLeft,{behavior:f,activeIndex:J})},Hr=(f,q="smooth",J,Ce)=>{const Oe=ze.current;if(!Oe||t.length===0)return;const Ye=(Ce??Oe.scrollLeft)-f,wt=xe(f),Rt=Ve.current[wt];if(w(Rt)){Lt(!0),xt();return}const tn=Ve.current[wt+1],Jt=Rt?tn?tn.offsetLeft-Rt.offsetLeft:Rt.offsetWidth:0;if((Jt>0?Ye>Jt*Ko?1:Ye<-Jt*Ko?-1:0:0)!==0){const cd=J??wt%t.length,dd=He(Ce??Oe.scrollLeft,f,cd);Sn(dd,q);return}const eo=Ce??Oe.scrollLeft,Oo=xe(eo),ms=Ve.current[Oo];if(ms&&Math.abs(ms.offsetLeft-eo)<1){Lt(!0),xt();return}_r("auto")},Sn=(f,q="smooth")=>{const J=ze.current;if(!J||t.length===0)return;const Ce=Ht(f,J.scrollLeft),Oe=Ve.current[Ce];Oe&&(q==="smooth"?Wt.current=f:Wt.current=null,P.current=f,re(f),Mt(!0),_o(Oe.offsetLeft,{behavior:q,activeIndex:f,onComplete:q==="smooth"?zt:void 0}))},xi=()=>{tt.current&&(window.removeEventListener("pointerup",tt.current),window.removeEventListener("pointercancel",tt.current),tt.current=null)},Ho=(f,q,J,Ce,Oe)=>{const Ye=J-f,wt=Ce-q,Rt=Math.abs(Ye),tn=Math.abs(wt);if(Rt<Wy||Rt<=tn)return!1;const Jt=Ye<0?1:-1,bi=st?(Oe+Jt+t.length)%t.length:Math.max(0,Math.min(t.length-1,Oe+Jt));return bi===Oe?!1:(Sn(bi),!0)},ni=f=>{if(!$e.current.isActive)return;xi();const q=ze.current;if(!q)return;const{scrollLeft:J,startActiveIndex:Ce,hasMoved:Oe}=$e.current,Ye=q.scrollLeft;jt(!0),$e.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},dt(!1),f!==void 0&&q.hasPointerCapture(f)&&q.releasePointerCapture(f),Oe?Hr(J,"smooth",Ce,Ye):(Lt(!0),xt()),ct()},No=(f,q)=>{const J=Ae.current;Ae.current=null,J&&(Ho(J.startX,J.startY,f,q,J.startActiveIndex),ct())},Nr=f=>{if(!we)return;if(f.pointerType==="touch"){if(dn(),Lt(!0),It(f.target))return;Ae.current={startX:f.clientX,startY:f.clientY,startActiveIndex:P.current};return}if(f.pointerType!=="mouse"||f.button!==0||It(f.target))return;const q=ze.current;if(!q)return;dn(),on(),ti(),Wt.current=null,$e.current={isActive:!0,startX:f.clientX,scrollLeft:q.scrollLeft,startActiveIndex:P.current,hasMoved:!1},Lt(!1),ct(),q.setPointerCapture(f.pointerId),xi();const J=Ce=>{Ce.pointerType==="mouse"&&ni(Ce.pointerId)};tt.current=J,window.addEventListener("pointerup",J),window.addEventListener("pointercancel",J)},Or=f=>{if(!we||f.pointerType!=="mouse")return;const q=ze.current;if(!q||!$e.current.isActive)return;if(f.buttons===0){ni(f.pointerId);return}const J=f.clientX-$e.current.startX;Math.abs(J)>Fy&&($e.current.hasMoved=!0,dt(!0)),$e.current.hasMoved&&(f.preventDefault(),q.scrollLeft=$e.current.scrollLeft-J,jt(!0),xt(),ct())},ue=f=>{if(we){if(f.pointerType==="touch"){f.type==="pointerup"?No(f.clientX,f.clientY):Ae.current=null;return}f.pointerType==="mouse"&&ni(f.pointerId)}},Be=f=>{!we||f.pointerType!=="mouse"||ni(f.pointerId)};return Vc(),a.useEffect(()=>{const f=requestAnimationFrame(()=>Ot(!0));return()=>{cancelAnimationFrame(f),on(),xi(),Gt.current!==null&&(cancelAnimationFrame(Gt.current),Gt.current=null),Tt.current&&clearTimeout(Tt.current),_t.current&&clearTimeout(_t.current)}},[]),a.useEffect(()=>{if(!ke){bt(!0);return}ct();const f=()=>ct();return document.addEventListener("pointermove",f,{passive:!0}),document.addEventListener("pointerdown",f,{passive:!0}),()=>{document.removeEventListener("pointermove",f),document.removeEventListener("pointerdown",f),_t.current&&clearTimeout(_t.current)}},[ke,ct]),a.useEffect(()=>{const f=q=>{q.key==="Escape"&&Te()};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[Te]),a.useLayoutEffect(()=>{Dt()},[E,t.length,st]),a.useLayoutEffect(()=>{o||Sn(P.current,"auto")},[E,o]),a.useLayoutEffect(()=>{Sn(0,"auto")},[t.length,st]),a.useEffect(()=>{const f=ze.current;if(!f||o||!Z)return;const q=J=>{if(J.preventDefault(),Math.abs(J.deltaY)<=Math.abs(J.deltaX))return;const Ce=J.deltaMode===1?ky:J.deltaMode===2?f.clientHeight:1,Oe=J.deltaY*Ce*Py;if(Oe!==0){if(on(),Qe.current||(Qe.current=!0,Ee.current=f.scrollLeft,Wt.current=null,Lt(!1)),Ee.current+=Oe,!st){const Ye=f.scrollWidth-f.clientWidth;Ee.current=Math.max(0,Math.min(Ye,Ee.current))}ct(),Je.current===null&&(Je.current=requestAnimationFrame(ei))}};return f.addEventListener("wheel",q,{passive:!1}),()=>{f.removeEventListener("wheel",q),dn()}},[o,Z,st]),a.useEffect(()=>{const f=ze.current;if(!f)return;const q=()=>{jt($e.current.isActive);const Ce=f.scrollLeft,Oe=Ce-Ie.current;Ie.current=Ce;const Ye=et.current>0?et.current*.5:1/0;if(Oe!==0&&Math.abs(Oe)<Ye){const wt=Oe>0?"forward":"backward";wt!==qe.current&&(qe.current=wt,Re(wt))}$e.current.isActive&&$e.current.hasMoved||xt()};f.addEventListener("scroll",q,{passive:!0});const J=new ResizeObserver(()=>{Dt(),jt($e.current.isActive),Re(qe.current),xt()});return J.observe(f),()=>{on(),f.removeEventListener("scroll",q),J.disconnect()}},[t.length,st]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{ft||Te()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:yt?1:0,transition:`opacity ${mo}ms ease`,pointerEvents:yt?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...Bt}}),r.jsxs("div",{ref:_e,className:`${e}-lightbox-dismiss-area`,style:Ut,...qt,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:At,onClick:f=>f.stopPropagation(),children:r.jsx("div",{ref:ze,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":we&&t.length>0?"true":"false","data-mouse-dragging":Nt?"true":"false",onPointerDown:Nr,onPointerMove:Or,onPointerUp:ue,onPointerCancel:ue,onLostPointerCapture:Be,children:r.jsx("div",{ref:Ke,className:`${e}-lightbox-strip-track`,style:{gap:E},children:Pt.map((f,q)=>{const J=f.image.objectFit??"contain",Ce=q%t.length,Oe=Math.floor(q/t.length),Ye=Yo(E),wt=`calc(-0.5 * (${Ye} + ${E}))`;return r.jsxs("div",{ref:Rt=>Ve.current[q]=Rt,className:`${e}-strip-item`,style:{height:M==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[r.jsx("img",{src:f.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:J}}),o&&Ce<t.length-1&&Oe===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:wt,width:Ye,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Oe}-${f.image.url}-${Ce}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":nn?"true":"false",style:kt,children:[r.jsx("div",{style:{position:"relative",width:"100%",height:O,flexShrink:0,pointerEvents:"none"},children:o&&r.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-handle-left-fraction":"0.05",style:{position:"absolute",left:0,right:0,top:0,height:ae,pointerEvents:"auto",zIndex:3}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:r.jsx("div",{className:`${e}-lightbox-content-area${Q?` ${e}-lightbox-content-area-stacked`:""}`,children:(be||y)&&r.jsx("div",{className:`${e}-header ${Q?`${e}-header-two-row`:`${e}-header-single-row`}`,children:Q?pt():be||y?vt():null})})})]}),t.length>1&&I==="on"&&(()=>{const f=Yo(S),q=`calc(-0.5 * (${S} + ${f}))`;return r.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:S},children:r.jsx("div",{ref:Se,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:J=>J.stopPropagation(),children:r.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":T,style:{gap:ne,"--thumbnail-active-color":G},children:[t.map((J,Ce)=>{const Oe=Yo(ne),Ye=`calc(-0.5 * (${Oe} + ${ne}))`;return r.jsxs("div",{ref:wt=>{De.current[Ce]=wt},style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":$===Ce?"true":"false",onClick:()=>Z&&b==="click"&&Sn(Ce),onMouseEnter:()=>Pe&&b==="hover"&&Sn(Ce),"aria-label":J.image.name?`View ${J.image.name}`:`View image ${Ce+1}`,"aria-current":$===Ce?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${de?` ${e}-thumb-image-cover`:""}`,src:J.image.url,alt:"",draggable:!1,style:{...ge,maxWidth:B,maxHeight:B,width:R.display==="cover"?"auto":"100%",height:"auto",objectFit:R.display==="cover"?"cover":"contain"}})}),o&&Ce<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Ye,width:Oe,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${J.image.url}-${Ce}`)}),o&&r.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:q,height:f,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function Uy(e){return`
14276
+ `;function On(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const ml={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},vy=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],xy={type:"object",version:1,content:{type:"array",display:{type:"array"},items:{type:"object",properties:{question:{type:"string",label:"Question",placeholder:"Add question...",display:{type:"text-input"}},answer:{label:"Answer",placeholder:"Add answer...",display:{type:"rich-text"}}}},default:[{question:"What are the three main parts of The Divine Comedy?",answer:[{type:"paragraph",children:[{text:"The poem is divided into Inferno, Purgatorio, and Paradiso. These three sections follow Dante’s journey through Hell, Purgatory, and Heaven."}]}]},{question:"Who guides Dante through Hell and most of Purgatory?",answer:[{type:"paragraph",children:[{text:"Dante is guided by Virgil, the ancient Roman poet. Virgil represents human reason and wisdom, but because he lived before Christianity, he cannot guide Dante all the way into Heaven."}]}]},{question:"What does the dark wood at the beginning of the poem symbolize?",answer:[{type:"paragraph",children:[{text:"The dark wood symbolizes Dante’s spiritual confusion and moral crisis. It shows that he has lost the “straight way” in life and needs guidance to return to truth and salvation."}]}]},{question:"What is “contrapasso” in Inferno?",answer:[{type:"paragraph",children:[{text:"“Contrapasso” is the principle that punishments in Hell reflect the sins committed during life. For example, people who caused division are themselves physically divided, showing how their punishment mirrors their wrongdoing."}]}]},{question:"Who guides Dante through Heaven?",answer:[{type:"paragraph",children:[{text:"Beatrice guides Dante through Paradiso. She represents divine love, grace, and spiritual understanding, helping Dante move beyond human reason toward a vision of God."}]}]},{question:"Why is The Divine Comedy important in literary history?",answer:[{type:"paragraph",children:[{text:"The Divine Comedy is important because it is one of the greatest works of world literature and helped shape the Italian language. Dante wrote it in the Tuscan dialect rather than Latin, making serious literature more accessible to ordinary readers."}]}]},{question:"What is the overall journey of The Divine Comedy about?",answer:[{type:"paragraph",children:[{text:"The poem is about Dante’s spiritual journey from sin and despair toward repentance, wisdom, and union with God. On a deeper level, it represents the soul’s path from confusion to divine truth."}]}]}]},settings:{sizing:"auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},dividerWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},dividerStyle:{type:"string",scope:"common",title:"Style",display:{type:"toggle-cycle",enum:["solid","dashed","dotted"]}},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default"]}},autoclose:{type:"string",scope:"common",title:"Autoclose",display:{type:"toggle-cycle",enum:["on","off"]}},icon:{type:["string","null"],scope:"common",display:{type:"settings-image-input"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:On("Icon Padding Right"),iconAnimation:{type:"string",scope:"common",title:"Icon Animation",display:{type:"toggle-cycle",enum:["rotate 180","rotate 90","rotate 45"]}},questionColor:{type:"string",scope:"common",title:"Question Default",display:{type:"palette-color-picker"}},answerColor:{type:"string",scope:"common",title:"Answer Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"palette-color-picker"}},questionHoverColor:{type:"string",scope:"common",title:"Question Hover",display:{type:"palette-color-picker"}},iconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"palette-color-picker"}},iconActiveColor:{type:"string",scope:"common",title:"Icon Active",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}},questionFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},questionFontSettings:{...ml.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:{...ml.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},answerFontSize:{type:"number",scope:"layout",title:"Answer Font Size",display:{type:"font-size"}},answerLineHeight:{type:"number",scope:"layout",title:"Answer Line Height",display:{type:"line-height-input"}},answerLetterSpacing:{type:"number",scope:"layout",title:"Answer Letter Spacing",display:{type:"letter-spacing-input"}},answerWordSpacing:{type:"number",scope:"layout",title:"Answer Word Spacing",display:{type:"word-spacing-input"}},answerTextAppearance:{type:"object",scope:"layout",title:"Answer Text Appearance",display:{type:"text-appearance"}},questionPaddingLeft:On("Question Padding Left"),questionPaddingTop:On("Question Padding Top"),questionPaddingBottom:On("Question Padding Bottom"),answerPaddingLeft:On("Answer Padding Left"),answerPaddingRight:On("Answer Padding Right"),answerPaddingTop:On("Answer Padding Top"),answerPaddingBottom:On("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/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:[...vy],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},by={element:fy,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:xy,sourceCode:yy},Fn=e=>e.display==="cover",Fr=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},gl=100,wy=.2,hl=8,Bc=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,s]=a.useState(0),[l,d]=a.useState(!1),c=a.useRef(null),u=a.useRef(0);u.current=o;const p=a.useMemo(()=>typeof window>"u"?gl:Math.max(gl,window.innerHeight*wy),[]),v=a.useCallback(x=>Math.max(0,1-x/(p*1.5)),[p]),y=a.useCallback(x=>Math.max(0,1-x/(p*.45)),[p]),g=a.useCallback(x=>{const W=typeof window<"u"?window.innerHeight:800,M=Math.max(.88,1-x/W*.12);return`translateY(${x}px) scale(${M})`},[]),h=a.useCallback(()=>{c.current=null},[]),m=a.useCallback(()=>{d(!0),s(0),window.setTimeout(()=>d(!1),n),h()},[n,h]),b=a.useCallback(()=>{const x=typeof window<"u"?window.innerHeight:800;d(!0),s(x),window.setTimeout(()=>{t(),h(),d(!1)},Math.min(n,200))},[n,t,h]),I=a.useCallback(x=>{!e||l||x.pointerType==="touch"&&(i!=null&&i(x.target)||(c.current={startX:x.clientX,startY:x.clientY,isLocked:null,pointerId:x.pointerId}))},[e,l,i]),R=a.useCallback(x=>{const W=c.current;if(!e||!W||x.pointerType!=="touch"||W.pointerId!==x.pointerId)return;const M=x.clientX-W.startX,Y=x.clientY-W.startY;if(W.isLocked===null){if(Math.abs(M)<hl&&Math.abs(Y)<hl)return;if(Y>0&&Y>Math.abs(M))W.isLocked=!0,x.currentTarget.setPointerCapture(x.pointerId);else{W.isLocked=!1,h();return}}if(!W.isLocked)return;x.preventDefault();const F=Math.max(0,Y);u.current=F,s(F)},[e,h]),T=a.useCallback(x=>{const W=c.current;if(!e||!W||x.pointerType!=="touch"||W.pointerId!==x.pointerId)return;const M=W.isLocked===!0;if(x.currentTarget.hasPointerCapture(x.pointerId)&&x.currentTarget.releasePointerCapture(x.pointerId),!M){h();return}x.clientY-W.startY>=p?b():m()},[p,b,e,h,m]),G=a.useCallback(x=>{T(x)},[T]),k=a.useCallback(x=>{T(x)},[T]),V=o>0,A=l?`transform ${n}ms ease`:"none",L=l?`opacity ${n}ms ease`:"none",D=o>0||l;return{isSwipeDragging:V,backdropStyle:{opacity:v(o),transition:L},mediaAreaStyle:{transform:g(o),transition:A,touchAction:V?"none":void 0,willChange:V?"transform":void 0},overlayContentStyle:D?{opacity:y(o),transition:L}:void 0,swipeHandlers:e?{onPointerDown:I,onPointerMove:R,onPointerUp:G,onPointerCancel:k}:{},dismissAreaStyle:e?{touchAction:V?"none":"pan-x"}:void 0}},Sy="[data-lightbox-scrollable]",Vc=()=>{a.useEffect(()=>{const e=window.scrollY,t=document.body.style.overflow,n=document.body.style.position,i=document.body.style.top,o=document.body.style.width,s=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const l=d=>{const c=d.target;c instanceof Element&&c.closest(Sy)||d.preventDefault()};return document.addEventListener("touchmove",l,{passive:!1}),()=>{document.removeEventListener("touchmove",l),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=s,window.scrollTo({top:e,left:0,behavior:"instant"})}},[])},$y=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Cy=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},Ty=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},Ly=(e,t,n,{duration:i,easing:o,onComplete:s})=>{const l=e.scrollLeft,d=n-l,c=l-n,u=(h,m)=>{Cy(t),e.scrollLeft=h,m&&(s==null||s())};if(Math.abs(d)<.5)return u(n,!0),()=>{};let p=!1,v=0;const y=()=>{t.removeEventListener("transitionend",g),clearTimeout(v)},g=h=>{h.target!==t||h.propertyName!=="transform"||p||(p=!0,y(),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)`,v=window.setTimeout(()=>{p||(p=!0,y(),u(n,!0))},i+64),()=>{p||(p=!0,y(),u(l-Ty(t),!1))}},mo=300,Ry=900,Iy=1500,Ey="cubic-bezier(0.16, 1, 0.3, 1)",My=3e3,Py=2,ky=16,Ay=.05,Fy=1,Ko=.3,Wy=50,_y=20,$i=.004,qi=["title1","title2","title3"],Hy={title1:"1",title2:"2",title3:"3"},Ny={title1:"title1Color",title2:"title2Color",title3:"title3Color"},Oy={title1:.02,title2:.02,title3:.02},Yo=e=>`max(${e}, ${_y}px)`,Dy=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]}},jy=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=Dy(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Vt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,zy=e=>[Vt(e,"fontFamily"),Vt(e,"fontSettings"),{type:"row",items:[Vt(e,"fontSize"),Vt(e,"lineHeight"),Vt(e,"letterSpacing"),Vt(e,"wordSpacing")]},Vt(e,"textAlign"),Vt(e,"textAppearance")],By=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(qi.map(e=>[Hy[e],zy(e)]))}),us=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,l)=>s+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:l},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...l]};const c=Math.min(s,d);return{overflow:s-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},Gc=(e,t)=>us(e,t),Zo=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},fl=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:us(e.length,n),effective:Gc(e.length,n)}},Vy=(e,t,n,i,o,s,l)=>{const d=[];return t&&d.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&d.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:s,text:n}),i&&d.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:l,text:i}),d},ra=(e,t)=>{const n=i=>{const o=Vt(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[Ny[t]]}},Gy=(e,t,n,i)=>e.slice(0,i).reduce((o,s,l)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[l]??0),0),aa=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??Oy[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Kt(i,n)},qy=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:l})=>{const{backgroundColor:d,thumbnailSize:c,thumbnailGap:u,thumbnailMarginBottom:p,imageGap:v,closeIcon:y,closeIconMaxWidth:g,closeIconColor:h,closeIconHoverColor:m,thumbnailTrigger:b,thumbnailVisibility:I,thumbnailObjectFit:R,thumbnailActive:T,thumbnailActiveColor:G,title1Width:k,title2Width:V,title3Width:A,title1MarginLeft:L=0,title2MarginLeft:D=0,title3MarginLeft:x=0,titleRowMarginBottom:W=0,titleHeaderLayout:M="desktop",contentMarginTop:Y,iconMarginLeft:F}=n,X=f=>C.scalingValue(f,i??!1),j=c??n.thumnailSize??.03,B=X(j),ne=X(u),S=X(p??.02),E=X(v??0),O=X(Y??0),ae=Yo(O),ie=X(F??0),[$,se]=a.useState(0),P=a.useRef($);P.current=$;const te=t[$],{title1:K,title2:he,title3:We}=jy(te),pe=aa("title1",ra(n,"title1"),i),ce=aa("title2",ra(n,"title2"),i),U=aa("title3",ra(n,"title3"),i),Q=M==="mobile",Z=!o&&(!i||s),ke=Z,we=Z,Ae=Z,ue=Fn(R),ge=ue?{"--image-aspect-ratio":Fr(R)}:void 0,be=!!(K||he||We),z=a.useMemo(()=>Vy(e,K,he,We,pe,ce,U),[e,$,K,he,We,pe,ce,U]),oe=a.useMemo(()=>({title1Width:k,title2Width:V,title3Width:A}),[k,V,A]),fe=a.useMemo(()=>z.map(f=>oe[f.widthKey]),[z,oe]),ye=a.useMemo(()=>us(z.length,fe),[z.length,fe]),Me=a.useMemo(()=>Gc(z.length,fe),[z.length,fe]),Se=a.useMemo(()=>z.filter(f=>f.prefix==="title1"),[z]),_=a.useMemo(()=>z.filter(f=>f.prefix==="title2"||f.prefix==="title3"),[z]),me=a.useMemo(()=>fl(Se,oe),[Se,oe]),re=a.useMemo(()=>fl(_,oe),[_,oe]),H=a.useCallback((f,q)=>{const J=z.indexOf(f);if(!Q||q==="single-row")return{effectiveWidth:Me[J]??0,resolvedWidth:ye[J]??0,maxWidth:Zo(J,ye)};if(q==="two-row-top"){const De=Se.indexOf(f);return{effectiveWidth:me.effective[De]??0,resolvedWidth:me.resolved[De]??0,maxWidth:Zo(De,me.resolved)}}const $e=_.indexOf(f);return{effectiveWidth:re.effective[$e]??0,resolvedWidth:re.resolved[$e]??0,maxWidth:Zo($e,re.resolved)}},[_,re,Me,ye,z,Se,me,Q]),ee=a.useCallback(f=>C.scalingValue(f,i??!1),[i]),Fe=ee(W??0),le=a.useMemo(()=>({title1MarginLeft:L,title2MarginLeft:D,title3MarginLeft:x}),[L,D,x]),N=a.useCallback(f=>z.slice(0,f+1).reduce((q,J,$e)=>q+(J!=null&&J.marginLeftKey?le[J.marginLeftKey]??0:0)+(ye[$e]??0),0)+(Q?0:L??0),[z,le,ye,Q,L]),Xe=a.useCallback(()=>Q?0:L??0,[Q,L]),je=a.useCallback(f=>_.slice(0,f).reduce((q,J,$e)=>q+(J.marginLeftKey?le[J.marginLeftKey]??0:0)+(re.resolved[$e]??0),0),[_,re.resolved,le]),ut=a.useCallback(f=>{const q=_[f];return je(f)+(q.marginLeftKey?le[q.marginLeftKey]??0:0)+(re.resolved[f]??0)},[_,re.resolved,je,le]),tt=(f,q)=>{const J=f.marginLeftKey?le[f.marginLeftKey]??0:0,{effectiveWidth:$e,resolvedWidth:De,maxWidth:Qe}=H(f,q),wt=o&&q==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":f.prefix,style:{...q==="single-row"?{gridArea:f.prefix}:{},width:ee($e),...J>0?{marginLeft:ee(J)}:{}},children:[r.jsx("p",{className:f.className,style:f.style,children:f.text}),wt&&f.marginLeftKey&&r.jsx("div",{"data-controls":f.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(De),style:{position:"absolute",top:0,left:ee(-J),width:`max(${ee(J)}, 10px)`,height:"100%",pointerEvents:"auto"}}),wt&&r.jsx("div",{"data-controls":f.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Qe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:ee(-$i/2),width:ee($i),height:"100%",pointerEvents:"auto"}})]},f.className)},ft=()=>{const f=Q?-1:z.findIndex($e=>$e.prefix==="title1"),q=!Q&&(o||(L??0)>0)?(()=>{const $e=L??0,De=f>=0?ye[f]:k??0;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(De),style:{position:"absolute",top:0,left:0,width:`max(${ee($e)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,J=z.flatMap(($e,De)=>{if(!$e.marginLeftKey)return[];const Qe=le[$e.marginLeftKey]??0,wt=Gy(z,ye,le,De)+Xe();return r.jsx("div",{"data-controls":$e.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ye[De]),style:{position:"absolute",top:0,left:ee(wt),width:`max(${ee(Qe)}, 10px)`,height:"100%",pointerEvents:"auto"}},$e.marginLeftKey)});return q?[q,...J]:J},st=()=>z.map((f,q)=>{const J=Zo(q,ye),De=N(q)-$i/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":f.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(J),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:ee(De),width:ee($i),height:"100%",pointerEvents:"auto"}})},`${f.widthKey}-junction`)}),Ue=()=>_.flatMap((f,q)=>{if(!f.marginLeftKey)return[];const J=le[f.marginLeftKey]??0,$e=je(q),{resolvedWidth:De}=H(f,"two-row-bottom");return r.jsx("div",{"data-controls":f.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(De),style:{position:"absolute",top:0,left:ee($e),width:`max(${ee(J)}, 10px)`,height:"100%",pointerEvents:"auto"}},f.marginLeftKey)}),ve=()=>_.map((f,q)=>{const{maxWidth:J}=H(f,"two-row-bottom"),De=ut(q)-$i/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":f.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(J),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:ee(De),width:ee($i),height:"100%",pointerEvents:"auto"}})},`${f.widthKey}-junction`)}),_e=a.useRef(null),ze=a.useRef(null),Ye=a.useRef(null),Ce=a.useRef(null),Oe=a.useRef([]),Ve=a.useRef([]),Re=a.useRef(0),Ie=a.useRef(null),qe=a.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),lt=a.useRef(null),Ze=a.useRef(null),Ee=a.useRef(0),Ge=a.useRef("forward"),Pe=a.useRef(0),Je=a.useRef(null),nt=a.useRef(!1),et=t.length>1&&(!o||!!s),St=et?3:1,Wt=a.useMemo(()=>Array.from({length:St},()=>t).flat(),[t,St]),[At,gt]=a.useState(!1),[xt,zt]=a.useState(!1),[Ft,bt]=a.useState(!0),_t=a.useRef(null),Gt=a.useRef(null),Zt=a.useRef(!1),en=a.useRef(!1),$t=a.useRef(null),Ht=a.useRef(null),nn=ke&&!Ft,ct=a.useCallback(()=>{ke&&(bt(!0),Ht.current&&clearTimeout(Ht.current),Ht.current=setTimeout(()=>{qe.current.isActive||bt(!1)},My))},[ke]),Te=a.useCallback(()=>{o||en.current||(en.current=!0,zt(!1),$t.current=setTimeout(()=>{l()},mo))},[o,l]),Ne=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":nn?"true":"false",style:{width:C.scalingValue(g??0,i),height:C.scalingValue(g??0,i),marginRight:ie,"--close-icon-hover-color":m},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Te,"aria-label":"Close",children:r.jsx(an,{url:y,fill:h,hoverFill:i&&!s?h:m,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:ie,height:"100%",pointerEvents:"auto"}})]}),it=(f="two-row")=>r.jsx("div",{...f==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:ee(L??0),flexShrink:0,...f==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...f==="two-row"&&o?{pointerEvents:"auto"}:{}}}),pt=()=>{const f=z.find($e=>$e.prefix==="title1"),q=z.filter($e=>$e.prefix==="title2"||$e.prefix==="title3"),J=q.length>0||o||(W??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(L??0)>0||o?it():null,f&&tt(f,"two-row-top"),y&&Ne()]}),J?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[q.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[q.map($e=>tt($e,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[Ue(),ve()]})]}):null,r.jsx("div",{"data-controls":o?"titleRowMarginBottom":void 0,"data-controls-axis":o?"y":void 0,"data-controls-reverse":o?"":void 0,className:o?`${e}-control`:void 0,style:{height:Fe,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},yt=()=>r.jsxs(r.Fragment,{children:[(L??0)>0||o?it("single-row"):null,z.map(f=>tt(f,"single-row")),o?r.jsxs(r.Fragment,{children:[ft(),st()]}):null,y?Ne():null]}),It=a.useCallback(f=>!!(f.closest("[data-controls]")||f.closest(`.${e}-thumbnails`)||f.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:ht,backdropStyle:Bt,mediaAreaStyle:kt,overlayContentStyle:Pt,swipeHandlers:qt,dismissAreaStyle:Ut}=Bc({enabled:Z??!1,onClose:Te,animMs:mo,isBlockedTarget:It}),Ot=()=>{if(!et||t.length===0)return Re.current=0,0;const f=Ve.current[0],q=Ve.current[t.length];if(!f||!q)return Re.current;const J=q.offsetLeft-f.offsetLeft;return J>0&&(Re.current=J),Re.current},Dt=(f=!1)=>{if(!et)return;const q=ze.current,J=Ot();!q||J<=0||J<q.clientWidth*.25||(q.scrollLeft<=0?(q.scrollLeft+=J,f&&(qe.current.scrollLeft+=J),nt.current&&(Pe.current+=J)):q.scrollLeft>=J*2&&(q.scrollLeft-=J,f&&(qe.current.scrollLeft-=J),nt.current&&(Pe.current-=J)))},Nt=(f,q=(J=>(J=ze.current)==null?void 0:J.scrollLeft)()??0)=>{if(!et)return f;let $e=t.length+f,De=1/0;for(let Qe=0;Qe<St;Qe++){const wt=Qe*t.length+f,Rt=Ve.current[wt];if(!Rt)continue;const tn=Math.abs(Rt.offsetLeft-q);tn<De&&(De=tn,$e=wt)}return $e},Ct=f=>{const q=ze.current;return!f||!q?!1:f.offsetWidth>q.clientWidth+1},w=f=>{const q=ze.current;if(!f||!q||!Ct(f))return!1;const J=f.offsetLeft,$e=J+f.offsetWidth;return q.scrollLeft>=J-1&&q.scrollLeft+q.clientWidth<=$e+1},xe=(f=(q=>(q=ze.current)==null?void 0:q.scrollLeft)()??0)=>{for(let $e=0;$e<Ve.current.length;$e+=1){const De=Ve.current[$e];if(De&&w(De))return $e}let J={flatIndex:0,distance:1/0};return Ve.current.forEach(($e,De)=>{if(!$e)return;const Qe=Math.abs($e.offsetLeft-f);Qe<J.distance&&(J={flatIndex:De,distance:Qe})}),J.flatIndex},Le=f=>{ze.current&&Ve.current.forEach(q=>{q&&(q.style.scrollSnapAlign=Ct(q)&&f==="backward"?"end":"start")})},He=(f,q,J)=>{const $e=f-q,De=xe(q),Qe=Ve.current[De];if(w(Qe))return xe(f)%t.length;const wt=Ve.current[De+1],Rt=Qe?wt?wt.offsetLeft-Qe.offsetLeft:Qe.offsetWidth:0,tn=Rt>0?$e>Rt*Ko?1:$e<-Rt*Ko?-1:0:0;return tn===0?J:et?(J+tn+t.length)%t.length:Math.max(0,Math.min(t.length-1,J+tn))},at=a.useCallback((f=!1)=>{if(I!=="on"||o)return;const q=Ce.current,J=P.current,$e=Oe.current[J];if(!q||!$e||q.scrollWidth<=q.clientWidth)return;const De=q.scrollLeft,Qe=De+q.clientWidth,wt=$e.offsetLeft,Rt=wt+$e.offsetWidth;if(wt>=De&&Rt<=Qe)return;const tn=q.scrollWidth-q.clientWidth;let Jt=De;if(!f&&_t.current===null){const bi=Oe.current[J-1],eo=Oe.current[J+1],Oo=bi?$e.offsetLeft-bi.offsetLeft:eo?eo.offsetLeft-$e.offsetLeft:$e.offsetWidth;Rt>Qe?Jt+=Oo:wt<De&&(Jt-=Oo)}else Rt>Qe?Jt=Rt-q.clientWidth:Jt=wt;q.scrollLeft=Math.max(0,Math.min(tn,Jt))},[o,I]),Mt=a.useCallback((f=!1)=>{f&&(Zt.current=!0),Gt.current===null&&(Gt.current=requestAnimationFrame(()=>{Gt.current=null;const q=Zt.current;Zt.current=!1,at(q)}))},[at]),ot=a.useCallback(f=>{if(f===P.current)return;const q=P.current;P.current=f;const J=Math.abs(f-q)>1,$e=et&&t.length>1&&(q===t.length-1&&f===0||q===0&&f===t.length-1);se(f),Mt(J||$e)},[t.length,et,Mt]),vt=()=>{if(!ze.current||t.length===0||_t.current!==null||qe.current.isActive&&qe.current.hasMoved)return;const f=ze.current.scrollLeft,q=xe(f)%t.length;q!==P.current&&ot(q)},jt=()=>{_t.current=null},Lt=f=>{const q=ze.current;q&&(q.style.scrollSnapType=f?"":"none")},on=()=>{var f;(f=Ze.current)==null||f.call(Ze),Ze.current=null},dn=()=>{Je.current!==null&&(cancelAnimationFrame(Je.current),Je.current=null),nt.current=!1},ei=()=>{const f=ze.current;if(!f){Je.current=null,nt.current=!1;return}const q=Pe.current-f.scrollLeft;if(Math.abs(q)<.5){f.scrollLeft=Pe.current,Dt(),vt(),Je.current=null,nt.current=!1;return}f.scrollLeft+=q*Ay,Dt(),vt(),ct(),Je.current=requestAnimationFrame(ei)},ti=()=>{const f=Ye.current;f&&(f.style.transition="",f.style.transform="",f.style.willChange="")},Wo=(f,q,J,$e)=>{ti(),f.scrollLeft=q,Ee.current=f.scrollLeft,Dt(),J!==void 0?(P.current=J,se(J)):vt(),Lt(!0),$e==null||$e()},_o=(f,{behavior:q="smooth",activeIndex:J,onComplete:$e}={})=>{const De=ze.current,Qe=Ye.current;if(!De||!Qe)return;if(dn(),on(),Lt(!1),q==="auto"){Wo(De,f,J,$e);return}const wt=Math.abs(f-De.scrollLeft),Rt=$y(wt,Ry,Iy,De.clientWidth*.55);Ze.current=Ly(De,Qe,f,{duration:Rt,easing:Ey,onComplete:()=>{Ze.current=null,Wo(De,f,J,$e)}})},_r=(f="smooth")=>{const q=ze.current;if(!q||t.length===0)return;const J=xe()%t.length,$e=Nt(J,q.scrollLeft),De=Ve.current[$e];De&&_o(De.offsetLeft,{behavior:f,activeIndex:J})},Hr=(f,q="smooth",J,$e)=>{const De=ze.current;if(!De||t.length===0)return;const Qe=($e??De.scrollLeft)-f,wt=xe(f),Rt=Ve.current[wt];if(w(Rt)){Lt(!0),vt();return}const tn=Ve.current[wt+1],Jt=Rt?tn?tn.offsetLeft-Rt.offsetLeft:Rt.offsetWidth:0;if((Jt>0?Qe>Jt*Ko?1:Qe<-Jt*Ko?-1:0:0)!==0){const cd=J??wt%t.length,dd=He($e??De.scrollLeft,f,cd);Sn(dd,q);return}const eo=$e??De.scrollLeft,Oo=xe(eo),ms=Ve.current[Oo];if(ms&&Math.abs(ms.offsetLeft-eo)<1){Lt(!0),vt();return}_r("auto")},Sn=(f,q="smooth")=>{const J=ze.current;if(!J||t.length===0)return;const $e=Nt(f,J.scrollLeft),De=Ve.current[$e];De&&(q==="smooth"?_t.current=f:_t.current=null,P.current=f,se(f),Mt(!0),_o(De.offsetLeft,{behavior:q,activeIndex:f,onComplete:q==="smooth"?jt:void 0}))},xi=()=>{lt.current&&(window.removeEventListener("pointerup",lt.current),window.removeEventListener("pointercancel",lt.current),lt.current=null)},Ho=(f,q,J,$e,De)=>{const Qe=J-f,wt=$e-q,Rt=Math.abs(Qe),tn=Math.abs(wt);if(Rt<Wy||Rt<=tn)return!1;const Jt=Qe<0?1:-1,bi=et?(De+Jt+t.length)%t.length:Math.max(0,Math.min(t.length-1,De+Jt));return bi===De?!1:(Sn(bi),!0)},ni=f=>{if(!qe.current.isActive)return;xi();const q=ze.current;if(!q)return;const{scrollLeft:J,startActiveIndex:$e,hasMoved:De}=qe.current,Qe=q.scrollLeft;Dt(!0),qe.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},gt(!1),f!==void 0&&q.hasPointerCapture(f)&&q.releasePointerCapture(f),De?Hr(J,"smooth",$e,Qe):(Lt(!0),vt()),ct()},No=(f,q)=>{const J=Ie.current;Ie.current=null,J&&(Ho(J.startX,J.startY,f,q,J.startActiveIndex),ct())},Nr=f=>{if(!we)return;if(f.pointerType==="touch"){if(dn(),Lt(!0),It(f.target))return;Ie.current={startX:f.clientX,startY:f.clientY,startActiveIndex:P.current};return}if(f.pointerType!=="mouse"||f.button!==0||It(f.target))return;const q=ze.current;if(!q)return;dn(),on(),ti(),_t.current=null,qe.current={isActive:!0,startX:f.clientX,scrollLeft:q.scrollLeft,startActiveIndex:P.current,hasMoved:!1},Lt(!1),ct(),q.setPointerCapture(f.pointerId),xi();const J=$e=>{$e.pointerType==="mouse"&&ni($e.pointerId)};lt.current=J,window.addEventListener("pointerup",J),window.addEventListener("pointercancel",J)},Or=f=>{if(!we||f.pointerType!=="mouse")return;const q=ze.current;if(!q||!qe.current.isActive)return;if(f.buttons===0){ni(f.pointerId);return}const J=f.clientX-qe.current.startX;Math.abs(J)>Fy&&(qe.current.hasMoved=!0,gt(!0)),qe.current.hasMoved&&(f.preventDefault(),q.scrollLeft=qe.current.scrollLeft-J,Dt(!0),vt(),ct())},de=f=>{if(we){if(f.pointerType==="touch"){f.type==="pointerup"?No(f.clientX,f.clientY):Ie.current=null;return}f.pointerType==="mouse"&&ni(f.pointerId)}},Be=f=>{!we||f.pointerType!=="mouse"||ni(f.pointerId)};return Vc(),a.useEffect(()=>{const f=requestAnimationFrame(()=>zt(!0));return()=>{cancelAnimationFrame(f),on(),xi(),Gt.current!==null&&(cancelAnimationFrame(Gt.current),Gt.current=null),$t.current&&clearTimeout($t.current),Ht.current&&clearTimeout(Ht.current)}},[]),a.useEffect(()=>{if(!ke){bt(!0);return}ct();const f=()=>ct();return document.addEventListener("pointermove",f,{passive:!0}),document.addEventListener("pointerdown",f,{passive:!0}),()=>{document.removeEventListener("pointermove",f),document.removeEventListener("pointerdown",f),Ht.current&&clearTimeout(Ht.current)}},[ke,ct]),a.useEffect(()=>{const f=q=>{q.key==="Escape"&&Te()};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[Te]),a.useLayoutEffect(()=>{Ot()},[E,t.length,et]),a.useLayoutEffect(()=>{o||Sn(P.current,"auto")},[E,o]),a.useLayoutEffect(()=>{Sn(0,"auto")},[t.length,et]),a.useEffect(()=>{const f=ze.current;if(!f||o||!Z)return;const q=J=>{if(J.preventDefault(),Math.abs(J.deltaY)<=Math.abs(J.deltaX))return;const $e=J.deltaMode===1?ky:J.deltaMode===2?f.clientHeight:1,De=J.deltaY*$e*Py;if(De!==0){if(on(),nt.current||(nt.current=!0,Pe.current=f.scrollLeft,_t.current=null,Lt(!1)),Pe.current+=De,!et){const Qe=f.scrollWidth-f.clientWidth;Pe.current=Math.max(0,Math.min(Qe,Pe.current))}ct(),Je.current===null&&(Je.current=requestAnimationFrame(ei))}};return f.addEventListener("wheel",q,{passive:!1}),()=>{f.removeEventListener("wheel",q),dn()}},[o,Z,et]),a.useEffect(()=>{const f=ze.current;if(!f)return;const q=()=>{Dt(qe.current.isActive);const $e=f.scrollLeft,De=$e-Ee.current;Ee.current=$e;const Qe=Re.current>0?Re.current*.5:1/0;if(De!==0&&Math.abs(De)<Qe){const wt=De>0?"forward":"backward";wt!==Ge.current&&(Ge.current=wt,Le(wt))}qe.current.isActive&&qe.current.hasMoved||vt()};f.addEventListener("scroll",q,{passive:!0});const J=new ResizeObserver(()=>{Ot(),Dt(qe.current.isActive),Le(Ge.current),vt()});return J.observe(f),()=>{on(),f.removeEventListener("scroll",q),J.disconnect()}},[t.length,et]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{ht||Te()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:xt?1:0,transition:`opacity ${mo}ms ease`,pointerEvents:xt?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...Bt}}),r.jsxs("div",{ref:_e,className:`${e}-lightbox-dismiss-area`,style:Ut,...qt,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:kt,onClick:f=>f.stopPropagation(),children:r.jsx("div",{ref:ze,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":we&&t.length>0?"true":"false","data-mouse-dragging":At?"true":"false",onPointerDown:Nr,onPointerMove:Or,onPointerUp:de,onPointerCancel:de,onLostPointerCapture:Be,children:r.jsx("div",{ref:Ye,className:`${e}-lightbox-strip-track`,style:{gap:E},children:Wt.map((f,q)=>{const J=f.image.objectFit??"contain",$e=q%t.length,De=Math.floor(q/t.length),Qe=Yo(E),wt=`calc(-0.5 * (${Qe} + ${E}))`;return r.jsxs("div",{ref:Rt=>Ve.current[q]=Rt,className:`${e}-strip-item`,style:{height:M==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[r.jsx("img",{src:f.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:J}}),o&&$e<t.length-1&&De===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:wt,width:Qe,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${De}-${f.image.url}-${$e}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":nn?"true":"false",style:Pt,children:[r.jsx("div",{style:{position:"relative",width:"100%",height:O,flexShrink:0,pointerEvents:"none"},children:o&&r.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-handle-left-fraction":"0.05",style:{position:"absolute",left:0,right:0,top:0,height:ae,pointerEvents:"auto",zIndex:3}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:r.jsx("div",{className:`${e}-lightbox-content-area${Q?` ${e}-lightbox-content-area-stacked`:""}`,children:(be||y)&&r.jsx("div",{className:`${e}-header ${Q?`${e}-header-two-row`:`${e}-header-single-row`}`,children:Q?pt():be||y?yt():null})})})]}),t.length>1&&I==="on"&&(()=>{const f=Yo(S),q=`calc(-0.5 * (${S} + ${f}))`;return r.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:S},children:r.jsx("div",{ref:Ce,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:J=>J.stopPropagation(),children:r.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":T,style:{gap:ne,"--thumbnail-active-color":G},children:[t.map((J,$e)=>{const De=Yo(ne),Qe=`calc(-0.5 * (${De} + ${ne}))`;return r.jsxs("div",{ref:wt=>{Oe.current[$e]=wt},style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":$===$e?"true":"false",onClick:()=>Z&&b==="click"&&Sn($e),onMouseEnter:()=>Ae&&b==="hover"&&Sn($e),"aria-label":J.image.name?`View ${J.image.name}`:`View image ${$e+1}`,"aria-current":$===$e?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${ue?` ${e}-thumb-image-cover`:""}`,src:J.image.url,alt:"",draggable:!1,style:{...ge,maxWidth:B,maxHeight:B,width:R.display==="cover"?"auto":"100%",height:"auto",objectFit:R.display==="cover"?"cover":"contain"}})}),o&&$e<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Qe,width:De,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${J.image.url}-${$e}`)}),o&&r.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:q,height:f,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function Uy(e){return`
14264
14277
  .${e}-wrapper {
14265
14278
  position: relative;
14266
14279
  width: 100%;
@@ -15191,7 +15204,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
15191
15204
  </>
15192
15205
  );
15193
15206
  };
15194
- `,Yy="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),si={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Zy(e){const t={};return t[Vt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Vt(e,"fontSettings")]={...si.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Vt(e,"fontSize")]={...si.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Vt(e,"lineHeight")]={...si.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Vt(e,"letterSpacing")]={...si.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Vt(e,"wordSpacing")]={...si.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Vt(e,"textAlign")]={...si.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Vt(e,"textAppearance")]={...si.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Jy=qi.reduce((e,t)=>({...e,...Zy(t)}),{}),Qy=qi.reduce((e,t)=>({...e,[Vt(t,"fontFamily")]:"Goudy Bookletter 1911",[Vt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Vt(t,"letterSpacing")]:0,[Vt(t,"wordSpacing")]:0,[Vt(t,"textAlign")]:"left",[Vt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function sa(e){return qi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Vt(n,"fontSize")]=i),o!==void 0&&(t[Vt(n,"lineHeight")]=o),t},{})}const ev=By(),tv={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"}},...Jy,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:Yy,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...Qy},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,...sa({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,...sa({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,...sa({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:[ev]}],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"}]}},nv={element:Xy,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:tv,sourceCode:Ky,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...qi.map(e=>({path:`${Vt(e,"fontFamily")}`}))]},fontRelations:{...qi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Vt(t,"fontFamily")}`}),{})}},iv=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,initialSlideIndex:l=0,enableUrlSync:d=!1,journalItemId:c=null,onBeforeClose:u,onClose:p})=>{const{type:v,coverFit:y,backgroundColor:g,imageGap:h,maxWidth:m,maxHeight:b,textTransition:I,title1Width:R,title2Width:T,title3Width:G,title1MarginLeft:k=0,title2MarginLeft:V=0,title3MarginLeft:A=0,titleRowMarginBottom:L=0,titleHeaderLayout:D="single-row",countCloseGap:x=0,closeIcon:W,closeIconMaxWidth:M,closeIconColor:Y,closeIconHoverColor:F,contentMarginTop:X=0,iconMarginRight:j=0}=n,B=a.useCallback(ue=>C.scalingValue(ue,i??!1),[i]),ne=B(h??0),S=`${m}%`,E=`${b}%`,O=B(x),ae=B(X),ie=B(j),$=pi("title1",ui(n,"title1"),i),re=pi("title2",ui(n,"title2"),i),P=pi("title3",ui(n,"title3"),i),te=pi("count",ui(n,"count"),i),K=D==="mobile",fe=!i||!!s,We=!o&&(!i||!!s),me=a.useMemo(()=>ar(t,v),[t,v]),[ce,U]=a.useState(l),Q=me[ce],Z=Q==null?void 0:Q.entry,[ke,we]=a.useState(!1),[Pe,de]=a.useState(null),[ge,be]=a.useState(!1),[z,se]=a.useState(null),[he,ye]=a.useState(!1),[Me,Le]=a.useState(0),[_,pe]=a.useState(),[oe,H]=a.useState(),[ee,Fe]=a.useState(null),le=a.useRef(null),N=a.useRef(0),Ue=a.useRef(0),je=a.useRef(0),gt=a.useRef(!1),rt=a.useRef(null),ht=a.useRef(null),lt=a.useRef(null),Ge=a.useRef(null),ve=a.useRef(null),_e=a.useRef(null),ze=a.useRef(null),Ke=a.useCallback(()=>{const ue=ht.current;if(!ue)return;const Be=ue.closest(`.${e}-lightbox-content-area`);if(!Be)return ue.getBoundingClientRect().width;const f=Array.from(Be.children).reduce((q,J)=>!(J instanceof HTMLElement)||J.contains(ue)?q:q+J.getBoundingClientRect().width,0);return Be.getBoundingClientRect().width-f},[e]),Se=a.useCallback(()=>{le.current&&(clearTimeout(le.current),le.current=null)},[]),De=a.useCallback(ue=>{ue===N.current&&(se(null),ye(!1))},[]),Ve=a.useCallback(()=>{o||gt.current||(gt.current=!0,u==null||u(),we(!1),rt.current=setTimeout(()=>{p()},300))},[o,u,p]),et=a.useCallback(ue=>!!(ue.closest("[data-controls]")||ue.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Ae,backdropStyle:$e,mediaAreaStyle:tt,overlayContentStyle:Ze,swipeHandlers:Ie,dismissAreaStyle:qe}=Bc({enabled:We,onClose:Ve,animMs:300,isBlockedTarget:et}),Ee=a.useCallback(ue=>{d&&Tc(ue+1,c,!0)},[d,c]),Je=a.useCallback(ue=>{if(ue)return ue.getBoundingClientRect().height},[]),Qe=a.useCallback(ue=>{if(me.length===0)return;const Be=(ue%me.length+me.length)%me.length;if(Be===ce)return;const f=me[ce],q=me[Be];N.current+=1;const J=N.current,Ce=I==="fade"&&Gs(f==null?void 0:f.entry)!==Gs(q==null?void 0:q.entry),Oe=Je(lt.current),Ye=Ce?(()=>{const Rt=Ke();Yn.flushSync(()=>{Fe(q.entry)}),lt.current&&Rt&&(lt.current.style.width=`${Rt}px`);const tn=Je(lt.current);return lt.current&&(lt.current.style.width=""),{measuredIncomingTitlesHeight:tn,incomingTitlesMeasureWidth:Rt}})():void 0,wt=Math.max(Oe??0,(Ye==null?void 0:Ye.measuredIncomingTitlesHeight)??0)||void 0;Le(J),se(ce),ye(!0),U(Be),Ee(Be),je.current=Be,Ce?(Se(),wt&&pe(wt),Ye!=null&&Ye.incomingTitlesMeasureWidth&&H(Ye.incomingTitlesMeasureWidth),de((f==null?void 0:f.entryIndex)??null),be(!0),Ue.current=q.entryIndex,le.current=setTimeout(()=>{de(null),be(!1),pe(void 0),H(void 0),Fe(null),le.current=null},400)):(Se(),de(null),be(!1),pe(void 0),H(void 0),Fe(null),Ue.current=q.entryIndex)},[ce,Se,Ke,Je,me,Ee,I]),st=a.useCallback(()=>{ze.current=null},[]),St=a.useCallback(ue=>{!fe||me.length<=1||ue.pointerType==="mouse"&&ue.button!==0||ue.target.closest("[data-controls]")||(ze.current={startX:ue.clientX,startY:ue.clientY,pointerId:ue.pointerId})},[fe,me.length]),Pt=a.useCallback(ue=>{var Rt;if(!fe||me.length<=1||ue.pointerType==="mouse"&&ue.button!==0)return;if(Ae){st();return}const Be=ze.current;if(!Be||Be.pointerId!==ue.pointerId||(st(),ue.target.closest("[data-controls]")))return;const q=ue.clientX-Be.startX,J=ue.clientY-Be.startY,Ce=Math.abs(q),Oe=Math.abs(J);if(Ce>=gh&&Ce>Oe){Qe(q>0?ce-1:ce+1);return}if(Ce>js||Oe>js)return;const Ye=(Rt=Ge.current)==null?void 0:Rt.getBoundingClientRect(),wt=Ye?Ye.left+Ye.width/2:window.innerWidth/2;Qe(ue.clientX<wt?ce-1:ce+1)},[ce,fe,Qe,Ae,st,me.length]),Nt=a.useCallback(ue=>{const Be=ze.current;(Be==null?void 0:Be.pointerId)===ue.pointerId&&st()},[st]);Vc(),a.useEffect(()=>{_e.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const ue=requestAnimationFrame(()=>{we(!0),requestAnimationFrame(()=>{ve.current?ve.current.focus():Ge.current&&Ge.current.focus()})});return()=>{cancelAnimationFrame(ue),rt.current&&clearTimeout(rt.current),le.current&&clearTimeout(le.current);const Be=_e.current;Be&&document.contains(Be)&&Be.focus({preventScroll:!0})}},[]),a.useEffect(()=>{var ue;I!=="fade"&&(Ue.current=((ue=me[ce])==null?void 0:ue.entryIndex)??0,Se(),de(null),be(!1),pe(void 0),H(void 0))},[ce,Se,me,I]),a.useEffect(()=>{const ue=Be=>{if(Be.key==="Escape"){Ve();return}if(Be.key==="ArrowLeft"&&me.length>1){Qe(ce-1);return}if(Be.key==="ArrowRight"&&me.length>1){Qe(ce+1);return}if(Be.key==="Tab"&&Ge.current){const f=Ge.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),q=Array.from(f).filter(Ye=>!Ye.closest('[aria-hidden="true"]'));if(q.length===0)return;const J=q[0],Ce=q[q.length-1],Oe=document.activeElement;Be.shiftKey?(Oe===J||!Ge.current.contains(Oe))&&(Be.preventDefault(),Ce.focus()):(Oe===Ce||!Ge.current.contains(Oe))&&(Be.preventDefault(),J.focus())}};return window.addEventListener("keydown",ue),()=>window.removeEventListener("keydown",ue)},[Qe,Ve,ce,me.length]),a.useLayoutEffect(()=>{Se(),N.current=0,Le(0),se(null),ye(!1),de(null),be(!1),pe(void 0),H(void 0),Fe(null),U(ue=>{const Be=Math.max(0,me.length-1);return Math.min(ue,Be)})},[Se,t.length,v,me.length]),a.useLayoutEffect(()=>{var f;const ue=Math.max(0,me.length-1),Be=Math.min(Math.max(0,l),ue);je.current=Be,Ue.current=((f=me[Be])==null?void 0:f.entryIndex)??0,U(Be)},[l]);const dt=Pe!==null?t[Pe]:null,yt=z!==null?me[z]:null,Ot=(Z==null?void 0:Z.title1)||(Z==null?void 0:Z.title2)||(Z==null?void 0:Z.title3)||(dt==null?void 0:dt.title1)||(dt==null?void 0:dt.title2)||(dt==null?void 0:dt.title3),Ft=Sh(v,me,t),bt=W!==null,Wt=Ot||Ft||bt,Gt=Ft&&bt?{gap:O}:void 0,Zt=`${e}-titles-stack${K?` ${e}-titles-stack-stacked`:""}`,en=`${e}-titles-layer-out${K?` ${e}-titles-layer-out-stacked`:""}`,Tt=`${e}-titles-layer-out`,_t=(k??0)>0||o,nn=B(L),ct=a.useMemo(()=>({title1Width:R??Fi.title1Width,title2Width:T??Fi.title2Width,title3Width:G??Fi.title3Width}),[R,T,G]),Te=a.useMemo(()=>({title2MarginLeft:V,title3MarginLeft:A}),[V,A]),Ne=a.useMemo(()=>Z?Vn(e,Z,$,re,P):[],[e,Z,$,re,P]),nt=a.useMemo(()=>Ne.map(ue=>ct[ue.widthKey]),[Ne,ct]),pt=a.useMemo(()=>Di(Ne.length,nt),[Ne.length,nt]),vt=a.useMemo(()=>wo(Ne.length,nt),[Ne.length,nt]),It=a.useMemo(()=>Ne.filter(ue=>ue.prefix==="title1"),[Ne]),ft=a.useMemo(()=>Ne.filter(ue=>ue.prefix==="title2"||ue.prefix==="title3"),[Ne]),Bt=a.useMemo(()=>Gn(It,ct),[It,ct]),At=a.useMemo(()=>Gn(ft,ct),[ft,ct]),kt=a.useCallback((ue,Be)=>{const f=Ne.findIndex(J=>J.prefix===ue.prefix);if(!K||Be==="single-row")return{effectiveWidth:vt[f]??0,resolvedWidth:pt[f]??0,maxWidth:ln(f,pt)};if(Be==="two-row-top"){const J=It.findIndex(Ce=>Ce.prefix===ue.prefix);return{effectiveWidth:Bt.effective[J]??0,resolvedWidth:Bt.resolved[J]??0,maxWidth:ln(J,Bt.resolved)}}const q=ft.findIndex(J=>J.prefix===ue.prefix);return{effectiveWidth:At.effective[q]??0,resolvedWidth:At.resolved[q]??0,maxWidth:ln(q,At.resolved)}},[Ne,ft,At,vt,pt,It,Bt,K]),qt=a.useCallback(ue=>Ec(Ne,pt,Te,ue)+(K?0:k??0),[Ne,pt,Te,K,k]),Ut=a.useCallback(()=>K?0:k??0,[K,k]),Dt=a.useCallback(ue=>ft.slice(0,ue).reduce((Be,f,q)=>Be+(f.marginLeftKey?Te[f.marginLeftKey]??0:0)+(At.resolved[q]??0),0),[ft,At.resolved,Te]),jt=a.useCallback(ue=>{const Be=ft[ue];return Dt(ue)+(Be.marginLeftKey?Te[Be.marginLeftKey]??0:0)+(At.resolved[ue]??0)},[ft,At.resolved,Dt,Te]),Ht=a.useCallback((ue,Be,f)=>{if(!K||f==="single-row"){const Ye=ue.findIndex(Jt=>Jt.prefix===Be.prefix),wt=ue.map(Jt=>ct[Jt.widthKey]),Rt=Di(ue.length,wt);return{effectiveWidth:wo(ue.length,wt)[Ye]??0,resolvedWidth:Rt[Ye]??0,maxWidth:ln(Ye,Rt)}}if(f==="two-row-top"){const Ye=ue.filter(Jt=>Jt.prefix==="title1"),wt=Ye.findIndex(Jt=>Jt.prefix===Be.prefix),{resolved:Rt,effective:tn}=Gn(Ye,ct);return{effectiveWidth:tn[wt]??0,resolvedWidth:Rt[wt]??0,maxWidth:ln(wt,Rt)}}const q=ue.filter(Ye=>Ye.prefix==="title2"||Ye.prefix==="title3"),J=q.findIndex(Ye=>Ye.prefix===Be.prefix),{resolved:Ce,effective:Oe}=Gn(q,ct);return{effectiveWidth:Oe[J]??0,resolvedWidth:Ce[J]??0,maxWidth:ln(J,Ce)}},[ct,K]),$t=(ue,Be,f)=>{const q=ue.marginLeftKey?Te[ue.marginLeftKey]??0:0,{effectiveWidth:J,resolvedWidth:Ce,maxWidth:Oe}=f??kt(ue,Be),Ye=Math.max(q,Bn),wt=o&&Be==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":ue.prefix,style:{width:B(J),...q>0?{marginLeft:B(q)}:{}},children:[r.jsx("p",{className:ue.className,style:ue.style,children:ue.text}),wt&&ue.marginLeftKey?r.jsx("div",{"data-controls":ue.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ce),style:{position:"absolute",top:0,left:B(-q),width:B(Ye),height:"100%",pointerEvents:"auto"}}):null,wt?r.jsx("div",{"data-controls":ue.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Oe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:B(-gn/2),width:B(gn),height:"100%",pointerEvents:"auto"}}):null]},ue.className)},w=(ue="two-row")=>{const Be=Ne.findIndex(J=>J.prefix==="title1"),f=Be>=0?pt[Be]:ct.title1Width,q=ue==="two-row"&&o;return r.jsx("div",{...q?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(f)}:{},style:{width:B(k??0),flexShrink:0,alignSelf:"stretch",...q?{pointerEvents:"auto"}:{}}})},xe=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:$,"aria-hidden":"true",children:" "}),Re=()=>r.jsx("span",{className:`${e}-entry-counter`,style:te,"aria-live":"polite","aria-atomic":"true",children:wh(me,ce,v,t)}),He=()=>Ft?o&&bt?r.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Re(),r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${Zr(O)} + ${O}))`,width:Zr(O),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Re():null,at=()=>!Ft&&!bt?null:r.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Gt,children:[He(),bt?xt():null]}),Mt=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Ft||Ot?xe():null,_t?w("single-row"):null,Lt(Z),r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),at(),Sn()]}),it=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Ft||Ot?xe():null,_t?w("single-row"):null,r.jsxs("div",{className:`${e}-titles-row-titles`,style:ge&&_?{minHeight:_}:void 0,children:[r.jsx("div",{ref:lt,className:Zt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:ti(ee||Z)}),r.jsxs("div",{ref:ht,className:Zt,style:{position:ge?"absolute":"relative",inset:ge?0:void 0,width:"100%",...ge&&oe?{width:oe,maxWidth:"100%"}:void 0},children:[dt&&ge?r.jsx("div",{className:`${en} ${e}-titles-fade-out`,children:ti(dt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${ge?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:ti(Z)})]})]}),at(),Sn()]}),xt=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:C.scalingValue(M??0,i),height:C.scalingValue(M??0,i),marginRight:ie,"--close-icon-hover-color":F},children:[r.jsx("button",{ref:ve,type:"button",className:`${e}-close-icon-inner`,onClick:Ve,"aria-label":"Close",children:r.jsx(an,{url:W??"",fill:Y,hoverFill:i&&!s?Y:F,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:ie,height:"100%",pointerEvents:"auto"}})]}),zt=(ue,Be)=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[Ft||Ot?xe():null,_t?w("two-row"):null,Be!==void 0?r.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:Be},children:ue}):r.jsxs(r.Fragment,{children:[ue,r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),at()]}),Lt=ue=>{if(!ue)return null;const Be=Vn(e,ue,$,re,P);return r.jsx(r.Fragment,{children:Be.map(f=>$t(f,"single-row",Ht(Be,f,"single-row")))})},on=ue=>{if(!ue)return null;const Be=Vn(e,ue,$,re,P),f=Be.find(q=>q.prefix==="title1");return f?$t(f,"two-row-top",Ht(Be,f,"two-row-top")):null},dn=(ue,Be=!1)=>{const f=ue?Vn(e,ue,$,re,P):[],q=f.filter(Oe=>Oe.prefix==="title2"||Oe.prefix==="title3"),J=o&&Be;return q.length>0||J||(L??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[q.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[q.map(Oe=>$t(Oe,"two-row-bottom",Ht(f,Oe,"two-row-bottom"))),Be&&o?r.jsxs(r.Fragment,{children:[_r(),Hr()]}):null]}):null,(L??0)>0||J?r.jsx("div",{"data-controls":J?"titleRowMarginBottom":void 0,"data-controls-axis":J?"y":void 0,"data-controls-reverse":J?"":void 0,className:J?`${e}-control`:void 0,style:{height:nn,width:"100%",flexShrink:0,pointerEvents:J?"auto":"none"}}):null]}):null},ei=(ue,Be=!1)=>r.jsxs(r.Fragment,{children:[zt(on(ue)),dn(ue,Be)]}),ti=ue=>K?r.jsx("div",{className:`${e}-titles-row-two-row`,children:ei(ue)}):ue?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Lt(ue)}):null,Wo=()=>{const ue=K?-1:Ne.findIndex(q=>q.prefix==="title1"),Be=!K&&(o||(k??0)>0)?(()=>{const q=k??0,J=ue>=0?pt[ue]:ct.title1Width,Ce=Math.max(q,Bn);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(J),style:{position:"absolute",top:0,left:0,width:B(Ce),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,f=Ne.flatMap((q,J)=>{if(!q.marginLeftKey)return[];const Ce=Te[q.marginLeftKey]??0,Oe=Ic(Ne,pt,Te,J)+Ut(),Ye=Math.max(Ce,Bn);return r.jsx("div",{"data-controls":q.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(pt[J]),style:{position:"absolute",top:0,left:B(Oe),width:B(Ye),height:"100%",pointerEvents:"auto"}},q.marginLeftKey)});return Be?[Be,...f]:f},_o=()=>Ne.map((ue,Be)=>{const f=ln(Be,pt),J=qt(Be)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":ue.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(f),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:B(J),width:B(gn),height:"100%",pointerEvents:"auto"}})},`${ue.widthKey}-junction`)}),_r=()=>ft.flatMap((ue,Be)=>{if(!ue.marginLeftKey)return[];const f=Te[ue.marginLeftKey]??0,q=Dt(Be),J=Math.max(f,Bn),{resolvedWidth:Ce}=kt(ue,"two-row-bottom");return r.jsx("div",{"data-controls":ue.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ce),style:{position:"absolute",top:0,left:B(q),width:B(J),height:"100%",pointerEvents:"auto"}},ue.marginLeftKey)}),Hr=()=>ft.map((ue,Be)=>{const{maxWidth:f}=kt(ue,"two-row-bottom"),J=jt(Be)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":ue.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(f),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:B(J),width:B(gn),height:"100%",pointerEvents:"auto"}})},`${ue.widthKey}-junction`)}),Sn=()=>!o||K?null:r.jsxs(r.Fragment,{children:[Wo(),_o()]}),xi=ue=>{const Be=!ue.objectFit&&Fn(y);return{className:`${e}-slide-image-cell${Be?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:S,maxHeight:E,...Be?{"--image-aspect-ratio":Fr(y)}:{}}}},Ho=ue=>ue.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":ue.objectFit}}:Fn(y)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},ni=ue=>{if(ue.length===0)return null;const Be=ue.length>1,f=Zr(ne),q=`calc(-0.5 * (${f} + ${ne}))`;if(ue.length===1){const J=ue[0];return r.jsx("div",{...xi(J),children:r.jsx("img",{...Ho(J),src:J.url,alt:J.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:Be?{gap:ne}:void 0,children:ue.map((J,Ce)=>r.jsxs("div",{...xi(J),children:[r.jsx("img",{...Ho(J),src:J.url,alt:J.name??"",draggable:!1}),o&&Be&&Ce<ue.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:q,width:f,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${J.url}-${Ce}`))})},No=!!(Z!=null&&Z.title2||Z!=null&&Z.title3||dt!=null&&dt.title2||dt!=null&&dt.title3||(L??0)>0||o),Nr=()=>r.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[r.jsx("div",{ref:lt,className:Zt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:ei(ee||Z)}),r.jsxs("div",{ref:ht,className:`${e}-titles-row-two-row`,style:{...ge&&_?{minHeight:_}:void 0,...ge&&oe?{width:oe,maxWidth:"100%"}:void 0},children:[zt(r.jsxs("div",{className:Zt,style:{position:ge?"absolute":"relative",inset:ge?0:void 0,width:"100%"},children:[dt&&ge?r.jsx("div",{className:`${Tt} ${e}-titles-fade-out`,children:on(dt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${ge?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:on(Z)})]}),ge&&_?_:void 0),No?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[dt&&ge?r.jsx("div",{className:`${en} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:dn(dt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${ge?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${K?` ${e}-titles-layer-in-stacked`:""}`,children:dn(Z,!0)})]}):null]})]}),Or=()=>{const ue=No;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...ue?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:ue?void 0:{flex:"0 0 auto",height:"auto"},children:ei(Z,!0)}),Sn()]})};return r.jsxs("div",{ref:Ge,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Ae||Ve()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:bt?void 0:-1,style:{opacity:ke?1:0,transition:"opacity 300ms ease",pointerEvents:ke?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:g,...$e}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:qe,...Ie,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:tt,onClick:ue=>ue.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":fe&&me.length>1?"true":"false",onPointerDown:fe?St:void 0,onPointerUp:fe?Pt:void 0,onPointerCancel:fe?Nt:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[yt&&he?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:ue=>{ue.target===ue.currentTarget&&De(Me)},children:r.jsx("div",{className:`${e}-slide-area`,children:ni(yt.images)})},`slide-out-${Me}`):null,r.jsx("div",{className:`${e}-slide-layer-in${he?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:Q?ni(Q.images):null})},`slide-in-${Me}-${ce}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:Ze,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:ae,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...K?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${K?` ${e}-lightbox-content-area-stacked`:""}`,children:Wt&&r.jsx("div",{className:`${e}-text-bar-cell${K?` ${e}-text-bar-cell-stacked`:""}`,style:K?void 0:{flex:1,minWidth:0,width:"100%"},children:K?I==="fade"?Nr():Or():I==="fade"?it():Mt()})})})]})]})]})};function ov(e){return`
15207
+ `,Yy="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),si={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Zy(e){const t={};return t[Vt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Vt(e,"fontSettings")]={...si.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Vt(e,"fontSize")]={...si.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Vt(e,"lineHeight")]={...si.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Vt(e,"letterSpacing")]={...si.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Vt(e,"wordSpacing")]={...si.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Vt(e,"textAlign")]={...si.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Vt(e,"textAppearance")]={...si.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Jy=qi.reduce((e,t)=>({...e,...Zy(t)}),{}),Qy=qi.reduce((e,t)=>({...e,[Vt(t,"fontFamily")]:"Goudy Bookletter 1911",[Vt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Vt(t,"letterSpacing")]:0,[Vt(t,"wordSpacing")]:0,[Vt(t,"textAlign")]:"left",[Vt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function sa(e){return qi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Vt(n,"fontSize")]=i),o!==void 0&&(t[Vt(n,"lineHeight")]=o),t},{})}const ev=By(),tv={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"}},...Jy,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:Yy,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...Qy},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,...sa({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,...sa({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,...sa({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:[ev]}],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"}]}},nv={element:Xy,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:tv,sourceCode:Ky,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...qi.map(e=>({path:`${Vt(e,"fontFamily")}`}))]},fontRelations:{...qi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Vt(t,"fontFamily")}`}),{})}},iv=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,initialSlideIndex:l=0,enableUrlSync:d=!1,journalItemId:c=null,onBeforeClose:u,onClose:p})=>{const{type:v,coverFit:y,backgroundColor:g,imageGap:h,maxWidth:m,maxHeight:b,textTransition:I,title1Width:R,title2Width:T,title3Width:G,title1MarginLeft:k=0,title2MarginLeft:V=0,title3MarginLeft:A=0,titleRowMarginBottom:L=0,titleHeaderLayout:D="single-row",countCloseGap:x=0,closeIcon:W,closeIconMaxWidth:M,closeIconColor:Y,closeIconHoverColor:F,contentMarginTop:X=0,iconMarginRight:j=0}=n,B=a.useCallback(de=>C.scalingValue(de,i??!1),[i]),ne=B(h??0),S=`${m}%`,E=`${b}%`,O=B(x),ae=B(X),ie=B(j),$=pi("title1",ui(n,"title1"),i),se=pi("title2",ui(n,"title2"),i),P=pi("title3",ui(n,"title3"),i),te=pi("count",ui(n,"count"),i),K=D==="mobile",he=!i||!!s,We=!o&&(!i||!!s),pe=a.useMemo(()=>ar(t,v),[t,v]),[ce,U]=a.useState(l),Q=pe[ce],Z=Q==null?void 0:Q.entry,[ke,we]=a.useState(!1),[Ae,ue]=a.useState(null),[ge,be]=a.useState(!1),[z,oe]=a.useState(null),[fe,ye]=a.useState(!1),[Me,Se]=a.useState(0),[_,me]=a.useState(),[re,H]=a.useState(),[ee,Fe]=a.useState(null),le=a.useRef(null),N=a.useRef(0),Xe=a.useRef(0),je=a.useRef(0),ut=a.useRef(!1),tt=a.useRef(null),ft=a.useRef(null),st=a.useRef(null),Ue=a.useRef(null),ve=a.useRef(null),_e=a.useRef(null),ze=a.useRef(null),Ye=a.useCallback(()=>{const de=ft.current;if(!de)return;const Be=de.closest(`.${e}-lightbox-content-area`);if(!Be)return de.getBoundingClientRect().width;const f=Array.from(Be.children).reduce((q,J)=>!(J instanceof HTMLElement)||J.contains(de)?q:q+J.getBoundingClientRect().width,0);return Be.getBoundingClientRect().width-f},[e]),Ce=a.useCallback(()=>{le.current&&(clearTimeout(le.current),le.current=null)},[]),Oe=a.useCallback(de=>{de===N.current&&(oe(null),ye(!1))},[]),Ve=a.useCallback(()=>{o||ut.current||(ut.current=!0,u==null||u(),we(!1),tt.current=setTimeout(()=>{p()},300))},[o,u,p]),Re=a.useCallback(de=>!!(de.closest("[data-controls]")||de.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Ie,backdropStyle:qe,mediaAreaStyle:lt,overlayContentStyle:Ze,swipeHandlers:Ee,dismissAreaStyle:Ge}=Bc({enabled:We,onClose:Ve,animMs:300,isBlockedTarget:Re}),Pe=a.useCallback(de=>{d&&Tc(de+1,c,!0)},[d,c]),Je=a.useCallback(de=>{if(de)return de.getBoundingClientRect().height},[]),nt=a.useCallback(de=>{if(pe.length===0)return;const Be=(de%pe.length+pe.length)%pe.length;if(Be===ce)return;const f=pe[ce],q=pe[Be];N.current+=1;const J=N.current,$e=I==="fade"&&Gs(f==null?void 0:f.entry)!==Gs(q==null?void 0:q.entry),De=Je(st.current),Qe=$e?(()=>{const Rt=Ye();Yn.flushSync(()=>{Fe(q.entry)}),st.current&&Rt&&(st.current.style.width=`${Rt}px`);const tn=Je(st.current);return st.current&&(st.current.style.width=""),{measuredIncomingTitlesHeight:tn,incomingTitlesMeasureWidth:Rt}})():void 0,wt=Math.max(De??0,(Qe==null?void 0:Qe.measuredIncomingTitlesHeight)??0)||void 0;Se(J),oe(ce),ye(!0),U(Be),Pe(Be),je.current=Be,$e?(Ce(),wt&&me(wt),Qe!=null&&Qe.incomingTitlesMeasureWidth&&H(Qe.incomingTitlesMeasureWidth),ue((f==null?void 0:f.entryIndex)??null),be(!0),Xe.current=q.entryIndex,le.current=setTimeout(()=>{ue(null),be(!1),me(void 0),H(void 0),Fe(null),le.current=null},400)):(Ce(),ue(null),be(!1),me(void 0),H(void 0),Fe(null),Xe.current=q.entryIndex)},[ce,Ce,Ye,Je,pe,Pe,I]),et=a.useCallback(()=>{ze.current=null},[]),St=a.useCallback(de=>{!he||pe.length<=1||de.pointerType==="mouse"&&de.button!==0||de.target.closest("[data-controls]")||(ze.current={startX:de.clientX,startY:de.clientY,pointerId:de.pointerId})},[he,pe.length]),Wt=a.useCallback(de=>{var Rt;if(!he||pe.length<=1||de.pointerType==="mouse"&&de.button!==0)return;if(Ie){et();return}const Be=ze.current;if(!Be||Be.pointerId!==de.pointerId||(et(),de.target.closest("[data-controls]")))return;const q=de.clientX-Be.startX,J=de.clientY-Be.startY,$e=Math.abs(q),De=Math.abs(J);if($e>=gh&&$e>De){nt(q>0?ce-1:ce+1);return}if($e>js||De>js)return;const Qe=(Rt=Ue.current)==null?void 0:Rt.getBoundingClientRect(),wt=Qe?Qe.left+Qe.width/2:window.innerWidth/2;nt(de.clientX<wt?ce-1:ce+1)},[ce,he,nt,Ie,et,pe.length]),At=a.useCallback(de=>{const Be=ze.current;(Be==null?void 0:Be.pointerId)===de.pointerId&&et()},[et]);Vc(),a.useEffect(()=>{_e.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const de=requestAnimationFrame(()=>{we(!0),requestAnimationFrame(()=>{ve.current?ve.current.focus():Ue.current&&Ue.current.focus()})});return()=>{cancelAnimationFrame(de),tt.current&&clearTimeout(tt.current),le.current&&clearTimeout(le.current);const Be=_e.current;Be&&document.contains(Be)&&Be.focus({preventScroll:!0})}},[]),a.useEffect(()=>{var de;I!=="fade"&&(Xe.current=((de=pe[ce])==null?void 0:de.entryIndex)??0,Ce(),ue(null),be(!1),me(void 0),H(void 0))},[ce,Ce,pe,I]),a.useEffect(()=>{const de=Be=>{if(Be.key==="Escape"){Ve();return}if(Be.key==="ArrowLeft"&&pe.length>1){nt(ce-1);return}if(Be.key==="ArrowRight"&&pe.length>1){nt(ce+1);return}if(Be.key==="Tab"&&Ue.current){const f=Ue.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),q=Array.from(f).filter(Qe=>!Qe.closest('[aria-hidden="true"]'));if(q.length===0)return;const J=q[0],$e=q[q.length-1],De=document.activeElement;Be.shiftKey?(De===J||!Ue.current.contains(De))&&(Be.preventDefault(),$e.focus()):(De===$e||!Ue.current.contains(De))&&(Be.preventDefault(),J.focus())}};return window.addEventListener("keydown",de),()=>window.removeEventListener("keydown",de)},[nt,Ve,ce,pe.length]),a.useLayoutEffect(()=>{Ce(),N.current=0,Se(0),oe(null),ye(!1),ue(null),be(!1),me(void 0),H(void 0),Fe(null),U(de=>{const Be=Math.max(0,pe.length-1);return Math.min(de,Be)})},[Ce,t.length,v,pe.length]),a.useLayoutEffect(()=>{var f;const de=Math.max(0,pe.length-1),Be=Math.min(Math.max(0,l),de);je.current=Be,Xe.current=((f=pe[Be])==null?void 0:f.entryIndex)??0,U(Be)},[l]);const gt=Ae!==null?t[Ae]:null,xt=z!==null?pe[z]:null,zt=(Z==null?void 0:Z.title1)||(Z==null?void 0:Z.title2)||(Z==null?void 0:Z.title3)||(gt==null?void 0:gt.title1)||(gt==null?void 0:gt.title2)||(gt==null?void 0:gt.title3),Ft=Sh(v,pe,t),bt=W!==null,_t=zt||Ft||bt,Gt=Ft&&bt?{gap:O}:void 0,Zt=`${e}-titles-stack${K?` ${e}-titles-stack-stacked`:""}`,en=`${e}-titles-layer-out${K?` ${e}-titles-layer-out-stacked`:""}`,$t=`${e}-titles-layer-out`,Ht=(k??0)>0||o,nn=B(L),ct=a.useMemo(()=>({title1Width:R??Fi.title1Width,title2Width:T??Fi.title2Width,title3Width:G??Fi.title3Width}),[R,T,G]),Te=a.useMemo(()=>({title2MarginLeft:V,title3MarginLeft:A}),[V,A]),Ne=a.useMemo(()=>Z?Vn(e,Z,$,se,P):[],[e,Z,$,se,P]),it=a.useMemo(()=>Ne.map(de=>ct[de.widthKey]),[Ne,ct]),pt=a.useMemo(()=>Di(Ne.length,it),[Ne.length,it]),yt=a.useMemo(()=>wo(Ne.length,it),[Ne.length,it]),It=a.useMemo(()=>Ne.filter(de=>de.prefix==="title1"),[Ne]),ht=a.useMemo(()=>Ne.filter(de=>de.prefix==="title2"||de.prefix==="title3"),[Ne]),Bt=a.useMemo(()=>Gn(It,ct),[It,ct]),kt=a.useMemo(()=>Gn(ht,ct),[ht,ct]),Pt=a.useCallback((de,Be)=>{const f=Ne.findIndex(J=>J.prefix===de.prefix);if(!K||Be==="single-row")return{effectiveWidth:yt[f]??0,resolvedWidth:pt[f]??0,maxWidth:ln(f,pt)};if(Be==="two-row-top"){const J=It.findIndex($e=>$e.prefix===de.prefix);return{effectiveWidth:Bt.effective[J]??0,resolvedWidth:Bt.resolved[J]??0,maxWidth:ln(J,Bt.resolved)}}const q=ht.findIndex(J=>J.prefix===de.prefix);return{effectiveWidth:kt.effective[q]??0,resolvedWidth:kt.resolved[q]??0,maxWidth:ln(q,kt.resolved)}},[Ne,ht,kt,yt,pt,It,Bt,K]),qt=a.useCallback(de=>Ec(Ne,pt,Te,de)+(K?0:k??0),[Ne,pt,Te,K,k]),Ut=a.useCallback(()=>K?0:k??0,[K,k]),Ot=a.useCallback(de=>ht.slice(0,de).reduce((Be,f,q)=>Be+(f.marginLeftKey?Te[f.marginLeftKey]??0:0)+(kt.resolved[q]??0),0),[ht,kt.resolved,Te]),Dt=a.useCallback(de=>{const Be=ht[de];return Ot(de)+(Be.marginLeftKey?Te[Be.marginLeftKey]??0:0)+(kt.resolved[de]??0)},[ht,kt.resolved,Ot,Te]),Nt=a.useCallback((de,Be,f)=>{if(!K||f==="single-row"){const Qe=de.findIndex(Jt=>Jt.prefix===Be.prefix),wt=de.map(Jt=>ct[Jt.widthKey]),Rt=Di(de.length,wt);return{effectiveWidth:wo(de.length,wt)[Qe]??0,resolvedWidth:Rt[Qe]??0,maxWidth:ln(Qe,Rt)}}if(f==="two-row-top"){const Qe=de.filter(Jt=>Jt.prefix==="title1"),wt=Qe.findIndex(Jt=>Jt.prefix===Be.prefix),{resolved:Rt,effective:tn}=Gn(Qe,ct);return{effectiveWidth:tn[wt]??0,resolvedWidth:Rt[wt]??0,maxWidth:ln(wt,Rt)}}const q=de.filter(Qe=>Qe.prefix==="title2"||Qe.prefix==="title3"),J=q.findIndex(Qe=>Qe.prefix===Be.prefix),{resolved:$e,effective:De}=Gn(q,ct);return{effectiveWidth:De[J]??0,resolvedWidth:$e[J]??0,maxWidth:ln(J,$e)}},[ct,K]),Ct=(de,Be,f)=>{const q=de.marginLeftKey?Te[de.marginLeftKey]??0:0,{effectiveWidth:J,resolvedWidth:$e,maxWidth:De}=f??Pt(de,Be),Qe=Math.max(q,Bn),wt=o&&Be==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":de.prefix,style:{width:B(J),...q>0?{marginLeft:B(q)}:{}},children:[r.jsx("p",{className:de.className,style:de.style,children:de.text}),wt&&de.marginLeftKey?r.jsx("div",{"data-controls":de.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String($e),style:{position:"absolute",top:0,left:B(-q),width:B(Qe),height:"100%",pointerEvents:"auto"}}):null,wt?r.jsx("div",{"data-controls":de.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(De),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:B(-gn/2),width:B(gn),height:"100%",pointerEvents:"auto"}}):null]},de.className)},w=(de="two-row")=>{const Be=Ne.findIndex(J=>J.prefix==="title1"),f=Be>=0?pt[Be]:ct.title1Width,q=de==="two-row"&&o;return r.jsx("div",{...q?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(f)}:{},style:{width:B(k??0),flexShrink:0,alignSelf:"stretch",...q?{pointerEvents:"auto"}:{}}})},xe=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:$,"aria-hidden":"true",children:" "}),Le=()=>r.jsx("span",{className:`${e}-entry-counter`,style:te,"aria-live":"polite","aria-atomic":"true",children:wh(pe,ce,v,t)}),He=()=>Ft?o&&bt?r.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Le(),r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${Zr(O)} + ${O}))`,width:Zr(O),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Le():null,at=()=>!Ft&&!bt?null:r.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Gt,children:[He(),bt?vt():null]}),Mt=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Ft||zt?xe():null,Ht?w("single-row"):null,Lt(Z),r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),at(),Sn()]}),ot=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Ft||zt?xe():null,Ht?w("single-row"):null,r.jsxs("div",{className:`${e}-titles-row-titles`,style:ge&&_?{minHeight:_}:void 0,children:[r.jsx("div",{ref:st,className:Zt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:ti(ee||Z)}),r.jsxs("div",{ref:ft,className:Zt,style:{position:ge?"absolute":"relative",inset:ge?0:void 0,width:"100%",...ge&&re?{width:re,maxWidth:"100%"}:void 0},children:[gt&&ge?r.jsx("div",{className:`${en} ${e}-titles-fade-out`,children:ti(gt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${ge?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:ti(Z)})]})]}),at(),Sn()]}),vt=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:C.scalingValue(M??0,i),height:C.scalingValue(M??0,i),marginRight:ie,"--close-icon-hover-color":F},children:[r.jsx("button",{ref:ve,type:"button",className:`${e}-close-icon-inner`,onClick:Ve,"aria-label":"Close",children:r.jsx(an,{url:W??"",fill:Y,hoverFill:i&&!s?Y:F,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:ie,height:"100%",pointerEvents:"auto"}})]}),jt=(de,Be)=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[Ft||zt?xe():null,Ht?w("two-row"):null,Be!==void 0?r.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:Be},children:de}):r.jsxs(r.Fragment,{children:[de,r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),at()]}),Lt=de=>{if(!de)return null;const Be=Vn(e,de,$,se,P);return r.jsx(r.Fragment,{children:Be.map(f=>Ct(f,"single-row",Nt(Be,f,"single-row")))})},on=de=>{if(!de)return null;const Be=Vn(e,de,$,se,P),f=Be.find(q=>q.prefix==="title1");return f?Ct(f,"two-row-top",Nt(Be,f,"two-row-top")):null},dn=(de,Be=!1)=>{const f=de?Vn(e,de,$,se,P):[],q=f.filter(De=>De.prefix==="title2"||De.prefix==="title3"),J=o&&Be;return q.length>0||J||(L??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[q.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[q.map(De=>Ct(De,"two-row-bottom",Nt(f,De,"two-row-bottom"))),Be&&o?r.jsxs(r.Fragment,{children:[_r(),Hr()]}):null]}):null,(L??0)>0||J?r.jsx("div",{"data-controls":J?"titleRowMarginBottom":void 0,"data-controls-axis":J?"y":void 0,"data-controls-reverse":J?"":void 0,className:J?`${e}-control`:void 0,style:{height:nn,width:"100%",flexShrink:0,pointerEvents:J?"auto":"none"}}):null]}):null},ei=(de,Be=!1)=>r.jsxs(r.Fragment,{children:[jt(on(de)),dn(de,Be)]}),ti=de=>K?r.jsx("div",{className:`${e}-titles-row-two-row`,children:ei(de)}):de?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Lt(de)}):null,Wo=()=>{const de=K?-1:Ne.findIndex(q=>q.prefix==="title1"),Be=!K&&(o||(k??0)>0)?(()=>{const q=k??0,J=de>=0?pt[de]:ct.title1Width,$e=Math.max(q,Bn);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(J),style:{position:"absolute",top:0,left:0,width:B($e),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,f=Ne.flatMap((q,J)=>{if(!q.marginLeftKey)return[];const $e=Te[q.marginLeftKey]??0,De=Ic(Ne,pt,Te,J)+Ut(),Qe=Math.max($e,Bn);return r.jsx("div",{"data-controls":q.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(pt[J]),style:{position:"absolute",top:0,left:B(De),width:B(Qe),height:"100%",pointerEvents:"auto"}},q.marginLeftKey)});return Be?[Be,...f]:f},_o=()=>Ne.map((de,Be)=>{const f=ln(Be,pt),J=qt(Be)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":de.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(f),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:B(J),width:B(gn),height:"100%",pointerEvents:"auto"}})},`${de.widthKey}-junction`)}),_r=()=>ht.flatMap((de,Be)=>{if(!de.marginLeftKey)return[];const f=Te[de.marginLeftKey]??0,q=Ot(Be),J=Math.max(f,Bn),{resolvedWidth:$e}=Pt(de,"two-row-bottom");return r.jsx("div",{"data-controls":de.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String($e),style:{position:"absolute",top:0,left:B(q),width:B(J),height:"100%",pointerEvents:"auto"}},de.marginLeftKey)}),Hr=()=>ht.map((de,Be)=>{const{maxWidth:f}=Pt(de,"two-row-bottom"),J=Dt(Be)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":de.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(f),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:B(J),width:B(gn),height:"100%",pointerEvents:"auto"}})},`${de.widthKey}-junction`)}),Sn=()=>!o||K?null:r.jsxs(r.Fragment,{children:[Wo(),_o()]}),xi=de=>{const Be=!de.objectFit&&Fn(y);return{className:`${e}-slide-image-cell${Be?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:S,maxHeight:E,...Be?{"--image-aspect-ratio":Fr(y)}:{}}}},Ho=de=>de.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":de.objectFit}}:Fn(y)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},ni=de=>{if(de.length===0)return null;const Be=de.length>1,f=Zr(ne),q=`calc(-0.5 * (${f} + ${ne}))`;if(de.length===1){const J=de[0];return r.jsx("div",{...xi(J),children:r.jsx("img",{...Ho(J),src:J.url,alt:J.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:Be?{gap:ne}:void 0,children:de.map((J,$e)=>r.jsxs("div",{...xi(J),children:[r.jsx("img",{...Ho(J),src:J.url,alt:J.name??"",draggable:!1}),o&&Be&&$e<de.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:q,width:f,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${J.url}-${$e}`))})},No=!!(Z!=null&&Z.title2||Z!=null&&Z.title3||gt!=null&&gt.title2||gt!=null&&gt.title3||(L??0)>0||o),Nr=()=>r.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[r.jsx("div",{ref:st,className:Zt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:ei(ee||Z)}),r.jsxs("div",{ref:ft,className:`${e}-titles-row-two-row`,style:{...ge&&_?{minHeight:_}:void 0,...ge&&re?{width:re,maxWidth:"100%"}:void 0},children:[jt(r.jsxs("div",{className:Zt,style:{position:ge?"absolute":"relative",inset:ge?0:void 0,width:"100%"},children:[gt&&ge?r.jsx("div",{className:`${$t} ${e}-titles-fade-out`,children:on(gt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${ge?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:on(Z)})]}),ge&&_?_:void 0),No?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[gt&&ge?r.jsx("div",{className:`${en} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:dn(gt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${ge?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${K?` ${e}-titles-layer-in-stacked`:""}`,children:dn(Z,!0)})]}):null]})]}),Or=()=>{const de=No;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...de?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:de?void 0:{flex:"0 0 auto",height:"auto"},children:ei(Z,!0)}),Sn()]})};return r.jsxs("div",{ref:Ue,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Ie||Ve()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:bt?void 0:-1,style:{opacity:ke?1:0,transition:"opacity 300ms ease",pointerEvents:ke?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:g,...qe}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:Ge,...Ee,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:lt,onClick:de=>de.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":he&&pe.length>1?"true":"false",onPointerDown:he?St:void 0,onPointerUp:he?Wt:void 0,onPointerCancel:he?At:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[xt&&fe?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:de=>{de.target===de.currentTarget&&Oe(Me)},children:r.jsx("div",{className:`${e}-slide-area`,children:ni(xt.images)})},`slide-out-${Me}`):null,r.jsx("div",{className:`${e}-slide-layer-in${fe?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:Q?ni(Q.images):null})},`slide-in-${Me}-${ce}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:Ze,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:ae,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...K?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${K?` ${e}-lightbox-content-area-stacked`:""}`,children:_t&&r.jsx("div",{className:`${e}-text-bar-cell${K?` ${e}-text-bar-cell-stacked`:""}`,style:K?void 0:{flex:1,minWidth:0,width:"100%"},children:K?I==="fade"?Nr():Or():I==="fade"?ot():Mt()})})})]})]})]})};function ov(e){return`
15195
15208
  .${e}-wrapper {
15196
15209
  position: relative;
15197
15210
  width: 100%;
@@ -16469,7 +16482,7 @@ export type LightboxJournalSettings = {
16469
16482
  closeIconColor: string;
16470
16483
  closeIconHoverColor: string;
16471
16484
  };
16472
- `,sv="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),li={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function lv(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")]={...li.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ot(e,"fontSize")]={...li.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ot(e,"lineHeight")]={...li.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ot(e,"letterSpacing")]={...li.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ot(e,"wordSpacing")]={...li.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ot(e,"textAlign")]={...li.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ot(e,"textAppearance")]={...li.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const cv=Xn.reduce((e,t)=>({...e,...lv(t)}),{}),dv=Xn.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 la(e){return Xn.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 uv=$h(),pv={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"}},...cv,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:sv,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...dv,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,...la({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,...la({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,...la({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:[uv]}],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"}]}]}},mv={element:rv,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:pv,sourceCode:av,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Xn.map(e=>({path:`${ot(e,"fontFamily")}`}))]},fontRelations:{...Xn.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${ot(t,"fontFamily")}`}),{})}},gv={sizeType:"custom",value:700,min:400,max:700};function yr(e,t){return{widthPx:e,heightPx:e*t}}function Ma(e,t,n,i,o,s){return{x:Math.min(Math.max(e,o/2),n-o/2),y:Math.min(Math.max(t,s/2),i-s/2)}}function yl(e,t,n,i){const{heightPx:o}=yr(n,i);return Ma(e/2,t/2,e,t,n,o)}function qc(e,t,n){for(const i of n){const{heightPx:o}=yr(i.widthPx,i.aspectRatio),s=i.widthPx/2,l=o/2;if(e>=i.x-s&&e<=i.x+s&&t>=i.y-l&&t<=i.y+l)return!0}return!1}function hv(e,t,n,i,o,s,l,d){if(o==="system")return"none";const c=i.getBoundingClientRect(),u=document.elementFromPoint(c.left+e,c.top+t);return u&&u.closest("a")?"none":qc(e,t,n)||s==="area"?l??"none":d??"none"}function vl(e,t,n){var d;const{sizeType:i,value:o,min:s,max:l}=t;return i==="custom"?o:i==="as is"?((d=n.get(e))==null?void 0:d.naturalWidth)??o:Math.round(Math.random()*(l-s)+s)}function fv(e){return`
16485
+ `,sv="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),li={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function lv(e){const t={};return t[rt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[rt(e,"fontSettings")]={...li.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[rt(e,"fontSize")]={...li.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[rt(e,"lineHeight")]={...li.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[rt(e,"letterSpacing")]={...li.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[rt(e,"wordSpacing")]={...li.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[rt(e,"textAlign")]={...li.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[rt(e,"textAppearance")]={...li.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const cv=Xn.reduce((e,t)=>({...e,...lv(t)}),{}),dv=Xn.reduce((e,t)=>({...e,[rt(t,"fontFamily")]:"Goudy Bookletter 1911",[rt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[rt(t,"letterSpacing")]:0,[rt(t,"wordSpacing")]:0,[rt(t,"textAlign")]:"left",[rt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function la(e){return Xn.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[rt(n,"fontSize")]=i),o!==void 0&&(t[rt(n,"lineHeight")]=o),t},{})}const uv=$h(),pv={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"}},...cv,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:sv,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...dv,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,...la({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,...la({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,...la({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:[uv]}],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"}]}]}},mv={element:rv,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:pv,sourceCode:av,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Xn.map(e=>({path:`${rt(e,"fontFamily")}`}))]},fontRelations:{...Xn.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${rt(t,"fontFamily")}`}),{})}},gv={sizeType:"custom",value:700,min:400,max:700};function yr(e,t){return{widthPx:e,heightPx:e*t}}function Ma(e,t,n,i,o,s){return{x:Math.min(Math.max(e,o/2),n-o/2),y:Math.min(Math.max(t,s/2),i-s/2)}}function yl(e,t,n,i){const{heightPx:o}=yr(n,i);return Ma(e/2,t/2,e,t,n,o)}function qc(e,t,n){for(const i of n){const{heightPx:o}=yr(i.widthPx,i.aspectRatio),s=i.widthPx/2,l=o/2;if(e>=i.x-s&&e<=i.x+s&&t>=i.y-l&&t<=i.y+l)return!0}return!1}function hv(e,t,n,i,o,s,l,d){if(o==="system")return"none";const c=i.getBoundingClientRect(),u=document.elementFromPoint(c.left+e,c.top+t);return u&&u.closest("a")?"none":qc(e,t,n)||s==="area"?l??"none":d??"none"}function vl(e,t,n){var d;const{sizeType:i,value:o,min:s,max:l}=t;return i==="custom"?o:i==="as is"?((d=n.get(e))==null?void 0:d.naturalWidth)??o:Math.round(Math.random()*(l-s)+s)}function fv(e){return`
16473
16486
  .${e}-root {
16474
16487
  position: absolute;
16475
16488
  top: 0;
@@ -16504,7 +16517,7 @@ export type LightboxJournalSettings = {
16504
16517
  width: 32px;
16505
16518
  height: 32px;
16506
16519
  }
16507
- `}function yv(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 vv(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await yv(i)]));return new Map(n)}function xv({settings:e,content:t=[],isEditor:n}){const{prefix:i}=C.useScopedStyles(),[o,s]=a.useState(null),[l,d]=a.useState([]),[c,u]=a.useState(0),p=a.useRef(0),[v,y]=a.useState({x:0,y:0}),[g,h]=a.useState("none"),m=a.useRef({x:0,y:0}),[b,I]=a.useState(!1),[R,T]=a.useState(!1),G=a.useRef(new Map),{imageSize:k=gv,cursor:V="system",target:A="area",position:L="random",visible:D="all",defaultCursor:x=null,hoverCursor:W=null}=e,M=t.filter(S=>{var E;return!!((E=S==null?void 0:S.image)!=null&&E.url)}),Y=a.useMemo(()=>fv(i),[i]),F=a.useCallback((S,E,O=l)=>{if(!o)return;const ae=o.getBoundingClientRect(),ie=S-ae.left,$=E-ae.top;y({x:ie,y:$}),h(hv(ie,$,O,o,V,A,W,x))},[o,l,V,A,W,x]);a.useEffect(()=>{const S=[...M.map(O=>O.image.url),x,W].filter(O=>!!O);if(S.length===0){G.current=new Map,T(!0);return}let E=!1;return T(!1),vv(S).then(O=>{E||(G.current=O,T(!0))}),()=>{E=!0}},[t,x,W]),a.useEffect(()=>{if(!o)return;const S=O=>{O.stopPropagation(),m.current={x:O.clientX,y:O.clientY},F(O.clientX,O.clientY)},E=()=>{b&&F(m.current.x,m.current.y)};return o.addEventListener("mousemove",S),window.addEventListener("scroll",E,!0),()=>{o.removeEventListener("mousemove",S),window.removeEventListener("scroll",E,!0)}},[o,b,F]),a.useEffect(()=>{!o||!b||F(m.current.x,m.current.y)},[l,o,b,F]),a.useEffect(()=>{b||h("none")},[b]);const X=(S,E,O,ae={})=>{var K,fe;if(!((K=S==null?void 0:S.image)!=null&&K.url))return null;const ie=((fe=G.current.get(S.image.url))==null?void 0:fe.aspectRatio)??1,$=vl(S.image.url,k,G.current),{heightPx:re}=yr($,ie);let P=0,te=0;return L==="same"?{x:P,y:te}=yl(E,O,$,ie):(P=ae.x??Math.random()*E,te=ae.y??Math.random()*O,{x:P,y:te}=Ma(P,te,E,O,$,re)),{id:p.current++,url:S.image.url,link:S.link,name:S.image.name,x:P,y:te,xRatio:P/E,yRatio:te/O,aspectRatio:ie,widthPx:$}},j=()=>{if(!o)return;const S=o.getBoundingClientRect(),E=S.width,O=S.height;E===0||O===0||d(ae=>ae.length===0?ae:ae.map(ie=>{const $=k.sizeType==="random"?ie.widthPx:vl(ie.url,k,G.current),{heightPx:re}=yr($,ie.aspectRatio);if(L==="same"){const{x:K,y:fe}=yl(E,O,$,ie.aspectRatio);return{...ie,x:K,y:fe,widthPx:$}}const{x:P,y:te}=Ma(ie.xRatio*E,ie.yRatio*O,E,O,$,re);return{...ie,x:P,y:te,widthPx:$}}))};a.useEffect(()=>{if(!o||M.length===0||!R)return;const S=o.getBoundingClientRect(),E=S.width,O=S.height,ae=X(M[0],E,O);ae&&(d([ae]),u(M.length>1?1:0))},[k,L,o,t,R]),a.useEffect(()=>{if(!o)return;j();const S=new ResizeObserver(j);return S.observe(o),window.addEventListener("resize",j),()=>{S.disconnect(),window.removeEventListener("resize",j)}},[o,L,k,l.length]),a.useEffect(()=>{D==="last One"&&d(S=>S.length>0?[S[S.length-1]]:[])},[D]);const B=S=>{if(!o||M.length===0||!R)return;const E=o.getBoundingClientRect(),O=S.clientX-E.left,ae=S.clientY-E.top;if(A==="image"&&!qc(O,ae,l))return;let ie=0,$=0;L==="on Click"?(ie=O,$=ae):L==="same"?(ie=E.width/2,$=E.height/2):(ie=Math.random()*E.width,$=Math.random()*E.height);const re=M[c%M.length],P=X(re,E.width,E.height,{x:ie,y:$});if(!P)return;const te=D==="all"?[...l,P]:[P];d(te),u(K=>(K+1)%M.length),F(S.clientX,S.clientY,te)},ne=V==="custom"&&g!=="none";return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Y}}),r.jsxs("div",{ref:s,onClick:B,onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1),className:`${i}-root`,style:{cursor:ne?"none":"default"},children:[l.map(S=>r.jsx("div",{className:`${i}-wrapper`,style:{top:`${S.y}px`,left:`${S.x}px`,width:`${S.widthPx}px`,cursor:ne?"none":"default"},children:A==="area"&&S.link?r.jsx("a",{href:S.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:r.jsx("img",{src:S.url,alt:S.name,className:`${i}-image`})}):r.jsx("img",{src:S.url,alt:S.name,className:`${i}-image`})},S.id)),b&&ne&&r.jsx("div",{className:`${i}-cursor`,style:{left:`${v.x}px`,top:`${v.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${g}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const bv=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
16520
+ `}function yv(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 vv(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await yv(i)]));return new Map(n)}function xv({settings:e,content:t=[],isEditor:n}){const{prefix:i}=C.useScopedStyles(),[o,s]=a.useState(null),[l,d]=a.useState([]),[c,u]=a.useState(0),p=a.useRef(0),[v,y]=a.useState({x:0,y:0}),[g,h]=a.useState("none"),m=a.useRef({x:0,y:0}),[b,I]=a.useState(!1),[R,T]=a.useState(!1),G=a.useRef(new Map),{imageSize:k=gv,cursor:V="system",target:A="area",position:L="random",visible:D="all",defaultCursor:x=null,hoverCursor:W=null}=e,M=t.filter(S=>{var E;return!!((E=S==null?void 0:S.image)!=null&&E.url)}),Y=a.useMemo(()=>fv(i),[i]),F=a.useCallback((S,E,O=l)=>{if(!o)return;const ae=o.getBoundingClientRect(),ie=S-ae.left,$=E-ae.top;y({x:ie,y:$}),h(hv(ie,$,O,o,V,A,W,x))},[o,l,V,A,W,x]);a.useEffect(()=>{const S=[...M.map(O=>O.image.url),x,W].filter(O=>!!O);if(S.length===0){G.current=new Map,T(!0);return}let E=!1;return T(!1),vv(S).then(O=>{E||(G.current=O,T(!0))}),()=>{E=!0}},[t,x,W]),a.useEffect(()=>{if(!o)return;const S=O=>{O.stopPropagation(),m.current={x:O.clientX,y:O.clientY},F(O.clientX,O.clientY)},E=()=>{b&&F(m.current.x,m.current.y)};return o.addEventListener("mousemove",S),window.addEventListener("scroll",E,!0),()=>{o.removeEventListener("mousemove",S),window.removeEventListener("scroll",E,!0)}},[o,b,F]),a.useEffect(()=>{!o||!b||F(m.current.x,m.current.y)},[l,o,b,F]),a.useEffect(()=>{b||h("none")},[b]);const X=(S,E,O,ae={})=>{var K,he;if(!((K=S==null?void 0:S.image)!=null&&K.url))return null;const ie=((he=G.current.get(S.image.url))==null?void 0:he.aspectRatio)??1,$=vl(S.image.url,k,G.current),{heightPx:se}=yr($,ie);let P=0,te=0;return L==="same"?{x:P,y:te}=yl(E,O,$,ie):(P=ae.x??Math.random()*E,te=ae.y??Math.random()*O,{x:P,y:te}=Ma(P,te,E,O,$,se)),{id:p.current++,url:S.image.url,link:S.link,name:S.image.name,x:P,y:te,xRatio:P/E,yRatio:te/O,aspectRatio:ie,widthPx:$}},j=()=>{if(!o)return;const S=o.getBoundingClientRect(),E=S.width,O=S.height;E===0||O===0||d(ae=>ae.length===0?ae:ae.map(ie=>{const $=k.sizeType==="random"?ie.widthPx:vl(ie.url,k,G.current),{heightPx:se}=yr($,ie.aspectRatio);if(L==="same"){const{x:K,y:he}=yl(E,O,$,ie.aspectRatio);return{...ie,x:K,y:he,widthPx:$}}const{x:P,y:te}=Ma(ie.xRatio*E,ie.yRatio*O,E,O,$,se);return{...ie,x:P,y:te,widthPx:$}}))};a.useEffect(()=>{if(!o||M.length===0||!R)return;const S=o.getBoundingClientRect(),E=S.width,O=S.height,ae=X(M[0],E,O);ae&&(d([ae]),u(M.length>1?1:0))},[k,L,o,t,R]),a.useEffect(()=>{if(!o)return;j();const S=new ResizeObserver(j);return S.observe(o),window.addEventListener("resize",j),()=>{S.disconnect(),window.removeEventListener("resize",j)}},[o,L,k,l.length]),a.useEffect(()=>{D==="last One"&&d(S=>S.length>0?[S[S.length-1]]:[])},[D]);const B=S=>{if(!o||M.length===0||!R)return;const E=o.getBoundingClientRect(),O=S.clientX-E.left,ae=S.clientY-E.top;if(A==="image"&&!qc(O,ae,l))return;let ie=0,$=0;L==="on Click"?(ie=O,$=ae):L==="same"?(ie=E.width/2,$=E.height/2):(ie=Math.random()*E.width,$=Math.random()*E.height);const se=M[c%M.length],P=X(se,E.width,E.height,{x:ie,y:$});if(!P)return;const te=D==="all"?[...l,P]:[P];d(te),u(K=>(K+1)%M.length),F(S.clientX,S.clientY,te)},ne=V==="custom"&&g!=="none";return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Y}}),r.jsxs("div",{ref:s,onClick:B,onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1),className:`${i}-root`,style:{cursor:ne?"none":"default"},children:[l.map(S=>r.jsx("div",{className:`${i}-wrapper`,style:{top:`${S.y}px`,left:`${S.x}px`,width:`${S.widthPx}px`,cursor:ne?"none":"default"},children:A==="area"&&S.link?r.jsx("a",{href:S.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:r.jsx("img",{src:S.url,alt:S.name,className:`${i}-image`})}):r.jsx("img",{src:S.url,alt:S.name,className:`${i}-image`})},S.id)),b&&ne&&r.jsx("div",{className:`${i}-cursor`,style:{left:`${v.x}px`,top:`${v.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${g}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const bv=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
16508
16521
  import { CommonComponentProps } from '../props';
16509
16522
  import { useScopedStyles } from '../utils/index';
16510
16523
 
@@ -17144,7 +17157,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
17144
17157
  display: block;
17145
17158
  pointer-events: none;
17146
17159
  }
17147
- `}function Lv(e){return e==="blur"?Cv:e==="greyscale"?$v:0}function io(e,t=1,n=1){const i=Lv(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 xl(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function Rv(e,t){return t<=1?0:(e-1+t)%t}function Iv(e,t=1){return!e||e.height===0?t:e.width/e.height}function Ev(e,t,n,i,o){if(e<=0||t<=0)return{widthPercent:i,heightPercent:o};const s=e*i/100,l=t*o/100;let d=s,c=d/n;return c>l&&(c=l,d=c*n),{widthPercent:d/e*100,heightPercent:c/t*100}}function bl(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 Uc(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function wl(e,t,n){return{...Uc(e),[`--${n}-stage-scale`]:t}}function Mv(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 Pv({settings:e,content:t,isEditor:n,isPreviewMode:i}){var be,z,se,he,ye,Me,Le;const{prefix:o}=C.useScopedStyles(),s=a.useMemo(()=>Tv(o),[o]),{imageSize:l,maxWidth:d,maxHeight:c,transition:u=1e3,bgImage:p="greyscale"}=e,v=t??[],y=xl(v.length),[g,h]=a.useState(y.activeIndex),[m,b]=a.useState(y.backgroundIndex),[I,R]=a.useState(!1),[T,G]=a.useState(!1),[k,V]=a.useState(null),[A,L]=a.useState(null),[D,x]=a.useState(0),[W,M]=a.useState(1),[Y,F]=a.useState("none"),[X,j]=a.useState("next"),[B,ne]=a.useState({}),[S,E]=a.useState({width:0,height:0}),O=a.useRef(null),ae=a.useRef(null),ie=!n||!!i,$=l??60,re=Math.max(10,Math.min(100,d??$)),P=Math.max(10,Math.min(100,c??$)),te=Math.max(100,u),K=io(p),fe=a.useCallback(_=>{const pe=Iv(_?B[_]:void 0);return Ev(S.width,S.height,pe,re,P)},[S.height,S.width,B,P,re]);a.useEffect(()=>{const _=ae.current;if(!_)return;const pe=new ResizeObserver(([oe])=>{const{width:H,height:ee}=oe.contentRect;E({width:H,height:ee})});return pe.observe(_),()=>pe.disconnect()},[]),a.useEffect(()=>{const _=(t??[]).map(pe=>{var oe;return(oe=pe.image)==null?void 0:oe.url}).filter(pe=>!!pe);Mv(_,(pe,oe)=>{ne(H=>{var ee,Fe;return((ee=H[pe])==null?void 0:ee.width)===oe.width&&((Fe=H[pe])==null?void 0:Fe.height)===oe.height?H:{...H,[pe]:oe}})})},[t]),a.useEffect(()=>{const{backgroundIndex:_,activeIndex:pe}=xl(v.length);h(pe),b(_),R(!1),G(!1),V(null),L(null),x(0),M(1),F("none"),j("next")},[v.length,t]),a.useEffect(()=>()=>{O.current&&clearTimeout(O.current)},[]);const We=a.useCallback(_=>{var le,N,Ue,je;if(!ie||I||v.length<=1)return;const pe=_==="next"?(g+1)%v.length:(g-1+v.length)%v.length,oe=fe((N=(le=v[g])==null?void 0:le.image)==null?void 0:N.url),H=fe((je=(Ue=v[pe])==null?void 0:Ue.image)==null?void 0:je.url),ee=bl(S.width,S.height,oe),Fe=bl(S.width,S.height,H);O.current&&clearTimeout(O.current),j(_),G(!0),R(!0),_==="next"?(V(g),L(pe),x(0),M(1),F(io(p,0,1))):(b(Rv(pe,v.length)),V(pe),L(g),x(1),M(Fe),F(io(p,1,Fe))),requestAnimationFrame(()=>{G(!1),requestAnimationFrame(()=>{_==="next"?(x(1),M(ee),F(io(p,1,ee))):(x(0),M(1),F(io(p,0,1)))})}),O.current=setTimeout(()=>{_==="next"&&b(g),h(pe),V(null),L(null),R(!1)},te)},[g,p,S.height,S.width,fe,I,ie,v,te]),me=v[g],ce=m!==null?v[m]:null,U=k!==null?v[k]:null,Q=A!==null?v[A]:null,Z=v.length<=1?0:(g-1+v.length)%v.length,ke=v.length<=1?0:(g+1)%v.length,we=fe((be=me==null?void 0:me.image)==null?void 0:be.url),Pe=fe((z=U==null?void 0:U.image)==null?void 0:z.url),de=fe((se=Q==null?void 0:Q.image)==null?void 0:se.url),ge={[`--${o}-transition-ms`]:`${te}ms`};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),r.jsxs("div",{ref:ae,className:mt(`${o}-wrapper`,T&&`${o}-snap`,n&&!i&&`${o}-editor`),style:ge,"aria-label":"Zoom gallery",children:[((he=ce==null?void 0:ce.image)==null?void 0:he.url)&&r.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:ce.image.url,alt:"",style:{filter:K}})}),I&&((ye=U==null?void 0:U.image)==null?void 0:ye.url)&&r.jsx("div",{className:mt(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${X}`),style:wl(Pe,W,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:U.image.url,alt:"",style:{filter:Y}})}),I&&((Me=Q==null?void 0:Q.image)==null?void 0:Me.url)&&r.jsx("div",{className:mt(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${X}`),style:wl(de,D,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-image`,src:Q.image.url,alt:""})}),!I&&((Le=me==null?void 0:me.image)==null?void 0:Le.url)&&r.jsx("div",{className:mt(`${o}-stage`,`${o}-foreground`),style:Uc(we),children:r.jsx("img",{className:`${o}-image`,src:me.image.url,alt:me.image.name??""})}),ie&&v.length>1&&!I&&r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:mt(`${o}-nav`,`${o}-nav-prev`),onClick:()=>We("prev"),"aria-label":`Show previous image (${Z+1} of ${v.length})`}),r.jsx("button",{type:"button",className:mt(`${o}-nav`,`${o}-nav-next`),onClick:()=>We("next"),"aria-label":`Show next image (${ke+1} of ${v.length})`})]})]})]})}const kv=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17160
+ `}function Lv(e){return e==="blur"?Cv:e==="greyscale"?$v:0}function io(e,t=1,n=1){const i=Lv(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 xl(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function Rv(e,t){return t<=1?0:(e-1+t)%t}function Iv(e,t=1){return!e||e.height===0?t:e.width/e.height}function Ev(e,t,n,i,o){if(e<=0||t<=0)return{widthPercent:i,heightPercent:o};const s=e*i/100,l=t*o/100;let d=s,c=d/n;return c>l&&(c=l,d=c*n),{widthPercent:d/e*100,heightPercent:c/t*100}}function bl(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 Uc(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function wl(e,t,n){return{...Uc(e),[`--${n}-stage-scale`]:t}}function Mv(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 Pv({settings:e,content:t,isEditor:n,isPreviewMode:i}){var be,z,oe,fe,ye,Me,Se;const{prefix:o}=C.useScopedStyles(),s=a.useMemo(()=>Tv(o),[o]),{imageSize:l,maxWidth:d,maxHeight:c,transition:u=1e3,bgImage:p="greyscale"}=e,v=t??[],y=xl(v.length),[g,h]=a.useState(y.activeIndex),[m,b]=a.useState(y.backgroundIndex),[I,R]=a.useState(!1),[T,G]=a.useState(!1),[k,V]=a.useState(null),[A,L]=a.useState(null),[D,x]=a.useState(0),[W,M]=a.useState(1),[Y,F]=a.useState("none"),[X,j]=a.useState("next"),[B,ne]=a.useState({}),[S,E]=a.useState({width:0,height:0}),O=a.useRef(null),ae=a.useRef(null),ie=!n||!!i,$=l??60,se=Math.max(10,Math.min(100,d??$)),P=Math.max(10,Math.min(100,c??$)),te=Math.max(100,u),K=io(p),he=a.useCallback(_=>{const me=Iv(_?B[_]:void 0);return Ev(S.width,S.height,me,se,P)},[S.height,S.width,B,P,se]);a.useEffect(()=>{const _=ae.current;if(!_)return;const me=new ResizeObserver(([re])=>{const{width:H,height:ee}=re.contentRect;E({width:H,height:ee})});return me.observe(_),()=>me.disconnect()},[]),a.useEffect(()=>{const _=(t??[]).map(me=>{var re;return(re=me.image)==null?void 0:re.url}).filter(me=>!!me);Mv(_,(me,re)=>{ne(H=>{var ee,Fe;return((ee=H[me])==null?void 0:ee.width)===re.width&&((Fe=H[me])==null?void 0:Fe.height)===re.height?H:{...H,[me]:re}})})},[t]),a.useEffect(()=>{const{backgroundIndex:_,activeIndex:me}=xl(v.length);h(me),b(_),R(!1),G(!1),V(null),L(null),x(0),M(1),F("none"),j("next")},[v.length,t]),a.useEffect(()=>()=>{O.current&&clearTimeout(O.current)},[]);const We=a.useCallback(_=>{var le,N,Xe,je;if(!ie||I||v.length<=1)return;const me=_==="next"?(g+1)%v.length:(g-1+v.length)%v.length,re=he((N=(le=v[g])==null?void 0:le.image)==null?void 0:N.url),H=he((je=(Xe=v[me])==null?void 0:Xe.image)==null?void 0:je.url),ee=bl(S.width,S.height,re),Fe=bl(S.width,S.height,H);O.current&&clearTimeout(O.current),j(_),G(!0),R(!0),_==="next"?(V(g),L(me),x(0),M(1),F(io(p,0,1))):(b(Rv(me,v.length)),V(me),L(g),x(1),M(Fe),F(io(p,1,Fe))),requestAnimationFrame(()=>{G(!1),requestAnimationFrame(()=>{_==="next"?(x(1),M(ee),F(io(p,1,ee))):(x(0),M(1),F(io(p,0,1)))})}),O.current=setTimeout(()=>{_==="next"&&b(g),h(me),V(null),L(null),R(!1)},te)},[g,p,S.height,S.width,he,I,ie,v,te]),pe=v[g],ce=m!==null?v[m]:null,U=k!==null?v[k]:null,Q=A!==null?v[A]:null,Z=v.length<=1?0:(g-1+v.length)%v.length,ke=v.length<=1?0:(g+1)%v.length,we=he((be=pe==null?void 0:pe.image)==null?void 0:be.url),Ae=he((z=U==null?void 0:U.image)==null?void 0:z.url),ue=he((oe=Q==null?void 0:Q.image)==null?void 0:oe.url),ge={[`--${o}-transition-ms`]:`${te}ms`};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),r.jsxs("div",{ref:ae,className:mt(`${o}-wrapper`,T&&`${o}-snap`,n&&!i&&`${o}-editor`),style:ge,"aria-label":"Zoom gallery",children:[((fe=ce==null?void 0:ce.image)==null?void 0:fe.url)&&r.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:ce.image.url,alt:"",style:{filter:K}})}),I&&((ye=U==null?void 0:U.image)==null?void 0:ye.url)&&r.jsx("div",{className:mt(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${X}`),style:wl(Ae,W,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:U.image.url,alt:"",style:{filter:Y}})}),I&&((Me=Q==null?void 0:Q.image)==null?void 0:Me.url)&&r.jsx("div",{className:mt(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${X}`),style:wl(ue,D,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-image`,src:Q.image.url,alt:""})}),!I&&((Se=pe==null?void 0:pe.image)==null?void 0:Se.url)&&r.jsx("div",{className:mt(`${o}-stage`,`${o}-foreground`),style:Uc(we),children:r.jsx("img",{className:`${o}-image`,src:pe.image.url,alt:pe.image.name??""})}),ie&&v.length>1&&!I&&r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:mt(`${o}-nav`,`${o}-nav-prev`),onClick:()=>We("prev"),"aria-label":`Show previous image (${Z+1} of ${v.length})`}),r.jsx("button",{type:"button",className:mt(`${o}-nav`,`${o}-nav-next`),onClick:()=>We("next"),"aria-label":`Show next image (${ke+1} of ${v.length})`})]})]})]})}const kv=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17148
17161
  import cn from 'classnames';
17149
17162
  import { CommonComponentProps } from '../props';
17150
17163
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -17905,7 +17918,7 @@ a:active .${e}-button .${e}-icon-image,
17905
17918
  height: calc(1em * var(--${e}-icon-scale, 1));
17906
17919
  width: calc(1em * var(--${e}-icon-scale, 1));
17907
17920
  }
17908
- `}function da(e,t,n="",i,o){const s=t();return r.jsxs("span",{className:`${e}-content-roll-wrap ${n}`.trim(),style:i,children:[r.jsx("span",{className:`${e}-content-roll-spacer`,"aria-hidden":"true",style:o,children:s}),r.jsxs("span",{className:`${e}-content-roll-viewport`,children:[r.jsx("span",{className:`${e}-content-roll-layer`,style:o,children:t()}),r.jsx("span",{className:`${e}-content-roll-layer ${e}-content-roll-layer-hover`,"aria-hidden":"true",style:o,children:t()})]})]})}function Sl(e,t,n="fill",i=100,o=0,s){if(!t)return null;const l=r.jsx(an,{url:t,fill:`var(--${e}-icon-color)`,hoverFill:`var(--${e}-icon-color)`,className:`${e}-icon-image`});if(n==="inline")return r.jsx("span",{className:`${e}-icon ${e}-icon-inline`,style:{[`--${e}-icon-scale`]:i/100},"aria-hidden":"true",children:l});if(n==="fixed"&&o>0){const d=C.scalingValue(o,s);return r.jsx("span",{className:`${e}-icon`,style:{width:d,height:d},"aria-hidden":"true",children:l})}return r.jsx("span",{className:`${e}-icon ${e}-icon-fill`,"aria-hidden":"true",children:l})}function Dv({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:s}=C.useScopedStyles(),l=a.useMemo(()=>Ov(s),[s]),{type:d="a",label:c="Button",icon:u,alignment:p="center",alignA:v,order:y="text-icon",gap:g=0,iconSize:h=0,iconWidthC:m=0,dimensions:b=!1,padding:I={top:0,right:0,bottom:0,left:0},cornerRadius:R=0,boxShadow:T={top:0,left:0,right:0,bottom:0},boxShadowColor:G="rgba(0, 0, 0, 0)",innerBoxShadow:k={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:V="rgba(0, 0, 0, 0)",stroke:A=0,blur:L=0,backgroundColor:D="#000000",textColor:x="#ffffff",borderColor:W="#ffffff",iconColor:M="#ffffff",hoverEffect:Y="none",fontFamily:F,fontSettings:X,fontSize:j,lineHeight:B,letterSpacing:ne=0,wordSpacing:S=0,textAppearance:E,stateOverrides:O,minWidth:ae=0,minHeight:ie=0,width:$=0,height:re=0}=e,P=C.buildColorVars(s,{backgroundColor:D,textColor:x,borderColor:W,iconColor:M,boxShadowColor:G,innerBoxShadowColor:V},Wv,_v,O),te=i&&i!=="default"?`${s}-state-${i}`:"",K=t&&!n?`${s}-editing`:"",fe=Y!=="none"&&(!t||n||i==="hover")?`${s}-hover-effect-${Y}`:"",We=Y==="reveal"||Y==="swipe",me=Y==="content-roll",ce=Y==="reveal"&&(!t||n),U=b===!0,Z=d==="a"?v??p:p,ke=d==="c",we=d!=="b",Pe={fontSettings:{fontFamily:F,fontWeight:(X==null?void 0:X.fontWeight)??400,fontStyle:(X==null?void 0:X.fontStyle)??"normal"},fontSize:j??.01,lineHeight:B,letterSpacing:ne,wordSpacing:S,textAppearance:E,color:x},ge={...we?rn(Kt(Pe,t)):{},[`--${s}-box-shadow-x`]:C.scalingValue(T.left,t),[`--${s}-box-shadow-y`]:C.scalingValue(T.top,t),[`--${s}-box-shadow-blur`]:C.scalingValue(T.right,t),[`--${s}-box-shadow-spread`]:C.scalingValue(T.bottom,t),[`--${s}-inner-box-shadow-x`]:C.scalingValue(k.left,t),[`--${s}-inner-box-shadow-y`]:C.scalingValue(k.top,t),[`--${s}-inner-box-shadow-blur`]:C.scalingValue(k.right,t),[`--${s}-inner-box-shadow-spread`]:C.scalingValue(k.bottom,t),[`--${s}-backdrop-blur`]:L>0?`blur(${C.scalingValue(L,t)})`:void 0,paddingTop:C.scalingValue(I.top,t),paddingRight:C.scalingValue(I.right,t),paddingBottom:C.scalingValue(I.bottom,t),paddingLeft:C.scalingValue(I.left,t),borderRadius:C.scalingValue(R,t),borderWidth:C.scalingValue(A,t),...ke?{}:{justifyContent:ca[Z],textAlign:Z},...ke&&!me?{gap:C.scalingValue(g,t)}:{},...U?{width:C.scalingValue($,t),height:C.scalingValue(re,t)}:{minWidth:C.scalingValue(ae,t),minHeight:C.scalingValue(ie,t),...ke?{width:"100%"}:{}}};let be;const z={display:"inline-flex",alignItems:"center",justifyContent:ke?ca[Z]:ca[d==="a"?Z:"center"],gap:ke?C.scalingValue(g,t):void 0,width:"100%",height:"100%",...d==="a"?{textAlign:Z}:{}};if(d==="b"){const ye=()=>Sl(s,u,h>0?"fixed":"fill",100,h,t);be=me?da(s,ye,`${s}-icon-roll`,void 0,z):ye()}else if(d==="c"){const ye=()=>{const Me=r.jsx("span",{className:`${s}-text`,style:{textAlign:Z},children:c}),Le=Sl(s,u,m>0?"fixed":"fill",100,m,t);return y==="icon-text"?r.jsxs(r.Fragment,{children:[Le,Me]}):r.jsxs(r.Fragment,{children:[Me,Le]})};be=me?da(s,ye,`${s}-icon-text-roll`,void 0,z):ye()}else be=me?da(s,()=>c,`${s}-label-roll`,void 0,z):We?r.jsx("span",{className:`${s}-button-inner`,children:c}):c;const se=ce?ye=>Hv(ye,s):void 0,he=ce?ye=>Nv(ye,s):void 0;return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),r.jsx("div",{className:`${s}-root`,style:P,children:r.jsx("div",{className:`${s}-wrapper ${te} ${K}`.trim(),children:r.jsx("div",{className:`${s}-button ${fe}`.trim(),style:ge,onMouseEnter:se,onMouseLeave:he,role:"button",tabIndex:o||t&&!n?void 0:0,children:be})})})]})}const jv=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
17921
+ `}function da(e,t,n="",i,o){const s=t();return r.jsxs("span",{className:`${e}-content-roll-wrap ${n}`.trim(),style:i,children:[r.jsx("span",{className:`${e}-content-roll-spacer`,"aria-hidden":"true",style:o,children:s}),r.jsxs("span",{className:`${e}-content-roll-viewport`,children:[r.jsx("span",{className:`${e}-content-roll-layer`,style:o,children:t()}),r.jsx("span",{className:`${e}-content-roll-layer ${e}-content-roll-layer-hover`,"aria-hidden":"true",style:o,children:t()})]})]})}function Sl(e,t,n="fill",i=100,o=0,s){if(!t)return null;const l=r.jsx(an,{url:t,fill:`var(--${e}-icon-color)`,hoverFill:`var(--${e}-icon-color)`,className:`${e}-icon-image`});if(n==="inline")return r.jsx("span",{className:`${e}-icon ${e}-icon-inline`,style:{[`--${e}-icon-scale`]:i/100},"aria-hidden":"true",children:l});if(n==="fixed"&&o>0){const d=C.scalingValue(o,s);return r.jsx("span",{className:`${e}-icon`,style:{width:d,height:d},"aria-hidden":"true",children:l})}return r.jsx("span",{className:`${e}-icon ${e}-icon-fill`,"aria-hidden":"true",children:l})}function Dv({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:s}=C.useScopedStyles(),l=a.useMemo(()=>Ov(s),[s]),{type:d="a",label:c="Button",icon:u,alignment:p="center",alignA:v,order:y="text-icon",gap:g=0,iconSize:h=0,iconWidthC:m=0,dimensions:b=!1,padding:I={top:0,right:0,bottom:0,left:0},cornerRadius:R=0,boxShadow:T={top:0,left:0,right:0,bottom:0},boxShadowColor:G="rgba(0, 0, 0, 0)",innerBoxShadow:k={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:V="rgba(0, 0, 0, 0)",stroke:A=0,blur:L=0,backgroundColor:D="#000000",textColor:x="#ffffff",borderColor:W="#ffffff",iconColor:M="#ffffff",hoverEffect:Y="none",fontFamily:F,fontSettings:X,fontSize:j,lineHeight:B,letterSpacing:ne=0,wordSpacing:S=0,textAppearance:E,stateOverrides:O,minWidth:ae=0,minHeight:ie=0,width:$=0,height:se=0}=e,P=C.buildColorVars(s,{backgroundColor:D,textColor:x,borderColor:W,iconColor:M,boxShadowColor:G,innerBoxShadowColor:V},Wv,_v,O),te=i&&i!=="default"?`${s}-state-${i}`:"",K=t&&!n?`${s}-editing`:"",he=Y!=="none"&&(!t||n||i==="hover")?`${s}-hover-effect-${Y}`:"",We=Y==="reveal"||Y==="swipe",pe=Y==="content-roll",ce=Y==="reveal"&&(!t||n),U=b===!0,Z=d==="a"?v??p:p,ke=d==="c",we=d!=="b",Ae={fontSettings:{fontFamily:F,fontWeight:(X==null?void 0:X.fontWeight)??400,fontStyle:(X==null?void 0:X.fontStyle)??"normal"},fontSize:j??.01,lineHeight:B,letterSpacing:ne,wordSpacing:S,textAppearance:E,color:x},ge={...we?rn(Kt(Ae,t)):{},[`--${s}-box-shadow-x`]:C.scalingValue(T.left,t),[`--${s}-box-shadow-y`]:C.scalingValue(T.top,t),[`--${s}-box-shadow-blur`]:C.scalingValue(T.right,t),[`--${s}-box-shadow-spread`]:C.scalingValue(T.bottom,t),[`--${s}-inner-box-shadow-x`]:C.scalingValue(k.left,t),[`--${s}-inner-box-shadow-y`]:C.scalingValue(k.top,t),[`--${s}-inner-box-shadow-blur`]:C.scalingValue(k.right,t),[`--${s}-inner-box-shadow-spread`]:C.scalingValue(k.bottom,t),[`--${s}-backdrop-blur`]:L>0?`blur(${C.scalingValue(L,t)})`:void 0,paddingTop:C.scalingValue(I.top,t),paddingRight:C.scalingValue(I.right,t),paddingBottom:C.scalingValue(I.bottom,t),paddingLeft:C.scalingValue(I.left,t),borderRadius:C.scalingValue(R,t),borderWidth:C.scalingValue(A,t),...ke?{}:{justifyContent:ca[Z],textAlign:Z},...ke&&!pe?{gap:C.scalingValue(g,t)}:{},...U?{width:C.scalingValue($,t),height:C.scalingValue(se,t)}:{minWidth:C.scalingValue(ae,t),minHeight:C.scalingValue(ie,t),...ke?{width:"100%"}:{}}};let be;const z={display:"inline-flex",alignItems:"center",justifyContent:ke?ca[Z]:ca[d==="a"?Z:"center"],gap:ke?C.scalingValue(g,t):void 0,width:"100%",height:"100%",...d==="a"?{textAlign:Z}:{}};if(d==="b"){const ye=()=>Sl(s,u,h>0?"fixed":"fill",100,h,t);be=pe?da(s,ye,`${s}-icon-roll`,void 0,z):ye()}else if(d==="c"){const ye=()=>{const Me=r.jsx("span",{className:`${s}-text`,style:{textAlign:Z},children:c}),Se=Sl(s,u,m>0?"fixed":"fill",100,m,t);return y==="icon-text"?r.jsxs(r.Fragment,{children:[Se,Me]}):r.jsxs(r.Fragment,{children:[Me,Se]})};be=pe?da(s,ye,`${s}-icon-text-roll`,void 0,z):ye()}else be=pe?da(s,()=>c,`${s}-label-roll`,void 0,z):We?r.jsx("span",{className:`${s}-button-inner`,children:c}):c;const oe=ce?ye=>Hv(ye,s):void 0,fe=ce?ye=>Nv(ye,s):void 0;return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),r.jsx("div",{className:`${s}-root`,style:P,children:r.jsx("div",{className:`${s}-wrapper ${te} ${K}`.trim(),children:r.jsx("div",{className:`${s}-button ${he}`.trim(),style:ge,onMouseEnter:oe,onMouseLeave:fe,role:"button",tabIndex:o||t&&!n?void 0:0,children:be})})})]})}const jv=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
17909
17922
  import { SvgImage } from '../helpers/SvgImage/SvgImage';
17910
17923
  import { CommonComponentProps } from '../props';
17911
17924
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
@@ -18735,7 +18748,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
18735
18748
  pointer-events: auto;
18736
18749
  flex-shrink: 0;
18737
18750
  }
18738
- `}const Cn=500,oo=650,pn="cubic-bezier(0.22, 1, 0.36, 1)",Uv=72,Xv=50,Kv=1e4,Yv=650,Zv=500;function Jv(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,s=e.top-t.top;return`translate(${o}px, ${s}px) scale(${n}, ${i})`}function Xc(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=gr(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 Qv(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?Xc(i,n):null}function e0(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 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 $l(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return so(e,i,n)}const t0=.03;function Kc(e){return e.width*t0}const ua={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Jo(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Cl(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function n0(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Pa(e,t,n){const i=e.getBoundingClientRect(),o=i.width,s=i.height,l=t/n,d=o/s;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(s-u)/2}}const c=s*l;return{width:c,height:s,left:i.left+(o-c)/2,top:i.top}}function i0(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Pa(e,t.width,t.height)}function o0(e,t){if(Wr(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 r0(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 a0({mediaList:e}){return e.length===0?null:r.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Wr(t)?r.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):r.jsx("img",{src:t.url,alt:""},t.url))})}function Ui(e,t,n){const{width:i,height:o,top:s}=e,{left:l,width:d}=n,c=Kc(n);return t==="left"?{left:l+c-i,top:s,width:i,height:o}:{left:l+d-c,top:s,width:i,height:o}}function vr(e,t,n){const i=Ui(e,t,n);return{...i,left:2*i.left-e.left}}function s0(e,t,n){const{left:i,width:o}=n,s=Kc(n);return t==="left"?{left:i,top:e.top,width:s,height:e.height}:{left:i+o-s,top:e.top,width:s,height:e.height}}function Yc(e,t,n,i){const o=Ui(e,"left",i),s=Ui(e,"right",i),l=vr(e,"left",i),d=vr(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:s,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:s};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:s};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:s,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function l0(e,t,n,i){const{start:o,end:s}=Yc(e,t,n,i);return{x:s.left-o.left,y:s.top-o.top}}function c0(e,t,n){const i=Ui(e,t,n),o=vr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Wr(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function d0({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:s,onTransitionEnd:l}){const d=a.useRef(null);return a.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),r.jsx("div",{style:i,onTransitionEnd:l,children:r.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:s,onClick:c=>c.stopPropagation(),style:o},e)})}function Qo({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Wr(e)?r.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const s=o.currentTarget;s.videoWidth>0&&s.videoHeight>0&&(i==null||i(e.url,s.videoWidth,s.videoHeight))},onTransitionEnd:n}):r.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const s=o.currentTarget;s.naturalWidth>0&&s.naturalHeight>0&&(i==null||i(e.url,s.naturalWidth,s.naturalHeight))},onTransitionEnd:n})}function u0({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:p,layoutId:v,sourceRect:y,resolveCloseSourceRect:g,onClose:h,onPrev:m,onNext:b}){const I=a.useRef(null),R=a.useRef(null),T=a.useRef(null),G=a.useRef(new Map),[k,V]=a.useState(0),A=a.useRef(null),L=a.useRef(0),D=a.useRef(0),x=a.useRef("none"),W=a.useRef(!1),M=a.useRef(!1),Y=a.useRef(!1),F=a.useRef(null),X=a.useRef(null),j=a.useRef(null),B=a.useRef(()=>{}),ne=a.useRef(null),S=a.useRef(null),E=a.useRef(null),O=a.useRef(!1),[ae,ie]=a.useState(null),[$,re]=a.useState(ua),[P,te]=a.useState(0),[K,fe]=a.useState("opening"),[We,me]=a.useState(0),[ce,U]=a.useState(0),[Q,Z]=a.useState(!1),[ke,we]=a.useState(null),[Pe,de]=a.useState(null),[ge,be]=a.useState(null),[z,se]=a.useState(!1),[he,ye]=a.useState(null),[Me,Le]=a.useState(!1),_=a.useRef(!1),[pe,oe]=a.useState(!1),[H,ee]=a.useState(!1),Fe=a.useRef(n),le=a.useRef(void 0),N=t[n],Ue=N?Wr(N):!1,je=ce!==0||Q,gt=!l&&(!s||!!d),rt=c&&!l,ht=u.length>1,lt=a.useCallback((w,xe)=>t.length<=1?null:t[(w+xe+t.length)%t.length]??null,[t]),Ge=ht?so(u,p,-1):lt(n,-1),ve=ht?so(u,p,1):lt(n,1),_e=ke===-1&&je?ht&&Pe!==null?so(u,Pe,-1):ge!==null?lt(ge,-1):null:null,ze=ke===1&&je?ht&&Pe!==null?so(u,Pe,1):ge!==null?lt(ge,1):null:null,Ke=_e&&_e.url!==(Ge==null?void 0:Ge.url)?_e:null,Se=ze&&ze.url!==(ve==null?void 0:ve.url)?ze:null,De=Ge&&rt?(()=>{const w=ht?$l(u,p,-1):t.length>2?lt((n-1+t.length)%t.length,-1):null;return w&&w.url!==Ge.url?w:null})():null,Ve=ve&&rt?(()=>{const w=ht?$l(u,p,1):t.length>2?lt((n+1)%t.length,1):null;return w&&w.url!==ve.url?w:null})():null,et=Ke??De,Ae=Se??Ve,$e=a.useCallback((w,xe,Re)=>{if(!w||!xe||!Re)return;const He=G.current,at=He.get(w);(at==null?void 0:at.width)===xe&&(at==null?void 0:at.height)===Re||(He.set(w,{width:xe,height:Re}),V(Mt=>Mt+1))},[]),tt=a.useCallback(w=>{if(!(w!=null&&w.url))return null;const xe=G.current.get(w.url);return i0(R.current,xe)},[k,P]),Ze=a.useCallback(()=>{if(!N)return;const w=tt(N);if(w){ie(w);return}const xe=R.current;xe&&ie(Cl(xe))},[N,tt]),Ie=a.useCallback(w=>{if(ht){const xe=u.length;de((p+w+xe)%xe),be(null);return}t.length>1&&(be((n+w+t.length)%t.length),de(null))},[ht,u.length,p,t.length,n]),qe=a.useCallback(w=>{Y.current=w,Z(w)},[]),Ee=a.useCallback(()=>{F.current!==null&&(window.clearTimeout(F.current),F.current=null)},[]),Je=a.useCallback(()=>{Ee(),F.current=window.setTimeout(()=>{Ee(),qe(!1)},oo+32)},[Ee,qe]),Qe=a.useCallback(()=>{const w=I.current;if(!w){re({left:0,top:0,width:typeof window<"u"?window.innerWidth:ua.width,height:typeof window<"u"?window.innerHeight:ua.height});return}const xe=w.getBoundingClientRect();re({left:xe.left,top:xe.top,width:xe.width,height:xe.height})},[]),st=a.useCallback((w,xe)=>{if(je){if(pe&&!Q)return`translate(${ce}px, 0px)`;if(Q&&ke!==null){const Re=tt(w);if(!Re)return;const{x:He,y:at}=l0(Re,xe,ke,$);return`translate(${He}px, ${at}px)`}if(Q)return"translate(0px, 0px)"}},[je,pe,Q,ce,ke,$,tt]),St=a.useCallback(()=>{const w=X.current;X.current=null,Ee(),qe(!1),we(null),de(null),be(null),U(0),oe(!1),W.current=!1,D.current=0,x.current="none",w===-1?m():w===1&&b()},[Ee,qe,m,b]),Pt=a.useCallback(()=>{Ee(),F.current=window.setTimeout(()=>{X.current!==null&&St()},oo+32)},[Ee,St]),Nt=a.useCallback(()=>{Ee(),X.current=null,qe(!1),we(null),de(null),be(null),U(0),oe(!1),W.current=!1,D.current=0,x.current="none"},[Ee,qe]),dt=a.useCallback(w=>{if(!(!rt||!ae)){if(Y.current){if(X.current===w){j.current=w,St();return}Nt()}Ee(),Ie(w),X.current=w,we(w),qe(!0),Pt()}},[rt,ae,St,Nt,Ee,Ie,qe,Pt]);B.current=dt;const yt=a.useCallback(()=>{ne.current=null,O.current=!1,S.current!==null&&(window.clearInterval(S.current),S.current=null),E.current!==null&&(window.clearTimeout(E.current),E.current=null)},[]),Ot=a.useCallback(w=>{S.current!==null&&window.clearInterval(S.current);const xe=O.current?Zv:Yv;S.current=window.setInterval(()=>{B.current(w)},xe)},[]),Ft=a.useCallback(w=>{ne.current!==w&&(yt(),ne.current=w,O.current=!1,B.current(w),Ot(w),E.current=window.setTimeout(()=>{E.current=null,ne.current===w&&(O.current=!0,Ot(w))},Kv))},[yt,Ot]),bt=a.useCallback(()=>{const w=R.current;if(!w)return;const xe=N==null?void 0:N.url,Re=xe?G.current.get(xe):void 0;if(Re!=null&&Re.width&&(Re!=null&&Re.height)){ie(Pa(w,Re.width,Re.height));return}const He=T.current;if(He&&xe&&(He.src===xe||He.currentSrc===xe)){const{width:Mt,height:it}=n0(He);if(Mt&&it){$e(xe,Mt,it),ie(Pa(w,Mt,it));return}}const at=Cl(w);!at.width||!at.height||ie(at)},[N==null?void 0:N.url,$e]),Wt=a.useCallback(w=>{if(T.current=w,!!w){if(w instanceof HTMLVideoElement){w.readyState>=1&&w.videoWidth>0&&bt();return}w.complete&&w.naturalWidth>0&&bt()}},[bt]),Gt=a.useCallback(()=>{Qe(),bt(),te(w=>w+1)},[Qe,bt]);a.useEffect(()=>{Gt();const w=R.current,xe=I.current,Re=new ResizeObserver(()=>Gt());return w&&Re.observe(w),xe&&Re.observe(xe),window.addEventListener("resize",Gt),()=>{Re.disconnect(),window.removeEventListener("resize",Gt)}},[Gt,n,v]),a.useLayoutEffect(()=>{if(!N)return;const w=T.current;if(w){if(w instanceof HTMLImageElement&&w.complete&&w.naturalWidth>0){bt();return}w instanceof HTMLVideoElement&&w.readyState>=1&&w.videoWidth>0&&bt()}},[N==null?void 0:N.url,n,bt]),a.useEffect(()=>{Ze()},[Ze,k]),a.useEffect(()=>{const w=new Set,xe=[],Re=He=>{!(He!=null&&He.url)||w.has(He.url)||(w.add(He.url),xe.push(He))};t.forEach(Re),u.forEach(He=>He.items.forEach(Re)),xe.forEach(He=>{G.current.has(He.url)||o0(He,$e)})},[t,u,$e]),a.useEffect(()=>{if(K!=="opening"||!ae)return;if(!y){fe("open");return}se(!1);const w=requestAnimationFrame(()=>{requestAnimationFrame(()=>{se(!0),fe("open")})});return()=>cancelAnimationFrame(w)},[K,ae,y]),a.useEffect(()=>{if(K!=="closing")return;const w=setTimeout(()=>h(),Cn);return()=>clearTimeout(w)},[K,h]),a.useEffect(()=>()=>{Ee()},[Ee]),a.useLayoutEffect(()=>{Fe.current===n&&le.current===(N==null?void 0:N.url)||(Ee(),X.current=null,we(null),de(null),be(null),me(0),U(0),qe(!1),ee(!1),oe(!1),L.current=0,D.current=0,x.current="none",W.current=!1,A.current=null,M.current=!1,T.current=null,Ze(),Fe.current=n,le.current=N==null?void 0:N.url)},[n,N==null?void 0:N.url,qe,Ee,Ze]),a.useLayoutEffect(()=>{const w=j.current;w!==null&&(j.current=null,requestAnimationFrame(()=>{B.current(w)}))},[n,p,N==null?void 0:N.url]),a.useLayoutEffect(()=>{if(K==="opening"){_.current=!1,Le(!1);return}if(K!=="open"||_.current)return;if(!Ge&&!ve){_.current=!0;return}Le(!1);const w=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Le(!0),_.current=!0})});return()=>cancelAnimationFrame(w)},[K,Ge==null?void 0:Ge.url,ve==null?void 0:ve.url]),a.useEffect(()=>{if(K!=="open")return;const w=()=>{const it=xt=>{xt.stopPropagation(),xt.preventDefault(),document.removeEventListener("click",it,!0)};document.addEventListener("click",it,!0)},xe=it=>{const xt=it<0?1:-1;Ee(),Ie(xt),X.current=xt,we(xt),qe(!0),Pt()},Re=it=>{if(Math.abs(it)>Xv&&rt){xe(it);return}X.current=null,we(null),de(null),be(null),qe(!0),U(0),Je()},He=it=>{if(it.touches.length!==1||Y.current)return;const xt=it.touches[0];M.current=!0,A.current={x:xt.clientX,y:xt.clientY},x.current="none",D.current=0,W.current=!1},at=it=>{if(!A.current||it.touches.length!==1||Y.current)return;const xt=it.touches[0],zt=xt.clientX-A.current.x,Lt=xt.clientY-A.current.y;if(x.current==="none"){if(Math.abs(zt)<10&&Math.abs(Lt)<10)return;if(Math.abs(zt)>Math.abs(Lt)){if(!rt)return;x.current="horizontal"}else if(Lt>0){if(!gt)return;x.current="vertical"}else return}if(x.current==="horizontal"){W.current=!0,oe(!0),D.current=zt,U(zt),it.preventDefault();return}x.current==="vertical"&&(W.current=!0,oe(!0),L.current=Lt,me(Lt),it.preventDefault())},Mt=()=>{if(!A.current)return;const it=x.current,xt=W.current;if(xt&&it==="horizontal")Re(D.current),w();else if(xt&&it==="vertical"){const zt=L.current;if(gt&&zt>Uv){const Lt=window.innerHeight;L.current=Lt,ee(!0),me(Lt),fe("closing")}else L.current=0,me(0);w()}else it==="horizontal"&&Math.abs(D.current)>0&&(Re(D.current),w());A.current=null,x.current="none",D.current=0,W.current=!1,oe(!1)};return document.addEventListener("touchstart",He,{passive:!0}),document.addEventListener("touchmove",at,{passive:!1}),document.addEventListener("touchend",Mt),document.addEventListener("touchcancel",Mt),()=>{document.removeEventListener("touchstart",He),document.removeEventListener("touchmove",at),document.removeEventListener("touchend",Mt),document.removeEventListener("touchcancel",Mt)}},[K,rt,qe,Je,Ee,gt,Pt,Ie]);const Zt=a.useCallback(()=>{const w=(g==null?void 0:g())??y??null;w&&ae&&(ye(w),se(!0)),fe("closing")},[g,y,ae]);a.useEffect(()=>{const w=He=>{if(He.key==="Escape"){if(s&&d||K==="closing")return;yt(),Zt();return}if(He.key!=="ArrowLeft"&&He.key!=="ArrowRight"||K!=="open"||!rt)return;He.preventDefault();const at=He.key==="ArrowLeft"?-1:1;He.repeat&&ne.current===at||Ft(at)},xe=He=>{if(He.key!=="ArrowLeft"&&He.key!=="ArrowRight")return;const at=He.key==="ArrowLeft"?-1:1;ne.current===at&&yt()},Re=()=>{yt()};return window.addEventListener("keydown",w),window.addEventListener("keyup",xe),window.addEventListener("blur",Re),()=>{window.removeEventListener("keydown",w),window.removeEventListener("keyup",xe),window.removeEventListener("blur",Re),yt()}},[K,s,d,Zt,rt,Ft,yt]),a.useEffect(()=>{K!=="open"&&yt()},[K,yt]);const en=()=>{K==="closing"||l||Zt()},Tt=K==="open",_t=K==="closing",nn=We>0?Math.max(0,1-We/500):1,ct=We>0?Math.max(.35,1-We/500):1,Te=a.useCallback(w=>{if(!(w.propertyName!=="transform"||!Y.current)){if(X.current!==null){St();return}Ee(),qe(!1)}},[Ee,qe,St]),Ne=K==="closing"?he??y:y,nt=Ne&&ae&&(K==="opening"||_t)?Jv(Ne,ae):void 0,pt=je&&N?st(N,"center"):We>0?`translateY(${We}px)`:nt,vt=ae?Jo(ae,$):null,It=!!(Ne&&ae),ft=It&&(K==="closing"||K==="open"&&z),Bt={position:"absolute",top:vt==null?void 0:vt.top,left:vt==null?void 0:vt.left,width:vt==null?void 0:vt.width,height:vt==null?void 0:vt.height,objectFit:"contain",transformOrigin:"top left",transform:pt,opacity:We>0?ct:It?1:K==="opening"||_t?0:1,transition:pe&&!Q?"none":Q?`transform ${oo}ms ${pn}`:H?`transform ${Cn}ms ${pn}, opacity ${Cn}ms ${pn}`:ft?`transform ${Cn}ms ${pn}`:K==="opening"||_t?`opacity ${Cn}ms ${pn}`:"none",pointerEvents:Ue&&Tt&&!je?"auto":"none",touchAction:Ue&&Tt?"none":void 0,zIndex:1,overflow:Ue?"hidden":void 0},At={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Tt&&!je?"auto":"none"},kt=(w,xe,Re="adjacent")=>{const He=tt(w);if(!He)return{display:"none"};const at=Re==="far"?xe==="left"?"far-left":"far-right":xe==="left"?"left-adjacent":"right-adjacent",{start:Mt}=ke!==null?Yc(He,at,ke,$):{start:Re==="far"?vr(He,xe,$):Ui(He,xe,$)},it=Jo(Mt,$),xt=st(w,at),zt=!je&&Re==="adjacent"&&Tt&&!Me?c0(He,xe,$):null,Lt=Re==="far"&&je&&ke===(xe==="left"?-1:1),on=pe&&!Q?!1:Q,dn=Re==="adjacent"&&Tt&&Me&&!je;return{position:"absolute",top:it.top,left:it.left,width:it.width,height:it.height,objectFit:"contain",transform:xt??(zt?`translate(${zt.x}px, ${zt.y}px)`:void 0),opacity:Re==="far"?Tt&&Lt?1:0:Tt?1:0,transition:on?Re==="far"?`transform ${oo}ms ${pn}`:`transform ${oo}ms ${pn}, opacity ${Cn}ms ${pn}`:dn?`transform ${Cn}ms ${pn}`:K==="opening"||_t?`opacity ${Cn}ms ${pn}`:"none",pointerEvents:"none",zIndex:1}},qt=(w,xe)=>{const Re=tt(w);return Re?s0(Ui(Re,xe,$),xe,$):null},Ut=w=>xe=>{if(!l){if(M.current){M.current=!1;return}xe.stopPropagation(),dt(w)}},Dt=Ge?qt(Ge,"left"):null,jt=ve?qt(ve,"right"):null,Ht=Dt?Jo(Dt,$):null,$t=jt?Jo(jt,$):null;return r.jsxs("div",{ref:I,className:[`${e}-lightbox`,s?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:K==="open"?"none":void 0},onClick:en,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Tt?nn:0,transition:pe?"none":`opacity ${Cn}ms ${pn}`,pointerEvents:"none"}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[r.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:R,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:Tt?1:0,transition:pe?"none":`opacity ${Cn}ms ${pn}`,pointerEvents:"none"},children:r.jsx(Mc,{prefix:e,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,onClose:en})})]}),Tt&&et&&r.jsx(Qo,{media:et,style:kt(et,"left","far"),onMeasure:$e,onTransitionEnd:Te},`far-prev-${et.url}`),Tt&&Ge&&r.jsxs(r.Fragment,{children:[r.jsx(Qo,{media:Ge,style:kt(Ge,"left"),onMeasure:$e,onTransitionEnd:Te},`prev-${Ge.url}`),Ht&&r.jsx("div",{style:{position:"absolute",top:Ht.top,left:Ht.left,width:Ht.width,height:Ht.height,cursor:l||pe?"default":"pointer",pointerEvents:l||pe?"none":"auto",zIndex:3},onClick:Ut(-1)})]}),Tt&&ve&&r.jsxs(r.Fragment,{children:[r.jsx(Qo,{media:ve,style:kt(ve,"right"),onMeasure:$e,onTransitionEnd:Te},`next-${ve.url}`),$t&&r.jsx("div",{style:{position:"absolute",top:$t.top,left:$t.left,width:$t.width,height:$t.height,cursor:l||pe?"default":"pointer",pointerEvents:l||pe?"none":"auto",zIndex:3},onClick:Ut(1)})]}),Tt&&Ae&&r.jsx(Qo,{media:Ae,style:kt(Ae,"right","far"),onMeasure:$e,onTransitionEnd:Te},`far-next-${Ae.url}`),ae&&N&&(Ue?r.jsx(d0,{src:N.url,phase:K,onMediaElement:Wt,wrapperStyle:Bt,videoStyle:At,onLoadedMetadata:bt,onTransitionEnd:Te},`${n}-${N.url}`):r.jsx("img",{ref:Wt,src:N.url,alt:N.name,onLoad:bt,onTransitionEnd:Te,style:Bt},`${n}-${N.url}`))]})}const p0=20,m0=.18;function g0(e){return`
18751
+ `}const Cn=500,oo=650,pn="cubic-bezier(0.22, 1, 0.36, 1)",Uv=72,Xv=50,Kv=1e4,Yv=650,Zv=500;function Jv(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,s=e.top-t.top;return`translate(${o}px, ${s}px) scale(${n}, ${i})`}function Xc(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=gr(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 Qv(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?Xc(i,n):null}function e0(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 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 $l(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return so(e,i,n)}const t0=.03;function Kc(e){return e.width*t0}const ua={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Jo(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Cl(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function n0(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Pa(e,t,n){const i=e.getBoundingClientRect(),o=i.width,s=i.height,l=t/n,d=o/s;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(s-u)/2}}const c=s*l;return{width:c,height:s,left:i.left+(o-c)/2,top:i.top}}function i0(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Pa(e,t.width,t.height)}function o0(e,t){if(Wr(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 r0(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 a0({mediaList:e}){return e.length===0?null:r.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Wr(t)?r.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):r.jsx("img",{src:t.url,alt:""},t.url))})}function Ui(e,t,n){const{width:i,height:o,top:s}=e,{left:l,width:d}=n,c=Kc(n);return t==="left"?{left:l+c-i,top:s,width:i,height:o}:{left:l+d-c,top:s,width:i,height:o}}function vr(e,t,n){const i=Ui(e,t,n);return{...i,left:2*i.left-e.left}}function s0(e,t,n){const{left:i,width:o}=n,s=Kc(n);return t==="left"?{left:i,top:e.top,width:s,height:e.height}:{left:i+o-s,top:e.top,width:s,height:e.height}}function Yc(e,t,n,i){const o=Ui(e,"left",i),s=Ui(e,"right",i),l=vr(e,"left",i),d=vr(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:s,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:s};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:s};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:s,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function l0(e,t,n,i){const{start:o,end:s}=Yc(e,t,n,i);return{x:s.left-o.left,y:s.top-o.top}}function c0(e,t,n){const i=Ui(e,t,n),o=vr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Wr(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function d0({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:s,onTransitionEnd:l}){const d=a.useRef(null);return a.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),r.jsx("div",{style:i,onTransitionEnd:l,children:r.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:s,onClick:c=>c.stopPropagation(),style:o},e)})}function Qo({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Wr(e)?r.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const s=o.currentTarget;s.videoWidth>0&&s.videoHeight>0&&(i==null||i(e.url,s.videoWidth,s.videoHeight))},onTransitionEnd:n}):r.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const s=o.currentTarget;s.naturalWidth>0&&s.naturalHeight>0&&(i==null||i(e.url,s.naturalWidth,s.naturalHeight))},onTransitionEnd:n})}function u0({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:p,layoutId:v,sourceRect:y,resolveCloseSourceRect:g,onClose:h,onPrev:m,onNext:b}){const I=a.useRef(null),R=a.useRef(null),T=a.useRef(null),G=a.useRef(new Map),[k,V]=a.useState(0),A=a.useRef(null),L=a.useRef(0),D=a.useRef(0),x=a.useRef("none"),W=a.useRef(!1),M=a.useRef(!1),Y=a.useRef(!1),F=a.useRef(null),X=a.useRef(null),j=a.useRef(null),B=a.useRef(()=>{}),ne=a.useRef(null),S=a.useRef(null),E=a.useRef(null),O=a.useRef(!1),[ae,ie]=a.useState(null),[$,se]=a.useState(ua),[P,te]=a.useState(0),[K,he]=a.useState("opening"),[We,pe]=a.useState(0),[ce,U]=a.useState(0),[Q,Z]=a.useState(!1),[ke,we]=a.useState(null),[Ae,ue]=a.useState(null),[ge,be]=a.useState(null),[z,oe]=a.useState(!1),[fe,ye]=a.useState(null),[Me,Se]=a.useState(!1),_=a.useRef(!1),[me,re]=a.useState(!1),[H,ee]=a.useState(!1),Fe=a.useRef(n),le=a.useRef(void 0),N=t[n],Xe=N?Wr(N):!1,je=ce!==0||Q,ut=!l&&(!s||!!d),tt=c&&!l,ft=u.length>1,st=a.useCallback((w,xe)=>t.length<=1?null:t[(w+xe+t.length)%t.length]??null,[t]),Ue=ft?so(u,p,-1):st(n,-1),ve=ft?so(u,p,1):st(n,1),_e=ke===-1&&je?ft&&Ae!==null?so(u,Ae,-1):ge!==null?st(ge,-1):null:null,ze=ke===1&&je?ft&&Ae!==null?so(u,Ae,1):ge!==null?st(ge,1):null:null,Ye=_e&&_e.url!==(Ue==null?void 0:Ue.url)?_e:null,Ce=ze&&ze.url!==(ve==null?void 0:ve.url)?ze:null,Oe=Ue&&tt?(()=>{const w=ft?$l(u,p,-1):t.length>2?st((n-1+t.length)%t.length,-1):null;return w&&w.url!==Ue.url?w:null})():null,Ve=ve&&tt?(()=>{const w=ft?$l(u,p,1):t.length>2?st((n+1)%t.length,1):null;return w&&w.url!==ve.url?w:null})():null,Re=Ye??Oe,Ie=Ce??Ve,qe=a.useCallback((w,xe,Le)=>{if(!w||!xe||!Le)return;const He=G.current,at=He.get(w);(at==null?void 0:at.width)===xe&&(at==null?void 0:at.height)===Le||(He.set(w,{width:xe,height:Le}),V(Mt=>Mt+1))},[]),lt=a.useCallback(w=>{if(!(w!=null&&w.url))return null;const xe=G.current.get(w.url);return i0(R.current,xe)},[k,P]),Ze=a.useCallback(()=>{if(!N)return;const w=lt(N);if(w){ie(w);return}const xe=R.current;xe&&ie(Cl(xe))},[N,lt]),Ee=a.useCallback(w=>{if(ft){const xe=u.length;ue((p+w+xe)%xe),be(null);return}t.length>1&&(be((n+w+t.length)%t.length),ue(null))},[ft,u.length,p,t.length,n]),Ge=a.useCallback(w=>{Y.current=w,Z(w)},[]),Pe=a.useCallback(()=>{F.current!==null&&(window.clearTimeout(F.current),F.current=null)},[]),Je=a.useCallback(()=>{Pe(),F.current=window.setTimeout(()=>{Pe(),Ge(!1)},oo+32)},[Pe,Ge]),nt=a.useCallback(()=>{const w=I.current;if(!w){se({left:0,top:0,width:typeof window<"u"?window.innerWidth:ua.width,height:typeof window<"u"?window.innerHeight:ua.height});return}const xe=w.getBoundingClientRect();se({left:xe.left,top:xe.top,width:xe.width,height:xe.height})},[]),et=a.useCallback((w,xe)=>{if(je){if(me&&!Q)return`translate(${ce}px, 0px)`;if(Q&&ke!==null){const Le=lt(w);if(!Le)return;const{x:He,y:at}=l0(Le,xe,ke,$);return`translate(${He}px, ${at}px)`}if(Q)return"translate(0px, 0px)"}},[je,me,Q,ce,ke,$,lt]),St=a.useCallback(()=>{const w=X.current;X.current=null,Pe(),Ge(!1),we(null),ue(null),be(null),U(0),re(!1),W.current=!1,D.current=0,x.current="none",w===-1?m():w===1&&b()},[Pe,Ge,m,b]),Wt=a.useCallback(()=>{Pe(),F.current=window.setTimeout(()=>{X.current!==null&&St()},oo+32)},[Pe,St]),At=a.useCallback(()=>{Pe(),X.current=null,Ge(!1),we(null),ue(null),be(null),U(0),re(!1),W.current=!1,D.current=0,x.current="none"},[Pe,Ge]),gt=a.useCallback(w=>{if(!(!tt||!ae)){if(Y.current){if(X.current===w){j.current=w,St();return}At()}Pe(),Ee(w),X.current=w,we(w),Ge(!0),Wt()}},[tt,ae,St,At,Pe,Ee,Ge,Wt]);B.current=gt;const xt=a.useCallback(()=>{ne.current=null,O.current=!1,S.current!==null&&(window.clearInterval(S.current),S.current=null),E.current!==null&&(window.clearTimeout(E.current),E.current=null)},[]),zt=a.useCallback(w=>{S.current!==null&&window.clearInterval(S.current);const xe=O.current?Zv:Yv;S.current=window.setInterval(()=>{B.current(w)},xe)},[]),Ft=a.useCallback(w=>{ne.current!==w&&(xt(),ne.current=w,O.current=!1,B.current(w),zt(w),E.current=window.setTimeout(()=>{E.current=null,ne.current===w&&(O.current=!0,zt(w))},Kv))},[xt,zt]),bt=a.useCallback(()=>{const w=R.current;if(!w)return;const xe=N==null?void 0:N.url,Le=xe?G.current.get(xe):void 0;if(Le!=null&&Le.width&&(Le!=null&&Le.height)){ie(Pa(w,Le.width,Le.height));return}const He=T.current;if(He&&xe&&(He.src===xe||He.currentSrc===xe)){const{width:Mt,height:ot}=n0(He);if(Mt&&ot){qe(xe,Mt,ot),ie(Pa(w,Mt,ot));return}}const at=Cl(w);!at.width||!at.height||ie(at)},[N==null?void 0:N.url,qe]),_t=a.useCallback(w=>{if(T.current=w,!!w){if(w instanceof HTMLVideoElement){w.readyState>=1&&w.videoWidth>0&&bt();return}w.complete&&w.naturalWidth>0&&bt()}},[bt]),Gt=a.useCallback(()=>{nt(),bt(),te(w=>w+1)},[nt,bt]);a.useEffect(()=>{Gt();const w=R.current,xe=I.current,Le=new ResizeObserver(()=>Gt());return w&&Le.observe(w),xe&&Le.observe(xe),window.addEventListener("resize",Gt),()=>{Le.disconnect(),window.removeEventListener("resize",Gt)}},[Gt,n,v]),a.useLayoutEffect(()=>{if(!N)return;const w=T.current;if(w){if(w instanceof HTMLImageElement&&w.complete&&w.naturalWidth>0){bt();return}w instanceof HTMLVideoElement&&w.readyState>=1&&w.videoWidth>0&&bt()}},[N==null?void 0:N.url,n,bt]),a.useEffect(()=>{Ze()},[Ze,k]),a.useEffect(()=>{const w=new Set,xe=[],Le=He=>{!(He!=null&&He.url)||w.has(He.url)||(w.add(He.url),xe.push(He))};t.forEach(Le),u.forEach(He=>He.items.forEach(Le)),xe.forEach(He=>{G.current.has(He.url)||o0(He,qe)})},[t,u,qe]),a.useEffect(()=>{if(K!=="opening"||!ae)return;if(!y){he("open");return}oe(!1);const w=requestAnimationFrame(()=>{requestAnimationFrame(()=>{oe(!0),he("open")})});return()=>cancelAnimationFrame(w)},[K,ae,y]),a.useEffect(()=>{if(K!=="closing")return;const w=setTimeout(()=>h(),Cn);return()=>clearTimeout(w)},[K,h]),a.useEffect(()=>()=>{Pe()},[Pe]),a.useLayoutEffect(()=>{Fe.current===n&&le.current===(N==null?void 0:N.url)||(Pe(),X.current=null,we(null),ue(null),be(null),pe(0),U(0),Ge(!1),ee(!1),re(!1),L.current=0,D.current=0,x.current="none",W.current=!1,A.current=null,M.current=!1,T.current=null,Ze(),Fe.current=n,le.current=N==null?void 0:N.url)},[n,N==null?void 0:N.url,Ge,Pe,Ze]),a.useLayoutEffect(()=>{const w=j.current;w!==null&&(j.current=null,requestAnimationFrame(()=>{B.current(w)}))},[n,p,N==null?void 0:N.url]),a.useLayoutEffect(()=>{if(K==="opening"){_.current=!1,Se(!1);return}if(K!=="open"||_.current)return;if(!Ue&&!ve){_.current=!0;return}Se(!1);const w=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Se(!0),_.current=!0})});return()=>cancelAnimationFrame(w)},[K,Ue==null?void 0:Ue.url,ve==null?void 0:ve.url]),a.useEffect(()=>{if(K!=="open")return;const w=()=>{const ot=vt=>{vt.stopPropagation(),vt.preventDefault(),document.removeEventListener("click",ot,!0)};document.addEventListener("click",ot,!0)},xe=ot=>{const vt=ot<0?1:-1;Pe(),Ee(vt),X.current=vt,we(vt),Ge(!0),Wt()},Le=ot=>{if(Math.abs(ot)>Xv&&tt){xe(ot);return}X.current=null,we(null),ue(null),be(null),Ge(!0),U(0),Je()},He=ot=>{if(ot.touches.length!==1||Y.current)return;const vt=ot.touches[0];M.current=!0,A.current={x:vt.clientX,y:vt.clientY},x.current="none",D.current=0,W.current=!1},at=ot=>{if(!A.current||ot.touches.length!==1||Y.current)return;const vt=ot.touches[0],jt=vt.clientX-A.current.x,Lt=vt.clientY-A.current.y;if(x.current==="none"){if(Math.abs(jt)<10&&Math.abs(Lt)<10)return;if(Math.abs(jt)>Math.abs(Lt)){if(!tt)return;x.current="horizontal"}else if(Lt>0){if(!ut)return;x.current="vertical"}else return}if(x.current==="horizontal"){W.current=!0,re(!0),D.current=jt,U(jt),ot.preventDefault();return}x.current==="vertical"&&(W.current=!0,re(!0),L.current=Lt,pe(Lt),ot.preventDefault())},Mt=()=>{if(!A.current)return;const ot=x.current,vt=W.current;if(vt&&ot==="horizontal")Le(D.current),w();else if(vt&&ot==="vertical"){const jt=L.current;if(ut&&jt>Uv){const Lt=window.innerHeight;L.current=Lt,ee(!0),pe(Lt),he("closing")}else L.current=0,pe(0);w()}else ot==="horizontal"&&Math.abs(D.current)>0&&(Le(D.current),w());A.current=null,x.current="none",D.current=0,W.current=!1,re(!1)};return document.addEventListener("touchstart",He,{passive:!0}),document.addEventListener("touchmove",at,{passive:!1}),document.addEventListener("touchend",Mt),document.addEventListener("touchcancel",Mt),()=>{document.removeEventListener("touchstart",He),document.removeEventListener("touchmove",at),document.removeEventListener("touchend",Mt),document.removeEventListener("touchcancel",Mt)}},[K,tt,Ge,Je,Pe,ut,Wt,Ee]);const Zt=a.useCallback(()=>{const w=(g==null?void 0:g())??y??null;w&&ae&&(ye(w),oe(!0)),he("closing")},[g,y,ae]);a.useEffect(()=>{const w=He=>{if(He.key==="Escape"){if(s&&d||K==="closing")return;xt(),Zt();return}if(He.key!=="ArrowLeft"&&He.key!=="ArrowRight"||K!=="open"||!tt)return;He.preventDefault();const at=He.key==="ArrowLeft"?-1:1;He.repeat&&ne.current===at||Ft(at)},xe=He=>{if(He.key!=="ArrowLeft"&&He.key!=="ArrowRight")return;const at=He.key==="ArrowLeft"?-1:1;ne.current===at&&xt()},Le=()=>{xt()};return window.addEventListener("keydown",w),window.addEventListener("keyup",xe),window.addEventListener("blur",Le),()=>{window.removeEventListener("keydown",w),window.removeEventListener("keyup",xe),window.removeEventListener("blur",Le),xt()}},[K,s,d,Zt,tt,Ft,xt]),a.useEffect(()=>{K!=="open"&&xt()},[K,xt]);const en=()=>{K==="closing"||l||Zt()},$t=K==="open",Ht=K==="closing",nn=We>0?Math.max(0,1-We/500):1,ct=We>0?Math.max(.35,1-We/500):1,Te=a.useCallback(w=>{if(!(w.propertyName!=="transform"||!Y.current)){if(X.current!==null){St();return}Pe(),Ge(!1)}},[Pe,Ge,St]),Ne=K==="closing"?fe??y:y,it=Ne&&ae&&(K==="opening"||Ht)?Jv(Ne,ae):void 0,pt=je&&N?et(N,"center"):We>0?`translateY(${We}px)`:it,yt=ae?Jo(ae,$):null,It=!!(Ne&&ae),ht=It&&(K==="closing"||K==="open"&&z),Bt={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:pt,opacity:We>0?ct:It?1:K==="opening"||Ht?0:1,transition:me&&!Q?"none":Q?`transform ${oo}ms ${pn}`:H?`transform ${Cn}ms ${pn}, opacity ${Cn}ms ${pn}`:ht?`transform ${Cn}ms ${pn}`:K==="opening"||Ht?`opacity ${Cn}ms ${pn}`:"none",pointerEvents:Xe&&$t&&!je?"auto":"none",touchAction:Xe&&$t?"none":void 0,zIndex:1,overflow:Xe?"hidden":void 0},kt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:$t&&!je?"auto":"none"},Pt=(w,xe,Le="adjacent")=>{const He=lt(w);if(!He)return{display:"none"};const at=Le==="far"?xe==="left"?"far-left":"far-right":xe==="left"?"left-adjacent":"right-adjacent",{start:Mt}=ke!==null?Yc(He,at,ke,$):{start:Le==="far"?vr(He,xe,$):Ui(He,xe,$)},ot=Jo(Mt,$),vt=et(w,at),jt=!je&&Le==="adjacent"&&$t&&!Me?c0(He,xe,$):null,Lt=Le==="far"&&je&&ke===(xe==="left"?-1:1),on=me&&!Q?!1:Q,dn=Le==="adjacent"&&$t&&Me&&!je;return{position:"absolute",top:ot.top,left:ot.left,width:ot.width,height:ot.height,objectFit:"contain",transform:vt??(jt?`translate(${jt.x}px, ${jt.y}px)`:void 0),opacity:Le==="far"?$t&&Lt?1:0:$t?1:0,transition:on?Le==="far"?`transform ${oo}ms ${pn}`:`transform ${oo}ms ${pn}, opacity ${Cn}ms ${pn}`:dn?`transform ${Cn}ms ${pn}`:K==="opening"||Ht?`opacity ${Cn}ms ${pn}`:"none",pointerEvents:"none",zIndex:1}},qt=(w,xe)=>{const Le=lt(w);return Le?s0(Ui(Le,xe,$),xe,$):null},Ut=w=>xe=>{if(!l){if(M.current){M.current=!1;return}xe.stopPropagation(),gt(w)}},Ot=Ue?qt(Ue,"left"):null,Dt=ve?qt(ve,"right"):null,Nt=Ot?Jo(Ot,$):null,Ct=Dt?Jo(Dt,$):null;return r.jsxs("div",{ref:I,className:[`${e}-lightbox`,s?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:K==="open"?"none":void 0},onClick:en,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:$t?nn:0,transition:me?"none":`opacity ${Cn}ms ${pn}`,pointerEvents:"none"}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[r.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:R,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:$t?1:0,transition:me?"none":`opacity ${Cn}ms ${pn}`,pointerEvents:"none"},children:r.jsx(Mc,{prefix:e,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,onClose:en})})]}),$t&&Re&&r.jsx(Qo,{media:Re,style:Pt(Re,"left","far"),onMeasure:qe,onTransitionEnd:Te},`far-prev-${Re.url}`),$t&&Ue&&r.jsxs(r.Fragment,{children:[r.jsx(Qo,{media:Ue,style:Pt(Ue,"left"),onMeasure:qe,onTransitionEnd:Te},`prev-${Ue.url}`),Nt&&r.jsx("div",{style:{position:"absolute",top:Nt.top,left:Nt.left,width:Nt.width,height:Nt.height,cursor:l||me?"default":"pointer",pointerEvents:l||me?"none":"auto",zIndex:3},onClick:Ut(-1)})]}),$t&&ve&&r.jsxs(r.Fragment,{children:[r.jsx(Qo,{media:ve,style:Pt(ve,"right"),onMeasure:qe,onTransitionEnd:Te},`next-${ve.url}`),Ct&&r.jsx("div",{style:{position:"absolute",top:Ct.top,left:Ct.left,width:Ct.width,height:Ct.height,cursor:l||me?"default":"pointer",pointerEvents:l||me?"none":"auto",zIndex:3},onClick:Ut(1)})]}),$t&&Ie&&r.jsx(Qo,{media:Ie,style:Pt(Ie,"right","far"),onMeasure:qe,onTransitionEnd:Te},`far-next-${Ie.url}`),ae&&N&&(Xe?r.jsx(d0,{src:N.url,phase:K,onMediaElement:_t,wrapperStyle:Bt,videoStyle:kt,onLoadedMetadata:bt,onTransitionEnd:Te},`${n}-${N.url}`):r.jsx("img",{ref:_t,src:N.url,alt:N.name,onLoad:bt,onTransitionEnd:Te,style:Bt},`${n}-${N.url}`))]})}const p0=20,m0=.18;function g0(e){return`
18739
18752
  .${e}-wrapper {
18740
18753
  box-sizing: border-box;
18741
18754
  max-width: 100%;
@@ -18823,7 +18836,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
18823
18836
  pointer-events: auto;
18824
18837
  }
18825
18838
  ${qv(e)}
18826
- `}function h0(e){const{imageDisplay:t}=e??{},n=(t==null?void 0:t.ratioValue)??"1:1",i=(t==null?void 0:t.reversed)??!1,[o,s]=n.split(":").map(Number),l=i?s:o,d=i?o:s;return d>0?l/d:1}function f0(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 y0(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:C.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:C.scalingValue(i*m0,n??!1),[`--${t}-image-aspect`]:h0(e)}}function v0(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 Kt(n,t)}function x0(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 b0(e,t,n,i,o,s){if(!(!e||!t))return l=>{var c;const d=((c=l.currentTarget.closest(`.${i}-item`))==null?void 0:c.querySelector(`[data-waterfall-index="${n}"]`))??(l.currentTarget instanceof HTMLImageElement||l.currentTarget instanceof HTMLVideoElement?l.currentTarget:null);s(n,d?Xc(d,o):void 0)}}function w0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:s,portalId:l}){const{prefix:d}=C.useScopedStyles(),c=a.useMemo(()=>g0(d),[d]),u=t??[],p=(e==null?void 0:e.type)??"a",v=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,y=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,g=C.scalingValue(y,n??!1),h=`max(${g}, ${p0}px)`,{objectFitMode:m,imageStyle:b}=x0(e),I=v0(e,n),R=a.useRef(null),[T,G]=a.useState(!1),[k,V]=a.useState([]),[A,L]=a.useState(0),[D,x]=a.useState(0),[W,M]=a.useState(null),[Y,F]=a.useState({title1:"",title2:"",title3:""}),X=(!n||i)&&!T,j=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},B=j.sizeType??"none",ne=X&&B!=="none"?`${d}-item-image-hover-${B}`:void 0,S=(j.value??120)/100,E=a.useCallback(ce=>{!ce||B!=="scale"||(ce.style.transformOrigin=hm(ce))},[B]),O=a.useCallback(ce=>{if(ce){if(m==="contain"){const U=f0(ce);if(U){const Q=ce.closest(`.${d}-item-image`);Q instanceof HTMLElement&&Q.style.setProperty(`--${d}-item-media-aspect`,String(U))}}E(ce)}},[d,E,m]),ae={width:C.scalingValue(v,n??!1),...I,...y0(e,d,n),[`--${d}-image-hover-scale`]:String(S)},ie=(()=>{const ce={},U=R.current?getComputedStyle(R.current).getPropertyValue("--cntrl-article-width").trim():"";return U&&(ce["--cntrl-article-width"]=U),ce})(),$=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),re=a.useMemo(()=>e0(u),[u]),P=a.useMemo(()=>r0(u),[u]),te=(ce,U)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const Q=re.findIndex(ke=>ke.gridIndex===ce);if(Q<0)return;const Z=re[Q];x(Q),V(Z.items),L(0),F(Z.entry),M(U??null),G(!0)},K=a.useCallback(()=>{G(!1),M(null)},[]),fe=a.useCallback(()=>{const ce=re[D];return!ce||!R.current?W:Qv(R.current,ce.gridIndex,m)??W},[re,D,W,m]),We=a.useCallback(ce=>{if(re.length>1){const U=re.length,Q=(D+ce+U)%U,Z=re[Q];x(Q),V(Z.items),L(0),F(Z.entry);return}L(U=>(U+ce+k.length)%k.length)},[re,D,k.length]),me=re.length>1||k.length>1;return a.useEffect(()=>{if(!T||typeof document>"u")return;const ce=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ce}},[T]),a.useEffect(()=>{!n||o||i||G(!1)},[n,o,i]),a.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&G(!1)},[e==null?void 0:e.lightbox]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),r.jsx(a0,{mediaList:P}),r.jsx("div",{ref:R,className:`${d}-wrapper ${d}-type-${p}`,style:ae,children:u.map((ce,U)=>{var ke,we;const Q=!!((ke=ce.image)!=null&&ke.url),Z=b0(!!$,Q,U,d,m,te);return r.jsxs("div",{className:`${d}-item`,children:[ce.title?r.jsx("span",{className:`${d}-item-title`,onClick:Z,style:Z?{cursor:"pointer"}:void 0,children:ce.title}):null,(we=ce.image)!=null&&we.url?r.jsx("span",{className:[`${d}-item-image`,m==="contain"?`${d}-item-image-fit`:void 0,ne].filter(Boolean).join(" "),children:ce.image.type==="video"?r.jsx("video",{ref:O,src:ce.image.url,"data-waterfall-index":U,style:b,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:Z,onLoadedData:Pe=>O(Pe.currentTarget)}):r.jsx("img",{ref:O,src:ce.image.url,alt:ce.image.name??"","data-waterfall-index":U,style:b,onClick:Z,onLoad:Pe=>O(Pe.currentTarget)})}):null,U<u.length-1&&r.jsx("div",{className:`${d}-item-gap-host`,style:{width:g},children:o&&!T&&r.jsx("div",{"data-controls":"horizontalGap","data-controls-axis":"x","data-controls-min":"0",className:`${d}-item-gap-control`,style:{left:"50%",transform:"translateX(-50%)",width:h,height:"100%"}})})]},U)})}),T&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const ce=(l?document.getElementById(l):null)??document.body;return Yn.createPortal(r.jsx("div",{style:ie,"data-selection":"none",children:r.jsx(u0,{prefix:d,items:k,index:A,entry:Y,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:me,lightboxEntries:re,entryIdx:D,layoutId:s,sourceRect:W,resolveCloseSourceRect:fe,onClose:K,onPrev:()=>We(-1),onNext:()=>We(1)})}),ce)})()]})}const S0=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
18839
+ `}function h0(e){const{imageDisplay:t}=e??{},n=(t==null?void 0:t.ratioValue)??"1:1",i=(t==null?void 0:t.reversed)??!1,[o,s]=n.split(":").map(Number),l=i?s:o,d=i?o:s;return d>0?l/d:1}function f0(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 y0(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:C.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:C.scalingValue(i*m0,n??!1),[`--${t}-image-aspect`]:h0(e)}}function v0(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 Kt(n,t)}function x0(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 b0(e,t,n,i,o,s){if(!(!e||!t))return l=>{var c;const d=((c=l.currentTarget.closest(`.${i}-item`))==null?void 0:c.querySelector(`[data-waterfall-index="${n}"]`))??(l.currentTarget instanceof HTMLImageElement||l.currentTarget instanceof HTMLVideoElement?l.currentTarget:null);s(n,d?Xc(d,o):void 0)}}function w0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:s,portalId:l}){const{prefix:d}=C.useScopedStyles(),c=a.useMemo(()=>g0(d),[d]),u=t??[],p=(e==null?void 0:e.type)??"a",v=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,y=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,g=C.scalingValue(y,n??!1),h=`max(${g}, ${p0}px)`,{objectFitMode:m,imageStyle:b}=x0(e),I=v0(e,n),R=a.useRef(null),[T,G]=a.useState(!1),[k,V]=a.useState([]),[A,L]=a.useState(0),[D,x]=a.useState(0),[W,M]=a.useState(null),[Y,F]=a.useState({title1:"",title2:"",title3:""}),X=(!n||i)&&!T,j=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},B=j.sizeType??"none",ne=X&&B!=="none"?`${d}-item-image-hover-${B}`:void 0,S=(j.value??120)/100,E=a.useCallback(ce=>{!ce||B!=="scale"||(ce.style.transformOrigin=hm(ce))},[B]),O=a.useCallback(ce=>{if(ce){if(m==="contain"){const U=f0(ce);if(U){const Q=ce.closest(`.${d}-item-image`);Q instanceof HTMLElement&&Q.style.setProperty(`--${d}-item-media-aspect`,String(U))}}E(ce)}},[d,E,m]),ae={width:C.scalingValue(v,n??!1),...I,...y0(e,d,n),[`--${d}-image-hover-scale`]:String(S)},ie=(()=>{const ce={},U=R.current?getComputedStyle(R.current).getPropertyValue("--cntrl-article-width").trim():"";return U&&(ce["--cntrl-article-width"]=U),ce})(),$=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),se=a.useMemo(()=>e0(u),[u]),P=a.useMemo(()=>r0(u),[u]),te=(ce,U)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const Q=se.findIndex(ke=>ke.gridIndex===ce);if(Q<0)return;const Z=se[Q];x(Q),V(Z.items),L(0),F(Z.entry),M(U??null),G(!0)},K=a.useCallback(()=>{G(!1),M(null)},[]),he=a.useCallback(()=>{const ce=se[D];return!ce||!R.current?W:Qv(R.current,ce.gridIndex,m)??W},[se,D,W,m]),We=a.useCallback(ce=>{if(se.length>1){const U=se.length,Q=(D+ce+U)%U,Z=se[Q];x(Q),V(Z.items),L(0),F(Z.entry);return}L(U=>(U+ce+k.length)%k.length)},[se,D,k.length]),pe=se.length>1||k.length>1;return a.useEffect(()=>{if(!T||typeof document>"u")return;const ce=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ce}},[T]),a.useEffect(()=>{!n||o||i||G(!1)},[n,o,i]),a.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&G(!1)},[e==null?void 0:e.lightbox]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),r.jsx(a0,{mediaList:P}),r.jsx("div",{ref:R,className:`${d}-wrapper ${d}-type-${p}`,style:ae,children:u.map((ce,U)=>{var ke,we;const Q=!!((ke=ce.image)!=null&&ke.url),Z=b0(!!$,Q,U,d,m,te);return r.jsxs("div",{className:`${d}-item`,children:[ce.title?r.jsx("span",{className:`${d}-item-title`,onClick:Z,style:Z?{cursor:"pointer"}:void 0,children:ce.title}):null,(we=ce.image)!=null&&we.url?r.jsx("span",{className:[`${d}-item-image`,m==="contain"?`${d}-item-image-fit`:void 0,ne].filter(Boolean).join(" "),children:ce.image.type==="video"?r.jsx("video",{ref:O,src:ce.image.url,"data-waterfall-index":U,style:b,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:Z,onLoadedData:Ae=>O(Ae.currentTarget)}):r.jsx("img",{ref:O,src:ce.image.url,alt:ce.image.name??"","data-waterfall-index":U,style:b,onClick:Z,onLoad:Ae=>O(Ae.currentTarget)})}):null,U<u.length-1&&r.jsx("div",{className:`${d}-item-gap-host`,style:{width:g},children:o&&!T&&r.jsx("div",{"data-controls":"horizontalGap","data-controls-axis":"x","data-controls-min":"0",className:`${d}-item-gap-control`,style:{left:"50%",transform:"translateX(-50%)",width:h,height:"100%"}})})]},U)})}),T&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const ce=(l?document.getElementById(l):null)??document.body;return Yn.createPortal(r.jsx("div",{style:ie,"data-selection":"none",children:r.jsx(u0,{prefix:d,items:k,index:A,entry:Y,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:pe,lightboxEntries:se,entryIdx:D,layoutId:s,sourceRect:W,resolveCloseSourceRect:he,onClose:K,onPrev:()=>We(-1),onNext:()=>We(1)})}),ce)})()]})}const S0=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
18827
18840
  import type React from 'react';
18828
18841
  import { createPortal } from 'react-dom';
18829
18842
  import { CommonComponentProps } from '../props';
@@ -19337,7 +19350,7 @@ export function Waterfall({
19337
19350
  </>
19338
19351
  );
19339
19352
  }
19340
- `,$0="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),jn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function C0(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")]={...jn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ot(e,"fontSize")]={...jn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ot(e,"lineHeight")]={...jn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ot(e,"letterSpacing")]={...jn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ot(e,"wordSpacing")]={...jn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ot(e,"textAlign")]={...jn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ot(e,"textAppearance")]={...jn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Xi=Xn.filter(e=>e!=="count"),T0=Xi.reduce((e,t)=>({...e,...C0(t)}),{}),L0=Xi.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 pa(e){return Xi.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 R0={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Xi.map(e=>[is[e],os(e)]))},er={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},I0=[{title:"Salton Sea from Above",...er,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",objectFit:"cover"}},{title:"Lunar Module Pilot",...er,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...er,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",objectFit:"cover"}},{title:"David R. Scott During EVA",...er,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",objectFit:"cover"}}],E0={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:I0},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:{...jn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},...T0},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:$0,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...L0},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,...pa({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,...pa({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,...pa({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:[R0]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},M0={element:w0,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"},...Xi.map(e=>({path:`${ot(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",...Xi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${ot(t,"fontFamily")}`}),{})},schema:E0,sourceCode:S0},Wi=500,Zc="cubic-bezier(0.25, 1, 0.5, 1)",P0=300,k0=5,A0=.15,F0=.4,W0=100,Ci=100,Tl={color:"#000000",hover:"#cccccc"},ro={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},_0={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}},ma={offset:{x:0,y:0},linkColor:"#cccccc"},Ll={sizeType:"drag",value:3},H0="left";function N0(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:H0,color:(e==null?void 0:e.titleColor)??"#000000"};return Kt(n,t)}function Ti(e,t,n){return`${e}: ${C.scalingValue(t/1440,n)};`}function lo(e,t){return t<=0?0:(e%t+t)%t}function O0(e,t,n,i){if(!i)return{position:lo(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 D0(e,t){const n=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);return t?n.m41:n.m42}function j0(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 y=n.getBoundingClientRect();return{x:y.left,y:y.top}},o=i(0,0),s=i(Ci,0),l=i(0,Ci);e.removeChild(n);const d={x:(s.x-o.x)/Ci,y:(s.y-o.y)/Ci},c={x:(l.x-o.x)/Ci,y:(l.y-o.y)/Ci},u=d.x*c.y-c.x*d.y;return{ex:d,ey:c,det:u}}function z0(e,t,n){const{ex:i,ey:o,det:s}=e;return{x:(t*o.y-n*o.x)/s,y:(i.x*n-i.y*t)/s}}function B0(e,t){return`
19353
+ `,$0="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),jn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function C0(e){const t={};return t[rt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[rt(e,"fontSettings")]={...jn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[rt(e,"fontSize")]={...jn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[rt(e,"lineHeight")]={...jn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[rt(e,"letterSpacing")]={...jn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[rt(e,"wordSpacing")]={...jn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[rt(e,"textAlign")]={...jn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[rt(e,"textAppearance")]={...jn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Xi=Xn.filter(e=>e!=="count"),T0=Xi.reduce((e,t)=>({...e,...C0(t)}),{}),L0=Xi.reduce((e,t)=>({...e,[rt(t,"fontFamily")]:"Arial",[rt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[rt(t,"letterSpacing")]:0,[rt(t,"wordSpacing")]:0,[rt(t,"textAlign")]:"left",[rt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function pa(e){return Xi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[rt(n,"fontSize")]=i),o!==void 0&&(t[rt(n,"lineHeight")]=o),t},{})}const R0={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Xi.map(e=>[is[e],os(e)]))},er={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},I0=[{title:"Salton Sea from Above",...er,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",objectFit:"cover"}},{title:"Lunar Module Pilot",...er,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...er,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",objectFit:"cover"}},{title:"David R. Scott During EVA",...er,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",objectFit:"cover"}}],E0={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:I0},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:{...jn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},...T0},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:$0,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...L0},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,...pa({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,...pa({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,...pa({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:[R0]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},M0={element:w0,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"},...Xi.map(e=>({path:`${rt(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",...Xi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${rt(t,"fontFamily")}`}),{})},schema:E0,sourceCode:S0},Wi=500,Zc="cubic-bezier(0.25, 1, 0.5, 1)",P0=300,k0=5,A0=.15,F0=.4,W0=100,Ci=100,Tl={color:"#000000",hover:"#cccccc"},ro={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},_0={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}},ma={offset:{x:0,y:0},linkColor:"#cccccc"},Ll={sizeType:"drag",value:3},H0="left";function N0(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:H0,color:(e==null?void 0:e.titleColor)??"#000000"};return Kt(n,t)}function Ti(e,t,n){return`${e}: ${C.scalingValue(t/1440,n)};`}function lo(e,t){return t<=0?0:(e%t+t)%t}function O0(e,t,n,i){if(!i)return{position:lo(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 D0(e,t){const n=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);return t?n.m41:n.m42}function j0(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 y=n.getBoundingClientRect();return{x:y.left,y:y.top}},o=i(0,0),s=i(Ci,0),l=i(0,Ci);e.removeChild(n);const d={x:(s.x-o.x)/Ci,y:(s.y-o.y)/Ci},c={x:(l.x-o.x)/Ci,y:(l.y-o.y)/Ci},u=d.x*c.y-c.x*d.y;return{ex:d,ey:c,det:u}}function z0(e,t,n){const{ex:i,ey:o,det:s}=e;return{x:(t*o.y-n*o.x)/s,y:(i.x*n-i.y*t)/s}}function B0(e,t){return`
19341
19354
  .${e}-wrapper {
19342
19355
  position: relative;
19343
19356
  width: 100%;
@@ -19607,7 +19620,7 @@ export function Waterfall({
19607
19620
  from { clip-path: inset(100% 0 0 0); }
19608
19621
  to { clip-path: inset(0 0 0 0); }
19609
19622
  }
19610
- `}function V0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o}){const{prefix:s}=C.useScopedStyles(),l=N0(e,n),d=t??[],c=d.length,u=(e==null?void 0:e.trigger)??Ll,p=u.sizeType??"drag",v=u.value??Ll.value,y=(e==null?void 0:e.direction)??"horizontal",g=(e==null?void 0:e.transition)??"slide",h=(e==null?void 0:e.nav)??"classic",m=(e==null?void 0:e.navSize)??"m",b=_0[m],I=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,R=ve=>C.scalingValue(ve*I,n),T=(e==null?void 0:e.show)??"always",G=(e==null?void 0:e.controls)??null,k=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,V=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,A=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,L=(e==null?void 0:e.controlsColor)??Tl.color,D=(e==null?void 0:e.controlsHoverColor)??Tl.hover,x=(e==null?void 0:e.navColor)??ro.colors.inactive,W=(e==null?void 0:e.navPaginationColor)??ro.colors.pagination,M=(e==null?void 0:e.navBackgroundColor)??ro.colors.background,Y=(e==null?void 0:e.linkColor)??ma.linkColor,F=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,X=y==="horizontal",j=p==="click",B=p==="drag",ne=p==="auto"&&(!n||!!i),S=!n,E=g==="slide",O=h==="classic",ae=T!=="never"&&k>0,ie=T==="on hover",$=C.scalingValue(k,n),re={width:$,height:$,maxWidth:$},P=E&&c>1,[te,K]=a.useState(0),[fe,We]=a.useState(P?1:0),[me,ce]=a.useState(!1),[U,Q]=a.useState(!1),[Z,ke]=a.useState(!1),[we,Pe]=a.useState(0),[de,ge]=a.useState(!1),[be,z]=a.useState(!1),se=a.useRef(!1),he=a.useRef(fe);he.current=fe;const ye=a.useRef(null),Me=a.useRef(0),Le=a.useRef(null),_=a.useRef(null),pe=a.useRef(null),oe=a.useRef(null),H=a.useCallback(ve=>{se.current=ve,ce(ve)},[]),ee=a.useCallback(ve=>{if(c<2||ve===0)return;const _e=ve>0?1:-1,ze=Math.abs(ve);if(ge(!0),H(!0),!E){K(Ae=>lo(Ae+ve,c));return}let Ke=he.current;const Se=P&&(Ke===0||Ke===c+1),De=Se?te+1:null;Se&&(Ke=te+1);let Ve=ze;for(;Ve>0;){const Ae=O0(Ke,_e,c,P);if(Ke=Ae.position,Ve-=1,Ae.hitBoundary){Me.current=Ve*_e;break}}const et=ze-Ve;if(et>0&&K(Ae=>lo(Ae+et*_e,c)),he.current=Ke,De!==null){if(he.current=De,Ke===De){Q(!0),We(Ke);return}ye.current=Ke,Q(!0),We(De);return}Q(!1),We(Ke)},[te,c,P,E,H]),Fe=a.useCallback(ve=>{ee(ve)},[ee]),le=a.useCallback(ve=>{if(c<2)return;const _e=lo(ve,c);if(!(_e===te&&!se.current)&&(ge(!0),H(!0),K(_e),E)){const ze=_e+(P?1:0);ye.current=null,Me.current=0,he.current=ze,Q(!1),We(ze)}},[te,c,P,E,H]);a.useEffect(()=>{if(!me)return;const ve=window.setTimeout(()=>{if(P&&(fe===0||fe===c+1)){ye.current=null,Q(!0),We(te+1);return}H(!1)},Wi);return()=>window.clearTimeout(ve)},[te,c,P,me,H,fe]),a.useEffect(()=>{if(!U)return;let ve=0;const _e=requestAnimationFrame(()=>{ve=requestAnimationFrame(()=>{const ze=ye.current;ye.current=null;const Ke=Me.current;if(Me.current=0,Q(!1),ze!==null){he.current=ze,We(ze);return}if(Ke!==0){ee(Ke);return}H(!1)})});return()=>{cancelAnimationFrame(_e),cancelAnimationFrame(ve)}},[ee,H,U]);const N=`${P}:${c}`,Ue=a.useRef(N);a.useEffect(()=>{if(Ue.current===N)return;Ue.current=N;const ve=c>0?Math.min(te,c-1):0;pe.current=null,oe.current=null,ke(!1),Pe(0),K(ve),Q(!0),We(ve+(P?1:0))},[te,c,P,N]),a.useEffect(()=>{if(!de)return;const ve=window.setTimeout(()=>ge(!1),P0);return()=>window.clearTimeout(ve)},[de,te]),a.useEffect(()=>{if(!ne||c<2)return;const ve=Math.max(v,.1)*1e3,_e=window.setInterval(()=>{S&&be||Fe(1)},ve);return()=>window.clearInterval(_e)},[v,c,Fe,ne,be,S]);const je=a.useCallback(ve=>{const _e=pe.current;if(!_e||_e.pointerId!==ve.pointerId)return;pe.current=null,oe.current=null;const ze=Le.current;if(ze!=null&&ze.hasPointerCapture(ve.pointerId)&&ze.releasePointerCapture(ve.pointerId),!_e.isActive){E&&Pe(0);return}const Se=!(ve.timeStamp-_e.lastTime>W0)&&Math.abs(_e.velocity)>F0,De=_e.size>0&&Math.abs(_e.offset-_e.baseOffset)>_e.size*A0;if(ke(!1),!Se&&!De){Pe(0);return}const Ve=De?_e.offset-_e.baseOffset:_e.velocity;let et=1;De&&_e.size>0&&(et=Math.max(1,Math.round(Math.abs(Ve)/_e.size))),Pe(0),ee(Ve<0?et:-et)},[ee,E]);a.useEffect(()=>{const ve=_e=>{oe.current===null||_e.pointerId!==oe.current||je(_e)};return window.addEventListener("pointerup",ve),window.addEventListener("pointercancel",ve),()=>{window.removeEventListener("pointerup",ve),window.removeEventListener("pointercancel",ve)}},[je]);const gt=ve=>{const _e=Le.current;if(!B||c<2||!_e||ve.pointerType==="mouse"&&ve.button!==0)return;ye.current=null,Me.current=0,se.current&&H(!1);let ze=0;const Ke=_.current;if(E&&Ke){const Se=X?Ke.offsetWidth:Ke.offsetHeight;if(Se>0){const De=D0(Ke,X);let Ve=he.current;P&&(Ve===0||Ve===c+1)?(Ve=te+1,he.current=Ve,Q(!0),We(Ve),ze=0):ze=De+Ve*Se,Pe(ze)}}_e.setPointerCapture(ve.pointerId),oe.current=ve.pointerId,pe.current={pointerId:ve.pointerId,startClientX:ve.clientX,startClientY:ve.clientY,axes:j0(_e,`${s}-axis-probe`),size:X?_e.offsetWidth:_e.offsetHeight,isActive:!1,baseOffset:ze,offset:ze,lastTime:ve.timeStamp,velocity:0}},rt=ve=>{const _e=pe.current;if(!_e||_e.pointerId!==ve.pointerId)return;if(ve.pointerType==="mouse"&&ve.buttons===0){je(ve);return}const ze=ve.clientX-_e.startClientX,Ke=ve.clientY-_e.startClientY,Se=_e.axes?z0(_e.axes,ze,Ke):{x:ze,y:Ke},De=X?Se.x:Se.y,Ve=X?Se.y:Se.x,et=_e.baseOffset+De;if(!_e.isActive){if(Math.max(Math.abs(De),Math.abs(Ve))<k0)return;if(Math.abs(Ve)>Math.abs(De)){const $e=Le.current;$e!=null&&$e.hasPointerCapture(_e.pointerId)&&$e.releasePointerCapture(_e.pointerId),pe.current=null,oe.current=null,E&&Pe(0);return}_e.isActive=!0,ke(!0)}const Ae=ve.timeStamp-_e.lastTime;Ae>0&&(_e.velocity=(et-_e.offset)/Ae,_e.lastTime=ve.timeStamp),_e.offset=et,E&&Pe(et)},ht=ve=>{je(ve)},lt=X?`translate3d(calc(${-fe*100}% + ${we}px), 0, 0)`:`translate3d(0, calc(${-fe*100}% + ${we}px), 0)`,Ge=P?[d[c-1],...d,d[0]]:d;return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:B0(s,n)}}),r.jsxs("div",{className:mt(`${s}-wrapper`,{[`${s}-transition-reveal`]:g==="reveal",[`${s}-transition-reveal-vertical`]:g==="reveal"&&!X}),onMouseEnter:()=>z(!0),onMouseLeave:()=>z(!1),children:[r.jsxs("div",{className:`${s}-slider-inner`,style:{backgroundColor:"transparent"},children:[r.jsx("div",{ref:Le,className:mt(`${s}-track`,{[`${s}-track-draggable`]:B,[`${s}-track-draggable-vertical`]:B&&!X}),onPointerDown:gt,onPointerMove:rt,onPointerUp:ht,onPointerCancel:ht,onLostPointerCapture:ve=>{oe.current===ve.pointerId&&je(ve)},children:r.jsx("div",{ref:_,className:mt(`${s}-list`,{[`${s}-list-slide`]:E,[`${s}-list-slide-vertical`]:E&&!X,[`${s}-list-fade`]:!E}),style:E?{transform:lt,transition:Z||U?"none":`transform ${Wi}ms ${Zc}`}:void 0,children:Ge.map((ve,_e)=>{const ze=P?lo(_e-1,c):_e,Se=P&&(_e===0||_e===c+1)?`clone-${_e===0?"start":"end"}`:`slide-${ze}`;return r.jsx("div",{className:mt(`${s}-slide`,{[`${s}-is-active`]:!E&&ze===te}),children:r.jsx("div",{className:`${s}-slider-item`,children:r.jsx("div",{className:`${s}-img-wrapper`,children:r.jsx("img",{className:mt(`${s}-slider-image`,{[`${s}-contain`]:ve.image.objectFit==="contain",[`${s}-cover`]:ve.image.objectFit==="cover"}),src:ve.image.url,alt:ve.image.name??"",draggable:!1})})})},Se)})})}),ae&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:mt(`${s}-arrow`,{[`${s}-arrow-prev`]:X,[`${s}-arrow-prev-vertical`]:!X,[`${s}-hover-arrow`]:ie}),style:{color:L,"--arrow-hover-color":D,...re},children:r.jsxs("button",{onClick:ve=>{ve.stopPropagation(),Fe(-1)},className:`${s}-arrow-inner`,style:{transform:`translate(${C.scalingValue(V,n)}, ${C.scalingValue(A*(X?1:-1),n)}) rotate(${X?"0deg":"90deg"})`},children:[G&&r.jsx(an,{url:G,fill:L,hoverFill:D,className:mt(`${s}-arrow-img`,`${s}-mirror`),style:re}),!G&&r.jsx(Rl,{color:L,className:mt(`${s}-arrow-icon`,`${s}-arrow-img`,`${s}-mirror`)})]})}),r.jsx("div",{className:mt(`${s}-arrow`,{[`${s}-arrow-next`]:X,[`${s}-arrow-next-vertical`]:!X,[`${s}-hover-arrow`]:ie}),style:{color:L,"--arrow-hover-color":D,...re},children:r.jsxs("button",{className:`${s}-arrow-inner`,onClick:ve=>{ve.stopPropagation(),Fe(1)},style:{transform:`translate(${C.scalingValue(V*(X?-1:1),n)}, ${C.scalingValue(A,n)}) rotate(${X?"0deg":"90deg"})`},children:[G&&r.jsx(an,{url:G,fill:L,hoverFill:D,className:`${s}-arrow-img`,style:re}),!G&&r.jsx(Rl,{color:L,className:mt(`${s}-arrow-icon`,`${s}-arrow-img`)})]})})]}),j&&r.jsx("div",{className:`${s}-click-overlay`,onClick:()=>Fe(1)}),O&&r.jsx("div",{className:mt(`${s}-pagination`,{[`${s}-pagination-inside-bottom`]:X,[`${s}-pagination-inside-left`]:!X}),style:X?{bottom:R(b.inset)}:{left:R(b.inset)},children:r.jsx("div",{className:mt(`${s}-pagination-inner`,{[`${s}-pagination-vertical`]:!X,[`${s}-animate-dots`]:de}),style:{backgroundColor:M,gap:R(b.gapInactive-b.activeDot+b.dot),...X?{height:R(b.activeDot+b.paddingY*2),paddingTop:R(b.paddingY),paddingBottom:R(b.paddingY),paddingLeft:R(b.paddingActive),paddingRight:R(b.paddingActive)}:{width:R(b.activeDot+b.paddingY*2),paddingLeft:R(b.paddingY),paddingRight:R(b.paddingY),paddingTop:R(b.paddingActive),paddingBottom:R(b.paddingActive)},borderRadius:R(b.borderRadius),transform:`translate(${C.scalingValue(ro.offset.x,n)}, ${C.scalingValue(ro.offset.y,n)})`},children:d.map((ve,_e)=>{const ze=_e===te,Ke=ze?b.activeDot:b.dot;return r.jsx("button",{onClick:()=>le(_e),className:`${s}-pagination-item`,style:{width:R(b.activeDot)},children:r.jsx("div",{className:`${s}-dot`,style:{backgroundColor:ze?W:x,width:R(Ke)}})},_e)})},`${m}-${y}`)})]}),r.jsxs("div",{className:`${s}-caption-block`,children:[r.jsx("div",{"data-controls":o?"captionMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:C.scalingValue(F,n)}}),r.jsx("div",{className:`${s}-caption-text-wrapper`,children:d.map((ve,_e)=>r.jsx("div",{className:mt(`${s}-caption-text`,{[`${s}-with-pointer-events`]:_e===te&&n,[`${s}-active`]:_e===te}),style:{...l,width:"max-content",transitionDuration:`${Math.round(Wi/2)}ms`},children:r.jsx("div",{className:`${s}-caption-text-inner`,style:{"--link-color":Y,"--link-hover-color":Y,position:"relative",top:C.scalingValue(ma.offset.y,n),left:C.scalingValue(ma.offset.x,n)},children:r.jsx(yi,{content:ve.imageCaption})})},_e))})]})]})]})}function Rl({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const G0=`import React, { useCallback, useEffect, useRef, useState } from 'react';
19623
+ `}function V0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o}){const{prefix:s}=C.useScopedStyles(),l=N0(e,n),d=t??[],c=d.length,u=(e==null?void 0:e.trigger)??Ll,p=u.sizeType??"drag",v=u.value??Ll.value,y=(e==null?void 0:e.direction)??"horizontal",g=(e==null?void 0:e.transition)??"slide",h=(e==null?void 0:e.nav)??"classic",m=(e==null?void 0:e.navSize)??"m",b=_0[m],I=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,R=ve=>C.scalingValue(ve*I,n),T=(e==null?void 0:e.show)??"always",G=(e==null?void 0:e.controls)??null,k=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,V=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,A=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,L=(e==null?void 0:e.controlsColor)??Tl.color,D=(e==null?void 0:e.controlsHoverColor)??Tl.hover,x=(e==null?void 0:e.navColor)??ro.colors.inactive,W=(e==null?void 0:e.navPaginationColor)??ro.colors.pagination,M=(e==null?void 0:e.navBackgroundColor)??ro.colors.background,Y=(e==null?void 0:e.linkColor)??ma.linkColor,F=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,X=y==="horizontal",j=p==="click",B=p==="drag",ne=p==="auto"&&(!n||!!i),S=!n,E=g==="slide",O=h==="classic",ae=T!=="never"&&k>0,ie=T==="on hover",$=C.scalingValue(k,n),se={width:$,height:$,maxWidth:$},P=E&&c>1,[te,K]=a.useState(0),[he,We]=a.useState(P?1:0),[pe,ce]=a.useState(!1),[U,Q]=a.useState(!1),[Z,ke]=a.useState(!1),[we,Ae]=a.useState(0),[ue,ge]=a.useState(!1),[be,z]=a.useState(!1),oe=a.useRef(!1),fe=a.useRef(he);fe.current=he;const ye=a.useRef(null),Me=a.useRef(0),Se=a.useRef(null),_=a.useRef(null),me=a.useRef(null),re=a.useRef(null),H=a.useCallback(ve=>{oe.current=ve,ce(ve)},[]),ee=a.useCallback(ve=>{if(c<2||ve===0)return;const _e=ve>0?1:-1,ze=Math.abs(ve);if(ge(!0),H(!0),!E){K(Ie=>lo(Ie+ve,c));return}let Ye=fe.current;const Ce=P&&(Ye===0||Ye===c+1),Oe=Ce?te+1:null;Ce&&(Ye=te+1);let Ve=ze;for(;Ve>0;){const Ie=O0(Ye,_e,c,P);if(Ye=Ie.position,Ve-=1,Ie.hitBoundary){Me.current=Ve*_e;break}}const Re=ze-Ve;if(Re>0&&K(Ie=>lo(Ie+Re*_e,c)),fe.current=Ye,Oe!==null){if(fe.current=Oe,Ye===Oe){Q(!0),We(Ye);return}ye.current=Ye,Q(!0),We(Oe);return}Q(!1),We(Ye)},[te,c,P,E,H]),Fe=a.useCallback(ve=>{ee(ve)},[ee]),le=a.useCallback(ve=>{if(c<2)return;const _e=lo(ve,c);if(!(_e===te&&!oe.current)&&(ge(!0),H(!0),K(_e),E)){const ze=_e+(P?1:0);ye.current=null,Me.current=0,fe.current=ze,Q(!1),We(ze)}},[te,c,P,E,H]);a.useEffect(()=>{if(!pe)return;const ve=window.setTimeout(()=>{if(P&&(he===0||he===c+1)){ye.current=null,Q(!0),We(te+1);return}H(!1)},Wi);return()=>window.clearTimeout(ve)},[te,c,P,pe,H,he]),a.useEffect(()=>{if(!U)return;let ve=0;const _e=requestAnimationFrame(()=>{ve=requestAnimationFrame(()=>{const ze=ye.current;ye.current=null;const Ye=Me.current;if(Me.current=0,Q(!1),ze!==null){fe.current=ze,We(ze);return}if(Ye!==0){ee(Ye);return}H(!1)})});return()=>{cancelAnimationFrame(_e),cancelAnimationFrame(ve)}},[ee,H,U]);const N=`${P}:${c}`,Xe=a.useRef(N);a.useEffect(()=>{if(Xe.current===N)return;Xe.current=N;const ve=c>0?Math.min(te,c-1):0;me.current=null,re.current=null,ke(!1),Ae(0),K(ve),Q(!0),We(ve+(P?1:0))},[te,c,P,N]),a.useEffect(()=>{if(!ue)return;const ve=window.setTimeout(()=>ge(!1),P0);return()=>window.clearTimeout(ve)},[ue,te]),a.useEffect(()=>{if(!ne||c<2)return;const ve=Math.max(v,.1)*1e3,_e=window.setInterval(()=>{S&&be||Fe(1)},ve);return()=>window.clearInterval(_e)},[v,c,Fe,ne,be,S]);const je=a.useCallback(ve=>{const _e=me.current;if(!_e||_e.pointerId!==ve.pointerId)return;me.current=null,re.current=null;const ze=Se.current;if(ze!=null&&ze.hasPointerCapture(ve.pointerId)&&ze.releasePointerCapture(ve.pointerId),!_e.isActive){E&&Ae(0);return}const Ce=!(ve.timeStamp-_e.lastTime>W0)&&Math.abs(_e.velocity)>F0,Oe=_e.size>0&&Math.abs(_e.offset-_e.baseOffset)>_e.size*A0;if(ke(!1),!Ce&&!Oe){Ae(0);return}const Ve=Oe?_e.offset-_e.baseOffset:_e.velocity;let Re=1;Oe&&_e.size>0&&(Re=Math.max(1,Math.round(Math.abs(Ve)/_e.size))),Ae(0),ee(Ve<0?Re:-Re)},[ee,E]);a.useEffect(()=>{const ve=_e=>{re.current===null||_e.pointerId!==re.current||je(_e)};return window.addEventListener("pointerup",ve),window.addEventListener("pointercancel",ve),()=>{window.removeEventListener("pointerup",ve),window.removeEventListener("pointercancel",ve)}},[je]);const ut=ve=>{const _e=Se.current;if(!B||c<2||!_e||ve.pointerType==="mouse"&&ve.button!==0)return;ye.current=null,Me.current=0,oe.current&&H(!1);let ze=0;const Ye=_.current;if(E&&Ye){const Ce=X?Ye.offsetWidth:Ye.offsetHeight;if(Ce>0){const Oe=D0(Ye,X);let Ve=fe.current;P&&(Ve===0||Ve===c+1)?(Ve=te+1,fe.current=Ve,Q(!0),We(Ve),ze=0):ze=Oe+Ve*Ce,Ae(ze)}}_e.setPointerCapture(ve.pointerId),re.current=ve.pointerId,me.current={pointerId:ve.pointerId,startClientX:ve.clientX,startClientY:ve.clientY,axes:j0(_e,`${s}-axis-probe`),size:X?_e.offsetWidth:_e.offsetHeight,isActive:!1,baseOffset:ze,offset:ze,lastTime:ve.timeStamp,velocity:0}},tt=ve=>{const _e=me.current;if(!_e||_e.pointerId!==ve.pointerId)return;if(ve.pointerType==="mouse"&&ve.buttons===0){je(ve);return}const ze=ve.clientX-_e.startClientX,Ye=ve.clientY-_e.startClientY,Ce=_e.axes?z0(_e.axes,ze,Ye):{x:ze,y:Ye},Oe=X?Ce.x:Ce.y,Ve=X?Ce.y:Ce.x,Re=_e.baseOffset+Oe;if(!_e.isActive){if(Math.max(Math.abs(Oe),Math.abs(Ve))<k0)return;if(Math.abs(Ve)>Math.abs(Oe)){const qe=Se.current;qe!=null&&qe.hasPointerCapture(_e.pointerId)&&qe.releasePointerCapture(_e.pointerId),me.current=null,re.current=null,E&&Ae(0);return}_e.isActive=!0,ke(!0)}const Ie=ve.timeStamp-_e.lastTime;Ie>0&&(_e.velocity=(Re-_e.offset)/Ie,_e.lastTime=ve.timeStamp),_e.offset=Re,E&&Ae(Re)},ft=ve=>{je(ve)},st=X?`translate3d(calc(${-he*100}% + ${we}px), 0, 0)`:`translate3d(0, calc(${-he*100}% + ${we}px), 0)`,Ue=P?[d[c-1],...d,d[0]]:d;return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:B0(s,n)}}),r.jsxs("div",{className:mt(`${s}-wrapper`,{[`${s}-transition-reveal`]:g==="reveal",[`${s}-transition-reveal-vertical`]:g==="reveal"&&!X}),onMouseEnter:()=>z(!0),onMouseLeave:()=>z(!1),children:[r.jsxs("div",{className:`${s}-slider-inner`,style:{backgroundColor:"transparent"},children:[r.jsx("div",{ref:Se,className:mt(`${s}-track`,{[`${s}-track-draggable`]:B,[`${s}-track-draggable-vertical`]:B&&!X}),onPointerDown:ut,onPointerMove:tt,onPointerUp:ft,onPointerCancel:ft,onLostPointerCapture:ve=>{re.current===ve.pointerId&&je(ve)},children:r.jsx("div",{ref:_,className:mt(`${s}-list`,{[`${s}-list-slide`]:E,[`${s}-list-slide-vertical`]:E&&!X,[`${s}-list-fade`]:!E}),style:E?{transform:st,transition:Z||U?"none":`transform ${Wi}ms ${Zc}`}:void 0,children:Ue.map((ve,_e)=>{const ze=P?lo(_e-1,c):_e,Ce=P&&(_e===0||_e===c+1)?`clone-${_e===0?"start":"end"}`:`slide-${ze}`;return r.jsx("div",{className:mt(`${s}-slide`,{[`${s}-is-active`]:!E&&ze===te}),children:r.jsx("div",{className:`${s}-slider-item`,children:r.jsx("div",{className:`${s}-img-wrapper`,children:r.jsx("img",{className:mt(`${s}-slider-image`,{[`${s}-contain`]:ve.image.objectFit==="contain",[`${s}-cover`]:ve.image.objectFit==="cover"}),src:ve.image.url,alt:ve.image.name??"",draggable:!1})})})},Ce)})})}),ae&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:mt(`${s}-arrow`,{[`${s}-arrow-prev`]:X,[`${s}-arrow-prev-vertical`]:!X,[`${s}-hover-arrow`]:ie}),style:{color:L,"--arrow-hover-color":D,...se},children:r.jsxs("button",{onClick:ve=>{ve.stopPropagation(),Fe(-1)},className:`${s}-arrow-inner`,style:{transform:`translate(${C.scalingValue(V,n)}, ${C.scalingValue(A*(X?1:-1),n)}) rotate(${X?"0deg":"90deg"})`},children:[G&&r.jsx(an,{url:G,fill:L,hoverFill:D,className:mt(`${s}-arrow-img`,`${s}-mirror`),style:se}),!G&&r.jsx(Rl,{color:L,className:mt(`${s}-arrow-icon`,`${s}-arrow-img`,`${s}-mirror`)})]})}),r.jsx("div",{className:mt(`${s}-arrow`,{[`${s}-arrow-next`]:X,[`${s}-arrow-next-vertical`]:!X,[`${s}-hover-arrow`]:ie}),style:{color:L,"--arrow-hover-color":D,...se},children:r.jsxs("button",{className:`${s}-arrow-inner`,onClick:ve=>{ve.stopPropagation(),Fe(1)},style:{transform:`translate(${C.scalingValue(V*(X?-1:1),n)}, ${C.scalingValue(A,n)}) rotate(${X?"0deg":"90deg"})`},children:[G&&r.jsx(an,{url:G,fill:L,hoverFill:D,className:`${s}-arrow-img`,style:se}),!G&&r.jsx(Rl,{color:L,className:mt(`${s}-arrow-icon`,`${s}-arrow-img`)})]})})]}),j&&r.jsx("div",{className:`${s}-click-overlay`,onClick:()=>Fe(1)}),O&&r.jsx("div",{className:mt(`${s}-pagination`,{[`${s}-pagination-inside-bottom`]:X,[`${s}-pagination-inside-left`]:!X}),style:X?{bottom:R(b.inset)}:{left:R(b.inset)},children:r.jsx("div",{className:mt(`${s}-pagination-inner`,{[`${s}-pagination-vertical`]:!X,[`${s}-animate-dots`]:ue}),style:{backgroundColor:M,gap:R(b.gapInactive-b.activeDot+b.dot),...X?{height:R(b.activeDot+b.paddingY*2),paddingTop:R(b.paddingY),paddingBottom:R(b.paddingY),paddingLeft:R(b.paddingActive),paddingRight:R(b.paddingActive)}:{width:R(b.activeDot+b.paddingY*2),paddingLeft:R(b.paddingY),paddingRight:R(b.paddingY),paddingTop:R(b.paddingActive),paddingBottom:R(b.paddingActive)},borderRadius:R(b.borderRadius),transform:`translate(${C.scalingValue(ro.offset.x,n)}, ${C.scalingValue(ro.offset.y,n)})`},children:d.map((ve,_e)=>{const ze=_e===te,Ye=ze?b.activeDot:b.dot;return r.jsx("button",{onClick:()=>le(_e),className:`${s}-pagination-item`,style:{width:R(b.activeDot)},children:r.jsx("div",{className:`${s}-dot`,style:{backgroundColor:ze?W:x,width:R(Ye)}})},_e)})},`${m}-${y}`)})]}),r.jsxs("div",{className:`${s}-caption-block`,children:[r.jsx("div",{"data-controls":o?"captionMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:C.scalingValue(F,n)}}),r.jsx("div",{className:`${s}-caption-text-wrapper`,children:d.map((ve,_e)=>r.jsx("div",{className:mt(`${s}-caption-text`,{[`${s}-with-pointer-events`]:_e===te&&n,[`${s}-active`]:_e===te}),style:{...l,width:"max-content",transitionDuration:`${Math.round(Wi/2)}ms`},children:r.jsx("div",{className:`${s}-caption-text-inner`,style:{"--link-color":Y,"--link-hover-color":Y,position:"relative",top:C.scalingValue(ma.offset.y,n),left:C.scalingValue(ma.offset.x,n)},children:r.jsx(yi,{content:ve.imageCaption})})},_e))})]})]})]})}function Rl({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const G0=`import React, { useCallback, useEffect, useRef, useState } from 'react';
19611
19624
  import cn from 'classnames';
19612
19625
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
19613
19626
  import { scalingValue } from '../utils/scalingValue';
@@ -21005,7 +21018,7 @@ function ArrowIcon({ color, className }: { color: string, className: string }) {
21005
21018
  width: var(--cntrl-article-width, 100vw) !important;
21006
21019
  height: var(--cntrl-viewport-height, 100vh) !important;
21007
21020
  }
21008
- `}const Z0="rgba(28,31,34,0.9)",In=500,ci="cubic-bezier(0.22, 1, 0.36, 1)",J0=72,Q0=50,ex={titleColor:"title-color",lightboxCounterColor:"lightbox-counter-color"},tx=[];function nx(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 ix(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function ox(e){const[t]=e.media;return t!=null&&t.url?t:null}function rx(e){if(!Array.isArray(e)||e.length===0)return[];if(nx(e)){const t=[];for(const n of e){const i=ix(n);if(!i)continue;const o=ox(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 ka(e){return e.type==="video"}function ax(e){e.pause(),e.removeAttribute("src"),e.load()}function tr(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function sx(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}const lx=1140/1440;function cx(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 dx(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 ux(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function px({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:s,onMouseMove:l,onTransitionEnd:d}){return a.useEffect(()=>{const c=n.current;if(c)return()=>{ax(c)}},[e,n]),r.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:s,onMouseMove:l,onTransitionEnd:d,style:i})}function mx({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:s,onPrev:l,onNext:d,counterClassName:c,counterStyle:u,backgroundColor:p}){const v=i==="cover",y=a.useRef(null),g=a.useRef(null),h=a.useRef(null),m=a.useRef(0),b=a.useRef(0),I=a.useRef("none"),R=a.useRef(!1),T=a.useRef(!1),G=a.useRef(!1),k=a.useRef(null),[V,A]=a.useState(null),[L,D]=a.useState("opening"),[x,W]=a.useState(0),[M,Y]=a.useState(0),[F,X]=a.useState(!1),[j,B]=a.useState(!1),[ne,S]=a.useState(!1),E=a.useRef(n),O=t[n],ae=O?ka(O):!1,ie=M!==0||F,$=a.useCallback(de=>{G.current=de,X(de)},[]),re=a.useCallback(()=>{k.current!==null&&(window.clearTimeout(k.current),k.current=null)},[]),P=a.useCallback(()=>{re(),k.current=window.setTimeout(()=>{re(),$(!1)},In+32)},[re,$]),te=a.useCallback(()=>{const de=y.current,ge=g.current;if(!de)return;const be=de.getBoundingClientRect(),z=be.width,se=be.height;if(!z||!se)return;if(i==="cover"){A({width:z,height:se,left:be.left,top:be.top});return}if(!ge){A(tr(de));return}const{width:he,height:ye}=sx(ge);if(!he||!ye){A(tr(de));return}const Me=he/ye,Le=z/se;if(Me>Le){const _=z/Me;A({width:z,height:_,left:be.left,top:be.top+(se-_)/2})}else{const _=se*Me;A({width:_,height:se,left:be.left+(z-_)/2,top:be.top})}},[i]);a.useEffect(()=>{te();const de=y.current;if(!de)return;const ge=new ResizeObserver(()=>te());return ge.observe(de),()=>ge.disconnect()},[te,n]),a.useEffect(()=>{L==="opening"&&V&&D("open")},[L,V]),a.useEffect(()=>{if(L!=="closing")return;const de=setTimeout(()=>s(),In);return()=>clearTimeout(de)},[L,s]),a.useEffect(()=>()=>{re()},[re]),a.useLayoutEffect(()=>{if(E.current===n)return;re(),W(0),Y(0),$(!1),S(!1),B(!1),m.current=0,b.current=0,I.current="none",R.current=!1,h.current=null,T.current=!1;const de=y.current;de&&A(tr(de)),E.current=n},[n,$,re]),a.useEffect(()=>{if(L!=="open")return;let de=null;const ge=()=>{de&&(document.removeEventListener("click",de,!0),de=null)},be=()=>{ge(),de=Le=>{Le.stopPropagation(),Le.preventDefault(),ge()},document.addEventListener("click",de,!0)},z=Le=>{re(),G.current=!1,X(!1),Y(0),B(!1),R.current=!1,b.current=0,I.current="none";const _=y.current;_&&A(tr(_)),Le<0?d():l()},se=Le=>{if(Math.abs(Le)>Q0&&t.length>1){z(Le);return}$(!0),Y(0),P()},he=Le=>{if(Le.touches.length!==1||G.current)return;const _=Le.touches[0];T.current=!0,h.current={x:_.clientX,y:_.clientY},I.current="none",b.current=0,R.current=!1},ye=Le=>{if(!h.current||Le.touches.length!==1||G.current)return;const _=Le.touches[0],pe=_.clientX-h.current.x,oe=_.clientY-h.current.y;if(I.current==="none"){if(Math.abs(pe)<10&&Math.abs(oe)<10)return;if(Math.abs(pe)>Math.abs(oe)){if(t.length<=1)return;I.current="horizontal"}else if(oe>0)I.current="vertical";else return}if(I.current==="horizontal"){R.current=!0,B(!0),b.current=pe,Y(pe),Le.preventDefault();return}I.current==="vertical"&&(R.current=!0,B(!0),m.current=oe,W(oe),Le.preventDefault())},Me=()=>{if(!h.current)return;const Le=I.current,_=R.current;if(_&&Le==="horizontal")se(b.current),be();else if(_&&Le==="vertical")if(m.current>J0){const oe=window.innerHeight;m.current=oe,S(!0),W(oe),D("closing")}else m.current=0,W(0),be();else Le==="horizontal"&&Math.abs(b.current)>0&&(se(b.current),be());h.current=null,I.current="none",b.current=0,R.current=!1,B(!1)};return document.addEventListener("touchstart",he,{passive:!0}),document.addEventListener("touchmove",ye,{passive:!1}),document.addEventListener("touchend",Me),document.addEventListener("touchcancel",Me),()=>{document.removeEventListener("touchstart",he),document.removeEventListener("touchmove",ye),document.removeEventListener("touchend",Me),document.removeEventListener("touchcancel",Me),ge()}},[L,t.length,d,l,$,P,re]),a.useEffect(()=>{const de=ge=>{ge.key==="Escape"&&(ge.preventDefault(),ge.stopPropagation(),L!=="closing"&&D("closing"))};return window.addEventListener("keydown",de,!0),()=>window.removeEventListener("keydown",de,!0)},[L]);const K=()=>{L!=="closing"&&D("closing")},fe=L==="open",We=L==="closing",me=x>0?Math.max(0,1-x/500):1,ce=x>0?Math.max(.35,1-x/500):1,U=de=>{if(de.stopPropagation(),T.current){T.current=!1;return}if(t.length<=1)return;const ge=de.currentTarget.getBoundingClientRect(),be=de.clientY-ge.top,z=Math.min(52,ge.height*.2);if(!(be>ge.height-z)){if(de.clientX-ge.left<ge.width/2){l();return}d()}},Q=de=>{if(t.length<=1)return;const ge=de.currentTarget.getBoundingClientRect(),be=de.clientX-ge.left,z=de.clientY-ge.top,se=Math.min(52,ge.height*.2);if(z>ge.height-se){de.currentTarget.style.cursor="default";return}de.currentTarget.style.cursor=be<ge.width/2?"w-resize":"e-resize"},Z=a.useCallback(de=>{de.propertyName!=="transform"||!G.current||(re(),$(!1))},[re,$]),ke=ie?`translateX(${M}px)`:x>0?`translateY(${x}px)`:void 0,we={position:"fixed",top:V==null?void 0:V.top,left:V==null?void 0:V.left,width:V==null?void 0:V.width,height:V==null?void 0:V.height,objectFit:i==="cover"?"cover":"contain",transform:ke,opacity:x>0?ce:L==="opening"||We?0:1,transition:j&&!F?"none":F?`transform ${In}ms ${ci}`:ne?`transform ${In}ms ${ci}, opacity ${In}ms ${ci}`:L==="opening"||We?`opacity ${In}ms ${ci}`:"none",pointerEvents:ae&&fe&&!ie?"auto":"none",touchAction:ae&&fe?"none":void 0,zIndex:9998},Pe=V?{position:"fixed",top:V.top,height:V.height,width:V.width/2,zIndex:9999}:null;return r.jsxs("div",{className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:L==="open"?"none":void 0},onClick:K,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:p,opacity:fe?me:0,transition:j?"none":`opacity ${In}ms ${ci}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:v?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:y,style:{position:"absolute",inset:0}}),r.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:fe?1:0,transition:`opacity ${In}ms ${ci}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&r.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:y,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:fe?1:0,transition:`opacity ${In}ms ${ci}`},children:t.length>1&&r.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),V&&O&&(ae?r.jsx(px,{src:O.url,phase:L,mediaRef:g,mediaStyle:we,onLoadedMetadata:te,onClick:U,onMouseMove:Q,onTransitionEnd:Z},`${n}-${O.url}`):r.jsx("img",{ref:g,src:O.url,alt:O.name,onLoad:te,onTransitionEnd:Z,style:we},`${n}-${O.url}`)),fe&&Pe&&t.length>1&&!ae&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...Pe,left:V.left,cursor:"w-resize",pointerEvents:ie?"none":"auto"},onClick:de=>{if(T.current){T.current=!1;return}de.stopPropagation(),l()}}),r.jsx("div",{style:{...Pe,left:V.left+V.width/2,cursor:"e-resize",pointerEvents:ie?"none":"auto"},onClick:de=>{if(T.current){T.current=!1;return}de.stopPropagation(),d()}})]})]})}function Ml({P:e,media:t,imgWidth:n,cornerRadius:i,fillGalleryWidth:o,imageDisplay:s,isEditor:l,galleryPaddingBetween:d=0,showPaddingAfter:c=!1,showControls:u=!1,onMediaClick:p}){const v=`${e}-gallery-${ka(t)?"video":"image"}`,y=s.display==="cover",g=dx(s),h=L=>C.scalingValue(L,l??!1),m=n??Mi,b=o?{width:"100%",maxWidth:"100%"}:{width:h(m),maxWidth:"100%"},I=i?{borderRadius:h(i)}:{},R={...b,...y?{aspectRatio:g,height:"auto",overflow:"hidden"}:{},...I},T={...y?{display:"block",width:"100%",height:"100%",objectFit:"cover",maxWidth:"100%"}:{display:"block",maxWidth:"100%",height:"auto",width:o?"100%":h(m)},...p?{cursor:"pointer",pointerEvents:"auto"}:{},...y?{}:I},k={className:v,style:T,onClick:p?L=>{L.stopPropagation(),p()}:void 0},V=Math.max(d,di),A=ka(t)?r.jsx("video",{...k,src:t.url,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):r.jsx("img",{...k,src:t.url,alt:t.name??""});return r.jsxs("div",{className:`${e}-gallery-item`,children:[y?r.jsx("div",{style:R,children:A}):A,c&&d>0&&r.jsx("div",{className:`${e}-padding-handle`,style:{height:h(d)},"aria-hidden":"true"}),u&&c&&r.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(V)}})]})}function gx({P:e,layoutType:t,galleryWidthStyle:n,galleryPaddingRight:i,galleryPaddingLeft:o,galleryPaddingRightWidth:s,galleryPaddingLeftWidth:l,galleryPaddingMaxFraction:d,showControls:c,scaled:u,children:p}){const v=t==="a"?i:t==="c"?o:0,y=v>0||c;return r.jsxs("div",{className:`${e}-gallery-controls`,children:[t==="c"&&y&&r.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(v)},"aria-hidden":"true"}),c&&t==="c"&&r.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%"}}),r.jsx("div",{className:`${e}-gallery`,style:n,children:p}),t==="a"&&y&&r.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(v)},"aria-hidden":"true"}),c&&t==="a"&&r.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(s),height:"100%"}})]})}function hx(e){switch(e){case"fade":case"retype":case"scroll":return e;case"default":return"scroll";default:return"scroll"}}function Pl({P:e,scaled:t,height:n,paired:i}){return r.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 kl({P:e,controlKey:t,scaled:n,width:i,maxFraction:o,side:s,paired:l,anchorStyle:d}){return r.jsx("div",{"data-controls":t,...l?{"data-controls-paired":""}:{},"data-controls-axis":"x","data-controls-variant":"column-padding",...s==="right"?{"data-controls-reverse":""}:{},"data-controls-min":"0","data-controls-max-fraction":String(o),className:`${e}-control-anchor`,style:{top:0,...s==="left"?{left:0}:{right:0},width:n(i),height:"100%",...d}})}function ga({P:e,title:t,position:n,titleRef:i,titleClassName:o,titleContainerStyle:s,titleTextBoxStyle:l,titleStyle:d,showTextBoxOutline:c=!1,topPaddingControl:u}){const p=a.useRef(null),[v,y]=a.useState(0),g=t??"",h=n==="left"||n==="center"||n==="right";return a.useLayoutEffect(()=>{if(!h)return;const m=p.current;if(!m||typeof ResizeObserver>"u")return;const b=()=>y(m.offsetHeight);b();const I=new ResizeObserver(b);return I.observe(m),()=>I.disconnect()},[g,h]),r.jsx("div",{ref:m=>{p.current=m,i(m)},className:[o,`${e}-title-position-${n}`].join(" "),style:{...h?{[`--${e}-title-height`]:`${v}px`}:{},...s},children:r.jsxs("div",{className:`${e}-title-text-stack`,style:l,children:[u,r.jsx("div",{className:c?`${e}-title-text-inner`:`${e}-title-text-inner-hidden`,style:{width:"100%"},children:r.jsx("span",{className:`${e}-title-text`,style:d,children:g})})]})})}const Al=45;function Fl(e,t,n){let i=e;for(;i;){const o=getComputedStyle(i).getPropertyValue(t).trim();if(o){const s=parseFloat(o);if(!Number.isNaN(s))return s}i=i.parentElement}return n}function fx(e){const t=Fl(e,"--cntrl-viewport-height",window.innerHeight),n=Fl(e,"--cntrl-article-top",0);return{top:n,centerY:n+t/2}}function yx(e,t,n){const{top:i,centerY:o}=fx(n);if(t==="top"){const l=n&&parseFloat(getComputedStyle(n).top)||i;return Math.abs(e.top-l)}const s=e.top+e.height/2;return Math.abs(s-o)}function vx(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=yx(u,n,c);return Math.exp(-(p*p)/(2*Al*Al))});let o=0,s=-1;return i.forEach((l,d)=>{l>s&&(s=l,o=d)}),{opacities:i,dominantIndex:o}}function xx(e,t,n){const i=a.useRef([]),[{opacities:o,dominantIndex:s},l]=a.useState(()=>({opacities:Array.from({length:e},(c,u)=>u===0?1:0),dominantIndex:0}));return a.useLayoutEffect(()=>{if(!t||e===0){l({opacities:Array.from({length:e},()=>1),dominantIndex:0});return}let c=0;const u=()=>{l(vx(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:s}}function bx(e,t){const[n,i]=a.useState(e),o=a.useRef(e);return a.useEffect(()=>{if(!t){o.current=e,i(e);return}const s=Array.from(o.current),l=Array.from(e),d=Math.max(s.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),...s.slice(c)].join("");o.current=p,i(p),c>=d&&window.clearInterval(u)},35);return()=>window.clearInterval(u)},[t,e]),n}function wx({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,portalId:s}){var Je;const{prefix:l}=C.useScopedStyles(),d=a.useMemo(()=>Y0(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)??Mi,y=(e==null?void 0:e.titleWidth)??lx,g=cx(e==null?void 0:e.imageDisplay),h=(e==null?void 0:e.cornerRadius)??X0,m=(e==null?void 0:e.position)??"center",b=(e==null?void 0:e.titleTopPadding)??0,I=(e==null?void 0:e.titleLeftPadding)??0,R=(e==null?void 0:e.titleRightPadding)??0,T=hx(e==null?void 0:e.transition),G=(e==null?void 0:e.lightbox)??"on",k=p==="b",V=T==="fade"||T==="retype",{setTitleRef:A,dominantIndex:L}=xx(c.length,V,m),D=((Je=c[L])==null?void 0:Je.title)??"",x=bx(D,T==="retype"),W=T==="fade"||T==="retype",M=T==="retype"?x:D,Y=k?void 0:{width:C.scalingValue(v,n??!1)},F=G==="on"&&(!n||i||o),X=o??!1,j=(e==null?void 0:e.galleryPaddingRight)??0,B=(e==null?void 0:e.galleryPaddingLeft)??0,ne=(e==null?void 0:e.galleryPaddingBetween)??0,S=Qe=>C.scalingValue(Qe,n??!1),O={width:S(y)},ae=p==="a"?j:B,ie=k?{width:"100%"}:{width:`calc(100% - ${S(v)} - ${S(ae)})`,...p==="c"?{marginLeft:"auto"}:{}},$=Math.max(j,di),re=Math.max(B,di),P=Math.max(ne,di),te=Math.max(b,di),K=Math.max(I,di),fe=Math.max(R,di),We=Math.max(0,(u??1)-(v??Mi)),me=p==="a"?Math.max(0,(u??1)-(v??Mi)-j):p==="c"?Math.max(0,(u??1)-(v??Mi)-B):p==="b"?u??1:1,ce=X&&(p==="a"||p==="b"||p==="c")&&m==="top",U=X&&((p==="a"||p==="b")&&(m==="left"||m==="top")||p==="c"&&(m==="left"||m==="top")),Q=X&&((p==="c"||p==="b")&&m==="right"||p==="a"&&m==="right"),Z=c.length>1,ke=k?void 0:S((p==="c"?B:j)+(v??Mi)),we=p==="c"&&ke?{left:ke}:void 0,Pe=p==="a"&&ke?{right:ke}:void 0,de=k?{left:0,width:"100%"}:p==="a"?{right:S(j),width:S(v)}:{left:S(B),width:S(v)},{titleColor:ge,titleFontFamily:be,titleFontSettings:z,titleFontSize:se,titleLineHeight:he,titleLetterSpacing:ye,titleWordSpacing:Me,titleAlign:Le,titleTextAppearance:_,lightboxCounterColor:pe,lightboxCounterFontFamily:oe,lightboxCounterFontSettings:H,lightboxCounterFontSize:ee,lightboxCounterLineHeight:Fe,lightboxCounterLetterSpacing:le,lightboxCounterWordSpacing:N,lightboxCounterTextAppearance:Ue}=e??{},je={fontSettings:{fontFamily:be,fontWeight:(z==null?void 0:z.fontWeight)??400,fontStyle:(z==null?void 0:z.fontStyle)??"normal"},fontSize:se??.01,lineHeight:he,letterSpacing:ye??0,wordSpacing:Me??0,textAlign:Le??"left",textAppearance:_,color:ge??"#000000"},rt=rn(Kt(je,n)),ht=O,lt=El(se,he,l,n),Ge=Il(se,he,`${l}-title`,`${l}-text-tight-leading`),ve={fontSettings:{fontFamily:oe,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:ee??.01,lineHeight:Fe,letterSpacing:le??0,wordSpacing:N??0,textAppearance:Ue,color:pe??"#DEDDDD"},ze={...rn(Kt(ve,n)),...El(ee,Fe,l,n)},Ke=Il(ee,Fe,`${l}-lightbox-counter`,`${l}-text-tight-leading`),Se=C.buildColorVars(l,{titleColor:ge??"#000000",lightboxCounterColor:pe??"#DEDDDD"},ex,tx),De=a.useRef(null),[Ve,et]=a.useState(!1),[Ae,$e]=a.useState([]),[tt,Ze]=a.useState(0),Ie=a.useCallback((Qe,st)=>{F&&($e(Qe),Ze(st),et(!0))},[F]),qe=a.useCallback(()=>{et(!1)},[]),Ee=a.useMemo(()=>{const Qe={...Se},st=De.current?getComputedStyle(De.current).getPropertyValue("--cntrl-article-width").trim():"";return st&&(Qe["--cntrl-article-width"]=st),Qe},[Se,Ve]);return a.useEffect(()=>{if(!Ve||G!=="on"||typeof document>"u")return;const Qe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Qe}},[Ve,G]),a.useEffect(()=>{!n||o||i||et(!1)},[n,o,i]),a.useEffect(()=>{G==="off"&&et(!1)},[G]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),r.jsx("div",{style:Se,children:r.jsxs("div",{ref:De,className:`${l}-wrapper`,style:{width:C.scalingValue(u,n??!1),[`--${l}-title-top-padding`]:(p==="a"||p==="b"||p==="c")&&m==="top"?S(b):void 0,[`--${l}-title-left-padding`]:(p==="a"||p==="b")&&(m==="left"||m==="top")||p==="c"&&(m==="left"||m==="top")?S(I):void 0,[`--${l}-title-right-padding`]:(p==="c"||p==="b")&&m==="right"||p==="a"&&m==="right"?S(R):void 0},children:[W&&r.jsx("div",{className:`${l}-single-title-layer`,children:r.jsx(ga,{P:l,title:M,position:m,titleRef:()=>{},titleClassName:`${Ge} ${l}-single-title`,titleContainerStyle:{...lt,...ie},titleTextBoxStyle:ht,titleStyle:rt,showTextBoxOutline:X,topPaddingControl:ce?Pl({P:l,scaled:S,height:te,paired:!1}):void 0})}),c.map((Qe,st)=>{const St=rx(Qe.gallery),Pt=st<c.length-1,Nt=St.filter(yt=>yt.lightboxMedia).map(yt=>yt.lightboxMedia),dt={P:l,position:m,titleRef:A(st),titleClassName:Ge,titleContainerStyle:lt,titleTextBoxStyle:W?{maxWidth:"100%"}:ht,titleStyle:rt,showTextBoxOutline:X&&!W,topPaddingControl:ce&&!W?Pl({P:l,scaled:S,height:te,paired:Z}):void 0};return r.jsxs("div",{"data-item-index":st,className:`${l}-item ${l}-item-${p}`,style:{paddingBottom:Pt?S(ne):void 0},children:[U&&kl({P:l,controlKey:"titleLeftPadding",scaled:S,width:K,maxFraction:me,side:"left",paired:Z,anchorStyle:we}),Q&&kl({P:l,controlKey:"titleRightPadding",scaled:S,width:fe,maxFraction:me,side:"right",paired:Z,anchorStyle:Pe}),X&&Pt&&r.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:S(P),...de}}),k?r.jsxs("div",{className:`${l}-gallery`,children:[r.jsx("div",{className:`${l}-gallery-media`,children:St.map(({displayMedia:yt,lightboxMedia:Ot},Ft)=>{const bt=Ot?Nt.findIndex(Wt=>Wt.url===Ot.url):-1;return r.jsx(Ml,{P:l,media:yt,imgWidth:v||void 0,cornerRadius:h||void 0,imageDisplay:g,isEditor:n,galleryPaddingBetween:ne,showPaddingAfter:Ft<St.length-1,showControls:X,onMediaClick:F&&bt>=0?()=>Ie(Nt,bt):void 0},`${yt.url}-${Ft}`)})}),r.jsx("div",{className:`${l}-title-layer`,children:r.jsx(ga,{...dt,title:W?"":Qe.title})})]}):r.jsxs(r.Fragment,{children:[r.jsx(ga,{...dt,title:W?"":Qe.title}),St.length>0&&r.jsx(gx,{P:l,layoutType:p,galleryWidthStyle:Y,galleryPaddingRight:j,galleryPaddingLeft:B,galleryPaddingRightWidth:$,galleryPaddingLeftWidth:re,galleryPaddingMaxFraction:We,showControls:X,scaled:S,children:St.map(({displayMedia:yt,lightboxMedia:Ot},Ft)=>{const bt=Ot?Nt.findIndex(Wt=>Wt.url===Ot.url):-1;return r.jsx(Ml,{P:l,media:yt,cornerRadius:h||void 0,fillGalleryWidth:!0,imageDisplay:g,isEditor:n,galleryPaddingBetween:ne,showPaddingAfter:Ft<St.length-1,showControls:X,onMediaClick:F&&bt>=0?()=>Ie(Nt,bt):void 0},`${yt.url}-${Ft}`)})})]})]},st)})]})}),Ve&&G==="on"&&typeof document<"u"&&e&&(()=>{const Qe=(s?document.getElementById(s):null)??document.body;return Yn.createPortal(r.jsx("div",{style:Ee,"data-selection":"none",children:r.jsx(mx,{prefix:l,items:Ae,index:tt,imageDisplay:ux(e.lightboxImageDisplay),isEditor:n,onClose:qe,onPrev:()=>Ze(st=>(st-1+Ae.length)%Ae.length),onNext:()=>Ze(st=>(st+1)%Ae.length),counterClassName:Ke,counterStyle:ze,backgroundColor:e.backgroundColor??Z0})}),Qe)})()]})}const Sx=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
21021
+ `}const Z0="rgba(28,31,34,0.9)",In=500,ci="cubic-bezier(0.22, 1, 0.36, 1)",J0=72,Q0=50,ex={titleColor:"title-color",lightboxCounterColor:"lightbox-counter-color"},tx=[];function nx(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 ix(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function ox(e){const[t]=e.media;return t!=null&&t.url?t:null}function rx(e){if(!Array.isArray(e)||e.length===0)return[];if(nx(e)){const t=[];for(const n of e){const i=ix(n);if(!i)continue;const o=ox(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 ka(e){return e.type==="video"}function ax(e){e.pause(),e.removeAttribute("src"),e.load()}function tr(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function sx(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}const lx=1140/1440;function cx(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 dx(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 ux(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function px({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:s,onMouseMove:l,onTransitionEnd:d}){return a.useEffect(()=>{const c=n.current;if(c)return()=>{ax(c)}},[e,n]),r.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:s,onMouseMove:l,onTransitionEnd:d,style:i})}function mx({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:s,onPrev:l,onNext:d,counterClassName:c,counterStyle:u,backgroundColor:p}){const v=i==="cover",y=a.useRef(null),g=a.useRef(null),h=a.useRef(null),m=a.useRef(0),b=a.useRef(0),I=a.useRef("none"),R=a.useRef(!1),T=a.useRef(!1),G=a.useRef(!1),k=a.useRef(null),[V,A]=a.useState(null),[L,D]=a.useState("opening"),[x,W]=a.useState(0),[M,Y]=a.useState(0),[F,X]=a.useState(!1),[j,B]=a.useState(!1),[ne,S]=a.useState(!1),E=a.useRef(n),O=t[n],ae=O?ka(O):!1,ie=M!==0||F,$=a.useCallback(ue=>{G.current=ue,X(ue)},[]),se=a.useCallback(()=>{k.current!==null&&(window.clearTimeout(k.current),k.current=null)},[]),P=a.useCallback(()=>{se(),k.current=window.setTimeout(()=>{se(),$(!1)},In+32)},[se,$]),te=a.useCallback(()=>{const ue=y.current,ge=g.current;if(!ue)return;const be=ue.getBoundingClientRect(),z=be.width,oe=be.height;if(!z||!oe)return;if(i==="cover"){A({width:z,height:oe,left:be.left,top:be.top});return}if(!ge){A(tr(ue));return}const{width:fe,height:ye}=sx(ge);if(!fe||!ye){A(tr(ue));return}const Me=fe/ye,Se=z/oe;if(Me>Se){const _=z/Me;A({width:z,height:_,left:be.left,top:be.top+(oe-_)/2})}else{const _=oe*Me;A({width:_,height:oe,left:be.left+(z-_)/2,top:be.top})}},[i]);a.useEffect(()=>{te();const ue=y.current;if(!ue)return;const ge=new ResizeObserver(()=>te());return ge.observe(ue),()=>ge.disconnect()},[te,n]),a.useEffect(()=>{L==="opening"&&V&&D("open")},[L,V]),a.useEffect(()=>{if(L!=="closing")return;const ue=setTimeout(()=>s(),In);return()=>clearTimeout(ue)},[L,s]),a.useEffect(()=>()=>{se()},[se]),a.useLayoutEffect(()=>{if(E.current===n)return;se(),W(0),Y(0),$(!1),S(!1),B(!1),m.current=0,b.current=0,I.current="none",R.current=!1,h.current=null,T.current=!1;const ue=y.current;ue&&A(tr(ue)),E.current=n},[n,$,se]),a.useEffect(()=>{if(L!=="open")return;let ue=null;const ge=()=>{ue&&(document.removeEventListener("click",ue,!0),ue=null)},be=()=>{ge(),ue=Se=>{Se.stopPropagation(),Se.preventDefault(),ge()},document.addEventListener("click",ue,!0)},z=Se=>{se(),G.current=!1,X(!1),Y(0),B(!1),R.current=!1,b.current=0,I.current="none";const _=y.current;_&&A(tr(_)),Se<0?d():l()},oe=Se=>{if(Math.abs(Se)>Q0&&t.length>1){z(Se);return}$(!0),Y(0),P()},fe=Se=>{if(Se.touches.length!==1||G.current)return;const _=Se.touches[0];T.current=!0,h.current={x:_.clientX,y:_.clientY},I.current="none",b.current=0,R.current=!1},ye=Se=>{if(!h.current||Se.touches.length!==1||G.current)return;const _=Se.touches[0],me=_.clientX-h.current.x,re=_.clientY-h.current.y;if(I.current==="none"){if(Math.abs(me)<10&&Math.abs(re)<10)return;if(Math.abs(me)>Math.abs(re)){if(t.length<=1)return;I.current="horizontal"}else if(re>0)I.current="vertical";else return}if(I.current==="horizontal"){R.current=!0,B(!0),b.current=me,Y(me),Se.preventDefault();return}I.current==="vertical"&&(R.current=!0,B(!0),m.current=re,W(re),Se.preventDefault())},Me=()=>{if(!h.current)return;const Se=I.current,_=R.current;if(_&&Se==="horizontal")oe(b.current),be();else if(_&&Se==="vertical")if(m.current>J0){const re=window.innerHeight;m.current=re,S(!0),W(re),D("closing")}else m.current=0,W(0),be();else Se==="horizontal"&&Math.abs(b.current)>0&&(oe(b.current),be());h.current=null,I.current="none",b.current=0,R.current=!1,B(!1)};return document.addEventListener("touchstart",fe,{passive:!0}),document.addEventListener("touchmove",ye,{passive:!1}),document.addEventListener("touchend",Me),document.addEventListener("touchcancel",Me),()=>{document.removeEventListener("touchstart",fe),document.removeEventListener("touchmove",ye),document.removeEventListener("touchend",Me),document.removeEventListener("touchcancel",Me),ge()}},[L,t.length,d,l,$,P,se]),a.useEffect(()=>{const ue=ge=>{ge.key==="Escape"&&(ge.preventDefault(),ge.stopPropagation(),L!=="closing"&&D("closing"))};return window.addEventListener("keydown",ue,!0),()=>window.removeEventListener("keydown",ue,!0)},[L]);const K=()=>{L!=="closing"&&D("closing")},he=L==="open",We=L==="closing",pe=x>0?Math.max(0,1-x/500):1,ce=x>0?Math.max(.35,1-x/500):1,U=ue=>{if(ue.stopPropagation(),T.current){T.current=!1;return}if(t.length<=1)return;const ge=ue.currentTarget.getBoundingClientRect(),be=ue.clientY-ge.top,z=Math.min(52,ge.height*.2);if(!(be>ge.height-z)){if(ue.clientX-ge.left<ge.width/2){l();return}d()}},Q=ue=>{if(t.length<=1)return;const ge=ue.currentTarget.getBoundingClientRect(),be=ue.clientX-ge.left,z=ue.clientY-ge.top,oe=Math.min(52,ge.height*.2);if(z>ge.height-oe){ue.currentTarget.style.cursor="default";return}ue.currentTarget.style.cursor=be<ge.width/2?"w-resize":"e-resize"},Z=a.useCallback(ue=>{ue.propertyName!=="transform"||!G.current||(se(),$(!1))},[se,$]),ke=ie?`translateX(${M}px)`:x>0?`translateY(${x}px)`:void 0,we={position:"fixed",top:V==null?void 0:V.top,left:V==null?void 0:V.left,width:V==null?void 0:V.width,height:V==null?void 0:V.height,objectFit:i==="cover"?"cover":"contain",transform:ke,opacity:x>0?ce:L==="opening"||We?0:1,transition:j&&!F?"none":F?`transform ${In}ms ${ci}`:ne?`transform ${In}ms ${ci}, opacity ${In}ms ${ci}`:L==="opening"||We?`opacity ${In}ms ${ci}`:"none",pointerEvents:ae&&he&&!ie?"auto":"none",touchAction:ae&&he?"none":void 0,zIndex:9998},Ae=V?{position:"fixed",top:V.top,height:V.height,width:V.width/2,zIndex:9999}:null;return r.jsxs("div",{className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:L==="open"?"none":void 0},onClick:K,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:p,opacity:he?pe:0,transition:j?"none":`opacity ${In}ms ${ci}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:v?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:y,style:{position:"absolute",inset:0}}),r.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:he?1:0,transition:`opacity ${In}ms ${ci}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&r.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:y,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:he?1:0,transition:`opacity ${In}ms ${ci}`},children:t.length>1&&r.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),V&&O&&(ae?r.jsx(px,{src:O.url,phase:L,mediaRef:g,mediaStyle:we,onLoadedMetadata:te,onClick:U,onMouseMove:Q,onTransitionEnd:Z},`${n}-${O.url}`):r.jsx("img",{ref:g,src:O.url,alt:O.name,onLoad:te,onTransitionEnd:Z,style:we},`${n}-${O.url}`)),he&&Ae&&t.length>1&&!ae&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...Ae,left:V.left,cursor:"w-resize",pointerEvents:ie?"none":"auto"},onClick:ue=>{if(T.current){T.current=!1;return}ue.stopPropagation(),l()}}),r.jsx("div",{style:{...Ae,left:V.left+V.width/2,cursor:"e-resize",pointerEvents:ie?"none":"auto"},onClick:ue=>{if(T.current){T.current=!1;return}ue.stopPropagation(),d()}})]})]})}function Ml({P:e,media:t,imgWidth:n,cornerRadius:i,fillGalleryWidth:o,imageDisplay:s,isEditor:l,galleryPaddingBetween:d=0,showPaddingAfter:c=!1,showControls:u=!1,onMediaClick:p}){const v=`${e}-gallery-${ka(t)?"video":"image"}`,y=s.display==="cover",g=dx(s),h=L=>C.scalingValue(L,l??!1),m=n??Mi,b=o?{width:"100%",maxWidth:"100%"}:{width:h(m),maxWidth:"100%"},I=i?{borderRadius:h(i)}:{},R={...b,...y?{aspectRatio:g,height:"auto",overflow:"hidden"}:{},...I},T={...y?{display:"block",width:"100%",height:"100%",objectFit:"cover",maxWidth:"100%"}:{display:"block",maxWidth:"100%",height:"auto",width:o?"100%":h(m)},...p?{cursor:"pointer",pointerEvents:"auto"}:{},...y?{}:I},k={className:v,style:T,onClick:p?L=>{L.stopPropagation(),p()}:void 0},V=Math.max(d,di),A=ka(t)?r.jsx("video",{...k,src:t.url,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):r.jsx("img",{...k,src:t.url,alt:t.name??""});return r.jsxs("div",{className:`${e}-gallery-item`,children:[y?r.jsx("div",{style:R,children:A}):A,c&&d>0&&r.jsx("div",{className:`${e}-padding-handle`,style:{height:h(d)},"aria-hidden":"true"}),u&&c&&r.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(V)}})]})}function gx({P:e,layoutType:t,galleryWidthStyle:n,galleryPaddingRight:i,galleryPaddingLeft:o,galleryPaddingRightWidth:s,galleryPaddingLeftWidth:l,galleryPaddingMaxFraction:d,showControls:c,scaled:u,children:p}){const v=t==="a"?i:t==="c"?o:0,y=v>0||c;return r.jsxs("div",{className:`${e}-gallery-controls`,children:[t==="c"&&y&&r.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(v)},"aria-hidden":"true"}),c&&t==="c"&&r.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%"}}),r.jsx("div",{className:`${e}-gallery`,style:n,children:p}),t==="a"&&y&&r.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(v)},"aria-hidden":"true"}),c&&t==="a"&&r.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(s),height:"100%"}})]})}function hx(e){switch(e){case"fade":case"retype":case"scroll":return e;case"default":return"scroll";default:return"scroll"}}function Pl({P:e,scaled:t,height:n,paired:i}){return r.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 kl({P:e,controlKey:t,scaled:n,width:i,maxFraction:o,side:s,paired:l,anchorStyle:d}){return r.jsx("div",{"data-controls":t,...l?{"data-controls-paired":""}:{},"data-controls-axis":"x","data-controls-variant":"column-padding",...s==="right"?{"data-controls-reverse":""}:{},"data-controls-min":"0","data-controls-max-fraction":String(o),className:`${e}-control-anchor`,style:{top:0,...s==="left"?{left:0}:{right:0},width:n(i),height:"100%",...d}})}function ga({P:e,title:t,position:n,titleRef:i,titleClassName:o,titleContainerStyle:s,titleTextBoxStyle:l,titleStyle:d,showTextBoxOutline:c=!1,topPaddingControl:u}){const p=a.useRef(null),[v,y]=a.useState(0),g=t??"",h=n==="left"||n==="center"||n==="right";return a.useLayoutEffect(()=>{if(!h)return;const m=p.current;if(!m||typeof ResizeObserver>"u")return;const b=()=>y(m.offsetHeight);b();const I=new ResizeObserver(b);return I.observe(m),()=>I.disconnect()},[g,h]),r.jsx("div",{ref:m=>{p.current=m,i(m)},className:[o,`${e}-title-position-${n}`].join(" "),style:{...h?{[`--${e}-title-height`]:`${v}px`}:{},...s},children:r.jsxs("div",{className:`${e}-title-text-stack`,style:l,children:[u,r.jsx("div",{className:c?`${e}-title-text-inner`:`${e}-title-text-inner-hidden`,style:{width:"100%"},children:r.jsx("span",{className:`${e}-title-text`,style:d,children:g})})]})})}const Al=45;function Fl(e,t,n){let i=e;for(;i;){const o=getComputedStyle(i).getPropertyValue(t).trim();if(o){const s=parseFloat(o);if(!Number.isNaN(s))return s}i=i.parentElement}return n}function fx(e){const t=Fl(e,"--cntrl-viewport-height",window.innerHeight),n=Fl(e,"--cntrl-article-top",0);return{top:n,centerY:n+t/2}}function yx(e,t,n){const{top:i,centerY:o}=fx(n);if(t==="top"){const l=n&&parseFloat(getComputedStyle(n).top)||i;return Math.abs(e.top-l)}const s=e.top+e.height/2;return Math.abs(s-o)}function vx(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=yx(u,n,c);return Math.exp(-(p*p)/(2*Al*Al))});let o=0,s=-1;return i.forEach((l,d)=>{l>s&&(s=l,o=d)}),{opacities:i,dominantIndex:o}}function xx(e,t,n){const i=a.useRef([]),[{opacities:o,dominantIndex:s},l]=a.useState(()=>({opacities:Array.from({length:e},(c,u)=>u===0?1:0),dominantIndex:0}));return a.useLayoutEffect(()=>{if(!t||e===0){l({opacities:Array.from({length:e},()=>1),dominantIndex:0});return}let c=0;const u=()=>{l(vx(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:s}}function bx(e,t){const[n,i]=a.useState(e),o=a.useRef(e);return a.useEffect(()=>{if(!t){o.current=e,i(e);return}const s=Array.from(o.current),l=Array.from(e),d=Math.max(s.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),...s.slice(c)].join("");o.current=p,i(p),c>=d&&window.clearInterval(u)},35);return()=>window.clearInterval(u)},[t,e]),n}function wx({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,portalId:s}){var Je;const{prefix:l}=C.useScopedStyles(),d=a.useMemo(()=>Y0(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)??Mi,y=(e==null?void 0:e.titleWidth)??lx,g=cx(e==null?void 0:e.imageDisplay),h=(e==null?void 0:e.cornerRadius)??X0,m=(e==null?void 0:e.position)??"center",b=(e==null?void 0:e.titleTopPadding)??0,I=(e==null?void 0:e.titleLeftPadding)??0,R=(e==null?void 0:e.titleRightPadding)??0,T=hx(e==null?void 0:e.transition),G=(e==null?void 0:e.lightbox)??"on",k=p==="b",V=T==="fade"||T==="retype",{setTitleRef:A,dominantIndex:L}=xx(c.length,V,m),D=((Je=c[L])==null?void 0:Je.title)??"",x=bx(D,T==="retype"),W=T==="fade"||T==="retype",M=T==="retype"?x:D,Y=k?void 0:{width:C.scalingValue(v,n??!1)},F=G==="on"&&(!n||i||o),X=o??!1,j=(e==null?void 0:e.galleryPaddingRight)??0,B=(e==null?void 0:e.galleryPaddingLeft)??0,ne=(e==null?void 0:e.galleryPaddingBetween)??0,S=nt=>C.scalingValue(nt,n??!1),O={width:S(y)},ae=p==="a"?j:B,ie=k?{width:"100%"}:{width:`calc(100% - ${S(v)} - ${S(ae)})`,...p==="c"?{marginLeft:"auto"}:{}},$=Math.max(j,di),se=Math.max(B,di),P=Math.max(ne,di),te=Math.max(b,di),K=Math.max(I,di),he=Math.max(R,di),We=Math.max(0,(u??1)-(v??Mi)),pe=p==="a"?Math.max(0,(u??1)-(v??Mi)-j):p==="c"?Math.max(0,(u??1)-(v??Mi)-B):p==="b"?u??1:1,ce=X&&(p==="a"||p==="b"||p==="c")&&m==="top",U=X&&((p==="a"||p==="b")&&(m==="left"||m==="top")||p==="c"&&(m==="left"||m==="top")),Q=X&&((p==="c"||p==="b")&&m==="right"||p==="a"&&m==="right"),Z=c.length>1,ke=k?void 0:S((p==="c"?B:j)+(v??Mi)),we=p==="c"&&ke?{left:ke}:void 0,Ae=p==="a"&&ke?{right:ke}:void 0,ue=k?{left:0,width:"100%"}:p==="a"?{right:S(j),width:S(v)}:{left:S(B),width:S(v)},{titleColor:ge,titleFontFamily:be,titleFontSettings:z,titleFontSize:oe,titleLineHeight:fe,titleLetterSpacing:ye,titleWordSpacing:Me,titleAlign:Se,titleTextAppearance:_,lightboxCounterColor:me,lightboxCounterFontFamily:re,lightboxCounterFontSettings:H,lightboxCounterFontSize:ee,lightboxCounterLineHeight:Fe,lightboxCounterLetterSpacing:le,lightboxCounterWordSpacing:N,lightboxCounterTextAppearance:Xe}=e??{},je={fontSettings:{fontFamily:be,fontWeight:(z==null?void 0:z.fontWeight)??400,fontStyle:(z==null?void 0:z.fontStyle)??"normal"},fontSize:oe??.01,lineHeight:fe,letterSpacing:ye??0,wordSpacing:Me??0,textAlign:Se??"left",textAppearance:_,color:ge??"#000000"},tt=rn(Kt(je,n)),ft=O,st=El(oe,fe,l,n),Ue=Il(oe,fe,`${l}-title`,`${l}-text-tight-leading`),ve={fontSettings:{fontFamily:re,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:ee??.01,lineHeight:Fe,letterSpacing:le??0,wordSpacing:N??0,textAppearance:Xe,color:me??"#DEDDDD"},ze={...rn(Kt(ve,n)),...El(ee,Fe,l,n)},Ye=Il(ee,Fe,`${l}-lightbox-counter`,`${l}-text-tight-leading`),Ce=C.buildColorVars(l,{titleColor:ge??"#000000",lightboxCounterColor:me??"#DEDDDD"},ex,tx),Oe=a.useRef(null),[Ve,Re]=a.useState(!1),[Ie,qe]=a.useState([]),[lt,Ze]=a.useState(0),Ee=a.useCallback((nt,et)=>{F&&(qe(nt),Ze(et),Re(!0))},[F]),Ge=a.useCallback(()=>{Re(!1)},[]),Pe=a.useMemo(()=>{const nt={...Ce},et=Oe.current?getComputedStyle(Oe.current).getPropertyValue("--cntrl-article-width").trim():"";return et&&(nt["--cntrl-article-width"]=et),nt},[Ce,Ve]);return a.useEffect(()=>{if(!Ve||G!=="on"||typeof document>"u")return;const nt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=nt}},[Ve,G]),a.useEffect(()=>{!n||o||i||Re(!1)},[n,o,i]),a.useEffect(()=>{G==="off"&&Re(!1)},[G]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),r.jsx("div",{style:Ce,children:r.jsxs("div",{ref:Oe,className:`${l}-wrapper`,style:{width:C.scalingValue(u,n??!1),[`--${l}-title-top-padding`]:(p==="a"||p==="b"||p==="c")&&m==="top"?S(b):void 0,[`--${l}-title-left-padding`]:(p==="a"||p==="b")&&(m==="left"||m==="top")||p==="c"&&(m==="left"||m==="top")?S(I):void 0,[`--${l}-title-right-padding`]:(p==="c"||p==="b")&&m==="right"||p==="a"&&m==="right"?S(R):void 0},children:[W&&r.jsx("div",{className:`${l}-single-title-layer`,children:r.jsx(ga,{P:l,title:M,position:m,titleRef:()=>{},titleClassName:`${Ue} ${l}-single-title`,titleContainerStyle:{...st,...ie},titleTextBoxStyle:ft,titleStyle:tt,showTextBoxOutline:X,topPaddingControl:ce?Pl({P:l,scaled:S,height:te,paired:!1}):void 0})}),c.map((nt,et)=>{const St=rx(nt.gallery),Wt=et<c.length-1,At=St.filter(xt=>xt.lightboxMedia).map(xt=>xt.lightboxMedia),gt={P:l,position:m,titleRef:A(et),titleClassName:Ue,titleContainerStyle:st,titleTextBoxStyle:W?{maxWidth:"100%"}:ft,titleStyle:tt,showTextBoxOutline:X&&!W,topPaddingControl:ce&&!W?Pl({P:l,scaled:S,height:te,paired:Z}):void 0};return r.jsxs("div",{"data-item-index":et,className:`${l}-item ${l}-item-${p}`,style:{paddingBottom:Wt?S(ne):void 0},children:[U&&kl({P:l,controlKey:"titleLeftPadding",scaled:S,width:K,maxFraction:pe,side:"left",paired:Z,anchorStyle:we}),Q&&kl({P:l,controlKey:"titleRightPadding",scaled:S,width:he,maxFraction:pe,side:"right",paired:Z,anchorStyle:Ae}),X&&Wt&&r.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:S(P),...ue}}),k?r.jsxs("div",{className:`${l}-gallery`,children:[r.jsx("div",{className:`${l}-gallery-media`,children:St.map(({displayMedia:xt,lightboxMedia:zt},Ft)=>{const bt=zt?At.findIndex(_t=>_t.url===zt.url):-1;return r.jsx(Ml,{P:l,media:xt,imgWidth:v||void 0,cornerRadius:h||void 0,imageDisplay:g,isEditor:n,galleryPaddingBetween:ne,showPaddingAfter:Ft<St.length-1,showControls:X,onMediaClick:F&&bt>=0?()=>Ee(At,bt):void 0},`${xt.url}-${Ft}`)})}),r.jsx("div",{className:`${l}-title-layer`,children:r.jsx(ga,{...gt,title:W?"":nt.title})})]}):r.jsxs(r.Fragment,{children:[r.jsx(ga,{...gt,title:W?"":nt.title}),St.length>0&&r.jsx(gx,{P:l,layoutType:p,galleryWidthStyle:Y,galleryPaddingRight:j,galleryPaddingLeft:B,galleryPaddingRightWidth:$,galleryPaddingLeftWidth:se,galleryPaddingMaxFraction:We,showControls:X,scaled:S,children:St.map(({displayMedia:xt,lightboxMedia:zt},Ft)=>{const bt=zt?At.findIndex(_t=>_t.url===zt.url):-1;return r.jsx(Ml,{P:l,media:xt,cornerRadius:h||void 0,fillGalleryWidth:!0,imageDisplay:g,isEditor:n,galleryPaddingBetween:ne,showPaddingAfter:Ft<St.length-1,showControls:X,onMediaClick:F&&bt>=0?()=>Ee(At,bt):void 0},`${xt.url}-${Ft}`)})})]})]},et)})]})}),Ve&&G==="on"&&typeof document<"u"&&e&&(()=>{const nt=(s?document.getElementById(s):null)??document.body;return Yn.createPortal(r.jsx("div",{style:Pe,"data-selection":"none",children:r.jsx(mx,{prefix:l,items:Ie,index:lt,imageDisplay:ux(e.lightboxImageDisplay),isEditor:n,onClose:Ge,onPrev:()=>Ze(et=>(et-1+Ie.length)%Ie.length),onNext:()=>Ze(et=>(et+1)%Ie.length),counterClassName:Ye,counterStyle:ze,backgroundColor:e.backgroundColor??Z0})}),nt)})()]})}const Sx=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
21009
21022
  import { createPortal } from 'react-dom';
21010
21023
  import type React from 'react';
21011
21024
  import { CommonComponentProps } from '../props';
@@ -23103,7 +23116,7 @@ ${t}
23103
23116
  `}function Fo(e){return Number(e.toFixed(4))}function _l(e,t,n,i){const s=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(s)?Math.min(i,Math.max(n,Math.round(s))):t}function fa(e,t,n=0,i=9999){const s=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(s)?Math.min(i,Math.max(n,s)):t}function zx(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 Bx(e){const[t,n]=e.ratioValue.split(":").map(Number),i=e.reversed?n:t;return(e.reversed?t:n)/i}function Vx(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 ed(e,t){return(1-e)/(1-e*Math.cos(t))}function Gx(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)*ed(e,i)))}return t||1}function qx(e,t){return e?1:1+Qc*(.35+t)}function Ux(e,t,n,i){const o=t*qx(n,i);return Math.max(0,(e-o)/2)}function td(e,t,n){const i=ed(e,n);return{offset:Math.sin(n)*i/t,scale:i}}function nd(e,t,n){return e/2+t*n}function Xx(e,t,n){return e(t-n/2)}function Kx(e,t){return e*t}function id(e){return Math.round(e*1e3)}function od(e,t,n){const i=Math.cos(e),o=Math.cos(Dx*Math.PI/2);if(i>=o)return n;const s=(i+1)/(o+1);return Fo(t+(n-t)*s)}function rd(e){return od(e,_x,Hx)}function Yx(e){return od(e,Nx,Ox)}function ad(e,t){if(!t)return"none";const n=Yx(e);return n<=0?"none":`blur(${n}px)`}function Zx(e,t,n,i,o,s,l,d){const{offset:c,scale:u}=td(i,o,s*Math.PI*2),p=s*Math.PI*2,v=nd(t,n,c),y=Fo(u),g=`calc(${e(v)} - var(--helix-base-w) * ${y} / 2)`,h=`calc(var(--helix-base-w) * ${y})`,m=l?`height: calc(var(--helix-base-h) * ${y});`:"";return`left: ${g}; width: ${h}; ${m} z-index: ${id(u)}; transform: translateY(-50%); opacity: ${rd(p)}; filter: ${ad(p,d)};`}function Jx(e,t,n,i,o,s,l,d){const c=[];for(let u=0;u<=Wl;u+=1){const p=u/Wl;c.push(` ${Fo(p*100)}% { ${Zx(t,n,i,o,s,p,l,d)} }`)}return`@keyframes ${e}-orbit {
23104
23117
  ${c.join(`
23105
23118
  `)}
23106
- }`}function sd(e,t){return(e%t+t)%t}function Qx(e,t){return ps(e,t)/t}function ps(e,t){return sd(e,t)}function eb(e,t){return Math.floor(e/t)}function tb(e,t,n,i){return eb(e,t)*n+ps(e,t)*i}function nb(e,t,n){const i=n==="left"?1-e:e;return`${Fo(-i*t)}s`}function Hl(e){const t=Math.sin(e*12.9898)*43758.5453;return t-Math.floor(t)}function ld(e){const t=e%1;return t<0?t+1:t}function ib(e,t,n){const i=t/Jc,o=n==="left"?-e*i:e*i;return ld(o)}function ob({settings:e,content:t,isEditor:n,isPreviewMode:i}){const{prefix:o}=C.useScopedStyles(),s=a.useRef(null),l=fa((e==null?void 0:e.width)??(e==null?void 0:e.spread)??(e==null?void 0:e.wrapperWidth),Ix),d=fa(e==null?void 0:e.imageWidth,Ex),c=fa(e==null?void 0:e.turnHeight,Mx),u=_l(e==null?void 0:e.itemsPerTurn,Px,3,40),p=_l(e==null?void 0:e.turns,kx,1,30),v=Math.min(Wx,Math.max(0,Ax)),y=Math.min(1,Math.max(0,Fx)),g=Math.max(0,(e==null?void 0:e.speed)??Jc),h=(e==null?void 0:e.direction)==="left"?"left":"right",m=(e==null?void 0:e.playback)==="scroll"?"scroll":"autoplay",b=(e==null?void 0:e.cornerRadius)??0,I=(e==null?void 0:e.blur)!=="off",R=a.useMemo(()=>zx(e==null?void 0:e.imageDisplay),[e==null?void 0:e.imageDisplay]),T=R.display==="cover",G=ie=>C.scalingValue(ie,n??!1),k=a.useMemo(()=>Gx(v),[v]),V=a.useMemo(()=>Ux(l,d,T,y),[l,d,T,y]),A=a.useMemo(()=>jx(o,Jx(o,G,l,V,v,k,T,I)),[o,l,V,v,k,T,I,n]),L=a.useMemo(()=>(t??[]).filter(ie=>{var $;return!!(($=ie.image)!=null&&$.url)}),[t]),D=c/u,x=d*Bx(R),W=Math.min(Lx,p*u),M=Rx*u,Y=W+M*2,X=Math.max(0,p-1)*c+(u-1)*D,j=g>0,B=m==="scroll"&&j,ne=m==="autoplay"&&j&&(n?!!i:!0),[S,E]=a.useState(0);a.useEffect(()=>{if(!B)return;const ie=s.current;if(!ie)return;const $=()=>{const P=ie.getBoundingClientRect(),te=window.innerHeight||document.documentElement.clientHeight,K=te+P.height;K<=0||E(Math.min(1,Math.max(0,(te-P.top)/K)))};$(),window.addEventListener("scroll",$,{passive:!0}),window.addEventListener("resize",$);const re=new ResizeObserver($);return re.observe(ie),()=>{window.removeEventListener("scroll",$),window.removeEventListener("resize",$),re.disconnect()}},[B]);const O=B?ib(S,g,h):0,ae=j&&m==="autoplay"?360/(g*Tx):0;return L.length===0?r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:A}}),r.jsx("div",{className:`${o}-wrapper`,style:{width:G(l),marginInline:"auto"}})]}):r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:A}}),r.jsx("div",{ref:s,className:`${o}-wrapper`,style:{width:G(l),height:G(X),marginInline:"auto"},children:Array.from({length:Y},(ie,$)=>{const re=$-M,te=L[sd(re,L.length)].image,K=ps(re,u),fe=Qx(re,u),We=B?ld(fe+O):fe,me=tb(re,u,c,D),ce=y===0?0:(Hl(K+7.3)-.5)*y*D,U=T?1:1+(Hl(K+3.1)-.5)*2*Qc*(.35+y),Q=We*Math.PI*2,{offset:Z,scale:ke}=td(v,k,Q),we=d*U,Pe=Kx(we,ke),de=nd(l,V,Z),ge={"--helix-base-w":G(we),...T?{"--helix-base-h":G(x)}:{}},be={top:G(me+ce),transform:"translateY(-50%)",...ge,...ne?{animationDuration:`${Fo(ae)}s`,animationDelay:nb(fe,ae,h),animationDirection:h==="left"?"reverse":"normal"}:{left:Xx(G,de,Pe),width:G(Pe),...T?{height:G(x*ke)}:{},zIndex:id(ke),opacity:rd(Q),filter:ad(Q,I)}},z=b>0?{borderRadius:G(b)}:{},se=T?{...z,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"}:z,he=Vx(te)?r.jsx("video",{className:`${o}-media`,style:se,src:te.url,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):r.jsx("img",{className:`${o}-media`,style:se,src:te.url,alt:te.name??"",loading:"lazy",decoding:"async"});return r.jsx("div",{className:ne?`${o}-item`:`${o}-item ${o}-item-static`,style:be,children:T?r.jsx("div",{className:`${o}-cover`,style:z,children:he}):he},`${p}-${u}-${re}`)})})]})}const rb=`import { useEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
23119
+ }`}function sd(e,t){return(e%t+t)%t}function Qx(e,t){return ps(e,t)/t}function ps(e,t){return sd(e,t)}function eb(e,t){return Math.floor(e/t)}function tb(e,t,n,i){return eb(e,t)*n+ps(e,t)*i}function nb(e,t,n){const i=n==="left"?1-e:e;return`${Fo(-i*t)}s`}function Hl(e){const t=Math.sin(e*12.9898)*43758.5453;return t-Math.floor(t)}function ld(e){const t=e%1;return t<0?t+1:t}function ib(e,t,n){const i=t/Jc,o=n==="left"?-e*i:e*i;return ld(o)}function ob({settings:e,content:t,isEditor:n,isPreviewMode:i}){const{prefix:o}=C.useScopedStyles(),s=a.useRef(null),l=fa((e==null?void 0:e.width)??(e==null?void 0:e.spread)??(e==null?void 0:e.wrapperWidth),Ix),d=fa(e==null?void 0:e.imageWidth,Ex),c=fa(e==null?void 0:e.turnHeight,Mx),u=_l(e==null?void 0:e.itemsPerTurn,Px,3,40),p=_l(e==null?void 0:e.turns,kx,1,30),v=Math.min(Wx,Math.max(0,Ax)),y=Math.min(1,Math.max(0,Fx)),g=Math.max(0,(e==null?void 0:e.speed)??Jc),h=(e==null?void 0:e.direction)==="left"?"left":"right",m=(e==null?void 0:e.playback)==="scroll"?"scroll":"autoplay",b=(e==null?void 0:e.cornerRadius)??0,I=(e==null?void 0:e.blur)!=="off",R=a.useMemo(()=>zx(e==null?void 0:e.imageDisplay),[e==null?void 0:e.imageDisplay]),T=R.display==="cover",G=ie=>C.scalingValue(ie,n??!1),k=a.useMemo(()=>Gx(v),[v]),V=a.useMemo(()=>Ux(l,d,T,y),[l,d,T,y]),A=a.useMemo(()=>jx(o,Jx(o,G,l,V,v,k,T,I)),[o,l,V,v,k,T,I,n]),L=a.useMemo(()=>(t??[]).filter(ie=>{var $;return!!(($=ie.image)!=null&&$.url)}),[t]),D=c/u,x=d*Bx(R),W=Math.min(Lx,p*u),M=Rx*u,Y=W+M*2,X=Math.max(0,p-1)*c+(u-1)*D,j=g>0,B=m==="scroll"&&j,ne=m==="autoplay"&&j&&(n?!!i:!0),[S,E]=a.useState(0);a.useEffect(()=>{if(!B)return;const ie=s.current;if(!ie)return;const $=()=>{const P=ie.getBoundingClientRect(),te=window.innerHeight||document.documentElement.clientHeight,K=te+P.height;K<=0||E(Math.min(1,Math.max(0,(te-P.top)/K)))};$(),window.addEventListener("scroll",$,{passive:!0}),window.addEventListener("resize",$);const se=new ResizeObserver($);return se.observe(ie),()=>{window.removeEventListener("scroll",$),window.removeEventListener("resize",$),se.disconnect()}},[B]);const O=B?ib(S,g,h):0,ae=j&&m==="autoplay"?360/(g*Tx):0;return L.length===0?r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:A}}),r.jsx("div",{className:`${o}-wrapper`,style:{width:G(l),marginInline:"auto"}})]}):r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:A}}),r.jsx("div",{ref:s,className:`${o}-wrapper`,style:{width:G(l),height:G(X),marginInline:"auto"},children:Array.from({length:Y},(ie,$)=>{const se=$-M,te=L[sd(se,L.length)].image,K=ps(se,u),he=Qx(se,u),We=B?ld(he+O):he,pe=tb(se,u,c,D),ce=y===0?0:(Hl(K+7.3)-.5)*y*D,U=T?1:1+(Hl(K+3.1)-.5)*2*Qc*(.35+y),Q=We*Math.PI*2,{offset:Z,scale:ke}=td(v,k,Q),we=d*U,Ae=Kx(we,ke),ue=nd(l,V,Z),ge={"--helix-base-w":G(we),...T?{"--helix-base-h":G(x)}:{}},be={top:G(pe+ce),transform:"translateY(-50%)",...ge,...ne?{animationDuration:`${Fo(ae)}s`,animationDelay:nb(he,ae,h),animationDirection:h==="left"?"reverse":"normal"}:{left:Xx(G,ue,Ae),width:G(Ae),...T?{height:G(x*ke)}:{},zIndex:id(ke),opacity:rd(Q),filter:ad(Q,I)}},z=b>0?{borderRadius:G(b)}:{},oe=T?{...z,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"}:z,fe=Vx(te)?r.jsx("video",{className:`${o}-media`,style:oe,src:te.url,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):r.jsx("img",{className:`${o}-media`,style:oe,src:te.url,alt:te.name??"",loading:"lazy",decoding:"async"});return r.jsx("div",{className:ne?`${o}-item`:`${o}-item ${o}-item-static`,style:be,children:T?r.jsx("div",{className:`${o}-cover`,style:z,children:fe}):fe},`${p}-${u}-${se}`)})})]})}const rb=`import { useEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
23107
23120
  import { CommonComponentProps } from '../props';
23108
23121
  import { scalingValue } from '../utils/scalingValue';
23109
23122
  import { useScopedStyles } from '../utils/useScopedStyles';