@cntrl-site/components 1.0.97-5 → 1.0.97-7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("react"),Rt=require("classnames"),b=require("./EmbedMediaFrame-C5O6lDaq.js"),qn=require("react-dom");function um(e){return e.type==="object"&&e.version===1}const pm="ControlSlider-module__wrapper___sHEkd",mm="ControlSlider-module__hoverArrow___A-dOH",gm="ControlSlider-module__sliderItem___QQSkR",hm="ControlSlider-module__sliderImage___9hRl-",fm="ControlSlider-module__arrow___05ghY",ym="ControlSlider-module__arrowVertical___tBfVN",vm="ControlSlider-module__nextArrow___-30Yc",xm="ControlSlider-module__arrowInner___aEra3",bm="ControlSlider-module__arrowIcon___S4ztF",Sm="ControlSlider-module__arrowImg___2dwJW",wm="ControlSlider-module__mirror___brd6U",$m="ControlSlider-module__pagination___bicLF",Cm="ControlSlider-module__paginationInner___bT-P-",Tm="ControlSlider-module__paginationVertical___zYqKw",Im="ControlSlider-module__paginationItem___nTRbk",Lm="ControlSlider-module__dot___p1Qun",Mm="ControlSlider-module__activeDot___LHFaj",Pm="ControlSlider-module__paginationInsideBottom___R3FWn",Rm="ControlSlider-module__paginationInsideTop___V-qb-",Em="ControlSlider-module__paginationOutsideBottom___14w8D",km="ControlSlider-module__paginationOutsideTop___SCLqB",Am="ControlSlider-module__paginationInsideLeft___yOBRZ",Fm="ControlSlider-module__paginationInsideRight___Rtt3o",Nm="ControlSlider-module__paginationOutsideLeft___lahaw",_m="ControlSlider-module__paginationOutsideRight___EtuQa",Hm="ControlSlider-module__imgWrapper___UjEgB",Wm="ControlSlider-module__captionBlock___dJ6-j",Om="ControlSlider-module__captionTextWrapper___HFlpf",Dm="ControlSlider-module__captionText___uGBVc",zm="ControlSlider-module__active___WZK4G",Bm="ControlSlider-module__withPointerEvents___t-18M",jm="ControlSlider-module__topLeftAlignment___zjnGM",Vm="ControlSlider-module__topCenterAlignment___gD1xW",Gm="ControlSlider-module__topRightAlignment___NMapS",Xm="ControlSlider-module__middleLeftAlignment___OnUrY",Um="ControlSlider-module__middleCenterAlignment___Tdkl0",qm="ControlSlider-module__middleRightAlignment___wEbfX",Km="ControlSlider-module__bottomLeftAlignment___cTP2-",Ym="ControlSlider-module__bottomCenterAlignment___c54fB",Qm="ControlSlider-module__bottomRightAlignment___kEwrz",Zm="ControlSlider-module__clickOverlay___DZA28",Jm="ControlSlider-module__contain___pLyq7",eg="ControlSlider-module__cover___KdDat",Pt={wrapper:pm,hoverArrow:mm,sliderItem:gm,sliderImage:hm,arrow:fm,arrowVertical:ym,nextArrow:vm,arrowInner:xm,arrowIcon:bm,arrowImg:Sm,mirror:wm,pagination:$m,paginationInner:Cm,paginationVertical:Tm,paginationItem:Im,dot:Lm,activeDot:Mm,paginationInsideBottom:Pm,paginationInsideTop:Rm,paginationOutsideBottom:Em,paginationOutsideTop:km,paginationInsideLeft:Am,paginationInsideRight:Fm,paginationOutsideLeft:Nm,paginationOutsideRight:_m,imgWrapper:Hm,captionBlock:Wm,captionTextWrapper:Om,captionText:Dm,active:zm,withPointerEvents:Bm,topLeftAlignment:jm,topCenterAlignment:Vm,topRightAlignment:Gm,middleLeftAlignment:Xm,middleCenterAlignment:Um,middleRightAlignment:qm,bottomLeftAlignment:Km,bottomCenterAlignment:Ym,bottomRightAlignment:Qm,clickOverlay:Zm,contain:Jm,cover:eg};function tg(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 ng(e,t,n){return t&&tg(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var nc="(prefers-reduced-motion: reduce)",go=1,ig=2,Co=3,Wo=4,Cr=5,sa=6,fa=7,og={CREATED:go,MOUNTED:ig,IDLE:Co,MOVING:Wo,SCROLLING:Cr,DRAGGING:sa,DESTROYED:fa};function ci(e){e.length=0}function Ai(e,t,n){return Array.prototype.slice.call(e,t,n)}function tn(e){return e.bind.apply(e,[null].concat(Ai(arguments,1)))}var uu=setTimeout,Ns=function(){};function ic(e){return requestAnimationFrame(e)}function Pa(e,t){return typeof t===e}function dr(e){return!pl(e)&&Pa("object",e)}var ul=Array.isArray,pu=tn(Pa,"function"),Mi=tn(Pa,"string"),Tr=tn(Pa,"undefined");function pl(e){return e===null}function mu(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Ir(e){return ul(e)?e:[e]}function kn(e,t){Ir(e).forEach(t)}function ml(e,t){return e.indexOf(t)>-1}function la(e,t){return e.push.apply(e,Ir(t)),e}function oi(e,t,n){e&&kn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Gn(e,t){oi(e,Mi(t)?t.split(" "):t,!0)}function Lr(e,t){kn(t,e.appendChild.bind(e))}function gl(e,t){kn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function ur(e,t){return mu(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function gu(e,t){var n=e?Ai(e.children):[];return t?n.filter(function(i){return ur(i,t)}):n}function Mr(e,t){return t?gu(e,t)[0]:e.firstElementChild}var pr=Object.keys;function qi(e,t,n){return e&&(n?pr(e).reverse():pr(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function mr(e){return Ai(arguments,1).forEach(function(t){qi(t,function(n,i){e[i]=t[i]})}),e}function Ci(e){return Ai(arguments,1).forEach(function(t){qi(t,function(n,i){ul(n)?e[i]=n.slice():dr(n)?e[i]=Ci({},dr(e[i])?e[i]:{},n):e[i]=n})}),e}function oc(e,t){kn(t||pr(e),function(n){delete e[n]})}function Xn(e,t){kn(e,function(n){kn(t,function(i){n&&n.removeAttribute(i)})})}function Xt(e,t,n){dr(t)?qi(t,function(i,o){Xt(e,o,i)}):kn(e,function(i){pl(n)||n===""?Xn(i,t):i.setAttribute(t,String(n))})}function xo(e,t,n){var i=document.createElement(e);return t&&(Mi(t)?Gn(i,t):Xt(i,t)),n&&Lr(n,i),i}function _n(e,t,n){if(Tr(n))return getComputedStyle(e)[t];pl(n)||(e.style[t]=""+n)}function gr(e,t){_n(e,"display",t)}function hu(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Hn(e,t){return e.getAttribute(t)}function rc(e,t){return e&&e.classList.contains(t)}function Mn(e){return e.getBoundingClientRect()}function Yi(e){kn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function fu(e){return Mr(new DOMParser().parseFromString(e,"text/html").body)}function ni(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function yu(e,t){return e&&e.querySelector(t)}function hl(e,t){return t?Ai(e.querySelectorAll(t)):[]}function ri(e,t){oi(e,t,!1)}function _s(e){return e.timeStamp}function _i(e){return Mi(e)?e:e?e+"px":""}var Pr="splide",fl="data-"+Pr;function ar(e,t){if(!e)throw new Error("["+Pr+"] "+(t||""))}var Pi=Math.min,ya=Math.max,va=Math.floor,hr=Math.ceil,xn=Math.abs;function vu(e,t,n){return xn(e-t)<n}function ca(e,t,n,i){var o=Pi(t,n),r=ya(t,n);return i?o<e&&e<r:o<=e&&e<=r}function co(e,t,n){var i=Pi(t,n),o=ya(t,n);return Pi(ya(i,e),o)}function Hs(e){return+(e>0)-+(e<0)}function Ws(e,t){return kn(t,function(n){e=e.replace("%s",""+n)}),e}function yl(e){return e<10?"0"+e:""+e}var ac={};function rg(e){return""+e+yl(ac[e]=(ac[e]||0)+1)}function xu(){var e=[];function t(l,c,d,u){o(l,c,function(p,y,x){var m="addEventListener"in p,f=m?p.removeEventListener.bind(p,y,d,u):p.removeListener.bind(p,d);m?p.addEventListener(y,d,u):p.addListener(d),e.push([p,y,x,d,f])})}function n(l,c,d){o(l,c,function(u,p,y){e=e.filter(function(x){return x[0]===u&&x[1]===p&&x[2]===y&&(!d||x[3]===d)?(x[4](),!1):!0})})}function i(l,c,d){var u,p=!0;return typeof CustomEvent=="function"?u=new CustomEvent(c,{bubbles:p,detail:d}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(c,p,!1,d)),l.dispatchEvent(u),u}function o(l,c,d){kn(l,function(u){u&&kn(c,function(p){p.split(" ").forEach(function(y){var x=y.split(".");d(u,x[0],x[1])})})})}function r(){e.forEach(function(l){l[4]()}),ci(e)}return{bind:t,unbind:n,dispatch:i,destroy:r}}var Fi="mounted",Os="ready",di="move",Oo="moved",vl="click",bu="active",Su="inactive",wu="visible",$u="hidden",ln="refresh",hn="updated",To="resize",Ra="resized",Cu="drag",Tu="dragging",Iu="dragged",Ea="scroll",Ji="scrolled",ag="overflow",xl="destroy",Lu="arrows:mounted",Mu="arrows:updated",Pu="pagination:mounted",Ru="pagination:updated",bl="navigation:mounted",Sl="autoplay:play",Eu="autoplay:playing",wl="autoplay:pause",$l="lazyload:loaded",ku="sk",Au="sh",xa="ei";function an(e){var t=e?e.event.bus:document.createDocumentFragment(),n=xu();function i(r,l){n.bind(t,Ir(r).join(" "),function(c){l.apply(l,ul(c.detail)?c.detail:[])})}function o(r){n.dispatch(t,r,Ai(arguments,1))}return e&&e.event.on(xl,n.destroy),mr(n,{bus:t,on:i,off:tn(n.unbind,t),emit:o})}function ka(e,t,n,i){var o=Date.now,r,l=0,c,d=!0,u=0;function p(){if(!d){if(l=e?Pi((o()-r)/e,1):1,n&&n(l),l>=1&&(t(),r=o(),i&&++u>=i))return x();c=ic(p)}}function y(N){N||f(),r=o()-(N?l*e:0),d=!1,c=ic(p)}function x(){d=!0}function m(){r=o(),l=0,n&&n(l)}function f(){c&&cancelAnimationFrame(c),l=0,c=0,d=!0}function S(N){e=N}function w(){return d}return{start:y,rewind:m,pause:x,cancel:f,set:S,isPaused:w}}function sg(e){var t=e;function n(o){t=o}function i(o){return ml(Ir(o),t)}return{set:n,is:i}}function lg(e,t){var n=ka(0,e,null,1);return function(){n.isPaused()&&n.start()}}function cg(e,t,n){var i=e.state,o=n.breakpoints||{},r=n.reducedMotion||{},l=xu(),c=[];function d(){var f=n.mediaQuery==="min";pr(o).sort(function(S,w){return f?+S-+w:+w-+S}).forEach(function(S){p(o[S],"("+(f?"min":"max")+"-width:"+S+"px)")}),p(r,nc),y()}function u(f){f&&l.destroy()}function p(f,S){var w=matchMedia(S);l.bind(w,"change",y),c.push([f,w])}function y(){var f=i.is(fa),S=n.direction,w=c.reduce(function(N,v){return Ci(N,v[1].matches?v[0]:{})},{});oc(n),m(w),n.destroy?e.destroy(n.destroy==="completely"):f?(u(!0),e.mount()):S!==n.direction&&e.refresh()}function x(f){matchMedia(nc).matches&&(f?Ci(n,r):oc(n,pr(r)))}function m(f,S,w){Ci(n,f),S&&Ci(Object.getPrototypeOf(n),f),(w||!i.is(go))&&e.emit(hn,n)}return{setup:d,destroy:u,reduce:x,set:m}}var Aa="Arrow",Fa=Aa+"Left",Na=Aa+"Right",Fu=Aa+"Up",Nu=Aa+"Down",sc="rtl",_a="ttb",qa={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Fu,Na],ArrowRight:[Nu,Fa]};function dg(e,t,n){function i(r,l,c){c=c||n.direction;var d=c===sc&&!l?1:c===_a?0:-1;return qa[r]&&qa[r][d]||r.replace(/width|left|right/i,function(u,p){var y=qa[u.toLowerCase()][d]||u;return p>0?y.charAt(0).toUpperCase()+y.slice(1):y})}function o(r){return r*(n.direction===sc?1:-1)}return{resolve:i,orient:o}}var ai="role",bo="tabindex",ug="disabled",Wn="aria-",Rr=Wn+"controls",_u=Wn+"current",lc=Wn+"selected",Rn=Wn+"label",Cl=Wn+"labelledby",Hu=Wn+"hidden",Tl=Wn+"orientation",fr=Wn+"roledescription",cc=Wn+"live",dc=Wn+"busy",uc=Wn+"atomic",Il=[ai,bo,ug,Rr,_u,Rn,Cl,Hu,Tl,fr],Kn=Pr+"__",Ni="is-",Ka=Pr,pc=Kn+"track",pg=Kn+"list",Ha=Kn+"slide",Wu=Ha+"--clone",mg=Ha+"__container",Ll=Kn+"arrows",Wa=Kn+"arrow",Ou=Wa+"--prev",Du=Wa+"--next",Oa=Kn+"pagination",zu=Oa+"__page",gg=Kn+"progress",hg=gg+"__bar",fg=Kn+"toggle",yg=Kn+"spinner",vg=Kn+"sr",xg=Ni+"initialized",Qi=Ni+"active",Bu=Ni+"prev",ju=Ni+"next",Ds=Ni+"visible",zs=Ni+"loading",Vu=Ni+"focus-in",Gu=Ni+"overflow",bg=[Qi,Ds,Bu,ju,zs,Vu,Gu],Sg={slide:Ha,clone:Wu,arrows:Ll,arrow:Wa,prev:Ou,next:Du,pagination:Oa,page:zu,spinner:yg};function wg(e,t){if(pu(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!ur(n,t);)n=n.parentElement;return n}var $g=5,mc=200,Xu="touchstart mousedown",Ya="touchmove mousemove",Qa="touchend touchcancel mouseup click";function Cg(e,t,n){var i=an(e),o=i.on,r=i.bind,l=e.root,c=n.i18n,d={},u=[],p=[],y=[],x,m,f;function S(){M(),R(),v()}function w(){o(ln,N),o(ln,S),o(hn,v),r(document,Xu+" keydown",function(D){f=D.type==="keydown"},{capture:!0}),r(l,"focusin",function(){oi(l,Vu,!!f)})}function N(D){var _=Il.concat("style");ci(u),ri(l,p),ri(x,y),Xn([x,m],_),Xn(l,D?_:["style",fr])}function v(){ri(l,p),ri(x,y),p=X(Ka),y=X(pc),Gn(l,p),Gn(x,y),Xt(l,Rn,n.label),Xt(l,Cl,n.labelledby)}function M(){x=U("."+pc),m=Mr(x,"."+pg),ar(x&&m,"A track/list element is missing."),la(u,gu(m,"."+Ha+":not(."+Wu+")")),qi({arrows:Ll,pagination:Oa,prev:Ou,next:Du,bar:hg,toggle:fg},function(D,_){d[_]=U("."+D)}),mr(d,{root:l,track:x,list:m,slides:u})}function R(){var D=l.id||rg(Pr),_=n.role;l.id=D,x.id=x.id||D+"-track",m.id=m.id||D+"-list",!Hn(l,ai)&&l.tagName!=="SECTION"&&_&&Xt(l,ai,_),Xt(l,fr,c.carousel),Xt(m,ai,"presentation")}function U(D){var _=yu(l,D);return _&&wg(_,"."+Ka)===l?_:void 0}function X(D){return[D+"--"+n.type,D+"--"+n.direction,n.drag&&D+"--draggable",n.isNavigation&&D+"--nav",D===Ka&&Qi]}return mr(d,{setup:S,mount:w,destroy:N})}var Io="slide",Do="loop",Er="fade";function Tg(e,t,n,i){var o=an(e),r=o.on,l=o.emit,c=o.bind,d=e.Components,u=e.root,p=e.options,y=p.isNavigation,x=p.updateOnMove,m=p.i18n,f=p.pagination,S=p.slideFocus,w=d.Direction.resolve,N=Hn(i,"style"),v=Hn(i,Rn),M=n>-1,R=Mr(i,"."+mg),U;function X(){M||(i.id=u.id+"-slide"+yl(t+1),Xt(i,ai,f?"tabpanel":"group"),Xt(i,fr,m.slide),Xt(i,Rn,v||Ws(m.slideLabel,[t+1,e.length]))),D()}function D(){c(i,"click",tn(l,vl,K)),c(i,"keydown",tn(l,ku,K)),r([Oo,Au,Ji],C),r(bl,W),x&&r(di,T)}function _(){U=!0,o.destroy(),ri(i,bg),Xn(i,Il),Xt(i,"style",N),Xt(i,Rn,v||"")}function W(){var P=e.splides.map(function(h){var J=h.splide.Components.Slides.getAt(t);return J?J.slide.id:""}).join(" ");Xt(i,Rn,Ws(m.slideX,(M?n:t)+1)),Xt(i,Rr,P),Xt(i,ai,S?"button":""),S&&Xn(i,fr)}function T(){U||C()}function C(){if(!U){var P=e.index;q(),E(),oi(i,Bu,t===P-1),oi(i,ju,t===P+1)}}function q(){var P=I();P!==rc(i,Qi)&&(oi(i,Qi,P),Xt(i,_u,y&&P||""),l(P?bu:Su,K))}function E(){var P=j(),h=!P&&(!I()||M);if(e.state.is([Wo,Cr])||Xt(i,Hu,h||""),Xt(hl(i,p.focusableNodes||""),bo,h?-1:""),S&&Xt(i,bo,h?-1:0),P!==rc(i,Ds)&&(oi(i,Ds,P),l(P?wu:$u,K)),!P&&document.activeElement===i){var J=d.Slides.getAt(e.index);J&&hu(J.slide)}}function $(P,h,J){_n(J&&R||i,P,h)}function I(){var P=e.index;return P===t||p.cloneStatus&&P===n}function j(){if(e.is(Er))return I();var P=Mn(d.Elements.track),h=Mn(i),J=w("left",!0),V=w("right",!0);return va(P[J])<=hr(h[J])&&va(h[V])<=hr(P[V])}function F(P,h){var J=xn(P-t);return!M&&(p.rewind||e.is(Do))&&(J=Pi(J,e.length-J)),J<=h}var K={index:t,slideIndex:n,slide:i,container:R,isClone:M,mount:X,destroy:_,update:C,style:$,isWithin:F};return K}function Ig(e,t,n){var i=an(e),o=i.on,r=i.emit,l=i.bind,c=t.Elements,d=c.slides,u=c.list,p=[];function y(){x(),o(ln,m),o(ln,x)}function x(){d.forEach(function(C,q){S(C,q,-1)})}function m(){U(function(C){C.destroy()}),ci(p)}function f(){U(function(C){C.update()})}function S(C,q,E){var $=Tg(e,q,E,C);$.mount(),p.push($),p.sort(function(I,j){return I.index-j.index})}function w(C){return C?X(function(q){return!q.isClone}):p}function N(C){var q=t.Controller,E=q.toIndex(C),$=q.hasFocus()?1:n.perPage;return X(function(I){return ca(I.index,E,E+$-1)})}function v(C){return X(C)[0]}function M(C,q){kn(C,function(E){if(Mi(E)&&(E=fu(E)),mu(E)){var $=d[q];$?gl(E,$):Lr(u,E),Gn(E,n.classes.slide),_(E,tn(r,To))}}),r(ln)}function R(C){Yi(X(C).map(function(q){return q.slide})),r(ln)}function U(C,q){w(q).forEach(C)}function X(C){return p.filter(pu(C)?C:function(q){return Mi(C)?ur(q.slide,C):ml(Ir(C),q.index)})}function D(C,q,E){U(function($){$.style(C,q,E)})}function _(C,q){var E=hl(C,"img"),$=E.length;$?E.forEach(function(I){l(I,"load error",function(){--$||q()})}):q()}function W(C){return C?d.length:p.length}function T(){return p.length>n.perPage}return{mount:y,destroy:m,update:f,register:S,get:w,getIn:N,getAt:v,add:M,remove:R,forEach:U,filter:X,style:D,getLength:W,isEnough:T}}function Lg(e,t,n){var i=an(e),o=i.on,r=i.bind,l=i.emit,c=t.Slides,d=t.Direction.resolve,u=t.Elements,p=u.root,y=u.track,x=u.list,m=c.getAt,f=c.style,S,w,N;function v(){M(),r(window,"resize load",lg(tn(l,To))),o([hn,ln],M),o(To,R)}function M(){S=n.direction===_a,_n(p,"maxWidth",_i(n.width)),_n(y,d("paddingLeft"),U(!1)),_n(y,d("paddingRight"),U(!0)),R(!0)}function R(K){var P=Mn(p);(K||w.width!==P.width||w.height!==P.height)&&(_n(y,"height",X()),f(d("marginRight"),_i(n.gap)),f("width",_()),f("height",W(),!0),w=P,l(Ra),N!==(N=F())&&(oi(p,Gu,N),l(ag,N)))}function U(K){var P=n.padding,h=d(K?"right":"left");return P&&_i(P[h]||(dr(P)?0:P))||"0px"}function X(){var K="";return S&&(K=D(),ar(K,"height or heightRatio is missing."),K="calc("+K+" - "+U(!1)+" - "+U(!0)+")"),K}function D(){return _i(n.height||Mn(x).width*n.heightRatio)}function _(){return n.autoWidth?null:_i(n.fixedWidth)||(S?"":T())}function W(){return _i(n.fixedHeight)||(S?n.autoHeight?null:T():D())}function T(){var K=_i(n.gap);return"calc((100%"+(K&&" + "+K)+")/"+(n.perPage||1)+(K&&" - "+K)+")"}function C(){return Mn(x)[d("width")]}function q(K,P){var h=m(K||0);return h?Mn(h.slide)[d("width")]+(P?0:I()):0}function E(K,P){var h=m(K);if(h){var J=Mn(h.slide)[d("right")],V=Mn(x)[d("left")];return xn(J-V)+(P?0:I())}return 0}function $(K){return E(e.length-1)-E(0)+q(0,K)}function I(){var K=m(0);return K&&parseFloat(_n(K.slide,d("marginRight")))||0}function j(K){return parseFloat(_n(y,d("padding"+(K?"Right":"Left"))))||0}function F(){return e.is(Er)||$(!0)>C()}return{mount:v,resize:R,listSize:C,slideSize:q,sliderSize:$,totalSize:E,getPadding:j,isOverflow:F}}var Mg=2;function Pg(e,t,n){var i=an(e),o=i.on,r=t.Elements,l=t.Slides,c=t.Direction.resolve,d=[],u;function p(){o(ln,y),o([hn,To],m),(u=w())&&(f(u),t.Layout.resize(!0))}function y(){x(),p()}function x(){Yi(d),ci(d),i.destroy()}function m(){var N=w();u!==N&&(u<N||!N)&&i.emit(ln)}function f(N){var v=l.get().slice(),M=v.length;if(M){for(;v.length<N;)la(v,v);la(v.slice(-N),v.slice(0,N)).forEach(function(R,U){var X=U<N,D=S(R.slide,U);X?gl(D,v[0].slide):Lr(r.list,D),la(d,D),l.register(D,U-N+(X?0:M),R.index)})}}function S(N,v){var M=N.cloneNode(!0);return Gn(M,n.classes.clone),M.id=e.root.id+"-clone"+yl(v+1),M}function w(){var N=n.clones;if(!e.is(Do))N=0;else if(Tr(N)){var v=n[c("fixedWidth")]&&t.Layout.slideSize(0),M=v&&hr(Mn(r.track)[c("width")]/v);N=M||n[c("autoWidth")]&&e.length||n.perPage*Mg}return N}return{mount:p,destroy:x}}function Rg(e,t,n){var i=an(e),o=i.on,r=i.emit,l=e.state.set,c=t.Layout,d=c.slideSize,u=c.getPadding,p=c.totalSize,y=c.listSize,x=c.sliderSize,m=t.Direction,f=m.resolve,S=m.orient,w=t.Elements,N=w.list,v=w.track,M;function R(){M=t.Transition,o([Fi,Ra,hn,ln],U)}function U(){t.Controller.isBusy()||(t.Scroll.cancel(),D(e.index),t.Slides.update())}function X(h,J,V,he){h!==J&&K(h>V)&&(C(),_(T($(),h>V),!0)),l(Wo),r(di,J,V,h),M.start(J,function(){l(Co),r(Oo,J,V,h),he&&he()})}function D(h){_(E(h,!0))}function _(h,J){if(!e.is(Er)){var V=J?h:W(h);_n(N,"transform","translate"+f("X")+"("+V+"px)"),h!==V&&r(Au)}}function W(h){if(e.is(Do)){var J=q(h),V=J>t.Controller.getEnd(),he=J<0;(he||V)&&(h=T(h,V))}return h}function T(h,J){var V=h-F(J),he=x();return h-=S(he*(hr(xn(V)/he)||1))*(J?1:-1),h}function C(){_($(),!0),M.cancel()}function q(h){for(var J=t.Slides.get(),V=0,he=1/0,k=0;k<J.length;k++){var ce=J[k].index,L=xn(E(ce,!0)-h);if(L<=he)he=L,V=ce;else break}return V}function E(h,J){var V=S(p(h-1)-j(h));return J?I(V):V}function $(){var h=f("left");return Mn(N)[h]-Mn(v)[h]+S(u(!1))}function I(h){return n.trimSpace&&e.is(Io)&&(h=co(h,0,S(x(!0)-y()))),h}function j(h){var J=n.focus;return J==="center"?(y()-d(h,!0))/2:+J*d(h)||0}function F(h){return E(h?t.Controller.getEnd():0,!!n.trimSpace)}function K(h){var J=S(T($(),h));return h?J>=0:J<=N[f("scrollWidth")]-Mn(v)[f("width")]}function P(h,J){J=Tr(J)?$():J;var V=h!==!0&&S(J)<S(F(!1)),he=h!==!1&&S(J)>S(F(!0));return V||he}return{mount:R,move:X,jump:D,translate:_,shift:T,cancel:C,toIndex:q,toPosition:E,getPosition:$,getLimit:F,exceededLimit:P,reposition:U}}function Eg(e,t,n){var i=an(e),o=i.on,r=i.emit,l=t.Move,c=l.getPosition,d=l.getLimit,u=l.toPosition,p=t.Slides,y=p.isEnough,x=p.getLength,m=n.omitEnd,f=e.is(Do),S=e.is(Io),w=tn($,!1),N=tn($,!0),v=n.start||0,M,R=v,U,X,D;function _(){W(),o([hn,ln,xa],W),o(Ra,T)}function W(){U=x(!0),X=n.perMove,D=n.perPage,M=K();var L=co(v,0,m?M:U-1);L!==v&&(v=L,l.reposition())}function T(){M!==K()&&r(xa)}function C(L,me,te){if(!ce()){var ve=E(L),Le=F(ve);Le>-1&&(me||Le!==v)&&(V(Le),l.move(ve,Le,R,te))}}function q(L,me,te,ve){t.Scroll.scroll(L,me,te,function(){var Le=F(l.toIndex(c()));V(m?Pi(Le,M):Le),ve&&ve()})}function E(L){var me=v;if(Mi(L)){var te=L.match(/([+\-<>])(\d+)?/)||[],ve=te[1],Le=te[2];ve==="+"||ve==="-"?me=I(v+ +(""+ve+(+Le||1)),v):ve===">"?me=Le?P(+Le):w(!0):ve==="<"&&(me=N(!0))}else me=f?L:co(L,0,M);return me}function $(L,me){var te=X||(k()?1:D),ve=I(v+te*(L?-1:1),v,!(X||k()));return ve===-1&&S&&!vu(c(),d(!L),1)?L?0:M:me?ve:F(ve)}function I(L,me,te){if(y()||k()){var ve=j(L);ve!==L&&(me=L,L=ve,te=!1),L<0||L>M?!X&&(ca(0,L,me,!0)||ca(M,me,L,!0))?L=P(h(L)):f?L=te?L<0?-(U%D||D):U:L:n.rewind?L=L<0?M:0:L=-1:te&&L!==me&&(L=P(h(me)+(L<me?-1:1)))}else L=-1;return L}function j(L){if(S&&n.trimSpace==="move"&&L!==v)for(var me=c();me===u(L,!0)&&ca(L,0,e.length-1,!n.rewind);)L<v?--L:++L;return L}function F(L){return f?(L+U)%U||0:L}function K(){for(var L=U-(k()||f&&X?1:D);m&&L-- >0;)if(u(U-1,!0)!==u(L,!0)){L++;break}return co(L,0,U-1)}function P(L){return co(k()?L:D*L,0,M)}function h(L){return k()?Pi(L,M):va((L>=M?U-1:L)/D)}function J(L){var me=l.toIndex(L);return S?co(me,0,M):me}function V(L){L!==v&&(R=v,v=L)}function he(L){return L?R:v}function k(){return!Tr(n.focus)||n.isNavigation}function ce(){return e.state.is([Wo,Cr])&&!!n.waitForTransition}return{mount:_,go:C,scroll:q,getNext:w,getPrev:N,getAdjacent:$,getEnd:K,setIndex:V,getIndex:he,toIndex:P,toPage:h,toDest:J,hasFocus:k,isBusy:ce}}var kg="http://www.w3.org/2000/svg",Ag="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",Hr=40;function Fg(e,t,n){var i=an(e),o=i.on,r=i.bind,l=i.emit,c=n.classes,d=n.i18n,u=t.Elements,p=t.Controller,y=u.arrows,x=u.track,m=y,f=u.prev,S=u.next,w,N,v={};function M(){U(),o(hn,R)}function R(){X(),M()}function U(){var q=n.arrows;q&&!(f&&S)&&W(),f&&S&&(mr(v,{prev:f,next:S}),gr(m,q?"":"none"),Gn(m,N=Ll+"--"+n.direction),q&&(D(),C(),Xt([f,S],Rr,x.id),l(Lu,f,S)))}function X(){i.destroy(),ri(m,N),w?(Yi(y?[f,S]:m),f=S=null):Xn([f,S],Il)}function D(){o([Fi,Oo,ln,Ji,xa],C),r(S,"click",tn(_,">")),r(f,"click",tn(_,"<"))}function _(q){p.go(q,!0)}function W(){m=y||xo("div",c.arrows),f=T(!0),S=T(!1),w=!0,Lr(m,[f,S]),!y&&gl(m,x)}function T(q){var E='<button class="'+c.arrow+" "+(q?c.prev:c.next)+'" type="button"><svg xmlns="'+kg+'" viewBox="0 0 '+Hr+" "+Hr+'" width="'+Hr+'" height="'+Hr+'" focusable="false"><path d="'+(n.arrowPath||Ag)+'" />';return fu(E)}function C(){if(f&&S){var q=e.index,E=p.getPrev(),$=p.getNext(),I=E>-1&&q<E?d.last:d.prev,j=$>-1&&q>$?d.first:d.next;f.disabled=E<0,S.disabled=$<0,Xt(f,Rn,I),Xt(S,Rn,j),l(Mu,f,S,E,$)}}return{arrows:v,mount:M,destroy:X,update:C}}var Ng=fl+"-interval";function _g(e,t,n){var i=an(e),o=i.on,r=i.bind,l=i.emit,c=ka(n.interval,e.go.bind(e,">"),D),d=c.isPaused,u=t.Elements,p=t.Elements,y=p.root,x=p.toggle,m=n.autoplay,f,S,w=m==="pause";function N(){m&&(v(),x&&Xt(x,Rr,u.track.id),w||M(),X())}function v(){n.pauseOnHover&&r(y,"mouseenter mouseleave",function(W){f=W.type==="mouseenter",U()}),n.pauseOnFocus&&r(y,"focusin focusout",function(W){S=W.type==="focusin",U()}),x&&r(x,"click",function(){w?M():R(!0)}),o([di,Ea,ln],c.rewind),o(di,_)}function M(){d()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),S=f=w=!1,X(),l(Sl))}function R(W){W===void 0&&(W=!0),w=!!W,X(),d()||(c.pause(),l(wl))}function U(){w||(f||S?R(!1):M())}function X(){x&&(oi(x,Qi,!w),Xt(x,Rn,n.i18n[w?"play":"pause"]))}function D(W){var T=u.bar;T&&_n(T,"width",W*100+"%"),l(Eu,W)}function _(W){var T=t.Slides.getAt(W);c.set(T&&+Hn(T.slide,Ng)||n.interval)}return{mount:N,destroy:c.cancel,play:M,pause:R,isPaused:d}}function Hg(e,t,n){var i=an(e),o=i.on;function r(){n.cover&&(o($l,tn(c,!0)),o([Fi,hn,ln],tn(l,!0)))}function l(d){t.Slides.forEach(function(u){var p=Mr(u.container||u.slide,"img");p&&p.src&&c(d,p,u)})}function c(d,u,p){p.style("background",d?'center/cover no-repeat url("'+u.src+'")':"",!0),gr(u,d?"none":"")}return{mount:r,destroy:tn(l,!1)}}var Wg=10,Og=600,Dg=.6,zg=1.5,Bg=800;function jg(e,t,n){var i=an(e),o=i.on,r=i.emit,l=e.state.set,c=t.Move,d=c.getPosition,u=c.getLimit,p=c.exceededLimit,y=c.translate,x=e.is(Io),m,f,S=1;function w(){o(di,R),o([hn,ln],U)}function N(D,_,W,T,C){var q=d();if(R(),W&&(!x||!p())){var E=t.Layout.sliderSize(),$=Hs(D)*E*va(xn(D)/E)||0;D=c.toPosition(t.Controller.toDest(D%E))+$}var I=vu(q,D,1);S=1,_=I?0:_||ya(xn(D-q)/zg,Bg),f=T,m=ka(_,v,tn(M,q,D,C),1),l(Cr),r(Ea),m.start()}function v(){l(Co),f&&f(),r(Ji)}function M(D,_,W,T){var C=d(),q=D+(_-D)*X(T),E=(q-C)*S;y(C+E),x&&!W&&p()&&(S*=Dg,xn(E)<Wg&&N(u(p(!0)),Og,!1,f,!0))}function R(){m&&m.cancel()}function U(){m&&!m.isPaused()&&(R(),v())}function X(D){var _=n.easingFunc;return _?_(D):1-Math.pow(1-D,4)}return{mount:w,destroy:R,scroll:N,cancel:U}}var uo={passive:!1,capture:!0};function Vg(e,t,n){var i=an(e),o=i.on,r=i.emit,l=i.bind,c=i.unbind,d=e.state,u=t.Move,p=t.Scroll,y=t.Controller,x=t.Elements.track,m=t.Media.reduce,f=t.Direction,S=f.resolve,w=f.orient,N=u.getPosition,v=u.exceededLimit,M,R,U,X,D,_=!1,W,T,C;function q(){l(x,Ya,Ns,uo),l(x,Qa,Ns,uo),l(x,Xu,$,uo),l(x,"click",F,{capture:!0}),l(x,"dragstart",ni),o([Fi,hn],E)}function E(){var Z=n.drag;ue(!Z),X=Z==="free"}function $(Z){if(W=!1,!T){var le=Le(Z);ve(Z.target)&&(le||!Z.button)&&(y.isBusy()?ni(Z,!0):(C=le?x:window,D=d.is([Wo,Cr]),U=null,l(C,Ya,I,uo),l(C,Qa,j,uo),u.cancel(),p.cancel(),K(Z)))}}function I(Z){if(d.is(sa)||(d.set(sa),r(Cu)),Z.cancelable)if(D){u.translate(M+te(k(Z)));var le=ce(Z)>mc,oe=_!==(_=v());(le||oe)&&K(Z),W=!0,r(Tu),ni(Z)}else J(Z)&&(D=h(Z),ni(Z))}function j(Z){d.is(sa)&&(d.set(Co),r(Iu)),D&&(P(Z),ni(Z)),c(C,Ya,I),c(C,Qa,j),D=!1}function F(Z){!T&&W&&ni(Z,!0)}function K(Z){U=R,R=Z,M=N()}function P(Z){var le=V(Z),oe=he(le),ge=n.rewind&&n.rewindByDrag;m(!1),X?y.scroll(oe,0,n.snap):e.is(Er)?y.go(w(Hs(le))<0?ge?"<":"-":ge?">":"+"):e.is(Io)&&_&&ge?y.go(v(!0)?">":"<"):y.go(y.toDest(oe),!0),m(!0)}function h(Z){var le=n.dragMinThreshold,oe=dr(le),ge=oe&&le.mouse||0,Se=(oe?le.touch:+le)||10;return xn(k(Z))>(Le(Z)?Se:ge)}function J(Z){return xn(k(Z))>xn(k(Z,!0))}function V(Z){if(e.is(Do)||!_){var le=ce(Z);if(le&&le<mc)return k(Z)/le}return 0}function he(Z){return N()+Hs(Z)*Pi(xn(Z)*(n.flickPower||600),X?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function k(Z,le){return me(Z,le)-me(L(Z),le)}function ce(Z){return _s(Z)-_s(L(Z))}function L(Z){return R===Z&&U||R}function me(Z,le){return(Le(Z)?Z.changedTouches[0]:Z)["page"+S(le?"Y":"X")]}function te(Z){return Z/(_&&e.is(Io)?$g:1)}function ve(Z){var le=n.noDrag;return!ur(Z,"."+zu+", ."+Wa)&&(!le||!ur(Z,le))}function Le(Z){return typeof TouchEvent<"u"&&Z instanceof TouchEvent}function de(){return D}function ue(Z){T=Z}return{mount:q,disable:ue,isDragging:de}}var Gg={Spacebar:" ",Right:Na,Left:Fa,Up:Fu,Down:Nu};function Ml(e){return e=Mi(e)?e:e.key,Gg[e]||e}var gc="keydown";function Xg(e,t,n){var i=an(e),o=i.on,r=i.bind,l=i.unbind,c=e.root,d=t.Direction.resolve,u,p;function y(){x(),o(hn,m),o(hn,x),o(di,S)}function x(){var N=n.keyboard;N&&(u=N==="global"?window:c,r(u,gc,w))}function m(){l(u,gc)}function f(N){p=N}function S(){var N=p;p=!0,uu(function(){p=N})}function w(N){if(!p){var v=Ml(N);v===d(Fa)?e.go("<"):v===d(Na)&&e.go(">")}}return{mount:y,destroy:m,disable:f}}var sr=fl+"-lazy",da=sr+"-srcset",Ug="["+sr+"], ["+da+"]";function qg(e,t,n){var i=an(e),o=i.on,r=i.off,l=i.bind,c=i.emit,d=n.lazyLoad==="sequential",u=[Oo,Ji],p=[];function y(){n.lazyLoad&&(x(),o(ln,x))}function x(){ci(p),m(),d?N():(r(u),o(u,f),f())}function m(){t.Slides.forEach(function(v){hl(v.slide,Ug).forEach(function(M){var R=Hn(M,sr),U=Hn(M,da);if(R!==M.src||U!==M.srcset){var X=n.classes.spinner,D=M.parentElement,_=Mr(D,"."+X)||xo("span",X,D);p.push([M,v,_]),M.src||gr(M,"none")}})})}function f(){p=p.filter(function(v){var M=n.perPage*((n.preloadPages||1)+1)-1;return v[1].isWithin(e.index,M)?S(v):!0}),p.length||r(u)}function S(v){var M=v[0];Gn(v[1].slide,zs),l(M,"load error",tn(w,v)),Xt(M,"src",Hn(M,sr)),Xt(M,"srcset",Hn(M,da)),Xn(M,sr),Xn(M,da)}function w(v,M){var R=v[0],U=v[1];ri(U.slide,zs),M.type!=="error"&&(Yi(v[2]),gr(R,""),c($l,R,U),c(To)),d&&N()}function N(){p.length&&S(p.shift())}return{mount:y,destroy:tn(ci,p),check:f}}function Kg(e,t,n){var i=an(e),o=i.on,r=i.emit,l=i.bind,c=t.Slides,d=t.Elements,u=t.Controller,p=u.hasFocus,y=u.getIndex,x=u.go,m=t.Direction.resolve,f=d.pagination,S=[],w,N;function v(){M(),o([hn,ln,xa],v);var T=n.pagination;f&&gr(f,T?"":"none"),T&&(o([di,Ea,Ji],W),R(),W(),r(Pu,{list:w,items:S},_(e.index)))}function M(){w&&(Yi(f?Ai(w.children):w),ri(w,N),ci(S),w=null),i.destroy()}function R(){var T=e.length,C=n.classes,q=n.i18n,E=n.perPage,$=p()?u.getEnd()+1:hr(T/E);w=f||xo("ul",C.pagination,d.track.parentElement),Gn(w,N=Oa+"--"+D()),Xt(w,ai,"tablist"),Xt(w,Rn,q.select),Xt(w,Tl,D()===_a?"vertical":"");for(var I=0;I<$;I++){var j=xo("li",null,w),F=xo("button",{class:C.page,type:"button"},j),K=c.getIn(I).map(function(h){return h.slide.id}),P=!p()&&E>1?q.pageX:q.slideX;l(F,"click",tn(U,I)),n.paginationKeyboard&&l(F,"keydown",tn(X,I)),Xt(j,ai,"presentation"),Xt(F,ai,"tab"),Xt(F,Rr,K.join(" ")),Xt(F,Rn,Ws(P,I+1)),Xt(F,bo,-1),S.push({li:j,button:F,page:I})}}function U(T){x(">"+T,!0)}function X(T,C){var q=S.length,E=Ml(C),$=D(),I=-1;E===m(Na,!1,$)?I=++T%q:E===m(Fa,!1,$)?I=(--T+q)%q:E==="Home"?I=0:E==="End"&&(I=q-1);var j=S[I];j&&(hu(j.button),x(">"+I),ni(C,!0))}function D(){return n.paginationDirection||n.direction}function _(T){return S[u.toPage(T)]}function W(){var T=_(y(!0)),C=_(y());if(T){var q=T.button;ri(q,Qi),Xn(q,lc),Xt(q,bo,-1)}if(C){var E=C.button;Gn(E,Qi),Xt(E,lc,!0),Xt(E,bo,"")}r(Ru,{list:w,items:S},T,C)}return{items:S,mount:v,destroy:M,getAt:_,update:W}}var Yg=[" ","Enter"];function Qg(e,t,n){var i=n.isNavigation,o=n.slideFocus,r=[];function l(){e.splides.forEach(function(f){f.isParent||(u(e,f.splide),u(f.splide,e))}),i&&p()}function c(){r.forEach(function(f){f.destroy()}),ci(r)}function d(){c(),l()}function u(f,S){var w=an(f);w.on(di,function(N,v,M){S.go(S.is(Do)?M:N)}),r.push(w)}function p(){var f=an(e),S=f.on;S(vl,x),S(ku,m),S([Fi,hn],y),r.push(f),f.emit(bl,e.splides)}function y(){Xt(t.Elements.list,Tl,n.direction===_a?"vertical":"")}function x(f){e.go(f.index)}function m(f,S){ml(Yg,Ml(S))&&(x(f),ni(S))}return{setup:tn(t.Media.set,{slideFocus:Tr(o)?i:o},!0),mount:l,destroy:c,remount:d}}function Zg(e,t,n){var i=an(e),o=i.bind,r=0;function l(){n.wheel&&o(t.Elements.track,"wheel",c,uo)}function c(u){if(u.cancelable){var p=u.deltaY,y=p<0,x=_s(u),m=n.wheelMinThreshold||0,f=n.wheelSleep||0;xn(p)>m&&x-r>f&&(e.go(y?"<":">"),r=x),d(y)&&ni(u)}}function d(u){return!n.releaseWheel||e.state.is(Wo)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var Jg=90;function eh(e,t,n){var i=an(e),o=i.on,r=t.Elements.track,l=n.live&&!n.isNavigation,c=xo("span",vg),d=ka(Jg,tn(p,!1));function u(){l&&(x(!t.Autoplay.isPaused()),Xt(r,uc,!0),c.textContent="…",o(Sl,tn(x,!0)),o(wl,tn(x,!1)),o([Oo,Ji],tn(p,!0)))}function p(m){Xt(r,dc,m),m?(Lr(r,c),d.start()):(Yi(c),d.cancel())}function y(){Xn(r,[cc,uc,dc]),Yi(c)}function x(m){l&&Xt(r,cc,m?"off":"polite")}return{mount:u,disable:x,destroy:y}}var th=Object.freeze({__proto__:null,Media:cg,Direction:dg,Elements:Cg,Slides:Ig,Layout:Lg,Clones:Pg,Move:Rg,Controller:Eg,Arrows:Fg,Autoplay:_g,Cover:Hg,Scroll:jg,Drag:Vg,Keyboard:Xg,LazyLoad:qg,Pagination:Kg,Sync:Qg,Wheel:Zg,Live:eh}),nh={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"},ih={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:Sg,i18n:nh,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function oh(e,t,n){var i=t.Slides;function o(){an(e).on([Fi,ln],r)}function r(){i.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function l(c,d){i.style("transition","opacity "+n.speed+"ms "+n.easing),uu(d)}return{mount:o,start:l,cancel:Ns}}function rh(e,t,n){var i=t.Move,o=t.Controller,r=t.Scroll,l=t.Elements.list,c=tn(_n,l,"transition"),d;function u(){an(e).bind(l,"transitionend",function(m){m.target===l&&d&&(y(),d())})}function p(m,f){var S=i.toPosition(m,!0),w=i.getPosition(),N=x(m);xn(S-w)>=1&&N>=1?n.useScroll?r.scroll(S,N,!1,f):(c("transform "+N+"ms "+n.easing),i.translate(S,!0),d=f):(i.jump(m),f())}function y(){c(""),r.cancel()}function x(m){var f=n.rewindSpeed;if(e.is(Io)&&f){var S=o.getIndex(!0),w=o.getEnd();if(S===0&&m>=w||S>=w&&m===0)return f}return n.speed}return{mount:u,start:p,cancel:y}}var ah=(function(){function e(n,i){this.event=an(),this.Components={},this.state=sg(go),this.splides=[],this._o={},this._E={};var o=Mi(n)?yu(document,n):n;ar(o,o+" is invalid."),this.root=o,i=Ci({label:Hn(o,Rn)||"",labelledby:Hn(o,Cl)||""},ih,e.defaults,i||{});try{Ci(i,JSON.parse(Hn(o,fl)))}catch{ar(!1,"Invalid JSON")}this._o=Object.create(Ci({},i))}var t=e.prototype;return t.mount=function(i,o){var r=this,l=this.state,c=this.Components;ar(l.is([go,fa]),"Already mounted!"),l.set(go),this._C=c,this._T=o||this._T||(this.is(Er)?oh:rh),this._E=i||this._E;var d=mr({},th,this._E,{Transition:this._T});return qi(d,function(u,p){var y=u(r,c,r._o);c[p]=y,y.setup&&y.setup()}),qi(c,function(u){u.mount&&u.mount()}),this.emit(Fi),Gn(this.root,xg),l.set(Co),this.emit(Os),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(Co)&&(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(Ai(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(ln),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,r=this.state;return r.is(go)?an(this).on(Os,this.destroy.bind(this,i)):(qi(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(xl),o.destroy(),i&&ci(this.splides),r.set(fa)),this},ng(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})(),Pl=ah;Pl.defaults={};Pl.STATES=og;var hc=[[Fi,"onMounted"],[Os,"onReady"],[di,"onMove"],[Oo,"onMoved"],[vl,"onClick"],[bu,"onActive"],[Su,"onInactive"],[wu,"onVisible"],[$u,"onHidden"],[ln,"onRefresh"],[hn,"onUpdated"],[To,"onResize"],[Ra,"onResized"],[Cu,"onDrag"],[Tu,"onDragging"],[Iu,"onDragged"],[Ea,"onScroll"],[Ji,"onScrolled"],[xl,"onDestroy"],[Lu,"onArrowsMounted"],[Mu,"onArrowsUpdated"],[Pu,"onPaginationMounted"],[Ru,"onPaginationUpdated"],[bl,"onNavigationMounted"],[Sl,"onAutoplayPlay"],[Eu,"onAutoplayPlaying"],[wl,"onAutoplayPause"],[$l,"onLazyLoadLoaded"]];function Rl(...e){return e.filter(Boolean).join(" ")}function ba(e){return e!==null&&typeof e=="object"}function Bs(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!Bs(n,t[i]));if(ba(e)&&ba(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!Bs(e[o],t[o]))}return e===t}function sh(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function lh(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 js(e,t){const n=e;return lh(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():ba(i)?n[o]=js(ba(n[o])?n[o]:{},i):n[o]=i}),n}var ch=({children:e,className:t,...n})=>s.createElement("div",{className:Rl("splide__track",t),...n},s.createElement("ul",{className:"splide__list"},e)),El=class extends s.Component{constructor(){super(...arguments),this.splideRef=s.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new Pl(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=js({},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&&!Bs(this.options,e)&&(this.splide.options=e,this.options=js({},e));const t=this.getSlides();sh(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){hc.forEach(([t,n])=>{const i=this.props[n];typeof i=="function"&&e.on(t,(...o)=>{i(e,...o)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:i,...o}=this.props;return s.createElement(t,{className:Rl("splide",e),ref:this.splideRef,...this.omit(o,["options",...hc.map(r=>r[1])])},n?s.createElement(ch,null,i):i)}},kl=({children:e,className:t,...n})=>s.createElement("li",{className:Rl("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("react"),Et=require("classnames"),b=require("./EmbedMediaFrame-C5O6lDaq.js"),qn=require("react-dom");function pm(e){return e.type==="object"&&e.version===1}const mm="ControlSlider-module__wrapper___sHEkd",gm="ControlSlider-module__hoverArrow___A-dOH",hm="ControlSlider-module__sliderItem___QQSkR",fm="ControlSlider-module__sliderImage___9hRl-",ym="ControlSlider-module__arrow___05ghY",vm="ControlSlider-module__arrowVertical___tBfVN",xm="ControlSlider-module__nextArrow___-30Yc",bm="ControlSlider-module__arrowInner___aEra3",Sm="ControlSlider-module__arrowIcon___S4ztF",wm="ControlSlider-module__arrowImg___2dwJW",$m="ControlSlider-module__mirror___brd6U",Cm="ControlSlider-module__pagination___bicLF",Tm="ControlSlider-module__paginationInner___bT-P-",Im="ControlSlider-module__paginationVertical___zYqKw",Lm="ControlSlider-module__paginationItem___nTRbk",Mm="ControlSlider-module__dot___p1Qun",Pm="ControlSlider-module__activeDot___LHFaj",Em="ControlSlider-module__paginationInsideBottom___R3FWn",Rm="ControlSlider-module__paginationInsideTop___V-qb-",km="ControlSlider-module__paginationOutsideBottom___14w8D",Am="ControlSlider-module__paginationOutsideTop___SCLqB",Fm="ControlSlider-module__paginationInsideLeft___yOBRZ",Nm="ControlSlider-module__paginationInsideRight___Rtt3o",_m="ControlSlider-module__paginationOutsideLeft___lahaw",Hm="ControlSlider-module__paginationOutsideRight___EtuQa",Wm="ControlSlider-module__imgWrapper___UjEgB",Om="ControlSlider-module__captionBlock___dJ6-j",Dm="ControlSlider-module__captionTextWrapper___HFlpf",zm="ControlSlider-module__captionText___uGBVc",Bm="ControlSlider-module__active___WZK4G",jm="ControlSlider-module__withPointerEvents___t-18M",Vm="ControlSlider-module__topLeftAlignment___zjnGM",Gm="ControlSlider-module__topCenterAlignment___gD1xW",Xm="ControlSlider-module__topRightAlignment___NMapS",Um="ControlSlider-module__middleLeftAlignment___OnUrY",qm="ControlSlider-module__middleCenterAlignment___Tdkl0",Km="ControlSlider-module__middleRightAlignment___wEbfX",Ym="ControlSlider-module__bottomLeftAlignment___cTP2-",Qm="ControlSlider-module__bottomCenterAlignment___c54fB",Zm="ControlSlider-module__bottomRightAlignment___kEwrz",Jm="ControlSlider-module__clickOverlay___DZA28",eg="ControlSlider-module__contain___pLyq7",tg="ControlSlider-module__cover___KdDat",Pt={wrapper:mm,hoverArrow:gm,sliderItem:hm,sliderImage:fm,arrow:ym,arrowVertical:vm,nextArrow:xm,arrowInner:bm,arrowIcon:Sm,arrowImg:wm,mirror:$m,pagination:Cm,paginationInner:Tm,paginationVertical:Im,paginationItem:Lm,dot:Mm,activeDot:Pm,paginationInsideBottom:Em,paginationInsideTop:Rm,paginationOutsideBottom:km,paginationOutsideTop:Am,paginationInsideLeft:Fm,paginationInsideRight:Nm,paginationOutsideLeft:_m,paginationOutsideRight:Hm,imgWrapper:Wm,captionBlock:Om,captionTextWrapper:Dm,captionText:zm,active:Bm,withPointerEvents:jm,topLeftAlignment:Vm,topCenterAlignment:Gm,topRightAlignment:Xm,middleLeftAlignment:Um,middleCenterAlignment:qm,middleRightAlignment:Km,bottomLeftAlignment:Ym,bottomCenterAlignment:Qm,bottomRightAlignment:Zm,clickOverlay:Jm,contain:eg,cover:tg};function ng(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 ig(e,t,n){return t&&ng(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var ic="(prefers-reduced-motion: reduce)",go=1,og=2,Co=3,Wo=4,Cr=5,la=6,ya=7,rg={CREATED:go,MOUNTED:og,IDLE:Co,MOVING:Wo,SCROLLING:Cr,DRAGGING:la,DESTROYED:ya};function ci(e){e.length=0}function Ai(e,t,n){return Array.prototype.slice.call(e,t,n)}function tn(e){return e.bind.apply(e,[null].concat(Ai(arguments,1)))}var pu=setTimeout,_s=function(){};function oc(e){return requestAnimationFrame(e)}function Ea(e,t){return typeof t===e}function dr(e){return!ml(e)&&Ea("object",e)}var pl=Array.isArray,mu=tn(Ea,"function"),Mi=tn(Ea,"string"),Tr=tn(Ea,"undefined");function ml(e){return e===null}function gu(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Ir(e){return pl(e)?e:[e]}function kn(e,t){Ir(e).forEach(t)}function gl(e,t){return e.indexOf(t)>-1}function ca(e,t){return e.push.apply(e,Ir(t)),e}function oi(e,t,n){e&&kn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Gn(e,t){oi(e,Mi(t)?t.split(" "):t,!0)}function Lr(e,t){kn(t,e.appendChild.bind(e))}function hl(e,t){kn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function ur(e,t){return gu(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function hu(e,t){var n=e?Ai(e.children):[];return t?n.filter(function(i){return ur(i,t)}):n}function Mr(e,t){return t?hu(e,t)[0]:e.firstElementChild}var pr=Object.keys;function qi(e,t,n){return e&&(n?pr(e).reverse():pr(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function mr(e){return Ai(arguments,1).forEach(function(t){qi(t,function(n,i){e[i]=t[i]})}),e}function Ci(e){return Ai(arguments,1).forEach(function(t){qi(t,function(n,i){pl(n)?e[i]=n.slice():dr(n)?e[i]=Ci({},dr(e[i])?e[i]:{},n):e[i]=n})}),e}function rc(e,t){kn(t||pr(e),function(n){delete e[n]})}function Xn(e,t){kn(e,function(n){kn(t,function(i){n&&n.removeAttribute(i)})})}function Xt(e,t,n){dr(t)?qi(t,function(i,o){Xt(e,o,i)}):kn(e,function(i){ml(n)||n===""?Xn(i,t):i.setAttribute(t,String(n))})}function xo(e,t,n){var i=document.createElement(e);return t&&(Mi(t)?Gn(i,t):Xt(i,t)),n&&Lr(n,i),i}function _n(e,t,n){if(Tr(n))return getComputedStyle(e)[t];ml(n)||(e.style[t]=""+n)}function gr(e,t){_n(e,"display",t)}function fu(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Hn(e,t){return e.getAttribute(t)}function ac(e,t){return e&&e.classList.contains(t)}function Mn(e){return e.getBoundingClientRect()}function Yi(e){kn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function yu(e){return Mr(new DOMParser().parseFromString(e,"text/html").body)}function ni(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function vu(e,t){return e&&e.querySelector(t)}function fl(e,t){return t?Ai(e.querySelectorAll(t)):[]}function ri(e,t){oi(e,t,!1)}function Hs(e){return e.timeStamp}function _i(e){return Mi(e)?e:e?e+"px":""}var Pr="splide",yl="data-"+Pr;function ar(e,t){if(!e)throw new Error("["+Pr+"] "+(t||""))}var Pi=Math.min,va=Math.max,xa=Math.floor,hr=Math.ceil,xn=Math.abs;function xu(e,t,n){return xn(e-t)<n}function da(e,t,n,i){var o=Pi(t,n),r=va(t,n);return i?o<e&&e<r:o<=e&&e<=r}function co(e,t,n){var i=Pi(t,n),o=va(t,n);return Pi(va(i,e),o)}function Ws(e){return+(e>0)-+(e<0)}function Os(e,t){return kn(t,function(n){e=e.replace("%s",""+n)}),e}function vl(e){return e<10?"0"+e:""+e}var sc={};function ag(e){return""+e+vl(sc[e]=(sc[e]||0)+1)}function bu(){var e=[];function t(l,c,d,u){o(l,c,function(p,y,x){var m="addEventListener"in p,f=m?p.removeEventListener.bind(p,y,d,u):p.removeListener.bind(p,d);m?p.addEventListener(y,d,u):p.addListener(d),e.push([p,y,x,d,f])})}function n(l,c,d){o(l,c,function(u,p,y){e=e.filter(function(x){return x[0]===u&&x[1]===p&&x[2]===y&&(!d||x[3]===d)?(x[4](),!1):!0})})}function i(l,c,d){var u,p=!0;return typeof CustomEvent=="function"?u=new CustomEvent(c,{bubbles:p,detail:d}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(c,p,!1,d)),l.dispatchEvent(u),u}function o(l,c,d){kn(l,function(u){u&&kn(c,function(p){p.split(" ").forEach(function(y){var x=y.split(".");d(u,x[0],x[1])})})})}function r(){e.forEach(function(l){l[4]()}),ci(e)}return{bind:t,unbind:n,dispatch:i,destroy:r}}var Fi="mounted",Ds="ready",di="move",Oo="moved",xl="click",Su="active",wu="inactive",$u="visible",Cu="hidden",ln="refresh",hn="updated",To="resize",Ra="resized",Tu="drag",Iu="dragging",Lu="dragged",ka="scroll",Ji="scrolled",sg="overflow",bl="destroy",Mu="arrows:mounted",Pu="arrows:updated",Eu="pagination:mounted",Ru="pagination:updated",Sl="navigation:mounted",wl="autoplay:play",ku="autoplay:playing",$l="autoplay:pause",Cl="lazyload:loaded",Au="sk",Fu="sh",ba="ei";function an(e){var t=e?e.event.bus:document.createDocumentFragment(),n=bu();function i(r,l){n.bind(t,Ir(r).join(" "),function(c){l.apply(l,pl(c.detail)?c.detail:[])})}function o(r){n.dispatch(t,r,Ai(arguments,1))}return e&&e.event.on(bl,n.destroy),mr(n,{bus:t,on:i,off:tn(n.unbind,t),emit:o})}function Aa(e,t,n,i){var o=Date.now,r,l=0,c,d=!0,u=0;function p(){if(!d){if(l=e?Pi((o()-r)/e,1):1,n&&n(l),l>=1&&(t(),r=o(),i&&++u>=i))return x();c=oc(p)}}function y(N){N||f(),r=o()-(N?l*e:0),d=!1,c=oc(p)}function x(){d=!0}function m(){r=o(),l=0,n&&n(l)}function f(){c&&cancelAnimationFrame(c),l=0,c=0,d=!0}function S(N){e=N}function w(){return d}return{start:y,rewind:m,pause:x,cancel:f,set:S,isPaused:w}}function lg(e){var t=e;function n(o){t=o}function i(o){return gl(Ir(o),t)}return{set:n,is:i}}function cg(e,t){var n=Aa(0,e,null,1);return function(){n.isPaused()&&n.start()}}function dg(e,t,n){var i=e.state,o=n.breakpoints||{},r=n.reducedMotion||{},l=bu(),c=[];function d(){var f=n.mediaQuery==="min";pr(o).sort(function(S,w){return f?+S-+w:+w-+S}).forEach(function(S){p(o[S],"("+(f?"min":"max")+"-width:"+S+"px)")}),p(r,ic),y()}function u(f){f&&l.destroy()}function p(f,S){var w=matchMedia(S);l.bind(w,"change",y),c.push([f,w])}function y(){var f=i.is(ya),S=n.direction,w=c.reduce(function(N,v){return Ci(N,v[1].matches?v[0]:{})},{});rc(n),m(w),n.destroy?e.destroy(n.destroy==="completely"):f?(u(!0),e.mount()):S!==n.direction&&e.refresh()}function x(f){matchMedia(ic).matches&&(f?Ci(n,r):rc(n,pr(r)))}function m(f,S,w){Ci(n,f),S&&Ci(Object.getPrototypeOf(n),f),(w||!i.is(go))&&e.emit(hn,n)}return{setup:d,destroy:u,reduce:x,set:m}}var Fa="Arrow",Na=Fa+"Left",_a=Fa+"Right",Nu=Fa+"Up",_u=Fa+"Down",lc="rtl",Ha="ttb",Ka={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Nu,_a],ArrowRight:[_u,Na]};function ug(e,t,n){function i(r,l,c){c=c||n.direction;var d=c===lc&&!l?1:c===Ha?0:-1;return Ka[r]&&Ka[r][d]||r.replace(/width|left|right/i,function(u,p){var y=Ka[u.toLowerCase()][d]||u;return p>0?y.charAt(0).toUpperCase()+y.slice(1):y})}function o(r){return r*(n.direction===lc?1:-1)}return{resolve:i,orient:o}}var ai="role",bo="tabindex",pg="disabled",Wn="aria-",Er=Wn+"controls",Hu=Wn+"current",cc=Wn+"selected",En=Wn+"label",Tl=Wn+"labelledby",Wu=Wn+"hidden",Il=Wn+"orientation",fr=Wn+"roledescription",dc=Wn+"live",uc=Wn+"busy",pc=Wn+"atomic",Ll=[ai,bo,pg,Er,Hu,En,Tl,Wu,Il,fr],Kn=Pr+"__",Ni="is-",Ya=Pr,mc=Kn+"track",mg=Kn+"list",Wa=Kn+"slide",Ou=Wa+"--clone",gg=Wa+"__container",Ml=Kn+"arrows",Oa=Kn+"arrow",Du=Oa+"--prev",zu=Oa+"--next",Da=Kn+"pagination",Bu=Da+"__page",hg=Kn+"progress",fg=hg+"__bar",yg=Kn+"toggle",vg=Kn+"spinner",xg=Kn+"sr",bg=Ni+"initialized",Qi=Ni+"active",ju=Ni+"prev",Vu=Ni+"next",zs=Ni+"visible",Bs=Ni+"loading",Gu=Ni+"focus-in",Xu=Ni+"overflow",Sg=[Qi,zs,ju,Vu,Bs,Gu,Xu],wg={slide:Wa,clone:Ou,arrows:Ml,arrow:Oa,prev:Du,next:zu,pagination:Da,page:Bu,spinner:vg};function $g(e,t){if(mu(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!ur(n,t);)n=n.parentElement;return n}var Cg=5,gc=200,Uu="touchstart mousedown",Qa="touchmove mousemove",Za="touchend touchcancel mouseup click";function Tg(e,t,n){var i=an(e),o=i.on,r=i.bind,l=e.root,c=n.i18n,d={},u=[],p=[],y=[],x,m,f;function S(){M(),E(),v()}function w(){o(ln,N),o(ln,S),o(hn,v),r(document,Uu+" keydown",function(D){f=D.type==="keydown"},{capture:!0}),r(l,"focusin",function(){oi(l,Gu,!!f)})}function N(D){var _=Ll.concat("style");ci(u),ri(l,p),ri(x,y),Xn([x,m],_),Xn(l,D?_:["style",fr])}function v(){ri(l,p),ri(x,y),p=X(Ya),y=X(mc),Gn(l,p),Gn(x,y),Xt(l,En,n.label),Xt(l,Tl,n.labelledby)}function M(){x=U("."+mc),m=Mr(x,"."+mg),ar(x&&m,"A track/list element is missing."),ca(u,hu(m,"."+Wa+":not(."+Ou+")")),qi({arrows:Ml,pagination:Da,prev:Du,next:zu,bar:fg,toggle:yg},function(D,_){d[_]=U("."+D)}),mr(d,{root:l,track:x,list:m,slides:u})}function E(){var D=l.id||ag(Pr),_=n.role;l.id=D,x.id=x.id||D+"-track",m.id=m.id||D+"-list",!Hn(l,ai)&&l.tagName!=="SECTION"&&_&&Xt(l,ai,_),Xt(l,fr,c.carousel),Xt(m,ai,"presentation")}function U(D){var _=vu(l,D);return _&&$g(_,"."+Ya)===l?_:void 0}function X(D){return[D+"--"+n.type,D+"--"+n.direction,n.drag&&D+"--draggable",n.isNavigation&&D+"--nav",D===Ya&&Qi]}return mr(d,{setup:S,mount:w,destroy:N})}var Io="slide",Do="loop",Rr="fade";function Ig(e,t,n,i){var o=an(e),r=o.on,l=o.emit,c=o.bind,d=e.Components,u=e.root,p=e.options,y=p.isNavigation,x=p.updateOnMove,m=p.i18n,f=p.pagination,S=p.slideFocus,w=d.Direction.resolve,N=Hn(i,"style"),v=Hn(i,En),M=n>-1,E=Mr(i,"."+gg),U;function X(){M||(i.id=u.id+"-slide"+vl(t+1),Xt(i,ai,f?"tabpanel":"group"),Xt(i,fr,m.slide),Xt(i,En,v||Os(m.slideLabel,[t+1,e.length]))),D()}function D(){c(i,"click",tn(l,xl,K)),c(i,"keydown",tn(l,Au,K)),r([Oo,Fu,Ji],C),r(Sl,W),x&&r(di,T)}function _(){U=!0,o.destroy(),ri(i,Sg),Xn(i,Ll),Xt(i,"style",N),Xt(i,En,v||"")}function W(){var P=e.splides.map(function(h){var J=h.splide.Components.Slides.getAt(t);return J?J.slide.id:""}).join(" ");Xt(i,En,Os(m.slideX,(M?n:t)+1)),Xt(i,Er,P),Xt(i,ai,S?"button":""),S&&Xn(i,fr)}function T(){U||C()}function C(){if(!U){var P=e.index;q(),R(),oi(i,ju,t===P-1),oi(i,Vu,t===P+1)}}function q(){var P=I();P!==ac(i,Qi)&&(oi(i,Qi,P),Xt(i,Hu,y&&P||""),l(P?Su:wu,K))}function R(){var P=j(),h=!P&&(!I()||M);if(e.state.is([Wo,Cr])||Xt(i,Wu,h||""),Xt(fl(i,p.focusableNodes||""),bo,h?-1:""),S&&Xt(i,bo,h?-1:0),P!==ac(i,zs)&&(oi(i,zs,P),l(P?$u:Cu,K)),!P&&document.activeElement===i){var J=d.Slides.getAt(e.index);J&&fu(J.slide)}}function $(P,h,J){_n(J&&E||i,P,h)}function I(){var P=e.index;return P===t||p.cloneStatus&&P===n}function j(){if(e.is(Rr))return I();var P=Mn(d.Elements.track),h=Mn(i),J=w("left",!0),V=w("right",!0);return xa(P[J])<=hr(h[J])&&xa(h[V])<=hr(P[V])}function F(P,h){var J=xn(P-t);return!M&&(p.rewind||e.is(Do))&&(J=Pi(J,e.length-J)),J<=h}var K={index:t,slideIndex:n,slide:i,container:E,isClone:M,mount:X,destroy:_,update:C,style:$,isWithin:F};return K}function Lg(e,t,n){var i=an(e),o=i.on,r=i.emit,l=i.bind,c=t.Elements,d=c.slides,u=c.list,p=[];function y(){x(),o(ln,m),o(ln,x)}function x(){d.forEach(function(C,q){S(C,q,-1)})}function m(){U(function(C){C.destroy()}),ci(p)}function f(){U(function(C){C.update()})}function S(C,q,R){var $=Ig(e,q,R,C);$.mount(),p.push($),p.sort(function(I,j){return I.index-j.index})}function w(C){return C?X(function(q){return!q.isClone}):p}function N(C){var q=t.Controller,R=q.toIndex(C),$=q.hasFocus()?1:n.perPage;return X(function(I){return da(I.index,R,R+$-1)})}function v(C){return X(C)[0]}function M(C,q){kn(C,function(R){if(Mi(R)&&(R=yu(R)),gu(R)){var $=d[q];$?hl(R,$):Lr(u,R),Gn(R,n.classes.slide),_(R,tn(r,To))}}),r(ln)}function E(C){Yi(X(C).map(function(q){return q.slide})),r(ln)}function U(C,q){w(q).forEach(C)}function X(C){return p.filter(mu(C)?C:function(q){return Mi(C)?ur(q.slide,C):gl(Ir(C),q.index)})}function D(C,q,R){U(function($){$.style(C,q,R)})}function _(C,q){var R=fl(C,"img"),$=R.length;$?R.forEach(function(I){l(I,"load error",function(){--$||q()})}):q()}function W(C){return C?d.length:p.length}function T(){return p.length>n.perPage}return{mount:y,destroy:m,update:f,register:S,get:w,getIn:N,getAt:v,add:M,remove:E,forEach:U,filter:X,style:D,getLength:W,isEnough:T}}function Mg(e,t,n){var i=an(e),o=i.on,r=i.bind,l=i.emit,c=t.Slides,d=t.Direction.resolve,u=t.Elements,p=u.root,y=u.track,x=u.list,m=c.getAt,f=c.style,S,w,N;function v(){M(),r(window,"resize load",cg(tn(l,To))),o([hn,ln],M),o(To,E)}function M(){S=n.direction===Ha,_n(p,"maxWidth",_i(n.width)),_n(y,d("paddingLeft"),U(!1)),_n(y,d("paddingRight"),U(!0)),E(!0)}function E(K){var P=Mn(p);(K||w.width!==P.width||w.height!==P.height)&&(_n(y,"height",X()),f(d("marginRight"),_i(n.gap)),f("width",_()),f("height",W(),!0),w=P,l(Ra),N!==(N=F())&&(oi(p,Xu,N),l(sg,N)))}function U(K){var P=n.padding,h=d(K?"right":"left");return P&&_i(P[h]||(dr(P)?0:P))||"0px"}function X(){var K="";return S&&(K=D(),ar(K,"height or heightRatio is missing."),K="calc("+K+" - "+U(!1)+" - "+U(!0)+")"),K}function D(){return _i(n.height||Mn(x).width*n.heightRatio)}function _(){return n.autoWidth?null:_i(n.fixedWidth)||(S?"":T())}function W(){return _i(n.fixedHeight)||(S?n.autoHeight?null:T():D())}function T(){var K=_i(n.gap);return"calc((100%"+(K&&" + "+K)+")/"+(n.perPage||1)+(K&&" - "+K)+")"}function C(){return Mn(x)[d("width")]}function q(K,P){var h=m(K||0);return h?Mn(h.slide)[d("width")]+(P?0:I()):0}function R(K,P){var h=m(K);if(h){var J=Mn(h.slide)[d("right")],V=Mn(x)[d("left")];return xn(J-V)+(P?0:I())}return 0}function $(K){return R(e.length-1)-R(0)+q(0,K)}function I(){var K=m(0);return K&&parseFloat(_n(K.slide,d("marginRight")))||0}function j(K){return parseFloat(_n(y,d("padding"+(K?"Right":"Left"))))||0}function F(){return e.is(Rr)||$(!0)>C()}return{mount:v,resize:E,listSize:C,slideSize:q,sliderSize:$,totalSize:R,getPadding:j,isOverflow:F}}var Pg=2;function Eg(e,t,n){var i=an(e),o=i.on,r=t.Elements,l=t.Slides,c=t.Direction.resolve,d=[],u;function p(){o(ln,y),o([hn,To],m),(u=w())&&(f(u),t.Layout.resize(!0))}function y(){x(),p()}function x(){Yi(d),ci(d),i.destroy()}function m(){var N=w();u!==N&&(u<N||!N)&&i.emit(ln)}function f(N){var v=l.get().slice(),M=v.length;if(M){for(;v.length<N;)ca(v,v);ca(v.slice(-N),v.slice(0,N)).forEach(function(E,U){var X=U<N,D=S(E.slide,U);X?hl(D,v[0].slide):Lr(r.list,D),ca(d,D),l.register(D,U-N+(X?0:M),E.index)})}}function S(N,v){var M=N.cloneNode(!0);return Gn(M,n.classes.clone),M.id=e.root.id+"-clone"+vl(v+1),M}function w(){var N=n.clones;if(!e.is(Do))N=0;else if(Tr(N)){var v=n[c("fixedWidth")]&&t.Layout.slideSize(0),M=v&&hr(Mn(r.track)[c("width")]/v);N=M||n[c("autoWidth")]&&e.length||n.perPage*Pg}return N}return{mount:p,destroy:x}}function Rg(e,t,n){var i=an(e),o=i.on,r=i.emit,l=e.state.set,c=t.Layout,d=c.slideSize,u=c.getPadding,p=c.totalSize,y=c.listSize,x=c.sliderSize,m=t.Direction,f=m.resolve,S=m.orient,w=t.Elements,N=w.list,v=w.track,M;function E(){M=t.Transition,o([Fi,Ra,hn,ln],U)}function U(){t.Controller.isBusy()||(t.Scroll.cancel(),D(e.index),t.Slides.update())}function X(h,J,V,he){h!==J&&K(h>V)&&(C(),_(T($(),h>V),!0)),l(Wo),r(di,J,V,h),M.start(J,function(){l(Co),r(Oo,J,V,h),he&&he()})}function D(h){_(R(h,!0))}function _(h,J){if(!e.is(Rr)){var V=J?h:W(h);_n(N,"transform","translate"+f("X")+"("+V+"px)"),h!==V&&r(Fu)}}function W(h){if(e.is(Do)){var J=q(h),V=J>t.Controller.getEnd(),he=J<0;(he||V)&&(h=T(h,V))}return h}function T(h,J){var V=h-F(J),he=x();return h-=S(he*(hr(xn(V)/he)||1))*(J?1:-1),h}function C(){_($(),!0),M.cancel()}function q(h){for(var J=t.Slides.get(),V=0,he=1/0,k=0;k<J.length;k++){var ce=J[k].index,L=xn(R(ce,!0)-h);if(L<=he)he=L,V=ce;else break}return V}function R(h,J){var V=S(p(h-1)-j(h));return J?I(V):V}function $(){var h=f("left");return Mn(N)[h]-Mn(v)[h]+S(u(!1))}function I(h){return n.trimSpace&&e.is(Io)&&(h=co(h,0,S(x(!0)-y()))),h}function j(h){var J=n.focus;return J==="center"?(y()-d(h,!0))/2:+J*d(h)||0}function F(h){return R(h?t.Controller.getEnd():0,!!n.trimSpace)}function K(h){var J=S(T($(),h));return h?J>=0:J<=N[f("scrollWidth")]-Mn(v)[f("width")]}function P(h,J){J=Tr(J)?$():J;var V=h!==!0&&S(J)<S(F(!1)),he=h!==!1&&S(J)>S(F(!0));return V||he}return{mount:E,move:X,jump:D,translate:_,shift:T,cancel:C,toIndex:q,toPosition:R,getPosition:$,getLimit:F,exceededLimit:P,reposition:U}}function kg(e,t,n){var i=an(e),o=i.on,r=i.emit,l=t.Move,c=l.getPosition,d=l.getLimit,u=l.toPosition,p=t.Slides,y=p.isEnough,x=p.getLength,m=n.omitEnd,f=e.is(Do),S=e.is(Io),w=tn($,!1),N=tn($,!0),v=n.start||0,M,E=v,U,X,D;function _(){W(),o([hn,ln,ba],W),o(Ra,T)}function W(){U=x(!0),X=n.perMove,D=n.perPage,M=K();var L=co(v,0,m?M:U-1);L!==v&&(v=L,l.reposition())}function T(){M!==K()&&r(ba)}function C(L,me,te){if(!ce()){var ve=R(L),Le=F(ve);Le>-1&&(me||Le!==v)&&(V(Le),l.move(ve,Le,E,te))}}function q(L,me,te,ve){t.Scroll.scroll(L,me,te,function(){var Le=F(l.toIndex(c()));V(m?Pi(Le,M):Le),ve&&ve()})}function R(L){var me=v;if(Mi(L)){var te=L.match(/([+\-<>])(\d+)?/)||[],ve=te[1],Le=te[2];ve==="+"||ve==="-"?me=I(v+ +(""+ve+(+Le||1)),v):ve===">"?me=Le?P(+Le):w(!0):ve==="<"&&(me=N(!0))}else me=f?L:co(L,0,M);return me}function $(L,me){var te=X||(k()?1:D),ve=I(v+te*(L?-1:1),v,!(X||k()));return ve===-1&&S&&!xu(c(),d(!L),1)?L?0:M:me?ve:F(ve)}function I(L,me,te){if(y()||k()){var ve=j(L);ve!==L&&(me=L,L=ve,te=!1),L<0||L>M?!X&&(da(0,L,me,!0)||da(M,me,L,!0))?L=P(h(L)):f?L=te?L<0?-(U%D||D):U:L:n.rewind?L=L<0?M:0:L=-1:te&&L!==me&&(L=P(h(me)+(L<me?-1:1)))}else L=-1;return L}function j(L){if(S&&n.trimSpace==="move"&&L!==v)for(var me=c();me===u(L,!0)&&da(L,0,e.length-1,!n.rewind);)L<v?--L:++L;return L}function F(L){return f?(L+U)%U||0:L}function K(){for(var L=U-(k()||f&&X?1:D);m&&L-- >0;)if(u(U-1,!0)!==u(L,!0)){L++;break}return co(L,0,U-1)}function P(L){return co(k()?L:D*L,0,M)}function h(L){return k()?Pi(L,M):xa((L>=M?U-1:L)/D)}function J(L){var me=l.toIndex(L);return S?co(me,0,M):me}function V(L){L!==v&&(E=v,v=L)}function he(L){return L?E:v}function k(){return!Tr(n.focus)||n.isNavigation}function ce(){return e.state.is([Wo,Cr])&&!!n.waitForTransition}return{mount:_,go:C,scroll:q,getNext:w,getPrev:N,getAdjacent:$,getEnd:K,setIndex:V,getIndex:he,toIndex:P,toPage:h,toDest:J,hasFocus:k,isBusy:ce}}var Ag="http://www.w3.org/2000/svg",Fg="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",Hr=40;function Ng(e,t,n){var i=an(e),o=i.on,r=i.bind,l=i.emit,c=n.classes,d=n.i18n,u=t.Elements,p=t.Controller,y=u.arrows,x=u.track,m=y,f=u.prev,S=u.next,w,N,v={};function M(){U(),o(hn,E)}function E(){X(),M()}function U(){var q=n.arrows;q&&!(f&&S)&&W(),f&&S&&(mr(v,{prev:f,next:S}),gr(m,q?"":"none"),Gn(m,N=Ml+"--"+n.direction),q&&(D(),C(),Xt([f,S],Er,x.id),l(Mu,f,S)))}function X(){i.destroy(),ri(m,N),w?(Yi(y?[f,S]:m),f=S=null):Xn([f,S],Ll)}function D(){o([Fi,Oo,ln,Ji,ba],C),r(S,"click",tn(_,">")),r(f,"click",tn(_,"<"))}function _(q){p.go(q,!0)}function W(){m=y||xo("div",c.arrows),f=T(!0),S=T(!1),w=!0,Lr(m,[f,S]),!y&&hl(m,x)}function T(q){var R='<button class="'+c.arrow+" "+(q?c.prev:c.next)+'" type="button"><svg xmlns="'+Ag+'" viewBox="0 0 '+Hr+" "+Hr+'" width="'+Hr+'" height="'+Hr+'" focusable="false"><path d="'+(n.arrowPath||Fg)+'" />';return yu(R)}function C(){if(f&&S){var q=e.index,R=p.getPrev(),$=p.getNext(),I=R>-1&&q<R?d.last:d.prev,j=$>-1&&q>$?d.first:d.next;f.disabled=R<0,S.disabled=$<0,Xt(f,En,I),Xt(S,En,j),l(Pu,f,S,R,$)}}return{arrows:v,mount:M,destroy:X,update:C}}var _g=yl+"-interval";function Hg(e,t,n){var i=an(e),o=i.on,r=i.bind,l=i.emit,c=Aa(n.interval,e.go.bind(e,">"),D),d=c.isPaused,u=t.Elements,p=t.Elements,y=p.root,x=p.toggle,m=n.autoplay,f,S,w=m==="pause";function N(){m&&(v(),x&&Xt(x,Er,u.track.id),w||M(),X())}function v(){n.pauseOnHover&&r(y,"mouseenter mouseleave",function(W){f=W.type==="mouseenter",U()}),n.pauseOnFocus&&r(y,"focusin focusout",function(W){S=W.type==="focusin",U()}),x&&r(x,"click",function(){w?M():E(!0)}),o([di,ka,ln],c.rewind),o(di,_)}function M(){d()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),S=f=w=!1,X(),l(wl))}function E(W){W===void 0&&(W=!0),w=!!W,X(),d()||(c.pause(),l($l))}function U(){w||(f||S?E(!1):M())}function X(){x&&(oi(x,Qi,!w),Xt(x,En,n.i18n[w?"play":"pause"]))}function D(W){var T=u.bar;T&&_n(T,"width",W*100+"%"),l(ku,W)}function _(W){var T=t.Slides.getAt(W);c.set(T&&+Hn(T.slide,_g)||n.interval)}return{mount:N,destroy:c.cancel,play:M,pause:E,isPaused:d}}function Wg(e,t,n){var i=an(e),o=i.on;function r(){n.cover&&(o(Cl,tn(c,!0)),o([Fi,hn,ln],tn(l,!0)))}function l(d){t.Slides.forEach(function(u){var p=Mr(u.container||u.slide,"img");p&&p.src&&c(d,p,u)})}function c(d,u,p){p.style("background",d?'center/cover no-repeat url("'+u.src+'")':"",!0),gr(u,d?"none":"")}return{mount:r,destroy:tn(l,!1)}}var Og=10,Dg=600,zg=.6,Bg=1.5,jg=800;function Vg(e,t,n){var i=an(e),o=i.on,r=i.emit,l=e.state.set,c=t.Move,d=c.getPosition,u=c.getLimit,p=c.exceededLimit,y=c.translate,x=e.is(Io),m,f,S=1;function w(){o(di,E),o([hn,ln],U)}function N(D,_,W,T,C){var q=d();if(E(),W&&(!x||!p())){var R=t.Layout.sliderSize(),$=Ws(D)*R*xa(xn(D)/R)||0;D=c.toPosition(t.Controller.toDest(D%R))+$}var I=xu(q,D,1);S=1,_=I?0:_||va(xn(D-q)/Bg,jg),f=T,m=Aa(_,v,tn(M,q,D,C),1),l(Cr),r(ka),m.start()}function v(){l(Co),f&&f(),r(Ji)}function M(D,_,W,T){var C=d(),q=D+(_-D)*X(T),R=(q-C)*S;y(C+R),x&&!W&&p()&&(S*=zg,xn(R)<Og&&N(u(p(!0)),Dg,!1,f,!0))}function E(){m&&m.cancel()}function U(){m&&!m.isPaused()&&(E(),v())}function X(D){var _=n.easingFunc;return _?_(D):1-Math.pow(1-D,4)}return{mount:w,destroy:E,scroll:N,cancel:U}}var uo={passive:!1,capture:!0};function Gg(e,t,n){var i=an(e),o=i.on,r=i.emit,l=i.bind,c=i.unbind,d=e.state,u=t.Move,p=t.Scroll,y=t.Controller,x=t.Elements.track,m=t.Media.reduce,f=t.Direction,S=f.resolve,w=f.orient,N=u.getPosition,v=u.exceededLimit,M,E,U,X,D,_=!1,W,T,C;function q(){l(x,Qa,_s,uo),l(x,Za,_s,uo),l(x,Uu,$,uo),l(x,"click",F,{capture:!0}),l(x,"dragstart",ni),o([Fi,hn],R)}function R(){var Z=n.drag;ue(!Z),X=Z==="free"}function $(Z){if(W=!1,!T){var le=Le(Z);ve(Z.target)&&(le||!Z.button)&&(y.isBusy()?ni(Z,!0):(C=le?x:window,D=d.is([Wo,Cr]),U=null,l(C,Qa,I,uo),l(C,Za,j,uo),u.cancel(),p.cancel(),K(Z)))}}function I(Z){if(d.is(la)||(d.set(la),r(Tu)),Z.cancelable)if(D){u.translate(M+te(k(Z)));var le=ce(Z)>gc,oe=_!==(_=v());(le||oe)&&K(Z),W=!0,r(Iu),ni(Z)}else J(Z)&&(D=h(Z),ni(Z))}function j(Z){d.is(la)&&(d.set(Co),r(Lu)),D&&(P(Z),ni(Z)),c(C,Qa,I),c(C,Za,j),D=!1}function F(Z){!T&&W&&ni(Z,!0)}function K(Z){U=E,E=Z,M=N()}function P(Z){var le=V(Z),oe=he(le),ge=n.rewind&&n.rewindByDrag;m(!1),X?y.scroll(oe,0,n.snap):e.is(Rr)?y.go(w(Ws(le))<0?ge?"<":"-":ge?">":"+"):e.is(Io)&&_&&ge?y.go(v(!0)?">":"<"):y.go(y.toDest(oe),!0),m(!0)}function h(Z){var le=n.dragMinThreshold,oe=dr(le),ge=oe&&le.mouse||0,Se=(oe?le.touch:+le)||10;return xn(k(Z))>(Le(Z)?Se:ge)}function J(Z){return xn(k(Z))>xn(k(Z,!0))}function V(Z){if(e.is(Do)||!_){var le=ce(Z);if(le&&le<gc)return k(Z)/le}return 0}function he(Z){return N()+Ws(Z)*Pi(xn(Z)*(n.flickPower||600),X?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function k(Z,le){return me(Z,le)-me(L(Z),le)}function ce(Z){return Hs(Z)-Hs(L(Z))}function L(Z){return E===Z&&U||E}function me(Z,le){return(Le(Z)?Z.changedTouches[0]:Z)["page"+S(le?"Y":"X")]}function te(Z){return Z/(_&&e.is(Io)?Cg:1)}function ve(Z){var le=n.noDrag;return!ur(Z,"."+Bu+", ."+Oa)&&(!le||!ur(Z,le))}function Le(Z){return typeof TouchEvent<"u"&&Z instanceof TouchEvent}function de(){return D}function ue(Z){T=Z}return{mount:q,disable:ue,isDragging:de}}var Xg={Spacebar:" ",Right:_a,Left:Na,Up:Nu,Down:_u};function Pl(e){return e=Mi(e)?e:e.key,Xg[e]||e}var hc="keydown";function Ug(e,t,n){var i=an(e),o=i.on,r=i.bind,l=i.unbind,c=e.root,d=t.Direction.resolve,u,p;function y(){x(),o(hn,m),o(hn,x),o(di,S)}function x(){var N=n.keyboard;N&&(u=N==="global"?window:c,r(u,hc,w))}function m(){l(u,hc)}function f(N){p=N}function S(){var N=p;p=!0,pu(function(){p=N})}function w(N){if(!p){var v=Pl(N);v===d(Na)?e.go("<"):v===d(_a)&&e.go(">")}}return{mount:y,destroy:m,disable:f}}var sr=yl+"-lazy",ua=sr+"-srcset",qg="["+sr+"], ["+ua+"]";function Kg(e,t,n){var i=an(e),o=i.on,r=i.off,l=i.bind,c=i.emit,d=n.lazyLoad==="sequential",u=[Oo,Ji],p=[];function y(){n.lazyLoad&&(x(),o(ln,x))}function x(){ci(p),m(),d?N():(r(u),o(u,f),f())}function m(){t.Slides.forEach(function(v){fl(v.slide,qg).forEach(function(M){var E=Hn(M,sr),U=Hn(M,ua);if(E!==M.src||U!==M.srcset){var X=n.classes.spinner,D=M.parentElement,_=Mr(D,"."+X)||xo("span",X,D);p.push([M,v,_]),M.src||gr(M,"none")}})})}function f(){p=p.filter(function(v){var M=n.perPage*((n.preloadPages||1)+1)-1;return v[1].isWithin(e.index,M)?S(v):!0}),p.length||r(u)}function S(v){var M=v[0];Gn(v[1].slide,Bs),l(M,"load error",tn(w,v)),Xt(M,"src",Hn(M,sr)),Xt(M,"srcset",Hn(M,ua)),Xn(M,sr),Xn(M,ua)}function w(v,M){var E=v[0],U=v[1];ri(U.slide,Bs),M.type!=="error"&&(Yi(v[2]),gr(E,""),c(Cl,E,U),c(To)),d&&N()}function N(){p.length&&S(p.shift())}return{mount:y,destroy:tn(ci,p),check:f}}function Yg(e,t,n){var i=an(e),o=i.on,r=i.emit,l=i.bind,c=t.Slides,d=t.Elements,u=t.Controller,p=u.hasFocus,y=u.getIndex,x=u.go,m=t.Direction.resolve,f=d.pagination,S=[],w,N;function v(){M(),o([hn,ln,ba],v);var T=n.pagination;f&&gr(f,T?"":"none"),T&&(o([di,ka,Ji],W),E(),W(),r(Eu,{list:w,items:S},_(e.index)))}function M(){w&&(Yi(f?Ai(w.children):w),ri(w,N),ci(S),w=null),i.destroy()}function E(){var T=e.length,C=n.classes,q=n.i18n,R=n.perPage,$=p()?u.getEnd()+1:hr(T/R);w=f||xo("ul",C.pagination,d.track.parentElement),Gn(w,N=Da+"--"+D()),Xt(w,ai,"tablist"),Xt(w,En,q.select),Xt(w,Il,D()===Ha?"vertical":"");for(var I=0;I<$;I++){var j=xo("li",null,w),F=xo("button",{class:C.page,type:"button"},j),K=c.getIn(I).map(function(h){return h.slide.id}),P=!p()&&R>1?q.pageX:q.slideX;l(F,"click",tn(U,I)),n.paginationKeyboard&&l(F,"keydown",tn(X,I)),Xt(j,ai,"presentation"),Xt(F,ai,"tab"),Xt(F,Er,K.join(" ")),Xt(F,En,Os(P,I+1)),Xt(F,bo,-1),S.push({li:j,button:F,page:I})}}function U(T){x(">"+T,!0)}function X(T,C){var q=S.length,R=Pl(C),$=D(),I=-1;R===m(_a,!1,$)?I=++T%q:R===m(Na,!1,$)?I=(--T+q)%q:R==="Home"?I=0:R==="End"&&(I=q-1);var j=S[I];j&&(fu(j.button),x(">"+I),ni(C,!0))}function D(){return n.paginationDirection||n.direction}function _(T){return S[u.toPage(T)]}function W(){var T=_(y(!0)),C=_(y());if(T){var q=T.button;ri(q,Qi),Xn(q,cc),Xt(q,bo,-1)}if(C){var R=C.button;Gn(R,Qi),Xt(R,cc,!0),Xt(R,bo,"")}r(Ru,{list:w,items:S},T,C)}return{items:S,mount:v,destroy:M,getAt:_,update:W}}var Qg=[" ","Enter"];function Zg(e,t,n){var i=n.isNavigation,o=n.slideFocus,r=[];function l(){e.splides.forEach(function(f){f.isParent||(u(e,f.splide),u(f.splide,e))}),i&&p()}function c(){r.forEach(function(f){f.destroy()}),ci(r)}function d(){c(),l()}function u(f,S){var w=an(f);w.on(di,function(N,v,M){S.go(S.is(Do)?M:N)}),r.push(w)}function p(){var f=an(e),S=f.on;S(xl,x),S(Au,m),S([Fi,hn],y),r.push(f),f.emit(Sl,e.splides)}function y(){Xt(t.Elements.list,Il,n.direction===Ha?"vertical":"")}function x(f){e.go(f.index)}function m(f,S){gl(Qg,Pl(S))&&(x(f),ni(S))}return{setup:tn(t.Media.set,{slideFocus:Tr(o)?i:o},!0),mount:l,destroy:c,remount:d}}function Jg(e,t,n){var i=an(e),o=i.bind,r=0;function l(){n.wheel&&o(t.Elements.track,"wheel",c,uo)}function c(u){if(u.cancelable){var p=u.deltaY,y=p<0,x=Hs(u),m=n.wheelMinThreshold||0,f=n.wheelSleep||0;xn(p)>m&&x-r>f&&(e.go(y?"<":">"),r=x),d(y)&&ni(u)}}function d(u){return!n.releaseWheel||e.state.is(Wo)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var eh=90;function th(e,t,n){var i=an(e),o=i.on,r=t.Elements.track,l=n.live&&!n.isNavigation,c=xo("span",xg),d=Aa(eh,tn(p,!1));function u(){l&&(x(!t.Autoplay.isPaused()),Xt(r,pc,!0),c.textContent="…",o(wl,tn(x,!0)),o($l,tn(x,!1)),o([Oo,Ji],tn(p,!0)))}function p(m){Xt(r,uc,m),m?(Lr(r,c),d.start()):(Yi(c),d.cancel())}function y(){Xn(r,[dc,pc,uc]),Yi(c)}function x(m){l&&Xt(r,dc,m?"off":"polite")}return{mount:u,disable:x,destroy:y}}var nh=Object.freeze({__proto__:null,Media:dg,Direction:ug,Elements:Tg,Slides:Lg,Layout:Mg,Clones:Eg,Move:Rg,Controller:kg,Arrows:Ng,Autoplay:Hg,Cover:Wg,Scroll:Vg,Drag:Gg,Keyboard:Ug,LazyLoad:Kg,Pagination:Yg,Sync:Zg,Wheel:Jg,Live:th}),ih={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"},oh={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:wg,i18n:ih,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function rh(e,t,n){var i=t.Slides;function o(){an(e).on([Fi,ln],r)}function r(){i.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function l(c,d){i.style("transition","opacity "+n.speed+"ms "+n.easing),pu(d)}return{mount:o,start:l,cancel:_s}}function ah(e,t,n){var i=t.Move,o=t.Controller,r=t.Scroll,l=t.Elements.list,c=tn(_n,l,"transition"),d;function u(){an(e).bind(l,"transitionend",function(m){m.target===l&&d&&(y(),d())})}function p(m,f){var S=i.toPosition(m,!0),w=i.getPosition(),N=x(m);xn(S-w)>=1&&N>=1?n.useScroll?r.scroll(S,N,!1,f):(c("transform "+N+"ms "+n.easing),i.translate(S,!0),d=f):(i.jump(m),f())}function y(){c(""),r.cancel()}function x(m){var f=n.rewindSpeed;if(e.is(Io)&&f){var S=o.getIndex(!0),w=o.getEnd();if(S===0&&m>=w||S>=w&&m===0)return f}return n.speed}return{mount:u,start:p,cancel:y}}var sh=(function(){function e(n,i){this.event=an(),this.Components={},this.state=lg(go),this.splides=[],this._o={},this._E={};var o=Mi(n)?vu(document,n):n;ar(o,o+" is invalid."),this.root=o,i=Ci({label:Hn(o,En)||"",labelledby:Hn(o,Tl)||""},oh,e.defaults,i||{});try{Ci(i,JSON.parse(Hn(o,yl)))}catch{ar(!1,"Invalid JSON")}this._o=Object.create(Ci({},i))}var t=e.prototype;return t.mount=function(i,o){var r=this,l=this.state,c=this.Components;ar(l.is([go,ya]),"Already mounted!"),l.set(go),this._C=c,this._T=o||this._T||(this.is(Rr)?rh:ah),this._E=i||this._E;var d=mr({},nh,this._E,{Transition:this._T});return qi(d,function(u,p){var y=u(r,c,r._o);c[p]=y,y.setup&&y.setup()}),qi(c,function(u){u.mount&&u.mount()}),this.emit(Fi),Gn(this.root,bg),l.set(Co),this.emit(Ds),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(Co)&&(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(Ai(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(ln),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,r=this.state;return r.is(go)?an(this).on(Ds,this.destroy.bind(this,i)):(qi(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(bl),o.destroy(),i&&ci(this.splides),r.set(ya)),this},ig(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})(),El=sh;El.defaults={};El.STATES=rg;var fc=[[Fi,"onMounted"],[Ds,"onReady"],[di,"onMove"],[Oo,"onMoved"],[xl,"onClick"],[Su,"onActive"],[wu,"onInactive"],[$u,"onVisible"],[Cu,"onHidden"],[ln,"onRefresh"],[hn,"onUpdated"],[To,"onResize"],[Ra,"onResized"],[Tu,"onDrag"],[Iu,"onDragging"],[Lu,"onDragged"],[ka,"onScroll"],[Ji,"onScrolled"],[bl,"onDestroy"],[Mu,"onArrowsMounted"],[Pu,"onArrowsUpdated"],[Eu,"onPaginationMounted"],[Ru,"onPaginationUpdated"],[Sl,"onNavigationMounted"],[wl,"onAutoplayPlay"],[ku,"onAutoplayPlaying"],[$l,"onAutoplayPause"],[Cl,"onLazyLoadLoaded"]];function Rl(...e){return e.filter(Boolean).join(" ")}function Sa(e){return e!==null&&typeof e=="object"}function js(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!js(n,t[i]));if(Sa(e)&&Sa(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!js(e[o],t[o]))}return e===t}function lh(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function ch(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 Vs(e,t){const n=e;return ch(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():Sa(i)?n[o]=Vs(Sa(n[o])?n[o]:{},i):n[o]=i}),n}var dh=({children:e,className:t,...n})=>s.createElement("div",{className:Rl("splide__track",t),...n},s.createElement("ul",{className:"splide__list"},e)),kl=class extends s.Component{constructor(){super(...arguments),this.splideRef=s.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new El(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Vs({},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&&!js(this.options,e)&&(this.splide.options=e,this.options=Vs({},e));const t=this.getSlides();lh(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){fc.forEach(([t,n])=>{const i=this.props[n];typeof i=="function"&&e.on(t,(...o)=>{i(e,...o)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:i,...o}=this.props;return s.createElement(t,{className:Rl("splide",e),ref:this.splideRef,...this.omit(o,["options",...fc.map(r=>r[1])])},n?s.createElement(dh,null,i):i)}},Al=({children:e,className:t,...n})=>s.createElement("li",{className:Rl("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 dh="RichTextRenderer-module__link___BWeZ2",uh={link:dh},ph=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))},zo=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>ph(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function pn(e){const{color:t,...n}=e;return n}function nn(e,t){var o,r,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:zo(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:b.scalingValue(e.letterSpacing,t),wordSpacing:b.scalingValue(e.wordSpacing,t),fontSize:b.scalingValue(n,t),lineHeight:i!==void 0?b.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(r=e.textAppearance)==null?void 0:r.textDecoration,fontVariant:(l=e.textAppearance)==null?void 0:l.fontVariant,textAlign:e.textAlign,color:e.color}}function Uu(e){return e!=null&&e.length?e.some(t=>t.type==="link"?Uu(t.children):!!t.text):!1}const Zi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?a.jsx(b.LinkWrapper,{className:uh.link,link:i,children:t(i.children)},o):a.jsx("span",{style:mh(i),children:i.text},o));return a.jsx(a.Fragment,{children:e.map((n,i)=>{const o=n.children;return a.jsx("div",{children:Uu(o)?t(o):" "},i)})})};function mh(e){return{...e.fontFamily&&{fontFamily:zo(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 gh="SvgImage-module__svg___q3xE-",hh="SvgImage-module__img___VsTm-",fc={svg:gh,img:hh},Za=new Map;function yr(e){return e.startsWith("data:")||e.startsWith("blob:")}function qu(e){if(yr(e))return Promise.resolve(e);const t=Za.get(e);if(t)return t;const n=fetch(e,{mode:"cors",cache:"reload"}).then(i=>{if(!i.ok)throw new Error(String(i.status));return i.blob()}).then(i=>URL.createObjectURL(i)).catch(i=>{throw Za.delete(e),i});return Za.set(e,n),n}const fh=e=>{const t=e.trim().toLowerCase();return!!(t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")||t.includes(".svg")||t.startsWith("blob:"))},yh=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,mn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[r,l]=s.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")')),[c,d]=s.useState(()=>yr(e)?e:null);return s.useEffect(()=>{if(typeof window<"u"&&window.CSS){const u=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');l(u)}},[]),s.useEffect(()=>{if(!fh(e)){d(null);return}if(yr(e)){d(e);return}let u=!1;return qu(e).then(p=>{u||d(p)}).catch(()=>{u||d(null)}),()=>{u=!0}},[e]),!c||!r?a.jsx("img",{src:e,alt:"",className:Rt(fc.img,i),style:o}):a.jsx("span",{"data-supports-mask":r,className:Rt(fc.svg,i),style:{"--svg":yh(c),"--fill":t,"--hover-fill":n,...o??{}}})},vh={"top-left":Pt.topLeftAlignment,"top-center":Pt.topCenterAlignment,"top-right":Pt.topRightAlignment,"middle-left":Pt.middleLeftAlignment,"middle-center":Pt.middleCenterAlignment,"middle-right":Pt.middleRightAlignment,"bottom-left":Pt.bottomLeftAlignment,"bottom-center":Pt.bottomCenterAlignment,"bottom-right":Pt.bottomRightAlignment};function xh({settings:e,content:t,styles:n,isEditor:i}){const[o,r]=s.useState(null),{widthSettings:l,fontSettings:c,letterSpacing:d,textAlign:u,wordSpacing:p,fontSizeLineHeight:y,textAppearance:x,color:m}=n.imageCaption??{},[f,S]=s.useState(void 0),[w,N]=s.useState(null),[v,M]=s.useState(0),[R,U]=s.useState(0),{direction:X,transition:D,controls:_,pagination:W,imageCaption:T,triggers:C}=e,q=s.useRef(D.type),{x:E,y:$}=e.controls.offset,I=j=>{o&&o.go(j)};return s.useEffect(()=>{if(!w)return;const j=new ResizeObserver(F=>{if(!o)return;const[K]=F;S({width:Math.round(K.contentRect.width),height:Math.round(K.contentRect.height)})});return j.observe(w),()=>j.unobserve(w)},[w]),s.useEffect(()=>{!o||q.current===D.type||(U(j=>j+1),q.current=D.type)},[D.type]),a.jsx("div",{className:Rt(Pt.wrapper,{[Pt.editor]:i}),ref:N,children:a.jsxs("div",{className:Pt.sliderInner,style:{width:f?f.width:"100%",height:f?f.height:"100%",backgroundColor:D.backgroundColor&&D.type==="fade in"?D.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:Rt(Pt.captionBlock),children:a.jsx("div",{className:Pt.captionTextWrapper,children:t.map((j,F)=>a.jsx("div",{className:Rt(Pt.captionText,vh[T.alignment],{[Pt.withPointerEvents]:F===v&&i,[Pt.active]:F===v}),style:{fontFamily:zo(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:l.sizing==="auto"?"max-content":b.scalingValue(l.width,i),letterSpacing:b.scalingValue(d,i),wordSpacing:b.scalingValue(p,i),textAlign:u,fontSize:b.scalingValue(y.fontSize,i),lineHeight:b.scalingValue(y.lineHeight,i),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:m,transitionDuration:D.duration?`${Math.round(parseInt(D.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:Pt.captionTextInner,style:{"--link-hover-color":T.linkHoverColor,"--link-color":T.linkColor,position:"relative",top:b.scalingValue(T.offset.y,i),left:b.scalingValue(T.offset.x,i)},children:a.jsx(Zi,{content:j.imageCaption})})},F))})}),a.jsx(El,{onMove:j=>{M(j.index)},ref:r,options:{arrows:!1,speed:D.duration?parseInt(D.duration):500,autoplay:C.autoPlay!==null,...C.autoPlay!==null&&{interval:parseInt(C.autoPlay)*1e3},direction:X==="horiz"||D.type==="fade in"?"ltr":"ttb",pagination:!1,drag:C.triggersList.drag,perPage:1,width:f?f.width:"100%",height:f?f.height:"100%",type:D.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((j,F)=>a.jsx(kl,{children:a.jsx("div",{className:Pt.sliderItem,children:a.jsx("div",{className:Pt.imgWrapper,children:a.jsx("img",{className:Rt(Pt.sliderImage,{[Pt.contain]:j.image.objectFit==="contain",[Pt.cover]:j.image.objectFit==="cover"}),src:j.image.assetId,alt:j.image.name??""})})})},F))},R),_.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Rt(Pt.arrow,{[Pt.arrowVertical]:X==="vert",[Pt.hoverArrow]:_.show==="on hover"}),style:{color:_.color,"--arrow-hover-color":_.hover},children:a.jsxs("button",{onClick:()=>{I("-1")},className:Pt.arrowInner,style:{transform:`translate(${b.scalingValue(E,i)}, ${b.scalingValue($*(X==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${X==="horiz"?"0deg":"90deg"})`},children:[_.arrowsImgUrl&&a.jsx(mn,{url:_.arrowsImgUrl,fill:_.color,hoverFill:_.hover,className:Rt(Pt.arrowImg,Pt.mirror)}),!_.arrowsImgUrl&&a.jsx(yc,{color:_.color,className:Rt(Pt.arrowIcon,Pt.arrowImg,Pt.mirror)})]})}),a.jsx("div",{className:Rt(Pt.arrow,Pt.nextArrow,{[Pt.arrowVertical]:X==="vert",[Pt.hoverArrow]:_.show==="on hover"}),style:{color:_.color,"--arrow-hover-color":_.hover},children:a.jsxs("button",{className:Pt.arrowInner,onClick:()=>I("+1"),style:{transform:`translate(${b.scalingValue(E*(X==="horiz"?-1:1),i)}, ${b.scalingValue($,i)}) scale(${e.controls.scale/100}) rotate(${X==="horiz"?"0deg":"90deg"})`},children:[_.arrowsImgUrl&&a.jsx(mn,{url:_.arrowsImgUrl,fill:_.color,hoverFill:_.hover,className:Pt.arrowImg}),!_.arrowsImgUrl&&a.jsx(yc,{color:_.color,className:Rt(Pt.arrowIcon,Pt.arrowImg)})]})})]}),C.triggersList.click&&a.jsx("div",{className:Pt.clickOverlay,onClick:()=>{o&&o.go("+1")}}),W.isActive&&a.jsx("div",{className:Rt(Pt.pagination,{[Pt.paginationInsideBottom]:W.position==="inside-1"&&X==="horiz",[Pt.paginationInsideTop]:W.position==="inside-2"&&X==="horiz",[Pt.paginationOutsideBottom]:W.position==="outside-1"&&X==="horiz",[Pt.paginationOutsideTop]:W.position==="outside-2"&&X==="horiz",[Pt.paginationInsideLeft]:W.position==="inside-1"&&X==="vert",[Pt.paginationInsideRight]:W.position==="inside-2"&&X==="vert",[Pt.paginationOutsideLeft]:W.position==="outside-1"&&X==="vert",[Pt.paginationOutsideRight]:W.position==="outside-2"&&X==="vert",[Pt.paginationVertical]:X==="vert"}),children:a.jsx("div",{className:Pt.paginationInner,style:{backgroundColor:W.colors[2],transform:`scale(${W.scale/100}) translate(${b.scalingValue(W.offset.x,i)}, ${b.scalingValue(W.offset.y,i)}) rotate(${X==="horiz"?"0deg":"90deg"})`},children:t.map((j,F)=>a.jsx("button",{onClick:()=>{o&&o.go(F)},className:Rt(Pt.paginationItem),children:a.jsx("div",{className:Rt(Pt.dot,{[Pt.activeDot]:F===v}),style:{backgroundColor:F===v?W.colors[0]:W.colors[1],"--pagination-hover-color":W.hover}})},F))})})]})})}function yc({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const bh={element:xh,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.assetId",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:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",assetId:"01M3QM74XES6E7GVC0H3KJ2RH6",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEAZ8H1DTC5V1S554K",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEDRP49HNTEPNZYQTP",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"]}},Sh="ImageRevealSlider-module__imageRevealSlider___UE5Ob",wh="ImageRevealSlider-module__image___Qjt-e",$h="ImageRevealSlider-module__link___N-iLG",Ch="ImageRevealSlider-module__cursor___2U03d",Uo={imageRevealSlider:Sh,image:wh,link:$h,cursor:Ch};function vc(e,t,n){for(const i of n){const o=new Image;o.src=i.assetId;const r=i.width?Number.parseFloat(i.width):o.naturalWidth,l=o.naturalHeight/o.naturalWidth*r,c=r/2,d=l/2;if(e>=i.x-c&&e<=i.x+c&&t>=i.y-d&&t<=i.y+d)return!0}return!1}function Ja(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Th(e,t,n,i){let o,r;if(t==="custom"){o=n;const l=await Ja(e);r=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await Ja(e);r=l.height/l.width*o}else{const l=await Ja(e);o=l.width,r=l.height}return{width:o,height:r,finalWidth:`${o}px`}}function Ih({settings:e,content:t,isEditor:n}){const[i,o]=s.useState(null),[r,l]=s.useState([]),[c,d]=s.useState(0),u=s.useRef(0),[p,y]=s.useState({x:0,y:0}),[x,m]=s.useState(1),[f,S]=s.useState("none"),w=s.useRef({x:0,y:0}),[N,v]=s.useState(!1),{sizeType:M,imageWidth:R,randomRangeImageWidth:U}=e.imageSize,{revealPosition:X,visible:D}=e.position,{cursorType:_,target:W,defaultCursorScale:T,defaultCursor:C,hoverCursorScale:q,hoverCursor:E}=e.cursor;s.useEffect(()=>{if(!i)return;const j=(P,h)=>{const J=i.getBoundingClientRect(),V=P-J.left,he=h-J.top;if(y({x:V,y:he}),_==="system"){S("none"),m(1);return}const k=V,ce=he,L=document.elementFromPoint(J.left+k,J.top+ce);if(L&&L.closest("a")){S("none"),m(1);return}const me=vc(k,ce,r)||W==="area"?{img:E??"none",scale:q}:{img:C??"none",scale:T};S(me.img),m(me.scale)},F=P=>{P.stopPropagation(),w.current={x:P.clientX,y:P.clientY},j(P.clientX,P.clientY)},K=()=>{N&&j(w.current.x,w.current.y)};return i.addEventListener("mousemove",F),window.addEventListener("scroll",K,!0),()=>{i.removeEventListener("mousemove",F),window.removeEventListener("scroll",K,!0)}},[i,N,p,_,W,E,C,q,T,r]),s.useEffect(()=>{N||(S("none"),m(0))},[N]);const $=async(j,F,K,P={})=>{const{width:h,height:J,finalWidth:V}=await Th(j.image.assetId,M,R,U);let he=0,k=0;X==="same"?(he=F/2,k=K/2):(he=P.x??Math.random()*F,k=P.y??Math.random()*K);const ce=Math.min(Math.max(he,h/2),F-h/2),L=Math.min(Math.max(k,J/2),K-J/2);return{id:u.current++,assetId:j.image.assetId,link:j.link,name:j.image.name,x:ce,y:L,width:V}};s.useEffect(()=>{if(!i||t.length===0)return;const j=i.getBoundingClientRect(),F=j.width,K=j.height,P=[];(async()=>{const J=t[0],V=await $(J,F,K);P.push(V),l(P),d(1)})()},[M,R,U,X,i]),s.useEffect(()=>{D==="last One"&&l(j=>j.length>0?[j[j.length-1]]:[])},[D]);const I=async j=>{if(!i)return;const F=i.getBoundingClientRect(),K=j.clientX-F.left,P=j.clientY-F.top;if(W==="image"&&!vc(K,P,r))return;let h=0,J=0;X==="on Click"?(h=K,J=P):X==="same"?(h=F.width/2,J=F.height/2):(h=Math.random()*F.width,J=Math.random()*F.height);const V=t[c],he=await $(V,F.width,F.height,{x:h,y:J});l(k=>D==="all"?[...k,he]:[he]),d(k=>k>=t.length-1?0:k+1)};return a.jsxs("div",{ref:o,onClick:I,onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),className:Uo.imageRevealSlider,style:{cursor:f==="none"?"default":"none"},children:[r.map(j=>a.jsx("div",{className:Uo.wrapper,style:{top:`${j.y}px`,left:`${j.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:j.width??"auto",height:"auto",cursor:f==="none"?"default":"none"},children:a.jsx(b.LinkWrapper,{link:W==="area"?j.link:void 0,className:Uo.link,children:a.jsx("img",{src:j.assetId,alt:j.name,className:Uo.image},j.id)})},j.id)),N&&a.jsx("div",{className:Uo.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${x})`,backgroundImage:`url('${f}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Lh={element:Ih,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.assetId",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:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},link:{type:"object",label:"URL",display:{type:"link-input"}}},required:["image"]},default:[{image:{objectFit:"cover",assetId:"01M3QM74XGWBJY3AQQ71GC2Z6Q",name:"Slider-1.png"},link:{type:"url",value:"",target:"blank"}},{image:{objectFit:"cover",assetId:"01M3QM74XGMXS1Z5ZY2RFGS3T4",name:"Slider-2.png"},link:{type:"url",value:"",target:"blank"}},{image:{objectFit:"cover",assetId:"01M3QM74XGWG6VCHNEXKVKAJGT",name:"Slider-3.png"},link:{type:"url",value:"",target:"blank"}},{image:{objectFit:"cover",assetId:"01M3QM74XGCVMTPNHFHMR98RPZ",name:"Slider-4.png"},link:{type:"url",value:"",target:"blank"}}]}}}},Mh="LightBox-module__hidden___9s-9x",Ph="LightBox-module__heroImage___sTxNF",Rh="LightBox-module__background___rm9ml",Eh="LightBox-module__editor___4ACaY",kh="LightBox-module__contentStyle___Bgnsq",Ah="LightBox-module__imageStyle___tLIlB",Fh="LightBox-module__imgWrapper___LuFUp",Nh="LightBox-module__contain___8-yaS",_h="LightBox-module__cover___hNvOG",Hh="LightBox-module__caption___b6L2I",Wh="LightBox-module__captionTextInner___rCGNH",Oh="LightBox-module__lightboxSplide___XFuWC",Dh="LightBox-module__arrow___iz38X",zh="LightBox-module__arrowVertical___Zfz81",Bh="LightBox-module__nextArrow___zkAQN",jh="LightBox-module__arrowInner___p48sW",Vh="LightBox-module__arrowIcon___3VaFf",Gh="LightBox-module__arrowImg___pNV88",Xh="LightBox-module__mirror___pjeXc",Uh="LightBox-module__thumbsWrapper___GB-nU",qh="LightBox-module__thumbsContainerVertical___wttk5",Kh="LightBox-module__thumbsContainer___osSma",Yh="LightBox-module__thumbsAlignStart___MO6tY",Qh="LightBox-module__thumbsAlignCenter___Q4sUx",Zh="LightBox-module__thumbsAlignEnd___p4y9R",Jh="LightBox-module__thumbItem___HvnF3",ef="LightBox-module__closeButton___g2khP",tf="LightBox-module__fadeIn___0m5GW",nf="LightBox-module__slideInLeft___gPYwC",of="LightBox-module__slideInRight___S-pPp",rf="LightBox-module__slideInTop___DFdAj",af="LightBox-module__slideInBottom___m27kZ",sf="LightBox-module__fadeOut___55qBR",lf="LightBox-module__slideOutLeft___NvU7P",cf="LightBox-module__slideOutRight___SK7eC",df="LightBox-module__slideOutTop___Vgg0z",uf="LightBox-module__slideOutBottom___nJ0Ef",pf="LightBox-module__scaleSlide___vZriG",st={hidden:Mh,heroImage:Ph,background:Rh,editor:Eh,contentStyle:kh,imageStyle:Ah,imgWrapper:Fh,contain:Nh,cover:_h,caption:Hh,captionTextInner:Wh,lightboxSplide:Oh,arrow:Dh,arrowVertical:zh,nextArrow:Bh,arrowInner:jh,arrowIcon:Vh,arrowImg:Gh,mirror:Xh,thumbsWrapper:Uh,thumbsContainerVertical:qh,thumbsContainer:Kh,thumbsAlignStart:Yh,thumbsAlignCenter:Qh,thumbsAlignEnd:Zh,thumbItem:Jh,closeButton:ef,fadeIn:tf,slideInLeft:nf,slideInRight:of,slideInTop:rf,slideInBottom:af,fadeOut:sf,slideOutLeft:lf,slideOutRight:cf,slideOutTop:df,slideOutBottom:uf,scaleSlide:pf},Wr=(e,t,n)=>{const i={},[o,r]=e.split("-");return o==="top"?(i.top="0",i.bottom="auto"):o==="middle"?(i.top="50%",i.bottom="auto"):o==="bottom"&&(i.top="auto",i.bottom="0"),r==="left"?(i.left="0",i.right="auto"):r==="center"?(i.left="50%",i.right="auto"):r==="right"&&(i.left="auto",i.right="0"),o==="middle"&&r==="center"?i.transform=`translate(calc(-50% + ${b.scalingValue(t.x,n)}), calc(-50% + ${b.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${b.scalingValue(t.x,n)}, calc(-50% + ${b.scalingValue(t.y,n)}))`:r==="center"?i.transform=`translate(calc(-50% + ${b.scalingValue(t.x,n)}), ${b.scalingValue(t.y,n)})`:i.transform=`translate(${b.scalingValue(t.x,n)}, ${b.scalingValue(t.y,n)})`,i};function Ku(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 mf(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 Yu(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,r=n/i;if(r>o){const c=e;return{renderedW:c,renderedH:c/r}}const l=t;return{renderedW:l*r,renderedH:l}}function gf(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,r=n/i;if(r>o){const c=t;return{renderedW:c*r,renderedH:c}}const l=e;return{renderedW:l,renderedH:l/r}}function Qu(e,t,n,i,o){const{x:r,y:l}=mf(o);return{offsetX:r*(e-n),offsetY:l*(t-i)}}function hf(e){const t=e.getBoundingClientRect(),n=t.width,i=t.height;if(!n||!i)return"center center";const o=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,r=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight,{objectFit:l,objectPosition:c}=window.getComputedStyle(e),d=l==="cover"?gf:Yu,{renderedW:u,renderedH:p}=d(n,i,o,r),{offsetX:y,offsetY:x}=Qu(n,i,u,p,c),m=(y+u/2)/n*100,f=(x+p/2)/i*100;return`${m}% ${f}%`}function ff(e){return hf(e)}function Sa(e){const t=e.getBoundingClientRect(),n=Ku(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),r=e.naturalWidth,l=e.naturalHeight,{renderedW:c,renderedH:d}=Yu(i,o,r,l),u=window.getComputedStyle(e).objectPosition,{offsetX:p,offsetY:y}=Qu(i,o,c,d,u),x=t.left+n.left,m=t.top+n.top;return{x:p+x,y:y+m,width:c,height:d}}function xc(e){const t=e.getBoundingClientRect(),n=Ku(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function yf(e,t){const n=(()=>{if(e==="fade in")return st.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return st.slideInLeft;case"right":return st.slideInRight;case"top":return st.slideInTop;case"bottom":return st.slideInBottom;default:return st.slideInRight}return st.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return st.fadeIn;if(e==="slide in")switch(t){case"left":return st.slideInLeft;case"right":return st.slideInRight;case"top":return st.slideInTop;case"bottom":return st.slideInBottom;default:return st.slideInRight}return st.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return st.fadeOut;if(e==="slide in")switch(t){case"left":return st.slideOutLeft;case"right":return st.slideOutRight;case"top":return st.slideOutTop;case"bottom":return st.slideOutBottom;default:return st.slideOutRight}return st.fadeOut})(),r=(()=>{if(e==="fade in")return st.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return st.slideOutLeft;case"right":return st.slideOutRight;case"top":return st.slideOutTop;case"bottom":return st.slideOutBottom;default:return st.slideOutRight}return st.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:r}}const vf=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:r,isPreviewMode:l})=>{const[c,d]=s.useState(!1),{assetId:u}=e.thumbnailBlock.cover;return s.useEffect(()=>{o==="close"&&d(!1),o==="open"&&d(!0)},[o]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:u,alt:"Cover",className:st.heroImage,onClick:()=>d(!0)}),a.jsx(xf,{isOpen:c,onClose:()=>d(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:r})]})},xf=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:r,isEditor:l,metadata:c})=>{var Ce;const{widthSettings:d,fontSettings:u,letterSpacing:p,textAlign:y,wordSpacing:x,fontSizeLineHeight:m,textAppearance:f,color:S}=i.imageCaption??{},[w,N]=s.useState(0),[v,M]=s.useState(0),[R,U]=s.useState(!1),[X,D]=s.useState(!1),[_,W]=s.useState({}),T=s.useRef(null),C=s.useRef(null),q=s.useRef(null),E=s.useRef(!1),$=s.useRef(null),I=s.useRef(null),j=s.useRef(null),F=s.useRef(null),K=s.useRef(!1),P=s.useRef(null),[h,J]=s.useState(!1),{appear:V,triggers:he,slider:k,thumbnail:ce,controls:L,area:me,caption:te,layout:ve}=o.lightboxBlock,{appearClass:Le,backdropAppearClass:de,backdropDisappearClass:ue,disappearClass:Z}=yf(V.type,V.direction),le=(c==null?void 0:c.itemId)??null;s.useEffect(()=>{const g=()=>{setTimeout(()=>{var ee,ae;(ae=(ee=T.current)==null?void 0:ee.splide)==null||ae.refresh()},16)},Y=()=>{M(ee=>ee+1)};return window.addEventListener("ArticleEditor.Layout:change",g),window.addEventListener("ArticleEditor.ComponentContent:change",Y),()=>{window.removeEventListener("ArticleEditor.Layout:change",g),window.removeEventListener("ArticleEditor.ComponentContent:change",Y)}},[]),s.useEffect(()=>{if(!e||!ce.isActive){J(!1);return}const g=P.current;if(!g)return;const Y=()=>{k.direction==="horiz"?J(g.scrollWidth>g.clientWidth):J(g.scrollHeight>g.clientHeight)};Y();const ee=new ResizeObserver(Y);return ee.observe(g),()=>ee.disconnect()},[e,ce.isActive,n.length,_,k.direction]);const oe=s.useCallback(()=>{const g=window.matchMedia("(max-width: 768px)").matches,Y=b.getColorAlpha(me.color);g&&!l&&Y>.9&&(document.body.style.backgroundColor=""),U(!0),E.current=!0;const ee=ae=>{ae.target===$.current&&ae.animationName&&($.current&&I.current&&$.current.removeEventListener("animationend",I.current),I.current=null,E.current&&(E.current=!1,t()),U(!1))};$.current&&(I.current=ee,$.current.addEventListener("animationend",ee))},[t,me.color,l]),ge=(g,Y,ee)=>{var ae,ye;if(g){if(he.type==="click"&&he.switch==="image")he.repeat==="close"&&w===n.length-1?oe():(ae=T.current)==null||ae.go("+1");else if(he.type==="click"&&he.switch==="50/50"){const ne=g.getBoundingClientRect(),B=Y-ne.left,G=ee-ne.top,z=ne.width,ie=ne.height;let H;k.direction==="horiz"?H=B<z/2?"-1":"+1":H=G<ie/2?"-1":"+1",(ye=T.current)==null||ye.go(H)}}},Se=g=>{if(K.current){K.current=!1;return}const Y=n[w],ee=(Y==null?void 0:Y.image.objectFit)==="cover";let ae,ye;if("changedTouches"in g&&g.changedTouches.length>0)ae=g.changedTouches[0].clientX,ye=g.changedTouches[0].clientY;else if("clientX"in g)ae=g.clientX,ye=g.clientY;else return;let ne;if(ee&&q.current){const B=xc(q.current);ne=ae>=B.left&&ae<=B.right&&ye>=B.top&&ye<=B.bottom}else{const B=q.current?Sa(q.current):null;if(!B){g.target===g.currentTarget&&oe();return}ne=ae>=B.x&&ae<=B.x+B.width&&ye>=B.y&&ye<=B.y+B.height}ne?ge(q.current,ae,ye):oe()},Ee=g=>{const Y=g.target;(Y.classList.contains(st.thumbsWrapper)||Y.classList.contains(st.thumbsContainer))&&Se(g)};s.useEffect(()=>{if(!e)return;const g=Y=>{var ee,ae;if(Y.key==="Escape"){oe();return}if(Y.key==="ArrowRight"){N(ye=>(ye+1)%Math.max(n.length,1)),(ee=T.current)==null||ee.go("+1");return}Y.key==="ArrowLeft"&&(N(ye=>(ye-1+Math.max(n.length,1))%Math.max(n.length,1)),(ae=T.current)==null||ae.go("-1"))};return window.addEventListener("keydown",g),()=>{window.removeEventListener("keydown",g)}},[e,oe,n.length]),s.useEffect(()=>{if(e){if(N(0),M(Y=>Y+1),E.current=!1,U(!1),D(!1),W({}),!le)return;const g=new CustomEvent("page-overlay",{detail:{itemId:le}});window.dispatchEvent(g)}return()=>{$.current&&I.current&&($.current.removeEventListener("animationend",I.current),I.current=null),D(!1)}},[e,le]),s.useEffect(()=>{C.current!==null&&C.current!==k.type&&M(g=>g+1),C.current=k.type},[k.type]),s.useEffect(()=>{if(!e)return;const g=document.body.style.overflow,Y=window.matchMedia("(max-width: 768px)").matches,ee=b.getColorAlpha(me.color);document.body.style.overflow="hidden",D(!1);const ae=ne=>{ne.target===$.current&&!E.current&&ne.animationName&&(Y&&!l&&ee>.9&&(document.body.style.backgroundColor=me.color),D(!0),$.current&&j.current&&$.current.removeEventListener("animationend",j.current),j.current=null)};$.current&&(j.current=ae,$.current.addEventListener("animationend",ae));const ye=ne=>{const B=ne.target;B&&(B.closest(`.${st.thumbsWrapper}`)||B.closest(`.${st.thumbsContainer}`))||k.type!=="slide"&&ne.preventDefault()};return document.addEventListener("touchmove",ye,{passive:!1}),()=>{document.body.style.overflow=g,document.removeEventListener("touchmove",ye),$.current&&j.current&&($.current.removeEventListener("animationend",j.current),j.current=null),D(!1)}},[e,l,me.color,k.type]),s.useEffect(()=>{if(!e)return;const g=Y=>{var ae,ye;if(E.current){Y.stopPropagation();return}if(K.current){K.current=!1;return}const ee=Y.target;if(!(ee&&(ee.closest(`.${st.thumbsContainer}`)||ee.closest(`.${st.thumbItem}`)||ee.closest(`.${st.arrow}`)||ee.closest(`.${st.closeButton}`)||ee.closest(`.${st.caption}`)))){if(k.type==="slide"&&he.type==="drag"&&((ye=(ae=T.current)==null?void 0:ae.splide)!=null&&ye.root)){const ne=T.current.splide.root;if(ee&&(ne.contains(ee)||ne===ee))return}if(Y.touches.length===0&&Y.changedTouches.length>0){const ne=n[w],B=(ne==null?void 0:ne.image.objectFit)==="cover",G=Y.changedTouches[0];let z;if(B&&q.current){const ie=xc(q.current);z=G.clientX>=ie.left&&G.clientX<=ie.right&&G.clientY>=ie.top&&G.clientY<=ie.bottom}else{const ie=q.current?Sa(q.current):null;if(!ie)return;z=G.clientX>=ie.x&&G.clientX<=ie.x+ie.width&&G.clientY>=ie.y&&G.clientY<=ie.y+ie.height}if(!z){Y.stopPropagation(),E.current=!0;const ie=H=>{H.stopPropagation(),H.preventDefault(),document.removeEventListener("click",ie,!0)};document.addEventListener("click",ie,!0),oe()}}}};return document.addEventListener("touchend",g,{passive:!0}),()=>{document.removeEventListener("touchend",g)}},[e,oe,w,n]);const Ne=(k.type==="scale"||k.type==="fade")&&k.direction==="vert"&&he.type==="drag";s.useEffect(()=>{var H,be;if(!e||!Ne||!((be=(H=T.current)==null?void 0:H.splide)!=null&&be.root))return;const g=T.current.splide.root,Y=30,ee=(re,Q)=>{if(F.current){const Pe=Math.abs(re-F.current.x),Ae=Math.abs(Q-F.current.y);(Pe>0||Ae>0)&&(K.current=!0)}},ae=re=>{F.current&&(re.preventDefault(),ee(re.clientX,re.clientY))},ye=re=>{F.current&&re.touches.length>0&&(re.preventDefault(),ee(re.touches[0].clientX,re.touches[0].clientY))},ne=(re,Q)=>{if(!F.current||!T.current){F.current=null;return}const Pe=Math.abs(re-F.current.x),Ae=Math.abs(Q-F.current.y);Ae>Y&&Ae>Pe&&T.current.go(Q<F.current.y?"+1":"-1"),F.current=null},B=re=>{F.current&&ne(re.clientX,re.clientY),document.removeEventListener("pointerup",B),document.removeEventListener("pointercancel",B),document.removeEventListener("pointermove",ae)},G=re=>{if(F.current){if(re.changedTouches.length>0){const Q=re.changedTouches[0];ne(Q.clientX,Q.clientY)}document.removeEventListener("touchend",G),document.removeEventListener("touchcancel",G),document.removeEventListener("touchmove",ye)}},z=re=>{F.current={x:re.clientX,y:re.clientY},K.current=!1,document.addEventListener("pointermove",ae,{passive:!1}),document.addEventListener("pointerup",B),document.addEventListener("pointercancel",B)},ie=re=>{re.touches.length>0&&(F.current={x:re.touches[0].clientX,y:re.touches[0].clientY},K.current=!1,document.addEventListener("touchmove",ye,{passive:!1}),document.addEventListener("touchend",G),document.addEventListener("touchcancel",G))};return g.addEventListener("pointerdown",z),g.addEventListener("touchstart",ie),()=>{g.removeEventListener("pointerdown",z),g.removeEventListener("touchstart",ie),document.removeEventListener("pointermove",ae),document.removeEventListener("pointerup",B),document.removeEventListener("pointercancel",B),document.removeEventListener("touchmove",ye),document.removeEventListener("touchend",G),document.removeEventListener("touchcancel",G),F.current=null,K.current=!1}},[e,Ne,v]);const Te={backgroundColor:me.color,backdropFilter:`blur(${me.blur}px)`,animationDuration:`${parseInt(V.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(r)?null:qn.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:l?null:$,className:Rt(st.background,R?ue:de,{[st.editor]:l},{[st.hidden]:!e}),style:{...Te,...X&&!l&&!R?{position:"absolute"}:{}}}),a.jsxs("div",{ref:l?$:null,className:Rt(st.contentStyle,R?Z:Le,{[st.editor]:l},{[st.hidden]:!e}),style:{animationDuration:`${parseInt(V.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(El,{onMove:g=>N(g.index),ref:T,className:st.lightboxSplide,options:{arrows:!1,speed:k.duration?parseInt(k.duration):500,direction:k.direction==="horiz"||k.type==="fade"||k.type==="scale"?"ltr":"ttb",pagination:!1,drag:he.type==="drag"&&!Ne,perPage:1,width:"100%",height:"100%",type:k.type==="fade"||k.type==="scale"?"fade":"loop",padding:0,rewind:he.repeat!=="close",start:0},style:{"--splide-speed":k.duration},children:n.map((g,Y)=>{const ee=Wr(ve.position,ve.offset,l),ae=`${b.scalingValue(ve.padding.top,l)} ${b.scalingValue(ve.padding.right,l)} ${b.scalingValue(ve.padding.bottom,l)} ${b.scalingValue(ve.padding.left,l)}`,ye=k.type==="scale"?(()=>{const{transform:ne,...B}=ee;return{...B,position:"absolute",padding:ae,boxSizing:"border-box","--position-transform":ne||"none"}})():{...ee,position:"absolute",padding:ae,boxSizing:"border-box"};return a.jsx(kl,{children:a.jsx("div",{className:st.imgWrapper,onClick:Se,children:a.jsx("img",{ref:Y===w?q:null,className:Rt(st.imageStyle,{[st.contain]:g.image.objectFit==="contain",[st.cover]:g.image.objectFit==="cover",[st.scaleSlide]:k.type==="scale"}),src:g.image.assetId,alt:g.image.name??"",style:{...ye,pointerEvents:g.image.objectFit==="contain"?"none":"auto"}})})},Y)})},v),L.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Rt(st.arrow,{[st.arrowVertical]:k.direction==="vert"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:a.jsxs("button",{className:st.arrowInner,style:{transform:`translate(${b.scalingValue(L.offset.x,l)}, ${b.scalingValue(L.offset.y*(k.direction==="horiz"?1:-1),l)}) scale(${L.scale}) rotate(${k.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var g;return(g=T.current)==null?void 0:g.go("-1")},"aria-label":"Previous",children:[L.arrowsImgUrl&&a.jsx(mn,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:Rt(st.arrowImg,st.mirror)}),!L.arrowsImgUrl&&a.jsx(bc,{color:L.color,className:Rt(st.arrowIcon,st.arrowImg,st.mirror)})]})}),a.jsx("div",{className:Rt(st.arrow,st.nextArrow,{[st.arrowVertical]:k.direction==="vert"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:a.jsxs("button",{className:st.arrowInner,style:{transform:`translate(${b.scalingValue(L.offset.x*(k.direction==="horiz"?-1:1),l)}, ${b.scalingValue(L.offset.y,l)}) scale(${L.scale}) rotate(${k.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var g;return(g=T.current)==null?void 0:g.go("+1")},"aria-label":"Next",children:[L.arrowsImgUrl&&a.jsx(mn,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:st.arrowImg}),!L.arrowsImgUrl&&a.jsx(bc,{color:L.color,className:Rt(st.arrowIcon,st.arrowImg)})]})})]}),me.closeIconUrl&&(()=>{const g=Wr(me.closeIconAlign,me.closeIconOffset,l),Y=`scale(${me.closeIconScale})`,ee=g.transform?`${g.transform} ${Y}`:Y;return a.jsx("button",{className:st.closeButton,style:{...g,transform:ee},onClick:oe,"aria-label":"Close lightbox",children:a.jsx(mn,{url:me.closeIconUrl,fill:me.closeIconColor??"#000000",hoverFill:me.closeIconHover??"#cccccc"})})})(),te&&te.isActive&&i.imageCaption&&((Ce=n[w])==null?void 0:Ce.imageCaption)&&a.jsx("div",{className:st.caption,style:{...Wr(te.alignment,te.offset,l),fontFamily:zo(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:d.sizing==="auto"?"max-content":b.scalingValue(d.width,l),letterSpacing:b.scalingValue(p,l),wordSpacing:b.scalingValue(x,l),textAlign:y,fontSize:b.scalingValue(m.fontSize,l),lineHeight:b.scalingValue(m.lineHeight,l),textTransform:f.textTransform??"none",textDecoration:f.textDecoration??"none",fontVariant:f.fontVariant??"normal",color:S},onClick:g=>g.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:st.captionTextInner,style:{"--link-color":te.linkColor,"--link-hover-color":te.linkHoverColor},children:a.jsx(Zi,{content:n[w].imageCaption})})}),ce.isActive&&(()=>{const[g,Y]=ce.position.split("-"),ee=k.direction==="horiz"?`${g}-left`:ce.position,ae=Wr(ee,ce.offset,l),ye=()=>{if(k.direction==="horiz"){if(Y==="left")return"flex-start";if(Y==="center")return"center";if(Y==="right")return"flex-end"}else{if(g==="top")return"flex-start";if(g==="middle")return"center";if(g==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:P,className:st.thumbsWrapper,onClick:ne=>Ee(ne),style:{position:l?"absolute":"fixed",...ae,...k.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:Rt(st.thumbsContainer,{[st.thumbsContainerVertical]:k.direction==="vert",[st.thumbsAlignStart]:ce.align==="start",[st.thumbsAlignCenter]:ce.align==="center",[st.thumbsAlignEnd]:ce.align==="end"}),style:{gap:b.scalingValue(ce.grid.gap,l),justifyContent:h?"flex-start":ye()},children:n.map((ne,B)=>{const G=B===w,z=_[B],H=ce.grid.size*(G?ce.activeState.scale:1),be=()=>{if(ce.fit!=="fit")return{};if(!z)return k.direction==="horiz"?{height:b.scalingValue(H,l)}:{width:b.scalingValue(H,l)};const re=z.width/z.height;if(k.direction==="horiz"){const Q=H,Pe=Q*re;return{width:b.scalingValue(Pe,l),height:b.scalingValue(Q,l)}}else{const Q=H,Pe=Q/re;return{width:b.scalingValue(Q,l),height:b.scalingValue(Pe,l)}}};return a.jsx("button",{className:st.thumbItem,style:{...k.direction==="horiz"&&ce.fit!=="fit"?{height:b.scalingValue(H,l)}:{},...k.direction==="vert"&&ce.fit!=="fit"?{width:b.scalingValue(H,l)}:{},...ce.fit==="cover"?{width:b.scalingValue(H,l),height:b.scalingValue(H,l)}:{},...be(),transition:G?"all 0.25s ease-out":"none",opacity:G?ce.activeState.opacity/100:ce.opacity/100,"--thumb-hover":ce.activeState.opacity/100},onClick:re=>{var Q;re.stopPropagation(),N(B),(Q=T.current)==null||Q.go(B)},onMouseEnter:()=>{var re;ce.triggers==="hov"&&((re=T.current)==null||re.go(B))},children:a.jsx("img",{src:ne.image.assetId,alt:ne.image.name??"",onLoad:re=>{const Q=re.currentTarget;Q.naturalWidth&&Q.naturalHeight&&W(Pe=>({...Pe,[B]:{width:Q.naturalWidth,height:Q.naturalHeight}}))},style:{objectFit:ce.fit==="cover"?"cover":"contain",...ce.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ce.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ne.image.name}-${B}`)})})})})()]})]}),document.getElementById(r))};function bc({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const bf={element:vf,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.assetId",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.assetId",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:{assetId:{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:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},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:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},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:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},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:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",assetId:"01M3QM74XD4J8X0B8TTSQ8CV3P",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XD0N6VQJ5J8J9YB32N",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XE4WSEPVF1QQSKMD76",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 Or(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Sf(e){return`
6
+ */const uh="RichTextRenderer-module__link___BWeZ2",ph={link:uh},mh=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))},zo=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>mh(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function pn(e){const{color:t,...n}=e;return n}function nn(e,t){var o,r,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:zo(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:b.scalingValue(e.letterSpacing,t),wordSpacing:b.scalingValue(e.wordSpacing,t),fontSize:b.scalingValue(n,t),lineHeight:i!==void 0?b.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(r=e.textAppearance)==null?void 0:r.textDecoration,fontVariant:(l=e.textAppearance)==null?void 0:l.fontVariant,textAlign:e.textAlign,color:e.color}}function qu(e){return e!=null&&e.length?e.some(t=>t.type==="link"?qu(t.children):!!t.text):!1}const Zi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?a.jsx(b.LinkWrapper,{className:ph.link,link:i,children:t(i.children)},o):a.jsx("span",{style:gh(i),children:i.text},o));return a.jsx(a.Fragment,{children:e.map((n,i)=>{const o=n.children;return a.jsx("div",{children:qu(o)?t(o):" "},i)})})};function gh(e){return{...e.fontFamily&&{fontFamily:zo(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 hh="SvgImage-module__svg___q3xE-",fh="SvgImage-module__img___VsTm-",yc={svg:hh,img:fh},Ja=new Map;function yr(e){return e.startsWith("data:")||e.startsWith("blob:")}function Ku(e){if(yr(e))return Promise.resolve(e);const t=Ja.get(e);if(t)return t;const n=fetch(e,{mode:"cors",cache:"reload"}).then(i=>{if(!i.ok)throw new Error(String(i.status));return i.blob()}).then(i=>URL.createObjectURL(i)).catch(i=>{throw Ja.delete(e),i});return Ja.set(e,n),n}const yh=e=>{const t=e.trim().toLowerCase();return!!(t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")||t.includes(".svg")||t.startsWith("blob:"))},vh=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,mn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[r,l]=s.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")')),[c,d]=s.useState(()=>yr(e)?e:null);return s.useEffect(()=>{if(typeof window<"u"&&window.CSS){const u=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');l(u)}},[]),s.useEffect(()=>{if(!yh(e)){d(null);return}if(yr(e)){d(e);return}let u=!1;return Ku(e).then(p=>{u||d(p)}).catch(()=>{u||d(null)}),()=>{u=!0}},[e]),!c||!r?a.jsx("img",{src:e,alt:"",className:Et(yc.img,i),style:o}):a.jsx("span",{"data-supports-mask":r,className:Et(yc.svg,i),style:{"--svg":vh(c),"--fill":t,"--hover-fill":n,...o??{}}})},xh={"top-left":Pt.topLeftAlignment,"top-center":Pt.topCenterAlignment,"top-right":Pt.topRightAlignment,"middle-left":Pt.middleLeftAlignment,"middle-center":Pt.middleCenterAlignment,"middle-right":Pt.middleRightAlignment,"bottom-left":Pt.bottomLeftAlignment,"bottom-center":Pt.bottomCenterAlignment,"bottom-right":Pt.bottomRightAlignment};function bh({settings:e,content:t,styles:n,isEditor:i}){const[o,r]=s.useState(null),{widthSettings:l,fontSettings:c,letterSpacing:d,textAlign:u,wordSpacing:p,fontSizeLineHeight:y,textAppearance:x,color:m}=n.imageCaption??{},[f,S]=s.useState(void 0),[w,N]=s.useState(null),[v,M]=s.useState(0),[E,U]=s.useState(0),{direction:X,transition:D,controls:_,pagination:W,imageCaption:T,triggers:C}=e,q=s.useRef(D.type),{x:R,y:$}=e.controls.offset,I=j=>{o&&o.go(j)};return s.useEffect(()=>{if(!w)return;const j=new ResizeObserver(F=>{if(!o)return;const[K]=F;S({width:Math.round(K.contentRect.width),height:Math.round(K.contentRect.height)})});return j.observe(w),()=>j.unobserve(w)},[w]),s.useEffect(()=>{!o||q.current===D.type||(U(j=>j+1),q.current=D.type)},[D.type]),a.jsx("div",{className:Et(Pt.wrapper,{[Pt.editor]:i}),ref:N,children:a.jsxs("div",{className:Pt.sliderInner,style:{width:f?f.width:"100%",height:f?f.height:"100%",backgroundColor:D.backgroundColor&&D.type==="fade in"?D.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:Et(Pt.captionBlock),children:a.jsx("div",{className:Pt.captionTextWrapper,children:t.map((j,F)=>a.jsx("div",{className:Et(Pt.captionText,xh[T.alignment],{[Pt.withPointerEvents]:F===v&&i,[Pt.active]:F===v}),style:{fontFamily:zo(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:l.sizing==="auto"?"max-content":b.scalingValue(l.width,i),letterSpacing:b.scalingValue(d,i),wordSpacing:b.scalingValue(p,i),textAlign:u,fontSize:b.scalingValue(y.fontSize,i),lineHeight:b.scalingValue(y.lineHeight,i),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:m,transitionDuration:D.duration?`${Math.round(parseInt(D.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:Pt.captionTextInner,style:{"--link-hover-color":T.linkHoverColor,"--link-color":T.linkColor,position:"relative",top:b.scalingValue(T.offset.y,i),left:b.scalingValue(T.offset.x,i)},children:a.jsx(Zi,{content:j.imageCaption})})},F))})}),a.jsx(kl,{onMove:j=>{M(j.index)},ref:r,options:{arrows:!1,speed:D.duration?parseInt(D.duration):500,autoplay:C.autoPlay!==null,...C.autoPlay!==null&&{interval:parseInt(C.autoPlay)*1e3},direction:X==="horiz"||D.type==="fade in"?"ltr":"ttb",pagination:!1,drag:C.triggersList.drag,perPage:1,width:f?f.width:"100%",height:f?f.height:"100%",type:D.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((j,F)=>a.jsx(Al,{children:a.jsx("div",{className:Pt.sliderItem,children:a.jsx("div",{className:Pt.imgWrapper,children:a.jsx("img",{className:Et(Pt.sliderImage,{[Pt.contain]:j.image.objectFit==="contain",[Pt.cover]:j.image.objectFit==="cover"}),src:j.image.assetId,alt:j.image.name??""})})})},F))},E),_.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Et(Pt.arrow,{[Pt.arrowVertical]:X==="vert",[Pt.hoverArrow]:_.show==="on hover"}),style:{color:_.color,"--arrow-hover-color":_.hover},children:a.jsxs("button",{onClick:()=>{I("-1")},className:Pt.arrowInner,style:{transform:`translate(${b.scalingValue(R,i)}, ${b.scalingValue($*(X==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${X==="horiz"?"0deg":"90deg"})`},children:[_.arrowsImgUrl&&a.jsx(mn,{url:_.arrowsImgUrl,fill:_.color,hoverFill:_.hover,className:Et(Pt.arrowImg,Pt.mirror)}),!_.arrowsImgUrl&&a.jsx(vc,{color:_.color,className:Et(Pt.arrowIcon,Pt.arrowImg,Pt.mirror)})]})}),a.jsx("div",{className:Et(Pt.arrow,Pt.nextArrow,{[Pt.arrowVertical]:X==="vert",[Pt.hoverArrow]:_.show==="on hover"}),style:{color:_.color,"--arrow-hover-color":_.hover},children:a.jsxs("button",{className:Pt.arrowInner,onClick:()=>I("+1"),style:{transform:`translate(${b.scalingValue(R*(X==="horiz"?-1:1),i)}, ${b.scalingValue($,i)}) scale(${e.controls.scale/100}) rotate(${X==="horiz"?"0deg":"90deg"})`},children:[_.arrowsImgUrl&&a.jsx(mn,{url:_.arrowsImgUrl,fill:_.color,hoverFill:_.hover,className:Pt.arrowImg}),!_.arrowsImgUrl&&a.jsx(vc,{color:_.color,className:Et(Pt.arrowIcon,Pt.arrowImg)})]})})]}),C.triggersList.click&&a.jsx("div",{className:Pt.clickOverlay,onClick:()=>{o&&o.go("+1")}}),W.isActive&&a.jsx("div",{className:Et(Pt.pagination,{[Pt.paginationInsideBottom]:W.position==="inside-1"&&X==="horiz",[Pt.paginationInsideTop]:W.position==="inside-2"&&X==="horiz",[Pt.paginationOutsideBottom]:W.position==="outside-1"&&X==="horiz",[Pt.paginationOutsideTop]:W.position==="outside-2"&&X==="horiz",[Pt.paginationInsideLeft]:W.position==="inside-1"&&X==="vert",[Pt.paginationInsideRight]:W.position==="inside-2"&&X==="vert",[Pt.paginationOutsideLeft]:W.position==="outside-1"&&X==="vert",[Pt.paginationOutsideRight]:W.position==="outside-2"&&X==="vert",[Pt.paginationVertical]:X==="vert"}),children:a.jsx("div",{className:Pt.paginationInner,style:{backgroundColor:W.colors[2],transform:`scale(${W.scale/100}) translate(${b.scalingValue(W.offset.x,i)}, ${b.scalingValue(W.offset.y,i)}) rotate(${X==="horiz"?"0deg":"90deg"})`},children:t.map((j,F)=>a.jsx("button",{onClick:()=>{o&&o.go(F)},className:Et(Pt.paginationItem),children:a.jsx("div",{className:Et(Pt.dot,{[Pt.activeDot]:F===v}),style:{backgroundColor:F===v?W.colors[0]:W.colors[1],"--pagination-hover-color":W.hover}})},F))})})]})})}function vc({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Sh={element:bh,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.assetId",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:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",assetId:"01M3QM74XES6E7GVC0H3KJ2RH6",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEAZ8H1DTC5V1S554K",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEDRP49HNTEPNZYQTP",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"]}},wh="ImageRevealSlider-module__imageRevealSlider___UE5Ob",$h="ImageRevealSlider-module__image___Qjt-e",Ch="ImageRevealSlider-module__link___N-iLG",Th="ImageRevealSlider-module__cursor___2U03d",Uo={imageRevealSlider:wh,image:$h,link:Ch,cursor:Th};function xc(e,t,n){for(const i of n){const o=new Image;o.src=i.assetId;const r=i.width?Number.parseFloat(i.width):o.naturalWidth,l=o.naturalHeight/o.naturalWidth*r,c=r/2,d=l/2;if(e>=i.x-c&&e<=i.x+c&&t>=i.y-d&&t<=i.y+d)return!0}return!1}function es(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Ih(e,t,n,i){let o,r;if(t==="custom"){o=n;const l=await es(e);r=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await es(e);r=l.height/l.width*o}else{const l=await es(e);o=l.width,r=l.height}return{width:o,height:r,finalWidth:`${o}px`}}function Lh({settings:e,content:t,isEditor:n}){const[i,o]=s.useState(null),[r,l]=s.useState([]),[c,d]=s.useState(0),u=s.useRef(0),[p,y]=s.useState({x:0,y:0}),[x,m]=s.useState(1),[f,S]=s.useState("none"),w=s.useRef({x:0,y:0}),[N,v]=s.useState(!1),{sizeType:M,imageWidth:E,randomRangeImageWidth:U}=e.imageSize,{revealPosition:X,visible:D}=e.position,{cursorType:_,target:W,defaultCursorScale:T,defaultCursor:C,hoverCursorScale:q,hoverCursor:R}=e.cursor;s.useEffect(()=>{if(!i)return;const j=(P,h)=>{const J=i.getBoundingClientRect(),V=P-J.left,he=h-J.top;if(y({x:V,y:he}),_==="system"){S("none"),m(1);return}const k=V,ce=he,L=document.elementFromPoint(J.left+k,J.top+ce);if(L&&L.closest("a")){S("none"),m(1);return}const me=xc(k,ce,r)||W==="area"?{img:R??"none",scale:q}:{img:C??"none",scale:T};S(me.img),m(me.scale)},F=P=>{P.stopPropagation(),w.current={x:P.clientX,y:P.clientY},j(P.clientX,P.clientY)},K=()=>{N&&j(w.current.x,w.current.y)};return i.addEventListener("mousemove",F),window.addEventListener("scroll",K,!0),()=>{i.removeEventListener("mousemove",F),window.removeEventListener("scroll",K,!0)}},[i,N,p,_,W,R,C,q,T,r]),s.useEffect(()=>{N||(S("none"),m(0))},[N]);const $=async(j,F,K,P={})=>{const{width:h,height:J,finalWidth:V}=await Ih(j.image.assetId,M,E,U);let he=0,k=0;X==="same"?(he=F/2,k=K/2):(he=P.x??Math.random()*F,k=P.y??Math.random()*K);const ce=Math.min(Math.max(he,h/2),F-h/2),L=Math.min(Math.max(k,J/2),K-J/2);return{id:u.current++,assetId:j.image.assetId,link:j.link,name:j.image.name,x:ce,y:L,width:V}};s.useEffect(()=>{if(!i||t.length===0)return;const j=i.getBoundingClientRect(),F=j.width,K=j.height,P=[];(async()=>{const J=t[0],V=await $(J,F,K);P.push(V),l(P),d(1)})()},[M,E,U,X,i]),s.useEffect(()=>{D==="last One"&&l(j=>j.length>0?[j[j.length-1]]:[])},[D]);const I=async j=>{if(!i)return;const F=i.getBoundingClientRect(),K=j.clientX-F.left,P=j.clientY-F.top;if(W==="image"&&!xc(K,P,r))return;let h=0,J=0;X==="on Click"?(h=K,J=P):X==="same"?(h=F.width/2,J=F.height/2):(h=Math.random()*F.width,J=Math.random()*F.height);const V=t[c],he=await $(V,F.width,F.height,{x:h,y:J});l(k=>D==="all"?[...k,he]:[he]),d(k=>k>=t.length-1?0:k+1)};return a.jsxs("div",{ref:o,onClick:I,onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),className:Uo.imageRevealSlider,style:{cursor:f==="none"?"default":"none"},children:[r.map(j=>a.jsx("div",{className:Uo.wrapper,style:{top:`${j.y}px`,left:`${j.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:j.width??"auto",height:"auto",cursor:f==="none"?"default":"none"},children:a.jsx(b.LinkWrapper,{link:W==="area"?j.link:void 0,className:Uo.link,children:a.jsx("img",{src:j.assetId,alt:j.name,className:Uo.image},j.id)})},j.id)),N&&a.jsx("div",{className:Uo.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${x})`,backgroundImage:`url('${f}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Mh={element:Lh,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.assetId",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:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},link:{type:"object",label:"URL",display:{type:"link-input"}}},required:["image"]},default:[{image:{objectFit:"cover",assetId:"01M3QM74XGWBJY3AQQ71GC2Z6Q",name:"Slider-1.png"},link:{type:"url",value:"",target:"blank"}},{image:{objectFit:"cover",assetId:"01M3QM74XGMXS1Z5ZY2RFGS3T4",name:"Slider-2.png"},link:{type:"url",value:"",target:"blank"}},{image:{objectFit:"cover",assetId:"01M3QM74XGWG6VCHNEXKVKAJGT",name:"Slider-3.png"},link:{type:"url",value:"",target:"blank"}},{image:{objectFit:"cover",assetId:"01M3QM74XGCVMTPNHFHMR98RPZ",name:"Slider-4.png"},link:{type:"url",value:"",target:"blank"}}]}}}},Ph="LightBox-module__hidden___9s-9x",Eh="LightBox-module__heroImage___sTxNF",Rh="LightBox-module__background___rm9ml",kh="LightBox-module__editor___4ACaY",Ah="LightBox-module__contentStyle___Bgnsq",Fh="LightBox-module__imageStyle___tLIlB",Nh="LightBox-module__imgWrapper___LuFUp",_h="LightBox-module__contain___8-yaS",Hh="LightBox-module__cover___hNvOG",Wh="LightBox-module__caption___b6L2I",Oh="LightBox-module__captionTextInner___rCGNH",Dh="LightBox-module__lightboxSplide___XFuWC",zh="LightBox-module__arrow___iz38X",Bh="LightBox-module__arrowVertical___Zfz81",jh="LightBox-module__nextArrow___zkAQN",Vh="LightBox-module__arrowInner___p48sW",Gh="LightBox-module__arrowIcon___3VaFf",Xh="LightBox-module__arrowImg___pNV88",Uh="LightBox-module__mirror___pjeXc",qh="LightBox-module__thumbsWrapper___GB-nU",Kh="LightBox-module__thumbsContainerVertical___wttk5",Yh="LightBox-module__thumbsContainer___osSma",Qh="LightBox-module__thumbsAlignStart___MO6tY",Zh="LightBox-module__thumbsAlignCenter___Q4sUx",Jh="LightBox-module__thumbsAlignEnd___p4y9R",ef="LightBox-module__thumbItem___HvnF3",tf="LightBox-module__closeButton___g2khP",nf="LightBox-module__fadeIn___0m5GW",of="LightBox-module__slideInLeft___gPYwC",rf="LightBox-module__slideInRight___S-pPp",af="LightBox-module__slideInTop___DFdAj",sf="LightBox-module__slideInBottom___m27kZ",lf="LightBox-module__fadeOut___55qBR",cf="LightBox-module__slideOutLeft___NvU7P",df="LightBox-module__slideOutRight___SK7eC",uf="LightBox-module__slideOutTop___Vgg0z",pf="LightBox-module__slideOutBottom___nJ0Ef",mf="LightBox-module__scaleSlide___vZriG",st={hidden:Ph,heroImage:Eh,background:Rh,editor:kh,contentStyle:Ah,imageStyle:Fh,imgWrapper:Nh,contain:_h,cover:Hh,caption:Wh,captionTextInner:Oh,lightboxSplide:Dh,arrow:zh,arrowVertical:Bh,nextArrow:jh,arrowInner:Vh,arrowIcon:Gh,arrowImg:Xh,mirror:Uh,thumbsWrapper:qh,thumbsContainerVertical:Kh,thumbsContainer:Yh,thumbsAlignStart:Qh,thumbsAlignCenter:Zh,thumbsAlignEnd:Jh,thumbItem:ef,closeButton:tf,fadeIn:nf,slideInLeft:of,slideInRight:rf,slideInTop:af,slideInBottom:sf,fadeOut:lf,slideOutLeft:cf,slideOutRight:df,slideOutTop:uf,slideOutBottom:pf,scaleSlide:mf},Wr=(e,t,n)=>{const i={},[o,r]=e.split("-");return o==="top"?(i.top="0",i.bottom="auto"):o==="middle"?(i.top="50%",i.bottom="auto"):o==="bottom"&&(i.top="auto",i.bottom="0"),r==="left"?(i.left="0",i.right="auto"):r==="center"?(i.left="50%",i.right="auto"):r==="right"&&(i.left="auto",i.right="0"),o==="middle"&&r==="center"?i.transform=`translate(calc(-50% + ${b.scalingValue(t.x,n)}), calc(-50% + ${b.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${b.scalingValue(t.x,n)}, calc(-50% + ${b.scalingValue(t.y,n)}))`:r==="center"?i.transform=`translate(calc(-50% + ${b.scalingValue(t.x,n)}), ${b.scalingValue(t.y,n)})`:i.transform=`translate(${b.scalingValue(t.x,n)}, ${b.scalingValue(t.y,n)})`,i};function Yu(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 gf(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 Qu(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,r=n/i;if(r>o){const c=e;return{renderedW:c,renderedH:c/r}}const l=t;return{renderedW:l*r,renderedH:l}}function hf(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,r=n/i;if(r>o){const c=t;return{renderedW:c*r,renderedH:c}}const l=e;return{renderedW:l,renderedH:l/r}}function Zu(e,t,n,i,o){const{x:r,y:l}=gf(o);return{offsetX:r*(e-n),offsetY:l*(t-i)}}function ff(e){const t=e.getBoundingClientRect(),n=t.width,i=t.height;if(!n||!i)return"center center";const o=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,r=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight,{objectFit:l,objectPosition:c}=window.getComputedStyle(e),d=l==="cover"?hf:Qu,{renderedW:u,renderedH:p}=d(n,i,o,r),{offsetX:y,offsetY:x}=Zu(n,i,u,p,c),m=(y+u/2)/n*100,f=(x+p/2)/i*100;return`${m}% ${f}%`}function yf(e){return ff(e)}function wa(e){const t=e.getBoundingClientRect(),n=Yu(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),r=e.naturalWidth,l=e.naturalHeight,{renderedW:c,renderedH:d}=Qu(i,o,r,l),u=window.getComputedStyle(e).objectPosition,{offsetX:p,offsetY:y}=Zu(i,o,c,d,u),x=t.left+n.left,m=t.top+n.top;return{x:p+x,y:y+m,width:c,height:d}}function bc(e){const t=e.getBoundingClientRect(),n=Yu(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function vf(e,t){const n=(()=>{if(e==="fade in")return st.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return st.slideInLeft;case"right":return st.slideInRight;case"top":return st.slideInTop;case"bottom":return st.slideInBottom;default:return st.slideInRight}return st.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return st.fadeIn;if(e==="slide in")switch(t){case"left":return st.slideInLeft;case"right":return st.slideInRight;case"top":return st.slideInTop;case"bottom":return st.slideInBottom;default:return st.slideInRight}return st.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return st.fadeOut;if(e==="slide in")switch(t){case"left":return st.slideOutLeft;case"right":return st.slideOutRight;case"top":return st.slideOutTop;case"bottom":return st.slideOutBottom;default:return st.slideOutRight}return st.fadeOut})(),r=(()=>{if(e==="fade in")return st.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return st.slideOutLeft;case"right":return st.slideOutRight;case"top":return st.slideOutTop;case"bottom":return st.slideOutBottom;default:return st.slideOutRight}return st.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:r}}const xf=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:r,isPreviewMode:l})=>{const[c,d]=s.useState(!1),{assetId:u}=e.thumbnailBlock.cover;return s.useEffect(()=>{o==="close"&&d(!1),o==="open"&&d(!0)},[o]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:u,alt:"Cover",className:st.heroImage,onClick:()=>d(!0)}),a.jsx(bf,{isOpen:c,onClose:()=>d(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:r})]})},bf=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:r,isEditor:l,metadata:c})=>{var Ce;const{widthSettings:d,fontSettings:u,letterSpacing:p,textAlign:y,wordSpacing:x,fontSizeLineHeight:m,textAppearance:f,color:S}=i.imageCaption??{},[w,N]=s.useState(0),[v,M]=s.useState(0),[E,U]=s.useState(!1),[X,D]=s.useState(!1),[_,W]=s.useState({}),T=s.useRef(null),C=s.useRef(null),q=s.useRef(null),R=s.useRef(!1),$=s.useRef(null),I=s.useRef(null),j=s.useRef(null),F=s.useRef(null),K=s.useRef(!1),P=s.useRef(null),[h,J]=s.useState(!1),{appear:V,triggers:he,slider:k,thumbnail:ce,controls:L,area:me,caption:te,layout:ve}=o.lightboxBlock,{appearClass:Le,backdropAppearClass:de,backdropDisappearClass:ue,disappearClass:Z}=vf(V.type,V.direction),le=(c==null?void 0:c.itemId)??null;s.useEffect(()=>{const g=()=>{setTimeout(()=>{var ee,ae;(ae=(ee=T.current)==null?void 0:ee.splide)==null||ae.refresh()},16)},Y=()=>{M(ee=>ee+1)};return window.addEventListener("ArticleEditor.Layout:change",g),window.addEventListener("ArticleEditor.ComponentContent:change",Y),()=>{window.removeEventListener("ArticleEditor.Layout:change",g),window.removeEventListener("ArticleEditor.ComponentContent:change",Y)}},[]),s.useEffect(()=>{if(!e||!ce.isActive){J(!1);return}const g=P.current;if(!g)return;const Y=()=>{k.direction==="horiz"?J(g.scrollWidth>g.clientWidth):J(g.scrollHeight>g.clientHeight)};Y();const ee=new ResizeObserver(Y);return ee.observe(g),()=>ee.disconnect()},[e,ce.isActive,n.length,_,k.direction]);const oe=s.useCallback(()=>{const g=window.matchMedia("(max-width: 768px)").matches,Y=b.getColorAlpha(me.color);g&&!l&&Y>.9&&(document.body.style.backgroundColor=""),U(!0),R.current=!0;const ee=ae=>{ae.target===$.current&&ae.animationName&&($.current&&I.current&&$.current.removeEventListener("animationend",I.current),I.current=null,R.current&&(R.current=!1,t()),U(!1))};$.current&&(I.current=ee,$.current.addEventListener("animationend",ee))},[t,me.color,l]),ge=(g,Y,ee)=>{var ae,ye;if(g){if(he.type==="click"&&he.switch==="image")he.repeat==="close"&&w===n.length-1?oe():(ae=T.current)==null||ae.go("+1");else if(he.type==="click"&&he.switch==="50/50"){const ne=g.getBoundingClientRect(),B=Y-ne.left,G=ee-ne.top,z=ne.width,ie=ne.height;let H;k.direction==="horiz"?H=B<z/2?"-1":"+1":H=G<ie/2?"-1":"+1",(ye=T.current)==null||ye.go(H)}}},Se=g=>{if(K.current){K.current=!1;return}const Y=n[w],ee=(Y==null?void 0:Y.image.objectFit)==="cover";let ae,ye;if("changedTouches"in g&&g.changedTouches.length>0)ae=g.changedTouches[0].clientX,ye=g.changedTouches[0].clientY;else if("clientX"in g)ae=g.clientX,ye=g.clientY;else return;let ne;if(ee&&q.current){const B=bc(q.current);ne=ae>=B.left&&ae<=B.right&&ye>=B.top&&ye<=B.bottom}else{const B=q.current?wa(q.current):null;if(!B){g.target===g.currentTarget&&oe();return}ne=ae>=B.x&&ae<=B.x+B.width&&ye>=B.y&&ye<=B.y+B.height}ne?ge(q.current,ae,ye):oe()},Re=g=>{const Y=g.target;(Y.classList.contains(st.thumbsWrapper)||Y.classList.contains(st.thumbsContainer))&&Se(g)};s.useEffect(()=>{if(!e)return;const g=Y=>{var ee,ae;if(Y.key==="Escape"){oe();return}if(Y.key==="ArrowRight"){N(ye=>(ye+1)%Math.max(n.length,1)),(ee=T.current)==null||ee.go("+1");return}Y.key==="ArrowLeft"&&(N(ye=>(ye-1+Math.max(n.length,1))%Math.max(n.length,1)),(ae=T.current)==null||ae.go("-1"))};return window.addEventListener("keydown",g),()=>{window.removeEventListener("keydown",g)}},[e,oe,n.length]),s.useEffect(()=>{if(e){if(N(0),M(Y=>Y+1),R.current=!1,U(!1),D(!1),W({}),!le)return;const g=new CustomEvent("page-overlay",{detail:{itemId:le}});window.dispatchEvent(g)}return()=>{$.current&&I.current&&($.current.removeEventListener("animationend",I.current),I.current=null),D(!1)}},[e,le]),s.useEffect(()=>{C.current!==null&&C.current!==k.type&&M(g=>g+1),C.current=k.type},[k.type]),s.useEffect(()=>{if(!e)return;const g=document.body.style.overflow,Y=window.matchMedia("(max-width: 768px)").matches,ee=b.getColorAlpha(me.color);document.body.style.overflow="hidden",D(!1);const ae=ne=>{ne.target===$.current&&!R.current&&ne.animationName&&(Y&&!l&&ee>.9&&(document.body.style.backgroundColor=me.color),D(!0),$.current&&j.current&&$.current.removeEventListener("animationend",j.current),j.current=null)};$.current&&(j.current=ae,$.current.addEventListener("animationend",ae));const ye=ne=>{const B=ne.target;B&&(B.closest(`.${st.thumbsWrapper}`)||B.closest(`.${st.thumbsContainer}`))||k.type!=="slide"&&ne.preventDefault()};return document.addEventListener("touchmove",ye,{passive:!1}),()=>{document.body.style.overflow=g,document.removeEventListener("touchmove",ye),$.current&&j.current&&($.current.removeEventListener("animationend",j.current),j.current=null),D(!1)}},[e,l,me.color,k.type]),s.useEffect(()=>{if(!e)return;const g=Y=>{var ae,ye;if(R.current){Y.stopPropagation();return}if(K.current){K.current=!1;return}const ee=Y.target;if(!(ee&&(ee.closest(`.${st.thumbsContainer}`)||ee.closest(`.${st.thumbItem}`)||ee.closest(`.${st.arrow}`)||ee.closest(`.${st.closeButton}`)||ee.closest(`.${st.caption}`)))){if(k.type==="slide"&&he.type==="drag"&&((ye=(ae=T.current)==null?void 0:ae.splide)!=null&&ye.root)){const ne=T.current.splide.root;if(ee&&(ne.contains(ee)||ne===ee))return}if(Y.touches.length===0&&Y.changedTouches.length>0){const ne=n[w],B=(ne==null?void 0:ne.image.objectFit)==="cover",G=Y.changedTouches[0];let z;if(B&&q.current){const ie=bc(q.current);z=G.clientX>=ie.left&&G.clientX<=ie.right&&G.clientY>=ie.top&&G.clientY<=ie.bottom}else{const ie=q.current?wa(q.current):null;if(!ie)return;z=G.clientX>=ie.x&&G.clientX<=ie.x+ie.width&&G.clientY>=ie.y&&G.clientY<=ie.y+ie.height}if(!z){Y.stopPropagation(),R.current=!0;const ie=H=>{H.stopPropagation(),H.preventDefault(),document.removeEventListener("click",ie,!0)};document.addEventListener("click",ie,!0),oe()}}}};return document.addEventListener("touchend",g,{passive:!0}),()=>{document.removeEventListener("touchend",g)}},[e,oe,w,n]);const Ne=(k.type==="scale"||k.type==="fade")&&k.direction==="vert"&&he.type==="drag";s.useEffect(()=>{var H,be;if(!e||!Ne||!((be=(H=T.current)==null?void 0:H.splide)!=null&&be.root))return;const g=T.current.splide.root,Y=30,ee=(re,Q)=>{if(F.current){const Pe=Math.abs(re-F.current.x),Ae=Math.abs(Q-F.current.y);(Pe>0||Ae>0)&&(K.current=!0)}},ae=re=>{F.current&&(re.preventDefault(),ee(re.clientX,re.clientY))},ye=re=>{F.current&&re.touches.length>0&&(re.preventDefault(),ee(re.touches[0].clientX,re.touches[0].clientY))},ne=(re,Q)=>{if(!F.current||!T.current){F.current=null;return}const Pe=Math.abs(re-F.current.x),Ae=Math.abs(Q-F.current.y);Ae>Y&&Ae>Pe&&T.current.go(Q<F.current.y?"+1":"-1"),F.current=null},B=re=>{F.current&&ne(re.clientX,re.clientY),document.removeEventListener("pointerup",B),document.removeEventListener("pointercancel",B),document.removeEventListener("pointermove",ae)},G=re=>{if(F.current){if(re.changedTouches.length>0){const Q=re.changedTouches[0];ne(Q.clientX,Q.clientY)}document.removeEventListener("touchend",G),document.removeEventListener("touchcancel",G),document.removeEventListener("touchmove",ye)}},z=re=>{F.current={x:re.clientX,y:re.clientY},K.current=!1,document.addEventListener("pointermove",ae,{passive:!1}),document.addEventListener("pointerup",B),document.addEventListener("pointercancel",B)},ie=re=>{re.touches.length>0&&(F.current={x:re.touches[0].clientX,y:re.touches[0].clientY},K.current=!1,document.addEventListener("touchmove",ye,{passive:!1}),document.addEventListener("touchend",G),document.addEventListener("touchcancel",G))};return g.addEventListener("pointerdown",z),g.addEventListener("touchstart",ie),()=>{g.removeEventListener("pointerdown",z),g.removeEventListener("touchstart",ie),document.removeEventListener("pointermove",ae),document.removeEventListener("pointerup",B),document.removeEventListener("pointercancel",B),document.removeEventListener("touchmove",ye),document.removeEventListener("touchend",G),document.removeEventListener("touchcancel",G),F.current=null,K.current=!1}},[e,Ne,v]);const Te={backgroundColor:me.color,backdropFilter:`blur(${me.blur}px)`,animationDuration:`${parseInt(V.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(r)?null:qn.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:l?null:$,className:Et(st.background,E?ue:de,{[st.editor]:l},{[st.hidden]:!e}),style:{...Te,...X&&!l&&!E?{position:"absolute"}:{}}}),a.jsxs("div",{ref:l?$:null,className:Et(st.contentStyle,E?Z:Le,{[st.editor]:l},{[st.hidden]:!e}),style:{animationDuration:`${parseInt(V.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(kl,{onMove:g=>N(g.index),ref:T,className:st.lightboxSplide,options:{arrows:!1,speed:k.duration?parseInt(k.duration):500,direction:k.direction==="horiz"||k.type==="fade"||k.type==="scale"?"ltr":"ttb",pagination:!1,drag:he.type==="drag"&&!Ne,perPage:1,width:"100%",height:"100%",type:k.type==="fade"||k.type==="scale"?"fade":"loop",padding:0,rewind:he.repeat!=="close",start:0},style:{"--splide-speed":k.duration},children:n.map((g,Y)=>{const ee=Wr(ve.position,ve.offset,l),ae=`${b.scalingValue(ve.padding.top,l)} ${b.scalingValue(ve.padding.right,l)} ${b.scalingValue(ve.padding.bottom,l)} ${b.scalingValue(ve.padding.left,l)}`,ye=k.type==="scale"?(()=>{const{transform:ne,...B}=ee;return{...B,position:"absolute",padding:ae,boxSizing:"border-box","--position-transform":ne||"none"}})():{...ee,position:"absolute",padding:ae,boxSizing:"border-box"};return a.jsx(Al,{children:a.jsx("div",{className:st.imgWrapper,onClick:Se,children:a.jsx("img",{ref:Y===w?q:null,className:Et(st.imageStyle,{[st.contain]:g.image.objectFit==="contain",[st.cover]:g.image.objectFit==="cover",[st.scaleSlide]:k.type==="scale"}),src:g.image.assetId,alt:g.image.name??"",style:{...ye,pointerEvents:g.image.objectFit==="contain"?"none":"auto"}})})},Y)})},v),L.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Et(st.arrow,{[st.arrowVertical]:k.direction==="vert"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:a.jsxs("button",{className:st.arrowInner,style:{transform:`translate(${b.scalingValue(L.offset.x,l)}, ${b.scalingValue(L.offset.y*(k.direction==="horiz"?1:-1),l)}) scale(${L.scale}) rotate(${k.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var g;return(g=T.current)==null?void 0:g.go("-1")},"aria-label":"Previous",children:[L.arrowsImgUrl&&a.jsx(mn,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:Et(st.arrowImg,st.mirror)}),!L.arrowsImgUrl&&a.jsx(Sc,{color:L.color,className:Et(st.arrowIcon,st.arrowImg,st.mirror)})]})}),a.jsx("div",{className:Et(st.arrow,st.nextArrow,{[st.arrowVertical]:k.direction==="vert"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:a.jsxs("button",{className:st.arrowInner,style:{transform:`translate(${b.scalingValue(L.offset.x*(k.direction==="horiz"?-1:1),l)}, ${b.scalingValue(L.offset.y,l)}) scale(${L.scale}) rotate(${k.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var g;return(g=T.current)==null?void 0:g.go("+1")},"aria-label":"Next",children:[L.arrowsImgUrl&&a.jsx(mn,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:st.arrowImg}),!L.arrowsImgUrl&&a.jsx(Sc,{color:L.color,className:Et(st.arrowIcon,st.arrowImg)})]})})]}),me.closeIconUrl&&(()=>{const g=Wr(me.closeIconAlign,me.closeIconOffset,l),Y=`scale(${me.closeIconScale})`,ee=g.transform?`${g.transform} ${Y}`:Y;return a.jsx("button",{className:st.closeButton,style:{...g,transform:ee},onClick:oe,"aria-label":"Close lightbox",children:a.jsx(mn,{url:me.closeIconUrl,fill:me.closeIconColor??"#000000",hoverFill:me.closeIconHover??"#cccccc"})})})(),te&&te.isActive&&i.imageCaption&&((Ce=n[w])==null?void 0:Ce.imageCaption)&&a.jsx("div",{className:st.caption,style:{...Wr(te.alignment,te.offset,l),fontFamily:zo(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:d.sizing==="auto"?"max-content":b.scalingValue(d.width,l),letterSpacing:b.scalingValue(p,l),wordSpacing:b.scalingValue(x,l),textAlign:y,fontSize:b.scalingValue(m.fontSize,l),lineHeight:b.scalingValue(m.lineHeight,l),textTransform:f.textTransform??"none",textDecoration:f.textDecoration??"none",fontVariant:f.fontVariant??"normal",color:S},onClick:g=>g.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:st.captionTextInner,style:{"--link-color":te.linkColor,"--link-hover-color":te.linkHoverColor},children:a.jsx(Zi,{content:n[w].imageCaption})})}),ce.isActive&&(()=>{const[g,Y]=ce.position.split("-"),ee=k.direction==="horiz"?`${g}-left`:ce.position,ae=Wr(ee,ce.offset,l),ye=()=>{if(k.direction==="horiz"){if(Y==="left")return"flex-start";if(Y==="center")return"center";if(Y==="right")return"flex-end"}else{if(g==="top")return"flex-start";if(g==="middle")return"center";if(g==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:P,className:st.thumbsWrapper,onClick:ne=>Re(ne),style:{position:l?"absolute":"fixed",...ae,...k.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:Et(st.thumbsContainer,{[st.thumbsContainerVertical]:k.direction==="vert",[st.thumbsAlignStart]:ce.align==="start",[st.thumbsAlignCenter]:ce.align==="center",[st.thumbsAlignEnd]:ce.align==="end"}),style:{gap:b.scalingValue(ce.grid.gap,l),justifyContent:h?"flex-start":ye()},children:n.map((ne,B)=>{const G=B===w,z=_[B],H=ce.grid.size*(G?ce.activeState.scale:1),be=()=>{if(ce.fit!=="fit")return{};if(!z)return k.direction==="horiz"?{height:b.scalingValue(H,l)}:{width:b.scalingValue(H,l)};const re=z.width/z.height;if(k.direction==="horiz"){const Q=H,Pe=Q*re;return{width:b.scalingValue(Pe,l),height:b.scalingValue(Q,l)}}else{const Q=H,Pe=Q/re;return{width:b.scalingValue(Q,l),height:b.scalingValue(Pe,l)}}};return a.jsx("button",{className:st.thumbItem,style:{...k.direction==="horiz"&&ce.fit!=="fit"?{height:b.scalingValue(H,l)}:{},...k.direction==="vert"&&ce.fit!=="fit"?{width:b.scalingValue(H,l)}:{},...ce.fit==="cover"?{width:b.scalingValue(H,l),height:b.scalingValue(H,l)}:{},...be(),transition:G?"all 0.25s ease-out":"none",opacity:G?ce.activeState.opacity/100:ce.opacity/100,"--thumb-hover":ce.activeState.opacity/100},onClick:re=>{var Q;re.stopPropagation(),N(B),(Q=T.current)==null||Q.go(B)},onMouseEnter:()=>{var re;ce.triggers==="hov"&&((re=T.current)==null||re.go(B))},children:a.jsx("img",{src:ne.image.assetId,alt:ne.image.name??"",onLoad:re=>{const Q=re.currentTarget;Q.naturalWidth&&Q.naturalHeight&&W(Pe=>({...Pe,[B]:{width:Q.naturalWidth,height:Q.naturalHeight}}))},style:{objectFit:ce.fit==="cover"?"cover":"contain",...ce.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ce.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ne.image.name}-${B}`)})})})})()]})]}),document.getElementById(r))};function Sc({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Sf={element:xf,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.assetId",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.assetId",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:{assetId:{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:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},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:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},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:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},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:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",assetId:"01M3QM74XD4J8X0B8TTSQ8CV3P",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XD0N6VQJ5J8J9YB32N",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XE4WSEPVF1QQSKMD76",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 Or(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function wf(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 wf({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:r}){const l=!!n,c=i&&t||!t,{prefix:d}=b.useScopedStyles(),{type:u="A",fieldsToShow:p=2,textareaRows:y=1,fields:x=[],buttonLabel:m,gap:f,fieldsGap:S,buttonCorners:w,buttonStroke:N,buttonPadding:v,isButtonFullWidth:M,inputCorners:R,inputStroke:U,inputPadding:X,inputColor:D,inputTextColor:_,inputBorderColor:W,placeholderColor:T,buttonColor:C,buttonTextColor:q,buttonBorderColor:E,labelTextColor:$,successColor:I,errorColor:j,fontFamily:F,inputFontSettings:K,inputFontSize:P,inputLineHeight:h,inputLetterSpacing:J,inputWordSpacing:V,inputTextAppearance:he,buttonFontSettings:k,buttonFontSize:ce,buttonLineHeight:L,buttonLetterSpacing:me,buttonWordSpacing:te,buttonTextAppearance:ve,labelFontSettings:Le,labelFontSize:de,labelLineHeight:ue,labelLetterSpacing:Z,labelWordSpacing:le,labelTextAppearance:oe,statusFontSettings:ge,statusFontSize:Se,statusLineHeight:Ee,statusLetterSpacing:Ne,statusWordSpacing:Te,statusTextAppearance:Ce,successMessage:g,errorMessage:Y,stateOverrides:ee}=e,ae=u==="B",ye=x.slice(0,Math.min(p,x.length)),ne={fontSettings:{fontFamily:F,fontWeight:(K==null?void 0:K.fontWeight)??400,fontStyle:(K==null?void 0:K.fontStyle)??"normal"},fontSize:P??.01,lineHeight:h,letterSpacing:J??0,wordSpacing:V??0,textAppearance:he,color:_},B=pn(nn(ne,t)),G=b.scalingValue(U??0,t),z=pe=>b.scalingValue((h??P??.01)*pe+((X==null?void 0:X.top)??0)+((X==null?void 0:X.bottom)??0)+(u==="C"?U??0:(U??0)*2),t),ie=z(1),H=z(Math.max(1,y)),be={...B,borderStyle:"solid",borderRadius:u==="C"?0:b.scalingValue(R??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:G,borderLeftWidth:0}:{borderWidth:G},paddingTop:b.scalingValue((X==null?void 0:X.top)??0,t),paddingRight:b.scalingValue((X==null?void 0:X.right)??0,t),paddingBottom:b.scalingValue((X==null?void 0:X.bottom)??0,t),paddingLeft:b.scalingValue((X==null?void 0:X.left)??0,t),height:ie,minHeight:ie},re={fontSettings:{fontFamily:F,fontWeight:(k==null?void 0:k.fontWeight)??400,fontStyle:(k==null?void 0:k.fontStyle)??"normal"},fontSize:ce??.01,lineHeight:L,letterSpacing:me??0,wordSpacing:te??0,textAppearance:ve,color:q},Q=pn(nn(re,t)),Pe=b.scalingValue(N??0,t),Ae={fontSettings:{fontFamily:F,fontWeight:(Le==null?void 0:Le.fontWeight)??400,fontStyle:(Le==null?void 0:Le.fontStyle)??"normal"},fontSize:de??.01,lineHeight:ue,letterSpacing:Z??0,wordSpacing:le??0,textAppearance:oe,color:$},He=nn(Ae,t),Xe={fontSettings:{fontFamily:F,fontWeight:(ge==null?void 0:ge.fontWeight)??400,fontStyle:(ge==null?void 0:ge.fontStyle)??"normal"},fontSize:Se??.01,lineHeight:Ee,letterSpacing:Ne??0,wordSpacing:Te??0,textAppearance:Ce,color:I},Ue=pn(nn(Xe,t)),Je=b.buildColorVars(d,{inputColor:D,inputTextColor:_,inputBorderColor:W,placeholderColor:T!=null&&T.trim()?T:"#cccccc",buttonColor:C,buttonTextColor:q,buttonBorderColor:E,labelTextColor:$,successColor:I,errorColor:j},$f,Cf,ee),[je,xe]=s.useState(()=>Object.fromEntries(ye.map(pe=>[pe.name,""]))),[Ie,ze]=s.useState("idle"),[Ze,tt]=s.useState(null),ot=r==="success"?"success":r==="error"?"error":Ie,lt=r==="error"?Y:Ze,it=r==="filled",xt=s.useMemo(()=>{if(!it)return je;let pe=null;for(const De of ye)(je[De.name]??"").trim().length>0||(pe=pe??{...je},pe[De.name]="Filled");return pe??je},[je,it,ye]),rt=ot==="error"?b.getFormFieldValidationError(ye,xt):null,We=`${r&&r!=="default"?`${d}-state-${r}`:""}`.trim(),vt=o==null?void 0:o.submitUrl,Ve=(pe,De)=>{xe(qe=>({...qe,[pe]:De}))},Ke=async pe=>{if(pe.preventDefault(),!c)return;const De=Object.fromEntries(ye.map(bt=>{var yt;return[bt.name,((yt=je[bt.name])==null?void 0:yt.trim())??""]}).filter(([,bt])=>bt));if(!vt){ze("error"),tt("No integrations were found for this form.");return}if(Object.keys(De).length===0)return;const qe=b.getFormFieldValidationError(ye,je);if(qe){ze("error"),tt(qe);return}ze("submitting"),tt(null);try{const bt=await fetch(vt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(De)});if(!bt.ok){const yt=await bt.text();throw new Error(yt||`Request failed: ${bt.status}`)}ze("success"),xe(Object.fromEntries(ye.map(yt=>[yt.name,""])))}catch(bt){ze("error"),tt(bt instanceof Error?bt.message:"Something went wrong")}};return a.jsxs("div",{className:`${d}-wrapper ${d}-type-${u} ${We}`.trim(),style:Je,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Sf(d)}}),a.jsxs("form",{onSubmit:Ke,className:`${d}-form`,children:[a.jsx("div",{className:`${d}-fields`,children:ye.map((pe,De)=>a.jsxs(s.Fragment,{children:[De>0&&a.jsx("div",{"data-controls":l?"fieldsGap":void 0,className:l?`${d}-control`:void 0,style:{height:b.scalingValue(S??0,t)}}),a.jsxs("div",{className:`${d}-field-group${ae?` ${d}-labeled`:""}`,children:[ae&&a.jsx("span",{className:`${d}-field-label`,style:He?{...He,lineHeight:He.fontSize}:void 0,children:pe.label||pe.name}),pe.type==="textarea"?a.jsx("textarea",{name:pe.name,autoComplete:"off",value:xt[pe.name]??"",onChange:qe=>Ve(pe.name,qe.target.value),placeholder:pe.placeholder,className:`${d}-input`,style:{...be,height:H,minHeight:H},rows:y,"data-filled":it||(xt[pe.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:pe.type==="phone"?"tel":pe.type==="email"?"email":"text",name:pe.name,autoComplete:"off",value:xt[pe.name]??"",onChange:qe=>Ve(pe.name,qe.target.value),placeholder:pe.placeholder,required:pe.isRequired??pe.type==="email",className:`${d}-input`,style:be,"data-filled":it||(xt[pe.name]??"").trim().length>0})]})]},De))}),a.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${d}-control`:void 0,style:{height:b.scalingValue(f??0,t)}}),a.jsx("div",{className:`${d}-overlay-anchor`,children:a.jsx("button",{type:c?"submit":"button",className:`${d}-button`,style:{borderStyle:"solid",borderRadius:b.scalingValue(w??0,t),borderWidth:Pe,paddingTop:b.scalingValue((v==null?void 0:v.top)??0,t),paddingRight:b.scalingValue((v==null?void 0:v.right)??0,t),paddingBottom:b.scalingValue((v==null?void 0:v.bottom)??0,t),paddingLeft:b.scalingValue((v==null?void 0:v.left)??0,t),pointerEvents:c?"auto":void 0,...Q,...M?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${d}-overlay-anchor`,style:M?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:Ie==="submitting"?"...":m})})})]}),ot==="success"&&a.jsx("p",{className:`${d}-success`,style:{...Ue},children:g}),ot==="error"&&a.jsx("p",{className:`${d}-error`,style:{...Ue},role:"alert",children:rt??lt??Y})]})}const $f={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"},Cf=["hover","focus","filled","success","error"],Tf=`import React, { useMemo, useState } from 'react';
158
+ `}function $f({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:r}){const l=!!n,c=i&&t||!t,{prefix:d}=b.useScopedStyles(),{type:u="A",fieldsToShow:p=2,textareaRows:y=1,fields:x=[],buttonLabel:m,gap:f,fieldsGap:S,buttonCorners:w,buttonStroke:N,buttonPadding:v,isButtonFullWidth:M,inputCorners:E,inputStroke:U,inputPadding:X,inputColor:D,inputTextColor:_,inputBorderColor:W,placeholderColor:T,buttonColor:C,buttonTextColor:q,buttonBorderColor:R,labelTextColor:$,successColor:I,errorColor:j,fontFamily:F,inputFontSettings:K,inputFontSize:P,inputLineHeight:h,inputLetterSpacing:J,inputWordSpacing:V,inputTextAppearance:he,buttonFontSettings:k,buttonFontSize:ce,buttonLineHeight:L,buttonLetterSpacing:me,buttonWordSpacing:te,buttonTextAppearance:ve,labelFontSettings:Le,labelFontSize:de,labelLineHeight:ue,labelLetterSpacing:Z,labelWordSpacing:le,labelTextAppearance:oe,statusFontSettings:ge,statusFontSize:Se,statusLineHeight:Re,statusLetterSpacing:Ne,statusWordSpacing:Te,statusTextAppearance:Ce,successMessage:g,errorMessage:Y,stateOverrides:ee}=e,ae=u==="B",ye=x.slice(0,Math.min(p,x.length)),ne={fontSettings:{fontFamily:F,fontWeight:(K==null?void 0:K.fontWeight)??400,fontStyle:(K==null?void 0:K.fontStyle)??"normal"},fontSize:P??.01,lineHeight:h,letterSpacing:J??0,wordSpacing:V??0,textAppearance:he,color:_},B=pn(nn(ne,t)),G=b.scalingValue(U??0,t),z=pe=>b.scalingValue((h??P??.01)*pe+((X==null?void 0:X.top)??0)+((X==null?void 0:X.bottom)??0)+(u==="C"?U??0:(U??0)*2),t),ie=z(1),H=z(Math.max(1,y)),be={...B,borderStyle:"solid",borderRadius:u==="C"?0:b.scalingValue(E??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:G,borderLeftWidth:0}:{borderWidth:G},paddingTop:b.scalingValue((X==null?void 0:X.top)??0,t),paddingRight:b.scalingValue((X==null?void 0:X.right)??0,t),paddingBottom:b.scalingValue((X==null?void 0:X.bottom)??0,t),paddingLeft:b.scalingValue((X==null?void 0:X.left)??0,t),height:ie,minHeight:ie},re={fontSettings:{fontFamily:F,fontWeight:(k==null?void 0:k.fontWeight)??400,fontStyle:(k==null?void 0:k.fontStyle)??"normal"},fontSize:ce??.01,lineHeight:L,letterSpacing:me??0,wordSpacing:te??0,textAppearance:ve,color:q},Q=pn(nn(re,t)),Pe=b.scalingValue(N??0,t),Ae={fontSettings:{fontFamily:F,fontWeight:(Le==null?void 0:Le.fontWeight)??400,fontStyle:(Le==null?void 0:Le.fontStyle)??"normal"},fontSize:de??.01,lineHeight:ue,letterSpacing:Z??0,wordSpacing:le??0,textAppearance:oe,color:$},He=nn(Ae,t),Xe={fontSettings:{fontFamily:F,fontWeight:(ge==null?void 0:ge.fontWeight)??400,fontStyle:(ge==null?void 0:ge.fontStyle)??"normal"},fontSize:Se??.01,lineHeight:Re,letterSpacing:Ne??0,wordSpacing:Te??0,textAppearance:Ce,color:I},Ue=pn(nn(Xe,t)),Je=b.buildColorVars(d,{inputColor:D,inputTextColor:_,inputBorderColor:W,placeholderColor:T!=null&&T.trim()?T:"#cccccc",buttonColor:C,buttonTextColor:q,buttonBorderColor:R,labelTextColor:$,successColor:I,errorColor:j},Cf,Tf,ee),[je,xe]=s.useState(()=>Object.fromEntries(ye.map(pe=>[pe.name,""]))),[Ie,ze]=s.useState("idle"),[Ze,tt]=s.useState(null),ot=r==="success"?"success":r==="error"?"error":Ie,lt=r==="error"?Y:Ze,it=r==="filled",xt=s.useMemo(()=>{if(!it)return je;let pe=null;for(const De of ye)(je[De.name]??"").trim().length>0||(pe=pe??{...je},pe[De.name]="Filled");return pe??je},[je,it,ye]),rt=ot==="error"?b.getFormFieldValidationError(ye,xt):null,We=`${r&&r!=="default"?`${d}-state-${r}`:""}`.trim(),vt=o==null?void 0:o.submitUrl,Ve=(pe,De)=>{xe(qe=>({...qe,[pe]:De}))},Ke=async pe=>{if(pe.preventDefault(),!c)return;const De=Object.fromEntries(ye.map(bt=>{var yt;return[bt.name,((yt=je[bt.name])==null?void 0:yt.trim())??""]}).filter(([,bt])=>bt));if(!vt){ze("error"),tt("No integrations were found for this form.");return}if(Object.keys(De).length===0)return;const qe=b.getFormFieldValidationError(ye,je);if(qe){ze("error"),tt(qe);return}ze("submitting"),tt(null);try{const bt=await fetch(vt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(De)});if(!bt.ok){const yt=await bt.text();throw new Error(yt||`Request failed: ${bt.status}`)}ze("success"),xe(Object.fromEntries(ye.map(yt=>[yt.name,""])))}catch(bt){ze("error"),tt(bt instanceof Error?bt.message:"Something went wrong")}};return a.jsxs("div",{className:`${d}-wrapper ${d}-type-${u} ${We}`.trim(),style:Je,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:wf(d)}}),a.jsxs("form",{onSubmit:Ke,className:`${d}-form`,children:[a.jsx("div",{className:`${d}-fields`,children:ye.map((pe,De)=>a.jsxs(s.Fragment,{children:[De>0&&a.jsx("div",{"data-controls":l?"fieldsGap":void 0,className:l?`${d}-control`:void 0,style:{height:b.scalingValue(S??0,t)}}),a.jsxs("div",{className:`${d}-field-group${ae?` ${d}-labeled`:""}`,children:[ae&&a.jsx("span",{className:`${d}-field-label`,style:He?{...He,lineHeight:He.fontSize}:void 0,children:pe.label||pe.name}),pe.type==="textarea"?a.jsx("textarea",{name:pe.name,autoComplete:"off",value:xt[pe.name]??"",onChange:qe=>Ve(pe.name,qe.target.value),placeholder:pe.placeholder,className:`${d}-input`,style:{...be,height:H,minHeight:H},rows:y,"data-filled":it||(xt[pe.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:pe.type==="phone"?"tel":pe.type==="email"?"email":"text",name:pe.name,autoComplete:"off",value:xt[pe.name]??"",onChange:qe=>Ve(pe.name,qe.target.value),placeholder:pe.placeholder,required:pe.isRequired??pe.type==="email",className:`${d}-input`,style:be,"data-filled":it||(xt[pe.name]??"").trim().length>0})]})]},De))}),a.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${d}-control`:void 0,style:{height:b.scalingValue(f??0,t)}}),a.jsx("div",{className:`${d}-overlay-anchor`,children:a.jsx("button",{type:c?"submit":"button",className:`${d}-button`,style:{borderStyle:"solid",borderRadius:b.scalingValue(w??0,t),borderWidth:Pe,paddingTop:b.scalingValue((v==null?void 0:v.top)??0,t),paddingRight:b.scalingValue((v==null?void 0:v.right)??0,t),paddingBottom:b.scalingValue((v==null?void 0:v.bottom)??0,t),paddingLeft:b.scalingValue((v==null?void 0:v.left)??0,t),pointerEvents:c?"auto":void 0,...Q,...M?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${d}-overlay-anchor`,style:M?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:Ie==="submitting"?"...":m})})})]}),ot==="success"&&a.jsx("p",{className:`${d}-success`,style:{...Ue},children:g}),ot==="error"&&a.jsx("p",{className:`${d}-error`,style:{...Ue},role:"alert",children:rt??lt??Y})]})}const Cf={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"},Tf=["hover","focus","filled","success","error"],If=`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';
@@ -793,7 +793,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
793
793
  };
794
794
 
795
795
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
796
- `,If=[{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],Dr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Lf=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Mf={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},min:1,max:7},textareaRows:{type:"number",scope:"common",title:"Rows",display:{type:"common-numeric-input"},min:1,max:20},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",enabled:!0},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Stroke Input",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Stroke Button",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...Dr.fontSettings,scope:"common",title:"Input",display:{type:"font-settings-weight"}},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...Dr.fontSettings,scope:"common",title:"Button",display:{type:"font-settings-weight"}},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},labelFontSettings:{...Dr.fontSettings,scope:"common",title:"Label",display:{type:"font-settings-weight",visible:!1}},labelFontSize:{type:"number",scope:"layout",title:"Label Font Size",display:{type:"font-size",visible:!1}},labelLineHeight:{type:"number",scope:"layout",title:"Label Line Height",display:{type:"line-height-input",visible:!1}},labelLetterSpacing:{type:"number",scope:"layout",title:"Label Letter Spacing",display:{type:"letter-spacing-input",visible:!1}},labelWordSpacing:{type:"number",scope:"layout",title:"Label Word Spacing",display:{type:"word-spacing-input",visible:!1}},labelTextAppearance:{type:"object",scope:"layout",title:"Label Text Appearance",display:{type:"text-appearance",visible:!1}},statusFontSettings:{...Dr.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,textareaRows:1,fields:If,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#A7A7A7",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!0,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0426,buttonLineHeight:.0426,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},t:{gap:.02604,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.039,buttonPadding:{top:.0195,right:.02604,bottom:.0195,left:.0195},inputPadding:{top:.0195,right:.0195,bottom:.0195,left:.0195},inputFontSize:.02083,inputLineHeight:.02604,buttonFontSize:.02083,buttonLineHeight:.02604,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:["inputCorners","inputPadding"]},{type:"row",title:"",items:["fieldsToShow","inputStroke"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["buttonCorners","buttonPadding"]},{type:"row",title:"",items:["buttonStroke","isButtonFullWidth"]}]},{type:"group",title:"",items:[{type:"row",title:"Textarea",items:["textareaRows"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Lf],panelIds:["general","typeStyle"],stateItems:{default:["placeholderColor","inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor","labelTextColor"],hover:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],focus:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],filled:["inputTextColor","inputColor","inputBorderColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Pf={element:wf,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Stacked.png"},defaultSize:{d:{width:300},t:{width:300},m:{width:340}},schema:Mf,sourceCode:Tf,fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",labelFontSettings:"fontFamily",statusFontSettings:"fontFamily"},assetsPaths:{content:[],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]}};function zr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Rf(e){return`
796
+ `,Lf=[{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],Dr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Mf=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Pf={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},min:1,max:7},textareaRows:{type:"number",scope:"common",title:"Rows",display:{type:"common-numeric-input"},min:1,max:20},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",enabled:!0},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Stroke Input",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Stroke Button",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...Dr.fontSettings,scope:"common",title:"Input",display:{type:"font-settings-weight"}},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...Dr.fontSettings,scope:"common",title:"Button",display:{type:"font-settings-weight"}},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},labelFontSettings:{...Dr.fontSettings,scope:"common",title:"Label",display:{type:"font-settings-weight",visible:!1}},labelFontSize:{type:"number",scope:"layout",title:"Label Font Size",display:{type:"font-size",visible:!1}},labelLineHeight:{type:"number",scope:"layout",title:"Label Line Height",display:{type:"line-height-input",visible:!1}},labelLetterSpacing:{type:"number",scope:"layout",title:"Label Letter Spacing",display:{type:"letter-spacing-input",visible:!1}},labelWordSpacing:{type:"number",scope:"layout",title:"Label Word Spacing",display:{type:"word-spacing-input",visible:!1}},labelTextAppearance:{type:"object",scope:"layout",title:"Label Text Appearance",display:{type:"text-appearance",visible:!1}},statusFontSettings:{...Dr.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,textareaRows:1,fields:Lf,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#A7A7A7",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!0,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0426,buttonLineHeight:.0426,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},t:{gap:.02604,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.039,buttonPadding:{top:.0195,right:.02604,bottom:.0195,left:.0195},inputPadding:{top:.0195,right:.0195,bottom:.0195,left:.0195},inputFontSize:.02083,inputLineHeight:.02604,buttonFontSize:.02083,buttonLineHeight:.02604,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:["inputCorners","inputPadding"]},{type:"row",title:"",items:["fieldsToShow","inputStroke"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["buttonCorners","buttonPadding"]},{type:"row",title:"",items:["buttonStroke","isButtonFullWidth"]}]},{type:"group",title:"",items:[{type:"row",title:"Textarea",items:["textareaRows"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Mf],panelIds:["general","typeStyle"],stateItems:{default:["placeholderColor","inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor","labelTextColor"],hover:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],focus:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],filled:["inputTextColor","inputColor","inputBorderColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Ef={element:$f,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Stacked.png"},defaultSize:{d:{width:300},t:{width:300},m:{width:340}},schema:Pf,sourceCode:If,fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",labelFontSettings:"fontFamily",statusFontSettings:"fontFamily"},assetsPaths:{content:[],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]}};function zr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Rf(e){return`
797
797
  .${e}-wrapper {
798
798
  display: flex;
799
799
  flex-direction: column;
@@ -986,7 +986,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
986
986
  font-size: ${zr(14)};
987
987
  color: var(--${e}-error-error-color, var(--${e}-error-color));
988
988
  }
989
- `}const Ef=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:r}=b.useScopedStyles(),l=n&&t||!t,{fields:c=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:d,buttonLabel:u,fieldsToShow:p=1,fontFamily:y,inputFontSettings:x,inputFontSize:m,inputLineHeight:f,inputLetterSpacing:S,inputWordSpacing:w,inputTextAppearance:N,buttonFontSettings:v,buttonFontSize:M,buttonLineHeight:R,buttonLetterSpacing:U,buttonWordSpacing:X,buttonTextAppearance:D,statusFontSettings:_,statusFontSize:W,statusLineHeight:T,statusLetterSpacing:C,statusWordSpacing:q,statusTextAppearance:E,iconMaxWidth:$,minHeight:I,corners:j,stroke:F,stateOverrides:K,inputPadding:P,buttonPadding:h,successMessage:J="Thanks for subscribing!",errorMessage:V="Please, fill all required fields."}=e,he=c.slice(0,Math.min(p,c.length)),[k,ce]=s.useState(()=>Object.fromEntries(he.map(re=>[re.name,""]))),[L,me]=s.useState("idle"),[te,ve]=s.useState(null),Le=o==="success"?"success":o==="error"?"error":L,de=o==="error"?V:te,ue=o==="filled",Z=s.useMemo(()=>{if(!ue)return k;let re=null;for(const Q of he)(k[Q.name]??"").trim().length>0||(re=re??{...k},re[Q.name]="Filled");return re??k},[ue,k,he]),le=Le==="error"?b.getFormFieldValidationError(he,Z):null,oe=o&&o!=="default"?`${r}-state-${o}`:"",ge=he.some(re=>(Z[re.name]??"").trim().length>0),Se=oe!==`${r}-state-filled`&&ge?`${r}-state-filled`:"",Ee=`${oe} ${Se}`.trim(),Ne=i==null?void 0:i.submitUrl,Te=u??"",Ce=(d==null?void 0:d.icon)??"",g=(d==null?void 0:d.mode)==="On",Y=Te||"Submit",ee={fontSettings:{fontFamily:y,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:m??.01,lineHeight:f,letterSpacing:S??0,wordSpacing:w??0,textAppearance:N,color:e.inputTextColor??"#111111"},ae={fontSettings:{fontFamily:y,fontWeight:(v==null?void 0:v.fontWeight)??400,fontStyle:(v==null?void 0:v.fontStyle)??"normal"},fontSize:M??.01,lineHeight:R,letterSpacing:U??0,wordSpacing:X??0,textAppearance:D,color:e.buttonTextColor??"#ffffff"},ye={fontSettings:{fontFamily:y,fontWeight:(_==null?void 0:_.fontWeight)??400,fontStyle:(_==null?void 0:_.fontStyle)??"normal"},fontSize:W??.01,lineHeight:T,letterSpacing:C??0,wordSpacing:q??0,textAppearance:E,color:e.successColor??"#22c55e"},ne=pn(nn(ee,t)),B=pn(nn(ae,t)),G=pn(nn(ye,t)),z=b.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(ee==null?void 0:ee.color)??"#111111",buttonTextColor:e.buttonTextColor??(ae==null?void 0:ae.color)??"#ffffff"},kf,Af,K),ie={borderRadius:b.scalingValue(j,t),borderWidth:b.scalingValue(F,t),borderStyle:"solid"},H={borderLeftWidth:b.scalingValue(F,t)},be=async re=>{if(re.preventDefault(),!l)return;const Q=Object.fromEntries(he.map(Ae=>{var He;return[Ae.name,((He=k[Ae.name])==null?void 0:He.trim())??""]}).filter(([,Ae])=>Ae));if(!Ne){me("error"),ve("No integrations were found for this form.");return}if(Object.keys(Q).length===0)return;const Pe=b.getFormFieldValidationError(he,k);if(Pe){me("error"),ve(Pe);return}me("submitting"),ve(null);try{const Ae=await fetch(Ne,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Q)});if(!Ae.ok){const He=await Ae.text();throw new Error(He||`Request failed: ${Ae.status}`)}me("success"),ce(Object.fromEntries(he.map(He=>[He.name,""])))}catch(Ae){me("error"),ve(Ae instanceof Error?Ae.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${Ee}`.trim(),style:z,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Rf(r)}}),a.jsxs("form",{onSubmit:be,className:`${r}-form`,style:{...ie,height:b.scalingValue(I,t),minHeight:b.scalingValue(I,t)},children:[a.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:he.map(re=>a.jsx("input",{type:re.type==="email"?"email":re.type==="phone"?"tel":"text",name:re.name,autoComplete:"off",value:Z[re.name]??"",onChange:Q=>ce(Pe=>({...Pe,[re.name]:Q.target.value})),placeholder:re.placeholder,required:re.isRequired??re.type==="email",className:`${r}-input`,style:{...ne,paddingRight:b.scalingValue(P.right,t),paddingLeft:b.scalingValue(P.left,t),paddingTop:b.scalingValue(P.top,t),paddingBottom:b.scalingValue(P.bottom,t)}},re.name))}),a.jsx("div",{className:`${r}-overlayAnchor`,children:a.jsx("button",{type:l?"submit":"button",className:`${r}-submitBtn`,"aria-label":Y,style:{...B,...H,paddingRight:b.scalingValue(h.right,t),paddingLeft:b.scalingValue(h.left,t),paddingTop:b.scalingValue(h.top,t),paddingBottom:b.scalingValue(h.bottom,t),pointerEvents:l?"auto":void 0},children:L==="submitting"?"...":g?Ce&&a.jsx(mn,{url:Ce,className:`${r}-submitBtnIcon`,style:{maxWidth:b.scalingValue($??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):Te})})]}),Le==="success"&&a.jsx("p",{className:`${r}-success`,style:{...G},children:J}),Le==="error"&&a.jsx("p",{className:`${r}-error`,style:{...G},role:"alert",children:le??de??V})]})},kf={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"},Af=["hover","focus","filled","success","error"],Ff=`import React, { useMemo, useState } from 'react';
989
+ `}const kf=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:r}=b.useScopedStyles(),l=n&&t||!t,{fields:c=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:d,buttonLabel:u,fieldsToShow:p=1,fontFamily:y,inputFontSettings:x,inputFontSize:m,inputLineHeight:f,inputLetterSpacing:S,inputWordSpacing:w,inputTextAppearance:N,buttonFontSettings:v,buttonFontSize:M,buttonLineHeight:E,buttonLetterSpacing:U,buttonWordSpacing:X,buttonTextAppearance:D,statusFontSettings:_,statusFontSize:W,statusLineHeight:T,statusLetterSpacing:C,statusWordSpacing:q,statusTextAppearance:R,iconMaxWidth:$,minHeight:I,corners:j,stroke:F,stateOverrides:K,inputPadding:P,buttonPadding:h,successMessage:J="Thanks for subscribing!",errorMessage:V="Please, fill all required fields."}=e,he=c.slice(0,Math.min(p,c.length)),[k,ce]=s.useState(()=>Object.fromEntries(he.map(re=>[re.name,""]))),[L,me]=s.useState("idle"),[te,ve]=s.useState(null),Le=o==="success"?"success":o==="error"?"error":L,de=o==="error"?V:te,ue=o==="filled",Z=s.useMemo(()=>{if(!ue)return k;let re=null;for(const Q of he)(k[Q.name]??"").trim().length>0||(re=re??{...k},re[Q.name]="Filled");return re??k},[ue,k,he]),le=Le==="error"?b.getFormFieldValidationError(he,Z):null,oe=o&&o!=="default"?`${r}-state-${o}`:"",ge=he.some(re=>(Z[re.name]??"").trim().length>0),Se=oe!==`${r}-state-filled`&&ge?`${r}-state-filled`:"",Re=`${oe} ${Se}`.trim(),Ne=i==null?void 0:i.submitUrl,Te=u??"",Ce=(d==null?void 0:d.icon)??"",g=(d==null?void 0:d.mode)==="On",Y=Te||"Submit",ee={fontSettings:{fontFamily:y,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:m??.01,lineHeight:f,letterSpacing:S??0,wordSpacing:w??0,textAppearance:N,color:e.inputTextColor??"#111111"},ae={fontSettings:{fontFamily:y,fontWeight:(v==null?void 0:v.fontWeight)??400,fontStyle:(v==null?void 0:v.fontStyle)??"normal"},fontSize:M??.01,lineHeight:E,letterSpacing:U??0,wordSpacing:X??0,textAppearance:D,color:e.buttonTextColor??"#ffffff"},ye={fontSettings:{fontFamily:y,fontWeight:(_==null?void 0:_.fontWeight)??400,fontStyle:(_==null?void 0:_.fontStyle)??"normal"},fontSize:W??.01,lineHeight:T,letterSpacing:C??0,wordSpacing:q??0,textAppearance:R,color:e.successColor??"#22c55e"},ne=pn(nn(ee,t)),B=pn(nn(ae,t)),G=pn(nn(ye,t)),z=b.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(ee==null?void 0:ee.color)??"#111111",buttonTextColor:e.buttonTextColor??(ae==null?void 0:ae.color)??"#ffffff"},Af,Ff,K),ie={borderRadius:b.scalingValue(j,t),borderWidth:b.scalingValue(F,t),borderStyle:"solid"},H={borderLeftWidth:b.scalingValue(F,t)},be=async re=>{if(re.preventDefault(),!l)return;const Q=Object.fromEntries(he.map(Ae=>{var He;return[Ae.name,((He=k[Ae.name])==null?void 0:He.trim())??""]}).filter(([,Ae])=>Ae));if(!Ne){me("error"),ve("No integrations were found for this form.");return}if(Object.keys(Q).length===0)return;const Pe=b.getFormFieldValidationError(he,k);if(Pe){me("error"),ve(Pe);return}me("submitting"),ve(null);try{const Ae=await fetch(Ne,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Q)});if(!Ae.ok){const He=await Ae.text();throw new Error(He||`Request failed: ${Ae.status}`)}me("success"),ce(Object.fromEntries(he.map(He=>[He.name,""])))}catch(Ae){me("error"),ve(Ae instanceof Error?Ae.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${Re}`.trim(),style:z,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Rf(r)}}),a.jsxs("form",{onSubmit:be,className:`${r}-form`,style:{...ie,height:b.scalingValue(I,t),minHeight:b.scalingValue(I,t)},children:[a.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:he.map(re=>a.jsx("input",{type:re.type==="email"?"email":re.type==="phone"?"tel":"text",name:re.name,autoComplete:"off",value:Z[re.name]??"",onChange:Q=>ce(Pe=>({...Pe,[re.name]:Q.target.value})),placeholder:re.placeholder,required:re.isRequired??re.type==="email",className:`${r}-input`,style:{...ne,paddingRight:b.scalingValue(P.right,t),paddingLeft:b.scalingValue(P.left,t),paddingTop:b.scalingValue(P.top,t),paddingBottom:b.scalingValue(P.bottom,t)}},re.name))}),a.jsx("div",{className:`${r}-overlayAnchor`,children:a.jsx("button",{type:l?"submit":"button",className:`${r}-submitBtn`,"aria-label":Y,style:{...B,...H,paddingRight:b.scalingValue(h.right,t),paddingLeft:b.scalingValue(h.left,t),paddingTop:b.scalingValue(h.top,t),paddingBottom:b.scalingValue(h.bottom,t),pointerEvents:l?"auto":void 0},children:L==="submitting"?"...":g?Ce&&a.jsx(mn,{url:Ce,className:`${r}-submitBtnIcon`,style:{maxWidth:b.scalingValue($??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):Te})})]}),Le==="success"&&a.jsx("p",{className:`${r}-success`,style:{...G},children:J}),Le==="error"&&a.jsx("p",{className:`${r}-error`,style:{...G},role:"alert",children:le??de??V})]})},Af={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"},Ff=["hover","focus","filled","success","error"],Nf=`import React, { useMemo, useState } from 'react';
990
990
  import { CommonComponentProps } from '../props';
991
991
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
992
992
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -1565,7 +1565,7 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {
1565
1565
  };
1566
1566
 
1567
1567
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1568
- `,Nf="01M46GNEM2XB41HP5K8WY5BHD2",_f=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."}],es={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Hf=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Wf={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"Input Padding",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"Button Padding",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"numeric-input"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke All",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...es.fontSettings,scope:"common",title:"Input"},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...es.fontSettings,scope:"common",title:"Button"},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},statusFontSettings:{...es.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:_f,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Nf},fontFamily:"Arial",strokeColor:"#000000",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#000000",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:.001,corners:.0053,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},t:{minHeight:.0651,iconMaxWidth:.1,stroke:.001,corners:.0026,buttonPadding:{top:.02604,right:.02604,bottom:.02604,left:.02604},inputPadding:{top:.02604,right:.02604,bottom:.02604,left:.0182},inputFontSize:.0208,inputLineHeight:.02604,buttonFontSize:.0208,buttonLineHeight:.02604,statusFontSize:.0208,statusLineHeight:.02604},d:{minHeight:.028,iconMaxWidth:.028,stroke:.001,corners:.0027,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["fieldsToShow","minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Hf],panelIds:["general","typeStyle"],stateItems:{default:["strokeColor","placeholderColor","inputColor","buttonTextColor","buttonColor"],hover:["strokeColor","inputColor","buttonTextColor","buttonColor"],focus:["strokeColor","inputTextColor","buttonTextColor","buttonColor"],filled:["strokeColor","inputColor","inputTextColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Of={element:Ef,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Single_Line.png"},defaultSize:{d:{width:400},t:{width:500},m:{width:340}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",statusFontSettings:"fontFamily"},schema:Wf,sourceCode:Ff};function Df(e,t){const n=t>0?`${t}px`:"0px";return`
1568
+ `,_f="01M46GNEM2XB41HP5K8WY5BHD2",Hf=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."}],ts={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Wf=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Of={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"Input Padding",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"Button Padding",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"numeric-input"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke All",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...ts.fontSettings,scope:"common",title:"Input"},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...ts.fontSettings,scope:"common",title:"Button"},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},statusFontSettings:{...ts.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:Hf,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:_f},fontFamily:"Arial",strokeColor:"#000000",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#000000",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:.001,corners:.0053,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},t:{minHeight:.0651,iconMaxWidth:.1,stroke:.001,corners:.0026,buttonPadding:{top:.02604,right:.02604,bottom:.02604,left:.02604},inputPadding:{top:.02604,right:.02604,bottom:.02604,left:.0182},inputFontSize:.0208,inputLineHeight:.02604,buttonFontSize:.0208,buttonLineHeight:.02604,statusFontSize:.0208,statusLineHeight:.02604},d:{minHeight:.028,iconMaxWidth:.028,stroke:.001,corners:.0027,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["fieldsToShow","minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Wf],panelIds:["general","typeStyle"],stateItems:{default:["strokeColor","placeholderColor","inputColor","buttonTextColor","buttonColor"],hover:["strokeColor","inputColor","buttonTextColor","buttonColor"],focus:["strokeColor","inputTextColor","buttonTextColor","buttonColor"],filled:["strokeColor","inputColor","inputTextColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Df={element:kf,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Single_Line.png"},defaultSize:{d:{width:400},t:{width:500},m:{width:340}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",statusFontSettings:"fontFamily"},schema:Of,sourceCode:Nf};function zf(e,t){const n=t>0?`${t}px`:"0px";return`
1569
1569
  .${e}-marquee-wrapper {
1570
1570
  overflow: hidden;
1571
1571
  width: 100%;
@@ -1697,7 +1697,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1697
1697
  .${e}-image-hover-grayscale:hover video {
1698
1698
  filter: grayscale(100%);
1699
1699
  }
1700
- `}const zf=30,Bf=20,ts=3,jf=12,Vf=32,Gf=3,Xf=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")},Uf=(e,t)=>Array.from({length:t},()=>e).flat(),qf=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},Zu=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),Sc=(e,t)=>{if(t<=0||e.children.length<t)return 0;const n=e.children[0],i=e.children[t-1];if(!n||!i)return 0;const o=getComputedStyle(e),r=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=i.getBoundingClientRect().right-n.getBoundingClientRect().left;if(l>0)return l;const c=Array.from({length:t},(u,p)=>e.children[p]),d=Zu(c);return d<=0?0:d+r*Math.max(0,t-1)},Kf=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=Zu(Array.from(e.children));if(i<=0)return 0;const o=getComputedStyle(e),r=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=Number.parseFloat(o.paddingRight)||0;return i+r*Math.max(0,e.children.length-1)+l},Yf=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},Qf=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Yf(i,e))},Zf=e=>{if(b.isEmbedMedia(e))return!1;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.assetId??"")},Jf=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,ey=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:r,imageHoverClass:l,isFirstSet:c,scaled:d,onFirstSetImageDone:u})=>{var I,j,F,K,P;const p=s.useRef(null),y=!!((I=e.image)!=null&&I.assetId&&Zf(e.image)),x=!!((j=e.image)!=null&&j.assetId&&b.isEmbedMedia(e.image));s.useLayoutEffect(()=>{c&&(x||Jf(p.current))&&(u==null||u())},[c,x,(F=e.image)==null?void 0:F.assetId,u]);const m=n.display==="cover",f=n.ratioValue??"1:1",S=n.reversed??!1,[w,N]=f.split(":").map(Number),R=(S?N:w)/(S?w:N),U=i/R,X=U>o?o:U,D=U>o?o*R:i,_=d(D),W=d(X),T={borderRadius:d(r)},C=m?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...T}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:d(i),maxHeight:d(o),objectFit:"contain",...T},q=x&&e.image?b.getEmbedAspect(e.image):null,E=q===null?void 0:m?C:{...C,width:d(i/q>o?o*q:i),height:d(i/q>o?o:i/q)},$=((K=e.image)==null?void 0:K.assetId)&&(x?a.jsx(b.EmbedMediaFrame,{media:e.image,mode:"background",fit:m?"cover":"contain",style:E}):y?a.jsx("video",{ref:h=>{p.current=h},src:e.image.assetId,style:C,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto",onLoadedData:c?u:void 0,onError:c?u:void 0}):a.jsx("img",{ref:h=>{p.current=h},src:e.image.assetId,alt:((P=e.image)==null?void 0:P.name)??"",style:C,onLoad:c?u:void 0,onError:c?u:void 0}));return a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...m?{width:_}:{width:"max-content",maxWidth:d(i),minWidth:0}},children:a.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...m?{width:_,height:W,overflow:"hidden",...T}:{width:"max-content",maxWidth:d(i),height:d(o)}},children:$&&a.jsx(b.LinkWrapper,{link:e.link,className:Rt(`${t}-marquee-link`,!m&&`${t}-marquee-link-contain`),children:$})})})},ty=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=b.useScopedStyles(),[l,c]=s.useState(0),d=l>0?Math.round(l):0,u=s.useMemo(()=>Df(r,d),[r,d]),{speed:p,direction:y,pauseOnHover:x,gap:m,imageMaxWidth:f,imageMaxHeight:S,hoverEffect:w,cornerRadius:N=0}=e,v=s.useMemo(()=>qf(e.imageFit),[e.imageFit]),M=(t==null?void 0:t.length)??0,R=!!o,U=!n||!!i,X=U&&w!=="off"&&w!=="randomize"?`${r}-image-hover-${w}`:void 0,D=n?!!i:!0,W=((t==null?void 0:t.length)??0)>0&&(D||!!n),T=Math.max(0,p)*zf,C=Se=>b.scalingValue(Se,n??!1),q=s.useRef(null),E=s.useRef(null),$=s.useRef(null),[I,j]=s.useState(0),F=D&&x==="on",[K,P]=s.useState(!1),[h,J]=s.useState({}),V=s.useRef(h);V.current=h;const he=s.useRef(null),k=s.useRef(0),ce=s.useRef(null),L=s.useMemo(()=>(t??[]).map(Se=>{var Ee;return((Ee=Se.image)==null?void 0:Ee.assetId)??""}).join("\0"),[t]),[me,te]=s.useState(ts),ve=s.useMemo(()=>{const Se=t??[];return Se.length===0||!(D||!!n)?Se:Uf(Se,me)},[t,D,me,n]),Le=s.useMemo(()=>(t??[]).filter(Se=>{var Ee;return!!((Ee=Se.image)!=null&&Ee.assetId)}).length,[t]),de=W?Gf:1;s.useLayoutEffect(()=>{k.current=0,J({}),he.current=null,te(ts),c(0)},[L]),s.useEffect(()=>{if(!U||w!=="randomize")return;const Se=q.current;if(!Se)return;const Ee=g=>{J(Y=>{const ee=Array.from(g).filter(ye=>ye in Y&&!Qf(Se,ye));if(ee.length===0)return Y;const ae={...Y};return ee.forEach(ye=>{delete ae[ye]}),ae})},Ne=new IntersectionObserver(g=>{const Y=new Set;for(const ee of g){const ae=ee.target.dataset.marqueeItemIndex,ye=ae!==void 0?Number(ae):NaN;Number.isNaN(ye)||Y.add(ye)}Y.size>0&&Ee(Y)},{root:Se,threshold:0});Object.keys(h).forEach(g=>{const Y=Number(g);Se.querySelectorAll(`[data-marquee-item-index="${Y}"]`).forEach(ee=>Ne.observe(ee))});const Te={current:0},Ce=()=>{const g=Object.keys(V.current);g.length!==0&&(Ee(g.map(Number)),Te.current=requestAnimationFrame(Ce))};return Object.keys(V.current).length>0&&(Te.current=requestAnimationFrame(Ce)),()=>{cancelAnimationFrame(Te.current),Ne.disconnect()}},[w,h,U]),s.useEffect(()=>{const Se=q.current;if(!Se||typeof IntersectionObserver>"u")return;const Ee=Se.querySelectorAll("video");if(Ee.length===0)return;const Ne=new IntersectionObserver(Te=>{for(const Ce of Te){const g=Ce.target;Ce.isIntersecting?g.paused&&g.play().catch(()=>{}):g.paused||g.pause()}},{threshold:0});return Ee.forEach(Te=>Ne.observe(Te)),()=>Ne.disconnect()},[W,ve,de,h]),s.useLayoutEffect(()=>{if(!W)return;const Se=q.current,Ee=$.current;if(!Se||!Ee)return;const Ne={current:0},Te=()=>{const Y=Se.getBoundingClientRect().width||Se.offsetWidth,ee=Kf(Ee),ae=he.current,ye=typeof ae=="number"&&Math.abs(ae-ee)<=.25;he.current=ee;let ne=me,B=0;if((D||n)&&M>0&&Y>0){const ie=Sc(Ee,M);if(ie>=Vf){B=ie;const H=Math.min(jf,Math.max(ts,Math.ceil(Y/ie)+1));ne=H,H!==me&&te(H)}}const z=ne!==me&&B>0?B*ne:ee>0?ee:B>0?B*ne:(()=>{const ie=Sc(Ee,M);return ie>0?ie*ne:0})();z>0?c(ie=>ie<=0?z:!ye||Math.round(ie)===Math.round(z)?ie:z):!ye&&l<=0&&(cancelAnimationFrame(Ne.current),Ne.current=requestAnimationFrame(Te))},Ce=()=>{cancelAnimationFrame(Ne.current),Ne.current=requestAnimationFrame(Te)};ce.current=Ce,Ce();const g=new ResizeObserver(Ce);return g.observe(Se),g.observe(Ee),()=>{ce.current=null,cancelAnimationFrame(Ne.current),g.disconnect()}},[D,W,l,L,me,M,n]),s.useLayoutEffect(()=>{if(!W||d<=0)return;const Se=E.current;Se&&Xf(Se)},[W,d,y,T]),s.useLayoutEffect(()=>{if(!W||l<=0){j(0);return}const Se=E.current,Ee=$.current;if(!Se||!Ee)return;const Ne=()=>{const Ce=Se.offsetHeight||Se.getBoundingClientRect().height,g=Array.from(Ee.children).reduce((ee,ae)=>Math.max(ee,ae.offsetHeight||ae.getBoundingClientRect().height),0),Y=Ce>0?Ce:g;j(Y>0?Y:0)};Ne();const Te=new ResizeObserver(Ne);return Te.observe(Se),Te.observe(Ee),()=>Te.disconnect()},[W,de,ve,n,m,f,S,l,v,h]),s.useLayoutEffect(()=>{if(!n||!R||!W||typeof window>"u")return;const Se=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(Se)},[n,R,W,y,l,I,m,ve]);const ue=()=>{F&&P(!0)},Z=()=>{F&&P(!1)},le=s.useCallback(()=>{var Se;k.current=Math.min(Le,k.current+1),(Se=ce.current)==null||Se.call(ce)},[Le]),oe=s.useCallback((Se,Ee)=>{J(Ne=>{const Te=Ne[Se]??Ee,Ce=(t??[]).filter(Y=>Y!==Te);if(Ce.length===0)return Ne;const g=Ce[Math.floor(Math.random()*Ce.length)];return{...Ne,[Se]:g}})},[t]),ge=(Se,Ee,Ne,Te)=>{const Ce=U&&w==="randomize"&&v.display==="cover"?h[Ne]??Se:Se,g=`max(${C(m)}, ${Bf}px)`,Y=`calc(-0.5 * (${g} + ${C(m)}))`;return a.jsxs("div",{className:`${r}-marquee-card`,"data-marquee-item-index":Ne,onMouseEnter:U&&w==="randomize"&&v.display==="cover"?()=>oe(Ne,Se):void 0,children:[a.jsx(ey,{item:Ce,prefix:r,imageFit:v,imageMaxWidth:f,imageMaxHeight:S,cornerRadius:N,imageHoverClass:X,isEditor:n,isFirstSet:Te,scaled:C,onFirstSetImageDone:le}),R&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${r}-gap-control`,style:{position:"absolute",top:0,right:Y,width:g,height:"100%"}})]},`${Ee}-${Ne}`)};if(W){const Se=D?F&&K?"paused":"running":"paused",Ee=d>0&&T>0?d/T*1e3:0,Ne=`${Math.max(0,Ee)/1e3}s`;return a.jsxs("div",{ref:q,className:Rt(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Marquee",style:I>0?{height:I}:void 0,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{ref:E,className:`${r}-marquee-track`,"data-direction":y,onMouseEnter:ue,onMouseLeave:Z,style:{WebkitAnimationDuration:Ne,animationDuration:Ne,WebkitAnimationPlayState:Se,animationPlayState:Se},children:Array.from({length:de},(Te,Ce)=>a.jsx("div",{ref:Ce===0?$:void 0,className:Rt(`${r}-marquee-row`,`${r}-marquee-set`),style:{gap:C(m),paddingRight:C(m)},"aria-hidden":Ce>0,children:ve.map((g,Y)=>ge(g,Ce,Y,Ce===0&&Y<M))},`set-${Ce}`))})]})}return a.jsxs("div",{ref:q,className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{className:Rt(`${r}-marquee-row`,`${r}-marquee-static`),style:{gap:C(m),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((Se,Ee)=>ge(Se,0,Ee))},"marquee-static")]})},ny=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
1700
+ `}const Bf=30,jf=20,ns=3,Vf=12,Gf=32,Xf=3,Uf=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")},qf=(e,t)=>Array.from({length:t},()=>e).flat(),Kf=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},Ju=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),wc=(e,t)=>{if(t<=0||e.children.length<t)return 0;const n=e.children[0],i=e.children[t-1];if(!n||!i)return 0;const o=getComputedStyle(e),r=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=i.getBoundingClientRect().right-n.getBoundingClientRect().left;if(l>0)return l;const c=Array.from({length:t},(u,p)=>e.children[p]),d=Ju(c);return d<=0?0:d+r*Math.max(0,t-1)},Yf=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=Ju(Array.from(e.children));if(i<=0)return 0;const o=getComputedStyle(e),r=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=Number.parseFloat(o.paddingRight)||0;return i+r*Math.max(0,e.children.length-1)+l},Qf=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},Zf=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Qf(i,e))},Jf=e=>{if(b.isEmbedMedia(e))return!1;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.assetId??"")},ey=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,ty=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:r,imageHoverClass:l,isFirstSet:c,scaled:d,onFirstSetImageDone:u})=>{var I,j,F,K,P;const p=s.useRef(null),y=!!((I=e.image)!=null&&I.assetId&&Jf(e.image)),x=!!((j=e.image)!=null&&j.assetId&&b.isEmbedMedia(e.image));s.useLayoutEffect(()=>{c&&(x||ey(p.current))&&(u==null||u())},[c,x,(F=e.image)==null?void 0:F.assetId,u]);const m=n.display==="cover",f=n.ratioValue??"1:1",S=n.reversed??!1,[w,N]=f.split(":").map(Number),E=(S?N:w)/(S?w:N),U=i/E,X=U>o?o:U,D=U>o?o*E:i,_=d(D),W=d(X),T={borderRadius:d(r)},C=m?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...T}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:d(i),maxHeight:d(o),objectFit:"contain",...T},q=x&&e.image?b.getEmbedAspect(e.image):null,R=q===null?void 0:m?C:{...C,width:d(i/q>o?o*q:i),height:d(i/q>o?o:i/q)},$=((K=e.image)==null?void 0:K.assetId)&&(x?a.jsx(b.EmbedMediaFrame,{media:e.image,mode:"background",fit:m?"cover":"contain",style:R}):y?a.jsx("video",{ref:h=>{p.current=h},src:e.image.assetId,style:C,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto",onLoadedData:c?u:void 0,onError:c?u:void 0}):a.jsx("img",{ref:h=>{p.current=h},src:e.image.assetId,alt:((P=e.image)==null?void 0:P.name)??"",style:C,onLoad:c?u:void 0,onError:c?u:void 0}));return a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...m?{width:_}:{width:"max-content",maxWidth:d(i),minWidth:0}},children:a.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...m?{width:_,height:W,overflow:"hidden",...T}:{width:"max-content",maxWidth:d(i),height:d(o)}},children:$&&a.jsx(b.LinkWrapper,{link:e.link,className:Et(`${t}-marquee-link`,!m&&`${t}-marquee-link-contain`),children:$})})})},ny=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=b.useScopedStyles(),[l,c]=s.useState(0),d=l>0?Math.round(l):0,u=s.useMemo(()=>zf(r,d),[r,d]),{speed:p,direction:y,pauseOnHover:x,gap:m,imageMaxWidth:f,imageMaxHeight:S,hoverEffect:w,cornerRadius:N=0}=e,v=s.useMemo(()=>Kf(e.imageFit),[e.imageFit]),M=(t==null?void 0:t.length)??0,E=!!o,U=!n||!!i,X=U&&w!=="off"&&w!=="randomize"?`${r}-image-hover-${w}`:void 0,D=n?!!i:!0,W=((t==null?void 0:t.length)??0)>0&&(D||!!n),T=Math.max(0,p)*Bf,C=Se=>b.scalingValue(Se,n??!1),q=s.useRef(null),R=s.useRef(null),$=s.useRef(null),[I,j]=s.useState(0),F=D&&x==="on",[K,P]=s.useState(!1),[h,J]=s.useState({}),V=s.useRef(h);V.current=h;const he=s.useRef(null),k=s.useRef(0),ce=s.useRef(null),L=s.useMemo(()=>(t??[]).map(Se=>{var Re;return((Re=Se.image)==null?void 0:Re.assetId)??""}).join("\0"),[t]),[me,te]=s.useState(ns),ve=s.useMemo(()=>{const Se=t??[];return Se.length===0||!(D||!!n)?Se:qf(Se,me)},[t,D,me,n]),Le=s.useMemo(()=>(t??[]).filter(Se=>{var Re;return!!((Re=Se.image)!=null&&Re.assetId)}).length,[t]),de=W?Xf:1;s.useLayoutEffect(()=>{k.current=0,J({}),he.current=null,te(ns),c(0)},[L]),s.useEffect(()=>{if(!U||w!=="randomize")return;const Se=q.current;if(!Se)return;const Re=g=>{J(Y=>{const ee=Array.from(g).filter(ye=>ye in Y&&!Zf(Se,ye));if(ee.length===0)return Y;const ae={...Y};return ee.forEach(ye=>{delete ae[ye]}),ae})},Ne=new IntersectionObserver(g=>{const Y=new Set;for(const ee of g){const ae=ee.target.dataset.marqueeItemIndex,ye=ae!==void 0?Number(ae):NaN;Number.isNaN(ye)||Y.add(ye)}Y.size>0&&Re(Y)},{root:Se,threshold:0});Object.keys(h).forEach(g=>{const Y=Number(g);Se.querySelectorAll(`[data-marquee-item-index="${Y}"]`).forEach(ee=>Ne.observe(ee))});const Te={current:0},Ce=()=>{const g=Object.keys(V.current);g.length!==0&&(Re(g.map(Number)),Te.current=requestAnimationFrame(Ce))};return Object.keys(V.current).length>0&&(Te.current=requestAnimationFrame(Ce)),()=>{cancelAnimationFrame(Te.current),Ne.disconnect()}},[w,h,U]),s.useEffect(()=>{const Se=q.current;if(!Se||typeof IntersectionObserver>"u")return;const Re=Se.querySelectorAll("video");if(Re.length===0)return;const Ne=new IntersectionObserver(Te=>{for(const Ce of Te){const g=Ce.target;Ce.isIntersecting?g.paused&&g.play().catch(()=>{}):g.paused||g.pause()}},{threshold:0});return Re.forEach(Te=>Ne.observe(Te)),()=>Ne.disconnect()},[W,ve,de,h]),s.useLayoutEffect(()=>{if(!W)return;const Se=q.current,Re=$.current;if(!Se||!Re)return;const Ne={current:0},Te=()=>{const Y=Se.getBoundingClientRect().width||Se.offsetWidth,ee=Yf(Re),ae=he.current,ye=typeof ae=="number"&&Math.abs(ae-ee)<=.25;he.current=ee;let ne=me,B=0;if((D||n)&&M>0&&Y>0){const ie=wc(Re,M);if(ie>=Gf){B=ie;const H=Math.min(Vf,Math.max(ns,Math.ceil(Y/ie)+1));ne=H,H!==me&&te(H)}}const z=ne!==me&&B>0?B*ne:ee>0?ee:B>0?B*ne:(()=>{const ie=wc(Re,M);return ie>0?ie*ne:0})();z>0?c(ie=>ie<=0?z:!ye||Math.round(ie)===Math.round(z)?ie:z):!ye&&l<=0&&(cancelAnimationFrame(Ne.current),Ne.current=requestAnimationFrame(Te))},Ce=()=>{cancelAnimationFrame(Ne.current),Ne.current=requestAnimationFrame(Te)};ce.current=Ce,Ce();const g=new ResizeObserver(Ce);return g.observe(Se),g.observe(Re),()=>{ce.current=null,cancelAnimationFrame(Ne.current),g.disconnect()}},[D,W,l,L,me,M,n]),s.useLayoutEffect(()=>{if(!W||d<=0)return;const Se=R.current;Se&&Uf(Se)},[W,d,y,T]),s.useLayoutEffect(()=>{if(!W||l<=0){j(0);return}const Se=R.current,Re=$.current;if(!Se||!Re)return;const Ne=()=>{const Ce=Se.offsetHeight||Se.getBoundingClientRect().height,g=Array.from(Re.children).reduce((ee,ae)=>Math.max(ee,ae.offsetHeight||ae.getBoundingClientRect().height),0),Y=Ce>0?Ce:g;j(Y>0?Y:0)};Ne();const Te=new ResizeObserver(Ne);return Te.observe(Se),Te.observe(Re),()=>Te.disconnect()},[W,de,ve,n,m,f,S,l,v,h]),s.useLayoutEffect(()=>{if(!n||!E||!W||typeof window>"u")return;const Se=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(Se)},[n,E,W,y,l,I,m,ve]);const ue=()=>{F&&P(!0)},Z=()=>{F&&P(!1)},le=s.useCallback(()=>{var Se;k.current=Math.min(Le,k.current+1),(Se=ce.current)==null||Se.call(ce)},[Le]),oe=s.useCallback((Se,Re)=>{J(Ne=>{const Te=Ne[Se]??Re,Ce=(t??[]).filter(Y=>Y!==Te);if(Ce.length===0)return Ne;const g=Ce[Math.floor(Math.random()*Ce.length)];return{...Ne,[Se]:g}})},[t]),ge=(Se,Re,Ne,Te)=>{const Ce=U&&w==="randomize"&&v.display==="cover"?h[Ne]??Se:Se,g=`max(${C(m)}, ${jf}px)`,Y=`calc(-0.5 * (${g} + ${C(m)}))`;return a.jsxs("div",{className:`${r}-marquee-card`,"data-marquee-item-index":Ne,onMouseEnter:U&&w==="randomize"&&v.display==="cover"?()=>oe(Ne,Se):void 0,children:[a.jsx(ty,{item:Ce,prefix:r,imageFit:v,imageMaxWidth:f,imageMaxHeight:S,cornerRadius:N,imageHoverClass:X,isEditor:n,isFirstSet:Te,scaled:C,onFirstSetImageDone:le}),E&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${r}-gap-control`,style:{position:"absolute",top:0,right:Y,width:g,height:"100%"}})]},`${Re}-${Ne}`)};if(W){const Se=D?F&&K?"paused":"running":"paused",Re=d>0&&T>0?d/T*1e3:0,Ne=`${Math.max(0,Re)/1e3}s`;return a.jsxs("div",{ref:q,className:Et(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Marquee",style:I>0?{height:I}:void 0,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{ref:R,className:`${r}-marquee-track`,"data-direction":y,onMouseEnter:ue,onMouseLeave:Z,style:{WebkitAnimationDuration:Ne,animationDuration:Ne,WebkitAnimationPlayState:Se,animationPlayState:Se},children:Array.from({length:de},(Te,Ce)=>a.jsx("div",{ref:Ce===0?$:void 0,className:Et(`${r}-marquee-row`,`${r}-marquee-set`),style:{gap:C(m),paddingRight:C(m)},"aria-hidden":Ce>0,children:ve.map((g,Y)=>ge(g,Ce,Y,Ce===0&&Y<M))},`set-${Ce}`))})]})}return a.jsxs("div",{ref:q,className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{className:Et(`${r}-marquee-row`,`${r}-marquee-static`),style:{gap:C(m),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((Se,Re)=>ge(Se,0,Re))},"marquee-static")]})},iy=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
1701
1701
  import cn from 'classnames';
1702
1702
  import { CommonComponentProps } from '../props';
1703
1703
  import { EmbedMediaFrame, getEmbedAspect, isEmbedMedia, LinkWrapper, scalingValue, useScopedStyles, type ContentLink } from '../utils/index';
@@ -2522,7 +2522,7 @@ type MarqueeProps = {
2522
2522
  isPreviewMode?: boolean;
2523
2523
  isEditMode?: boolean;
2524
2524
  } & CommonComponentProps;
2525
- `,iy={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:{allowsCollection:!0,addItemFromFileExplorer:!0,allowsVideo:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",contentKey:"gallery",display:{isObjectFitEditable:!1,type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video","vimeo","youtube"]}}},link:{type:"object",label:"URL",contentKey:"link",display:{type:"link-input"}}}},default:[{image:{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:""},link:{type:"url",value:"",target:"self"}},{image:{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:""},link:{type:"url",value:"",target:"self"}},{image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:""},link:{type:"url",value:"",target:"self"}},{image:{assetId:"01M3QM74XE20C38X4NND20C5R4",name:""},link:{type:"url",value:"",target:"self"}},{image:{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:""},link:{type:"url",value:"",target:"self"}},{image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:""},link:{type:"url",value:"",target:"self"}},{image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:""},link:{type:"url",value:"",target:"self"}}]}},oy={element:ty,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:iy,sourceCode:ny,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function ry(e,t,n){const i=t>0?`${t}px`:"0px",o=n?`
2525
+ `,oy={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:{allowsCollection:!0,addItemFromFileExplorer:!0,allowsVideo:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",contentKey:"gallery",display:{isObjectFitEditable:!1,type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video","vimeo","youtube"]}}},link:{type:"object",label:"URL",contentKey:"link",display:{type:"link-input"}}}},default:[{image:{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:""},link:{type:"url",value:"",target:"self"}},{image:{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:""},link:{type:"url",value:"",target:"self"}},{image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:""},link:{type:"url",value:"",target:"self"}},{image:{assetId:"01M3QM74XE20C38X4NND20C5R4",name:""},link:{type:"url",value:"",target:"self"}},{image:{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:""},link:{type:"url",value:"",target:"self"}},{image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:""},link:{type:"url",value:"",target:"self"}},{image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:""},link:{type:"url",value:"",target:"self"}}]}},ry={element:ny,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:oy,sourceCode:iy,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function ay(e,t,n){const i=t>0?`${t}px`:"0px",o=n?`
2526
2526
  .${e}-item-image-wrap {
2527
2527
  display: flex;
2528
2528
  flex: 0 0 auto;
@@ -2653,7 +2653,7 @@ ${o}
2653
2653
  left: -9999px;
2654
2654
  top: 0;
2655
2655
  }
2656
- `}const ay=30,ns=3,sy=12,ly=96,wc=3,ua=.72,cy=100,dy=10,uy=e=>e/cy,py=e=>Math.max(0,e)/dy,my=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")},gy=(e,t)=>Array.from({length:t*e.length},(n,i)=>e[i%e.length]),oo={ctx:void 0},hy=()=>oo.ctx!==void 0?oo.ctx:typeof document>"u"?(oo.ctx=null,oo.ctx):(oo.ctx=document.createElement("canvas").getContext("2d"),oo.ctx),fy=(e,t,n,i)=>{e.style.transform=`translate3d(${t}px, ${n}px, 0) rotate(${i}deg)`},$c=e=>{e.style.transform=""},yy=e=>{if(!e||e==="none")return 0;try{return new DOMMatrixReadOnly(e).m41}catch{return 0}},vy=(e,t)=>{const n=(i,o)=>{if(!i||i===t)return o;const r=o+i.offsetLeft,l=i.offsetParent;return!l||l===i?r:n(l,r)};return n(e,e.offsetWidth/2)},Ju=96,ep=(e,t,n)=>{if(t<=0||Math.abs(e)<=0||n<2)return null;const i=2*Math.PI/t,o=new Float64Array(n+1),r=new Float64Array(n+1),l=e*t,c=u=>Math.sqrt(1+(l*Math.cos(t*u))**2),d=i/n;return Array.from({length:n},(u,p)=>{const y=p*d,x=y+d;o[p+1]=x,r[p+1]=r[p]+(c(y)+c(x))*.5*d}),{wavelength:i,periodArc:r[n],x:o,s:r}},xy=(e,t)=>{const n=ep(e,t,Ju);return!n||n.wavelength<=0?1:n.periodArc/n.wavelength},by=(e,t)=>{if(e.periodArc<=0)return t;const n=t<0?-1:1,i=Math.abs(t),o=Math.floor(i/e.periodArc),r=i-o*e.periodArc,{s:l,x:c}=e,d=(m,f)=>{if(f-m<=1)return[m,f];const S=m+f>>1;return l[S]<=r?d(S,f):d(m,S)},[u,p]=d(0,l.length-1),y=l[p]-l[u],x=y>0?(r-l[u])/y:0;return n*(o*e.wavelength+c[u]+(c[p]-c[u])*x)},Sy=(e,t,n,i,o=0)=>{const r=Math.max(0,n),l=e>0?2*Math.PI*r/e:0,c=f=>i+t*Math.sin(l*f),d=f=>t*l*Math.cos(l*f),u=-o,y=e+o-u,x=Math.max(4,Math.ceil(r*4*(y/Math.max(e,1)))),m=Array.from({length:x},(f,S)=>{const w=u+S/x*y,N=u+(S+1)/x*y,v=N-w,M=c(w),R=c(N),U=w+v/3,X=M+d(w)*v/3,D=N-v/3,_=R-d(N)*v/3;return`C${U.toFixed(2)} ${X.toFixed(2)} ${D.toFixed(2)} ${_.toFixed(2)} ${N.toFixed(2)} ${R.toFixed(2)}`});return[`M${u.toFixed(2)} ${c(u).toFixed(2)}`,...m].join(" ")},wy=({item:e,prefix:t,textCss:n,capHeightPx:i,opticalOffsetY:o,imageGapPx:r,isCurve:l})=>{var m;const c=o!==0?{...n,transform:`translateY(${o}px)`}:n,d=i>0?{height:`${i}px`}:{fontSize:n.fontSize,height:`${ua}em`},u=((m=e.image)==null?void 0:m.assetId)&&a.jsx("img",{src:e.image.assetId,alt:e.image.name??"",className:`${t}-item-image`,style:d}),p=u&&(l?a.jsx("span",{className:`${t}-item-image-wrap`,"data-marquee-wave-node":!0,children:u}):u),y=l?a.jsx("span",{className:`${t}-text`,style:c,children:Array.from(e.text).map((f,S)=>a.jsx("span",{className:`${t}-glyph`,"data-marquee-wave-node":!0,children:a.jsx("span",{className:`${t}-glyph-inner`,children:f===" "?" ":f})},S))}):a.jsx("span",{className:`${t}-text`,style:c,children:e.text}),x=a.jsxs(a.Fragment,{children:[p,y]});return a.jsx("div",{className:`${t}-item`,"data-marquee-text-item":!0,style:{gap:r},children:a.jsx(b.LinkWrapper,{link:e.link,className:`${t}-item-link`,style:{gap:r},children:x})})},$y=({settings:e,content:t,isEditor:n,isPreviewMode:i})=>{const{prefix:o}=b.useScopedStyles(),[r,l]=s.useState(0),c=r>0?Math.round(r):0,{speed:d,direction:u,pauseOnHover:p,gap:y,layoutType:x,curveAmplitude:m,curveFrequency:f,textFontFamily:S,textFontSettings:w,textFontSize:N,textLetterSpacing:v,textWordSpacing:M,textTextAppearance:R,textColor:U,backgroundColor:X,ribbonWidth:D}=e,_=D??N,W=x==="curve",T=uy(m),C=py(f),q=s.useMemo(()=>ry(o,c,W),[o,c,W]),E=s.useMemo(()=>nn({fontSettings:{fontFamily:S,fontWeight:w.fontWeight,fontStyle:w.fontStyle},letterSpacing:v,wordSpacing:M,fontSize:N,lineHeight:N,textAppearance:R,color:U},n),[S,w,v,M,N,R,U,n]),$=_e=>b.scalingValue(_e,n??!1),I=((t==null?void 0:t.length)??0)>0,j=n?!!i:!0,F=I&&(j||!!n),K=Math.max(0,d)*ay,P=j&&p==="on",[h,J]=s.useState(!1),V=j?P&&h?"paused":"running":"paused",he=V==="running"&&K>0&&c>0,k=c>0&&K>0?c/K*1e3:0,ce=s.useRef(null),L=s.useRef(null),me=s.useRef(null),te=s.useRef(null),ve=s.useRef(null),Le=s.useRef(null),de=s.useRef(he),ue=s.useRef(null),Z=s.useRef(null),le=s.useRef(T),oe=s.useRef(C);de.current=he,le.current=T,oe.current=C;const[ge,Se]=s.useState(0),[Ee,Ne]=s.useState(0),[Te,Ce]=s.useState(0),[g,Y]=s.useState(0),[ee,ae]=s.useState(0),ye=s.useMemo(()=>(t??[]).map(_e=>{var We,vt;return`${_e.text}\0${((We=_e.image)==null?void 0:We.assetId)??""}\0${((vt=_e.link)==null?void 0:vt.value)??""}`}).join("\0"),[t]),[ne,B]=s.useState(ns),G=s.useMemo(()=>{const _e=t??[];return _e.length===0||!(j||n)?_e:gy(_e,ne)},[t,j,ne,n]),z=F?wc:1;s.useLayoutEffect(()=>{B(ns),l(0)},[ye]),s.useLayoutEffect(()=>{var Ke;const _e=Le.current;if(!_e)return;const We=()=>{const pe=getComputedStyle(_e),De=parseFloat(pe.fontSize)||0;if(De<=0)return;const qe=hy();if(!qe){Se(De*ua),Ne(0);return}qe.font=`${pe.fontStyle} ${pe.fontWeight} ${De}px ${pe.fontFamily}`;const bt=qe.measureText("H"),yt=bt.actualBoundingBoxAscent>0?bt.actualBoundingBoxAscent:De*ua,Et=Math.max(0,bt.actualBoundingBoxDescent||0),ct=bt.fontBoundingBoxAscent||0,wt=bt.fontBoundingBoxDescent||0;Se(Nt=>Math.abs(Nt-yt)>.5?yt:Nt);const nt=ct>0||wt>0?(wt-Et-(ct-yt))/2:0;Ne(Nt=>Math.abs(Nt-nt)>.25?nt:Nt)};We();const vt=typeof document<"u"?document.fonts:void 0;(Ke=vt==null?void 0:vt.ready)==null||Ke.then(We).catch(()=>{});const Ve=new ResizeObserver(We);return Ve.observe(_e),()=>Ve.disconnect()},[E.fontFamily,E.fontWeight,E.fontStyle,E.fontSize,E.lineHeight]),s.useLayoutEffect(()=>{if(!F)return;const _e=ce.current,We=te.current;if(!_e||!We)return;const vt={id:0},Ve=()=>{const qe=_e.offsetWidth||_e.getBoundingClientRect().width,bt=We.offsetWidth||We.getBoundingClientRect().width;if(I&&qe>0&&bt>0){const yt=bt/ne;if(yt>0){let Et=qe,ct=sy;if(W){const nt=qe*le.current,Nt=oe.current,jt=Nt>0?2*Math.PI*Nt/qe:0,$e=xy(nt,jt);Et=Math.max(qe,$e*qe/(wc-1)),ct=ly}const wt=Math.min(ct,Math.max(ns,Math.ceil(Et/yt)+1));if(wt!==ne){B(wt);return}}}bt>0&&l(bt)},Ke=()=>{cancelAnimationFrame(vt.id),vt.id=requestAnimationFrame(Ve)};Ke();const pe=new ResizeObserver(Ke);pe.observe(_e),pe.observe(We);const De=()=>{document.hidden||Ke()};return document.addEventListener("visibilitychange",De),window.addEventListener("pageshow",De),window.addEventListener("focus",De),()=>{cancelAnimationFrame(vt.id),pe.disconnect(),document.removeEventListener("visibilitychange",De),window.removeEventListener("pageshow",De),window.removeEventListener("focus",De)}},[F,ye,ne,I,ge,W,T,C]),s.useLayoutEffect(()=>{const _e=ve.current;if(!_e)return;const We={id:0},vt=()=>{const Ke=_e.offsetHeight;Ke>0&&ae(pe=>Math.abs(pe-Ke)>.5?Ke:pe)};We.id=requestAnimationFrame(vt);const Ve=new ResizeObserver(()=>{cancelAnimationFrame(We.id),We.id=requestAnimationFrame(vt)});return Ve.observe(_e),()=>{cancelAnimationFrame(We.id),Ve.disconnect()}},[_,n]),s.useLayoutEffect(()=>{if(!W){Ce(0),Y(0);return}const _e=ce.current,We=te.current;if(!_e||!We)return;const vt={id:0},Ve=()=>{const pe=_e.offsetWidth,De=We.offsetHeight;pe>0&&Y(qe=>Math.abs(qe-pe)>.5?pe:qe),De>0&&Ce(qe=>Math.abs(qe-De)>.5?De:qe)};vt.id=requestAnimationFrame(Ve);const Ke=new ResizeObserver(()=>{cancelAnimationFrame(vt.id),vt.id=requestAnimationFrame(Ve)});return Ke.observe(_e),Ke.observe(We),()=>{cancelAnimationFrame(vt.id),Ke.disconnect()}},[W,ye,ge,N,F]),s.useLayoutEffect(()=>{if(!F||c<=0)return;const _e=me.current;_e&&my(_e)},[F,c,u,K]),s.useLayoutEffect(()=>{if(!W||!I)return;const _e=ce.current;if(!_e)return;const We={raf:0,cancelled:!1,lut:null,lutKey:"",itemsCache:[],cacheDirty:!0},vt=()=>{for(const yt of We.itemsCache)for(const Et of yt.glyphs)$c(Et.inner)},Ve=()=>{const yt=L.current??_e;We.itemsCache=Array.from(_e.querySelectorAll("[data-marquee-text-item]"),Et=>{const ct=[];return Et.querySelectorAll("[data-marquee-wave-node]").forEach(wt=>{const nt=wt.firstElementChild;nt&&ct.push({inner:nt,layoutLocalX:vy(wt,yt)})}),{item:Et,glyphs:ct}}),We.cacheDirty=!1},Ke=()=>{We.cacheDirty&&Ve();const Et=(L.current??_e).offsetWidth||1,ct=Et*le.current,wt=oe.current,nt=2*Math.PI*wt/Et,Nt=`${Et}|${ct}|${nt}`;if(Nt!==We.lutKey&&(We.lutKey=Nt,We.lut=ep(ct,nt,Ju)),Math.abs(ct)<=0||nt<=0){vt();return}const jt=me.current,$e=jt?yy(getComputedStyle(jt).transform):0,Ge=_e.getBoundingClientRect(),ht=Ge.left,Lt=Ge.right,$t=We.lut&&We.lut.wavelength>0?Math.max(0,(We.lut.periodArc/We.lut.wavelength-1)*Et):0;for(const{item:mt,glyphs:_t}of We.itemsCache){const Ot=mt.getBoundingClientRect();if(Ot.right<ht||Ot.left>Lt+$t){for(const zt of _t)$c(zt.inner);continue}for(const zt of _t){const Re=zt.layoutLocalX+$e,dt=We.lut?by(We.lut,Re):Re,ut=nt*dt,kt=ct*Math.sin(ut),Qe=ct*nt*Math.cos(ut),at=Math.atan(Qe)*(180/Math.PI);fy(zt.inner,dt-Re,kt,at)}}},pe=()=>{We.cancelled||(We.raf=0,Ke(),de.current&&!document.hidden&&(We.raf=requestAnimationFrame(pe)))},De=()=>{We.cancelled||We.raf||(We.raf=requestAnimationFrame(pe))},qe=()=>{We.cacheDirty=!0,Ke(),De()};ue.current=De,Z.current=qe,Ke(),De();const bt=()=>{if(document.hidden){cancelAnimationFrame(We.raf),We.raf=0;return}cancelAnimationFrame(We.raf),We.raf=0,qe()};return document.addEventListener("visibilitychange",bt),window.addEventListener("pageshow",bt),window.addEventListener("focus",bt),()=>{We.cancelled=!0,ue.current=null,Z.current=null,cancelAnimationFrame(We.raf),document.removeEventListener("visibilitychange",bt),window.removeEventListener("pageshow",bt),window.removeEventListener("focus",bt),vt()}},[W,I]),s.useLayoutEffect(()=>{var _e;!W||!I||(_e=Z.current)==null||_e.call(Z)},[W,I,r,ye,ne,ge,T,C,g]),s.useLayoutEffect(()=>{var _e;(_e=ue.current)==null||_e.call(ue)},[he,u]);const ie=_e=>{P&&_e.pointerType==="mouse"&&J(!0)},H=()=>{P&&J(!1)},be=W?Math.abs(T)*100:0,re=$(_),Q={minHeight:re,...W?{paddingTop:`${be}%`,paddingBottom:`${be}%`}:{}},Pe={height:re,...W?{visibility:"hidden"}:{backgroundColor:X}},Ae={gap:$(y),minHeight:re},He=g*T,Xe=Math.abs(He),Ue=ee>0?ee:Te,Je=Math.max(Te,Ue),je=Xe+Je/2,xe=Math.max(Ue,1),Ie=W&&g>0&&Je>0?Sy(g,He,C,je,xe):"",ze=Xe*2+Je,Ze=Ie?a.jsx("svg",{className:`${o}-curve-bg`,viewBox:`0 0 ${g} ${ze}`,preserveAspectRatio:"none","aria-hidden":!0,children:a.jsx("path",{d:Ie,fill:"none",stroke:X,strokeWidth:Ue,strokeLinecap:"butt",strokeLinejoin:"round"})}):null,tt=a.jsx("div",{ref:ve,className:`${o}-ribbon`,style:Pe,"aria-hidden":!0}),ot={...E,lineHeight:ge>0?`${ge}px`:`${ua}em`},lt=(_e,We,vt)=>a.jsx(wy,{item:_e,prefix:o,textCss:ot,capHeightPx:ge,opticalOffsetY:Ee,imageGapPx:$(y),isCurve:W},`${We}-${vt}`),it=a.jsx("span",{ref:Le,"aria-hidden":!0,className:`${o}-cap-ref`,style:E,children:"H"}),xt=`${Math.max(0,k)/1e3}s`,rt=F?a.jsx("div",{ref:me,className:`${o}-marquee-track`,"data-direction":u,onPointerEnter:ie,onPointerLeave:H,style:{WebkitAnimationDuration:xt,animationDuration:xt,WebkitAnimationPlayState:V,animationPlayState:V},children:Array.from({length:z},(_e,We)=>a.jsx("div",{ref:We===0?te:void 0,className:`${o}-marquee-set`,style:{...Ae,paddingRight:$(y)},"aria-hidden":We>0,children:G.map((vt,Ve)=>lt(vt,We,Ve))},`set-${We}`))}):a.jsx("div",{ref:te,className:Rt(`${o}-marquee-set`,`${o}-marquee-static`),style:Ae,children:t==null?void 0:t.map((_e,We)=>lt(_e,0,We))});return a.jsxs("div",{ref:ce,className:`${o}-wrapper`,"aria-label":"Marquee text",children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:q}}),it,a.jsxs("div",{ref:L,className:`${o}-marquee-wrapper`,style:Q,children:[tt,Ze,rt]})]})},Cy=`import { useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type PointerEvent as ReactPointerEvent } from 'react';
2656
+ `}const sy=30,is=3,ly=12,cy=96,$c=3,pa=.72,dy=100,uy=10,py=e=>e/dy,my=e=>Math.max(0,e)/uy,gy=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")},hy=(e,t)=>Array.from({length:t*e.length},(n,i)=>e[i%e.length]),oo={ctx:void 0},fy=()=>oo.ctx!==void 0?oo.ctx:typeof document>"u"?(oo.ctx=null,oo.ctx):(oo.ctx=document.createElement("canvas").getContext("2d"),oo.ctx),yy=(e,t,n,i)=>{e.style.transform=`translate3d(${t}px, ${n}px, 0) rotate(${i}deg)`},Cc=e=>{e.style.transform=""},vy=e=>{if(!e||e==="none")return 0;try{return new DOMMatrixReadOnly(e).m41}catch{return 0}},xy=(e,t)=>{const n=(i,o)=>{if(!i||i===t)return o;const r=o+i.offsetLeft,l=i.offsetParent;return!l||l===i?r:n(l,r)};return n(e,e.offsetWidth/2)},ep=96,tp=(e,t,n)=>{if(t<=0||Math.abs(e)<=0||n<2)return null;const i=2*Math.PI/t,o=new Float64Array(n+1),r=new Float64Array(n+1),l=e*t,c=u=>Math.sqrt(1+(l*Math.cos(t*u))**2),d=i/n;return Array.from({length:n},(u,p)=>{const y=p*d,x=y+d;o[p+1]=x,r[p+1]=r[p]+(c(y)+c(x))*.5*d}),{wavelength:i,periodArc:r[n],x:o,s:r}},by=(e,t)=>{const n=tp(e,t,ep);return!n||n.wavelength<=0?1:n.periodArc/n.wavelength},Sy=(e,t)=>{if(e.periodArc<=0)return t;const n=t<0?-1:1,i=Math.abs(t),o=Math.floor(i/e.periodArc),r=i-o*e.periodArc,{s:l,x:c}=e,d=(m,f)=>{if(f-m<=1)return[m,f];const S=m+f>>1;return l[S]<=r?d(S,f):d(m,S)},[u,p]=d(0,l.length-1),y=l[p]-l[u],x=y>0?(r-l[u])/y:0;return n*(o*e.wavelength+c[u]+(c[p]-c[u])*x)},wy=(e,t,n,i,o=0)=>{const r=Math.max(0,n),l=e>0?2*Math.PI*r/e:0,c=f=>i+t*Math.sin(l*f),d=f=>t*l*Math.cos(l*f),u=-o,y=e+o-u,x=Math.max(4,Math.ceil(r*4*(y/Math.max(e,1)))),m=Array.from({length:x},(f,S)=>{const w=u+S/x*y,N=u+(S+1)/x*y,v=N-w,M=c(w),E=c(N),U=w+v/3,X=M+d(w)*v/3,D=N-v/3,_=E-d(N)*v/3;return`C${U.toFixed(2)} ${X.toFixed(2)} ${D.toFixed(2)} ${_.toFixed(2)} ${N.toFixed(2)} ${E.toFixed(2)}`});return[`M${u.toFixed(2)} ${c(u).toFixed(2)}`,...m].join(" ")},$y=({item:e,prefix:t,textCss:n,capHeightPx:i,opticalOffsetY:o,imageGapPx:r,isCurve:l})=>{var m;const c=o!==0?{...n,transform:`translateY(${o}px)`}:n,d=i>0?{height:`${i}px`}:{fontSize:n.fontSize,height:`${pa}em`},u=((m=e.image)==null?void 0:m.assetId)&&a.jsx("img",{src:e.image.assetId,alt:e.image.name??"",className:`${t}-item-image`,style:d}),p=u&&(l?a.jsx("span",{className:`${t}-item-image-wrap`,"data-marquee-wave-node":!0,children:u}):u),y=l?a.jsx("span",{className:`${t}-text`,style:c,children:Array.from(e.text).map((f,S)=>a.jsx("span",{className:`${t}-glyph`,"data-marquee-wave-node":!0,children:a.jsx("span",{className:`${t}-glyph-inner`,children:f===" "?" ":f})},S))}):a.jsx("span",{className:`${t}-text`,style:c,children:e.text}),x=a.jsxs(a.Fragment,{children:[p,y]});return a.jsx("div",{className:`${t}-item`,"data-marquee-text-item":!0,style:{gap:r},children:a.jsx(b.LinkWrapper,{link:e.link,className:`${t}-item-link`,style:{gap:r},children:x})})},Cy=({settings:e,content:t,isEditor:n,isPreviewMode:i})=>{const{prefix:o}=b.useScopedStyles(),[r,l]=s.useState(0),c=r>0?Math.round(r):0,{speed:d,direction:u,pauseOnHover:p,gap:y,layoutType:x,curveAmplitude:m,curveFrequency:f,textFontFamily:S,textFontSettings:w,textFontSize:N,textLetterSpacing:v,textWordSpacing:M,textTextAppearance:E,textColor:U,backgroundColor:X,ribbonWidth:D}=e,_=D??N,W=x==="curve",T=py(m),C=my(f),q=s.useMemo(()=>ay(o,c,W),[o,c,W]),R=s.useMemo(()=>nn({fontSettings:{fontFamily:S,fontWeight:w.fontWeight,fontStyle:w.fontStyle},letterSpacing:v,wordSpacing:M,fontSize:N,lineHeight:N,textAppearance:E,color:U},n),[S,w,v,M,N,E,U,n]),$=_e=>b.scalingValue(_e,n??!1),I=((t==null?void 0:t.length)??0)>0,j=n?!!i:!0,F=I&&(j||!!n),K=Math.max(0,d)*sy,P=j&&p==="on",[h,J]=s.useState(!1),V=j?P&&h?"paused":"running":"paused",he=V==="running"&&K>0&&c>0,k=c>0&&K>0?c/K*1e3:0,ce=s.useRef(null),L=s.useRef(null),me=s.useRef(null),te=s.useRef(null),ve=s.useRef(null),Le=s.useRef(null),de=s.useRef(he),ue=s.useRef(null),Z=s.useRef(null),le=s.useRef(T),oe=s.useRef(C);de.current=he,le.current=T,oe.current=C;const[ge,Se]=s.useState(0),[Re,Ne]=s.useState(0),[Te,Ce]=s.useState(0),[g,Y]=s.useState(0),[ee,ae]=s.useState(0),ye=s.useMemo(()=>(t??[]).map(_e=>{var We,vt;return`${_e.text}\0${((We=_e.image)==null?void 0:We.assetId)??""}\0${((vt=_e.link)==null?void 0:vt.value)??""}`}).join("\0"),[t]),[ne,B]=s.useState(is),G=s.useMemo(()=>{const _e=t??[];return _e.length===0||!(j||n)?_e:hy(_e,ne)},[t,j,ne,n]),z=F?$c:1;s.useLayoutEffect(()=>{B(is),l(0)},[ye]),s.useLayoutEffect(()=>{var Ke;const _e=Le.current;if(!_e)return;const We=()=>{const pe=getComputedStyle(_e),De=parseFloat(pe.fontSize)||0;if(De<=0)return;const qe=fy();if(!qe){Se(De*pa),Ne(0);return}qe.font=`${pe.fontStyle} ${pe.fontWeight} ${De}px ${pe.fontFamily}`;const bt=qe.measureText("H"),yt=bt.actualBoundingBoxAscent>0?bt.actualBoundingBoxAscent:De*pa,Rt=Math.max(0,bt.actualBoundingBoxDescent||0),ct=bt.fontBoundingBoxAscent||0,wt=bt.fontBoundingBoxDescent||0;Se(Nt=>Math.abs(Nt-yt)>.5?yt:Nt);const nt=ct>0||wt>0?(wt-Rt-(ct-yt))/2:0;Ne(Nt=>Math.abs(Nt-nt)>.25?nt:Nt)};We();const vt=typeof document<"u"?document.fonts:void 0;(Ke=vt==null?void 0:vt.ready)==null||Ke.then(We).catch(()=>{});const Ve=new ResizeObserver(We);return Ve.observe(_e),()=>Ve.disconnect()},[R.fontFamily,R.fontWeight,R.fontStyle,R.fontSize,R.lineHeight]),s.useLayoutEffect(()=>{if(!F)return;const _e=ce.current,We=te.current;if(!_e||!We)return;const vt={id:0},Ve=()=>{const qe=_e.offsetWidth||_e.getBoundingClientRect().width,bt=We.offsetWidth||We.getBoundingClientRect().width;if(I&&qe>0&&bt>0){const yt=bt/ne;if(yt>0){let Rt=qe,ct=ly;if(W){const nt=qe*le.current,Nt=oe.current,jt=Nt>0?2*Math.PI*Nt/qe:0,$e=by(nt,jt);Rt=Math.max(qe,$e*qe/($c-1)),ct=cy}const wt=Math.min(ct,Math.max(is,Math.ceil(Rt/yt)+1));if(wt!==ne){B(wt);return}}}bt>0&&l(bt)},Ke=()=>{cancelAnimationFrame(vt.id),vt.id=requestAnimationFrame(Ve)};Ke();const pe=new ResizeObserver(Ke);pe.observe(_e),pe.observe(We);const De=()=>{document.hidden||Ke()};return document.addEventListener("visibilitychange",De),window.addEventListener("pageshow",De),window.addEventListener("focus",De),()=>{cancelAnimationFrame(vt.id),pe.disconnect(),document.removeEventListener("visibilitychange",De),window.removeEventListener("pageshow",De),window.removeEventListener("focus",De)}},[F,ye,ne,I,ge,W,T,C]),s.useLayoutEffect(()=>{const _e=ve.current;if(!_e)return;const We={id:0},vt=()=>{const Ke=_e.offsetHeight;Ke>0&&ae(pe=>Math.abs(pe-Ke)>.5?Ke:pe)};We.id=requestAnimationFrame(vt);const Ve=new ResizeObserver(()=>{cancelAnimationFrame(We.id),We.id=requestAnimationFrame(vt)});return Ve.observe(_e),()=>{cancelAnimationFrame(We.id),Ve.disconnect()}},[_,n]),s.useLayoutEffect(()=>{if(!W){Ce(0),Y(0);return}const _e=ce.current,We=te.current;if(!_e||!We)return;const vt={id:0},Ve=()=>{const pe=_e.offsetWidth,De=We.offsetHeight;pe>0&&Y(qe=>Math.abs(qe-pe)>.5?pe:qe),De>0&&Ce(qe=>Math.abs(qe-De)>.5?De:qe)};vt.id=requestAnimationFrame(Ve);const Ke=new ResizeObserver(()=>{cancelAnimationFrame(vt.id),vt.id=requestAnimationFrame(Ve)});return Ke.observe(_e),Ke.observe(We),()=>{cancelAnimationFrame(vt.id),Ke.disconnect()}},[W,ye,ge,N,F]),s.useLayoutEffect(()=>{if(!F||c<=0)return;const _e=me.current;_e&&gy(_e)},[F,c,u,K]),s.useLayoutEffect(()=>{if(!W||!I)return;const _e=ce.current;if(!_e)return;const We={raf:0,cancelled:!1,lut:null,lutKey:"",itemsCache:[],cacheDirty:!0},vt=()=>{for(const yt of We.itemsCache)for(const Rt of yt.glyphs)Cc(Rt.inner)},Ve=()=>{const yt=L.current??_e;We.itemsCache=Array.from(_e.querySelectorAll("[data-marquee-text-item]"),Rt=>{const ct=[];return Rt.querySelectorAll("[data-marquee-wave-node]").forEach(wt=>{const nt=wt.firstElementChild;nt&&ct.push({inner:nt,layoutLocalX:xy(wt,yt)})}),{item:Rt,glyphs:ct}}),We.cacheDirty=!1},Ke=()=>{We.cacheDirty&&Ve();const Rt=(L.current??_e).offsetWidth||1,ct=Rt*le.current,wt=oe.current,nt=2*Math.PI*wt/Rt,Nt=`${Rt}|${ct}|${nt}`;if(Nt!==We.lutKey&&(We.lutKey=Nt,We.lut=tp(ct,nt,ep)),Math.abs(ct)<=0||nt<=0){vt();return}const jt=me.current,$e=jt?vy(getComputedStyle(jt).transform):0,Ge=_e.getBoundingClientRect(),ht=Ge.left,Lt=Ge.right,$t=We.lut&&We.lut.wavelength>0?Math.max(0,(We.lut.periodArc/We.lut.wavelength-1)*Rt):0;for(const{item:mt,glyphs:_t}of We.itemsCache){const Ot=mt.getBoundingClientRect();if(Ot.right<ht||Ot.left>Lt+$t){for(const zt of _t)Cc(zt.inner);continue}for(const zt of _t){const Ee=zt.layoutLocalX+$e,dt=We.lut?Sy(We.lut,Ee):Ee,ut=nt*dt,kt=ct*Math.sin(ut),Qe=ct*nt*Math.cos(ut),at=Math.atan(Qe)*(180/Math.PI);yy(zt.inner,dt-Ee,kt,at)}}},pe=()=>{We.cancelled||(We.raf=0,Ke(),de.current&&!document.hidden&&(We.raf=requestAnimationFrame(pe)))},De=()=>{We.cancelled||We.raf||(We.raf=requestAnimationFrame(pe))},qe=()=>{We.cacheDirty=!0,Ke(),De()};ue.current=De,Z.current=qe,Ke(),De();const bt=()=>{if(document.hidden){cancelAnimationFrame(We.raf),We.raf=0;return}cancelAnimationFrame(We.raf),We.raf=0,qe()};return document.addEventListener("visibilitychange",bt),window.addEventListener("pageshow",bt),window.addEventListener("focus",bt),()=>{We.cancelled=!0,ue.current=null,Z.current=null,cancelAnimationFrame(We.raf),document.removeEventListener("visibilitychange",bt),window.removeEventListener("pageshow",bt),window.removeEventListener("focus",bt),vt()}},[W,I]),s.useLayoutEffect(()=>{var _e;!W||!I||(_e=Z.current)==null||_e.call(Z)},[W,I,r,ye,ne,ge,T,C,g]),s.useLayoutEffect(()=>{var _e;(_e=ue.current)==null||_e.call(ue)},[he,u]);const ie=_e=>{P&&_e.pointerType==="mouse"&&J(!0)},H=()=>{P&&J(!1)},be=W?Math.abs(T)*100:0,re=$(_),Q={minHeight:re,...W?{paddingTop:`${be}%`,paddingBottom:`${be}%`}:{}},Pe={height:re,...W?{visibility:"hidden"}:{backgroundColor:X}},Ae={gap:$(y),minHeight:re},He=g*T,Xe=Math.abs(He),Ue=ee>0?ee:Te,Je=Math.max(Te,Ue),je=Xe+Je/2,xe=Math.max(Ue,1),Ie=W&&g>0&&Je>0?wy(g,He,C,je,xe):"",ze=Xe*2+Je,Ze=Ie?a.jsx("svg",{className:`${o}-curve-bg`,viewBox:`0 0 ${g} ${ze}`,preserveAspectRatio:"none","aria-hidden":!0,children:a.jsx("path",{d:Ie,fill:"none",stroke:X,strokeWidth:Ue,strokeLinecap:"butt",strokeLinejoin:"round"})}):null,tt=a.jsx("div",{ref:ve,className:`${o}-ribbon`,style:Pe,"aria-hidden":!0}),ot={...R,lineHeight:ge>0?`${ge}px`:`${pa}em`},lt=(_e,We,vt)=>a.jsx($y,{item:_e,prefix:o,textCss:ot,capHeightPx:ge,opticalOffsetY:Re,imageGapPx:$(y),isCurve:W},`${We}-${vt}`),it=a.jsx("span",{ref:Le,"aria-hidden":!0,className:`${o}-cap-ref`,style:R,children:"H"}),xt=`${Math.max(0,k)/1e3}s`,rt=F?a.jsx("div",{ref:me,className:`${o}-marquee-track`,"data-direction":u,onPointerEnter:ie,onPointerLeave:H,style:{WebkitAnimationDuration:xt,animationDuration:xt,WebkitAnimationPlayState:V,animationPlayState:V},children:Array.from({length:z},(_e,We)=>a.jsx("div",{ref:We===0?te:void 0,className:`${o}-marquee-set`,style:{...Ae,paddingRight:$(y)},"aria-hidden":We>0,children:G.map((vt,Ve)=>lt(vt,We,Ve))},`set-${We}`))}):a.jsx("div",{ref:te,className:Et(`${o}-marquee-set`,`${o}-marquee-static`),style:Ae,children:t==null?void 0:t.map((_e,We)=>lt(_e,0,We))});return a.jsxs("div",{ref:ce,className:`${o}-wrapper`,"aria-label":"Marquee text",children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:q}}),it,a.jsxs("div",{ref:L,className:`${o}-marquee-wrapper`,style:Q,children:[tt,Ze,rt]})]})},Ty=`import { useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type PointerEvent as ReactPointerEvent } from 'react';
2657
2657
  import cn from 'classnames';
2658
2658
  import { CommonComponentProps } from '../props';
2659
2659
  import { LinkWrapper, scalingValue, useScopedStyles, type ContentLink } from '../utils/index';
@@ -3585,7 +3585,7 @@ type MarqueeTextProps = {
3585
3585
  isPreviewMode?: boolean;
3586
3586
  isEditMode?: boolean;
3587
3587
  } & CommonComponentProps;
3588
- `,Ty={fontSettings:{type:"object",scope:"common",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Iy={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,display:{type:"numeric-input"}},ribbonWidth:{type:"number",scope:"layout",title:"Ribbon Width",min:0,display:{type:"numeric-input"}},layoutType:{type:"string",scope:"common",title:"Path Type",display:{type:"toggle-cycle",enum:["straight","curve"]}},curveAmplitude:{type:"number",scope:"layout",title:"Amplitude",min:-30,max:30,step:1,display:{type:"common-numeric-input",visible:!1}},curveFrequency:{type:"number",scope:"layout",title:"Frequency",min:0,max:100,step:1,display:{type:"common-numeric-input",visible:!1}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Ty.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},textLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Color"},backgroundColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Ribbon Color"}},defaults:{direction:"left",pauseOnHover:"off",layoutType:"curve",textFontFamily:"Antique Série",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#FFFFFF",backgroundColor:"#2E12F0"},layoutDefaults:{m:{speed:.55,gap:.04,ribbonWidth:.08,curveAmplitude:6,curveFrequency:15,textFontSize:.08},t:{speed:1.3,gap:.02,ribbonWidth:.11,curveAmplitude:5,curveFrequency:15,textFontSize:.07},d:{speed:2.5,gap:.02,ribbonWidth:.11,curveAmplitude:5,curveFrequency:18,textFontSize:.071}},displayRules:[{if:{name:"layoutType",value:"curve"},then:{name:"properties.curveAmplitude.display.visible",value:!0}},{if:{name:"layoutType",value:"curve"},then:{name:"properties.curveFrequency.display.visible",value:!0}}],layout:["__componentName__","speed","direction","pauseOnHover","gap","ribbonWidth","layoutType","curveAmplitude","curveFrequency"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction","speed"]},{type:"row",items:["ribbonWidth","gap"]},{type:"row",items:["pauseOnHover","layoutType"]},{type:"row",items:["curveAmplitude","curveFrequency"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}],paletteBookmark:{items:["textColor","backgroundColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{allowsCollection:!0,addItemFromFileExplorer:!1},items:{type:"object",properties:{text:{placeholder:"Add text...",label:"Text",contentKey:"title",display:{type:"text-input"}},image:{type:"object",label:"Image",contentKey:"gallery",display:{type:"media-input"}},link:{type:"object",label:"Link",contentKey:"link",display:{type:"link-input"}}}},default:[{text:"NEW WORK",image:{assetId:"01M3QM74XF10Z2N5P1Y0J0XDQQ",name:""},link:{type:"url",value:"",target:"self"}}]}},Ly={element:$y,id:"marquee-text",name:"Marquee Text",category:"typography",version:1,defaultSize:{d:{width:"100%"},t:{width:"100%"},m:{width:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Text_Marquee.mp4"},schema:Iy,sourceCode:Cy,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}};function My(e,t){const n=t>0?`${t}px`:"0px";return`
3588
+ `,Iy={fontSettings:{type:"object",scope:"common",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Ly={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,display:{type:"numeric-input"}},ribbonWidth:{type:"number",scope:"layout",title:"Ribbon Width",min:0,display:{type:"numeric-input"}},layoutType:{type:"string",scope:"common",title:"Path Type",display:{type:"toggle-cycle",enum:["straight","curve"]}},curveAmplitude:{type:"number",scope:"layout",title:"Amplitude",min:-30,max:30,step:1,display:{type:"common-numeric-input",visible:!1}},curveFrequency:{type:"number",scope:"layout",title:"Frequency",min:0,max:100,step:1,display:{type:"common-numeric-input",visible:!1}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Iy.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},textLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Color"},backgroundColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Ribbon Color"}},defaults:{direction:"left",pauseOnHover:"off",layoutType:"curve",textFontFamily:"Antique Série",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#FFFFFF",backgroundColor:"#2E12F0"},layoutDefaults:{m:{speed:.55,gap:.04,ribbonWidth:.08,curveAmplitude:6,curveFrequency:15,textFontSize:.08},t:{speed:1.3,gap:.02,ribbonWidth:.11,curveAmplitude:5,curveFrequency:15,textFontSize:.07},d:{speed:2.5,gap:.02,ribbonWidth:.11,curveAmplitude:5,curveFrequency:18,textFontSize:.071}},displayRules:[{if:{name:"layoutType",value:"curve"},then:{name:"properties.curveAmplitude.display.visible",value:!0}},{if:{name:"layoutType",value:"curve"},then:{name:"properties.curveFrequency.display.visible",value:!0}}],layout:["__componentName__","speed","direction","pauseOnHover","gap","ribbonWidth","layoutType","curveAmplitude","curveFrequency"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction","speed"]},{type:"row",items:["ribbonWidth","gap"]},{type:"row",items:["pauseOnHover","layoutType"]},{type:"row",items:["curveAmplitude","curveFrequency"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}],paletteBookmark:{items:["textColor","backgroundColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{allowsCollection:!0,addItemFromFileExplorer:!1},items:{type:"object",properties:{text:{placeholder:"Add text...",label:"Text",contentKey:"title",display:{type:"text-input"}},image:{type:"object",label:"Image",contentKey:"gallery",display:{type:"media-input"}},link:{type:"object",label:"Link",contentKey:"link",display:{type:"link-input"}}}},default:[{text:"NEW WORK",image:{assetId:"01M3QM74XF10Z2N5P1Y0J0XDQQ",name:""},link:{type:"url",value:"",target:"self"}}]}},My={element:Cy,id:"marquee-text",name:"Marquee Text",category:"typography",version:1,defaultSize:{d:{width:"100%"},t:{width:"100%"},m:{width:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Text_Marquee.mp4"},schema:Ly,sourceCode:Ty,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}};function Py(e,t){const n=t>0?`${t}px`:"0px";return`
3589
3589
  .${e}-marquee-wrapper {
3590
3590
  overflow: hidden;
3591
3591
  width: 100%;
@@ -3674,7 +3674,7 @@ type MarqueeTextProps = {
3674
3674
  pointer-events: auto;
3675
3675
  z-index: 10;
3676
3676
  }
3677
- `}const Py=30,Cc=2,Ry=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")},Ey=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=b.useScopedStyles(),{align:l,speed:c,direction:d,pauseOnHover:u,gap:p,cardWidth:y,corners:x,stroke:m,strokeColor:f,bgColor:S,padding:w,logoMarginTop:N,logoWidth:v,logoHeight:M,captionMarginTop:R}=e,U=!!o,X=((t==null?void 0:t.length)??0)>0,D=c>0&&(!n||i),_=X&&(D||n),W=Math.max(0,c)*Py,T=B=>b.scalingValue(B,n??!1),C=s.useRef(null),q=s.useRef(null),E=s.useRef(null),[$,I]=s.useState(0),[j,F]=s.useState(0),K=j>0?j:0,P=s.useMemo(()=>My(r,K),[r,K]),[h,J]=s.useState(0),V=D&&u==="on",[he,k]=s.useState(!1),ce=s.useRef(null),[L,me]=s.useState(0),[te,ve]=s.useState(0),Le=s.useRef(null),de=B=>{var z,ie,H,be,re;return{fontSettings:{fontFamily:(e==null?void 0:e[`${B}FontFamily`])??"Arial",fontWeight:((z=e==null?void 0:e[`${B}FontSettings`])==null?void 0:z.fontWeight)??400,fontStyle:((ie=e==null?void 0:e[`${B}FontSettings`])==null?void 0:ie.fontStyle)??"normal"},textAppearance:{textTransform:((H=e==null?void 0:e[`${B}TextAppearance`])==null?void 0:H.textTransform)??"none",textDecoration:((be=e==null?void 0:e[`${B}TextAppearance`])==null?void 0:be.textDecoration)??"none",fontVariant:((re=e==null?void 0:e[`${B}TextAppearance`])==null?void 0:re.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${B}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${B}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${B}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${B}LineHeight`])??.01,color:(e==null?void 0:e[`${B}Color`])??"#000000"}},ue=de("text"),Z=de("caption"),le=s.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(B=>{var G,z;return(((G=B.text)==null?void 0:G.length)??0)>0||(((z=B.caption)==null?void 0:z.length)??0)>0}),[t]),oe=s.useMemo(()=>!_||(t==null?void 0:t.length)===0?1:j<=0||$<=0?Cc:Math.max(Cc,Math.ceil($/j)+1),[_,t==null?void 0:t.length,j,$]);s.useLayoutEffect(()=>{if(!_)return;const B=C.current,G=E.current;if(!B||!G)return;let z=0;const ie=()=>{const re=B.getBoundingClientRect().width,Q=G.getBoundingClientRect().width,Pe=Le.current,Ae=typeof Pe=="number"&&Math.abs(Pe-Q)<=.25;if(Le.current=Q,I(re),typeof Q=="number"&&Q>0&&j<=0){F(Q);return}Ae&&Q!==j?F(Q):!Ae&&j<=0&&(cancelAnimationFrame(z),z=requestAnimationFrame(ie))},H=()=>{cancelAnimationFrame(z),z=requestAnimationFrame(ie)};H();const be=new ResizeObserver(H);return be.observe(B),be.observe(G),()=>{cancelAnimationFrame(z),be.disconnect()}},[D,_,j]);const ge=K>0&&W>0?K/W*1e3:0,Se=`${Math.max(0,ge)/1e3}s`;s.useLayoutEffect(()=>{if(!_||K<=0)return;const B=q.current;B&&Ry(B)},[_,K,d]),s.useLayoutEffect(()=>{if(!_){J(0);return}const B=E.current,G=q.current;if(!B||!G)return;const z=()=>{let H=0;for(let be=0;be<B.children.length;be++){const Q=B.children[be].firstElementChild;Q&&(H=Math.max(H,Q.offsetHeight))}H<=0&&(H=G.offsetHeight),J(H>0?H:0)};z();const ie=new ResizeObserver(z);return ie.observe(B),ie.observe(G),()=>{ie.disconnect()}},[_,oe,t,n,p,y,w,m,x,v,M,L,te]);const Ee=()=>{V&&k(!0)},Ne=()=>{V&&k(!1)},Te=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),Ce=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]),g=s.useCallback((B,G,z,ie)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:Te,width:"100%"},children:[a.jsx("div",{"data-controls":U?ie==null?void 0:ie.controlsName:void 0,"data-controls-axis":U?"y":void 0,className:U?`${r}-control`:void 0,style:{height:T((ie==null?void 0:ie.marginTop)??0)}}),a.jsx("div",{...ie!=null&&ie.dataMeasureKind?{"data-testimonial-measure":ie.dataMeasureKind}:{},style:{...nn(B,n),textAlign:Ce,pointerEvents:"auto",...typeof(ie==null?void 0:ie.minHeightPx)=="number"&&ie.minHeightPx>0?{minHeight:ie.minHeightPx}:{}},children:a.jsx(Zi,{content:G})})]},z),[Te,Ce,n,U,r,T]),Y=s.useCallback((B,G,z)=>{var ie,H,be;return a.jsxs("div",{style:{padding:`${T(w.top)} ${T(w.right)} ${T(w.bottom)} ${T(w.left)}`,width:T(y+m*2),height:"100%",borderRadius:T(x),border:`${T(m)} solid ${f}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${r}-cover`,style:{background:S}}),a.jsxs("div",{className:`${r}-elements-overlay`,style:{alignItems:Te,textAlign:Ce},children:[B.text&&g(ue,B.text,"text",z!=null&&z.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(z==null?void 0:z.textMinHeightPx)=="number"&&z.textMinHeightPx>0?{minHeightPx:z.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:Te,width:"100%"},children:[a.jsx("div",{"data-controls":U&&!(z!=null&&z.dataMeasureAttrs)?"logoMarginTop":void 0,className:U&&!(z!=null&&z.dataMeasureAttrs)?`${r}-control`:void 0,style:{height:T(N)}}),a.jsx("div",{style:{width:T(v),height:T(M)},children:((ie=B.logo)==null?void 0:ie.assetId)&&a.jsx("img",{src:B.logo.assetId,alt:((H=B.logo)==null?void 0:H.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((be=B.logo)==null?void 0:be.objectFit)||"contain"}})})]}),B.caption&&g(Z,B.caption,"caption",{...z!=null&&z.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:R,...z!=null&&z.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(z==null?void 0:z.captionMinHeightPx)=="number"&&z.captionMinHeightPx>0?{minHeightPx:z.captionMinHeightPx}:{}})]})]},G)},[S,R,Z,y,x,M,N,v,Te,Ce,w.bottom,w.left,w.right,w.top,g,m,f,ue,n,U,r]),ee=s.useCallback(B=>{me(B.maxTextPx),ve(B.maxCaptionPx)},[]);s.useLayoutEffect(()=>{if(!le){ee({maxTextPx:0,maxCaptionPx:0});return}const B=ce.current;if(!B)return;const G=()=>{b.readTestimonialTextMeasure(B,ee)};G();const z=new ResizeObserver(G);return z.observe(B),()=>{z.disconnect()}},[le,ee,t,Y]);const ae=le?{textMinHeightPx:L,captionMinHeightPx:te}:void 0,ye=le?a.jsx("div",{ref:ce,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((B,G)=>Y(B,`measure-${G}`,{dataMeasureAttrs:!0}))}):null,ne=(B,G)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Y(B,`card-${G}`,ae),U&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${T(p)})`,width:T(p),height:"100%",pointerEvents:"auto",zIndex:2}})]},G);if(_){const B=D?V&&he?"paused":"running":"paused";return a.jsxs("div",{ref:C,className:Rt(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...h>0?{height:h}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:P}}),ye,a.jsx("div",{ref:q,className:`${r}-marquee-track`,"data-direction":d,onMouseEnter:Ee,onMouseLeave:Ne,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:Se,WebkitAnimationDuration:Se,animationPlayState:B,WebkitAnimationPlayState:B},children:Array.from({length:oe},(G,z)=>a.jsx("div",{ref:z===0?E:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:T(p),paddingRight:T(p)},"aria-hidden":z>0,children:t==null?void 0:t.map((ie,H)=>ne(ie,`${z}-${H}`))},`set-${z}`))})]})}return a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:P}}),ye,a.jsx("div",{style:{gap:T(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((B,G)=>ne(B,G))})]})},ky=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
3677
+ `}const Ey=30,Tc=2,Ry=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")},ky=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=b.useScopedStyles(),{align:l,speed:c,direction:d,pauseOnHover:u,gap:p,cardWidth:y,corners:x,stroke:m,strokeColor:f,bgColor:S,padding:w,logoMarginTop:N,logoWidth:v,logoHeight:M,captionMarginTop:E}=e,U=!!o,X=((t==null?void 0:t.length)??0)>0,D=c>0&&(!n||i),_=X&&(D||n),W=Math.max(0,c)*Ey,T=B=>b.scalingValue(B,n??!1),C=s.useRef(null),q=s.useRef(null),R=s.useRef(null),[$,I]=s.useState(0),[j,F]=s.useState(0),K=j>0?j:0,P=s.useMemo(()=>Py(r,K),[r,K]),[h,J]=s.useState(0),V=D&&u==="on",[he,k]=s.useState(!1),ce=s.useRef(null),[L,me]=s.useState(0),[te,ve]=s.useState(0),Le=s.useRef(null),de=B=>{var z,ie,H,be,re;return{fontSettings:{fontFamily:(e==null?void 0:e[`${B}FontFamily`])??"Arial",fontWeight:((z=e==null?void 0:e[`${B}FontSettings`])==null?void 0:z.fontWeight)??400,fontStyle:((ie=e==null?void 0:e[`${B}FontSettings`])==null?void 0:ie.fontStyle)??"normal"},textAppearance:{textTransform:((H=e==null?void 0:e[`${B}TextAppearance`])==null?void 0:H.textTransform)??"none",textDecoration:((be=e==null?void 0:e[`${B}TextAppearance`])==null?void 0:be.textDecoration)??"none",fontVariant:((re=e==null?void 0:e[`${B}TextAppearance`])==null?void 0:re.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${B}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${B}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${B}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${B}LineHeight`])??.01,color:(e==null?void 0:e[`${B}Color`])??"#000000"}},ue=de("text"),Z=de("caption"),le=s.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(B=>{var G,z;return(((G=B.text)==null?void 0:G.length)??0)>0||(((z=B.caption)==null?void 0:z.length)??0)>0}),[t]),oe=s.useMemo(()=>!_||(t==null?void 0:t.length)===0?1:j<=0||$<=0?Tc:Math.max(Tc,Math.ceil($/j)+1),[_,t==null?void 0:t.length,j,$]);s.useLayoutEffect(()=>{if(!_)return;const B=C.current,G=R.current;if(!B||!G)return;let z=0;const ie=()=>{const re=B.getBoundingClientRect().width,Q=G.getBoundingClientRect().width,Pe=Le.current,Ae=typeof Pe=="number"&&Math.abs(Pe-Q)<=.25;if(Le.current=Q,I(re),typeof Q=="number"&&Q>0&&j<=0){F(Q);return}Ae&&Q!==j?F(Q):!Ae&&j<=0&&(cancelAnimationFrame(z),z=requestAnimationFrame(ie))},H=()=>{cancelAnimationFrame(z),z=requestAnimationFrame(ie)};H();const be=new ResizeObserver(H);return be.observe(B),be.observe(G),()=>{cancelAnimationFrame(z),be.disconnect()}},[D,_,j]);const ge=K>0&&W>0?K/W*1e3:0,Se=`${Math.max(0,ge)/1e3}s`;s.useLayoutEffect(()=>{if(!_||K<=0)return;const B=q.current;B&&Ry(B)},[_,K,d]),s.useLayoutEffect(()=>{if(!_){J(0);return}const B=R.current,G=q.current;if(!B||!G)return;const z=()=>{let H=0;for(let be=0;be<B.children.length;be++){const Q=B.children[be].firstElementChild;Q&&(H=Math.max(H,Q.offsetHeight))}H<=0&&(H=G.offsetHeight),J(H>0?H:0)};z();const ie=new ResizeObserver(z);return ie.observe(B),ie.observe(G),()=>{ie.disconnect()}},[_,oe,t,n,p,y,w,m,x,v,M,L,te]);const Re=()=>{V&&k(!0)},Ne=()=>{V&&k(!1)},Te=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),Ce=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]),g=s.useCallback((B,G,z,ie)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:Te,width:"100%"},children:[a.jsx("div",{"data-controls":U?ie==null?void 0:ie.controlsName:void 0,"data-controls-axis":U?"y":void 0,className:U?`${r}-control`:void 0,style:{height:T((ie==null?void 0:ie.marginTop)??0)}}),a.jsx("div",{...ie!=null&&ie.dataMeasureKind?{"data-testimonial-measure":ie.dataMeasureKind}:{},style:{...nn(B,n),textAlign:Ce,pointerEvents:"auto",...typeof(ie==null?void 0:ie.minHeightPx)=="number"&&ie.minHeightPx>0?{minHeight:ie.minHeightPx}:{}},children:a.jsx(Zi,{content:G})})]},z),[Te,Ce,n,U,r,T]),Y=s.useCallback((B,G,z)=>{var ie,H,be;return a.jsxs("div",{style:{padding:`${T(w.top)} ${T(w.right)} ${T(w.bottom)} ${T(w.left)}`,width:T(y+m*2),height:"100%",borderRadius:T(x),border:`${T(m)} solid ${f}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${r}-cover`,style:{background:S}}),a.jsxs("div",{className:`${r}-elements-overlay`,style:{alignItems:Te,textAlign:Ce},children:[B.text&&g(ue,B.text,"text",z!=null&&z.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(z==null?void 0:z.textMinHeightPx)=="number"&&z.textMinHeightPx>0?{minHeightPx:z.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:Te,width:"100%"},children:[a.jsx("div",{"data-controls":U&&!(z!=null&&z.dataMeasureAttrs)?"logoMarginTop":void 0,className:U&&!(z!=null&&z.dataMeasureAttrs)?`${r}-control`:void 0,style:{height:T(N)}}),a.jsx("div",{style:{width:T(v),height:T(M)},children:((ie=B.logo)==null?void 0:ie.assetId)&&a.jsx("img",{src:B.logo.assetId,alt:((H=B.logo)==null?void 0:H.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((be=B.logo)==null?void 0:be.objectFit)||"contain"}})})]}),B.caption&&g(Z,B.caption,"caption",{...z!=null&&z.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:E,...z!=null&&z.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(z==null?void 0:z.captionMinHeightPx)=="number"&&z.captionMinHeightPx>0?{minHeightPx:z.captionMinHeightPx}:{}})]})]},G)},[S,E,Z,y,x,M,N,v,Te,Ce,w.bottom,w.left,w.right,w.top,g,m,f,ue,n,U,r]),ee=s.useCallback(B=>{me(B.maxTextPx),ve(B.maxCaptionPx)},[]);s.useLayoutEffect(()=>{if(!le){ee({maxTextPx:0,maxCaptionPx:0});return}const B=ce.current;if(!B)return;const G=()=>{b.readTestimonialTextMeasure(B,ee)};G();const z=new ResizeObserver(G);return z.observe(B),()=>{z.disconnect()}},[le,ee,t,Y]);const ae=le?{textMinHeightPx:L,captionMinHeightPx:te}:void 0,ye=le?a.jsx("div",{ref:ce,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((B,G)=>Y(B,`measure-${G}`,{dataMeasureAttrs:!0}))}):null,ne=(B,G)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Y(B,`card-${G}`,ae),U&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${T(p)})`,width:T(p),height:"100%",pointerEvents:"auto",zIndex:2}})]},G);if(_){const B=D?V&&he?"paused":"running":"paused";return a.jsxs("div",{ref:C,className:Et(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...h>0?{height:h}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:P}}),ye,a.jsx("div",{ref:q,className:`${r}-marquee-track`,"data-direction":d,onMouseEnter:Re,onMouseLeave:Ne,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:Se,WebkitAnimationDuration:Se,animationPlayState:B,WebkitAnimationPlayState:B},children:Array.from({length:oe},(G,z)=>a.jsx("div",{ref:z===0?R:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:T(p),paddingRight:T(p)},"aria-hidden":z>0,children:t==null?void 0:t.map((ie,H)=>ne(ie,`${z}-${H}`))},`set-${z}`))})]})}return a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:P}}),ye,a.jsx("div",{style:{gap:T(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((B,G)=>ne(B,G))})]})},Ay=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
3678
3678
  import cn from 'classnames';
3679
3679
  import { CommonComponentProps } from '../props';
3680
3680
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -4305,7 +4305,7 @@ type TestimonialsSettings = {
4305
4305
  logoHeight: number;
4306
4306
  captionMarginTop: number;
4307
4307
  };
4308
- `,Tc={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Ay={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"numeric-input"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"numeric-input"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"numeric-input"}},strokeColor:{type:"string",scope:"common",title:"Stroke Card",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG card",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:200,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"numeric-input"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"numeric-input"}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Tc.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Tc.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.069,textLineHeight:.093,captionFontSize:.053,captionLineHeight:.069},t:{speed:1.64,gap:.02,cardWidth:.44,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.065,left:.01},logoMarginTop:.1,logoWidth:.052,logoHeight:.052,captionMarginTop:.005,textFontSize:.035,textLineHeight:.04,captionFontSize:.023,captionLineHeight:.029},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["align","direction"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners"]},{type:"group",title:"",items:["stroke","padding"]}]},{type:"row",title:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",assetId:"01M3QM74XFE5YFEHBH605E8FXT",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{logo:{objectFit:"contain",assetId:"01M3QM74XFZD1R3FV8BKW3NT24",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{logo:{objectFit:"contain",assetId:"01M3QM74XGNPA7232QGZAYFNSS",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},Fy={element:Ey,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Grid.mp4"},defaultSize:{d:{width:"100%",height:320}},schema:Ay,sourceCode:ky,assetsPaths:{content:[{path:"logo.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function Ny(e){return`
4308
+ `,Ic={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Fy={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"numeric-input"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"numeric-input"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"numeric-input"}},strokeColor:{type:"string",scope:"common",title:"Stroke Card",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG card",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:200,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"numeric-input"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"numeric-input"}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Ic.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Ic.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.069,textLineHeight:.093,captionFontSize:.053,captionLineHeight:.069},t:{speed:1.64,gap:.02,cardWidth:.44,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.065,left:.01},logoMarginTop:.1,logoWidth:.052,logoHeight:.052,captionMarginTop:.005,textFontSize:.035,textLineHeight:.04,captionFontSize:.023,captionLineHeight:.029},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["align","direction"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners"]},{type:"group",title:"",items:["stroke","padding"]}]},{type:"row",title:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",assetId:"01M3QM74XFE5YFEHBH605E8FXT",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{logo:{objectFit:"contain",assetId:"01M3QM74XFZD1R3FV8BKW3NT24",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{logo:{objectFit:"contain",assetId:"01M3QM74XGNPA7232QGZAYFNSS",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},Ny={element:ky,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Grid.mp4"},defaultSize:{d:{width:"100%",height:320}},schema:Fy,sourceCode:Ay,assetsPaths:{content:[{path:"logo.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function _y(e){return`
4309
4309
  .${e}-container {
4310
4310
  position: relative;
4311
4311
  overflow-x: clip;
@@ -4429,7 +4429,7 @@ type TestimonialsSettings = {
4429
4429
  width: 100%;
4430
4430
  height: 100%;
4431
4431
  }
4432
- `}const _y=3e3,Hy=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=b.useScopedStyles(),l=t||[],{speed:c,align:d,width:u,imageMarginTop:p,textMarginTop:y,captionMarginTop:x,imageWidth:m,imageHeight:f,controlsWidth:S,controlsColor:w,controlsHoverColor:N}=e,v=c>0&&(!n||!!i),[M,R]=s.useState(0),[U,X]=s.useState(null),[D,_]=s.useState(!1),W=s.useRef(null),T=s.useMemo(()=>{switch(d){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[d]),C=s.useMemo(()=>{switch(d){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[d]);s.useEffect(()=>{R(0),X(null),_(!1)},[l.length]);const q=l[M],E=U===null?null:l[U],$=de=>{var Z,le,oe,ge,Se;return{fontSettings:{fontFamily:(e==null?void 0:e[`${de}FontFamily`])??"Arial",fontWeight:((Z=e==null?void 0:e[`${de}FontSettings`])==null?void 0:Z.fontWeight)??400,fontStyle:((le=e==null?void 0:e[`${de}FontSettings`])==null?void 0:le.fontStyle)??"normal"},textAppearance:{textTransform:((oe=e==null?void 0:e[`${de}TextAppearance`])==null?void 0:oe.textTransform)??"none",textDecoration:((ge=e==null?void 0:e[`${de}TextAppearance`])==null?void 0:ge.textDecoration)??"none",fontVariant:((Se=e==null?void 0:e[`${de}TextAppearance`])==null?void 0:Se.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${de}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${de}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${de}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${de}WordSpacing`])??0,color:(e==null?void 0:e[`${de}Color`])??"#000000"}},I=$("text"),j=$("caption"),F=l.length>1&&l.some(de=>{var ue,Z;return(((ue=de.text)==null?void 0:ue.length)??0)>0||(((Z=de.caption)==null?void 0:Z.length)??0)>0}),K=s.useRef(null),[P,h]=s.useState(0),[J,V]=s.useState(0),he=e.controls??{mode:"Off",icon:null},k=l.length>1,ce=s.useCallback((de,ue)=>!k||ue===de?de:(W.current&&window.clearTimeout(W.current),X(de),_(!0),W.current=window.setTimeout(()=>{X(null),_(!1),W.current=null},300),ue),[k]),L=s.useCallback(()=>{k&&R(de=>ce(de,(de-1+l.length)%l.length))},[k,ce,l.length]),me=s.useCallback(()=>{k&&R(de=>ce(de,(de+1)%l.length))},[k,ce,l.length]);s.useEffect(()=>{if(!v||!k)return;const de=Math.max(300,_y/c),ue=window.setInterval(()=>{R(Z=>ce(Z,(Z+1)%l.length))},de);return()=>{window.clearInterval(ue)}},[v,k,ce,l.length,c]),s.useEffect(()=>()=>{W.current&&window.clearTimeout(W.current)},[]);const te=(de,ue)=>{var Se,Ee,Ne,Te;const Z=ue==null?void 0:ue.textMinHeightPx,le=ue==null?void 0:ue.captionMinHeightPx,oe=ue==null?void 0:ue.dataMeasureAttrs,ge=o&&!(ue!=null&&ue.dataMeasureAttrs)&&!(ue!=null&&ue.hideControls);return a.jsxs(a.Fragment,{children:[de.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:T,width:"100%"},children:[a.jsx("div",{"data-controls":ge?"textMarginTop":void 0,className:ge?`${r}-control`:void 0,style:{height:b.scalingValue(y??0,n??!1)}}),a.jsx("div",{...oe&&{"data-testimonial-measure":"text"},style:{...nn(I,n),...Z&&Z>0?{minHeight:Z}:{},textAlign:C,pointerEvents:"auto"},children:a.jsx(Zi,{content:de.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:T,width:"100%"},children:[a.jsx("div",{"data-controls":ge?"imageMarginTop":void 0,className:ge?`${r}-control`:void 0,style:{height:b.scalingValue(p??0,n??!1)}}),a.jsx("div",{style:{width:b.scalingValue(m??0,n??!1),height:b.scalingValue(f??0,n??!1)},children:((Se=de.image)==null?void 0:Se.assetId)&&a.jsx("img",{src:(Ee=de.image)==null?void 0:Ee.assetId,alt:((Ne=de.image)==null?void 0:Ne.name)??"",className:`${r}-icon`,style:{objectFit:((Te=de.image)==null?void 0:Te.objectFit)||"contain"}})})]}),de.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:T,width:"100%"},children:[a.jsx("div",{"data-controls":ge?"captionMarginTop":void 0,className:ge?`${r}-control`:void 0,style:{height:b.scalingValue(x??0,n??!1)}}),a.jsx("div",{...oe?{"data-testimonial-measure":"caption"}:{},style:{...nn(j,n),...le&&le>0?{minHeight:le}:{},textAlign:C,pointerEvents:"auto"},children:a.jsx(Zi,{content:de.caption})})]})]})},ve=s.useCallback(de=>{h(de.maxTextPx),V(de.maxCaptionPx)},[]);if(s.useLayoutEffect(()=>{if(!F){ve({maxTextPx:0,maxCaptionPx:0});return}const de=K.current;if(!de)return;const ue=()=>{b.readTestimonialTextMeasure(de,ve)};ue();const Z=new ResizeObserver(ue);return Z.observe(de),()=>{Z.disconnect()}},[F,ve,t]),!q)return a.jsx(a.Fragment,{});const Le=F?{textMinHeightPx:P,captionMinHeightPx:J}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${r}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Ny(r)}}),a.jsxs("div",{className:`${r}-wrapper`,style:{width:b.scalingValue(u??0,n??!1),alignItems:T},children:[F&&a.jsx("div",{ref:K,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((de,ue)=>a.jsx("div",{style:{width:"100%"},children:te(de,{dataMeasureAttrs:!0})},ue))}),a.jsxs("div",{className:`${r}-fade-stack`,children:[E&&D&&a.jsx("div",{className:Rt(`${r}-fade-item-prev`,`${r}-fade-out`),children:te(E,{...Le,hideControls:!0})}),a.jsx("div",{className:Rt(`${r}-fade-item-current`,D?`${r}-fade-in`:void 0),children:te(q,Le)})]})]}),he.mode==="On"&&a.jsxs("div",{className:`${r}-controls`,children:[a.jsx("div",{className:`${r}-arrow`,style:{width:b.scalingValue(S??.02,n??!1),height:b.scalingValue(S??.02,n??!1),"--arrow-hover-color":N},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:L,disabled:!k,"aria-label":"Previous testimonial",children:he.icon&&a.jsx(mn,{url:he.icon,fill:w,hoverFill:N,className:Rt(`${r}-arrow-img`,`${r}-mirror`)})})}),a.jsx("div",{className:Rt(`${r}-arrow`,`${r}-next-arrow`),style:{width:b.scalingValue(S??.02,n??!1),height:b.scalingValue(S??.02,n??!1),"--arrow-hover-color":N},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:me,disabled:!k,"aria-label":"Next testimonial",children:he.icon&&a.jsx(mn,{url:he.icon,fill:w,hoverFill:N,className:`${r}-arrow-img`})})})]})]})})},Wy=`import cn from 'classnames';
4432
+ `}const Hy=3e3,Wy=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=b.useScopedStyles(),l=t||[],{speed:c,align:d,width:u,imageMarginTop:p,textMarginTop:y,captionMarginTop:x,imageWidth:m,imageHeight:f,controlsWidth:S,controlsColor:w,controlsHoverColor:N}=e,v=c>0&&(!n||!!i),[M,E]=s.useState(0),[U,X]=s.useState(null),[D,_]=s.useState(!1),W=s.useRef(null),T=s.useMemo(()=>{switch(d){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[d]),C=s.useMemo(()=>{switch(d){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[d]);s.useEffect(()=>{E(0),X(null),_(!1)},[l.length]);const q=l[M],R=U===null?null:l[U],$=de=>{var Z,le,oe,ge,Se;return{fontSettings:{fontFamily:(e==null?void 0:e[`${de}FontFamily`])??"Arial",fontWeight:((Z=e==null?void 0:e[`${de}FontSettings`])==null?void 0:Z.fontWeight)??400,fontStyle:((le=e==null?void 0:e[`${de}FontSettings`])==null?void 0:le.fontStyle)??"normal"},textAppearance:{textTransform:((oe=e==null?void 0:e[`${de}TextAppearance`])==null?void 0:oe.textTransform)??"none",textDecoration:((ge=e==null?void 0:e[`${de}TextAppearance`])==null?void 0:ge.textDecoration)??"none",fontVariant:((Se=e==null?void 0:e[`${de}TextAppearance`])==null?void 0:Se.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${de}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${de}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${de}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${de}WordSpacing`])??0,color:(e==null?void 0:e[`${de}Color`])??"#000000"}},I=$("text"),j=$("caption"),F=l.length>1&&l.some(de=>{var ue,Z;return(((ue=de.text)==null?void 0:ue.length)??0)>0||(((Z=de.caption)==null?void 0:Z.length)??0)>0}),K=s.useRef(null),[P,h]=s.useState(0),[J,V]=s.useState(0),he=e.controls??{mode:"Off",icon:null},k=l.length>1,ce=s.useCallback((de,ue)=>!k||ue===de?de:(W.current&&window.clearTimeout(W.current),X(de),_(!0),W.current=window.setTimeout(()=>{X(null),_(!1),W.current=null},300),ue),[k]),L=s.useCallback(()=>{k&&E(de=>ce(de,(de-1+l.length)%l.length))},[k,ce,l.length]),me=s.useCallback(()=>{k&&E(de=>ce(de,(de+1)%l.length))},[k,ce,l.length]);s.useEffect(()=>{if(!v||!k)return;const de=Math.max(300,Hy/c),ue=window.setInterval(()=>{E(Z=>ce(Z,(Z+1)%l.length))},de);return()=>{window.clearInterval(ue)}},[v,k,ce,l.length,c]),s.useEffect(()=>()=>{W.current&&window.clearTimeout(W.current)},[]);const te=(de,ue)=>{var Se,Re,Ne,Te;const Z=ue==null?void 0:ue.textMinHeightPx,le=ue==null?void 0:ue.captionMinHeightPx,oe=ue==null?void 0:ue.dataMeasureAttrs,ge=o&&!(ue!=null&&ue.dataMeasureAttrs)&&!(ue!=null&&ue.hideControls);return a.jsxs(a.Fragment,{children:[de.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:T,width:"100%"},children:[a.jsx("div",{"data-controls":ge?"textMarginTop":void 0,className:ge?`${r}-control`:void 0,style:{height:b.scalingValue(y??0,n??!1)}}),a.jsx("div",{...oe&&{"data-testimonial-measure":"text"},style:{...nn(I,n),...Z&&Z>0?{minHeight:Z}:{},textAlign:C,pointerEvents:"auto"},children:a.jsx(Zi,{content:de.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:T,width:"100%"},children:[a.jsx("div",{"data-controls":ge?"imageMarginTop":void 0,className:ge?`${r}-control`:void 0,style:{height:b.scalingValue(p??0,n??!1)}}),a.jsx("div",{style:{width:b.scalingValue(m??0,n??!1),height:b.scalingValue(f??0,n??!1)},children:((Se=de.image)==null?void 0:Se.assetId)&&a.jsx("img",{src:(Re=de.image)==null?void 0:Re.assetId,alt:((Ne=de.image)==null?void 0:Ne.name)??"",className:`${r}-icon`,style:{objectFit:((Te=de.image)==null?void 0:Te.objectFit)||"contain"}})})]}),de.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:T,width:"100%"},children:[a.jsx("div",{"data-controls":ge?"captionMarginTop":void 0,className:ge?`${r}-control`:void 0,style:{height:b.scalingValue(x??0,n??!1)}}),a.jsx("div",{...oe?{"data-testimonial-measure":"caption"}:{},style:{...nn(j,n),...le&&le>0?{minHeight:le}:{},textAlign:C,pointerEvents:"auto"},children:a.jsx(Zi,{content:de.caption})})]})]})},ve=s.useCallback(de=>{h(de.maxTextPx),V(de.maxCaptionPx)},[]);if(s.useLayoutEffect(()=>{if(!F){ve({maxTextPx:0,maxCaptionPx:0});return}const de=K.current;if(!de)return;const ue=()=>{b.readTestimonialTextMeasure(de,ve)};ue();const Z=new ResizeObserver(ue);return Z.observe(de),()=>{Z.disconnect()}},[F,ve,t]),!q)return a.jsx(a.Fragment,{});const Le=F?{textMinHeightPx:P,captionMinHeightPx:J}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${r}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:_y(r)}}),a.jsxs("div",{className:`${r}-wrapper`,style:{width:b.scalingValue(u??0,n??!1),alignItems:T},children:[F&&a.jsx("div",{ref:K,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((de,ue)=>a.jsx("div",{style:{width:"100%"},children:te(de,{dataMeasureAttrs:!0})},ue))}),a.jsxs("div",{className:`${r}-fade-stack`,children:[R&&D&&a.jsx("div",{className:Et(`${r}-fade-item-prev`,`${r}-fade-out`),children:te(R,{...Le,hideControls:!0})}),a.jsx("div",{className:Et(`${r}-fade-item-current`,D?`${r}-fade-in`:void 0),children:te(q,Le)})]})]}),he.mode==="On"&&a.jsxs("div",{className:`${r}-controls`,children:[a.jsx("div",{className:`${r}-arrow`,style:{width:b.scalingValue(S??.02,n??!1),height:b.scalingValue(S??.02,n??!1),"--arrow-hover-color":N},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:L,disabled:!k,"aria-label":"Previous testimonial",children:he.icon&&a.jsx(mn,{url:he.icon,fill:w,hoverFill:N,className:Et(`${r}-arrow-img`,`${r}-mirror`)})})}),a.jsx("div",{className:Et(`${r}-arrow`,`${r}-next-arrow`),style:{width:b.scalingValue(S??.02,n??!1),height:b.scalingValue(S??.02,n??!1),"--arrow-hover-color":N},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:me,disabled:!k,"aria-label":"Next testimonial",children:he.icon&&a.jsx(mn,{url:he.icon,fill:w,hoverFill:N,className:`${r}-arrow-img`})})})]})]})})},Oy=`import cn from 'classnames';
4433
4433
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
4434
4434
  import { CommonComponentProps } from '../props';
4435
4435
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -4925,12 +4925,12 @@ type TestimonialsSettings = {
4925
4925
  icon?: string | null;
4926
4926
  };
4927
4927
  };
4928
- `,Oy="01M46GNEM3GEJ4HQSNJYYTA45T",Ic={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Dy={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Controls Default",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Ic.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Caption Default"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Ic.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Default"}},defaults:{controls:{mode:"On",icon:Oy},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{speed:1,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},t:{speed:1,width:.65,imageMarginTop:.026,captionMarginTop:.01,textMarginTop:0,textFontSize:.035,captionFontSize:.023,textLineHeight:.04,captionLineHeight:.029,imageWidth:.05,imageHeight:.05,controlsWidth:.026},d:{speed:1,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},layout:["__componentName__","speed","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","speed"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",assetId:"01M3QM74XFE5YFEHBH605E8FXT",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XFZD1R3FV8BKW3NT24",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XGNPA7232QGZAYFNSS",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},zy={element:Hy,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Single.png"},defaultSize:{d:{width:700},t:{width:700},m:{width:334}},schema:Dy,sourceCode:Wy,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function By(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Lc(e){return((e==null?void 0:e.trim().length)??0)>0}function is(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function os(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:b.scalingValue((o-t)/2,i)}}function jy(e){return`
4928
+ `,Dy="01M46GNEM3GEJ4HQSNJYYTA45T",Lc={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},zy={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Controls Default",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Lc.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Caption Default"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Lc.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Default"}},defaults:{controls:{mode:"On",icon:Dy},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{speed:1,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},t:{speed:1,width:.65,imageMarginTop:.026,captionMarginTop:.01,textMarginTop:0,textFontSize:.035,captionFontSize:.023,textLineHeight:.04,captionLineHeight:.029,imageWidth:.05,imageHeight:.05,controlsWidth:.026},d:{speed:1,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},layout:["__componentName__","speed","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","speed"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",assetId:"01M3QM74XFE5YFEHBH605E8FXT",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XFZD1R3FV8BKW3NT24",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XGNPA7232QGZAYFNSS",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},By={element:Wy,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Single.png"},defaultSize:{d:{width:700},t:{width:700},m:{width:334}},schema:zy,sourceCode:Oy,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function jy(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Mc(e){return((e==null?void 0:e.trim().length)??0)>0}function os(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function rs(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:b.scalingValue((o-t)/2,i)}}function Vy(e){return`
4929
4929
  .${e}-wrapper {
4930
4930
  display: grid;
4931
4931
  align-items: start;
4932
4932
  justify-content: center;
4933
- min-height: ${By(48)};
4933
+ min-height: ${jy(48)};
4934
4934
  }
4935
4935
  .${e}-item {
4936
4936
  display: flex;
@@ -5302,7 +5302,7 @@ type TestimonialsSettings = {
5302
5302
  left: 50%;
5303
5303
  transform: translate(-50%, -50%);
5304
5304
  }
5305
- `}function Vy(){return Math.random()<.5?"ltr":"ttb"}function Gy(e){const t=e.Components.Autoplay;t&&(t.pause(!1),t.play())}function Xy(e){const t=Vy();e.options.direction!==t&&(e.options={...e.options,direction:t}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Gy(e)})})}const Nn=500,Uy=750,hi="cubic-bezier(0.22, 1, 0.36, 1)",qy=72,Ky=50;function Yy(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 Qy(e){const[t,n]=e.media;return n!=null&&n.assetId?n:t!=null&&t.assetId?t:null}function Zy(e){const[t]=e.media;return t!=null&&t.assetId?t:null}function tp(e){return!Array.isArray(e)||e.length===0?[]:Yy(e)?e.flatMap(t=>{const n=Qy(t);if(!n)return[];const i=Zy(t);return[{displayMedia:n,lightboxMedia:i!=null&&i.assetId?i:null}]}):e.filter(t=>t==null?void 0:t.assetId).map(t=>({displayMedia:t,lightboxMedia:t}))}function Ki(e){return!b.isEmbedMedia(e)&&e.type==="video"}function Jy(e){const t=new Set,n=[];for(const i of e){const o=tp(i.gallery);for(const r of o){const l=r.lightboxMedia;l!=null&&l.assetId&&!t.has(l.assetId)&&(t.add(l.assetId),n.push(l))}}return n}function ev({mediaList:e}){const t=e.filter(n=>!b.isEmbedMedia(n));return t.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:t.map(n=>Ki(n)?a.jsx("video",{src:n.assetId,preload:"auto",muted:!0,playsInline:!0},n.assetId):a.jsx("img",{src:n.assetId,alt:""},n.assetId))})}function tv(e){e.pause(),e.removeAttribute("src"),e.load()}function Mc({media:e,className:t,style:n,onMediaClick:i}){return b.isEmbedMedia(e)?a.jsx(b.EmbedMediaFrame,{media:e,mode:"background",fit:n.objectFit==="contain"?"contain":"cover",className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i}):Ki(e)?a.jsx("video",{src:e.assetId,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):a.jsx("img",{src:e.assetId,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function Pc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function nv(e,t){if(!t||!t.width||!t.height||!e.width||!e.height)return e;const n=t.width/t.height,i=e.width/e.height;if(n>i){const r=e.width/n;return{width:e.width,height:r,left:e.left,top:e.top+(e.height-r)/2}}const o=e.height*n;return{width:o,height:e.height,left:e.left+(e.width-o)/2,top:e.top}}function iv({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l}){return s.useEffect(()=>{const c=n.current;if(c)return()=>{tv(c)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:r,onMouseMove:l,style:i})}const ov="https://cdn.cntrl.site/component-assets/defaultCloseIcon.svg",rv=.004;function av({prefix:e,closeIcon:t=ov,closeIconMaxWidth:n=.0125,closeIconColor:i="#FFFFFF",closeIconHoverColor:o="#999999",iconMarginRight:r=.01,contentMarginTop:l=.01,isEditor:c,isPreviewMode:d,isEditMode:u,visible:p,onClose:y}){if(!t)return null;const x=b.scalingValue(n,c),m=b.scalingValue(r,c),f=b.scalingValue(l,c),S=b.scalingValue(Math.max(l,rv),c);return a.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,zIndex:1e4,display:"flex",flexDirection:"column",alignItems:"flex-end",pointerEvents:"none",opacity:p?1:0,transition:"opacity 500ms cubic-bezier(0.22, 1, 0.36, 1)"},children:[a.jsx("div",{style:{position:"relative",width:"100%",height:f,flexShrink:0},children:u&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-min":"0",className:`${e}-control`,style:{position:"absolute",top:0,left:0,width:"100%",height:S,pointerEvents:p?"auto":"none"}})}),a.jsxs("div",{className:`${e}-close-icon`,style:{width:x,height:x,marginRight:m,pointerEvents:p?"auto":"none"},onClick:w=>w.stopPropagation(),children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,"aria-label":"Close",onClick:w=>{w.stopPropagation(),y()},children:a.jsx(mn,{url:t,fill:i,hoverFill:c&&!d?i:o,className:`${e}-close-icon-img`})}),u&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:m,height:"100%",pointerEvents:p?"auto":"none"}})]})]})}function sv({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,isPreviewMode:r,isEditMode:l,onClose:c,onPrev:d,onNext:u,counterClassName:p,counterStyle:y,closeIcon:x,closeIconMaxWidth:m,closeIconColor:f,closeIconHoverColor:S,iconMarginRight:w,contentMarginTop:N}){const v=i==="cover",M=s.useRef(null),R=s.useRef(null),U=s.useRef(null),X=s.useRef(null),D=s.useRef(0),_=s.useRef(0),W=s.useRef("none"),T=s.useRef(!1),C=s.useRef(!1),q=s.useRef(null),E=s.useRef(0),$=s.useRef(null),I=s.useRef(!1),j=s.useRef(null),F=s.useRef(null),K=s.useRef(null),P=s.useRef(()=>{}),[h,J]=s.useState(null),[V,he]=s.useState(null),[k,ce]=s.useState("opening"),[L,me]=s.useState(0),[te,ve]=s.useState(0),[Le,de]=s.useState(null),[ue,Z]=s.useState(!1),[le,oe]=s.useState(!1),[ge,Se]=s.useState(!1),[Ee,Ne]=s.useState(null),Te=s.useRef(n),Ce=s.useRef(void 0),g=t[n],Y=g?Ki(g):!1,ee=g?b.isEmbedMedia(g):!1,ae=te!==0||ue,ye=Le!==null,ne=s.useCallback(pe=>{const De=pe.currentTarget,qe=De instanceof HTMLVideoElement?{width:De.videoWidth,height:De.videoHeight}:{width:De.naturalWidth,height:De.naturalHeight};!qe.width||!qe.height||Ne(qe)},[]);s.useEffect(()=>{q.current=V},[V]),s.useEffect(()=>{const pe=M.current;if(!pe)return;const De=()=>he(Pc(pe));De();const qe=new ResizeObserver(De);return qe.observe(pe),()=>qe.disconnect()},[]);const B=s.useCallback(()=>{j.current!==null&&(window.clearTimeout(j.current),j.current=null)},[]),G=s.useCallback(()=>{const pe=F.current;F.current=null,B(),$.current=null,I.current=!1,de(null),Z(!1),ve(0),E.current=0,oe(!1),T.current=!1,_.current=0,W.current="none",pe===1?u():pe===-1&&d()},[B,u,d]),z=s.useCallback(()=>{B(),F.current=null,$.current=null,I.current=!1,de(null),Z(!1),ve(0),E.current=0},[B]),ie=s.useCallback(()=>{B(),j.current=window.setTimeout(()=>{F.current!==null&&G()},Nn+32)},[B,G]),H=s.useCallback((pe,De)=>{var bt;const qe=((bt=q.current)==null?void 0:bt.width)??0;if(B(),$.current=pe,de(pe),I.current=!0,Z(!0),De){F.current=pe;const yt=-pe*qe;E.current=yt,ve(yt),ie();return}E.current=0,ve(0),j.current=window.setTimeout(()=>{j.current=null,z()},Nn+32)},[B,z,ie]),be=s.useCallback(pe=>{if(!(t.length<=1)){if(I.current){if(F.current===pe){K.current=pe,G();return}z()}B(),$.current=pe,de(pe),I.current=!1,Z(!1),E.current=0,ve(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{H(pe,!0)})})}},[t.length,H,G,z,B]);P.current=be;const re=s.useCallback(pe=>{pe.propertyName!=="transform"||!I.current||F.current!==null&&G()},[G]),Q=s.useCallback(()=>{const pe=R.current;if(!pe)return;const De=Pc(pe);!De.width||!De.height||J(De)},[]);s.useEffect(()=>{Q();const pe=R.current;if(!pe)return;const De=new ResizeObserver(()=>Q());return De.observe(pe),()=>De.disconnect()},[Q]),s.useEffect(()=>{k==="opening"&&h&&ce("open")},[k,h]),s.useEffect(()=>{if(k!=="closing")return;const pe=setTimeout(()=>c(),Nn);return()=>clearTimeout(pe)},[k,c]),s.useEffect(()=>()=>{B()},[B]),s.useLayoutEffect(()=>{Te.current===n&&Ce.current===(g==null?void 0:g.assetId)||(B(),F.current=null,de(null),me(0),ve(0),Z(!1),Se(!1),oe(!1),Ne(null),D.current=0,_.current=0,W.current="none",T.current=!1,I.current=!1,E.current=0,$.current=null,X.current=null,C.current=!1,Te.current=n,Ce.current=g==null?void 0:g.assetId)},[n,g==null?void 0:g.assetId,B]),s.useLayoutEffect(()=>{const pe=K.current;pe!==null&&(K.current=null,requestAnimationFrame(()=>{P.current(pe)}))},[n,g==null?void 0:g.assetId]),s.useEffect(()=>{if(k!=="open")return;let pe=null;const De=()=>{pe&&(document.removeEventListener("click",pe,!0),pe=null)},qe=()=>{De(),pe=wt=>{wt.stopPropagation(),wt.preventDefault(),De()},document.addEventListener("click",pe,!0)},bt=wt=>{const nt=wt<0?1:-1;if(Math.abs(wt)>Ky&&t.length>1){H(nt,!0);return}H(nt,!1)},yt=wt=>{if(wt.touches.length!==1||I.current)return;const nt=wt.touches[0];C.current=!0,X.current={x:nt.clientX,y:nt.clientY},W.current="none",_.current=0,T.current=!1},Et=wt=>{if(!X.current||wt.touches.length!==1||I.current)return;const nt=wt.touches[0],Nt=nt.clientX-X.current.x,jt=nt.clientY-X.current.y;if(W.current==="none"){if(Math.abs(Nt)<10&&Math.abs(jt)<10)return;if(Math.abs(Nt)>Math.abs(jt)){if(t.length<=1)return;W.current="horizontal"}else if(jt>0)W.current="vertical";else return}if(W.current==="horizontal"){T.current=!0,oe(!0),_.current=Nt;const $e=Nt<0?1:-1;$.current!==$e&&($.current=$e,de($e)),E.current=Nt,ve(Nt),wt.preventDefault();return}W.current==="vertical"&&(T.current=!0,oe(!0),D.current=jt,me(jt),wt.preventDefault())},ct=()=>{if(!X.current)return;const wt=W.current,nt=T.current;if(nt&&wt==="horizontal")bt(_.current),qe();else if(nt&&wt==="vertical")if(D.current>qy){const jt=window.innerHeight;D.current=jt,Se(!0),me(jt),ce("closing")}else D.current=0,me(0),qe();else wt==="horizontal"&&Math.abs(_.current)>0&&(bt(_.current),qe());X.current=null,W.current="none",_.current=0,T.current=!1,oe(!1)};return document.addEventListener("touchstart",yt,{passive:!0}),document.addEventListener("touchmove",Et,{passive:!1}),document.addEventListener("touchend",ct),document.addEventListener("touchcancel",ct),()=>{document.removeEventListener("touchstart",yt),document.removeEventListener("touchmove",Et),document.removeEventListener("touchend",ct),document.removeEventListener("touchcancel",ct),De()}},[k,t.length,H]),s.useEffect(()=>{const pe=De=>{De.key==="Escape"&&(De.preventDefault(),De.stopPropagation(),k!=="closing"&&ce("closing"))};return window.addEventListener("keydown",pe,!0),()=>window.removeEventListener("keydown",pe,!0)},[k]);const Pe=()=>{k!=="closing"&&ce("closing")},Ae=k==="open",He=k==="closing",Xe=L>0?Math.max(0,1-L/500):1,Ue=L>0?Math.max(.35,1-L/500):1,Je=ee&&g?{width:b.getEmbedAspect(g),height:1}:Ee,je=h?v?h:nv(h,Je):null,xe=pe=>{if(pe.stopPropagation(),C.current){C.current=!1;return}if(t.length<=1)return;const De=je??pe.currentTarget.getBoundingClientRect(),qe=pe.clientY-De.top,bt=Math.min(52,De.height*.2);if(!(qe>De.height-bt)){if(pe.clientX-De.left<De.width/2){be(-1);return}be(1)}},Ie=pe=>{if(t.length<=1)return;const De=je??pe.currentTarget.getBoundingClientRect(),qe=pe.clientX-De.left,bt=pe.clientY-De.top,yt=Math.min(52,De.height*.2);if(bt>De.height-yt){pe.currentTarget.style.cursor="default";return}pe.currentTarget.style.cursor=qe<De.width/2?"w-resize":"e-resize"},ze={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,zIndex:9998},Ze=v?"cover":"contain",tt=te!==0||L>0?`translate(${te}px, ${L}px)`:void 0,ot=le&&!ue?"none":ue?`transform ${Nn}ms ${hi}`:ge?`transform ${Nn}ms ${hi}, opacity ${Nn}ms ${hi}`:k==="opening"||He?`opacity ${Nn}ms ${hi}`:"none",lt={...ze,transform:tt,opacity:L>0?Ue:k==="opening"||He?0:1,transition:ot,pointerEvents:"none"},it={position:"absolute",top:((je==null?void 0:je.top)??0)-((V==null?void 0:V.top)??0),left:((je==null?void 0:je.left)??0)-((V==null?void 0:V.left)??0),width:je==null?void 0:je.width,height:je==null?void 0:je.height,objectFit:Ze,pointerEvents:(Y||ee)&&Ae&&!ae?"auto":"none",touchAction:(Y||ee)&&Ae?"none":void 0},xt=(V==null?void 0:V.width)??0,rt=ye?(n+Le+t.length)%t.length:null,_e=rt!==null?t[rt]:null,We={...ze,transform:ye?`translateX(${Le*xt+te}px)`:void 0,opacity:1,transition:ue?`transform ${Nn}ms ${hi}`:"none",pointerEvents:"none"},vt={position:"absolute",top:((h==null?void 0:h.top)??0)-((V==null?void 0:V.top)??0),left:((h==null?void 0:h.left)??0)-((V==null?void 0:V.left)??0),width:h==null?void 0:h.width,height:h==null?void 0:h.height,objectFit:Ze,pointerEvents:"none"},Ve=ee&&je?Math.min(52,je.height*.2):0,Ke=je?{position:"fixed",top:je.top,height:je.height-Ve,width:je.width/2,zIndex:9999}:null;return a.jsxs("div",{ref:M,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:k==="open"?"none":void 0},onClick:Pe,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:Ae?Xe:0,transition:le?"none":`opacity ${Nn}ms ${hi}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:v?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:R,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Ae?1:0,transition:`opacity ${Nn}ms ${hi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:p,style:y,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:R,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Ae?1:0,transition:`opacity ${Nn}ms ${hi}`},children:t.length>1&&a.jsxs("p",{className:p,style:y,children:[n+1," / ",t.length]})})]})}),h&&V&&_e&&a.jsx("div",{style:We,onTransitionEnd:re,children:b.isEmbedMedia(_e)?a.jsx("img",{src:_e.thumbnail,alt:_e.name,style:vt},`neighbor-${rt}-${_e.assetId}`):Ki(_e)?a.jsx("video",{src:_e.assetId,muted:!0,playsInline:!0,preload:"auto",style:vt},`neighbor-${rt}-${_e.assetId}`):a.jsx("img",{src:_e.assetId,alt:_e.name,style:vt},`neighbor-${rt}-${_e.assetId}`)}),h&&V&&g&&a.jsx("div",{style:lt,onTransitionEnd:re,children:ee?a.jsx(b.EmbedMediaFrame,{media:g,mode:"player",fit:v?"cover":"contain",lazy:!1,interactive:Ae&&!ae,style:it},`${n}-${g.assetId}`):Y?a.jsx(iv,{src:g.assetId,phase:k,mediaRef:U,mediaStyle:it,onLoadedMetadata:ne,onClick:xe,onMouseMove:Ie},`${n}-${g.assetId}`):a.jsx("img",{ref:U,src:g.assetId,alt:g.name,onLoad:ne,style:it},`${n}-${g.assetId}`)}),Ae&&Ke&&t.length>1&&!Y&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Ke,left:je.left,cursor:"w-resize",pointerEvents:le?"none":"auto"},onClick:pe=>{if(C.current){C.current=!1;return}pe.stopPropagation(),be(-1)}}),a.jsx("div",{style:{...Ke,left:je.left+je.width/2,cursor:"e-resize",pointerEvents:le?"none":"auto"},onClick:pe=>{if(C.current){C.current=!1;return}pe.stopPropagation(),be(1)}})]}),a.jsx(av,{prefix:e,closeIcon:x,closeIconMaxWidth:m,closeIconColor:f,closeIconHoverColor:S,iconMarginRight:w,contentMarginTop:N,isEditor:o,isPreviewMode:r,isEditMode:l,visible:Ae,onClose:Pe})]})}function lv(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function cv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:r,activeEvent:l,layoutId:c,portalId:d}){const{prefix:u}=b.useScopedStyles(),{type:p="a",gridLayout:y,textBoxWidth:x=100,verticalGap:m,entriesCount:f,lightbox:S,imageDisplay:w,imageCorners:N,lightboxImageDisplay:v,slider:M,sliderTiming:R,direction:U,transition:X,titleMarginTop:D,subtitleMarginTop:_,titleColor:W,subtitleColor:T,lightboxCounterColor:C,titleFontFamily:q,titleFontSettings:E,titleFontSize:$,titleLineHeight:I,titleLetterSpacing:j,titleWordSpacing:F,titleTextAppearance:K,subtitleFontFamily:P,subtitleFontSettings:h,subtitleFontSize:J,subtitleLineHeight:V,subtitleLetterSpacing:he,subtitleWordSpacing:k,subtitleTextAppearance:ce,lightboxCounterFontFamily:L,lightboxCounterFontSettings:me,lightboxCounterFontSize:te,lightboxCounterLineHeight:ve,lightboxCounterLetterSpacing:Le,lightboxCounterWordSpacing:de,lightboxCounterTextAppearance:ue,closeIcon:Z,closeIconMaxWidth:le,closeIconColor:oe,closeIconHoverColor:ge,iconMarginRight:Se,contentMarginTop:Ee,showText:Ne="always",alignEntries:Te="off",align:Ce="top"}=e,g={fontSettings:{fontFamily:q,fontWeight:(E==null?void 0:E.fontWeight)??400,fontStyle:(E==null?void 0:E.fontStyle)??"normal"},fontSize:$??.01,lineHeight:I,letterSpacing:j??0,wordSpacing:F??0,textAppearance:K,color:W},ee={...pn(nn(g,n))},ae={fontSettings:{fontFamily:P,fontWeight:(h==null?void 0:h.fontWeight)??400,fontStyle:(h==null?void 0:h.fontStyle)??"normal"},fontSize:J??.01,lineHeight:V,letterSpacing:he??0,wordSpacing:k??0,textAppearance:ce,color:T},ne={...pn(nn(ae,n))},B={fontSettings:{fontFamily:L,fontWeight:(me==null?void 0:me.fontWeight)??400,fontStyle:(me==null?void 0:me.fontStyle)??"normal"},fontSize:te??.01,lineHeight:ve,letterSpacing:Le??0,wordSpacing:de??0,textAppearance:ue,color:C},z={...pn(nn(B,n)),...os(te,ve,u,n)},ie=is($,I,`${u}-item-title`,`${u}-text-tight-leading`),H=is(J,V,`${u}-item-subtitle`,`${u}-text-tight-leading`),be=os($,I,u,n),re=os(J,V,u,n),Q=is(te,ve,`${u}-lightbox-counter`,`${u}-text-tight-leading`),Pe=b.buildColorVars(u,{titleColor:W,subtitleColor:T,lightboxCounterColor:C},dv,uv),Xe=`${l&&l!=="default"?`${u}-state-${l}`:""}${Ne==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),Ue=f===0?1/0:f,Je=(t??[]).slice(0,Ue),je=s.useMemo(()=>S==="on"?Jy(Je):[],[Je,S]),xe=y.entryWidth??.2,Ie=(w==null?void 0:w.display)==="cover",ze=(w==null?void 0:w.ratioValue)??"1:1",Ze=(w==null?void 0:w.reversed)??!1,[tt,ot]=ze.split(":").map(Number),xt=`${Ze?ot:tt} / ${Ze?tt:ot}`,rt=y.columnsCount,_e=b.scalingValue(xe??0,n),We=_e,vt=!Ie&&M!=="off",Ve=Je.length%rt||rt,Ke=Ve<rt&&Je.length>0,pe=Je.length-Ve,De=Ke?Math.floor((rt-Ve)/2)+1:1,qe=N?b.scalingValue(N,n):void 0,bt={width:We,...Ie?{aspectRatio:xt,height:"auto",overflow:"hidden"}:{height:"auto"},...qe?{borderRadius:qe,overflow:"hidden"}:{}},yt=`${u}-item-image-wrapper${vt?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),Et=p==="d"||p==="e"||p==="f",ct=Te==="on",wt=`calc(${b.scalingValue(xe??0,n)} * (${x} / 100))`,nt=b.scalingValue(xe*x/100,n),Nt=Ie?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...qe?{borderRadius:qe}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...qe?{borderRadius:qe}:{}},[jt,$e]=s.useState(0),Ge=s.useRef(null),ht=X==="fade"||U==="horizontal"?"ltr":U==="vertical"?"ttb":"ltr";s.useEffect(()=>{const Qe=Ge.current;if(!Qe)return;const at=new ResizeObserver(It=>{$e(Math.round(It[0].contentRect.width))});return at.observe(Qe),()=>at.disconnect()},[]);const Lt=(()=>{const Qe={...Pe},at=Ge.current?getComputedStyle(Ge.current).getPropertyValue("--cntrl-article-width").trim():"";return at&&(Qe["--cntrl-article-width"]=at),Qe})(),[$t,mt]=s.useState(!1),[_t,Ot]=s.useState([]),[zt,Re]=s.useState(0),dt=S==="on"&&(!n||i),ut=(Qe,at)=>{n&&!i||S!=="off"&&(Ot(Qe),Re(at),mt(!0))};s.useEffect(()=>{if(!$t||S!=="on"||typeof document>"u")return;const Qe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Qe}},[$t,S]),s.useEffect(()=>{!n||i||mt(!1)},[n,i]);const kt=s.useMemo(()=>jy(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:kt}}),S==="on"&&a.jsx(ev,{mediaList:je}),a.jsx("div",{style:Pe,children:a.jsx("div",{ref:Ge,className:`${u}-wrapper ${u}-type-${p}${ct?` ${u}-align-entries`:""} ${u}-image-align-${Ce} ${Xe}`.trim(),style:{gridTemplateColumns:`repeat(${rt}, ${_e})`,rowGap:ct?0:b.scalingValue(m??0,n),columnGap:b.scalingValue(y.horizontalGap??0,n),width:b.scalingValue(y.wrapperWidth??0,n),...ct?{[`--${u}-align-entries-row-gap`]:b.scalingValue(m??0,n)}:{}},children:Je.map((Qe,at)=>{var ft;const It=Lc(Qe.title),At=Lc(Qe.subtitle),pt=S==="off"&&((ft=Qe.link)!=null&&ft.value)?Qe.link:void 0,Ut=Math.floor(at/rt)===Math.ceil(Je.length/rt)-1,qt=Ke&&at>=pe?`${De+(at-pe)}`:void 0,Dt=Et?a.jsxs("div",{className:`${u}-item-text-block`,children:[It&&a.jsx("p",{className:ie,style:{width:wt,...ee,...be},children:Qe.title}),It&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:b.scalingValue(D??0,n),width:nt}}),At&&a.jsx("p",{className:H,style:{width:wt,...ne,...re},children:Qe.subtitle}),At&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:b.scalingValue(_??0,n),width:nt}})]}):null,Vt=ct?a.jsxs("div",{className:`${u}-item-title-row`,children:[!Et&&a.jsx("div",{"data-controls":o&&It?"titleMarginTop":void 0,className:o&&It?`${u}-control`:void 0,style:{height:It?b.scalingValue(D??0,n):0,width:nt}}),It&&a.jsx("p",{className:ie,style:{width:wt,...ee,...be},children:Qe.title}),Et&&It&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:b.scalingValue(D??0,n),width:nt}})]}):null,Gt=ct?a.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!Et&&a.jsx("div",{"data-controls":o&&At?"subtitleMarginTop":void 0,className:o&&At?`${u}-control`:void 0,style:{height:At?b.scalingValue(_??0,n):0,width:nt}}),At&&a.jsx("p",{className:H,style:{width:wt,...ne,...re},children:Qe.subtitle}),Et&&At&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:b.scalingValue(_??0,n),width:nt}})]}):null,Bt=a.jsxs(b.LinkWrapper,{link:pt,className:`${u}-item-text-link`,children:[Vt,Gt]}),Yt=tp(Qe.gallery),O=Yt.filter(Tt=>Tt.lightboxMedia).map(Tt=>Tt.lightboxMedia),Me=a.jsx("div",{className:yt,style:bt,children:Yt.length===0?null:M==="off"?(()=>{const{displayMedia:Tt,lightboxMedia:et}=Yt[0],Mt=et?O.findIndex(Ct=>Ct.assetId===et.assetId):-1;return a.jsx(Mc,{media:Tt,className:`${u}-item-${Ki(Tt)?"video":"image"}`.trim(),style:Nt,onMediaClick:dt&&Mt>=0?()=>ut(O,Mt):void 0})})():a.jsxs(a.Fragment,{children:[vt&&a.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Yt.map(({displayMedia:Tt})=>b.isEmbedMedia(Tt)?a.jsx("div",{style:{aspectRatio:`${b.getEmbedAspect(Tt)}`}},`sizer-${Tt.assetId}`):Ki(Tt)?a.jsx("video",{src:Tt.assetId,muted:!0,playsInline:!0},`sizer-${Tt.assetId}`):a.jsx("img",{src:Tt.assetId,alt:""},`sizer-${Tt.assetId}`))}),a.jsx(El,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:R*1e3,width:"100%",height:"100%",speed:Uy,type:X==="fade"?"fade":"loop",rewind:X==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:ht},onMoved:Tt=>{U!=="random"||X==="fade"||Xy(Tt)},children:Yt.map(({displayMedia:Tt,lightboxMedia:et},Mt)=>{const Ct=et?O.findIndex(Ht=>Ht.assetId===et.assetId):-1;return a.jsx(kl,{children:a.jsx(Mc,{media:Tt,className:`${u}-item-${Ki(Tt)?"video":"image"}`.trim(),style:Nt,onMediaClick:dt&&Ct>=0?()=>ut(O,Ct):void 0})},Mt)})},`${X}-${xe}-${U}-${R}-${jt}-${c}`)]})}),Fe=Et?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":o&&It?"titleMarginTop":void 0,className:o&&It?`${u}-control`:void 0,style:{height:It?b.scalingValue(D??0,n):0,width:nt}}),a.jsx("p",{className:ie,style:{width:wt,...ee,...be},children:Qe.title}),a.jsx("div",{"data-controls":o&&At?"subtitleMarginTop":void 0,className:o&&At?`${u}-control`:void 0,style:{height:At?b.scalingValue(_??0,n):0,width:nt}}),a.jsx("p",{className:H,style:{width:wt,...ne,...re},children:Qe.subtitle})]}),Oe=pt?a.jsx(b.LinkWrapper,{link:pt,className:`${u}-item-image-link`,children:Me}):a.jsx("a",{className:`${u}-item-image-link`,children:Me});return a.jsx("div",{className:`${u}-item`.trim(),style:qt&&!ct?{gridColumn:qt}:void 0,children:a.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${ct&&Ut?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(x??0)>100?`calc(${_e} * (${x} / 100))`:_e,...qt&&ct?{gridColumn:qt}:{}},children:ct?a.jsx(a.Fragment,{children:Et?a.jsxs(a.Fragment,{children:[Bt,Oe]}):a.jsxs(a.Fragment,{children:[Oe,Bt]})}):pt?a.jsxs(a.Fragment,{children:[a.jsxs(b.LinkWrapper,{link:pt,className:`${u}-item-image-link`,children:[Dt,Me]}),!Et&&a.jsx(b.LinkWrapper,{link:pt,className:`${u}-item-text-link`,children:Fe})]}):a.jsxs(a.Fragment,{children:[Dt,Me,Fe]})})},at)})})}),(!n||i)&&$t&&typeof document<"u"&&S==="on"&&(()=>{const Qe=(d?document.getElementById(d):null)??document.body;return qn.createPortal(a.jsx("div",{style:Lt,"data-selection":"none",children:a.jsx(sv,{prefix:u,items:_t,index:zt,imageDisplay:lv(v),isEditor:n,isPreviewMode:i,isEditMode:o,closeIcon:Z,closeIconMaxWidth:le,closeIconColor:oe,closeIconHoverColor:ge,iconMarginRight:Se,contentMarginTop:Ee,onClose:()=>mt(!1),onPrev:()=>Re(at=>(at-1+_t.length)%_t.length),onNext:()=>Re(at=>(at+1)%_t.length),counterClassName:Q,counterStyle:z})}),Qe)})()]})}const dv={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},uv=["hover","focus","filled","success","error"],pv=`import { Splide, SplideSlide } from '@splidejs/react-splide';
5305
+ `}function Gy(){return Math.random()<.5?"ltr":"ttb"}function Xy(e){const t=e.Components.Autoplay;t&&(t.pause(!1),t.play())}function Uy(e){const t=Gy();e.options.direction!==t&&(e.options={...e.options,direction:t}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Xy(e)})})}const Nn=500,qy=750,hi="cubic-bezier(0.22, 1, 0.36, 1)",Ky=72,Yy=50;function Qy(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 Zy(e){const[t,n]=e.media;return n!=null&&n.assetId?n:t!=null&&t.assetId?t:null}function Jy(e){const[t]=e.media;return t!=null&&t.assetId?t:null}function np(e){return!Array.isArray(e)||e.length===0?[]:Qy(e)?e.flatMap(t=>{const n=Zy(t);if(!n)return[];const i=Jy(t);return[{displayMedia:n,lightboxMedia:i!=null&&i.assetId?i:null}]}):e.filter(t=>t==null?void 0:t.assetId).map(t=>({displayMedia:t,lightboxMedia:t}))}function Ki(e){return!b.isEmbedMedia(e)&&e.type==="video"}function ev(e){const t=new Set,n=[];for(const i of e){const o=np(i.gallery);for(const r of o){const l=r.lightboxMedia;l!=null&&l.assetId&&!t.has(l.assetId)&&(t.add(l.assetId),n.push(l))}}return n}function tv({mediaList:e}){const t=e.filter(n=>!b.isEmbedMedia(n));return t.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:t.map(n=>Ki(n)?a.jsx("video",{src:n.assetId,preload:"auto",muted:!0,playsInline:!0},n.assetId):a.jsx("img",{src:n.assetId,alt:""},n.assetId))})}function nv(e){e.pause(),e.removeAttribute("src"),e.load()}function Pc({media:e,className:t,style:n,onMediaClick:i}){return b.isEmbedMedia(e)?a.jsx(b.EmbedMediaFrame,{media:e,mode:"background",fit:n.objectFit==="contain"?"contain":"cover",className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i}):Ki(e)?a.jsx("video",{src:e.assetId,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):a.jsx("img",{src:e.assetId,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function Ec(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function iv(e,t){if(!t||!t.width||!t.height||!e.width||!e.height)return e;const n=t.width/t.height,i=e.width/e.height;if(n>i){const r=e.width/n;return{width:e.width,height:r,left:e.left,top:e.top+(e.height-r)/2}}const o=e.height*n;return{width:o,height:e.height,left:e.left+(e.width-o)/2,top:e.top}}function ov({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l}){return s.useEffect(()=>{const c=n.current;if(c)return()=>{nv(c)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:r,onMouseMove:l,style:i})}const rv="https://cdn.cntrl.site/component-assets/defaultCloseIcon.svg",av=.004;function sv({prefix:e,closeIcon:t=rv,closeIconMaxWidth:n=.0125,closeIconColor:i="#FFFFFF",closeIconHoverColor:o="#999999",iconMarginRight:r=.01,contentMarginTop:l=.01,isEditor:c,isPreviewMode:d,isEditMode:u,visible:p,onClose:y}){if(!t)return null;const x=b.scalingValue(n,c),m=b.scalingValue(r,c),f=b.scalingValue(l,c),S=b.scalingValue(Math.max(l,av),c);return a.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,zIndex:1e4,display:"flex",flexDirection:"column",alignItems:"flex-end",pointerEvents:"none",opacity:p?1:0,transition:"opacity 500ms cubic-bezier(0.22, 1, 0.36, 1)"},children:[a.jsx("div",{style:{position:"relative",width:"100%",height:f,flexShrink:0},children:u&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-min":"0",className:`${e}-control`,style:{position:"absolute",top:0,left:0,width:"100%",height:S,pointerEvents:p?"auto":"none"}})}),a.jsxs("div",{className:`${e}-close-icon`,style:{width:x,height:x,marginRight:m,pointerEvents:p?"auto":"none"},onClick:w=>w.stopPropagation(),children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,"aria-label":"Close",onClick:w=>{w.stopPropagation(),y()},children:a.jsx(mn,{url:t,fill:i,hoverFill:c&&!d?i:o,className:`${e}-close-icon-img`})}),u&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:m,height:"100%",pointerEvents:p?"auto":"none"}})]})]})}function lv({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,isPreviewMode:r,isEditMode:l,onClose:c,onPrev:d,onNext:u,counterClassName:p,counterStyle:y,closeIcon:x,closeIconMaxWidth:m,closeIconColor:f,closeIconHoverColor:S,iconMarginRight:w,contentMarginTop:N}){const v=i==="cover",M=s.useRef(null),E=s.useRef(null),U=s.useRef(null),X=s.useRef(null),D=s.useRef(0),_=s.useRef(0),W=s.useRef("none"),T=s.useRef(!1),C=s.useRef(!1),q=s.useRef(null),R=s.useRef(0),$=s.useRef(null),I=s.useRef(!1),j=s.useRef(null),F=s.useRef(null),K=s.useRef(null),P=s.useRef(()=>{}),[h,J]=s.useState(null),[V,he]=s.useState(null),[k,ce]=s.useState("opening"),[L,me]=s.useState(0),[te,ve]=s.useState(0),[Le,de]=s.useState(null),[ue,Z]=s.useState(!1),[le,oe]=s.useState(!1),[ge,Se]=s.useState(!1),[Re,Ne]=s.useState(null),Te=s.useRef(n),Ce=s.useRef(void 0),g=t[n],Y=g?Ki(g):!1,ee=g?b.isEmbedMedia(g):!1,ae=te!==0||ue,ye=Le!==null,ne=s.useCallback(pe=>{const De=pe.currentTarget,qe=De instanceof HTMLVideoElement?{width:De.videoWidth,height:De.videoHeight}:{width:De.naturalWidth,height:De.naturalHeight};!qe.width||!qe.height||Ne(qe)},[]);s.useEffect(()=>{q.current=V},[V]),s.useEffect(()=>{const pe=M.current;if(!pe)return;const De=()=>he(Ec(pe));De();const qe=new ResizeObserver(De);return qe.observe(pe),()=>qe.disconnect()},[]);const B=s.useCallback(()=>{j.current!==null&&(window.clearTimeout(j.current),j.current=null)},[]),G=s.useCallback(()=>{const pe=F.current;F.current=null,B(),$.current=null,I.current=!1,de(null),Z(!1),ve(0),R.current=0,oe(!1),T.current=!1,_.current=0,W.current="none",pe===1?u():pe===-1&&d()},[B,u,d]),z=s.useCallback(()=>{B(),F.current=null,$.current=null,I.current=!1,de(null),Z(!1),ve(0),R.current=0},[B]),ie=s.useCallback(()=>{B(),j.current=window.setTimeout(()=>{F.current!==null&&G()},Nn+32)},[B,G]),H=s.useCallback((pe,De)=>{var bt;const qe=((bt=q.current)==null?void 0:bt.width)??0;if(B(),$.current=pe,de(pe),I.current=!0,Z(!0),De){F.current=pe;const yt=-pe*qe;R.current=yt,ve(yt),ie();return}R.current=0,ve(0),j.current=window.setTimeout(()=>{j.current=null,z()},Nn+32)},[B,z,ie]),be=s.useCallback(pe=>{if(!(t.length<=1)){if(I.current){if(F.current===pe){K.current=pe,G();return}z()}B(),$.current=pe,de(pe),I.current=!1,Z(!1),R.current=0,ve(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{H(pe,!0)})})}},[t.length,H,G,z,B]);P.current=be;const re=s.useCallback(pe=>{pe.propertyName!=="transform"||!I.current||F.current!==null&&G()},[G]),Q=s.useCallback(()=>{const pe=E.current;if(!pe)return;const De=Ec(pe);!De.width||!De.height||J(De)},[]);s.useEffect(()=>{Q();const pe=E.current;if(!pe)return;const De=new ResizeObserver(()=>Q());return De.observe(pe),()=>De.disconnect()},[Q]),s.useEffect(()=>{k==="opening"&&h&&ce("open")},[k,h]),s.useEffect(()=>{if(k!=="closing")return;const pe=setTimeout(()=>c(),Nn);return()=>clearTimeout(pe)},[k,c]),s.useEffect(()=>()=>{B()},[B]),s.useLayoutEffect(()=>{Te.current===n&&Ce.current===(g==null?void 0:g.assetId)||(B(),F.current=null,de(null),me(0),ve(0),Z(!1),Se(!1),oe(!1),Ne(null),D.current=0,_.current=0,W.current="none",T.current=!1,I.current=!1,R.current=0,$.current=null,X.current=null,C.current=!1,Te.current=n,Ce.current=g==null?void 0:g.assetId)},[n,g==null?void 0:g.assetId,B]),s.useLayoutEffect(()=>{const pe=K.current;pe!==null&&(K.current=null,requestAnimationFrame(()=>{P.current(pe)}))},[n,g==null?void 0:g.assetId]),s.useEffect(()=>{if(k!=="open")return;let pe=null;const De=()=>{pe&&(document.removeEventListener("click",pe,!0),pe=null)},qe=()=>{De(),pe=wt=>{wt.stopPropagation(),wt.preventDefault(),De()},document.addEventListener("click",pe,!0)},bt=wt=>{const nt=wt<0?1:-1;if(Math.abs(wt)>Yy&&t.length>1){H(nt,!0);return}H(nt,!1)},yt=wt=>{if(wt.touches.length!==1||I.current)return;const nt=wt.touches[0];C.current=!0,X.current={x:nt.clientX,y:nt.clientY},W.current="none",_.current=0,T.current=!1},Rt=wt=>{if(!X.current||wt.touches.length!==1||I.current)return;const nt=wt.touches[0],Nt=nt.clientX-X.current.x,jt=nt.clientY-X.current.y;if(W.current==="none"){if(Math.abs(Nt)<10&&Math.abs(jt)<10)return;if(Math.abs(Nt)>Math.abs(jt)){if(t.length<=1)return;W.current="horizontal"}else if(jt>0)W.current="vertical";else return}if(W.current==="horizontal"){T.current=!0,oe(!0),_.current=Nt;const $e=Nt<0?1:-1;$.current!==$e&&($.current=$e,de($e)),R.current=Nt,ve(Nt),wt.preventDefault();return}W.current==="vertical"&&(T.current=!0,oe(!0),D.current=jt,me(jt),wt.preventDefault())},ct=()=>{if(!X.current)return;const wt=W.current,nt=T.current;if(nt&&wt==="horizontal")bt(_.current),qe();else if(nt&&wt==="vertical")if(D.current>Ky){const jt=window.innerHeight;D.current=jt,Se(!0),me(jt),ce("closing")}else D.current=0,me(0),qe();else wt==="horizontal"&&Math.abs(_.current)>0&&(bt(_.current),qe());X.current=null,W.current="none",_.current=0,T.current=!1,oe(!1)};return document.addEventListener("touchstart",yt,{passive:!0}),document.addEventListener("touchmove",Rt,{passive:!1}),document.addEventListener("touchend",ct),document.addEventListener("touchcancel",ct),()=>{document.removeEventListener("touchstart",yt),document.removeEventListener("touchmove",Rt),document.removeEventListener("touchend",ct),document.removeEventListener("touchcancel",ct),De()}},[k,t.length,H]),s.useEffect(()=>{const pe=De=>{De.key==="Escape"&&(De.preventDefault(),De.stopPropagation(),k!=="closing"&&ce("closing"))};return window.addEventListener("keydown",pe,!0),()=>window.removeEventListener("keydown",pe,!0)},[k]);const Pe=()=>{k!=="closing"&&ce("closing")},Ae=k==="open",He=k==="closing",Xe=L>0?Math.max(0,1-L/500):1,Ue=L>0?Math.max(.35,1-L/500):1,Je=ee&&g?{width:b.getEmbedAspect(g),height:1}:Re,je=h?v?h:iv(h,Je):null,xe=pe=>{if(pe.stopPropagation(),C.current){C.current=!1;return}if(t.length<=1)return;const De=je??pe.currentTarget.getBoundingClientRect(),qe=pe.clientY-De.top,bt=Math.min(52,De.height*.2);if(!(qe>De.height-bt)){if(pe.clientX-De.left<De.width/2){be(-1);return}be(1)}},Ie=pe=>{if(t.length<=1)return;const De=je??pe.currentTarget.getBoundingClientRect(),qe=pe.clientX-De.left,bt=pe.clientY-De.top,yt=Math.min(52,De.height*.2);if(bt>De.height-yt){pe.currentTarget.style.cursor="default";return}pe.currentTarget.style.cursor=qe<De.width/2?"w-resize":"e-resize"},ze={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,zIndex:9998},Ze=v?"cover":"contain",tt=te!==0||L>0?`translate(${te}px, ${L}px)`:void 0,ot=le&&!ue?"none":ue?`transform ${Nn}ms ${hi}`:ge?`transform ${Nn}ms ${hi}, opacity ${Nn}ms ${hi}`:k==="opening"||He?`opacity ${Nn}ms ${hi}`:"none",lt={...ze,transform:tt,opacity:L>0?Ue:k==="opening"||He?0:1,transition:ot,pointerEvents:"none"},it={position:"absolute",top:((je==null?void 0:je.top)??0)-((V==null?void 0:V.top)??0),left:((je==null?void 0:je.left)??0)-((V==null?void 0:V.left)??0),width:je==null?void 0:je.width,height:je==null?void 0:je.height,objectFit:Ze,pointerEvents:(Y||ee)&&Ae&&!ae?"auto":"none",touchAction:(Y||ee)&&Ae?"none":void 0},xt=(V==null?void 0:V.width)??0,rt=ye?(n+Le+t.length)%t.length:null,_e=rt!==null?t[rt]:null,We={...ze,transform:ye?`translateX(${Le*xt+te}px)`:void 0,opacity:1,transition:ue?`transform ${Nn}ms ${hi}`:"none",pointerEvents:"none"},vt={position:"absolute",top:((h==null?void 0:h.top)??0)-((V==null?void 0:V.top)??0),left:((h==null?void 0:h.left)??0)-((V==null?void 0:V.left)??0),width:h==null?void 0:h.width,height:h==null?void 0:h.height,objectFit:Ze,pointerEvents:"none"},Ve=ee&&je?Math.min(52,je.height*.2):0,Ke=je?{position:"fixed",top:je.top,height:je.height-Ve,width:je.width/2,zIndex:9999}:null;return a.jsxs("div",{ref:M,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:k==="open"?"none":void 0},onClick:Pe,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:Ae?Xe:0,transition:le?"none":`opacity ${Nn}ms ${hi}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:v?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:E,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Ae?1:0,transition:`opacity ${Nn}ms ${hi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:p,style:y,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:E,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Ae?1:0,transition:`opacity ${Nn}ms ${hi}`},children:t.length>1&&a.jsxs("p",{className:p,style:y,children:[n+1," / ",t.length]})})]})}),h&&V&&_e&&a.jsx("div",{style:We,onTransitionEnd:re,children:b.isEmbedMedia(_e)?a.jsx("img",{src:_e.thumbnail,alt:_e.name,style:vt},`neighbor-${rt}-${_e.assetId}`):Ki(_e)?a.jsx("video",{src:_e.assetId,muted:!0,playsInline:!0,preload:"auto",style:vt},`neighbor-${rt}-${_e.assetId}`):a.jsx("img",{src:_e.assetId,alt:_e.name,style:vt},`neighbor-${rt}-${_e.assetId}`)}),h&&V&&g&&a.jsx("div",{style:lt,onTransitionEnd:re,children:ee?a.jsx(b.EmbedMediaFrame,{media:g,mode:"player",fit:v?"cover":"contain",lazy:!1,interactive:Ae&&!ae,style:it},`${n}-${g.assetId}`):Y?a.jsx(ov,{src:g.assetId,phase:k,mediaRef:U,mediaStyle:it,onLoadedMetadata:ne,onClick:xe,onMouseMove:Ie},`${n}-${g.assetId}`):a.jsx("img",{ref:U,src:g.assetId,alt:g.name,onLoad:ne,style:it},`${n}-${g.assetId}`)}),Ae&&Ke&&t.length>1&&!Y&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Ke,left:je.left,cursor:"w-resize",pointerEvents:le?"none":"auto"},onClick:pe=>{if(C.current){C.current=!1;return}pe.stopPropagation(),be(-1)}}),a.jsx("div",{style:{...Ke,left:je.left+je.width/2,cursor:"e-resize",pointerEvents:le?"none":"auto"},onClick:pe=>{if(C.current){C.current=!1;return}pe.stopPropagation(),be(1)}})]}),a.jsx(sv,{prefix:e,closeIcon:x,closeIconMaxWidth:m,closeIconColor:f,closeIconHoverColor:S,iconMarginRight:w,contentMarginTop:N,isEditor:o,isPreviewMode:r,isEditMode:l,visible:Ae,onClose:Pe})]})}function cv(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function dv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:r,activeEvent:l,layoutId:c,portalId:d}){const{prefix:u}=b.useScopedStyles(),{type:p="a",gridLayout:y,textBoxWidth:x=100,verticalGap:m,entriesCount:f,lightbox:S,imageDisplay:w,imageCorners:N,lightboxImageDisplay:v,slider:M,sliderTiming:E,direction:U,transition:X,titleMarginTop:D,subtitleMarginTop:_,titleColor:W,subtitleColor:T,lightboxCounterColor:C,titleFontFamily:q,titleFontSettings:R,titleFontSize:$,titleLineHeight:I,titleLetterSpacing:j,titleWordSpacing:F,titleTextAppearance:K,subtitleFontFamily:P,subtitleFontSettings:h,subtitleFontSize:J,subtitleLineHeight:V,subtitleLetterSpacing:he,subtitleWordSpacing:k,subtitleTextAppearance:ce,lightboxCounterFontFamily:L,lightboxCounterFontSettings:me,lightboxCounterFontSize:te,lightboxCounterLineHeight:ve,lightboxCounterLetterSpacing:Le,lightboxCounterWordSpacing:de,lightboxCounterTextAppearance:ue,closeIcon:Z,closeIconMaxWidth:le,closeIconColor:oe,closeIconHoverColor:ge,iconMarginRight:Se,contentMarginTop:Re,showText:Ne="always",alignEntries:Te="off",align:Ce="top"}=e,g={fontSettings:{fontFamily:q,fontWeight:(R==null?void 0:R.fontWeight)??400,fontStyle:(R==null?void 0:R.fontStyle)??"normal"},fontSize:$??.01,lineHeight:I,letterSpacing:j??0,wordSpacing:F??0,textAppearance:K,color:W},ee={...pn(nn(g,n))},ae={fontSettings:{fontFamily:P,fontWeight:(h==null?void 0:h.fontWeight)??400,fontStyle:(h==null?void 0:h.fontStyle)??"normal"},fontSize:J??.01,lineHeight:V,letterSpacing:he??0,wordSpacing:k??0,textAppearance:ce,color:T},ne={...pn(nn(ae,n))},B={fontSettings:{fontFamily:L,fontWeight:(me==null?void 0:me.fontWeight)??400,fontStyle:(me==null?void 0:me.fontStyle)??"normal"},fontSize:te??.01,lineHeight:ve,letterSpacing:Le??0,wordSpacing:de??0,textAppearance:ue,color:C},z={...pn(nn(B,n)),...rs(te,ve,u,n)},ie=os($,I,`${u}-item-title`,`${u}-text-tight-leading`),H=os(J,V,`${u}-item-subtitle`,`${u}-text-tight-leading`),be=rs($,I,u,n),re=rs(J,V,u,n),Q=os(te,ve,`${u}-lightbox-counter`,`${u}-text-tight-leading`),Pe=b.buildColorVars(u,{titleColor:W,subtitleColor:T,lightboxCounterColor:C},uv,pv),Xe=`${l&&l!=="default"?`${u}-state-${l}`:""}${Ne==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),Ue=f===0?1/0:f,Je=(t??[]).slice(0,Ue),je=s.useMemo(()=>S==="on"?ev(Je):[],[Je,S]),xe=y.entryWidth??.2,Ie=(w==null?void 0:w.display)==="cover",ze=(w==null?void 0:w.ratioValue)??"1:1",Ze=(w==null?void 0:w.reversed)??!1,[tt,ot]=ze.split(":").map(Number),xt=`${Ze?ot:tt} / ${Ze?tt:ot}`,rt=y.columnsCount,_e=b.scalingValue(xe??0,n),We=_e,vt=!Ie&&M!=="off",Ve=Je.length%rt||rt,Ke=Ve<rt&&Je.length>0,pe=Je.length-Ve,De=Ke?Math.floor((rt-Ve)/2)+1:1,qe=N?b.scalingValue(N,n):void 0,bt={width:We,...Ie?{aspectRatio:xt,height:"auto",overflow:"hidden"}:{height:"auto"},...qe?{borderRadius:qe,overflow:"hidden"}:{}},yt=`${u}-item-image-wrapper${vt?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),Rt=p==="d"||p==="e"||p==="f",ct=Te==="on",wt=`calc(${b.scalingValue(xe??0,n)} * (${x} / 100))`,nt=b.scalingValue(xe*x/100,n),Nt=Ie?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...qe?{borderRadius:qe}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...qe?{borderRadius:qe}:{}},[jt,$e]=s.useState(0),Ge=s.useRef(null),ht=X==="fade"||U==="horizontal"?"ltr":U==="vertical"?"ttb":"ltr";s.useEffect(()=>{const Qe=Ge.current;if(!Qe)return;const at=new ResizeObserver(It=>{$e(Math.round(It[0].contentRect.width))});return at.observe(Qe),()=>at.disconnect()},[]);const Lt=(()=>{const Qe={...Pe},at=Ge.current?getComputedStyle(Ge.current).getPropertyValue("--cntrl-article-width").trim():"";return at&&(Qe["--cntrl-article-width"]=at),Qe})(),[$t,mt]=s.useState(!1),[_t,Ot]=s.useState([]),[zt,Ee]=s.useState(0),dt=S==="on"&&(!n||i),ut=(Qe,at)=>{n&&!i||S!=="off"&&(Ot(Qe),Ee(at),mt(!0))};s.useEffect(()=>{if(!$t||S!=="on"||typeof document>"u")return;const Qe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Qe}},[$t,S]),s.useEffect(()=>{!n||i||mt(!1)},[n,i]);const kt=s.useMemo(()=>Vy(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:kt}}),S==="on"&&a.jsx(tv,{mediaList:je}),a.jsx("div",{style:Pe,children:a.jsx("div",{ref:Ge,className:`${u}-wrapper ${u}-type-${p}${ct?` ${u}-align-entries`:""} ${u}-image-align-${Ce} ${Xe}`.trim(),style:{gridTemplateColumns:`repeat(${rt}, ${_e})`,rowGap:ct?0:b.scalingValue(m??0,n),columnGap:b.scalingValue(y.horizontalGap??0,n),width:b.scalingValue(y.wrapperWidth??0,n),...ct?{[`--${u}-align-entries-row-gap`]:b.scalingValue(m??0,n)}:{}},children:Je.map((Qe,at)=>{var ft;const It=Mc(Qe.title),At=Mc(Qe.subtitle),pt=S==="off"&&((ft=Qe.link)!=null&&ft.value)?Qe.link:void 0,Ut=Math.floor(at/rt)===Math.ceil(Je.length/rt)-1,qt=Ke&&at>=pe?`${De+(at-pe)}`:void 0,Dt=Rt?a.jsxs("div",{className:`${u}-item-text-block`,children:[It&&a.jsx("p",{className:ie,style:{width:wt,...ee,...be},children:Qe.title}),It&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:b.scalingValue(D??0,n),width:nt}}),At&&a.jsx("p",{className:H,style:{width:wt,...ne,...re},children:Qe.subtitle}),At&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:b.scalingValue(_??0,n),width:nt}})]}):null,Vt=ct?a.jsxs("div",{className:`${u}-item-title-row`,children:[!Rt&&a.jsx("div",{"data-controls":o&&It?"titleMarginTop":void 0,className:o&&It?`${u}-control`:void 0,style:{height:It?b.scalingValue(D??0,n):0,width:nt}}),It&&a.jsx("p",{className:ie,style:{width:wt,...ee,...be},children:Qe.title}),Rt&&It&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:b.scalingValue(D??0,n),width:nt}})]}):null,Gt=ct?a.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!Rt&&a.jsx("div",{"data-controls":o&&At?"subtitleMarginTop":void 0,className:o&&At?`${u}-control`:void 0,style:{height:At?b.scalingValue(_??0,n):0,width:nt}}),At&&a.jsx("p",{className:H,style:{width:wt,...ne,...re},children:Qe.subtitle}),Rt&&At&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:b.scalingValue(_??0,n),width:nt}})]}):null,Bt=a.jsxs(b.LinkWrapper,{link:pt,className:`${u}-item-text-link`,children:[Vt,Gt]}),Yt=np(Qe.gallery),O=Yt.filter(Tt=>Tt.lightboxMedia).map(Tt=>Tt.lightboxMedia),Me=a.jsx("div",{className:yt,style:bt,children:Yt.length===0?null:M==="off"?(()=>{const{displayMedia:Tt,lightboxMedia:et}=Yt[0],Mt=et?O.findIndex(Ct=>Ct.assetId===et.assetId):-1;return a.jsx(Pc,{media:Tt,className:`${u}-item-${Ki(Tt)?"video":"image"}`.trim(),style:Nt,onMediaClick:dt&&Mt>=0?()=>ut(O,Mt):void 0})})():a.jsxs(a.Fragment,{children:[vt&&a.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Yt.map(({displayMedia:Tt})=>b.isEmbedMedia(Tt)?a.jsx("div",{style:{aspectRatio:`${b.getEmbedAspect(Tt)}`}},`sizer-${Tt.assetId}`):Ki(Tt)?a.jsx("video",{src:Tt.assetId,muted:!0,playsInline:!0},`sizer-${Tt.assetId}`):a.jsx("img",{src:Tt.assetId,alt:""},`sizer-${Tt.assetId}`))}),a.jsx(kl,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:E*1e3,width:"100%",height:"100%",speed:qy,type:X==="fade"?"fade":"loop",rewind:X==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:ht},onMoved:Tt=>{U!=="random"||X==="fade"||Uy(Tt)},children:Yt.map(({displayMedia:Tt,lightboxMedia:et},Mt)=>{const Ct=et?O.findIndex(Ht=>Ht.assetId===et.assetId):-1;return a.jsx(Al,{children:a.jsx(Pc,{media:Tt,className:`${u}-item-${Ki(Tt)?"video":"image"}`.trim(),style:Nt,onMediaClick:dt&&Ct>=0?()=>ut(O,Ct):void 0})},Mt)})},`${X}-${xe}-${U}-${E}-${jt}-${c}`)]})}),Fe=Rt?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":o&&It?"titleMarginTop":void 0,className:o&&It?`${u}-control`:void 0,style:{height:It?b.scalingValue(D??0,n):0,width:nt}}),a.jsx("p",{className:ie,style:{width:wt,...ee,...be},children:Qe.title}),a.jsx("div",{"data-controls":o&&At?"subtitleMarginTop":void 0,className:o&&At?`${u}-control`:void 0,style:{height:At?b.scalingValue(_??0,n):0,width:nt}}),a.jsx("p",{className:H,style:{width:wt,...ne,...re},children:Qe.subtitle})]}),Oe=pt?a.jsx(b.LinkWrapper,{link:pt,className:`${u}-item-image-link`,children:Me}):a.jsx("a",{className:`${u}-item-image-link`,children:Me});return a.jsx("div",{className:`${u}-item`.trim(),style:qt&&!ct?{gridColumn:qt}:void 0,children:a.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${ct&&Ut?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(x??0)>100?`calc(${_e} * (${x} / 100))`:_e,...qt&&ct?{gridColumn:qt}:{}},children:ct?a.jsx(a.Fragment,{children:Rt?a.jsxs(a.Fragment,{children:[Bt,Oe]}):a.jsxs(a.Fragment,{children:[Oe,Bt]})}):pt?a.jsxs(a.Fragment,{children:[a.jsxs(b.LinkWrapper,{link:pt,className:`${u}-item-image-link`,children:[Dt,Me]}),!Rt&&a.jsx(b.LinkWrapper,{link:pt,className:`${u}-item-text-link`,children:Fe})]}):a.jsxs(a.Fragment,{children:[Dt,Me,Fe]})})},at)})})}),(!n||i)&&$t&&typeof document<"u"&&S==="on"&&(()=>{const Qe=(d?document.getElementById(d):null)??document.body;return qn.createPortal(a.jsx("div",{style:Lt,"data-selection":"none",children:a.jsx(lv,{prefix:u,items:_t,index:zt,imageDisplay:cv(v),isEditor:n,isPreviewMode:i,isEditMode:o,closeIcon:Z,closeIconMaxWidth:le,closeIconColor:oe,closeIconHoverColor:ge,iconMarginRight:Se,contentMarginTop:Re,onClose:()=>mt(!1),onPrev:()=>Ee(at=>(at-1+_t.length)%_t.length),onNext:()=>Ee(at=>(at+1)%_t.length),counterClassName:Q,counterStyle:z})}),Qe)})()]})}const uv={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},pv=["hover","focus","filled","success","error"],mv=`import { Splide, SplideSlide } from '@splidejs/react-splide';
5306
5306
  import '@splidejs/react-splide/css/core';
5307
5307
  import { CommonComponentProps } from '../props';
5308
5308
  import { EmbedMediaFrame, getEmbedAspect, isEmbedMedia } from '../utils/index';
@@ -7622,12 +7622,12 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
7622
7622
  };
7623
7623
 
7624
7624
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
7625
- `,mv="01M3SBP3P8CMVMM1ZZ0QVD2PPF",rs={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},gv=["titleColor","subtitleColor","lightboxCounterColor","closeIconColor","closeIconHoverColor"],hv={type:"object",version:1,content:{type:"array",settings:{allowsCollection:!0,addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",contentKey:"title",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",contentKey:"subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},gallery:{type:"array",contentKey:"gallery",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video","vimeo","youtube"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"object",label:"Link",contentKey:"link",display:{type:"link-input"}}},required:["gallery"]},default:[{title:"Earth-orbital mission",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"Salton Sea from Above",subtitle:"Hasselblad 500 EL / Zeiss Sonnar 250 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XERA3G7J0J00XVKEXX",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"Lunar Module Pilot",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"Lunar Module 3 porch",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"Command Module",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEZCK8SJPAFXCKG8QN",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"CSM and Lunar Module LM",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"David R. Scott during EVA",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"Fourth day of the mission",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XES6MX14JTT1CF24BB",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"Landing of the Spider1",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEMGJWCYNPZ3ETQTKM",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}}]},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"]}},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"}},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"}},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:{...rs.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:{...rs.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:{...rs.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",closeIcon:mv,closeIconColor:"#FFFFFF",closeIconHoverColor:"#999999",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,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405},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,contentMarginTop:.026,closeIconMaxWidth:.03906,iconMarginRight:.026},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,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.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:"lightbox",value:"off"},then:{name:"properties.closeIcon.display.visible",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.closeIconMaxWidth.display.visible",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.closeIconColor.display.visible",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.closeIconHoverColor.display.visible",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","contentMarginTop","closeIconMaxWidth","iconMarginRight","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:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{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:[...gv],panelIds:["general","imageSettings","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor","closeIconColor","closeIconHoverColor"]}}},fv={element:cv,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.assetId",placeholderEnabled:!0}],parameters:[{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"subtitleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",subtitleFontSettings:"subtitleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"},schema:hv,sourceCode:pv},yv=50,Rc=10,Al="cntrl-lightbox-journal",Da=Al,Vs=`${Al}-`,za=e=>`${Al}-${e}`,Fl=e=>e===Da||e.startsWith(Vs),Ec=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},kc=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=Ec(t.get(za(e)));if(i)return i}const n=Ec(t.get(Da));if(n)return n;for(const[i]of t){if(!i.startsWith(Vs))continue;const o=i.slice(Vs.length);if(!/^\d+$/.test(o))continue;const r=Number.parseInt(o,10);if(Number.isFinite(r)&&r>=1)return r}return null},Ac=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},np=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{Fl(l)&&i.searchParams.delete(l)}),t?i.searchParams.set(za(t),String(e)):i.searchParams.set(Da,String(e));const o=n?"replaceState":"pushState",r=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",r)},vv=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===za(e)||i===Da:Fl(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)}},ip=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(za(e)):[...t.keys()].some(n=>Fl(n))},xv=(e,t)=>{if(ip(t)){if(e){window.history.back();return}vv(t)}},bv=20,Sv=2,as=e=>`max(${e}, ${bv}px)`,Lo=e=>((e==null?void 0:e.image)??[]).slice(0,Sv),op=e=>e.reduce((t,n)=>t+Lo(n).length,0),wv=(e,t)=>{const n=e.slice(0,t).reduce((o,r)=>o+Lo(r).length,1),i=Lo(e[t]).length;return{start:n,end:n+i-1}},$v=(e,t)=>{const n=op(e),{start:i,end:o}=wv(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},pa=(e,t)=>t==="B"?e.flatMap((n,i)=>Lo(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Lo(n)})),Cv=(e,t,n,i)=>{var r;if(n==="B")return`${t+1} / ${e.length}`;const o=((r=e[t])==null?void 0:r.entryIndex)??0;return $v(i,o)},Fc=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Tv=(e,t,n)=>e==="B"?t.length>1:op(n)>1,Pn=.004,ii=.004,So={title1Width:.13,title2Width:.13,title3Width:.14},Ti=(e,t,n,i,o)=>{const r=[];return t.title1&&r.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&r.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&r.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),r},Mo=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},c)=>{if(r<=0||c<=0)return{overflow:r,widths:[c,...l]};const d=Math.min(r,c);return{overflow:r-d,widths:[c-d,...l]}},{overflow:i-1,widths:[]});return o},vr=(e,t)=>Mo(e,t),vn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Ii=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Mo(e.length,n),effective:vr(e.length,n)}},rp=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),ap=(e,t,n,i)=>e.slice(0,i+1).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),Ri=["title1","title2","title3","count"],St=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Nl={title1:"1",title2:"2",title3:"3",count:"Count"},_l=e=>[St(e,"fontFamily"),St(e,"fontSettings"),{type:"row",items:[St(e,"fontSize"),St(e,"lineHeight"),St(e,"letterSpacing"),St(e,"wordSpacing")]},St(e,"textAlign"),St(e,"textAppearance")],Iv=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Ri.map(e=>[Nl[e],_l(e)]))}),Lv={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Mv={title1:.02,title2:.02,title3:.02,count:.017},Vi=(e,t)=>{const n=i=>{const o=St(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[Lv[t]]}},Gi=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??Mv[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return nn(i,n)};function sp({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l}){const{title1Width:c,title2Width:d,title3Width:u,title1MarginLeft:p=0,title2MarginLeft:y=0,title3MarginLeft:x=0,titleRowMarginBottom:m=0,titleHeaderLayout:f="desktop",contentMarginTop:S=0,iconMarginRight:w=0,closeIcon:N=null,closeIconMaxWidth:v=0,closeIconColor:M="#000000",closeIconHoverColor:R="#cccccc"}=n,U=b.scalingValue(S,i),X=b.scalingValue(Math.max(S,ii),i),D=b.scalingValue(w,i),_=b.scalingValue(m,i),W=f==="mobile",T=Gi("title1",Vi(n,"title1"),i),C=Gi("title2",Vi(n,"title2"),i),q=Gi("title3",Vi(n,"title3"),i),E=s.useMemo(()=>({title1Width:c??So.title1Width,title2Width:d??So.title2Width,title3Width:u??So.title3Width}),[c,d,u]),$=s.useMemo(()=>({title2MarginLeft:y,title3MarginLeft:x}),[y,x]),I=s.useMemo(()=>Ti(e,t,T,C,q),[e,t,T,C,q]),j=s.useMemo(()=>I.map(H=>E[H.widthKey]),[I,E]),F=s.useMemo(()=>Mo(I.length,j),[I.length,j]),K=s.useMemo(()=>vr(I.length,j),[I.length,j]),P=s.useMemo(()=>I.filter(H=>H.prefix==="title1"),[I]),h=s.useMemo(()=>I.filter(H=>H.prefix==="title2"||H.prefix==="title3"),[I]),J=s.useMemo(()=>Ii(P,E),[P,E]),V=s.useMemo(()=>Ii(h,E),[h,E]),he=!!(t.title1||t.title2||t.title3),k=N!==null;if(!(he||k))return null;const L=(p??0)>0||o,me=(H,be)=>{const re=I.findIndex(Pe=>Pe.prefix===H.prefix);if(!W||be==="single-row")return{effectiveWidth:K[re]??0,resolvedWidth:F[re]??0,maxWidth:vn(re,F)};if(be==="two-row-top"){const Pe=P.findIndex(Ae=>Ae.prefix===H.prefix);return{effectiveWidth:J.effective[Pe]??0,resolvedWidth:J.resolved[Pe]??0,maxWidth:vn(Pe,J.resolved)}}const Q=h.findIndex(Pe=>Pe.prefix===H.prefix);return{effectiveWidth:V.effective[Q]??0,resolvedWidth:V.resolved[Q]??0,maxWidth:vn(Q,V.resolved)}},te=(H,be,re)=>{if(!W||re==="single-row"){const Xe=H.findIndex(xe=>xe.prefix===be.prefix),Ue=H.map(xe=>E[xe.widthKey]),Je=Mo(H.length,Ue);return{effectiveWidth:vr(H.length,Ue)[Xe]??0,resolvedWidth:Je[Xe]??0,maxWidth:vn(Xe,Je)}}if(re==="two-row-top"){const Xe=H.filter(xe=>xe.prefix==="title1"),Ue=Xe.findIndex(xe=>xe.prefix===be.prefix),{resolved:Je,effective:je}=Ii(Xe,E);return{effectiveWidth:je[Ue]??0,resolvedWidth:Je[Ue]??0,maxWidth:vn(Ue,Je)}}const Q=H.filter(Xe=>Xe.prefix==="title2"||Xe.prefix==="title3"),Pe=Q.findIndex(Xe=>Xe.prefix===be.prefix),{resolved:Ae,effective:He}=Ii(Q,E);return{effectiveWidth:He[Pe]??0,resolvedWidth:Ae[Pe]??0,maxWidth:vn(Pe,Ae)}},ve=H=>ap(I,F,$,H)+(W?0:p??0),Le=()=>W?0:p??0,de=H=>h.slice(0,H).reduce((be,re,Q)=>be+(re.marginLeftKey?$[re.marginLeftKey]??0:0)+(V.resolved[Q]??0),0),ue=H=>{const be=h[H];return de(H)+(be.marginLeftKey?$[be.marginLeftKey]??0:0)+(V.resolved[H]??0)},Z=(H,be,re)=>{const Q=H.marginLeftKey?$[H.marginLeftKey]??0:0,{effectiveWidth:Pe,resolvedWidth:Ae,maxWidth:He}=re??me(H,be),Xe=Math.max(Q,ii),Ue=o&&be==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":H.prefix,style:{width:b.scalingValue(Pe,i),...Q>0?{marginLeft:b.scalingValue(Q,i)}:{}},children:[a.jsx("p",{className:H.className,style:H.style,children:H.text}),Ue&&H.marginLeftKey?a.jsx("div",{"data-controls":H.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ae),style:{position:"absolute",top:0,left:b.scalingValue(-Q,i),width:b.scalingValue(Xe,i),height:"100%",pointerEvents:"auto"}}):null,Ue?a.jsx("div",{"data-controls":H.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(He),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:b.scalingValue(-Pn/2,i),width:b.scalingValue(Pn,i),height:"100%",pointerEvents:"auto"}}):null]},H.className)},le=(H="two-row")=>{const be=I.findIndex(Pe=>Pe.prefix==="title1"),re=be>=0?F[be]:E.title1Width,Q=H==="two-row"&&o;return a.jsx("div",{...Q?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(re)}:{},style:{width:b.scalingValue(p??0,i),flexShrink:0,alignSelf:"stretch",...Q?{pointerEvents:"auto"}:{}}})},oe=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:T,"aria-hidden":"true",children:" "}),ge=H=>{const be=Ti(e,H,T,C,q);return a.jsx(a.Fragment,{children:be.map(re=>Z(re,"single-row",te(be,re,"single-row")))})},Se=H=>{const be=Ti(e,H,T,C,q),re=be.find(Q=>Q.prefix==="title1");return re?Z(re,"two-row-top",te(be,re,"two-row-top")):null},Ee=(H,be=!1)=>{const re=Ti(e,H,T,C,q),Q=re.filter(He=>He.prefix==="title2"||He.prefix==="title3"),Pe=o&&be;return Q.length>0||Pe||(m??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[Q.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[a.jsx("div",{className:`${e}-titles-stack`,children:Q.map(He=>Z(He,"two-row-bottom",te(re,He,"two-row-bottom")))}),be&&o?a.jsxs(a.Fragment,{children:[ye(),ne()]}):null]}):null,(m??0)>0||Pe?a.jsx("div",{"data-controls":Pe?"titleRowMarginBottom":void 0,"data-controls-axis":Pe?"y":void 0,"data-controls-reverse":Pe?"":void 0,className:Pe?`${e}-control`:void 0,style:{height:_,width:"100%",flexShrink:0,pointerEvents:Pe?"auto":"none"}}):null]}):null},Ne=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:b.scalingValue(v??0,i),height:b.scalingValue(v??0,i),marginRight:D,"--close-icon-hover-color":R},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:H=>{H.stopPropagation(),l==null||l()},"aria-label":"Close",children:a.jsx(mn,{url:N??"",fill:M,hoverFill:i&&!r?M:R,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:D,height:"100%",pointerEvents:"auto"}})]}),Te=()=>k?a.jsx("div",{className:`${e}-titles-row-header-controls`,children:Ne()}):null,Ce=H=>a.jsx("div",{className:`${e}-titles-row-titles`,children:a.jsx("div",{className:`${e}-titles-stack`,children:H})}),g=H=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[k||he?oe():null,L?le("two-row"):null,Ce(H),Te()]}),Y=(H,be=!1)=>a.jsxs(a.Fragment,{children:[g(Se(H)),Ee(H,be)]}),ee=()=>{const H=W?-1:I.findIndex(Q=>Q.prefix==="title1"),be=!W&&(o||(p??0)>0)?(()=>{const Q=p??0,Pe=H>=0?F[H]:E.title1Width,Ae=Math.max(Q,ii);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Pe),style:{position:"absolute",top:0,left:0,width:b.scalingValue(Ae,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,re=I.flatMap((Q,Pe)=>{if(!Q.marginLeftKey)return[];const Ae=$[Q.marginLeftKey]??0,He=rp(I,F,$,Pe)+Le(),Xe=Math.max(Ae,ii);return a.jsx("div",{"data-controls":Q.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(F[Pe]),style:{position:"absolute",top:0,left:b.scalingValue(He,i),width:b.scalingValue(Xe,i),height:"100%",pointerEvents:"auto"}},Q.marginLeftKey)});return be?[be,...re]:re},ae=()=>I.map((H,be)=>{const re=vn(be,F),Pe=ve(be)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":H.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(re),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:b.scalingValue(Pe,i),width:b.scalingValue(Pn,i),height:"100%",pointerEvents:"auto"}})},`${H.widthKey}-junction`)}),ye=()=>h.flatMap((H,be)=>{if(!H.marginLeftKey)return[];const re=$[H.marginLeftKey]??0,Q=de(be),Pe=Math.max(re,ii),{resolvedWidth:Ae}=me(H,"two-row-bottom");return a.jsx("div",{"data-controls":H.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ae),style:{position:"absolute",top:0,left:b.scalingValue(Q,i),width:b.scalingValue(Pe,i),height:"100%",pointerEvents:"auto"}},H.marginLeftKey)}),ne=()=>h.map((H,be)=>{const{maxWidth:re}=me(H,"two-row-bottom"),Pe=ue(be)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":H.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(re),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:b.scalingValue(Pe,i),width:b.scalingValue(Pn,i),height:"100%",pointerEvents:"auto"}})},`${H.widthKey}-junction`)}),B=()=>!o||W?null:a.jsxs(a.Fragment,{children:[ee(),ae()]}),G=!!(t.title2||t.title3||(m??0)>0||o),z=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[k||he?oe():null,L?le("single-row"):null,he?Ce(ge(t)):a.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),Te(),B()]}),ie=()=>a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...G?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:G?void 0:{flex:"0 0 auto",height:"auto"},children:Y(t,!0)}),B()]});return a.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:U,flexShrink:0},children:o&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-min":"0",className:`${e}-control`,style:{position:"absolute",top:0,left:0,width:"100%",height:X,pointerEvents:"auto"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...W?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${W?` ${e}-lightbox-content-area-stacked`:""}`,children:a.jsx("div",{className:`${e}-text-bar-cell${W?` ${e}-text-bar-cell-stacked`:""}`,style:W?void 0:{flex:1,minWidth:0,width:"100%"},children:W?ie():z()})})})]})}function Pv(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Rv(e){return`
7625
+ `,gv="01M3SBP3P8CMVMM1ZZ0QVD2PPF",as={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},hv=["titleColor","subtitleColor","lightboxCounterColor","closeIconColor","closeIconHoverColor"],fv={type:"object",version:1,content:{type:"array",settings:{allowsCollection:!0,addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",contentKey:"title",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",contentKey:"subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},gallery:{type:"array",contentKey:"gallery",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video","vimeo","youtube"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"object",label:"Link",contentKey:"link",display:{type:"link-input"}}},required:["gallery"]},default:[{title:"Earth-orbital mission",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"Salton Sea from Above",subtitle:"Hasselblad 500 EL / Zeiss Sonnar 250 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XERA3G7J0J00XVKEXX",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"Lunar Module Pilot",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"Lunar Module 3 porch",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"Command Module",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEZCK8SJPAFXCKG8QN",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"CSM and Lunar Module LM",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"David R. Scott during EVA",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"Fourth day of the mission",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XES6MX14JTT1CF24BB",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"Landing of the Spider1",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEMGJWCYNPZ3ETQTKM",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}}]},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"]}},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"}},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"}},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:{...as.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:{...as.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:{...as.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",closeIcon:gv,closeIconColor:"#FFFFFF",closeIconHoverColor:"#999999",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,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405},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,contentMarginTop:.026,closeIconMaxWidth:.03906,iconMarginRight:.026},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,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.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:"lightbox",value:"off"},then:{name:"properties.closeIcon.display.visible",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.closeIconMaxWidth.display.visible",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.closeIconColor.display.visible",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.closeIconHoverColor.display.visible",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","contentMarginTop","closeIconMaxWidth","iconMarginRight","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:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{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:[...hv],panelIds:["general","imageSettings","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor","closeIconColor","closeIconHoverColor"]}}},yv={element:dv,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.assetId",placeholderEnabled:!0}],parameters:[{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"subtitleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",subtitleFontSettings:"subtitleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"},schema:fv,sourceCode:mv},vv=50,Rc=10,Fl="cntrl-lightbox-journal",za=Fl,Gs=`${Fl}-`,Ba=e=>`${Fl}-${e}`,Nl=e=>e===za||e.startsWith(Gs),kc=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Ac=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=kc(t.get(Ba(e)));if(i)return i}const n=kc(t.get(za));if(n)return n;for(const[i]of t){if(!i.startsWith(Gs))continue;const o=i.slice(Gs.length);if(!/^\d+$/.test(o))continue;const r=Number.parseInt(o,10);if(Number.isFinite(r)&&r>=1)return r}return null},Fc=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},ip=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{Nl(l)&&i.searchParams.delete(l)}),t?i.searchParams.set(Ba(t),String(e)):i.searchParams.set(za,String(e));const o=n?"replaceState":"pushState",r=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",r)},xv=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===Ba(e)||i===za:Nl(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)}},op=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(Ba(e)):[...t.keys()].some(n=>Nl(n))},bv=(e,t)=>{if(op(t)){if(e){window.history.back();return}xv(t)}},Sv=20,wv=2,ss=e=>`max(${e}, ${Sv}px)`,Lo=e=>((e==null?void 0:e.image)??[]).slice(0,wv),rp=e=>e.reduce((t,n)=>t+Lo(n).length,0),$v=(e,t)=>{const n=e.slice(0,t).reduce((o,r)=>o+Lo(r).length,1),i=Lo(e[t]).length;return{start:n,end:n+i-1}},Cv=(e,t)=>{const n=rp(e),{start:i,end:o}=$v(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},ma=(e,t)=>t==="B"?e.flatMap((n,i)=>Lo(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Lo(n)})),Tv=(e,t,n,i)=>{var r;if(n==="B")return`${t+1} / ${e.length}`;const o=((r=e[t])==null?void 0:r.entryIndex)??0;return Cv(i,o)},Nc=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Iv=(e,t,n)=>e==="B"?t.length>1:rp(n)>1,Pn=.004,ii=.004,So={title1Width:.13,title2Width:.13,title3Width:.14},Ti=(e,t,n,i,o)=>{const r=[];return t.title1&&r.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&r.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&r.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),r},Mo=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},c)=>{if(r<=0||c<=0)return{overflow:r,widths:[c,...l]};const d=Math.min(r,c);return{overflow:r-d,widths:[c-d,...l]}},{overflow:i-1,widths:[]});return o},vr=(e,t)=>Mo(e,t),vn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Ii=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Mo(e.length,n),effective:vr(e.length,n)}},ap=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),sp=(e,t,n,i)=>e.slice(0,i+1).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),Ei=["title1","title2","title3","count"],St=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,_l={title1:"1",title2:"2",title3:"3",count:"Count"},Hl=e=>[St(e,"fontFamily"),St(e,"fontSettings"),{type:"row",items:[St(e,"fontSize"),St(e,"lineHeight"),St(e,"letterSpacing"),St(e,"wordSpacing")]},St(e,"textAlign"),St(e,"textAppearance")],Lv=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Ei.map(e=>[_l[e],Hl(e)]))}),Mv={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Pv={title1:.02,title2:.02,title3:.02,count:.017},Vi=(e,t)=>{const n=i=>{const o=St(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[Mv[t]]}},Gi=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??Pv[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return nn(i,n)};function lp({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l}){const{title1Width:c,title2Width:d,title3Width:u,title1MarginLeft:p=0,title2MarginLeft:y=0,title3MarginLeft:x=0,titleRowMarginBottom:m=0,titleHeaderLayout:f="desktop",contentMarginTop:S=0,iconMarginRight:w=0,closeIcon:N=null,closeIconMaxWidth:v=0,closeIconColor:M="#000000",closeIconHoverColor:E="#cccccc"}=n,U=b.scalingValue(S,i),X=b.scalingValue(Math.max(S,ii),i),D=b.scalingValue(w,i),_=b.scalingValue(m,i),W=f==="mobile",T=Gi("title1",Vi(n,"title1"),i),C=Gi("title2",Vi(n,"title2"),i),q=Gi("title3",Vi(n,"title3"),i),R=s.useMemo(()=>({title1Width:c??So.title1Width,title2Width:d??So.title2Width,title3Width:u??So.title3Width}),[c,d,u]),$=s.useMemo(()=>({title2MarginLeft:y,title3MarginLeft:x}),[y,x]),I=s.useMemo(()=>Ti(e,t,T,C,q),[e,t,T,C,q]),j=s.useMemo(()=>I.map(H=>R[H.widthKey]),[I,R]),F=s.useMemo(()=>Mo(I.length,j),[I.length,j]),K=s.useMemo(()=>vr(I.length,j),[I.length,j]),P=s.useMemo(()=>I.filter(H=>H.prefix==="title1"),[I]),h=s.useMemo(()=>I.filter(H=>H.prefix==="title2"||H.prefix==="title3"),[I]),J=s.useMemo(()=>Ii(P,R),[P,R]),V=s.useMemo(()=>Ii(h,R),[h,R]),he=!!(t.title1||t.title2||t.title3),k=N!==null;if(!(he||k))return null;const L=(p??0)>0||o,me=(H,be)=>{const re=I.findIndex(Pe=>Pe.prefix===H.prefix);if(!W||be==="single-row")return{effectiveWidth:K[re]??0,resolvedWidth:F[re]??0,maxWidth:vn(re,F)};if(be==="two-row-top"){const Pe=P.findIndex(Ae=>Ae.prefix===H.prefix);return{effectiveWidth:J.effective[Pe]??0,resolvedWidth:J.resolved[Pe]??0,maxWidth:vn(Pe,J.resolved)}}const Q=h.findIndex(Pe=>Pe.prefix===H.prefix);return{effectiveWidth:V.effective[Q]??0,resolvedWidth:V.resolved[Q]??0,maxWidth:vn(Q,V.resolved)}},te=(H,be,re)=>{if(!W||re==="single-row"){const Xe=H.findIndex(xe=>xe.prefix===be.prefix),Ue=H.map(xe=>R[xe.widthKey]),Je=Mo(H.length,Ue);return{effectiveWidth:vr(H.length,Ue)[Xe]??0,resolvedWidth:Je[Xe]??0,maxWidth:vn(Xe,Je)}}if(re==="two-row-top"){const Xe=H.filter(xe=>xe.prefix==="title1"),Ue=Xe.findIndex(xe=>xe.prefix===be.prefix),{resolved:Je,effective:je}=Ii(Xe,R);return{effectiveWidth:je[Ue]??0,resolvedWidth:Je[Ue]??0,maxWidth:vn(Ue,Je)}}const Q=H.filter(Xe=>Xe.prefix==="title2"||Xe.prefix==="title3"),Pe=Q.findIndex(Xe=>Xe.prefix===be.prefix),{resolved:Ae,effective:He}=Ii(Q,R);return{effectiveWidth:He[Pe]??0,resolvedWidth:Ae[Pe]??0,maxWidth:vn(Pe,Ae)}},ve=H=>sp(I,F,$,H)+(W?0:p??0),Le=()=>W?0:p??0,de=H=>h.slice(0,H).reduce((be,re,Q)=>be+(re.marginLeftKey?$[re.marginLeftKey]??0:0)+(V.resolved[Q]??0),0),ue=H=>{const be=h[H];return de(H)+(be.marginLeftKey?$[be.marginLeftKey]??0:0)+(V.resolved[H]??0)},Z=(H,be,re)=>{const Q=H.marginLeftKey?$[H.marginLeftKey]??0:0,{effectiveWidth:Pe,resolvedWidth:Ae,maxWidth:He}=re??me(H,be),Xe=Math.max(Q,ii),Ue=o&&be==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":H.prefix,style:{width:b.scalingValue(Pe,i),...Q>0?{marginLeft:b.scalingValue(Q,i)}:{}},children:[a.jsx("p",{className:H.className,style:H.style,children:H.text}),Ue&&H.marginLeftKey?a.jsx("div",{"data-controls":H.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ae),style:{position:"absolute",top:0,left:b.scalingValue(-Q,i),width:b.scalingValue(Xe,i),height:"100%",pointerEvents:"auto"}}):null,Ue?a.jsx("div",{"data-controls":H.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(He),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:b.scalingValue(-Pn/2,i),width:b.scalingValue(Pn,i),height:"100%",pointerEvents:"auto"}}):null]},H.className)},le=(H="two-row")=>{const be=I.findIndex(Pe=>Pe.prefix==="title1"),re=be>=0?F[be]:R.title1Width,Q=H==="two-row"&&o;return a.jsx("div",{...Q?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(re)}:{},style:{width:b.scalingValue(p??0,i),flexShrink:0,alignSelf:"stretch",...Q?{pointerEvents:"auto"}:{}}})},oe=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:T,"aria-hidden":"true",children:" "}),ge=H=>{const be=Ti(e,H,T,C,q);return a.jsx(a.Fragment,{children:be.map(re=>Z(re,"single-row",te(be,re,"single-row")))})},Se=H=>{const be=Ti(e,H,T,C,q),re=be.find(Q=>Q.prefix==="title1");return re?Z(re,"two-row-top",te(be,re,"two-row-top")):null},Re=(H,be=!1)=>{const re=Ti(e,H,T,C,q),Q=re.filter(He=>He.prefix==="title2"||He.prefix==="title3"),Pe=o&&be;return Q.length>0||Pe||(m??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[Q.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[a.jsx("div",{className:`${e}-titles-stack`,children:Q.map(He=>Z(He,"two-row-bottom",te(re,He,"two-row-bottom")))}),be&&o?a.jsxs(a.Fragment,{children:[ye(),ne()]}):null]}):null,(m??0)>0||Pe?a.jsx("div",{"data-controls":Pe?"titleRowMarginBottom":void 0,"data-controls-axis":Pe?"y":void 0,"data-controls-reverse":Pe?"":void 0,className:Pe?`${e}-control`:void 0,style:{height:_,width:"100%",flexShrink:0,pointerEvents:Pe?"auto":"none"}}):null]}):null},Ne=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:b.scalingValue(v??0,i),height:b.scalingValue(v??0,i),marginRight:D,"--close-icon-hover-color":E},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:H=>{H.stopPropagation(),l==null||l()},"aria-label":"Close",children:a.jsx(mn,{url:N??"",fill:M,hoverFill:i&&!r?M:E,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:D,height:"100%",pointerEvents:"auto"}})]}),Te=()=>k?a.jsx("div",{className:`${e}-titles-row-header-controls`,children:Ne()}):null,Ce=H=>a.jsx("div",{className:`${e}-titles-row-titles`,children:a.jsx("div",{className:`${e}-titles-stack`,children:H})}),g=H=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[k||he?oe():null,L?le("two-row"):null,Ce(H),Te()]}),Y=(H,be=!1)=>a.jsxs(a.Fragment,{children:[g(Se(H)),Re(H,be)]}),ee=()=>{const H=W?-1:I.findIndex(Q=>Q.prefix==="title1"),be=!W&&(o||(p??0)>0)?(()=>{const Q=p??0,Pe=H>=0?F[H]:R.title1Width,Ae=Math.max(Q,ii);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Pe),style:{position:"absolute",top:0,left:0,width:b.scalingValue(Ae,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,re=I.flatMap((Q,Pe)=>{if(!Q.marginLeftKey)return[];const Ae=$[Q.marginLeftKey]??0,He=ap(I,F,$,Pe)+Le(),Xe=Math.max(Ae,ii);return a.jsx("div",{"data-controls":Q.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(F[Pe]),style:{position:"absolute",top:0,left:b.scalingValue(He,i),width:b.scalingValue(Xe,i),height:"100%",pointerEvents:"auto"}},Q.marginLeftKey)});return be?[be,...re]:re},ae=()=>I.map((H,be)=>{const re=vn(be,F),Pe=ve(be)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":H.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(re),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:b.scalingValue(Pe,i),width:b.scalingValue(Pn,i),height:"100%",pointerEvents:"auto"}})},`${H.widthKey}-junction`)}),ye=()=>h.flatMap((H,be)=>{if(!H.marginLeftKey)return[];const re=$[H.marginLeftKey]??0,Q=de(be),Pe=Math.max(re,ii),{resolvedWidth:Ae}=me(H,"two-row-bottom");return a.jsx("div",{"data-controls":H.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ae),style:{position:"absolute",top:0,left:b.scalingValue(Q,i),width:b.scalingValue(Pe,i),height:"100%",pointerEvents:"auto"}},H.marginLeftKey)}),ne=()=>h.map((H,be)=>{const{maxWidth:re}=me(H,"two-row-bottom"),Pe=ue(be)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":H.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(re),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:b.scalingValue(Pe,i),width:b.scalingValue(Pn,i),height:"100%",pointerEvents:"auto"}})},`${H.widthKey}-junction`)}),B=()=>!o||W?null:a.jsxs(a.Fragment,{children:[ee(),ae()]}),G=!!(t.title2||t.title3||(m??0)>0||o),z=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[k||he?oe():null,L?le("single-row"):null,he?Ce(ge(t)):a.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),Te(),B()]}),ie=()=>a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...G?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:G?void 0:{flex:"0 0 auto",height:"auto"},children:Y(t,!0)}),B()]});return a.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:U,flexShrink:0},children:o&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-min":"0",className:`${e}-control`,style:{position:"absolute",top:0,left:0,width:"100%",height:X,pointerEvents:"auto"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...W?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${W?` ${e}-lightbox-content-area-stacked`:""}`,children:a.jsx("div",{className:`${e}-text-bar-cell${W?` ${e}-text-bar-cell-stacked`:""}`,style:W?void 0:{flex:1,minWidth:0,width:"100%"},children:W?ie():z()})})})]})}function Ev(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Rv(e){return`
7626
7626
  .${e}-wrapper {
7627
7627
  display: grid;
7628
7628
  align-items: start;
7629
7629
  justify-content: center;
7630
- min-height: ${Pv(48)};
7630
+ min-height: ${Ev(48)};
7631
7631
  }
7632
7632
  .${e}-item {
7633
7633
  display: flex;
@@ -7942,7 +7942,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
7942
7942
  pointer-events: auto;
7943
7943
  flex-shrink: 0;
7944
7944
  }
7945
- `}const Nc={assetId:"",name:"",objectFit:"cover"},On=500,qo=650,Cn="cubic-bezier(0.22, 1, 0.36, 1)",Ev=72,kv=50,Av=1e4,Fv=650,Nv=500;function _v(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function lp(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=Sa(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 Hv(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?lp(i,n):null}function Wv(e){return e.reduce((t,n,i)=>{const o=Hl(n.gallery),l=Wl(o).filter(c=>c.lightboxMedia).map(c=>c.lightboxMedia);return l.length===0||t.push({gridIndex:i,items:l,entry:{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}),t},[])}function ir(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 _c(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return ir(e,i,n)}const Ov=.03;function cp(e){return e.width*Ov}const ss={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Br(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Hc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Dv(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Gs(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,c=o/r;if(l>c){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const d=r*l;return{width:d,height:r,left:i.left+(o-d)/2,top:i.top}}function zv(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Gs(e,t.width,t.height)}function Bv(e,t){if(b.isEmbedMedia(e)){t(e.assetId,b.getEmbedAspect(e),1);return}if(Bo(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.assetId,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.assetId,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.assetId,n.naturalWidth,n.naturalHeight)},n.src=e.assetId}function jv(e){const t=new Set,n=[];for(const i of e){const o=Hl(i.gallery),r=Wl(o);for(const l of r)for(const c of[l.displayMedia,l.lightboxMedia])c!=null&&c.assetId&&!t.has(c.assetId)&&(t.add(c.assetId),n.push(c))}return n}function Vv({mediaList:e}){const t=e.filter(n=>!b.isEmbedMedia(n));return t.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:t.map(n=>Bo(n)?a.jsx("video",{src:n.assetId,preload:"auto",muted:!0,playsInline:!0},n.assetId):a.jsx("img",{src:n.assetId,alt:""},n.assetId))})}function Po(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:c}=n,d=cp(n);return t==="left"?{left:l+d-i,top:r,width:i,height:o}:{left:l+c-d,top:r,width:i,height:o}}function wa(e,t,n){const i=Po(e,t,n);return{...i,left:2*i.left-e.left}}function Gv(e,t,n){const{left:i,width:o}=n,r=cp(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function dp(e,t,n,i){const o=Po(e,"left",i),r=Po(e,"right",i),l=wa(e,"left",i),c=wa(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:c,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:c};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function Xv(e,t,n,i){const{start:o,end:r}=dp(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function Uv(e,t,n){const i=Po(e,t,n),o=wa(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function up(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 Hl(e){if(!e)return;if(up(e))return e;if(!Array.isArray(e))return;const[t,n]=e,i=t!=null&&t.assetId?t:void 0,o=n!=null&&n.assetId?n:void 0;if(!(!i&&!o))return[{media:[o??i??Nc,i??o??Nc]}]}function qv(e){const[t,n]=e.media;return n!=null&&n.assetId?n:t!=null&&t.assetId?t:null}function Kv(e){const[t]=e.media;return t!=null&&t.assetId?t:null}function Wl(e){if(!Array.isArray(e)||e.length===0)return[];if(up(e)){const t=[];for(const n of e){const i=qv(n);if(!i)continue;const o=Kv(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.assetId?o:null})}return t}return e.filter(t=>t==null?void 0:t.assetId).map(t=>({displayMedia:t,lightboxMedia:t}))}function Bo(e){return b.isEmbedMedia(e)?!1:e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.assetId)}function Yv({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return b.isEmbedMedia(e)?a.jsx(b.EmbedMediaFrame,{media:e,mode:"background",fit:n.objectFit==="contain"?"contain":"cover",className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o}):Bo(e)?a.jsx("video",{src:e.assetId,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onClick:o}):a.jsx("img",{src:e.assetId,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function Qv({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:r,onTransitionEnd:l}){const c=s.useRef(null);return s.useEffect(()=>{const d=c.current;return n==null||n(d??null),()=>{d==null||d.pause(),n==null||n(null)}},[e,n]),a.jsx("div",{style:i,onTransitionEnd:l,children:a.jsx("video",{ref:c,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:r,onClick:d=>d.stopPropagation(),style:o},e)})}function jr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return b.isEmbedMedia(e)?a.jsx("img",{src:e.thumbnail,alt:e.name,style:t,onTransitionEnd:n}):Bo(e)?a.jsx("video",{src:e.assetId,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.assetId,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.assetId,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.assetId,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function Zv({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,canNavigate:d,lightboxEntries:u,entryIdx:p,layoutId:y,sourceRect:x,resolveCloseSourceRect:m,onClose:f,onPrev:S,onNext:w}){const N=s.useRef(null),v=s.useRef(null),M=s.useRef(null),R=s.useRef(new Map),[U,X]=s.useState(0),D=s.useRef(null),_=s.useRef(0),W=s.useRef(0),T=s.useRef("none"),C=s.useRef(!1),q=s.useRef(!1),E=s.useRef(!1),$=s.useRef(null),I=s.useRef(null),j=s.useRef(null),F=s.useRef(()=>{}),K=s.useRef(null),P=s.useRef(null),h=s.useRef(null),J=s.useRef(!1),[V,he]=s.useState(null),[k,ce]=s.useState(ss),[L,me]=s.useState(0),[te,ve]=s.useState("opening"),[Le,de]=s.useState(0),[ue,Z]=s.useState(0),[le,oe]=s.useState(!1),[ge,Se]=s.useState(null),[Ee,Ne]=s.useState(null),[Te,Ce]=s.useState(null),[g,Y]=s.useState(!1),[ee,ae]=s.useState(null),[ye,ne]=s.useState(!1),B=s.useRef(!1),[G,z]=s.useState(!1),[ie,H]=s.useState(!1),be=s.useRef(n),re=s.useRef(void 0),Q=t[n],Pe=Q?Bo(Q):!1,Ae=Q?b.isEmbedMedia(Q):!1,He=ue!==0||le,Xe=!l&&(!r||!!c),Ue=d&&!l,Je=u.length>1,je=s.useCallback((O,Me)=>t.length<=1?null:t[(O+Me+t.length)%t.length]??null,[t]),xe=Je?ir(u,p,-1):je(n,-1),Ie=Je?ir(u,p,1):je(n,1),ze=ge===-1&&He?Je&&Ee!==null?ir(u,Ee,-1):Te!==null?je(Te,-1):null:null,Ze=ge===1&&He?Je&&Ee!==null?ir(u,Ee,1):Te!==null?je(Te,1):null:null,tt=ze&&ze.assetId!==(xe==null?void 0:xe.assetId)?ze:null,ot=Ze&&Ze.assetId!==(Ie==null?void 0:Ie.assetId)?Ze:null,lt=xe&&Ue?(()=>{const O=Je?_c(u,p,-1):t.length>2?je((n-1+t.length)%t.length,-1):null;return O&&O.assetId!==xe.assetId?O:null})():null,it=Ie&&Ue?(()=>{const O=Je?_c(u,p,1):t.length>2?je((n+1)%t.length,1):null;return O&&O.assetId!==Ie.assetId?O:null})():null,xt=tt??lt,rt=ot??it,_e=s.useCallback((O,Me,Fe)=>{if(!O||!Me||!Fe)return;const Oe=R.current,ft=Oe.get(O);(ft==null?void 0:ft.width)===Me&&(ft==null?void 0:ft.height)===Fe||(Oe.set(O,{width:Me,height:Fe}),X(Tt=>Tt+1))},[]),We=s.useCallback(O=>{if(!(O!=null&&O.assetId))return null;const Me=R.current.get(O.assetId);return zv(v.current,Me)},[U,L]),vt=s.useCallback(()=>{if(!Q)return;const O=We(Q);if(O){he(O);return}const Me=v.current;Me&&he(Hc(Me))},[Q,We]),Ve=s.useCallback(O=>{if(Je){const Me=u.length;Ne((p+O+Me)%Me),Ce(null);return}t.length>1&&(Ce((n+O+t.length)%t.length),Ne(null))},[Je,u.length,p,t.length,n]),Ke=s.useCallback(O=>{E.current=O,oe(O)},[]),pe=s.useCallback(()=>{$.current!==null&&(window.clearTimeout($.current),$.current=null)},[]),De=s.useCallback(()=>{pe(),$.current=window.setTimeout(()=>{pe(),Ke(!1)},qo+32)},[pe,Ke]),qe=s.useCallback(()=>{const O=N.current;if(!O){ce({left:0,top:0,width:typeof window<"u"?window.innerWidth:ss.width,height:typeof window<"u"?window.innerHeight:ss.height});return}const Me=O.getBoundingClientRect();ce({left:Me.left,top:Me.top,width:Me.width,height:Me.height})},[]),bt=s.useCallback((O,Me)=>{if(He){if(G&&!le)return`translate(${ue}px, 0px)`;if(le&&ge!==null){const Fe=We(O);if(!Fe)return;const{x:Oe,y:ft}=Xv(Fe,Me,ge,k);return`translate(${Oe}px, ${ft}px)`}if(le)return"translate(0px, 0px)"}},[He,G,le,ue,ge,k,We]),yt=s.useCallback(()=>{const O=I.current;I.current=null,pe(),Ke(!1),Se(null),Ne(null),Ce(null),Z(0),z(!1),C.current=!1,W.current=0,T.current="none",O===-1?S():O===1&&w()},[pe,Ke,S,w]),Et=s.useCallback(()=>{pe(),$.current=window.setTimeout(()=>{I.current!==null&&yt()},qo+32)},[pe,yt]),ct=s.useCallback(()=>{pe(),I.current=null,Ke(!1),Se(null),Ne(null),Ce(null),Z(0),z(!1),C.current=!1,W.current=0,T.current="none"},[pe,Ke]),wt=s.useCallback(O=>{if(!(!Ue||!V)){if(E.current){if(I.current===O){j.current=O,yt();return}ct()}pe(),Ve(O),I.current=O,Se(O),Ke(!0),Et()}},[Ue,V,yt,ct,pe,Ve,Ke,Et]);F.current=wt;const nt=s.useCallback(()=>{K.current=null,J.current=!1,P.current!==null&&(window.clearInterval(P.current),P.current=null),h.current!==null&&(window.clearTimeout(h.current),h.current=null)},[]),Nt=s.useCallback(O=>{P.current!==null&&window.clearInterval(P.current);const Me=J.current?Nv:Fv;P.current=window.setInterval(()=>{F.current(O)},Me)},[]),jt=s.useCallback(O=>{K.current!==O&&(nt(),K.current=O,J.current=!1,F.current(O),Nt(O),h.current=window.setTimeout(()=>{h.current=null,K.current===O&&(J.current=!0,Nt(O))},Av))},[nt,Nt]),$e=s.useCallback(()=>{const O=v.current;if(!O)return;const Me=Q==null?void 0:Q.assetId,Fe=Me?R.current.get(Me):void 0;if(Fe!=null&&Fe.width&&(Fe!=null&&Fe.height)){he(Gs(O,Fe.width,Fe.height));return}const Oe=M.current;if(Oe&&Me&&(Oe.src===Me||Oe.currentSrc===Me)){const{width:Tt,height:et}=Dv(Oe);if(Tt&&et){_e(Me,Tt,et),he(Gs(O,Tt,et));return}}const ft=Hc(O);!ft.width||!ft.height||he(ft)},[Q==null?void 0:Q.assetId,_e]),Ge=s.useCallback(O=>{if(M.current=O,!!O){if(O instanceof HTMLVideoElement){O.readyState>=1&&O.videoWidth>0&&$e();return}O.complete&&O.naturalWidth>0&&$e()}},[$e]),ht=s.useCallback(()=>{qe(),$e(),me(O=>O+1)},[qe,$e]);s.useEffect(()=>{ht();const O=v.current,Me=N.current,Fe=new ResizeObserver(()=>ht());return O&&Fe.observe(O),Me&&Fe.observe(Me),window.addEventListener("resize",ht),()=>{Fe.disconnect(),window.removeEventListener("resize",ht)}},[ht,n,y]),s.useLayoutEffect(()=>{if(!Q)return;const O=M.current;if(O){if(O instanceof HTMLImageElement&&O.complete&&O.naturalWidth>0){$e();return}O instanceof HTMLVideoElement&&O.readyState>=1&&O.videoWidth>0&&$e()}},[Q==null?void 0:Q.assetId,n,$e]),s.useEffect(()=>{vt()},[vt,U]),s.useEffect(()=>{const O=new Set,Me=[],Fe=Oe=>{!(Oe!=null&&Oe.assetId)||O.has(Oe.assetId)||(O.add(Oe.assetId),Me.push(Oe))};t.forEach(Fe),u.forEach(Oe=>Oe.items.forEach(Fe)),Me.forEach(Oe=>{R.current.has(Oe.assetId)||Bv(Oe,_e)})},[t,u,_e]),s.useEffect(()=>{if(te!=="opening"||!V)return;if(!x){ve("open");return}Y(!1);const O=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Y(!0),ve("open")})});return()=>cancelAnimationFrame(O)},[te,V,x]),s.useEffect(()=>{if(te!=="closing")return;const O=setTimeout(()=>f(),On);return()=>clearTimeout(O)},[te,f]),s.useEffect(()=>()=>{pe()},[pe]),s.useLayoutEffect(()=>{be.current===n&&re.current===(Q==null?void 0:Q.assetId)||(pe(),I.current=null,Se(null),Ne(null),Ce(null),de(0),Z(0),Ke(!1),H(!1),z(!1),_.current=0,W.current=0,T.current="none",C.current=!1,D.current=null,q.current=!1,M.current=null,vt(),be.current=n,re.current=Q==null?void 0:Q.assetId)},[n,Q==null?void 0:Q.assetId,Ke,pe,vt]),s.useLayoutEffect(()=>{const O=j.current;O!==null&&(j.current=null,requestAnimationFrame(()=>{F.current(O)}))},[n,p,Q==null?void 0:Q.assetId]),s.useLayoutEffect(()=>{if(te==="opening"){B.current=!1,ne(!1);return}if(te!=="open"||B.current)return;if(!xe&&!Ie){B.current=!0;return}ne(!1);const O=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ne(!0),B.current=!0})});return()=>cancelAnimationFrame(O)},[te,xe==null?void 0:xe.assetId,Ie==null?void 0:Ie.assetId]),s.useEffect(()=>{if(te!=="open")return;const O=()=>{const et=Mt=>{Mt.stopPropagation(),Mt.preventDefault(),document.removeEventListener("click",et,!0)};document.addEventListener("click",et,!0)},Me=et=>{const Mt=et<0?1:-1;pe(),Ve(Mt),I.current=Mt,Se(Mt),Ke(!0),Et()},Fe=et=>{if(Math.abs(et)>kv&&Ue){Me(et);return}I.current=null,Se(null),Ne(null),Ce(null),Ke(!0),Z(0),De()},Oe=et=>{if(et.touches.length!==1||E.current)return;const Mt=et.touches[0];q.current=!0,D.current={x:Mt.clientX,y:Mt.clientY},T.current="none",W.current=0,C.current=!1},ft=et=>{if(!D.current||et.touches.length!==1||E.current)return;const Mt=et.touches[0],Ct=Mt.clientX-D.current.x,Ht=Mt.clientY-D.current.y;if(T.current==="none"){if(Math.abs(Ct)<10&&Math.abs(Ht)<10)return;if(Math.abs(Ct)>Math.abs(Ht)){if(!Ue)return;T.current="horizontal"}else if(Ht>0){if(!Xe)return;T.current="vertical"}else return}if(T.current==="horizontal"){C.current=!0,z(!0),W.current=Ct,Z(Ct),et.preventDefault();return}T.current==="vertical"&&(C.current=!0,z(!0),_.current=Ht,de(Ht),et.preventDefault())},Tt=()=>{if(!D.current)return;const et=T.current,Mt=C.current;if(Mt&&et==="horizontal")Fe(W.current),O();else if(Mt&&et==="vertical"){const Ct=_.current;if(Xe&&Ct>Ev){const Ht=window.innerHeight;_.current=Ht,H(!0),de(Ht),ve("closing")}else _.current=0,de(0);O()}else et==="horizontal"&&Math.abs(W.current)>0&&(Fe(W.current),O());D.current=null,T.current="none",W.current=0,C.current=!1,z(!1)};return document.addEventListener("touchstart",Oe,{passive:!0}),document.addEventListener("touchmove",ft,{passive:!1}),document.addEventListener("touchend",Tt),document.addEventListener("touchcancel",Tt),()=>{document.removeEventListener("touchstart",Oe),document.removeEventListener("touchmove",ft),document.removeEventListener("touchend",Tt),document.removeEventListener("touchcancel",Tt)}},[te,Ue,Ke,De,pe,Xe,Et,Ve]);const Lt=s.useCallback(()=>{const O=(m==null?void 0:m())??x??null;O&&V&&(ae(O),Y(!0)),ve("closing")},[m,x,V]);s.useEffect(()=>{const O=Oe=>{if(Oe.key==="Escape"){if(r&&c||te==="closing")return;nt(),Lt();return}if(Oe.key!=="ArrowLeft"&&Oe.key!=="ArrowRight"||te!=="open"||!Ue)return;Oe.preventDefault();const ft=Oe.key==="ArrowLeft"?-1:1;Oe.repeat&&K.current===ft||jt(ft)},Me=Oe=>{if(Oe.key!=="ArrowLeft"&&Oe.key!=="ArrowRight")return;const ft=Oe.key==="ArrowLeft"?-1:1;K.current===ft&&nt()},Fe=()=>{nt()};return window.addEventListener("keydown",O),window.addEventListener("keyup",Me),window.addEventListener("blur",Fe),()=>{window.removeEventListener("keydown",O),window.removeEventListener("keyup",Me),window.removeEventListener("blur",Fe),nt()}},[te,r,c,Lt,Ue,jt,nt]),s.useEffect(()=>{te!=="open"&&nt()},[te,nt]);const $t=()=>{te==="closing"||l||Lt()},mt=te==="open",_t=te==="closing",Ot=Le>0?Math.max(0,1-Le/500):1,zt=Le>0?Math.max(.35,1-Le/500):1,Re=s.useCallback(O=>{if(!(O.propertyName!=="transform"||!E.current)){if(I.current!==null){yt();return}pe(),Ke(!1)}},[pe,Ke,yt]),dt=te==="closing"?ee??x:x,ut=dt&&V&&(te==="opening"||_t)?_v(dt,V):void 0,kt=He&&Q?bt(Q,"center"):Le>0?`translateY(${Le}px)`:ut,Qe=V?Br(V,k):null,at=!!(dt&&V),It=at&&(te==="closing"||te==="open"&&g),At={position:"absolute",top:Qe==null?void 0:Qe.top,left:Qe==null?void 0:Qe.left,width:Qe==null?void 0:Qe.width,height:Qe==null?void 0:Qe.height,objectFit:"contain",transformOrigin:"top left",transform:kt,opacity:Le>0?zt:at?1:te==="opening"||_t?0:1,transition:G&&!le?"none":le?`transform ${qo}ms ${Cn}`:ie?`transform ${On}ms ${Cn}, opacity ${On}ms ${Cn}`:It?`transform ${On}ms ${Cn}`:te==="opening"||_t?`opacity ${On}ms ${Cn}`:"none",pointerEvents:(Pe||Ae)&&mt&&!He?"auto":"none",touchAction:(Pe||Ae)&&mt?"none":void 0,zIndex:1,overflow:Pe||Ae?"hidden":void 0},pt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:mt&&!He?"auto":"none"},Ut=(O,Me,Fe="adjacent")=>{const Oe=We(O);if(!Oe)return{display:"none"};const ft=Fe==="far"?Me==="left"?"far-left":"far-right":Me==="left"?"left-adjacent":"right-adjacent",{start:Tt}=ge!==null?dp(Oe,ft,ge,k):{start:Fe==="far"?wa(Oe,Me,k):Po(Oe,Me,k)},et=Br(Tt,k),Mt=bt(O,ft),Ct=!He&&Fe==="adjacent"&&mt&&!ye?Uv(Oe,Me,k):null,Ht=Fe==="far"&&He&&ge===(Me==="left"?-1:1),on=G&&!le?!1:le,fn=Fe==="adjacent"&&mt&&ye&&!He;return{position:"absolute",top:et.top,left:et.left,width:et.width,height:et.height,objectFit:"contain",transform:Mt??(Ct?`translate(${Ct.x}px, ${Ct.y}px)`:void 0),opacity:Fe==="far"?mt&&Ht?1:0:mt?1:0,transition:on?Fe==="far"?`transform ${qo}ms ${Cn}`:`transform ${qo}ms ${Cn}, opacity ${On}ms ${Cn}`:fn?`transform ${On}ms ${Cn}`:te==="opening"||_t?`opacity ${On}ms ${Cn}`:"none",pointerEvents:"none",zIndex:1}},qt=(O,Me)=>{const Fe=We(O);return Fe?Gv(Po(Fe,Me,k),Me,k):null},Dt=O=>Me=>{if(!l){if(q.current){q.current=!1;return}Me.stopPropagation(),wt(O)}},Vt=xe?qt(xe,"left"):null,Gt=Ie?qt(Ie,"right"):null,Bt=Vt?Br(Vt,k):null,Yt=Gt?Br(Gt,k):null;return a.jsxs("div",{ref:N,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:te==="open"?"none":void 0},onClick:$t,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:mt?Ot:0,transition:G?"none":`opacity ${On}ms ${Cn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:v,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:mt?1:0,transition:G?"none":`opacity ${On}ms ${Cn}`,pointerEvents:"none"},children:a.jsx(sp,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,onClose:$t})})]}),mt&&xt&&a.jsx(jr,{media:xt,style:Ut(xt,"left","far"),onMeasure:_e,onTransitionEnd:Re},`far-prev-${xt.assetId}`),mt&&xe&&a.jsxs(a.Fragment,{children:[a.jsx(jr,{media:xe,style:Ut(xe,"left"),onMeasure:_e,onTransitionEnd:Re},`prev-${xe.assetId}`),Bt&&a.jsx("div",{style:{position:"absolute",top:Bt.top,left:Bt.left,width:Bt.width,height:Bt.height,cursor:l||G?"default":"pointer",pointerEvents:l||G?"none":"auto",zIndex:3},onClick:Dt(-1)})]}),mt&&Ie&&a.jsxs(a.Fragment,{children:[a.jsx(jr,{media:Ie,style:Ut(Ie,"right"),onMeasure:_e,onTransitionEnd:Re},`next-${Ie.assetId}`),Yt&&a.jsx("div",{style:{position:"absolute",top:Yt.top,left:Yt.left,width:Yt.width,height:Yt.height,cursor:l||G?"default":"pointer",pointerEvents:l||G?"none":"auto",zIndex:3},onClick:Dt(1)})]}),mt&&rt&&a.jsx(jr,{media:rt,style:Ut(rt,"right","far"),onMeasure:_e,onTransitionEnd:Re},`far-next-${rt.assetId}`),V&&Q&&(Ae?a.jsx("div",{style:At,onTransitionEnd:Re,children:a.jsx(b.EmbedMediaFrame,{media:Q,mode:"player",fit:"contain",lazy:!1,interactive:mt&&!He,style:pt})},`${n}-${Q.assetId}`):Pe?a.jsx(Qv,{src:Q.assetId,phase:te,onMediaElement:Ge,wrapperStyle:At,videoStyle:pt,onLoadedMetadata:$e,onTransitionEnd:Re},`${n}-${Q.assetId}`):a.jsx("img",{ref:Ge,src:Q.assetId,alt:Q.name,onLoad:$e,onTransitionEnd:Re,style:At},`${n}-${Q.assetId}`))]})}function Jv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:c}=b.useScopedStyles(),{gridLayout:d,verticalGap:u,align:p="top",imageDisplay:y}=e,x=(y==null?void 0:y.display)==="cover",m=(y==null?void 0:y.ratioValue)??"1:1",f=(y==null?void 0:y.reversed)??!1,[S,w]=m.split(":").map(Number),M=`${f?w:S} / ${f?S:w}`,R=d.entryWidth??.2,U=d.columnsCount,X=b.scalingValue(R,n),D=b.scalingValue(d.horizontalGap??0,n),_=X,W=X,T={width:_,...x?{aspectRatio:M,height:"auto",overflow:"hidden"}:{height:"auto"}},C=x?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},q=s.useRef(null),[E,$]=s.useState(!1),[I,j]=s.useState([]),[F,K]=s.useState(0),[P,h]=s.useState(0),[J,V]=s.useState(null),[he,k]=s.useState({title1:"",title2:"",title3:""}),ce=(()=>{const Te={},Ce=q.current?getComputedStyle(q.current).getPropertyValue("--cntrl-article-width").trim():"";return Ce&&(Te["--cntrl-article-width"]=Ce),Te})(),L=!n||i||o,me=s.useMemo(()=>Rv(c),[c]),te=t??[],ve=te.length%U||U,Le=ve<U&&te.length>0,de=te.length-ve,ue=Le?Math.floor((U-ve)/2)+1:1,Z=s.useMemo(()=>Wv(te),[te]),le=s.useMemo(()=>jv(te),[te]),oe=(Te,Ce,g)=>{if(n&&!o&&!i)return;const Y=Z.findIndex(ae=>ae.gridIndex===Te);if(Y<0)return;const ee=Z[Y];h(Y),j(ee.items),K(Ce),k(ee.entry),V(g??null),$(!0)},ge=s.useCallback(()=>{$(!1),V(null)},[]),Se=s.useCallback(()=>{const Te=Z[P];return!Te||!q.current?J:Hv(q.current,Te.gridIndex,x?"cover":"contain")??J},[Z,P,J,x]),Ee=s.useCallback(Te=>{if(Z.length>1){const Ce=Z.length,g=(P+Te+Ce)%Ce,Y=Z[g],ee=Math.min(F,Y.items.length-1);h(g),j(Y.items),K(ee),k(Y.entry);return}K(Ce=>(Ce+Te+I.length)%I.length)},[Z,P,F,I.length]),Ne=Z.length>1||I.length>1;return s.useEffect(()=>{if(!E||typeof document>"u")return;const Te=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Te}},[E]),s.useEffect(()=>{!n||o||i||$(!1)},[n,o,i]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:me}}),a.jsx(Vv,{mediaList:le}),a.jsx("div",{ref:q,className:`${c}-wrapper ${c}-align-entries ${c}-image-align-${p}`.trim(),style:{gridTemplateColumns:`repeat(${U}, ${X})`,rowGap:0,columnGap:D,width:b.scalingValue(d.wrapperWidth??0,n),[`--${c}-align-entries-row-gap`]:b.scalingValue(u??0,n)},children:te.map((Te,Ce)=>{const g=Hl(Te.gallery),Y=Wl(g),ee=Y.filter(z=>z.lightboxMedia).map(z=>z.lightboxMedia),ae=Math.floor(Ce/U)===Math.ceil(te.length/U)-1,ye=Le&&Ce>=de?`${ue+(Ce-de)}`:void 0,ne=Y[0],B=ne!=null&&ne.lightboxMedia?ee.findIndex(z=>z.assetId===ne.lightboxMedia.assetId):-1,G=a.jsx("div",{className:`${c}-item-image-wrapper`,style:T,children:Y.length>0&&a.jsx(Yv,{media:ne.displayMedia,gridIndex:Ce,className:`${c}-item-${Bo(ne.displayMedia)?"video":"image"}`.trim(),style:C,onMediaClick:L&&B>=0?z=>oe(Ce,B,lp(z.currentTarget,x?"cover":"contain")):void 0})});return a.jsx("div",{className:`${c}-item`,children:a.jsxs("div",{className:[o?`${c}-item-inner`:`${c}-item-inner-hidden`,ae?`${c}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:X,...ye?{gridColumn:ye}:{}},children:[a.jsx("div",{className:`${c}-item-title-row`,children:a.jsx("div",{style:{height:0,width:W}})}),a.jsx("a",{className:`${c}-item-image-link`,children:G}),a.jsx("div",{className:`${c}-item-subtitle-row`,children:a.jsx("div",{style:{height:0,width:W}})})]})},Ce)})}),E&&typeof document<"u"&&(()=>{const Te=(l?document.getElementById(l):null)??document.body;return qn.createPortal(a.jsx("div",{style:ce,"data-selection":"none",children:a.jsx(Zv,{prefix:c,items:I,index:F,entry:he,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:Ne,lightboxEntries:Z,entryIdx:P,layoutId:r,sourceRect:J,resolveCloseSourceRect:Se,onClose:ge,onPrev:()=>Ee(-1),onNext:()=>Ee(1)})}),Te)})()]})}const e0=`import { CommonComponentProps } from '../props';
7945
+ `}const _c={assetId:"",name:"",objectFit:"cover"},On=500,qo=650,Cn="cubic-bezier(0.22, 1, 0.36, 1)",kv=72,Av=50,Fv=1e4,Nv=650,_v=500;function Hv(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function cp(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=wa(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 Wv(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?cp(i,n):null}function Ov(e){return e.reduce((t,n,i)=>{const o=Wl(n.gallery),l=Ol(o).filter(c=>c.lightboxMedia).map(c=>c.lightboxMedia);return l.length===0||t.push({gridIndex:i,items:l,entry:{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}),t},[])}function ir(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 Hc(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return ir(e,i,n)}const Dv=.03;function dp(e){return e.width*Dv}const ls={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Br(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Wc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function zv(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Xs(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,c=o/r;if(l>c){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const d=r*l;return{width:d,height:r,left:i.left+(o-d)/2,top:i.top}}function Bv(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Xs(e,t.width,t.height)}function jv(e,t){if(b.isEmbedMedia(e)){t(e.assetId,b.getEmbedAspect(e),1);return}if(Bo(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.assetId,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.assetId,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.assetId,n.naturalWidth,n.naturalHeight)},n.src=e.assetId}function Vv(e){const t=new Set,n=[];for(const i of e){const o=Wl(i.gallery),r=Ol(o);for(const l of r)for(const c of[l.displayMedia,l.lightboxMedia])c!=null&&c.assetId&&!t.has(c.assetId)&&(t.add(c.assetId),n.push(c))}return n}function Gv({mediaList:e}){const t=e.filter(n=>!b.isEmbedMedia(n));return t.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:t.map(n=>Bo(n)?a.jsx("video",{src:n.assetId,preload:"auto",muted:!0,playsInline:!0},n.assetId):a.jsx("img",{src:n.assetId,alt:""},n.assetId))})}function Po(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:c}=n,d=dp(n);return t==="left"?{left:l+d-i,top:r,width:i,height:o}:{left:l+c-d,top:r,width:i,height:o}}function $a(e,t,n){const i=Po(e,t,n);return{...i,left:2*i.left-e.left}}function Xv(e,t,n){const{left:i,width:o}=n,r=dp(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function up(e,t,n,i){const o=Po(e,"left",i),r=Po(e,"right",i),l=$a(e,"left",i),c=$a(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:c,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:c};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function Uv(e,t,n,i){const{start:o,end:r}=up(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function qv(e,t,n){const i=Po(e,t,n),o=$a(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function pp(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 Wl(e){if(!e)return;if(pp(e))return e;if(!Array.isArray(e))return;const[t,n]=e,i=t!=null&&t.assetId?t:void 0,o=n!=null&&n.assetId?n:void 0;if(!(!i&&!o))return[{media:[o??i??_c,i??o??_c]}]}function Kv(e){const[t,n]=e.media;return n!=null&&n.assetId?n:t!=null&&t.assetId?t:null}function Yv(e){const[t]=e.media;return t!=null&&t.assetId?t:null}function Ol(e){if(!Array.isArray(e)||e.length===0)return[];if(pp(e)){const t=[];for(const n of e){const i=Kv(n);if(!i)continue;const o=Yv(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.assetId?o:null})}return t}return e.filter(t=>t==null?void 0:t.assetId).map(t=>({displayMedia:t,lightboxMedia:t}))}function Bo(e){return b.isEmbedMedia(e)?!1:e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.assetId)}function Qv({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return b.isEmbedMedia(e)?a.jsx(b.EmbedMediaFrame,{media:e,mode:"background",fit:n.objectFit==="contain"?"contain":"cover",className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o}):Bo(e)?a.jsx("video",{src:e.assetId,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onClick:o}):a.jsx("img",{src:e.assetId,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function Zv({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:r,onTransitionEnd:l}){const c=s.useRef(null);return s.useEffect(()=>{const d=c.current;return n==null||n(d??null),()=>{d==null||d.pause(),n==null||n(null)}},[e,n]),a.jsx("div",{style:i,onTransitionEnd:l,children:a.jsx("video",{ref:c,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:r,onClick:d=>d.stopPropagation(),style:o},e)})}function jr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return b.isEmbedMedia(e)?a.jsx("img",{src:e.thumbnail,alt:e.name,style:t,onTransitionEnd:n}):Bo(e)?a.jsx("video",{src:e.assetId,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.assetId,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.assetId,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.assetId,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function Jv({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,canNavigate:d,lightboxEntries:u,entryIdx:p,layoutId:y,sourceRect:x,resolveCloseSourceRect:m,onClose:f,onPrev:S,onNext:w}){const N=s.useRef(null),v=s.useRef(null),M=s.useRef(null),E=s.useRef(new Map),[U,X]=s.useState(0),D=s.useRef(null),_=s.useRef(0),W=s.useRef(0),T=s.useRef("none"),C=s.useRef(!1),q=s.useRef(!1),R=s.useRef(!1),$=s.useRef(null),I=s.useRef(null),j=s.useRef(null),F=s.useRef(()=>{}),K=s.useRef(null),P=s.useRef(null),h=s.useRef(null),J=s.useRef(!1),[V,he]=s.useState(null),[k,ce]=s.useState(ls),[L,me]=s.useState(0),[te,ve]=s.useState("opening"),[Le,de]=s.useState(0),[ue,Z]=s.useState(0),[le,oe]=s.useState(!1),[ge,Se]=s.useState(null),[Re,Ne]=s.useState(null),[Te,Ce]=s.useState(null),[g,Y]=s.useState(!1),[ee,ae]=s.useState(null),[ye,ne]=s.useState(!1),B=s.useRef(!1),[G,z]=s.useState(!1),[ie,H]=s.useState(!1),be=s.useRef(n),re=s.useRef(void 0),Q=t[n],Pe=Q?Bo(Q):!1,Ae=Q?b.isEmbedMedia(Q):!1,He=ue!==0||le,Xe=!l&&(!r||!!c),Ue=d&&!l,Je=u.length>1,je=s.useCallback((O,Me)=>t.length<=1?null:t[(O+Me+t.length)%t.length]??null,[t]),xe=Je?ir(u,p,-1):je(n,-1),Ie=Je?ir(u,p,1):je(n,1),ze=ge===-1&&He?Je&&Re!==null?ir(u,Re,-1):Te!==null?je(Te,-1):null:null,Ze=ge===1&&He?Je&&Re!==null?ir(u,Re,1):Te!==null?je(Te,1):null:null,tt=ze&&ze.assetId!==(xe==null?void 0:xe.assetId)?ze:null,ot=Ze&&Ze.assetId!==(Ie==null?void 0:Ie.assetId)?Ze:null,lt=xe&&Ue?(()=>{const O=Je?Hc(u,p,-1):t.length>2?je((n-1+t.length)%t.length,-1):null;return O&&O.assetId!==xe.assetId?O:null})():null,it=Ie&&Ue?(()=>{const O=Je?Hc(u,p,1):t.length>2?je((n+1)%t.length,1):null;return O&&O.assetId!==Ie.assetId?O:null})():null,xt=tt??lt,rt=ot??it,_e=s.useCallback((O,Me,Fe)=>{if(!O||!Me||!Fe)return;const Oe=E.current,ft=Oe.get(O);(ft==null?void 0:ft.width)===Me&&(ft==null?void 0:ft.height)===Fe||(Oe.set(O,{width:Me,height:Fe}),X(Tt=>Tt+1))},[]),We=s.useCallback(O=>{if(!(O!=null&&O.assetId))return null;const Me=E.current.get(O.assetId);return Bv(v.current,Me)},[U,L]),vt=s.useCallback(()=>{if(!Q)return;const O=We(Q);if(O){he(O);return}const Me=v.current;Me&&he(Wc(Me))},[Q,We]),Ve=s.useCallback(O=>{if(Je){const Me=u.length;Ne((p+O+Me)%Me),Ce(null);return}t.length>1&&(Ce((n+O+t.length)%t.length),Ne(null))},[Je,u.length,p,t.length,n]),Ke=s.useCallback(O=>{R.current=O,oe(O)},[]),pe=s.useCallback(()=>{$.current!==null&&(window.clearTimeout($.current),$.current=null)},[]),De=s.useCallback(()=>{pe(),$.current=window.setTimeout(()=>{pe(),Ke(!1)},qo+32)},[pe,Ke]),qe=s.useCallback(()=>{const O=N.current;if(!O){ce({left:0,top:0,width:typeof window<"u"?window.innerWidth:ls.width,height:typeof window<"u"?window.innerHeight:ls.height});return}const Me=O.getBoundingClientRect();ce({left:Me.left,top:Me.top,width:Me.width,height:Me.height})},[]),bt=s.useCallback((O,Me)=>{if(He){if(G&&!le)return`translate(${ue}px, 0px)`;if(le&&ge!==null){const Fe=We(O);if(!Fe)return;const{x:Oe,y:ft}=Uv(Fe,Me,ge,k);return`translate(${Oe}px, ${ft}px)`}if(le)return"translate(0px, 0px)"}},[He,G,le,ue,ge,k,We]),yt=s.useCallback(()=>{const O=I.current;I.current=null,pe(),Ke(!1),Se(null),Ne(null),Ce(null),Z(0),z(!1),C.current=!1,W.current=0,T.current="none",O===-1?S():O===1&&w()},[pe,Ke,S,w]),Rt=s.useCallback(()=>{pe(),$.current=window.setTimeout(()=>{I.current!==null&&yt()},qo+32)},[pe,yt]),ct=s.useCallback(()=>{pe(),I.current=null,Ke(!1),Se(null),Ne(null),Ce(null),Z(0),z(!1),C.current=!1,W.current=0,T.current="none"},[pe,Ke]),wt=s.useCallback(O=>{if(!(!Ue||!V)){if(R.current){if(I.current===O){j.current=O,yt();return}ct()}pe(),Ve(O),I.current=O,Se(O),Ke(!0),Rt()}},[Ue,V,yt,ct,pe,Ve,Ke,Rt]);F.current=wt;const nt=s.useCallback(()=>{K.current=null,J.current=!1,P.current!==null&&(window.clearInterval(P.current),P.current=null),h.current!==null&&(window.clearTimeout(h.current),h.current=null)},[]),Nt=s.useCallback(O=>{P.current!==null&&window.clearInterval(P.current);const Me=J.current?_v:Nv;P.current=window.setInterval(()=>{F.current(O)},Me)},[]),jt=s.useCallback(O=>{K.current!==O&&(nt(),K.current=O,J.current=!1,F.current(O),Nt(O),h.current=window.setTimeout(()=>{h.current=null,K.current===O&&(J.current=!0,Nt(O))},Fv))},[nt,Nt]),$e=s.useCallback(()=>{const O=v.current;if(!O)return;const Me=Q==null?void 0:Q.assetId,Fe=Me?E.current.get(Me):void 0;if(Fe!=null&&Fe.width&&(Fe!=null&&Fe.height)){he(Xs(O,Fe.width,Fe.height));return}const Oe=M.current;if(Oe&&Me&&(Oe.src===Me||Oe.currentSrc===Me)){const{width:Tt,height:et}=zv(Oe);if(Tt&&et){_e(Me,Tt,et),he(Xs(O,Tt,et));return}}const ft=Wc(O);!ft.width||!ft.height||he(ft)},[Q==null?void 0:Q.assetId,_e]),Ge=s.useCallback(O=>{if(M.current=O,!!O){if(O instanceof HTMLVideoElement){O.readyState>=1&&O.videoWidth>0&&$e();return}O.complete&&O.naturalWidth>0&&$e()}},[$e]),ht=s.useCallback(()=>{qe(),$e(),me(O=>O+1)},[qe,$e]);s.useEffect(()=>{ht();const O=v.current,Me=N.current,Fe=new ResizeObserver(()=>ht());return O&&Fe.observe(O),Me&&Fe.observe(Me),window.addEventListener("resize",ht),()=>{Fe.disconnect(),window.removeEventListener("resize",ht)}},[ht,n,y]),s.useLayoutEffect(()=>{if(!Q)return;const O=M.current;if(O){if(O instanceof HTMLImageElement&&O.complete&&O.naturalWidth>0){$e();return}O instanceof HTMLVideoElement&&O.readyState>=1&&O.videoWidth>0&&$e()}},[Q==null?void 0:Q.assetId,n,$e]),s.useEffect(()=>{vt()},[vt,U]),s.useEffect(()=>{const O=new Set,Me=[],Fe=Oe=>{!(Oe!=null&&Oe.assetId)||O.has(Oe.assetId)||(O.add(Oe.assetId),Me.push(Oe))};t.forEach(Fe),u.forEach(Oe=>Oe.items.forEach(Fe)),Me.forEach(Oe=>{E.current.has(Oe.assetId)||jv(Oe,_e)})},[t,u,_e]),s.useEffect(()=>{if(te!=="opening"||!V)return;if(!x){ve("open");return}Y(!1);const O=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Y(!0),ve("open")})});return()=>cancelAnimationFrame(O)},[te,V,x]),s.useEffect(()=>{if(te!=="closing")return;const O=setTimeout(()=>f(),On);return()=>clearTimeout(O)},[te,f]),s.useEffect(()=>()=>{pe()},[pe]),s.useLayoutEffect(()=>{be.current===n&&re.current===(Q==null?void 0:Q.assetId)||(pe(),I.current=null,Se(null),Ne(null),Ce(null),de(0),Z(0),Ke(!1),H(!1),z(!1),_.current=0,W.current=0,T.current="none",C.current=!1,D.current=null,q.current=!1,M.current=null,vt(),be.current=n,re.current=Q==null?void 0:Q.assetId)},[n,Q==null?void 0:Q.assetId,Ke,pe,vt]),s.useLayoutEffect(()=>{const O=j.current;O!==null&&(j.current=null,requestAnimationFrame(()=>{F.current(O)}))},[n,p,Q==null?void 0:Q.assetId]),s.useLayoutEffect(()=>{if(te==="opening"){B.current=!1,ne(!1);return}if(te!=="open"||B.current)return;if(!xe&&!Ie){B.current=!0;return}ne(!1);const O=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ne(!0),B.current=!0})});return()=>cancelAnimationFrame(O)},[te,xe==null?void 0:xe.assetId,Ie==null?void 0:Ie.assetId]),s.useEffect(()=>{if(te!=="open")return;const O=()=>{const et=Mt=>{Mt.stopPropagation(),Mt.preventDefault(),document.removeEventListener("click",et,!0)};document.addEventListener("click",et,!0)},Me=et=>{const Mt=et<0?1:-1;pe(),Ve(Mt),I.current=Mt,Se(Mt),Ke(!0),Rt()},Fe=et=>{if(Math.abs(et)>Av&&Ue){Me(et);return}I.current=null,Se(null),Ne(null),Ce(null),Ke(!0),Z(0),De()},Oe=et=>{if(et.touches.length!==1||R.current)return;const Mt=et.touches[0];q.current=!0,D.current={x:Mt.clientX,y:Mt.clientY},T.current="none",W.current=0,C.current=!1},ft=et=>{if(!D.current||et.touches.length!==1||R.current)return;const Mt=et.touches[0],Ct=Mt.clientX-D.current.x,Ht=Mt.clientY-D.current.y;if(T.current==="none"){if(Math.abs(Ct)<10&&Math.abs(Ht)<10)return;if(Math.abs(Ct)>Math.abs(Ht)){if(!Ue)return;T.current="horizontal"}else if(Ht>0){if(!Xe)return;T.current="vertical"}else return}if(T.current==="horizontal"){C.current=!0,z(!0),W.current=Ct,Z(Ct),et.preventDefault();return}T.current==="vertical"&&(C.current=!0,z(!0),_.current=Ht,de(Ht),et.preventDefault())},Tt=()=>{if(!D.current)return;const et=T.current,Mt=C.current;if(Mt&&et==="horizontal")Fe(W.current),O();else if(Mt&&et==="vertical"){const Ct=_.current;if(Xe&&Ct>kv){const Ht=window.innerHeight;_.current=Ht,H(!0),de(Ht),ve("closing")}else _.current=0,de(0);O()}else et==="horizontal"&&Math.abs(W.current)>0&&(Fe(W.current),O());D.current=null,T.current="none",W.current=0,C.current=!1,z(!1)};return document.addEventListener("touchstart",Oe,{passive:!0}),document.addEventListener("touchmove",ft,{passive:!1}),document.addEventListener("touchend",Tt),document.addEventListener("touchcancel",Tt),()=>{document.removeEventListener("touchstart",Oe),document.removeEventListener("touchmove",ft),document.removeEventListener("touchend",Tt),document.removeEventListener("touchcancel",Tt)}},[te,Ue,Ke,De,pe,Xe,Rt,Ve]);const Lt=s.useCallback(()=>{const O=(m==null?void 0:m())??x??null;O&&V&&(ae(O),Y(!0)),ve("closing")},[m,x,V]);s.useEffect(()=>{const O=Oe=>{if(Oe.key==="Escape"){if(r&&c||te==="closing")return;nt(),Lt();return}if(Oe.key!=="ArrowLeft"&&Oe.key!=="ArrowRight"||te!=="open"||!Ue)return;Oe.preventDefault();const ft=Oe.key==="ArrowLeft"?-1:1;Oe.repeat&&K.current===ft||jt(ft)},Me=Oe=>{if(Oe.key!=="ArrowLeft"&&Oe.key!=="ArrowRight")return;const ft=Oe.key==="ArrowLeft"?-1:1;K.current===ft&&nt()},Fe=()=>{nt()};return window.addEventListener("keydown",O),window.addEventListener("keyup",Me),window.addEventListener("blur",Fe),()=>{window.removeEventListener("keydown",O),window.removeEventListener("keyup",Me),window.removeEventListener("blur",Fe),nt()}},[te,r,c,Lt,Ue,jt,nt]),s.useEffect(()=>{te!=="open"&&nt()},[te,nt]);const $t=()=>{te==="closing"||l||Lt()},mt=te==="open",_t=te==="closing",Ot=Le>0?Math.max(0,1-Le/500):1,zt=Le>0?Math.max(.35,1-Le/500):1,Ee=s.useCallback(O=>{if(!(O.propertyName!=="transform"||!R.current)){if(I.current!==null){yt();return}pe(),Ke(!1)}},[pe,Ke,yt]),dt=te==="closing"?ee??x:x,ut=dt&&V&&(te==="opening"||_t)?Hv(dt,V):void 0,kt=He&&Q?bt(Q,"center"):Le>0?`translateY(${Le}px)`:ut,Qe=V?Br(V,k):null,at=!!(dt&&V),It=at&&(te==="closing"||te==="open"&&g),At={position:"absolute",top:Qe==null?void 0:Qe.top,left:Qe==null?void 0:Qe.left,width:Qe==null?void 0:Qe.width,height:Qe==null?void 0:Qe.height,objectFit:"contain",transformOrigin:"top left",transform:kt,opacity:Le>0?zt:at?1:te==="opening"||_t?0:1,transition:G&&!le?"none":le?`transform ${qo}ms ${Cn}`:ie?`transform ${On}ms ${Cn}, opacity ${On}ms ${Cn}`:It?`transform ${On}ms ${Cn}`:te==="opening"||_t?`opacity ${On}ms ${Cn}`:"none",pointerEvents:(Pe||Ae)&&mt&&!He?"auto":"none",touchAction:(Pe||Ae)&&mt?"none":void 0,zIndex:1,overflow:Pe||Ae?"hidden":void 0},pt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:mt&&!He?"auto":"none"},Ut=(O,Me,Fe="adjacent")=>{const Oe=We(O);if(!Oe)return{display:"none"};const ft=Fe==="far"?Me==="left"?"far-left":"far-right":Me==="left"?"left-adjacent":"right-adjacent",{start:Tt}=ge!==null?up(Oe,ft,ge,k):{start:Fe==="far"?$a(Oe,Me,k):Po(Oe,Me,k)},et=Br(Tt,k),Mt=bt(O,ft),Ct=!He&&Fe==="adjacent"&&mt&&!ye?qv(Oe,Me,k):null,Ht=Fe==="far"&&He&&ge===(Me==="left"?-1:1),on=G&&!le?!1:le,fn=Fe==="adjacent"&&mt&&ye&&!He;return{position:"absolute",top:et.top,left:et.left,width:et.width,height:et.height,objectFit:"contain",transform:Mt??(Ct?`translate(${Ct.x}px, ${Ct.y}px)`:void 0),opacity:Fe==="far"?mt&&Ht?1:0:mt?1:0,transition:on?Fe==="far"?`transform ${qo}ms ${Cn}`:`transform ${qo}ms ${Cn}, opacity ${On}ms ${Cn}`:fn?`transform ${On}ms ${Cn}`:te==="opening"||_t?`opacity ${On}ms ${Cn}`:"none",pointerEvents:"none",zIndex:1}},qt=(O,Me)=>{const Fe=We(O);return Fe?Xv(Po(Fe,Me,k),Me,k):null},Dt=O=>Me=>{if(!l){if(q.current){q.current=!1;return}Me.stopPropagation(),wt(O)}},Vt=xe?qt(xe,"left"):null,Gt=Ie?qt(Ie,"right"):null,Bt=Vt?Br(Vt,k):null,Yt=Gt?Br(Gt,k):null;return a.jsxs("div",{ref:N,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:te==="open"?"none":void 0},onClick:$t,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:mt?Ot:0,transition:G?"none":`opacity ${On}ms ${Cn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:v,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:mt?1:0,transition:G?"none":`opacity ${On}ms ${Cn}`,pointerEvents:"none"},children:a.jsx(lp,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,onClose:$t})})]}),mt&&xt&&a.jsx(jr,{media:xt,style:Ut(xt,"left","far"),onMeasure:_e,onTransitionEnd:Ee},`far-prev-${xt.assetId}`),mt&&xe&&a.jsxs(a.Fragment,{children:[a.jsx(jr,{media:xe,style:Ut(xe,"left"),onMeasure:_e,onTransitionEnd:Ee},`prev-${xe.assetId}`),Bt&&a.jsx("div",{style:{position:"absolute",top:Bt.top,left:Bt.left,width:Bt.width,height:Bt.height,cursor:l||G?"default":"pointer",pointerEvents:l||G?"none":"auto",zIndex:3},onClick:Dt(-1)})]}),mt&&Ie&&a.jsxs(a.Fragment,{children:[a.jsx(jr,{media:Ie,style:Ut(Ie,"right"),onMeasure:_e,onTransitionEnd:Ee},`next-${Ie.assetId}`),Yt&&a.jsx("div",{style:{position:"absolute",top:Yt.top,left:Yt.left,width:Yt.width,height:Yt.height,cursor:l||G?"default":"pointer",pointerEvents:l||G?"none":"auto",zIndex:3},onClick:Dt(1)})]}),mt&&rt&&a.jsx(jr,{media:rt,style:Ut(rt,"right","far"),onMeasure:_e,onTransitionEnd:Ee},`far-next-${rt.assetId}`),V&&Q&&(Ae?a.jsx("div",{style:At,onTransitionEnd:Ee,children:a.jsx(b.EmbedMediaFrame,{media:Q,mode:"player",fit:"contain",lazy:!1,interactive:mt&&!He,style:pt})},`${n}-${Q.assetId}`):Pe?a.jsx(Zv,{src:Q.assetId,phase:te,onMediaElement:Ge,wrapperStyle:At,videoStyle:pt,onLoadedMetadata:$e,onTransitionEnd:Ee},`${n}-${Q.assetId}`):a.jsx("img",{ref:Ge,src:Q.assetId,alt:Q.name,onLoad:$e,onTransitionEnd:Ee,style:At},`${n}-${Q.assetId}`))]})}function e0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:c}=b.useScopedStyles(),{gridLayout:d,verticalGap:u,align:p="top",imageDisplay:y}=e,x=(y==null?void 0:y.display)==="cover",m=(y==null?void 0:y.ratioValue)??"1:1",f=(y==null?void 0:y.reversed)??!1,[S,w]=m.split(":").map(Number),M=`${f?w:S} / ${f?S:w}`,E=d.entryWidth??.2,U=d.columnsCount,X=b.scalingValue(E,n),D=b.scalingValue(d.horizontalGap??0,n),_=X,W=X,T={width:_,...x?{aspectRatio:M,height:"auto",overflow:"hidden"}:{height:"auto"}},C=x?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},q=s.useRef(null),[R,$]=s.useState(!1),[I,j]=s.useState([]),[F,K]=s.useState(0),[P,h]=s.useState(0),[J,V]=s.useState(null),[he,k]=s.useState({title1:"",title2:"",title3:""}),ce=(()=>{const Te={},Ce=q.current?getComputedStyle(q.current).getPropertyValue("--cntrl-article-width").trim():"";return Ce&&(Te["--cntrl-article-width"]=Ce),Te})(),L=!n||i||o,me=s.useMemo(()=>Rv(c),[c]),te=t??[],ve=te.length%U||U,Le=ve<U&&te.length>0,de=te.length-ve,ue=Le?Math.floor((U-ve)/2)+1:1,Z=s.useMemo(()=>Ov(te),[te]),le=s.useMemo(()=>Vv(te),[te]),oe=(Te,Ce,g)=>{if(n&&!o&&!i)return;const Y=Z.findIndex(ae=>ae.gridIndex===Te);if(Y<0)return;const ee=Z[Y];h(Y),j(ee.items),K(Ce),k(ee.entry),V(g??null),$(!0)},ge=s.useCallback(()=>{$(!1),V(null)},[]),Se=s.useCallback(()=>{const Te=Z[P];return!Te||!q.current?J:Wv(q.current,Te.gridIndex,x?"cover":"contain")??J},[Z,P,J,x]),Re=s.useCallback(Te=>{if(Z.length>1){const Ce=Z.length,g=(P+Te+Ce)%Ce,Y=Z[g],ee=Math.min(F,Y.items.length-1);h(g),j(Y.items),K(ee),k(Y.entry);return}K(Ce=>(Ce+Te+I.length)%I.length)},[Z,P,F,I.length]),Ne=Z.length>1||I.length>1;return s.useEffect(()=>{if(!R||typeof document>"u")return;const Te=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Te}},[R]),s.useEffect(()=>{!n||o||i||$(!1)},[n,o,i]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:me}}),a.jsx(Gv,{mediaList:le}),a.jsx("div",{ref:q,className:`${c}-wrapper ${c}-align-entries ${c}-image-align-${p}`.trim(),style:{gridTemplateColumns:`repeat(${U}, ${X})`,rowGap:0,columnGap:D,width:b.scalingValue(d.wrapperWidth??0,n),[`--${c}-align-entries-row-gap`]:b.scalingValue(u??0,n)},children:te.map((Te,Ce)=>{const g=Wl(Te.gallery),Y=Ol(g),ee=Y.filter(z=>z.lightboxMedia).map(z=>z.lightboxMedia),ae=Math.floor(Ce/U)===Math.ceil(te.length/U)-1,ye=Le&&Ce>=de?`${ue+(Ce-de)}`:void 0,ne=Y[0],B=ne!=null&&ne.lightboxMedia?ee.findIndex(z=>z.assetId===ne.lightboxMedia.assetId):-1,G=a.jsx("div",{className:`${c}-item-image-wrapper`,style:T,children:Y.length>0&&a.jsx(Qv,{media:ne.displayMedia,gridIndex:Ce,className:`${c}-item-${Bo(ne.displayMedia)?"video":"image"}`.trim(),style:C,onMediaClick:L&&B>=0?z=>oe(Ce,B,cp(z.currentTarget,x?"cover":"contain")):void 0})});return a.jsx("div",{className:`${c}-item`,children:a.jsxs("div",{className:[o?`${c}-item-inner`:`${c}-item-inner-hidden`,ae?`${c}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:X,...ye?{gridColumn:ye}:{}},children:[a.jsx("div",{className:`${c}-item-title-row`,children:a.jsx("div",{style:{height:0,width:W}})}),a.jsx("a",{className:`${c}-item-image-link`,children:G}),a.jsx("div",{className:`${c}-item-subtitle-row`,children:a.jsx("div",{style:{height:0,width:W}})})]})},Ce)})}),R&&typeof document<"u"&&(()=>{const Te=(l?document.getElementById(l):null)??document.body;return qn.createPortal(a.jsx("div",{style:ce,"data-selection":"none",children:a.jsx(Jv,{prefix:c,items:I,index:F,entry:he,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:Ne,lightboxEntries:Z,entryIdx:P,layoutId:r,sourceRect:J,resolveCloseSourceRect:Se,onClose:ge,onPrev:()=>Re(-1),onNext:()=>Re(1)})}),Te)})()]})}const t0=`import { CommonComponentProps } from '../props';
7946
7946
  import { EmbedMediaFrame, getEmbedAspect, isEmbedMedia, scalingValue, useScopedStyles } from '../utils/index';
7947
7947
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
7948
7948
  import { createPortal } from 'react-dom';
@@ -10329,11 +10329,11 @@ export function Hive({
10329
10329
  </>
10330
10330
  );
10331
10331
  }
10332
- `,t0="01M3SBP3P8CMVMM1ZZ0QVD2PPF",Hi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function n0(e){const t={};return t[St(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[St(e,"fontSettings")]={...Hi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[St(e,"fontSize")]={...Hi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[St(e,"lineHeight")]={...Hi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[St(e,"letterSpacing")]={...Hi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[St(e,"wordSpacing")]={...Hi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[St(e,"textAlign")]={...Hi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[St(e,"textAppearance")]={...Hi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Ro=Ri.filter(e=>e!=="count"),i0=Ro.reduce((e,t)=>({...e,...n0(t)}),{}),o0=Ro.reduce((e,t)=>({...e,[St(t,"fontFamily")]:"Arial",[St(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[St(t,"letterSpacing")]:0,[St(t,"wordSpacing")]:0,[St(t,"textAlign")]:"left",[St(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ls(e){return Ro.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[St(n,"fontSize")]=i),o!==void 0&&(t[St(n,"lineHeight")]=o),t},{})}const r0={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Ro.map(e=>[Nl[e],_l(e)]))},a0={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},s0=["01M3QM74XEQE7FN1WYJN6H984H","01M3QM74XFXCSMJJ8TNR0RXSWV","01M3QM74XFQ6K4CJ0QYC7BT7VP","01M3QM74XFK2K9T3SPCZD8M7RT","01M3QM74XFV4J15XRFB85877RE","01M3QM74XFB8Q39K12G4G6CZDM","01M3QM74XFWVH9HND47HYNCBZB","01M3QM74XF3MFEKEA4E0W9F9ZQ","01M3QM74XFEQY4XMN22Q9ERGKX","01M3QM74XFWP1RY8ND8QX88J2V","01M3QM74XFD41TXQ5BQ2KFJBGQ","01M3QM74XFV8973P7WXXWJP3QK","01M3QM74XF67PD2N10JYF9409X","01M3QM74XFA5B75WMTTKRN9TM7","01M3QM74XFFQRBHCQGKWPGSAGE","01M3QM74XF1HQBTRANGVX0QVGK","01M3QM74XF8ZWGSVCX3KS5YXSC","01M3QM74XFPHGV2XFZ23ADCVFC","01M3QM74XFECQG799S95G63BDJ","01M3QM74XFW1XS568WAHG3BGN1","01M3QM74XFT1RRJ3N1JJKPK5EA","01M3QM74XFB2JQ62RPFSM145GN","01M3QM74XFH61QR5PACJS04Z5K","01M3QM74XFKD44BXHRA7SSMD7N"],l0=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...a0,gallery:[{media:[{assetId:s0[t-1],name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}]});return e})(),c0={type:"object",version:1,content:{type:"array",settings:{allowsCollection:!0,addItemFromFileExplorer:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title1:{type:"string",label:"Title",contentKey:"title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",contentKey:"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",contentKey:"gallery",max:1,display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video","vimeo","youtube"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:l0},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"}},...i0},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:t0,closeIconColor:"#000000",closeIconHoverColor:"#999999",...o0},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,...ls({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,...ls({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,...ls({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:[r0]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},d0={element:Jv,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.assetId",placeholderEnabled:!0}],parameters:[{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[...Ro.map(e=>({path:`${St(e,"fontFamily")}`}))]},fontRelations:{...Ro.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${St(t,"fontFamily")}`}),{})},schema:c0,sourceCode:e0};function u0(e){if(b.isEmbedMedia(e))return!1;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.assetId)}function p0({media:e,className:t,style:n}){const i=s.useRef(null);return s.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const r=o.play();r&&r.catch(()=>{})},[e.isVideo,e.assetId]),e.embed?a.jsx(b.EmbedMediaFrame,{media:e.embed,mode:"background",fit:"contain",className:t,style:n}):e.isVideo?a.jsx("video",{ref:i,className:t,src:e.assetId,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:t,src:e.assetId,alt:"",style:n})}function cs(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function m0(e){return String(e??"").trim().length>0}function Wc(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 Oc(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 Dc(e,t,n,i,o,r,l){const c=b.scalingValue(r,l),d=b.scalingValue(0,l),u=e===0,p=e===t-1&&!o;return{borderTopWidth:u&&n?c:d,borderBottomWidth:!p||i?c:d}}function g0(e,t,n){const i=b.scalingValue(t,n),o=b.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const zc=10,Bc=10,Ko={positionEase:.14,rotationEase:.09,rotationFactor:2.5,maxRotation:20};function h0(e,t,n){return Math.max(t,Math.min(n,e))}function ds(e,t,n){return e+(t-e)*n}function f0(e,t,n,i){if(!t)return{x:0,y:0};const o=t.getBoundingClientRect(),r=o.top+o.height/2;if(e==="cursor"&&n)return{x:n.clientX+zc,y:n.clientY+zc};switch(e){case"left":return{x:o.left+Bc+i/2,y:r};case"center":return{x:o.left+o.width/2,y:r};case"right":return{x:o.right-Bc-i/2,y:r};default:return{x:o.left+o.width/2,y:r}}}function y0(e,t){const n=s.useRef(null),i=s.useRef({x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1}),o=s.useRef(null),r=s.useCallback(()=>{const m=n.current,f=i.current;m&&(m.style.transform=`translate3d(${f.x}px, ${f.y}px, 0) translate(-50%, -50%) rotate(${f.rotation.toFixed(3)}deg)`)},[]),l=s.useCallback(()=>{o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)},[]),c=s.useCallback(()=>{const m=i.current;t?(m.x=ds(m.x,m.targetX,Ko.positionEase),m.y=ds(m.y,m.targetY,Ko.positionEase),m.rotation=ds(m.rotation,m.targetRotation,Ko.rotationEase)):(m.x=m.targetX,m.y=m.targetY,m.rotation=m.targetRotation),r();const f=Math.abs(m.x-m.targetX)<.4&&Math.abs(m.y-m.targetY)<.4,S=Math.abs(m.rotation-m.targetRotation)<.08;!f||!S?o.current=requestAnimationFrame(c):o.current=null},[r,t]),d=s.useCallback(()=>{o.current===null&&(o.current=requestAnimationFrame(c))},[c]),u=s.useCallback((m,f)=>{const S=i.current;S.targetX=m,S.targetY=f,S.targetRotation=0,S.x=m,S.y=f,S.rotation=0,S.lastX=m,S.hasLastX=!0,r(),t&&d()},[r,t,d]),p=s.useCallback((m,f)=>{if(!e)return;const S=i.current;if(t&&S.hasLastX){const w=m-S.lastX;S.targetRotation=h0(w*Ko.rotationFactor,-20,Ko.maxRotation)}else S.targetRotation=0;if(S.lastX=m,S.hasLastX=!0,S.targetX=m,S.targetY=f,t){d();return}S.x=m,S.y=f,S.rotation=S.targetRotation,r()},[e,r,t,d]),y=s.useCallback(m=>{l(),i.current.hasLastX=!1,m==null||m()},[l]),x=s.useCallback(()=>{l(),i.current={x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1},n.current&&(n.current.style.transform="")},[l]);return s.useEffect(()=>(e||x(),l),[e,x,l]),{anchorRef:n,onShow:u,onCursorMove:p,exit:y,reset:x}}function v0(e){return`
10332
+ `,n0="01M3SBP3P8CMVMM1ZZ0QVD2PPF",Hi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function i0(e){const t={};return t[St(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[St(e,"fontSettings")]={...Hi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[St(e,"fontSize")]={...Hi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[St(e,"lineHeight")]={...Hi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[St(e,"letterSpacing")]={...Hi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[St(e,"wordSpacing")]={...Hi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[St(e,"textAlign")]={...Hi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[St(e,"textAppearance")]={...Hi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Eo=Ei.filter(e=>e!=="count"),o0=Eo.reduce((e,t)=>({...e,...i0(t)}),{}),r0=Eo.reduce((e,t)=>({...e,[St(t,"fontFamily")]:"Arial",[St(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[St(t,"letterSpacing")]:0,[St(t,"wordSpacing")]:0,[St(t,"textAlign")]:"left",[St(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function cs(e){return Eo.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[St(n,"fontSize")]=i),o!==void 0&&(t[St(n,"lineHeight")]=o),t},{})}const a0={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Eo.map(e=>[_l[e],Hl(e)]))},s0={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},l0=["01M3QM74XEQE7FN1WYJN6H984H","01M3QM74XFXCSMJJ8TNR0RXSWV","01M3QM74XFQ6K4CJ0QYC7BT7VP","01M3QM74XFK2K9T3SPCZD8M7RT","01M3QM74XFV4J15XRFB85877RE","01M3QM74XFB8Q39K12G4G6CZDM","01M3QM74XFWVH9HND47HYNCBZB","01M3QM74XF3MFEKEA4E0W9F9ZQ","01M3QM74XFEQY4XMN22Q9ERGKX","01M3QM74XFWP1RY8ND8QX88J2V","01M3QM74XFD41TXQ5BQ2KFJBGQ","01M3QM74XFV8973P7WXXWJP3QK","01M3QM74XF67PD2N10JYF9409X","01M3QM74XFA5B75WMTTKRN9TM7","01M3QM74XFFQRBHCQGKWPGSAGE","01M3QM74XF1HQBTRANGVX0QVGK","01M3QM74XF8ZWGSVCX3KS5YXSC","01M3QM74XFPHGV2XFZ23ADCVFC","01M3QM74XFECQG799S95G63BDJ","01M3QM74XFW1XS568WAHG3BGN1","01M3QM74XFT1RRJ3N1JJKPK5EA","01M3QM74XFB2JQ62RPFSM145GN","01M3QM74XFH61QR5PACJS04Z5K","01M3QM74XFKD44BXHRA7SSMD7N"],c0=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...s0,gallery:[{media:[{assetId:l0[t-1],name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}]});return e})(),d0={type:"object",version:1,content:{type:"array",settings:{allowsCollection:!0,addItemFromFileExplorer:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title1:{type:"string",label:"Title",contentKey:"title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",contentKey:"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",contentKey:"gallery",max:1,display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video","vimeo","youtube"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:c0},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"}},...o0},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:n0,closeIconColor:"#000000",closeIconHoverColor:"#999999",...r0},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,...cs({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,...cs({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,...cs({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:[a0]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},u0={element:e0,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.assetId",placeholderEnabled:!0}],parameters:[{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[...Eo.map(e=>({path:`${St(e,"fontFamily")}`}))]},fontRelations:{...Eo.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${St(t,"fontFamily")}`}),{})},schema:d0,sourceCode:t0};function p0(e){if(b.isEmbedMedia(e))return!1;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.assetId)}function m0({media:e,className:t,style:n}){const i=s.useRef(null);return s.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const r=o.play();r&&r.catch(()=>{})},[e.isVideo,e.assetId]),e.embed?a.jsx(b.EmbedMediaFrame,{media:e.embed,mode:"background",fit:"contain",className:t,style:n}):e.isVideo?a.jsx("video",{ref:i,className:t,src:e.assetId,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:t,src:e.assetId,alt:"",style:n})}function ds(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function g0(e){return String(e??"").trim().length>0}function Oc(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 Dc(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 zc(e,t,n,i,o,r,l){const c=b.scalingValue(r,l),d=b.scalingValue(0,l),u=e===0,p=e===t-1&&!o;return{borderTopWidth:u&&n?c:d,borderBottomWidth:!p||i?c:d}}function h0(e,t,n){const i=b.scalingValue(t,n),o=b.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Bc=10,jc=10,Ko={positionEase:.14,rotationEase:.09,rotationFactor:2.5,maxRotation:20};function f0(e,t,n){return Math.max(t,Math.min(n,e))}function us(e,t,n){return e+(t-e)*n}function y0(e,t,n,i){if(!t)return{x:0,y:0};const o=t.getBoundingClientRect(),r=o.top+o.height/2;if(e==="cursor"&&n)return{x:n.clientX+Bc,y:n.clientY+Bc};switch(e){case"left":return{x:o.left+jc+i/2,y:r};case"center":return{x:o.left+o.width/2,y:r};case"right":return{x:o.right-jc-i/2,y:r};default:return{x:o.left+o.width/2,y:r}}}function v0(e,t){const n=s.useRef(null),i=s.useRef({x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1}),o=s.useRef(null),r=s.useCallback(()=>{const m=n.current,f=i.current;m&&(m.style.transform=`translate3d(${f.x}px, ${f.y}px, 0) translate(-50%, -50%) rotate(${f.rotation.toFixed(3)}deg)`)},[]),l=s.useCallback(()=>{o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)},[]),c=s.useCallback(()=>{const m=i.current;t?(m.x=us(m.x,m.targetX,Ko.positionEase),m.y=us(m.y,m.targetY,Ko.positionEase),m.rotation=us(m.rotation,m.targetRotation,Ko.rotationEase)):(m.x=m.targetX,m.y=m.targetY,m.rotation=m.targetRotation),r();const f=Math.abs(m.x-m.targetX)<.4&&Math.abs(m.y-m.targetY)<.4,S=Math.abs(m.rotation-m.targetRotation)<.08;!f||!S?o.current=requestAnimationFrame(c):o.current=null},[r,t]),d=s.useCallback(()=>{o.current===null&&(o.current=requestAnimationFrame(c))},[c]),u=s.useCallback((m,f)=>{const S=i.current;S.targetX=m,S.targetY=f,S.targetRotation=0,S.x=m,S.y=f,S.rotation=0,S.lastX=m,S.hasLastX=!0,r(),t&&d()},[r,t,d]),p=s.useCallback((m,f)=>{if(!e)return;const S=i.current;if(t&&S.hasLastX){const w=m-S.lastX;S.targetRotation=f0(w*Ko.rotationFactor,-20,Ko.maxRotation)}else S.targetRotation=0;if(S.lastX=m,S.hasLastX=!0,S.targetX=m,S.targetY=f,t){d();return}S.x=m,S.y=f,S.rotation=S.targetRotation,r()},[e,r,t,d]),y=s.useCallback(m=>{l(),i.current.hasLastX=!1,m==null||m()},[l]),x=s.useCallback(()=>{l(),i.current={x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1},n.current&&(n.current.style.transform="")},[l]);return s.useEffect(()=>(e||x(),l),[e,x,l]),{anchorRef:n,onShow:u,onCursorMove:p,exit:y,reset:x}}function x0(e){return`
10333
10333
  .${e}-wrapper {
10334
10334
  display: grid;
10335
10335
  align-items: start;
10336
- min-height: ${cs(48)};
10336
+ min-height: ${ds(48)};
10337
10337
  position: relative;
10338
10338
  overflow: visible;
10339
10339
  box-sizing: border-box;
@@ -10462,7 +10462,7 @@ a.${e}-list-item {
10462
10462
  flex-shrink: 0;
10463
10463
  overflow: visible;
10464
10464
  box-sizing: border-box;
10465
- min-width: ${cs(50)};
10465
+ min-width: ${ds(50)};
10466
10466
  position: relative;
10467
10467
  display: flex;
10468
10468
  align-items: flex-start;
@@ -10470,7 +10470,7 @@ a.${e}-list-item {
10470
10470
 
10471
10471
  .${e}-list-col-last {
10472
10472
  flex: 1 1 auto;
10473
- min-width: ${cs(50)};
10473
+ min-width: ${ds(50)};
10474
10474
  }
10475
10475
 
10476
10476
  .${e}-list-col-title {
@@ -10705,7 +10705,7 @@ a.${e}-list-item {
10705
10705
  overflow-wrap: anywhere;
10706
10706
  word-break: break-word;
10707
10707
  }
10708
- `}const Ei=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Ol=["AColumn","BColumn","CColumn","DColumn","EColumn"],si="cutLabel",xr=[...Ol,si],Ba=["A","B","C","D","E"];function pp(e){return`${e}ColumnVerticalAlign`}const Xs=["Top","Center","Bottom"];function Dl(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Ba.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function x0(e){const t=Dl(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function b0(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Ba.includes(n)?n:null}function mp(e,t,n){const i=b0(e);return i?i===t?!1:x0(n[pp(i)]):!0}function br(e){const t=Dl(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Ba.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function S0(e,t,n){if(gp(e,t,n))return br(e);const i=br(e);return i.kind==="baseline"?{kind:"top"}:i}function w0(e){const t=br(e);return t.kind==="baseline"?{kind:"top"}:t}function gp(e,t,n){return mp(e,n,t)?br(e).kind==="baseline":!1}function $0(e){const t={};let n=!1;for(const i of Ba){const o=pp(i),r=e[o];if(e.type==="b"){const l=String(r??"Top").trim();l!=="Top"&&l!=="Center"&&l!=="Bottom"&&(t[o]="Top",n=!0);continue}mp(r,i,e)||(t[o]="Top",n=!0)}return n?t:null}function C0(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function T0(e){const t=br(e).kind;return t==="baseline"?"center":t}function I0(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function jc(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function L0(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:i}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),r=o-i;return n.remove(),r}function us(e,t,n,i){const o=e.titleEl;if(!o)return 0;const r=o.closest(`.${n}`);if(!r)return 0;const l=L0(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+l;const c=r.getBoundingClientRect(),d=o.getBoundingClientRect().height;let u=0;return e.kind==="center"?u=(c.height-d)/2:e.kind==="bottom"&&(u=c.height-d),c.top-t+u+l}function M0(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const r=o.querySelector(`.${n}`);r&&(r.style.minHeight=`${i}px`,r.style.height=`${i}px`)}),i)}function P0(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const R0={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Zt(e,t){return`${e}${t.replace(/^text/,"Text")}`}const E0={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function k0(e){return[Zt(e,"textFontFamily"),Zt(e,"textFontSettings"),{type:"row",items:[Zt(e,"textFontSize"),Zt(e,"textLineHeight"),Zt(e,"textLetterSpacing"),Zt(e,"textWordSpacing")]},Zt(e,"textTextAlign"),Zt(e,"textTextAppearance"),`${e}VerticalAlign`]}function A0(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(xr.map(e=>[E0[e],k0(e)]))}}function $a(e,t){const n=i=>{const o=Zt(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===si?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function Vc(e,t){var i,o;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((i=e.textFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e.textFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:e.textFontSize??.01,lineHeight:e.textLineHeight,letterSpacing:e.textLetterSpacing,wordSpacing:e.textWordSpacing,textAlign:e.textTextAlign,textAppearance:e.textTextAppearance,color:e.textColor??"#767676"};return pn(nn(n,t))}function Gc(e,t,n,i){const o=$a(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<r?`${n} ${i}`:n}function Xc(e,t,n,i){const o=$a(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=r?{}:{[`--${n}-title-leading-gap`]:b.scalingValue((r-l)/2,i)}}const En=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Eo=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],ko=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Ao=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],F0={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},N0=["hover","focus","filled","success","error"],Uc=.004,po=.004,ps=po,zl=50,Sr=1440,wr=zl/Sr;function hp(e){const t=typeof e=="number"&&e>0?e:Sr;return zl/t}function _0(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 Sr}const fp={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function lr(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function H0(e,t=1){const n=t/e;return Object.fromEntries(En.map(i=>[i,n]))}function W0(){return Object.fromEntries([...Eo.map(e=>[e,0]),...ko.map(e=>[e,0])])}function O0(){return Object.fromEntries(Ao.map(e=>[e,0]))}function Vr(e){return Object.fromEntries(En.map(t=>[t,typeof e[t]=="number"?e[t]:fp[t]]))}function yp(e,t,n){const i=e-wr,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const r=i/o;return{paddingLeft:t*r,paddingRight:n*r}}function ma(e,t,n){const i=Bl(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((r,l)=>r+l,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function D0(e,t,n){const i={};for(let o=0;o<e;o+=1){const r=Eo[o],l=ko[o],c=typeof n[r]=="number"?n[r]:0,d=typeof n[l]=="number"?n[l]:0,u=yp(t[o]??0,c,d);u.paddingLeft!==c&&(i[r]=u.paddingLeft),u.paddingRight!==d&&(i[l]=u.paddingRight)}return i}function Bl(e,t,n){if(e<=0)return[];const i=En.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)+wr;if(t>=l)return i;const c=[...o];let d=l-t;for(let u=c.length-1;u>=0&&d>0;u-=1){const p=c[u]-wr;if(p<=0)continue;const y=Math.min(d,p);c[u]-=y,d-=y}return[...c,i[e-1]]}function z0(e,t,n){if(e<=1)return{};const i=Bl(e,t,n),o={};for(let r=0;r<e-1;r+=1){const l=En[r];i[r]!==n[l]&&(o[l]=i[r])}return o}function qc(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Ei]}function B0(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function j0(e,t,n,i){const o=Math.min(i,e.length,En.length),r={};for(let l=0;l<o;l+=1){const c=e[l],d=t.indexOf(c);if(d===-1)continue;const u=En[d],p=Eo[d],y=ko[d],x=Ao[d],m=En[l],f=Eo[l],S=ko[l],w=Ao[l],N=n[u],v=n[p],M=n[y],R=n[x];typeof N=="number"&&(r[m]=N),typeof v=="number"&&(r[f]=v),typeof M=="number"&&(r[S]=M),typeof R=="number"&&(r[w]=R)}return r}function vp(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 V0(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=lr(e),r=e.type==="b"||e.type===void 0&&t.type==="b",l={...e,...H0(n,o),...W0()};if(r)for(const c of Ao)typeof t[c]=="number"&&(l[c]=t[c]);else Object.assign(l,O0());return vp(e,l)?l:e}function G0(e,t,n){const i=$0(e);i&&(e={...e,...i});const o=hp(n==null?void 0:n.designWidth),r=e.columns,l=t.columns,c=lr(e),d=lr(t),u=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof r=="number"?r:typeof l=="number"?l:Ei.length,y=M=>{if(u)return M;const R=Vr({...t,...M}),U=lr(M),X=ma(p,U,R),D=D0(p,X,{...t,...M});return Object.keys(D).length===0?M:{...M,...D}};if(typeof r=="number"&&r!==l)return e;const x=qc(e),m=qc(t);if(!B0(x,m))return y({...e,...j0(x,m,t,p)});if(c<d&&typeof p=="number"&&!u){const M=Vr({...t,...e});return y({...e,...z0(p,c,M)})}if(u){const M=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,R=Math.max(0,(c-o)/2);return M>R?{...e,textPaddingLR:R}:e}const f=Vr({...t,...e}),S=ma(p,d,Vr(t)),N=ma(p,c,f).some((M,R)=>M<(S[R]??M)),v=En.some(M=>{const R=e[M],U=t[M];return typeof R=="number"&&typeof U=="number"&&R!==U});return N||v?y(e):e}function X0(e,t,n,i){const o=t.slice(0,e).reduce((l,c)=>l+c,0),r=n.slice(e+1,t.length-1).reduce((l,c)=>l+c,0);return Math.max(wr,i-o-r-wr)}function U0(e,t){return Math.random()*(t-e)+e}function q0(e){return Object.fromEntries(En.map(t=>[t,typeof e[t]=="number"?e[t]:fp[t]]))}function ms(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function K0(e,t,n,i,o,r){return e.slice(0,t).map((l,c)=>{const d=Eo[c],u=ko[c],p=Ao[c];return{key:l,textPrefix:R0[l],widthKey:En[c],width:n[En[c]],paddingLeftKey:d,paddingRightKey:u,paddingBottomKey:p,paddingLeft:i[d],paddingRight:o[u],paddingBottom:r[p]}})}function Y0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r,layoutId:l,portalId:c,onUpdateSettings:d}){const{prefix:u}=b.useScopedStyles(),p=!!o,{columns:y,type:x,wrapperWidth:m,entriesCount:f,cellMinHeight:S,dividerWidth:w,showVisibility:N,cut:v,showCut:M,cutCellMinHeight:R,cutLabel:U,imageSize:X,imageOnHover:D,imagePosition:_="cursor",imageInterpolation:W="on",entryHoverEffect:T,entryHoverShowOption:C,rowPaddingTop:q,rowPaddingBottom:E,rowPaddingTopB:$,columnsOrder:I,textPaddingLR:j,textColor:F,backgroundColor:K,dividerColor:P,textHoverColor:h,backgroundHoverColor:J,dividerHoverColor:V}=e,[he,k]=s.useState(void 0),[ce,L]=s.useState(null),me=s.useRef(null),te=D==="on"&&(!n||i),ve=_==="cursor",Le=ve&&W==="on",{anchorRef:de,onShow:ue,onCursorMove:Z,exit:le}=y0(!!(te&&ce!==null),Le),oe=(v??0)>0,ge=x==="b",Se=s.useRef(null),Ee=s.useRef(null),[Ne,Te]=s.useState(null),[Ce,g]=s.useState(Sr),Y=hp(Ce),ee=Math.max(0,((m??0)-Y)/2),ae=Math.min(j??0,ee),ye=Math.max(ae,po),ne=((m??0)+Y)/2;s.useLayoutEffect(()=>{if(!n){g(Sr);return}const Re=()=>{g(_0(Se.current))};Re();const dt=Se.current;if(!dt)return;const ut=new ResizeObserver(Re);ut.observe(dt);let kt=dt;for(;kt&&!kt.style.getPropertyValue("--cntrl-article-width");)kt=kt.parentElement;return kt&&ut.observe(kt),()=>ut.disconnect()},[n,l]),s.useEffect(()=>{k(void 0)},[v,M,t,f]),s.useEffect(()=>{n&&!i&&k(void 0)},[n,i]);const B=b.buildColorVars(u,{textColor:F,backgroundColor:K,dividerColor:P,textHoverColor:h,backgroundHoverColor:J,dividerHoverColor:V},F0,N0),G=r&&r!=="default"?`${u}-state-${r}`:"",ie=`${!n||i?T==="default"?`${u}-entry-hover-default`:T==="blinds"?`${u}-entry-hover-blinds`:T==="reveal"?`${u}-entry-hover-reveal`:"":""} ${G}`.trim(),H=T==="reveal"&&(!n||i),be=(N==null?void 0:N[0])??!1,re=(N==null?void 0:N[1])??!1,Q=s.useRef(e),Pe=s.useRef(l);s.useEffect(()=>{if(!d||!n){Q.current=e,Pe.current=l;return}if(Pe.current!==l){Q.current=e,Pe.current=l;return}const Re=Q.current;if(!(Re!==e))return;if(typeof Re.columns=="number"&&typeof e.columns=="number"&&Re.columns!==e.columns){Q.current=e;return}const ut=G0(e,Re,{designWidth:Ce});Q.current=e,vp(e,ut)&&d(ut)},[e,d,n,l,Ce]);const Ae=s.useMemo(()=>q0(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),He=s.useMemo(()=>ms(e,Eo),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),Xe=s.useMemo(()=>ms(e,ko),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Ue=s.useMemo(()=>ms(e,Ao),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),Je=s.useMemo(()=>Array.isArray(I)&&I.length>0?I:[...Ei],[I]),je=s.useMemo(()=>K0(Je,y,Ae,He,Xe,Ue),[Je,y,Ae,He,Xe,Ue]),xe=lr(e),Ie=s.useMemo(()=>En.slice(0,y).map(Re=>Ae[Re]),[y,Ae]),ze=s.useMemo(()=>Bl(y,xe,Ae),[y,xe,Ae]),Ze=s.useMemo(()=>ma(y,xe,Ae),[y,xe,Ae]),tt=s.useMemo(()=>je.map((Re,dt)=>yp(Ze[dt]??0,Re.paddingLeft,Re.paddingRight)),[je,Ze]),ot=s.useMemo(()=>{const Re=f===0?1/0:f;return(t??[]).slice(0,Re).map((ut,kt)=>({id:kt,cells:Object.fromEntries(Ei.map(Qe=>[Qe,ut[Qe]??""])),image:ut.image,link:ut.link}))},[t,f]),lt=oe?he??v:ot.length,it=s.useMemo(()=>oe?ot.slice(0,lt):ot,[ot,oe,lt]),xt=oe&&lt<ot.length,rt=it.length>1||xt,_e=[be?`${u}-divider-top`:"",re||rt?`${u}-divider-bottom`:""].filter(Boolean).join(" "),We=!n||i,vt=()=>{if(!We)return;const Re=he??v;if(!M){k(ot.length);return}k(Math.min(Re+M,ot.length))},Ve=Re=>b.scalingValue(Re,n??!1),Ke=ge?$??0:q??0,pe=E??0,De=S??0,qe=Math.max(pe,ps),bt=Dc(0,it.length,be,re,xt,w??0,n??!1).borderTopWidth,yt=ge?"rowPaddingTopB":"rowPaddingTop",Et=je[0],ct=je[je.length-1],wt=tt[0],nt=tt[tt.length-1],Nt=Et&&wt?Math.max(wt.paddingLeft,po):0,jt=ct&&nt?Math.max(nt.paddingRight,po):0,$e=xe,Ge=(Re,dt)=>f0(_,Se.current,ve?Re:null,dt),ht=(Re,dt)=>{if(!te)return;const ut=Re.image;if(!(ut!=null&&ut.assetId)){le(()=>L(null));return}const kt=(X==null?void 0:X.min)??80,Qe=(X==null?void 0:X.max)??320,at=(ce==null?void 0:ce.rowId)===Re.id,It=at?ce.widthPx:U0(kt,Qe),{x:At,y:pt}=Ge(dt,It);if(at&&ve){Z(At,pt);return}L({rowId:Re.id,assetId:ut.assetId,objectFit:"contain",isVideo:u0(ut),embed:b.isEmbedMedia(ut)?ut:void 0,widthPx:It}),me.current={x:At,y:pt}},Lt=Re=>{if(!te||!ce||!ve)return;const{x:dt,y:ut}=Ge(Re,ce.widthPx);Z(dt,ut)},$t=()=>{ce&&le(()=>L(null))},mt=Re=>{H&&Wc(Re,u),!(!te||!ce)&&le(()=>L(null))},_t=Re=>{H&&Oc(Re,u)};s.useLayoutEffect(()=>{if(!ce||!me.current)return;const{x:Re,y:dt}=me.current;me.current=null,ue(Re,dt)},[ce==null?void 0:ce.rowId,ce==null?void 0:ce.assetId,ue]),s.useLayoutEffect(()=>{if(!p||ge){Te(null);return}const Re=Ee.current,dt=Re==null?void 0:Re.parentElement;if(!Re||!dt){Te(null);return}const ut=()=>{const Qe=Re.querySelector("[data-list-row]");if(!Qe){Te(null);return}const at=dt.getBoundingClientRect(),It=Qe.getBoundingClientRect();Te(It.top-at.top+It.height/2)};ut();const kt=new ResizeObserver(ut);return kt.observe(Re),kt.observe(dt),()=>kt.disconnect()},[p,ge,it,Ke,pe,De,t,e,je,Ze,Ce,w,be,re,xt]);const Ot=s.useMemo(()=>!ge&&Ol.some(Re=>{const dt=Re.charAt(0),ut=e[`${Re}VerticalAlign`];return gp(ut,e,dt)}),[ge,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);s.useLayoutEffect(()=>{var At;const Re=Se.current;if(!Re)return;const dt=()=>{Re.querySelectorAll("[data-list-col]").forEach(pt=>{pt.style.transform="";const Ut=pt.querySelector(`.${u}-list-col`);Ut&&(Ut.style.minHeight="",Ut.style.height="");const qt=pt.querySelector(`.${u}-list-col-title`);qt&&(qt.style.transform="")})};if(ge||!Ot){dt();return}const ut=()=>{const pt=Array.from(Re.querySelectorAll("[data-list-row]")),Ut=`${u}-list-col`,qt=`${u}-baseline-probe`;pt.forEach(Dt=>{Dt.querySelectorAll("[data-list-col]").forEach(Vt=>{Vt.style.transform="";const Gt=Vt.querySelector(`.${Ut}`);Gt&&(Gt.style.minHeight="",Gt.style.height="");const Bt=Vt.querySelector(`.${u}-list-col-title`);Bt&&(Bt.style.transform="")})}),pt.forEach(Dt=>{const Vt=Array.from(Dt.querySelectorAll("[data-list-col]"));M0(Dt,Vt,Ut)}),Re.offsetHeight,pt.forEach(Dt=>{const Vt=Array.from(Dt.querySelectorAll("[data-list-col]")),Gt=Dt.getBoundingClientRect().top,Bt=new Map,Yt=Vt.map(Fe=>{const Oe=Fe.querySelector(`.${u}-list-col-title`),ft={el:Fe,titleEl:Oe,letter:Fe.getAttribute("data-col-letter")??"",kind:Fe.getAttribute("data-valign")??"top",anchor:Fe.getAttribute("data-valign-anchor")};return Bt.set(ft.letter,ft),ft}),O=new Map,Me=(Fe,Oe)=>{const ft=O.get(Fe.letter);if(ft!==void 0)return ft;const Tt=Fe.anchor?Bt.get(Fe.anchor):void 0;if(Fe.kind!=="baseline"||!Tt||Oe.has(Fe.letter)){const on=us(Fe,Gt,Ut,qt);return O.set(Fe.letter,on),on}Oe.add(Fe.letter);const et=Me(Tt,Oe);Oe.delete(Fe.letter);const Mt=us(Fe,Gt,Ut,qt),Ct=et-Mt;P0(Fe.titleEl,Ct);const Ht=us(Fe,Gt,Ut,qt);return O.set(Fe.letter,Ht),Ht};Yt.forEach(Fe=>Me(Fe,new Set))})};let kt=null;const Qe=()=>{kt===null&&(kt=requestAnimationFrame(()=>{kt=null,ut()}))};ut();const at=new ResizeObserver(()=>Qe());at.observe(Re);let It=!1;return typeof document<"u"&&((At=document.fonts)!=null&&At.ready)&&document.fonts.ready.then(()=>{It||Qe()}),()=>{It=!0,kt!==null&&(cancelAnimationFrame(kt),kt=null),at.disconnect(),dt()}},[Ot,ge,e,t,Ce,it,Ze]);const zt=s.useMemo(()=>v0(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:zt}}),a.jsx("div",{style:B,children:a.jsxs("div",{ref:Se,className:`${u}-wrapper ${ie}${_e?` ${_e}`:""}${ge?` ${u}-type-b`:""}`.trim(),style:{width:b.scalingValue(m??0,n)},onMouseMove:te?Lt:void 0,onMouseLeave:te?$t:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[it.map((Re,dt)=>{var at,It,At;const ut=(((at=Re.link)==null?void 0:at.value.length)??0)>0,kt=ut&&(!n||i)?"a":"div",Qe=Dc(dt,it.length,be,re,xt,w??0,n??!1);return a.jsxs(kt,{ref:dt===0?pt=>{Ee.current=pt}:void 0,className:`${u}-list-item${ut||C==="always"?` ${u}-list-item-has-link`:""}${xt&&dt===it.length-1?` ${u}-list-item-before-cut`:""}`,...ut?{href:(It=Re.link)==null?void 0:It.value,target:((At=Re.link)==null?void 0:At.target)==="blank"?"_blank":"_self"}:{},style:Qe,onMouseEnter:pt=>{H&&(ut||C==="always")&&Wc(pt,u),te&&ht(Re,pt)},onMouseLeave:pt=>{H&&(ut||C==="always")&&Oc(pt,u)},children:[Ke>0&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:Ve(Ke)}}),a.jsxs("div",{className:`${u}-list-cols-row${ge?"":` ${u}-list-cols-row-h`}${p&&dt===0&&ge?` ${u}-list-cols-row-controls`:""}`,...ge?{}:{"data-list-row":""},style:ge?void 0:{minHeight:Ve(De)},children:[je.map((pt,Ut)=>{const qt=Ut===je.length-1,Dt=tt[Ut],Vt=pt.paddingBottom,Gt=m0(Re.cells[pt.key]),Bt=ge&&Gt&&Vt>0,Yt=ge?{minHeight:Ve(De)}:{width:Ve(Ze[Ut])},O=ge?{paddingLeft:Ve(ae),paddingRight:Ve(ae)}:{paddingLeft:Ve(Dt.paddingLeft),paddingRight:Ve(Dt.paddingRight)},Me=pt.textPrefix.charAt(0),Fe=ge?w0(e[`${pt.textPrefix}VerticalAlign`]):S0(e[`${pt.textPrefix}VerticalAlign`],e,Me),Oe=ge&&Gt&&p&&dt===0;return ge&&!Gt?null:a.jsxs("div",{className:ge?`${u}-list-col-wrap`:void 0,...ge?{}:{"data-list-col":"","data-col-letter":Me,"data-valign":Fe.kind,...Fe.kind==="baseline"?{"data-valign-anchor":Fe.anchorLetter}:{}},children:[a.jsx("div",{className:`${u}-list-col${qt?` ${u}-list-col-last`:""}`,style:{...O,...Yt,...ge?{justifyContent:jc(Fe.kind)}:{}},"data-test":pt.width,children:a.jsx("span",{className:Gc(e,pt.textPrefix,`${u}-list-col-title`,`${u}-text-tight-leading`),style:{...Vc($a(e,pt.textPrefix),n),...Xc(e,pt.textPrefix,u,n),...ge?{}:C0(Fe.kind)},children:Re.cells[pt.key]??null})}),Bt&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:Ve(Vt)}}),Oe&&a.jsx("div",{"data-controls":pt.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:`${u}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Ve(Math.max(Vt,ps))}})]},pt.key)}),p&&dt===0&&ge&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ne),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{top:0,left:0,width:Ve(ye),height:"100%"}}),a.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ne),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{top:0,left:Ve(Math.max(ye,xe-ye)),width:Ve(ye),height:"100%"}})]})]}),!ge&&pe>0&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:Ve(pe)}}),p&&dt===0&&!ge&&a.jsx("div",{"data-controls":"rowPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${u}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Ve(qe)}})]},Re.id)}),p&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":yt,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":ge?"center":"left-y",className:`${u}-control-anchor`,style:{top:bt,left:0,width:"100%",height:Ve(Math.max(Ke,ps))}})},"row-padding-handles"),p&&!ge&&Et&&ct&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":Et.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ze[0]-((wt==null?void 0:wt.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Ne??void 0,className:`${u}-control-anchor`,style:{top:0,left:0,width:Ve(Nt),height:"100%"}}),a.jsx("div",{"data-controls":ct.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ze[je.length-1]-((nt==null?void 0:nt.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Ne??void 0,className:`${u}-control-anchor`,style:{top:0,left:Ve($e-jt),width:Ve(jt),height:"100%"}})]},"column-edge-padding-handles"),p&&!ge&&je.slice(0,-1).map((Re,dt)=>{const ut=je[dt+1],kt=ze.slice(0,dt+1).reduce((pt,Ut)=>pt+Ut,0),Qe=tt[dt],at=tt[dt+1],It=Math.max(Qe.paddingRight,po),At=Math.max(at.paddingLeft,po);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":Re.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ze[dt]-Qe.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Ne??void 0,className:`${u}-control-anchor`,style:{top:0,left:Ve(kt-It),width:Ve(It),height:"100%"}}),a.jsx("div",{"data-controls":ut.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ze[dt+1]-at.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Ne??void 0,className:`${u}-control-anchor`,style:{top:0,left:Ve(kt),width:Ve(At),height:"100%"}})]},`${Re.paddingRightKey}-padding`)}),p&&!ge&&je.slice(0,-1).map((Re,dt)=>{const ut=X0(dt,ze,Ie,xe),Qe=ze.slice(0,dt+1).reduce((at,It)=>at+It,0)-Uc/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Re.widthKey,"data-controls-axis":"x","data-controls-min":String(zl),"data-controls-max-fraction":String(ut),"data-controls-variant":"column-width",className:`${u}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Ve(Qe),width:Ve(Uc),height:"calc(100%)",pointerEvents:"auto"}})},`${Re.widthKey}-junction`)})]}),xt&&(()=>{const Re=$a(e,si),dt=T0(e.cutLabelVerticalAlign),ut=Re.textTextAlign==="justify"||ge;return a.jsx("button",{type:"button",className:`${u}-cut-item`,style:{minHeight:Ve(R??0),cursor:We?"pointer":"default",...g0(re,w??0,n??!1)},onClick:We?vt:void 0,onMouseEnter:H||te?mt:void 0,onMouseLeave:H?_t:void 0,children:a.jsx("div",{className:`${u}-list-cols-row`,style:{...ge?{paddingLeft:Ve(ae),paddingRight:Ve(ae)}:{},justifyContent:I0(Re.textTextAlign),alignItems:jc(dt)},children:a.jsx("span",{className:Gc(e,si,`${u}-cut-label`,`${u}-text-tight-leading`),style:{...Vc(Re,n),...Xc(e,si,u,n),...ut?{width:"100%"}:{}},children:U})})})})(),te&&ce&&typeof document<"u"&&(()=>{const Re=`${ce.widthPx}px`,dt={width:Re,height:"auto",maxHeight:Re,objectFit:"contain"},ut=(c?document.getElementById(c):null)??document.body;return qn.createPortal(a.jsx("div",{ref:de,className:`${u}-hover-media-anchor`,"data-selection":"none",children:a.jsx(p0,{media:ce,className:ce.isVideo?`${u}-hover-video`:`${u}-hover-image`,style:dt},`${ce.rowId}-${ce.assetId}`)}),ut)})()]})})]})}const Q0=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
10708
+ `}const Ri=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Dl=["AColumn","BColumn","CColumn","DColumn","EColumn"],si="cutLabel",xr=[...Dl,si],ja=["A","B","C","D","E"];function mp(e){return`${e}ColumnVerticalAlign`}const Us=["Top","Center","Bottom"];function zl(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return ja.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function b0(e){const t=zl(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function S0(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return ja.includes(n)?n:null}function gp(e,t,n){const i=S0(e);return i?i===t?!1:b0(n[mp(i)]):!0}function br(e){const t=zl(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return ja.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function w0(e,t,n){if(hp(e,t,n))return br(e);const i=br(e);return i.kind==="baseline"?{kind:"top"}:i}function $0(e){const t=br(e);return t.kind==="baseline"?{kind:"top"}:t}function hp(e,t,n){return gp(e,n,t)?br(e).kind==="baseline":!1}function C0(e){const t={};let n=!1;for(const i of ja){const o=mp(i),r=e[o];if(e.type==="b"){const l=String(r??"Top").trim();l!=="Top"&&l!=="Center"&&l!=="Bottom"&&(t[o]="Top",n=!0);continue}gp(r,i,e)||(t[o]="Top",n=!0)}return n?t:null}function T0(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function I0(e){const t=br(e).kind;return t==="baseline"?"center":t}function L0(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function Vc(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function M0(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:i}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),r=o-i;return n.remove(),r}function ps(e,t,n,i){const o=e.titleEl;if(!o)return 0;const r=o.closest(`.${n}`);if(!r)return 0;const l=M0(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+l;const c=r.getBoundingClientRect(),d=o.getBoundingClientRect().height;let u=0;return e.kind==="center"?u=(c.height-d)/2:e.kind==="bottom"&&(u=c.height-d),c.top-t+u+l}function P0(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const r=o.querySelector(`.${n}`);r&&(r.style.minHeight=`${i}px`,r.style.height=`${i}px`)}),i)}function E0(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const R0={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Zt(e,t){return`${e}${t.replace(/^text/,"Text")}`}const k0={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function A0(e){return[Zt(e,"textFontFamily"),Zt(e,"textFontSettings"),{type:"row",items:[Zt(e,"textFontSize"),Zt(e,"textLineHeight"),Zt(e,"textLetterSpacing"),Zt(e,"textWordSpacing")]},Zt(e,"textTextAlign"),Zt(e,"textTextAppearance"),`${e}VerticalAlign`]}function F0(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(xr.map(e=>[k0[e],A0(e)]))}}function Ca(e,t){const n=i=>{const o=Zt(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===si?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function Gc(e,t){var i,o;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((i=e.textFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e.textFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:e.textFontSize??.01,lineHeight:e.textLineHeight,letterSpacing:e.textLetterSpacing,wordSpacing:e.textWordSpacing,textAlign:e.textTextAlign,textAppearance:e.textTextAppearance,color:e.textColor??"#767676"};return pn(nn(n,t))}function Xc(e,t,n,i){const o=Ca(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<r?`${n} ${i}`:n}function Uc(e,t,n,i){const o=Ca(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=r?{}:{[`--${n}-title-leading-gap`]:b.scalingValue((r-l)/2,i)}}const Rn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Ro=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],ko=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Ao=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],N0={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},_0=["hover","focus","filled","success","error"],qc=.004,po=.004,ms=po,Bl=50,Sr=1440,wr=Bl/Sr;function fp(e){const t=typeof e=="number"&&e>0?e:Sr;return Bl/t}function H0(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 Sr}const yp={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function lr(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function W0(e,t=1){const n=t/e;return Object.fromEntries(Rn.map(i=>[i,n]))}function O0(){return Object.fromEntries([...Ro.map(e=>[e,0]),...ko.map(e=>[e,0])])}function D0(){return Object.fromEntries(Ao.map(e=>[e,0]))}function Vr(e){return Object.fromEntries(Rn.map(t=>[t,typeof e[t]=="number"?e[t]:yp[t]]))}function vp(e,t,n){const i=e-wr,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const r=i/o;return{paddingLeft:t*r,paddingRight:n*r}}function ga(e,t,n){const i=jl(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((r,l)=>r+l,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function z0(e,t,n){const i={};for(let o=0;o<e;o+=1){const r=Ro[o],l=ko[o],c=typeof n[r]=="number"?n[r]:0,d=typeof n[l]=="number"?n[l]:0,u=vp(t[o]??0,c,d);u.paddingLeft!==c&&(i[r]=u.paddingLeft),u.paddingRight!==d&&(i[l]=u.paddingRight)}return i}function jl(e,t,n){if(e<=0)return[];const i=Rn.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)+wr;if(t>=l)return i;const c=[...o];let d=l-t;for(let u=c.length-1;u>=0&&d>0;u-=1){const p=c[u]-wr;if(p<=0)continue;const y=Math.min(d,p);c[u]-=y,d-=y}return[...c,i[e-1]]}function B0(e,t,n){if(e<=1)return{};const i=jl(e,t,n),o={};for(let r=0;r<e-1;r+=1){const l=Rn[r];i[r]!==n[l]&&(o[l]=i[r])}return o}function Kc(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Ri]}function j0(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function V0(e,t,n,i){const o=Math.min(i,e.length,Rn.length),r={};for(let l=0;l<o;l+=1){const c=e[l],d=t.indexOf(c);if(d===-1)continue;const u=Rn[d],p=Ro[d],y=ko[d],x=Ao[d],m=Rn[l],f=Ro[l],S=ko[l],w=Ao[l],N=n[u],v=n[p],M=n[y],E=n[x];typeof N=="number"&&(r[m]=N),typeof v=="number"&&(r[f]=v),typeof M=="number"&&(r[S]=M),typeof E=="number"&&(r[w]=E)}return r}function xp(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 G0(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=lr(e),r=e.type==="b"||e.type===void 0&&t.type==="b",l={...e,...W0(n,o),...O0()};if(r)for(const c of Ao)typeof t[c]=="number"&&(l[c]=t[c]);else Object.assign(l,D0());return xp(e,l)?l:e}function X0(e,t,n){const i=C0(e);i&&(e={...e,...i});const o=fp(n==null?void 0:n.designWidth),r=e.columns,l=t.columns,c=lr(e),d=lr(t),u=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof r=="number"?r:typeof l=="number"?l:Ri.length,y=M=>{if(u)return M;const E=Vr({...t,...M}),U=lr(M),X=ga(p,U,E),D=z0(p,X,{...t,...M});return Object.keys(D).length===0?M:{...M,...D}};if(typeof r=="number"&&r!==l)return e;const x=Kc(e),m=Kc(t);if(!j0(x,m))return y({...e,...V0(x,m,t,p)});if(c<d&&typeof p=="number"&&!u){const M=Vr({...t,...e});return y({...e,...B0(p,c,M)})}if(u){const M=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,E=Math.max(0,(c-o)/2);return M>E?{...e,textPaddingLR:E}:e}const f=Vr({...t,...e}),S=ga(p,d,Vr(t)),N=ga(p,c,f).some((M,E)=>M<(S[E]??M)),v=Rn.some(M=>{const E=e[M],U=t[M];return typeof E=="number"&&typeof U=="number"&&E!==U});return N||v?y(e):e}function U0(e,t,n,i){const o=t.slice(0,e).reduce((l,c)=>l+c,0),r=n.slice(e+1,t.length-1).reduce((l,c)=>l+c,0);return Math.max(wr,i-o-r-wr)}function q0(e,t){return Math.random()*(t-e)+e}function K0(e){return Object.fromEntries(Rn.map(t=>[t,typeof e[t]=="number"?e[t]:yp[t]]))}function gs(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function Y0(e,t,n,i,o,r){return e.slice(0,t).map((l,c)=>{const d=Ro[c],u=ko[c],p=Ao[c];return{key:l,textPrefix:R0[l],widthKey:Rn[c],width:n[Rn[c]],paddingLeftKey:d,paddingRightKey:u,paddingBottomKey:p,paddingLeft:i[d],paddingRight:o[u],paddingBottom:r[p]}})}function Q0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r,layoutId:l,portalId:c,onUpdateSettings:d}){const{prefix:u}=b.useScopedStyles(),p=!!o,{columns:y,type:x,wrapperWidth:m,entriesCount:f,cellMinHeight:S,dividerWidth:w,showVisibility:N,cut:v,showCut:M,cutCellMinHeight:E,cutLabel:U,imageSize:X,imageOnHover:D,imagePosition:_="cursor",imageInterpolation:W="on",entryHoverEffect:T,entryHoverShowOption:C,rowPaddingTop:q,rowPaddingBottom:R,rowPaddingTopB:$,columnsOrder:I,textPaddingLR:j,textColor:F,backgroundColor:K,dividerColor:P,textHoverColor:h,backgroundHoverColor:J,dividerHoverColor:V}=e,[he,k]=s.useState(void 0),[ce,L]=s.useState(null),me=s.useRef(null),te=D==="on"&&(!n||i),ve=_==="cursor",Le=ve&&W==="on",{anchorRef:de,onShow:ue,onCursorMove:Z,exit:le}=v0(!!(te&&ce!==null),Le),oe=(v??0)>0,ge=x==="b",Se=s.useRef(null),Re=s.useRef(null),[Ne,Te]=s.useState(null),[Ce,g]=s.useState(Sr),Y=fp(Ce),ee=Math.max(0,((m??0)-Y)/2),ae=Math.min(j??0,ee),ye=Math.max(ae,po),ne=((m??0)+Y)/2;s.useLayoutEffect(()=>{if(!n){g(Sr);return}const Ee=()=>{g(H0(Se.current))};Ee();const dt=Se.current;if(!dt)return;const ut=new ResizeObserver(Ee);ut.observe(dt);let kt=dt;for(;kt&&!kt.style.getPropertyValue("--cntrl-article-width");)kt=kt.parentElement;return kt&&ut.observe(kt),()=>ut.disconnect()},[n,l]),s.useEffect(()=>{k(void 0)},[v,M,t,f]),s.useEffect(()=>{n&&!i&&k(void 0)},[n,i]);const B=b.buildColorVars(u,{textColor:F,backgroundColor:K,dividerColor:P,textHoverColor:h,backgroundHoverColor:J,dividerHoverColor:V},N0,_0),G=r&&r!=="default"?`${u}-state-${r}`:"",ie=`${!n||i?T==="default"?`${u}-entry-hover-default`:T==="blinds"?`${u}-entry-hover-blinds`:T==="reveal"?`${u}-entry-hover-reveal`:"":""} ${G}`.trim(),H=T==="reveal"&&(!n||i),be=(N==null?void 0:N[0])??!1,re=(N==null?void 0:N[1])??!1,Q=s.useRef(e),Pe=s.useRef(l);s.useEffect(()=>{if(!d||!n){Q.current=e,Pe.current=l;return}if(Pe.current!==l){Q.current=e,Pe.current=l;return}const Ee=Q.current;if(!(Ee!==e))return;if(typeof Ee.columns=="number"&&typeof e.columns=="number"&&Ee.columns!==e.columns){Q.current=e;return}const ut=X0(e,Ee,{designWidth:Ce});Q.current=e,xp(e,ut)&&d(ut)},[e,d,n,l,Ce]);const Ae=s.useMemo(()=>K0(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),He=s.useMemo(()=>gs(e,Ro),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),Xe=s.useMemo(()=>gs(e,ko),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Ue=s.useMemo(()=>gs(e,Ao),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),Je=s.useMemo(()=>Array.isArray(I)&&I.length>0?I:[...Ri],[I]),je=s.useMemo(()=>Y0(Je,y,Ae,He,Xe,Ue),[Je,y,Ae,He,Xe,Ue]),xe=lr(e),Ie=s.useMemo(()=>Rn.slice(0,y).map(Ee=>Ae[Ee]),[y,Ae]),ze=s.useMemo(()=>jl(y,xe,Ae),[y,xe,Ae]),Ze=s.useMemo(()=>ga(y,xe,Ae),[y,xe,Ae]),tt=s.useMemo(()=>je.map((Ee,dt)=>vp(Ze[dt]??0,Ee.paddingLeft,Ee.paddingRight)),[je,Ze]),ot=s.useMemo(()=>{const Ee=f===0?1/0:f;return(t??[]).slice(0,Ee).map((ut,kt)=>({id:kt,cells:Object.fromEntries(Ri.map(Qe=>[Qe,ut[Qe]??""])),image:ut.image,link:ut.link}))},[t,f]),lt=oe?he??v:ot.length,it=s.useMemo(()=>oe?ot.slice(0,lt):ot,[ot,oe,lt]),xt=oe&&lt<ot.length,rt=it.length>1||xt,_e=[be?`${u}-divider-top`:"",re||rt?`${u}-divider-bottom`:""].filter(Boolean).join(" "),We=!n||i,vt=()=>{if(!We)return;const Ee=he??v;if(!M){k(ot.length);return}k(Math.min(Ee+M,ot.length))},Ve=Ee=>b.scalingValue(Ee,n??!1),Ke=ge?$??0:q??0,pe=R??0,De=S??0,qe=Math.max(pe,ms),bt=zc(0,it.length,be,re,xt,w??0,n??!1).borderTopWidth,yt=ge?"rowPaddingTopB":"rowPaddingTop",Rt=je[0],ct=je[je.length-1],wt=tt[0],nt=tt[tt.length-1],Nt=Rt&&wt?Math.max(wt.paddingLeft,po):0,jt=ct&&nt?Math.max(nt.paddingRight,po):0,$e=xe,Ge=(Ee,dt)=>y0(_,Se.current,ve?Ee:null,dt),ht=(Ee,dt)=>{if(!te)return;const ut=Ee.image;if(!(ut!=null&&ut.assetId)){le(()=>L(null));return}const kt=(X==null?void 0:X.min)??80,Qe=(X==null?void 0:X.max)??320,at=(ce==null?void 0:ce.rowId)===Ee.id,It=at?ce.widthPx:q0(kt,Qe),{x:At,y:pt}=Ge(dt,It);if(at&&ve){Z(At,pt);return}L({rowId:Ee.id,assetId:ut.assetId,objectFit:"contain",isVideo:p0(ut),embed:b.isEmbedMedia(ut)?ut:void 0,widthPx:It}),me.current={x:At,y:pt}},Lt=Ee=>{if(!te||!ce||!ve)return;const{x:dt,y:ut}=Ge(Ee,ce.widthPx);Z(dt,ut)},$t=()=>{ce&&le(()=>L(null))},mt=Ee=>{H&&Oc(Ee,u),!(!te||!ce)&&le(()=>L(null))},_t=Ee=>{H&&Dc(Ee,u)};s.useLayoutEffect(()=>{if(!ce||!me.current)return;const{x:Ee,y:dt}=me.current;me.current=null,ue(Ee,dt)},[ce==null?void 0:ce.rowId,ce==null?void 0:ce.assetId,ue]),s.useLayoutEffect(()=>{if(!p||ge){Te(null);return}const Ee=Re.current,dt=Ee==null?void 0:Ee.parentElement;if(!Ee||!dt){Te(null);return}const ut=()=>{const Qe=Ee.querySelector("[data-list-row]");if(!Qe){Te(null);return}const at=dt.getBoundingClientRect(),It=Qe.getBoundingClientRect();Te(It.top-at.top+It.height/2)};ut();const kt=new ResizeObserver(ut);return kt.observe(Ee),kt.observe(dt),()=>kt.disconnect()},[p,ge,it,Ke,pe,De,t,e,je,Ze,Ce,w,be,re,xt]);const Ot=s.useMemo(()=>!ge&&Dl.some(Ee=>{const dt=Ee.charAt(0),ut=e[`${Ee}VerticalAlign`];return hp(ut,e,dt)}),[ge,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);s.useLayoutEffect(()=>{var At;const Ee=Se.current;if(!Ee)return;const dt=()=>{Ee.querySelectorAll("[data-list-col]").forEach(pt=>{pt.style.transform="";const Ut=pt.querySelector(`.${u}-list-col`);Ut&&(Ut.style.minHeight="",Ut.style.height="");const qt=pt.querySelector(`.${u}-list-col-title`);qt&&(qt.style.transform="")})};if(ge||!Ot){dt();return}const ut=()=>{const pt=Array.from(Ee.querySelectorAll("[data-list-row]")),Ut=`${u}-list-col`,qt=`${u}-baseline-probe`;pt.forEach(Dt=>{Dt.querySelectorAll("[data-list-col]").forEach(Vt=>{Vt.style.transform="";const Gt=Vt.querySelector(`.${Ut}`);Gt&&(Gt.style.minHeight="",Gt.style.height="");const Bt=Vt.querySelector(`.${u}-list-col-title`);Bt&&(Bt.style.transform="")})}),pt.forEach(Dt=>{const Vt=Array.from(Dt.querySelectorAll("[data-list-col]"));P0(Dt,Vt,Ut)}),Ee.offsetHeight,pt.forEach(Dt=>{const Vt=Array.from(Dt.querySelectorAll("[data-list-col]")),Gt=Dt.getBoundingClientRect().top,Bt=new Map,Yt=Vt.map(Fe=>{const Oe=Fe.querySelector(`.${u}-list-col-title`),ft={el:Fe,titleEl:Oe,letter:Fe.getAttribute("data-col-letter")??"",kind:Fe.getAttribute("data-valign")??"top",anchor:Fe.getAttribute("data-valign-anchor")};return Bt.set(ft.letter,ft),ft}),O=new Map,Me=(Fe,Oe)=>{const ft=O.get(Fe.letter);if(ft!==void 0)return ft;const Tt=Fe.anchor?Bt.get(Fe.anchor):void 0;if(Fe.kind!=="baseline"||!Tt||Oe.has(Fe.letter)){const on=ps(Fe,Gt,Ut,qt);return O.set(Fe.letter,on),on}Oe.add(Fe.letter);const et=Me(Tt,Oe);Oe.delete(Fe.letter);const Mt=ps(Fe,Gt,Ut,qt),Ct=et-Mt;E0(Fe.titleEl,Ct);const Ht=ps(Fe,Gt,Ut,qt);return O.set(Fe.letter,Ht),Ht};Yt.forEach(Fe=>Me(Fe,new Set))})};let kt=null;const Qe=()=>{kt===null&&(kt=requestAnimationFrame(()=>{kt=null,ut()}))};ut();const at=new ResizeObserver(()=>Qe());at.observe(Ee);let It=!1;return typeof document<"u"&&((At=document.fonts)!=null&&At.ready)&&document.fonts.ready.then(()=>{It||Qe()}),()=>{It=!0,kt!==null&&(cancelAnimationFrame(kt),kt=null),at.disconnect(),dt()}},[Ot,ge,e,t,Ce,it,Ze]);const zt=s.useMemo(()=>x0(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:zt}}),a.jsx("div",{style:B,children:a.jsxs("div",{ref:Se,className:`${u}-wrapper ${ie}${_e?` ${_e}`:""}${ge?` ${u}-type-b`:""}`.trim(),style:{width:b.scalingValue(m??0,n)},onMouseMove:te?Lt:void 0,onMouseLeave:te?$t:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[it.map((Ee,dt)=>{var at,It,At;const ut=(((at=Ee.link)==null?void 0:at.value.length)??0)>0,kt=ut&&(!n||i)?"a":"div",Qe=zc(dt,it.length,be,re,xt,w??0,n??!1);return a.jsxs(kt,{ref:dt===0?pt=>{Re.current=pt}:void 0,className:`${u}-list-item${ut||C==="always"?` ${u}-list-item-has-link`:""}${xt&&dt===it.length-1?` ${u}-list-item-before-cut`:""}`,...ut?{href:(It=Ee.link)==null?void 0:It.value,target:((At=Ee.link)==null?void 0:At.target)==="blank"?"_blank":"_self"}:{},style:Qe,onMouseEnter:pt=>{H&&(ut||C==="always")&&Oc(pt,u),te&&ht(Ee,pt)},onMouseLeave:pt=>{H&&(ut||C==="always")&&Dc(pt,u)},children:[Ke>0&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:Ve(Ke)}}),a.jsxs("div",{className:`${u}-list-cols-row${ge?"":` ${u}-list-cols-row-h`}${p&&dt===0&&ge?` ${u}-list-cols-row-controls`:""}`,...ge?{}:{"data-list-row":""},style:ge?void 0:{minHeight:Ve(De)},children:[je.map((pt,Ut)=>{const qt=Ut===je.length-1,Dt=tt[Ut],Vt=pt.paddingBottom,Gt=g0(Ee.cells[pt.key]),Bt=ge&&Gt&&Vt>0,Yt=ge?{minHeight:Ve(De)}:{width:Ve(Ze[Ut])},O=ge?{paddingLeft:Ve(ae),paddingRight:Ve(ae)}:{paddingLeft:Ve(Dt.paddingLeft),paddingRight:Ve(Dt.paddingRight)},Me=pt.textPrefix.charAt(0),Fe=ge?$0(e[`${pt.textPrefix}VerticalAlign`]):w0(e[`${pt.textPrefix}VerticalAlign`],e,Me),Oe=ge&&Gt&&p&&dt===0;return ge&&!Gt?null:a.jsxs("div",{className:ge?`${u}-list-col-wrap`:void 0,...ge?{}:{"data-list-col":"","data-col-letter":Me,"data-valign":Fe.kind,...Fe.kind==="baseline"?{"data-valign-anchor":Fe.anchorLetter}:{}},children:[a.jsx("div",{className:`${u}-list-col${qt?` ${u}-list-col-last`:""}`,style:{...O,...Yt,...ge?{justifyContent:Vc(Fe.kind)}:{}},"data-test":pt.width,children:a.jsx("span",{className:Xc(e,pt.textPrefix,`${u}-list-col-title`,`${u}-text-tight-leading`),style:{...Gc(Ca(e,pt.textPrefix),n),...Uc(e,pt.textPrefix,u,n),...ge?{}:T0(Fe.kind)},children:Ee.cells[pt.key]??null})}),Bt&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:Ve(Vt)}}),Oe&&a.jsx("div",{"data-controls":pt.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:`${u}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Ve(Math.max(Vt,ms))}})]},pt.key)}),p&&dt===0&&ge&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ne),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{top:0,left:0,width:Ve(ye),height:"100%"}}),a.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ne),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{top:0,left:Ve(Math.max(ye,xe-ye)),width:Ve(ye),height:"100%"}})]})]}),!ge&&pe>0&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:Ve(pe)}}),p&&dt===0&&!ge&&a.jsx("div",{"data-controls":"rowPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${u}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Ve(qe)}})]},Ee.id)}),p&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":yt,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":ge?"center":"left-y",className:`${u}-control-anchor`,style:{top:bt,left:0,width:"100%",height:Ve(Math.max(Ke,ms))}})},"row-padding-handles"),p&&!ge&&Rt&&ct&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":Rt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ze[0]-((wt==null?void 0:wt.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Ne??void 0,className:`${u}-control-anchor`,style:{top:0,left:0,width:Ve(Nt),height:"100%"}}),a.jsx("div",{"data-controls":ct.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ze[je.length-1]-((nt==null?void 0:nt.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Ne??void 0,className:`${u}-control-anchor`,style:{top:0,left:Ve($e-jt),width:Ve(jt),height:"100%"}})]},"column-edge-padding-handles"),p&&!ge&&je.slice(0,-1).map((Ee,dt)=>{const ut=je[dt+1],kt=ze.slice(0,dt+1).reduce((pt,Ut)=>pt+Ut,0),Qe=tt[dt],at=tt[dt+1],It=Math.max(Qe.paddingRight,po),At=Math.max(at.paddingLeft,po);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":Ee.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ze[dt]-Qe.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Ne??void 0,className:`${u}-control-anchor`,style:{top:0,left:Ve(kt-It),width:Ve(It),height:"100%"}}),a.jsx("div",{"data-controls":ut.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ze[dt+1]-at.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Ne??void 0,className:`${u}-control-anchor`,style:{top:0,left:Ve(kt),width:Ve(At),height:"100%"}})]},`${Ee.paddingRightKey}-padding`)}),p&&!ge&&je.slice(0,-1).map((Ee,dt)=>{const ut=U0(dt,ze,Ie,xe),Qe=ze.slice(0,dt+1).reduce((at,It)=>at+It,0)-qc/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Ee.widthKey,"data-controls-axis":"x","data-controls-min":String(Bl),"data-controls-max-fraction":String(ut),"data-controls-variant":"column-width",className:`${u}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Ve(Qe),width:Ve(qc),height:"calc(100%)",pointerEvents:"auto"}})},`${Ee.widthKey}-junction`)})]}),xt&&(()=>{const Ee=Ca(e,si),dt=I0(e.cutLabelVerticalAlign),ut=Ee.textTextAlign==="justify"||ge;return a.jsx("button",{type:"button",className:`${u}-cut-item`,style:{minHeight:Ve(E??0),cursor:We?"pointer":"default",...h0(re,w??0,n??!1)},onClick:We?vt:void 0,onMouseEnter:H||te?mt:void 0,onMouseLeave:H?_t:void 0,children:a.jsx("div",{className:`${u}-list-cols-row`,style:{...ge?{paddingLeft:Ve(ae),paddingRight:Ve(ae)}:{},justifyContent:L0(Ee.textTextAlign),alignItems:Vc(dt)},children:a.jsx("span",{className:Xc(e,si,`${u}-cut-label`,`${u}-text-tight-leading`),style:{...Gc(Ee,n),...Uc(e,si,u,n),...ut?{width:"100%"}:{}},children:U})})})})(),te&&ce&&typeof document<"u"&&(()=>{const Ee=`${ce.widthPx}px`,dt={width:Ee,height:"auto",maxHeight:Ee,objectFit:"contain"},ut=(c?document.getElementById(c):null)??document.body;return qn.createPortal(a.jsx("div",{ref:de,className:`${u}-hover-media-anchor`,"data-selection":"none",children:a.jsx(m0,{media:ce,className:ce.isVideo?`${u}-hover-video`:`${u}-hover-image`,style:dt},`${ce.rowId}-${ce.assetId}`)}),ut)})()]})})]})}const Z0=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
10709
10709
  import { createPortal } from 'react-dom';
10710
10710
  import { CommonComponentProps } from '../props';
10711
10711
  import { buildColorVars, EmbedMediaFrame, isEmbedMedia, scalingValue, useScopedStyles, type ContentLink } from '../utils/index';
@@ -13814,7 +13814,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13814
13814
  </>
13815
13815
  );
13816
13816
  }
13817
- `,jo=["A","B","C","D","E"],Kc=[...Xs,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Wi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Z0(e,t){return{type:"string",label:e,placeholder:"Add Title...",...t&&{contentKey:t},display:{type:"text-input"}}}function Gr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const J0={A:"title",B:"subtitle",C:"date"};function ex(){return Object.fromEntries(jo.map((e,t)=>{const n=Ei[t],i=`${e} column`;return[n,Z0(i,J0[e])]}))}function tx(){const e={};for(const t of jo)e[`${t}ColumnWidth`]=Gr(`${t} column width`),e[`${t}ColumnPaddingLeft`]=Gr(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=Gr(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=Gr(`${t} column padding bottom`);return e}function Yc(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Ei]};for(const r of jo)i[`${r}ColumnWidth`]=r==="A"?.0798:.32,i[`${r}ColumnPaddingLeft`]=0,i[`${r}ColumnPaddingRight`]=0,i[`${r}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function nx(e){const t={};if(e===si)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Xs]},enum:[...Xs]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Kc],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Kc]}}return t[Zt(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Zt(e,"textFontSettings")]={...Wi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Zt(e,"textFontSize")]={...Wi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Zt(e,"textLineHeight")]={...Wi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Zt(e,"textLetterSpacing")]={...Wi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Zt(e,"textWordSpacing")]={...Wi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Zt(e,"textTextAlign")]={...Wi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Zt(e,"textTextAppearance")]={...Wi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const ix=xr.reduce((e,t)=>({...e,...nx(t)}),{});function ox(e){return{verticalAlign:e===si?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===si?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function rx(e,t={}){var n;return{...ox(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Qc=new Set(["textFontFamily","textFontSettings"]);function ax(e,t,n){const i=r=>n===void 0?!0:n==="common"?Qc.has(r):!Qc.has(r),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=Dl(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Zt(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Zt(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Zt(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Zt(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Zt(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Zt(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Zt(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Zt(e,"textTextAppearance")]=t.textTextAppearance),o}function ga(e={},t){return xr.reduce((n,i)=>({...n,...ax(i,rx(i,e),t)}),{})}const sx=ga(),lx=A0();function xp(e){return[Zt(e,"textFontFamily"),Zt(e,"textFontSettings"),Zt(e,"textFontSize"),Zt(e,"textLineHeight"),Zt(e,"textLetterSpacing"),Zt(e,"textWordSpacing"),Zt(e,"textTextAlign"),Zt(e,"textTextAppearance"),`${e}VerticalAlign`]}function cx(){const e=[];return Ol.forEach((t,n)=>{const i=Ei[n],o=xp(t);for(let r=1;r<Ei.length;r+=1){const l=[{name:"columns",value:r},...Array.from({length:r},(c,d)=>({name:`columnsOrder.${d}`,value:i,isNotEqual:!0}))];o.forEach(c=>{e.push({if:l,then:{name:`properties.${c}.display.visible`,value:!1}})})}}),e}const dx=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];xp(si);const ux=[...jo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],Oi=[{objectFit:"contain",assetId:"01M3QM74XESYN1HRYH9VRTZ5CK"},{objectFit:"contain",assetId:"01M3QM74XEVZ9F59FC7M9BA63Q"},{objectFit:"contain",assetId:"01M3QM74XEE2101QD8PM6E4JSA"},{objectFit:"contain",assetId:"01M3QM74XE20C38X4NND20C5R4"},{objectFit:"contain",assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA"},{objectFit:"contain",assetId:"01M3QM74XEBS5231QA4355P4VQ"},{objectFit:"contain",assetId:"01M3QM74XEWT5YM43KF6PEYRCV"}],px=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:Oi[0],link:{type:"url",value:"",target:"blank"}},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:Oi[1],link:{type:"url",value:"",target:"blank"}},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:Oi[2],link:{type:"url",value:"",target:"blank"}},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:Oi[3],link:{type:"url",value:"",target:"blank"}},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:Oi[4],link:{type:"url",value:"",target:"blank"}},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:Oi[5],link:{type:"url",value:"",target:"blank"}},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:Oi[6],link:{type:"url",value:"",target:"blank"}}],mx=[...jo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],gx={type:"object",version:1,content:{type:"array",settings:{allowsCollection:!0,addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...ex(),image:{type:"object",label:"Image",contentKey:"gallery",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video","vimeo","youtube"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},link:{type:"object",label:"Link",contentKey:"link",display:{type:"link-input"}}},required:["image"]},default:px},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Amount",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["on","off"]}},imagePosition:{type:"string",scope:"layout",title:"Image Position",display:{type:"toggle-cycle",enum:["left","center","right","cursor"]}},imageInterpolation:{type:"boolean",scope:"common",title:"Interpolation",display:{type:"toggle-cycle",enum:["on","off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["top","bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Display",display:{type:"toggle-numeric-input",enum:["off","on"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default","blinds","reveal"]}},entryHoverShowOption:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","link only"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["all","custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...tx(),columnsOrder:{type:"array",scope:"layout",title:"Columns Order",display:{type:"reorder-input"},items:{type:"string"}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},textHoverColor:{type:"string",scope:"common",title:"Text Hover",display:{type:"palette-color-picker"}},...ix,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"on",imagePosition:"cursor",imageInterpolation:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...sx,...ga({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Yc({columns:3,type:"b",textPaddingLR:.0373,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.004,cut:0,showCut:0,cutCellMinHeight:.02,rowPaddingTop:.01,rowPaddingBottom:.01,typeBDefaults:{rowPaddingTopB:.0461,AColumnPaddingBottom:.041,BColumnPaddingBottom:.041,CColumnPaddingBottom:.0615,DColumnPaddingBottom:0,EColumnPaddingBottom:0},textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},...ga({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Yc({columns:4,type:"a",textPaddingLR:.01,entriesCount:0,cellMinHeight:.0555,imageSize:{min:200,max:200},dividerWidth:.002083,cut:0,showCut:0,cutCellMinHeight:.0555,rowPaddingTop:0,rowPaddingBottom:0,rowPaddingTopB:.01,textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},...ga({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...cx(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...ux.map(e=>({if:{name:"type",value:"b"},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"a"},then:{name:"properties.rowPaddingTopB.display.visible",value:!1}},...jo.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}})),{if:{name:"imagePosition",value:"cursor",isNotEqual:!0},then:{name:"properties.imageInterpolation.display.enabled",value:!1}}],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imagePosition","imageInterpolation","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...mx]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"Entries",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"",items:["imagePosition","imageInterpolation"]},{type:"row",title:"Entry Hover",items:["entryHoverEffect","entryHoverShowOption"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["__componentName__","columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:["__componentName__",{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",lx]}],paletteBookmark:{items:[...dx],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},hx={element:Y0,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>V0(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme-list-default.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...xr.map(e=>({path:`${Zt(e,"textFontFamily")}`}))]},fontRelations:{...xr.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${Zt(t,"textFontFamily")}`}),{})},schema:gx,sourceCode:Q0},Zc=300,fi=.004,fx={questionColor:"question-color",answerColor:"answer-color",dividerColor:"divider-color",iconColor:"icon-color",questionHoverColor:"question-hover-color",iconHoverColor:"icon-hover-color",iconActiveColor:"icon-active-color",dividerHoverColor:"divider-hover-color"},yx=["hover","focus","filled","success","error"];function vx(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Jc(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function ed(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:b.scalingValue((o-t)/2,i)}}function xx(e){return`
13817
+ `,jo=["A","B","C","D","E"],Yc=[...Us,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Wi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function J0(e,t){return{type:"string",label:e,placeholder:"Add Title...",...t&&{contentKey:t},display:{type:"text-input"}}}function Gr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const ex={A:"title",B:"subtitle",C:"date"};function tx(){return Object.fromEntries(jo.map((e,t)=>{const n=Ri[t],i=`${e} column`;return[n,J0(i,ex[e])]}))}function nx(){const e={};for(const t of jo)e[`${t}ColumnWidth`]=Gr(`${t} column width`),e[`${t}ColumnPaddingLeft`]=Gr(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=Gr(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=Gr(`${t} column padding bottom`);return e}function Qc(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Ri]};for(const r of jo)i[`${r}ColumnWidth`]=r==="A"?.0798:.32,i[`${r}ColumnPaddingLeft`]=0,i[`${r}ColumnPaddingRight`]=0,i[`${r}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function ix(e){const t={};if(e===si)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Us]},enum:[...Us]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Yc],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Yc]}}return t[Zt(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Zt(e,"textFontSettings")]={...Wi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Zt(e,"textFontSize")]={...Wi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Zt(e,"textLineHeight")]={...Wi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Zt(e,"textLetterSpacing")]={...Wi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Zt(e,"textWordSpacing")]={...Wi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Zt(e,"textTextAlign")]={...Wi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Zt(e,"textTextAppearance")]={...Wi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const ox=xr.reduce((e,t)=>({...e,...ix(t)}),{});function rx(e){return{verticalAlign:e===si?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===si?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function ax(e,t={}){var n;return{...rx(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Zc=new Set(["textFontFamily","textFontSettings"]);function sx(e,t,n){const i=r=>n===void 0?!0:n==="common"?Zc.has(r):!Zc.has(r),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=zl(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Zt(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Zt(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Zt(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Zt(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Zt(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Zt(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Zt(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Zt(e,"textTextAppearance")]=t.textTextAppearance),o}function ha(e={},t){return xr.reduce((n,i)=>({...n,...sx(i,ax(i,e),t)}),{})}const lx=ha(),cx=F0();function bp(e){return[Zt(e,"textFontFamily"),Zt(e,"textFontSettings"),Zt(e,"textFontSize"),Zt(e,"textLineHeight"),Zt(e,"textLetterSpacing"),Zt(e,"textWordSpacing"),Zt(e,"textTextAlign"),Zt(e,"textTextAppearance"),`${e}VerticalAlign`]}function dx(){const e=[];return Dl.forEach((t,n)=>{const i=Ri[n],o=bp(t);for(let r=1;r<Ri.length;r+=1){const l=[{name:"columns",value:r},...Array.from({length:r},(c,d)=>({name:`columnsOrder.${d}`,value:i,isNotEqual:!0}))];o.forEach(c=>{e.push({if:l,then:{name:`properties.${c}.display.visible`,value:!1}})})}}),e}const ux=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];bp(si);const px=[...jo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],Oi=[{objectFit:"contain",assetId:"01M3QM74XESYN1HRYH9VRTZ5CK"},{objectFit:"contain",assetId:"01M3QM74XEVZ9F59FC7M9BA63Q"},{objectFit:"contain",assetId:"01M3QM74XEE2101QD8PM6E4JSA"},{objectFit:"contain",assetId:"01M3QM74XE20C38X4NND20C5R4"},{objectFit:"contain",assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA"},{objectFit:"contain",assetId:"01M3QM74XEBS5231QA4355P4VQ"},{objectFit:"contain",assetId:"01M3QM74XEWT5YM43KF6PEYRCV"}],mx=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:Oi[0],link:{type:"url",value:"",target:"blank"}},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:Oi[1],link:{type:"url",value:"",target:"blank"}},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:Oi[2],link:{type:"url",value:"",target:"blank"}},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:Oi[3],link:{type:"url",value:"",target:"blank"}},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:Oi[4],link:{type:"url",value:"",target:"blank"}},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:Oi[5],link:{type:"url",value:"",target:"blank"}},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:Oi[6],link:{type:"url",value:"",target:"blank"}}],gx=[...jo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],hx={type:"object",version:1,content:{type:"array",settings:{allowsCollection:!0,addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...tx(),image:{type:"object",label:"Image",contentKey:"gallery",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video","vimeo","youtube"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},link:{type:"object",label:"Link",contentKey:"link",display:{type:"link-input"}}},required:["image"]},default:mx},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Amount",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["on","off"]}},imagePosition:{type:"string",scope:"layout",title:"Image Position",display:{type:"toggle-cycle",enum:["left","center","right","cursor"]}},imageInterpolation:{type:"boolean",scope:"common",title:"Interpolation",display:{type:"toggle-cycle",enum:["on","off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["top","bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Display",display:{type:"toggle-numeric-input",enum:["off","on"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default","blinds","reveal"]}},entryHoverShowOption:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","link only"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["all","custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...nx(),columnsOrder:{type:"array",scope:"layout",title:"Columns Order",display:{type:"reorder-input"},items:{type:"string"}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},textHoverColor:{type:"string",scope:"common",title:"Text Hover",display:{type:"palette-color-picker"}},...ox,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"on",imagePosition:"cursor",imageInterpolation:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...lx,...ha({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Qc({columns:3,type:"b",textPaddingLR:.0373,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.004,cut:0,showCut:0,cutCellMinHeight:.02,rowPaddingTop:.01,rowPaddingBottom:.01,typeBDefaults:{rowPaddingTopB:.0461,AColumnPaddingBottom:.041,BColumnPaddingBottom:.041,CColumnPaddingBottom:.0615,DColumnPaddingBottom:0,EColumnPaddingBottom:0},textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},...ha({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Qc({columns:4,type:"a",textPaddingLR:.01,entriesCount:0,cellMinHeight:.0555,imageSize:{min:200,max:200},dividerWidth:.002083,cut:0,showCut:0,cutCellMinHeight:.0555,rowPaddingTop:0,rowPaddingBottom:0,rowPaddingTopB:.01,textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},...ha({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...dx(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...px.map(e=>({if:{name:"type",value:"b"},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"a"},then:{name:"properties.rowPaddingTopB.display.visible",value:!1}},...jo.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}})),{if:{name:"imagePosition",value:"cursor",isNotEqual:!0},then:{name:"properties.imageInterpolation.display.enabled",value:!1}}],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imagePosition","imageInterpolation","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...gx]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"Entries",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"",items:["imagePosition","imageInterpolation"]},{type:"row",title:"Entry Hover",items:["entryHoverEffect","entryHoverShowOption"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["__componentName__","columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:["__componentName__",{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",cx]}],paletteBookmark:{items:[...ux],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},fx={element:Q0,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>G0(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme-list-default.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...xr.map(e=>({path:`${Zt(e,"textFontFamily")}`}))]},fontRelations:{...xr.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${Zt(t,"textFontFamily")}`}),{})},schema:hx,sourceCode:Z0},Jc=300,fi=.004,yx={questionColor:"question-color",answerColor:"answer-color",dividerColor:"divider-color",iconColor:"icon-color",questionHoverColor:"question-hover-color",iconHoverColor:"icon-hover-color",iconActiveColor:"icon-active-color",dividerHoverColor:"divider-hover-color"},vx=["hover","focus","filled","success","error"];function xx(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function ed(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function td(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:b.scalingValue((o-t)/2,i)}}function bx(e){return`
13818
13818
  .${e}-wrapper {
13819
13819
  box-sizing: border-box;
13820
13820
  display: flex;
@@ -13876,7 +13876,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13876
13876
  display: flex;
13877
13877
  align-items: center;
13878
13878
  justify-content: space-between;
13879
- gap: ${vx(20)};
13879
+ gap: ${xx(20)};
13880
13880
  width: 100%;
13881
13881
  min-width: 0;
13882
13882
  min-height: var(--${e}-question-min-height, unset);
@@ -13904,7 +13904,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13904
13904
  width: var(--${e}-icon-max-width);
13905
13905
  height: var(--${e}-icon-max-width);
13906
13906
  position: relative;
13907
- transition: transform ${Zc}ms ease;
13907
+ transition: transform ${Jc}ms ease;
13908
13908
  }
13909
13909
  .${e}-icon-custom {
13910
13910
  display: flex;
@@ -13941,7 +13941,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13941
13941
  .${e}-panel {
13942
13942
  display: grid;
13943
13943
  grid-template-rows: 0fr;
13944
- transition: grid-template-rows ${Zc}ms ease;
13944
+ transition: grid-template-rows ${Jc}ms ease;
13945
13945
  }
13946
13946
  .${e}-item-open .${e}-panel {
13947
13947
  grid-template-rows: 1fr;
@@ -13979,7 +13979,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13979
13979
  pointer-events: none;
13980
13980
  z-index: 2;
13981
13981
  }
13982
- `}function td(e,t,n,i,o,r,l,c){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:r??0,textAppearance:l,color:c??"#000000"}}function bx({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r}){const{prefix:l}=b.useScopedStyles(),c=o??!1,{wrapperWidth:d=1,cellMinHeight:u=0,dividerWidth:p=694e-6,dividerStyle:y="solid",entryHoverEffect:x="default",autoclose:m="off",icon:f,iconMaxWidth:S=.00833,iconPaddingRight:w=0,iconAnimation:N="rotate 45",questionColor:v="#000000",answerColor:M="#000000",dividerColor:R="#0000001F",iconColor:U="#000000",questionHoverColor:X="#666666",iconHoverColor:D="#666666",iconActiveColor:_="#000000",dividerHoverColor:W="#000000",questionFontFamily:T,questionFontSettings:C,questionFontSize:q,questionLineHeight:E,questionLetterSpacing:$,questionWordSpacing:I,questionTextAppearance:j,answerFontFamily:F,answerFontSettings:K,answerFontSize:P,answerLineHeight:h,answerLetterSpacing:J,answerWordSpacing:V,answerTextAppearance:he,questionPaddingLeft:k=0,questionPaddingTop:ce=0,questionPaddingBottom:L=0,answerPaddingLeft:me=0,answerPaddingRight:te=0,answerPaddingTop:ve=0,answerPaddingBottom:Le=0}=e,de=t??[],[ue,Z]=s.useState(()=>new Set),le=!n||i;s.useEffect(()=>{Z(new Set)},[m]),s.useEffect(()=>{n&&!o&&!i&&Z(new Set)},[n,o,i]);const oe=Ze=>b.scalingValue(Ze,n??!1),ge=Math.max(k,fi),Se=Math.max(ce,fi),Ee=Math.max(L,fi),Ne=Math.max(me,fi),Te=Math.max(te,fi),Ce=Math.max(ve,fi),g=Math.max(Le,fi),Y=Math.max(0,(d??1)-w-S),ee=Math.max(0,(d??1)-te),ae=Math.max(0,(d??1)-me),ye=Math.max(w,fi),ne=Math.max(0,(d??1)-k-S),B=s.useMemo(()=>ue.size===0?0:Math.min(...ue),[ue]),G=s.useCallback(Ze=>ue.has(Ze),[ue]),z=le&&x==="default"?`${l}-entry-hover-default`:"",ie=f??"",H=ie!=="",be=N.replace(/^rotate /,""),re=`${l}-icon-anim-${be}`,Q=pn(nn(td(T,C,q,E,$,I,j,v),n)),Pe=pn(nn(td(F,K,P,h,J,V,he,M),n)),Ae=Jc(q,E,`${l}-question`,`${l}-text-tight-leading`),He=Jc(P,h,`${l}-answer-text`,`${l}-text-tight-leading`),Xe=ed(q,E,l,n),Ue=ed(P,h,l,n),Je=b.buildColorVars(l,{questionColor:v,answerColor:M,dividerColor:R,iconColor:U,questionHoverColor:X,iconHoverColor:D,iconActiveColor:_,dividerHoverColor:W},fx,yx),je=r&&r!=="default"?`${l}-state-${r}`:"",xe=s.useCallback(Ze=>{le&&Z(tt=>{if(tt.has(Ze)){const lt=new Set(tt);return lt.delete(Ze),lt}if(m==="on")return new Set([Ze]);const ot=new Set(tt);return ot.add(Ze),ot})},[le,m]),Ie=s.useMemo(()=>xx(l),[l]),ze={[`--${l}-divider-width`]:b.scalingValue(p,n??!1),[`--${l}-divider-style`]:y,[`--${l}-icon-max-width`]:b.scalingValue(S,n??!1),...u>0?{[`--${l}-question-min-height`]:b.scalingValue(u,n??!1)}:{}};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Ie}}),a.jsx("div",{style:Je,children:a.jsx("div",{className:Rt(`${l}-wrapper`,n&&!i&&`${l}-editor`,z,je),style:{width:b.scalingValue(d,n??!1),maxWidth:"100%",...ze},children:de.map((Ze,tt)=>{var _e;const ot=G(tt),lt=((_e=Ze.question)==null?void 0:_e.trim())??"",it=Ze.answer,xt=((it==null?void 0:it.length)??0)>0,rt=c&&tt===B;return a.jsxs("div",{className:Rt(`${l}-item`,ot&&`${l}-item-open`),"data-faq-item":"",children:[a.jsxs("div",{className:`${l}-question-controls`,children:[rt&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"questionPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:oe(Se)}}),a.jsx("div",{"data-controls":"questionPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Y),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:oe(ge),height:"100%"}}),a.jsx("div",{"data-controls":"iconPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ne),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:oe(ye),height:"100%"}})]}),a.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":ot,style:{...Q,...Xe,paddingLeft:oe(k),paddingRight:oe(w)},onClick:()=>xe(tt),children:[ce>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:oe(ce)},"aria-hidden":"true"}),a.jsxs("span",{className:`${l}-question-row`,children:[a.jsx("span",{className:Ae,children:lt}),xt&&(H?a.jsx("span",{className:`${l}-icon ${l}-icon-custom ${re}`,"aria-hidden":"true",children:a.jsx(mn,{url:ie,fill:`var(--${l}-icon-color)`,hoverFill:`var(--${l}-icon-hover-color, var(--${l}-icon-color))`,className:`${l}-icon-image`})}):a.jsx("span",{className:`${l}-icon ${l}-icon-default ${re}`,"aria-hidden":"true"}))]}),L>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:oe(L)},"aria-hidden":"true"})]}),rt&&a.jsx("div",{"data-controls":"questionPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:oe(Ee)}})]}),xt&&it&&a.jsx("div",{className:`${l}-panel`,"aria-hidden":!ot,children:a.jsx("div",{className:`${l}-panel-inner`,children:a.jsxs("div",{className:`${l}-answer-controls`,children:[rt&&ot&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"answerPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:oe(Ce)}}),a.jsx("div",{"data-controls":"answerPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ee),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:oe(Ne),height:"100%"}}),a.jsx("div",{"data-controls":"answerPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ae),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:oe(Te),height:"100%"}})]}),ve>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:oe(ve)}}),a.jsx("div",{className:`${l}-answer`,style:{...Pe,...Ue,paddingLeft:oe(me),paddingRight:oe(te)},children:a.jsx("div",{className:He,children:a.jsx(Zi,{content:it})})}),Le>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:oe(Le)}}),rt&&ot&&a.jsx("div",{"data-controls":"answerPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:oe(g)}})]})})})]},tt)})})})]})}const Sx=`import { useCallback, useEffect, useMemo, useState } from 'react';
13982
+ `}function nd(e,t,n,i,o,r,l,c){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:r??0,textAppearance:l,color:c??"#000000"}}function Sx({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r}){const{prefix:l}=b.useScopedStyles(),c=o??!1,{wrapperWidth:d=1,cellMinHeight:u=0,dividerWidth:p=694e-6,dividerStyle:y="solid",entryHoverEffect:x="default",autoclose:m="off",icon:f,iconMaxWidth:S=.00833,iconPaddingRight:w=0,iconAnimation:N="rotate 45",questionColor:v="#000000",answerColor:M="#000000",dividerColor:E="#0000001F",iconColor:U="#000000",questionHoverColor:X="#666666",iconHoverColor:D="#666666",iconActiveColor:_="#000000",dividerHoverColor:W="#000000",questionFontFamily:T,questionFontSettings:C,questionFontSize:q,questionLineHeight:R,questionLetterSpacing:$,questionWordSpacing:I,questionTextAppearance:j,answerFontFamily:F,answerFontSettings:K,answerFontSize:P,answerLineHeight:h,answerLetterSpacing:J,answerWordSpacing:V,answerTextAppearance:he,questionPaddingLeft:k=0,questionPaddingTop:ce=0,questionPaddingBottom:L=0,answerPaddingLeft:me=0,answerPaddingRight:te=0,answerPaddingTop:ve=0,answerPaddingBottom:Le=0}=e,de=t??[],[ue,Z]=s.useState(()=>new Set),le=!n||i;s.useEffect(()=>{Z(new Set)},[m]),s.useEffect(()=>{n&&!o&&!i&&Z(new Set)},[n,o,i]);const oe=Ze=>b.scalingValue(Ze,n??!1),ge=Math.max(k,fi),Se=Math.max(ce,fi),Re=Math.max(L,fi),Ne=Math.max(me,fi),Te=Math.max(te,fi),Ce=Math.max(ve,fi),g=Math.max(Le,fi),Y=Math.max(0,(d??1)-w-S),ee=Math.max(0,(d??1)-te),ae=Math.max(0,(d??1)-me),ye=Math.max(w,fi),ne=Math.max(0,(d??1)-k-S),B=s.useMemo(()=>ue.size===0?0:Math.min(...ue),[ue]),G=s.useCallback(Ze=>ue.has(Ze),[ue]),z=le&&x==="default"?`${l}-entry-hover-default`:"",ie=f??"",H=ie!=="",be=N.replace(/^rotate /,""),re=`${l}-icon-anim-${be}`,Q=pn(nn(nd(T,C,q,R,$,I,j,v),n)),Pe=pn(nn(nd(F,K,P,h,J,V,he,M),n)),Ae=ed(q,R,`${l}-question`,`${l}-text-tight-leading`),He=ed(P,h,`${l}-answer-text`,`${l}-text-tight-leading`),Xe=td(q,R,l,n),Ue=td(P,h,l,n),Je=b.buildColorVars(l,{questionColor:v,answerColor:M,dividerColor:E,iconColor:U,questionHoverColor:X,iconHoverColor:D,iconActiveColor:_,dividerHoverColor:W},yx,vx),je=r&&r!=="default"?`${l}-state-${r}`:"",xe=s.useCallback(Ze=>{le&&Z(tt=>{if(tt.has(Ze)){const lt=new Set(tt);return lt.delete(Ze),lt}if(m==="on")return new Set([Ze]);const ot=new Set(tt);return ot.add(Ze),ot})},[le,m]),Ie=s.useMemo(()=>bx(l),[l]),ze={[`--${l}-divider-width`]:b.scalingValue(p,n??!1),[`--${l}-divider-style`]:y,[`--${l}-icon-max-width`]:b.scalingValue(S,n??!1),...u>0?{[`--${l}-question-min-height`]:b.scalingValue(u,n??!1)}:{}};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Ie}}),a.jsx("div",{style:Je,children:a.jsx("div",{className:Et(`${l}-wrapper`,n&&!i&&`${l}-editor`,z,je),style:{width:b.scalingValue(d,n??!1),maxWidth:"100%",...ze},children:de.map((Ze,tt)=>{var _e;const ot=G(tt),lt=((_e=Ze.question)==null?void 0:_e.trim())??"",it=Ze.answer,xt=((it==null?void 0:it.length)??0)>0,rt=c&&tt===B;return a.jsxs("div",{className:Et(`${l}-item`,ot&&`${l}-item-open`),"data-faq-item":"",children:[a.jsxs("div",{className:`${l}-question-controls`,children:[rt&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"questionPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:oe(Se)}}),a.jsx("div",{"data-controls":"questionPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Y),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:oe(ge),height:"100%"}}),a.jsx("div",{"data-controls":"iconPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ne),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:oe(ye),height:"100%"}})]}),a.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":ot,style:{...Q,...Xe,paddingLeft:oe(k),paddingRight:oe(w)},onClick:()=>xe(tt),children:[ce>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:oe(ce)},"aria-hidden":"true"}),a.jsxs("span",{className:`${l}-question-row`,children:[a.jsx("span",{className:Ae,children:lt}),xt&&(H?a.jsx("span",{className:`${l}-icon ${l}-icon-custom ${re}`,"aria-hidden":"true",children:a.jsx(mn,{url:ie,fill:`var(--${l}-icon-color)`,hoverFill:`var(--${l}-icon-hover-color, var(--${l}-icon-color))`,className:`${l}-icon-image`})}):a.jsx("span",{className:`${l}-icon ${l}-icon-default ${re}`,"aria-hidden":"true"}))]}),L>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:oe(L)},"aria-hidden":"true"})]}),rt&&a.jsx("div",{"data-controls":"questionPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:oe(Re)}})]}),xt&&it&&a.jsx("div",{className:`${l}-panel`,"aria-hidden":!ot,children:a.jsx("div",{className:`${l}-panel-inner`,children:a.jsxs("div",{className:`${l}-answer-controls`,children:[rt&&ot&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"answerPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:oe(Ce)}}),a.jsx("div",{"data-controls":"answerPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ee),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:oe(Ne),height:"100%"}}),a.jsx("div",{"data-controls":"answerPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ae),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:oe(Te),height:"100%"}})]}),ve>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:oe(ve)}}),a.jsx("div",{className:`${l}-answer`,style:{...Pe,...Ue,paddingLeft:oe(me),paddingRight:oe(te)},children:a.jsx("div",{className:He,children:a.jsx(Zi,{content:it})})}),Le>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:oe(Le)}}),rt&&ot&&a.jsx("div",{"data-controls":"answerPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:oe(g)}})]})})})]},tt)})})})]})}const wx=`import { useCallback, useEffect, useMemo, useState } from 'react';
13983
13983
  import cn from 'classnames';
13984
13984
  import { CommonComponentProps } from '../props';
13985
13985
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
@@ -14727,7 +14727,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
14727
14727
  </>
14728
14728
  );
14729
14729
  }
14730
- `;function yi(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const nd={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},wx=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],$x={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:yi("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:{...nd.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:{...nd.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:yi("Question Padding Left"),questionPaddingTop:yi("Question Padding Top"),questionPaddingBottom:yi("Question Padding Bottom"),answerPaddingLeft:yi("Answer Padding Left"),answerPaddingRight:yi("Answer Padding Right"),answerPaddingTop:yi("Answer Padding Top"),answerPaddingBottom:yi("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"01M3QM74XGFBPMXNEQB1BXSD9E",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:[...wx],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},Cx={element:bx,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:$x,sourceCode:Sx},li=e=>e.display==="cover",ja=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},id=100,Tx=.2,od=8,bp=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,r]=s.useState(0),[l,c]=s.useState(!1),d=s.useRef(null),u=s.useRef(0);u.current=o;const p=s.useMemo(()=>typeof window>"u"?id:Math.max(id,window.innerHeight*Tx),[]),y=s.useCallback(T=>Math.max(0,1-T/(p*1.5)),[p]),x=s.useCallback(T=>Math.max(0,1-T/(p*.45)),[p]),m=s.useCallback(T=>{const C=typeof window<"u"?window.innerHeight:800,q=Math.max(.88,1-T/C*.12);return`translateY(${T}px) scale(${q})`},[]),f=s.useCallback(()=>{d.current=null},[]),S=s.useCallback(()=>{c(!0),r(0),window.setTimeout(()=>c(!1),n),f()},[n,f]),w=s.useCallback(()=>{const T=typeof window<"u"?window.innerHeight:800;c(!0),r(T),window.setTimeout(()=>{t(),f(),c(!1)},Math.min(n,200))},[n,t,f]),N=s.useCallback(T=>{!e||l||T.pointerType==="touch"&&(i!=null&&i(T.target)||(d.current={startX:T.clientX,startY:T.clientY,isLocked:null,pointerId:T.pointerId}))},[e,l,i]),v=s.useCallback(T=>{const C=d.current;if(!e||!C||T.pointerType!=="touch"||C.pointerId!==T.pointerId)return;const q=T.clientX-C.startX,E=T.clientY-C.startY;if(C.isLocked===null){if(Math.abs(q)<od&&Math.abs(E)<od)return;if(E>0&&E>Math.abs(q))C.isLocked=!0,T.currentTarget.setPointerCapture(T.pointerId);else{C.isLocked=!1,f();return}}if(!C.isLocked)return;T.preventDefault();const $=Math.max(0,E);u.current=$,r($)},[e,f]),M=s.useCallback(T=>{const C=d.current;if(!e||!C||T.pointerType!=="touch"||C.pointerId!==T.pointerId)return;const q=C.isLocked===!0;if(T.currentTarget.hasPointerCapture(T.pointerId)&&T.currentTarget.releasePointerCapture(T.pointerId),!q){f();return}T.clientY-C.startY>=p?w():S()},[p,w,e,f,S]),R=s.useCallback(T=>{M(T)},[M]),U=s.useCallback(T=>{M(T)},[M]),X=o>0,D=l?`transform ${n}ms ease`:"none",_=l?`opacity ${n}ms ease`:"none",W=o>0||l;return{isSwipeDragging:X,backdropStyle:{opacity:y(o),transition:_},mediaAreaStyle:{transform:m(o),transition:D,touchAction:X?"none":void 0,willChange:X?"transform":void 0},overlayContentStyle:W?{opacity:x(o),transition:_}:void 0,swipeHandlers:e?{onPointerDown:N,onPointerMove:v,onPointerUp:R,onPointerCancel:U}:{},dismissAreaStyle:e?{touchAction:X?"none":"pan-x"}:void 0}},Ix="[data-lightbox-scrollable]",jl=(e=!0)=>{s.useEffect(()=>{if(!e)return;const t=window.scrollY,n=document.body.style.overflow,i=document.body.style.position,o=document.body.style.top,r=document.body.style.width,l=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${t}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const c=d=>{const u=d.target;u instanceof Element&&u.closest(Ix)||d.preventDefault()};return document.addEventListener("touchmove",c,{passive:!1}),()=>{document.removeEventListener("touchmove",c),document.body.style.overflow=n,document.body.style.position=i,document.body.style.top=o,document.body.style.width=r,document.documentElement.style.overflow=l,window.scrollTo({top:t,left:0,behavior:"instant"})}},[e])},Lx=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Mx=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},Px=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},Rx=(e,t,n,{duration:i,easing:o,onComplete:r})=>{const l=e.scrollLeft,c=n-l,d=l-n,u=(f,S)=>{Mx(t),e.scrollLeft=f,S&&(r==null||r())};if(Math.abs(c)<.5)return u(n,!0),()=>{};let p=!1,y=0;const x=()=>{t.removeEventListener("transitionend",m),clearTimeout(y)},m=f=>{f.target!==t||f.propertyName!=="transform"||p||(p=!0,x(),u(n,!0))};return t.addEventListener("transitionend",m),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${d}px, 0, 0)`,y=window.setTimeout(()=>{p||(p=!0,x(),u(n,!0))},i+64),()=>{p||(p=!0,x(),u(l-Px(t),!1))}},cr=300,Ex=900,kx=1500,Ax="cubic-bezier(0.16, 1, 0.3, 1)",Fx=3e3,Nx=2,_x=16,Hx=.05,Wx=1,Xr=.3,Ox=50,Dx=20,ro=.004,Fo=["title1","title2","title3"],zx={title1:"1",title2:"2",title3:"3"},Bx={title1:"title1Color",title2:"title2Color",title3:"title3Color"},jx={title1:.02,title2:.02,title3:.02},Ur=e=>`max(${e}, ${Dx}px)`,Vx=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]}},Gx=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=Vx(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Jt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Xx=e=>[Jt(e,"fontFamily"),Jt(e,"fontSettings"),{type:"row",items:[Jt(e,"fontSize"),Jt(e,"lineHeight"),Jt(e,"letterSpacing"),Jt(e,"wordSpacing")]},Jt(e,"textAlign"),Jt(e,"textAppearance")],Ux=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Fo.map(e=>[zx[e],Xx(e)]))}),Vl=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},c)=>{if(r<=0||c<=0)return{overflow:r,widths:[c,...l]};const d=Math.min(r,c);return{overflow:r-d,widths:[c-d,...l]}},{overflow:i-1,widths:[]});return o},Sp=(e,t)=>Vl(e,t),qr=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},rd=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Vl(e.length,n),effective:Sp(e.length,n)}},qx=(e,t,n,i,o,r,l)=>{const c=[];return t&&c.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&c.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:r,text:n}),i&&c.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:l,text:i}),c},gs=(e,t)=>{const n=i=>{const o=Jt(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[Bx[t]]}},Kx=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),hs=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??jx[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return nn(i,n)},Yx=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l})=>{const{backgroundColor:c,thumbnailSize:d,thumbnailGap:u,thumbnailMarginBottom:p,imageGap:y,closeIcon:x,closeIconMaxWidth:m,closeIconColor:f,closeIconHoverColor:S,thumbnailTrigger:w,thumbnailVisibility:N,thumbnailObjectFit:v,thumbnailActive:M,thumbnailActiveColor:R,title1Width:U,title2Width:X,title3Width:D,title1MarginLeft:_=0,title2MarginLeft:W=0,title3MarginLeft:T=0,titleRowMarginBottom:C=0,titleHeaderLayout:q="desktop",contentMarginTop:E,iconMarginLeft:$}=n,I=A=>b.scalingValue(A,i??!1),j=d??n.thumnailSize??.03,F=I(j),K=I(u),P=I(p??.02),h=I(y??0),J=I(E??0),V=Ur(J),he=I($??0),[k,ce]=s.useState(0),L=s.useRef(k);L.current=k;const me=t[k],{title1:te,title2:ve,title3:Le}=Gx(me),de=hs("title1",gs(n,"title1"),i),ue=hs("title2",gs(n,"title2"),i),Z=hs("title3",gs(n,"title3"),i),le=q==="mobile",oe=!o&&(!i||r),ge=oe,Se=oe,Ee=oe,Ne=li(v),Te=Ne?{"--image-aspect-ratio":ja(v)}:void 0,Ce=!!(te||ve||Le),g=s.useMemo(()=>qx(e,te,ve,Le,de,ue,Z),[e,k,te,ve,Le,de,ue,Z]),Y=s.useMemo(()=>({title1Width:U,title2Width:X,title3Width:D}),[U,X,D]),ee=s.useMemo(()=>g.map(A=>Y[A.widthKey]),[g,Y]),ae=s.useMemo(()=>Vl(g.length,ee),[g.length,ee]),ye=s.useMemo(()=>Sp(g.length,ee),[g.length,ee]),ne=s.useMemo(()=>g.filter(A=>A.prefix==="title1"),[g]),B=s.useMemo(()=>g.filter(A=>A.prefix==="title2"||A.prefix==="title3"),[g]),G=s.useMemo(()=>rd(ne,Y),[ne,Y]),z=s.useMemo(()=>rd(B,Y),[B,Y]),ie=s.useCallback((A,se)=>{const fe=g.indexOf(A);if(!le||se==="single-row")return{effectiveWidth:ye[fe]??0,resolvedWidth:ae[fe]??0,maxWidth:qr(fe,ae)};if(se==="two-row-top"){const Be=ne.indexOf(A);return{effectiveWidth:G.effective[Be]??0,resolvedWidth:G.resolved[Be]??0,maxWidth:qr(Be,G.resolved)}}const ke=B.indexOf(A);return{effectiveWidth:z.effective[ke]??0,resolvedWidth:z.resolved[ke]??0,maxWidth:qr(ke,z.resolved)}},[B,z,ye,ae,g,ne,G,le]),H=s.useCallback(A=>b.scalingValue(A,i??!1),[i]),be=H(C??0),re=s.useMemo(()=>({title1MarginLeft:_,title2MarginLeft:W,title3MarginLeft:T}),[_,W,T]),Q=s.useCallback(A=>g.slice(0,A+1).reduce((se,fe,ke)=>se+(fe!=null&&fe.marginLeftKey?re[fe.marginLeftKey]??0:0)+(ae[ke]??0),0)+(le?0:_??0),[g,re,ae,le,_]),Pe=s.useCallback(()=>le?0:_??0,[le,_]),Ae=s.useCallback(A=>B.slice(0,A).reduce((se,fe,ke)=>se+(fe.marginLeftKey?re[fe.marginLeftKey]??0:0)+(z.resolved[ke]??0),0),[B,z.resolved,re]),He=s.useCallback(A=>{const se=B[A];return Ae(A)+(se.marginLeftKey?re[se.marginLeftKey]??0:0)+(z.resolved[A]??0)},[B,z.resolved,Ae,re]),Xe=(A,se)=>{const fe=A.marginLeftKey?re[A.marginLeftKey]??0:0,{effectiveWidth:ke,resolvedWidth:Be,maxWidth:gt}=ie(A,se),Wt=o&&se==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":A.prefix,style:{...se==="single-row"?{gridArea:A.prefix}:{},width:H(ke),...fe>0?{marginLeft:H(fe)}:{}},children:[a.jsx("p",{className:A.className,style:A.style,children:A.text}),Wt&&A.marginLeftKey&&a.jsx("div",{"data-controls":A.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Be),style:{position:"absolute",top:0,left:H(-fe),width:`max(${H(fe)}, 10px)`,height:"100%",pointerEvents:"auto"}}),Wt&&a.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(gt),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:H(-ro/2),width:H(ro),height:"100%",pointerEvents:"auto"}})]},A.className)},Ue=()=>{const A=le?-1:g.findIndex(ke=>ke.prefix==="title1"),se=!le&&(o||(_??0)>0)?(()=>{const ke=_??0,Be=A>=0?ae[A]:U??0;return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Be),style:{position:"absolute",top:0,left:0,width:`max(${H(ke)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,fe=g.flatMap((ke,Be)=>{if(!ke.marginLeftKey)return[];const gt=re[ke.marginLeftKey]??0,Wt=Kx(g,ae,re,Be)+Pe();return a.jsx("div",{"data-controls":ke.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ae[Be]),style:{position:"absolute",top:0,left:H(Wt),width:`max(${H(gt)}, 10px)`,height:"100%",pointerEvents:"auto"}},ke.marginLeftKey)});return se?[se,...fe]:fe},Je=()=>g.map((A,se)=>{const fe=qr(se,ae),Be=Q(se)-ro/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":A.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:H(Be),width:H(ro),height:"100%",pointerEvents:"auto"}})},`${A.widthKey}-junction`)}),je=()=>B.flatMap((A,se)=>{if(!A.marginLeftKey)return[];const fe=re[A.marginLeftKey]??0,ke=Ae(se),{resolvedWidth:Be}=ie(A,"two-row-bottom");return a.jsx("div",{"data-controls":A.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Be),style:{position:"absolute",top:0,left:H(ke),width:`max(${H(fe)}, 10px)`,height:"100%",pointerEvents:"auto"}},A.marginLeftKey)}),xe=()=>B.map((A,se)=>{const{maxWidth:fe}=ie(A,"two-row-bottom"),Be=He(se)-ro/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":A.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:H(Be),width:H(ro),height:"100%",pointerEvents:"auto"}})},`${A.widthKey}-junction`)}),Ie=s.useRef(null),ze=s.useRef(null),Ze=s.useRef(null),tt=s.useRef(null),ot=s.useRef([]),lt=s.useRef([]),it=s.useRef(0),xt=s.useRef(null),rt=s.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),_e=s.useRef(null),We=s.useRef(null),vt=s.useRef(0),Ve=s.useRef("forward"),Ke=s.useRef(0),pe=s.useRef(null),De=s.useRef(!1),qe=t.length>1&&(!o||!!r),bt=qe?3:1,yt=s.useMemo(()=>Array.from({length:bt},()=>t).flat(),[t,bt]),[Et,ct]=s.useState(!1),[wt,nt]=s.useState(!1),[Nt,jt]=s.useState(!0),$e=s.useRef(null),Ge=s.useRef(null),ht=s.useRef(!1),Lt=s.useRef(!1),$t=s.useRef(null),mt=s.useRef(null),_t=ge&&!Nt,Ot=s.useCallback(()=>{ge&&(jt(!0),mt.current&&clearTimeout(mt.current),mt.current=setTimeout(()=>{rt.current.isActive||jt(!1)},Fx))},[ge]),zt=s.useCallback(()=>{o||Lt.current||(Lt.current=!0,nt(!1),$t.current=setTimeout(()=>{l()},cr))},[o,l]),Re=()=>a.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":_t?"true":"false",style:{width:b.scalingValue(m??0,i),height:b.scalingValue(m??0,i),marginRight:he,"--close-icon-hover-color":S},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:zt,"aria-label":"Close",children:a.jsx(mn,{url:x,fill:f,hoverFill:i&&!r?f:S,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:he,height:"100%",pointerEvents:"auto"}})]}),dt=(A="two-row")=>a.jsx("div",{...A==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:H(_??0),flexShrink:0,...A==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...A==="two-row"&&o?{pointerEvents:"auto"}:{}}}),ut=()=>{const A=g.find(ke=>ke.prefix==="title1"),se=g.filter(ke=>ke.prefix==="title2"||ke.prefix==="title3"),fe=se.length>0||o||(C??0)>0;return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`${e}-header-row-top`,children:[(_??0)>0||o?dt():null,A&&Xe(A,"two-row-top"),x&&Re()]}),fe?a.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[se.length>0?a.jsxs("div",{className:`${e}-header-row-bottom`,children:[se.map(ke=>Xe(ke,"two-row-bottom")),o&&a.jsxs(a.Fragment,{children:[je(),xe()]})]}):null,a.jsx("div",{"data-controls":o?"titleRowMarginBottom":void 0,"data-controls-axis":o?"y":void 0,"data-controls-reverse":o?"":void 0,className:o?`${e}-control`:void 0,style:{height:be,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},kt=()=>a.jsxs(a.Fragment,{children:[(_??0)>0||o?dt("single-row"):null,g.map(A=>Xe(A,"single-row")),o?a.jsxs(a.Fragment,{children:[Ue(),Je()]}):null,x?Re():null]}),Qe=s.useCallback(A=>!!(A.closest("[data-controls]")||A.closest(`.${e}-thumbnails`)||A.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:at,backdropStyle:It,mediaAreaStyle:At,overlayContentStyle:pt,swipeHandlers:Ut,dismissAreaStyle:qt}=bp({enabled:oe??!1,onClose:zt,animMs:cr,isBlockedTarget:Qe}),Dt=()=>{if(!qe||t.length===0)return it.current=0,0;const A=lt.current[0],se=lt.current[t.length];if(!A||!se)return it.current;const fe=se.offsetLeft-A.offsetLeft;return fe>0&&(it.current=fe),it.current},Vt=(A=!1)=>{if(!qe)return;const se=ze.current,fe=Dt();!se||fe<=0||fe<se.clientWidth*.25||(se.scrollLeft<=0?(se.scrollLeft+=fe,A&&(rt.current.scrollLeft+=fe),De.current&&(Ke.current+=fe)):se.scrollLeft>=fe*2&&(se.scrollLeft-=fe,A&&(rt.current.scrollLeft-=fe),De.current&&(Ke.current-=fe)))},Gt=(A,se=(fe=>(fe=ze.current)==null?void 0:fe.scrollLeft)()??0)=>{if(!qe)return A;let ke=t.length+A,Be=1/0;for(let gt=0;gt<bt;gt++){const Wt=gt*t.length+A,Kt=lt.current[Wt];if(!Kt)continue;const sn=Math.abs(Kt.offsetLeft-se);sn<Be&&(Be=sn,ke=Wt)}return ke},Bt=A=>{const se=ze.current;return!A||!se?!1:A.offsetWidth>se.clientWidth+1},Yt=A=>{const se=ze.current;if(!A||!se||!Bt(A))return!1;const fe=A.offsetLeft,ke=fe+A.offsetWidth;return se.scrollLeft>=fe-1&&se.scrollLeft+se.clientWidth<=ke+1},O=(A=(se=>(se=ze.current)==null?void 0:se.scrollLeft)()??0)=>{for(let ke=0;ke<lt.current.length;ke+=1){const Be=lt.current[ke];if(Be&&Yt(Be))return ke}let fe={flatIndex:0,distance:1/0};return lt.current.forEach((ke,Be)=>{if(!ke)return;const gt=Math.abs(ke.offsetLeft-A);gt<fe.distance&&(fe={flatIndex:Be,distance:gt})}),fe.flatIndex},Me=A=>{ze.current&&lt.current.forEach(se=>{se&&(se.style.scrollSnapAlign=Bt(se)&&A==="backward"?"end":"start")})},Fe=(A,se,fe)=>{const ke=A-se,Be=O(se),gt=lt.current[Be];if(Yt(gt))return O(A)%t.length;const Wt=lt.current[Be+1],Kt=gt?Wt?Wt.offsetLeft-gt.offsetLeft:gt.offsetWidth:0,sn=Kt>0?ke>Kt*Xr?1:ke<-Kt*Xr?-1:0:0;return sn===0?fe:qe?(fe+sn+t.length)%t.length:Math.max(0,Math.min(t.length-1,fe+sn))},Oe=s.useCallback((A=!1)=>{if(N!=="on"||o)return;const se=tt.current,fe=L.current,ke=ot.current[fe];if(!se||!ke||se.scrollWidth<=se.clientWidth)return;const Be=se.scrollLeft,gt=Be+se.clientWidth,Wt=ke.offsetLeft,Kt=Wt+ke.offsetWidth;if(Wt>=Be&&Kt<=gt)return;const sn=se.scrollWidth-se.clientWidth;let en=Be;if(!A&&$e.current===null){const gi=ot.current[fe-1],An=ot.current[fe+1],Zn=gi?ke.offsetLeft-gi.offsetLeft:An?An.offsetLeft-ke.offsetLeft:ke.offsetWidth;Kt>gt?en+=Zn:Wt<Be&&(en-=Zn)}else Kt>gt?en=Kt-se.clientWidth:en=Wt;se.scrollLeft=Math.max(0,Math.min(sn,en))},[o,N]),ft=s.useCallback((A=!1)=>{A&&(ht.current=!0),Ge.current===null&&(Ge.current=requestAnimationFrame(()=>{Ge.current=null;const se=ht.current;ht.current=!1,Oe(se)}))},[Oe]),Tt=s.useCallback(A=>{if(A===L.current)return;const se=L.current;L.current=A;const fe=Math.abs(A-se)>1,ke=qe&&t.length>1&&(se===t.length-1&&A===0||se===0&&A===t.length-1);ce(A),ft(fe||ke)},[t.length,qe,ft]),et=()=>{if(!ze.current||t.length===0||$e.current!==null||rt.current.isActive&&rt.current.hasMoved)return;const A=ze.current.scrollLeft,se=O(A)%t.length;se!==L.current&&Tt(se)},Mt=()=>{$e.current=null},Ct=A=>{const se=ze.current;se&&(se.style.scrollSnapType=A?"":"none")},Ht=()=>{var A;(A=We.current)==null||A.call(We),We.current=null},on=()=>{pe.current!==null&&(cancelAnimationFrame(pe.current),pe.current=null),De.current=!1},fn=()=>{const A=ze.current;if(!A){pe.current=null,De.current=!1;return}const se=Ke.current-A.scrollLeft;if(Math.abs(se)<.5){A.scrollLeft=Ke.current,Vt(),et(),pe.current=null,De.current=!1;return}A.scrollLeft+=se*Hx,Vt(),et(),Ot(),pe.current=requestAnimationFrame(fn)},bn=()=>{const A=Ze.current;A&&(A.style.transition="",A.style.transform="",A.style.willChange="")},ui=(A,se,fe,ke)=>{bn(),A.scrollLeft=se,vt.current=A.scrollLeft,Vt(),fe!==void 0?(L.current=fe,ce(fe)):et(),Ct(!0),ke==null||ke()},dn=(A,{behavior:se="smooth",activeIndex:fe,onComplete:ke}={})=>{const Be=ze.current,gt=Ze.current;if(!Be||!gt)return;if(on(),Ht(),Ct(!1),se==="auto"){ui(Be,A,fe,ke);return}const Wt=Math.abs(A-Be.scrollLeft),Kt=Lx(Wt,Ex,kx,Be.clientWidth*.55);We.current=Rx(Be,gt,A,{duration:Kt,easing:Ax,onComplete:()=>{We.current=null,ui(Be,A,fe,ke)}})},pi=(A="smooth")=>{const se=ze.current;if(!se||t.length===0)return;const fe=O()%t.length,ke=Gt(fe,se.scrollLeft),Be=lt.current[ke];Be&&dn(Be.offsetLeft,{behavior:A,activeIndex:fe})},Yn=(A,se="smooth",fe,ke)=>{const Be=ze.current;if(!Be||t.length===0)return;const gt=(ke??Be.scrollLeft)-A,Wt=O(A),Kt=lt.current[Wt];if(Yt(Kt)){Ct(!0),et();return}const sn=lt.current[Wt+1],en=Kt?sn?sn.offsetLeft-Kt.offsetLeft:Kt.offsetWidth:0;if((en>0?gt>en*Xr?1:gt<-en*Xr?-1:0:0)!==0){const Yl=fe??Wt%t.length,Go=Fe(ke??Be.scrollLeft,A,Yl);Sn(Go,se);return}const An=ke??Be.scrollLeft,Zn=O(An),kr=lt.current[Zn];if(kr&&Math.abs(kr.offsetLeft-An)<1){Ct(!0),et();return}pi("auto")},Sn=(A,se="smooth")=>{const fe=ze.current;if(!fe||t.length===0)return;const ke=Gt(A,fe.scrollLeft),Be=lt.current[ke];Be&&(se==="smooth"?$e.current=A:$e.current=null,L.current=A,ce(A),ft(!0),dn(Be.offsetLeft,{behavior:se,activeIndex:A,onComplete:se==="smooth"?Mt:void 0}))},mi=()=>{_e.current&&(window.removeEventListener("pointerup",_e.current),window.removeEventListener("pointercancel",_e.current),_e.current=null)},eo=(A,se,fe,ke,Be)=>{const gt=fe-A,Wt=ke-se,Kt=Math.abs(gt),sn=Math.abs(Wt);if(Kt<Ox||Kt<=sn)return!1;const en=gt<0?1:-1,gi=qe?(Be+en+t.length)%t.length:Math.max(0,Math.min(t.length-1,Be+en));return gi===Be?!1:(Sn(gi),!0)},wn=A=>{if(!rt.current.isActive)return;mi();const se=ze.current;if(!se)return;const{scrollLeft:fe,startActiveIndex:ke,hasMoved:Be}=rt.current,gt=se.scrollLeft;Vt(!0),rt.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},ct(!1),A!==void 0&&se.hasPointerCapture(A)&&se.releasePointerCapture(A),Be?Yn(fe,"smooth",ke,gt):(Ct(!0),et()),Ot()},Qn=(A,se)=>{const fe=xt.current;xt.current=null,fe&&(eo(fe.startX,fe.startY,A,se,fe.startActiveIndex),Ot())},to=A=>{if(!Se)return;if(A.pointerType==="touch"){if(on(),Ct(!0),Qe(A.target))return;xt.current={startX:A.clientX,startY:A.clientY,startActiveIndex:L.current};return}if(A.pointerType!=="mouse"||A.button!==0||Qe(A.target))return;const se=ze.current;if(!se)return;on(),Ht(),bn(),$e.current=null,rt.current={isActive:!0,startX:A.clientX,scrollLeft:se.scrollLeft,startActiveIndex:L.current,hasMoved:!1},Ct(!1),Ot(),se.setPointerCapture(A.pointerId),mi();const fe=ke=>{ke.pointerType==="mouse"&&wn(ke.pointerId)};_e.current=fe,window.addEventListener("pointerup",fe),window.addEventListener("pointercancel",fe)},no=A=>{if(!Se||A.pointerType!=="mouse")return;const se=ze.current;if(!se||!rt.current.isActive)return;if(A.buttons===0){wn(A.pointerId);return}const fe=A.clientX-rt.current.startX;Math.abs(fe)>Wx&&(rt.current.hasMoved=!0,ct(!0)),rt.current.hasMoved&&(A.preventDefault(),se.scrollLeft=rt.current.scrollLeft-fe,Vt(!0),et(),Ot())},we=A=>{if(Se){if(A.pointerType==="touch"){A.type==="pointerup"?Qn(A.clientX,A.clientY):xt.current=null;return}A.pointerType==="mouse"&&wn(A.pointerId)}},Ye=A=>{!Se||A.pointerType!=="mouse"||wn(A.pointerId)};return jl(),s.useEffect(()=>{const A=requestAnimationFrame(()=>nt(!0));return()=>{cancelAnimationFrame(A),Ht(),mi(),Ge.current!==null&&(cancelAnimationFrame(Ge.current),Ge.current=null),$t.current&&clearTimeout($t.current),mt.current&&clearTimeout(mt.current)}},[]),s.useEffect(()=>{if(!ge){jt(!0);return}Ot();const A=()=>Ot();return document.addEventListener("pointermove",A,{passive:!0}),document.addEventListener("pointerdown",A,{passive:!0}),()=>{document.removeEventListener("pointermove",A),document.removeEventListener("pointerdown",A),mt.current&&clearTimeout(mt.current)}},[ge,Ot]),s.useEffect(()=>{const A=se=>{se.key==="Escape"&&zt()};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[zt]),s.useLayoutEffect(()=>{Dt()},[h,t.length,qe]),s.useLayoutEffect(()=>{o||Sn(L.current,"auto")},[h,o]),s.useLayoutEffect(()=>{Sn(0,"auto")},[t.length,qe]),s.useEffect(()=>{const A=ze.current;if(!A||o||!oe)return;const se=fe=>{if(fe.preventDefault(),Math.abs(fe.deltaY)<=Math.abs(fe.deltaX))return;const ke=fe.deltaMode===1?_x:fe.deltaMode===2?A.clientHeight:1,Be=fe.deltaY*ke*Nx;if(Be!==0){if(Ht(),De.current||(De.current=!0,Ke.current=A.scrollLeft,$e.current=null,Ct(!1)),Ke.current+=Be,!qe){const gt=A.scrollWidth-A.clientWidth;Ke.current=Math.max(0,Math.min(gt,Ke.current))}Ot(),pe.current===null&&(pe.current=requestAnimationFrame(fn))}};return A.addEventListener("wheel",se,{passive:!1}),()=>{A.removeEventListener("wheel",se),on()}},[o,oe,qe]),s.useEffect(()=>{const A=ze.current;if(!A)return;const se=()=>{Vt(rt.current.isActive);const ke=A.scrollLeft,Be=ke-vt.current;vt.current=ke;const gt=it.current>0?it.current*.5:1/0;if(Be!==0&&Math.abs(Be)<gt){const Wt=Be>0?"forward":"backward";Wt!==Ve.current&&(Ve.current=Wt,Me(Wt))}rt.current.isActive&&rt.current.hasMoved||et()};A.addEventListener("scroll",se,{passive:!0});const fe=new ResizeObserver(()=>{Dt(),Vt(rt.current.isActive),Me(Ve.current),et()});return fe.observe(A),()=>{Ht(),A.removeEventListener("scroll",se),fe.disconnect()}},[t.length,qe]),a.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{at||zt()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:wt?1:0,transition:`opacity ${cr}ms ease`,pointerEvents:wt?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:c,...It}}),a.jsxs("div",{ref:Ie,className:`${e}-lightbox-dismiss-area`,style:qt,...Ut,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:At,onClick:A=>A.stopPropagation(),children:a.jsx("div",{ref:ze,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":Se&&t.length>0?"true":"false","data-mouse-dragging":Et?"true":"false",onPointerDown:to,onPointerMove:no,onPointerUp:we,onPointerCancel:we,onLostPointerCapture:Ye,children:a.jsx("div",{ref:Ze,className:`${e}-lightbox-strip-track`,style:{gap:h},children:yt.map((A,se)=>{const fe=A.image.objectFit??"contain",ke=se%t.length,Be=Math.floor(se/t.length),gt=Ur(h),Wt=`calc(-0.5 * (${gt} + ${h}))`;return a.jsxs("div",{ref:Kt=>lt.current[se]=Kt,className:`${e}-strip-item`,style:{height:q==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[a.jsx("img",{src:A.image.assetId,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:fe}}),o&&ke<t.length-1&&Be===0&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Wt,width:gt,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Be}-${A.image.assetId}-${ke}`)})})})}),a.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":_t?"true":"false",style:pt,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:J,flexShrink:0,pointerEvents:"none"},children:o&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-handle-left-fraction":"0.05",style:{position:"absolute",left:0,right:0,top:0,height:V,pointerEvents:"auto",zIndex:3}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:a.jsx("div",{className:`${e}-lightbox-content-area${le?` ${e}-lightbox-content-area-stacked`:""}`,children:(Ce||x)&&a.jsx("div",{className:`${e}-header ${le?`${e}-header-two-row`:`${e}-header-single-row`}`,children:le?ut():Ce||x?kt():null})})})]}),t.length>1&&N==="on"&&(()=>{const A=Ur(P),se=`calc(-0.5 * (${P} + ${A}))`;return a.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:P},children:a.jsx("div",{ref:tt,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:fe=>fe.stopPropagation(),children:a.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":M,style:{gap:K,"--thumbnail-active-color":R},children:[t.map((fe,ke)=>{const Be=Ur(K),gt=`calc(-0.5 * (${Be} + ${K}))`;return a.jsxs("div",{ref:Wt=>{ot.current[ke]=Wt},style:{position:"relative",flex:"0 0 auto"},children:[a.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":k===ke?"true":"false",onClick:()=>oe&&w==="click"&&Sn(ke),onMouseEnter:()=>Ee&&w==="hover"&&Sn(ke),"aria-label":fe.image.name?`View ${fe.image.name}`:`View image ${ke+1}`,"aria-current":k===ke?"true":void 0,children:a.jsx("img",{className:`${e}-thumb-image${Ne?` ${e}-thumb-image-cover`:""}`,src:fe.image.assetId,alt:"",draggable:!1,style:{...Te,maxWidth:F,maxHeight:F,width:v.display==="cover"?"auto":"100%",height:"auto",objectFit:v.display==="cover"?"cover":"contain"}})}),o&&ke<t.length-1&&a.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:gt,width:Be,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${fe.image.assetId}-${ke}`)}),o&&a.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:se,height:A,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function Qx(e){return`
14730
+ `;function yi(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const id={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},$x=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Cx={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:yi("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:{...id.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:{...id.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:yi("Question Padding Left"),questionPaddingTop:yi("Question Padding Top"),questionPaddingBottom:yi("Question Padding Bottom"),answerPaddingLeft:yi("Answer Padding Left"),answerPaddingRight:yi("Answer Padding Right"),answerPaddingTop:yi("Answer Padding Top"),answerPaddingBottom:yi("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"01M3QM74XGFBPMXNEQB1BXSD9E",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:[...$x],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},Tx={element:Sx,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:Cx,sourceCode:wx},li=e=>e.display==="cover",Va=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},od=100,Ix=.2,rd=8,Sp=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,r]=s.useState(0),[l,c]=s.useState(!1),d=s.useRef(null),u=s.useRef(0);u.current=o;const p=s.useMemo(()=>typeof window>"u"?od:Math.max(od,window.innerHeight*Ix),[]),y=s.useCallback(T=>Math.max(0,1-T/(p*1.5)),[p]),x=s.useCallback(T=>Math.max(0,1-T/(p*.45)),[p]),m=s.useCallback(T=>{const C=typeof window<"u"?window.innerHeight:800,q=Math.max(.88,1-T/C*.12);return`translateY(${T}px) scale(${q})`},[]),f=s.useCallback(()=>{d.current=null},[]),S=s.useCallback(()=>{c(!0),r(0),window.setTimeout(()=>c(!1),n),f()},[n,f]),w=s.useCallback(()=>{const T=typeof window<"u"?window.innerHeight:800;c(!0),r(T),window.setTimeout(()=>{t(),f(),c(!1)},Math.min(n,200))},[n,t,f]),N=s.useCallback(T=>{!e||l||T.pointerType==="touch"&&(i!=null&&i(T.target)||(d.current={startX:T.clientX,startY:T.clientY,isLocked:null,pointerId:T.pointerId}))},[e,l,i]),v=s.useCallback(T=>{const C=d.current;if(!e||!C||T.pointerType!=="touch"||C.pointerId!==T.pointerId)return;const q=T.clientX-C.startX,R=T.clientY-C.startY;if(C.isLocked===null){if(Math.abs(q)<rd&&Math.abs(R)<rd)return;if(R>0&&R>Math.abs(q))C.isLocked=!0,T.currentTarget.setPointerCapture(T.pointerId);else{C.isLocked=!1,f();return}}if(!C.isLocked)return;T.preventDefault();const $=Math.max(0,R);u.current=$,r($)},[e,f]),M=s.useCallback(T=>{const C=d.current;if(!e||!C||T.pointerType!=="touch"||C.pointerId!==T.pointerId)return;const q=C.isLocked===!0;if(T.currentTarget.hasPointerCapture(T.pointerId)&&T.currentTarget.releasePointerCapture(T.pointerId),!q){f();return}T.clientY-C.startY>=p?w():S()},[p,w,e,f,S]),E=s.useCallback(T=>{M(T)},[M]),U=s.useCallback(T=>{M(T)},[M]),X=o>0,D=l?`transform ${n}ms ease`:"none",_=l?`opacity ${n}ms ease`:"none",W=o>0||l;return{isSwipeDragging:X,backdropStyle:{opacity:y(o),transition:_},mediaAreaStyle:{transform:m(o),transition:D,touchAction:X?"none":void 0,willChange:X?"transform":void 0},overlayContentStyle:W?{opacity:x(o),transition:_}:void 0,swipeHandlers:e?{onPointerDown:N,onPointerMove:v,onPointerUp:E,onPointerCancel:U}:{},dismissAreaStyle:e?{touchAction:X?"none":"pan-x"}:void 0}},Lx="[data-lightbox-scrollable]",Vl=(e=!0)=>{s.useEffect(()=>{if(!e)return;const t=window.scrollY,n=document.body.style.overflow,i=document.body.style.position,o=document.body.style.top,r=document.body.style.width,l=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${t}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const c=d=>{const u=d.target;u instanceof Element&&u.closest(Lx)||d.preventDefault()};return document.addEventListener("touchmove",c,{passive:!1}),()=>{document.removeEventListener("touchmove",c),document.body.style.overflow=n,document.body.style.position=i,document.body.style.top=o,document.body.style.width=r,document.documentElement.style.overflow=l,window.scrollTo({top:t,left:0,behavior:"instant"})}},[e])},Mx=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Px=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},Ex=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},Rx=(e,t,n,{duration:i,easing:o,onComplete:r})=>{const l=e.scrollLeft,c=n-l,d=l-n,u=(f,S)=>{Px(t),e.scrollLeft=f,S&&(r==null||r())};if(Math.abs(c)<.5)return u(n,!0),()=>{};let p=!1,y=0;const x=()=>{t.removeEventListener("transitionend",m),clearTimeout(y)},m=f=>{f.target!==t||f.propertyName!=="transform"||p||(p=!0,x(),u(n,!0))};return t.addEventListener("transitionend",m),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${d}px, 0, 0)`,y=window.setTimeout(()=>{p||(p=!0,x(),u(n,!0))},i+64),()=>{p||(p=!0,x(),u(l-Ex(t),!1))}},cr=300,kx=900,Ax=1500,Fx="cubic-bezier(0.16, 1, 0.3, 1)",Nx=3e3,_x=2,Hx=16,Wx=.05,Ox=1,Xr=.3,Dx=50,zx=20,ro=.004,Fo=["title1","title2","title3"],Bx={title1:"1",title2:"2",title3:"3"},jx={title1:"title1Color",title2:"title2Color",title3:"title3Color"},Vx={title1:.02,title2:.02,title3:.02},Ur=e=>`max(${e}, ${zx}px)`,Gx=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]}},Xx=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=Gx(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Jt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Ux=e=>[Jt(e,"fontFamily"),Jt(e,"fontSettings"),{type:"row",items:[Jt(e,"fontSize"),Jt(e,"lineHeight"),Jt(e,"letterSpacing"),Jt(e,"wordSpacing")]},Jt(e,"textAlign"),Jt(e,"textAppearance")],qx=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Fo.map(e=>[Bx[e],Ux(e)]))}),Gl=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},c)=>{if(r<=0||c<=0)return{overflow:r,widths:[c,...l]};const d=Math.min(r,c);return{overflow:r-d,widths:[c-d,...l]}},{overflow:i-1,widths:[]});return o},wp=(e,t)=>Gl(e,t),qr=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},ad=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Gl(e.length,n),effective:wp(e.length,n)}},Kx=(e,t,n,i,o,r,l)=>{const c=[];return t&&c.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&c.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:r,text:n}),i&&c.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:l,text:i}),c},hs=(e,t)=>{const n=i=>{const o=Jt(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[jx[t]]}},Yx=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),fs=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??Vx[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return nn(i,n)},Qx=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l})=>{const{backgroundColor:c,thumbnailSize:d,thumbnailGap:u,thumbnailMarginBottom:p,imageGap:y,closeIcon:x,closeIconMaxWidth:m,closeIconColor:f,closeIconHoverColor:S,thumbnailTrigger:w,thumbnailVisibility:N,thumbnailObjectFit:v,thumbnailActive:M,thumbnailActiveColor:E,title1Width:U,title2Width:X,title3Width:D,title1MarginLeft:_=0,title2MarginLeft:W=0,title3MarginLeft:T=0,titleRowMarginBottom:C=0,titleHeaderLayout:q="desktop",contentMarginTop:R,iconMarginLeft:$}=n,I=A=>b.scalingValue(A,i??!1),j=d??n.thumnailSize??.03,F=I(j),K=I(u),P=I(p??.02),h=I(y??0),J=I(R??0),V=Ur(J),he=I($??0),[k,ce]=s.useState(0),L=s.useRef(k);L.current=k;const me=t[k],{title1:te,title2:ve,title3:Le}=Xx(me),de=fs("title1",hs(n,"title1"),i),ue=fs("title2",hs(n,"title2"),i),Z=fs("title3",hs(n,"title3"),i),le=q==="mobile",oe=!o&&(!i||r),ge=oe,Se=oe,Re=oe,Ne=li(v),Te=Ne?{"--image-aspect-ratio":Va(v)}:void 0,Ce=!!(te||ve||Le),g=s.useMemo(()=>Kx(e,te,ve,Le,de,ue,Z),[e,k,te,ve,Le,de,ue,Z]),Y=s.useMemo(()=>({title1Width:U,title2Width:X,title3Width:D}),[U,X,D]),ee=s.useMemo(()=>g.map(A=>Y[A.widthKey]),[g,Y]),ae=s.useMemo(()=>Gl(g.length,ee),[g.length,ee]),ye=s.useMemo(()=>wp(g.length,ee),[g.length,ee]),ne=s.useMemo(()=>g.filter(A=>A.prefix==="title1"),[g]),B=s.useMemo(()=>g.filter(A=>A.prefix==="title2"||A.prefix==="title3"),[g]),G=s.useMemo(()=>ad(ne,Y),[ne,Y]),z=s.useMemo(()=>ad(B,Y),[B,Y]),ie=s.useCallback((A,se)=>{const fe=g.indexOf(A);if(!le||se==="single-row")return{effectiveWidth:ye[fe]??0,resolvedWidth:ae[fe]??0,maxWidth:qr(fe,ae)};if(se==="two-row-top"){const Be=ne.indexOf(A);return{effectiveWidth:G.effective[Be]??0,resolvedWidth:G.resolved[Be]??0,maxWidth:qr(Be,G.resolved)}}const ke=B.indexOf(A);return{effectiveWidth:z.effective[ke]??0,resolvedWidth:z.resolved[ke]??0,maxWidth:qr(ke,z.resolved)}},[B,z,ye,ae,g,ne,G,le]),H=s.useCallback(A=>b.scalingValue(A,i??!1),[i]),be=H(C??0),re=s.useMemo(()=>({title1MarginLeft:_,title2MarginLeft:W,title3MarginLeft:T}),[_,W,T]),Q=s.useCallback(A=>g.slice(0,A+1).reduce((se,fe,ke)=>se+(fe!=null&&fe.marginLeftKey?re[fe.marginLeftKey]??0:0)+(ae[ke]??0),0)+(le?0:_??0),[g,re,ae,le,_]),Pe=s.useCallback(()=>le?0:_??0,[le,_]),Ae=s.useCallback(A=>B.slice(0,A).reduce((se,fe,ke)=>se+(fe.marginLeftKey?re[fe.marginLeftKey]??0:0)+(z.resolved[ke]??0),0),[B,z.resolved,re]),He=s.useCallback(A=>{const se=B[A];return Ae(A)+(se.marginLeftKey?re[se.marginLeftKey]??0:0)+(z.resolved[A]??0)},[B,z.resolved,Ae,re]),Xe=(A,se)=>{const fe=A.marginLeftKey?re[A.marginLeftKey]??0:0,{effectiveWidth:ke,resolvedWidth:Be,maxWidth:gt}=ie(A,se),Wt=o&&se==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":A.prefix,style:{...se==="single-row"?{gridArea:A.prefix}:{},width:H(ke),...fe>0?{marginLeft:H(fe)}:{}},children:[a.jsx("p",{className:A.className,style:A.style,children:A.text}),Wt&&A.marginLeftKey&&a.jsx("div",{"data-controls":A.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Be),style:{position:"absolute",top:0,left:H(-fe),width:`max(${H(fe)}, 10px)`,height:"100%",pointerEvents:"auto"}}),Wt&&a.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(gt),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:H(-ro/2),width:H(ro),height:"100%",pointerEvents:"auto"}})]},A.className)},Ue=()=>{const A=le?-1:g.findIndex(ke=>ke.prefix==="title1"),se=!le&&(o||(_??0)>0)?(()=>{const ke=_??0,Be=A>=0?ae[A]:U??0;return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Be),style:{position:"absolute",top:0,left:0,width:`max(${H(ke)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,fe=g.flatMap((ke,Be)=>{if(!ke.marginLeftKey)return[];const gt=re[ke.marginLeftKey]??0,Wt=Yx(g,ae,re,Be)+Pe();return a.jsx("div",{"data-controls":ke.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ae[Be]),style:{position:"absolute",top:0,left:H(Wt),width:`max(${H(gt)}, 10px)`,height:"100%",pointerEvents:"auto"}},ke.marginLeftKey)});return se?[se,...fe]:fe},Je=()=>g.map((A,se)=>{const fe=qr(se,ae),Be=Q(se)-ro/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":A.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:H(Be),width:H(ro),height:"100%",pointerEvents:"auto"}})},`${A.widthKey}-junction`)}),je=()=>B.flatMap((A,se)=>{if(!A.marginLeftKey)return[];const fe=re[A.marginLeftKey]??0,ke=Ae(se),{resolvedWidth:Be}=ie(A,"two-row-bottom");return a.jsx("div",{"data-controls":A.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Be),style:{position:"absolute",top:0,left:H(ke),width:`max(${H(fe)}, 10px)`,height:"100%",pointerEvents:"auto"}},A.marginLeftKey)}),xe=()=>B.map((A,se)=>{const{maxWidth:fe}=ie(A,"two-row-bottom"),Be=He(se)-ro/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":A.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:H(Be),width:H(ro),height:"100%",pointerEvents:"auto"}})},`${A.widthKey}-junction`)}),Ie=s.useRef(null),ze=s.useRef(null),Ze=s.useRef(null),tt=s.useRef(null),ot=s.useRef([]),lt=s.useRef([]),it=s.useRef(0),xt=s.useRef(null),rt=s.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),_e=s.useRef(null),We=s.useRef(null),vt=s.useRef(0),Ve=s.useRef("forward"),Ke=s.useRef(0),pe=s.useRef(null),De=s.useRef(!1),qe=t.length>1&&(!o||!!r),bt=qe?3:1,yt=s.useMemo(()=>Array.from({length:bt},()=>t).flat(),[t,bt]),[Rt,ct]=s.useState(!1),[wt,nt]=s.useState(!1),[Nt,jt]=s.useState(!0),$e=s.useRef(null),Ge=s.useRef(null),ht=s.useRef(!1),Lt=s.useRef(!1),$t=s.useRef(null),mt=s.useRef(null),_t=ge&&!Nt,Ot=s.useCallback(()=>{ge&&(jt(!0),mt.current&&clearTimeout(mt.current),mt.current=setTimeout(()=>{rt.current.isActive||jt(!1)},Nx))},[ge]),zt=s.useCallback(()=>{o||Lt.current||(Lt.current=!0,nt(!1),$t.current=setTimeout(()=>{l()},cr))},[o,l]),Ee=()=>a.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":_t?"true":"false",style:{width:b.scalingValue(m??0,i),height:b.scalingValue(m??0,i),marginRight:he,"--close-icon-hover-color":S},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:zt,"aria-label":"Close",children:a.jsx(mn,{url:x,fill:f,hoverFill:i&&!r?f:S,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:he,height:"100%",pointerEvents:"auto"}})]}),dt=(A="two-row")=>a.jsx("div",{...A==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:H(_??0),flexShrink:0,...A==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...A==="two-row"&&o?{pointerEvents:"auto"}:{}}}),ut=()=>{const A=g.find(ke=>ke.prefix==="title1"),se=g.filter(ke=>ke.prefix==="title2"||ke.prefix==="title3"),fe=se.length>0||o||(C??0)>0;return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`${e}-header-row-top`,children:[(_??0)>0||o?dt():null,A&&Xe(A,"two-row-top"),x&&Ee()]}),fe?a.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[se.length>0?a.jsxs("div",{className:`${e}-header-row-bottom`,children:[se.map(ke=>Xe(ke,"two-row-bottom")),o&&a.jsxs(a.Fragment,{children:[je(),xe()]})]}):null,a.jsx("div",{"data-controls":o?"titleRowMarginBottom":void 0,"data-controls-axis":o?"y":void 0,"data-controls-reverse":o?"":void 0,className:o?`${e}-control`:void 0,style:{height:be,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},kt=()=>a.jsxs(a.Fragment,{children:[(_??0)>0||o?dt("single-row"):null,g.map(A=>Xe(A,"single-row")),o?a.jsxs(a.Fragment,{children:[Ue(),Je()]}):null,x?Ee():null]}),Qe=s.useCallback(A=>!!(A.closest("[data-controls]")||A.closest(`.${e}-thumbnails`)||A.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:at,backdropStyle:It,mediaAreaStyle:At,overlayContentStyle:pt,swipeHandlers:Ut,dismissAreaStyle:qt}=Sp({enabled:oe??!1,onClose:zt,animMs:cr,isBlockedTarget:Qe}),Dt=()=>{if(!qe||t.length===0)return it.current=0,0;const A=lt.current[0],se=lt.current[t.length];if(!A||!se)return it.current;const fe=se.offsetLeft-A.offsetLeft;return fe>0&&(it.current=fe),it.current},Vt=(A=!1)=>{if(!qe)return;const se=ze.current,fe=Dt();!se||fe<=0||fe<se.clientWidth*.25||(se.scrollLeft<=0?(se.scrollLeft+=fe,A&&(rt.current.scrollLeft+=fe),De.current&&(Ke.current+=fe)):se.scrollLeft>=fe*2&&(se.scrollLeft-=fe,A&&(rt.current.scrollLeft-=fe),De.current&&(Ke.current-=fe)))},Gt=(A,se=(fe=>(fe=ze.current)==null?void 0:fe.scrollLeft)()??0)=>{if(!qe)return A;let ke=t.length+A,Be=1/0;for(let gt=0;gt<bt;gt++){const Wt=gt*t.length+A,Kt=lt.current[Wt];if(!Kt)continue;const sn=Math.abs(Kt.offsetLeft-se);sn<Be&&(Be=sn,ke=Wt)}return ke},Bt=A=>{const se=ze.current;return!A||!se?!1:A.offsetWidth>se.clientWidth+1},Yt=A=>{const se=ze.current;if(!A||!se||!Bt(A))return!1;const fe=A.offsetLeft,ke=fe+A.offsetWidth;return se.scrollLeft>=fe-1&&se.scrollLeft+se.clientWidth<=ke+1},O=(A=(se=>(se=ze.current)==null?void 0:se.scrollLeft)()??0)=>{for(let ke=0;ke<lt.current.length;ke+=1){const Be=lt.current[ke];if(Be&&Yt(Be))return ke}let fe={flatIndex:0,distance:1/0};return lt.current.forEach((ke,Be)=>{if(!ke)return;const gt=Math.abs(ke.offsetLeft-A);gt<fe.distance&&(fe={flatIndex:Be,distance:gt})}),fe.flatIndex},Me=A=>{ze.current&&lt.current.forEach(se=>{se&&(se.style.scrollSnapAlign=Bt(se)&&A==="backward"?"end":"start")})},Fe=(A,se,fe)=>{const ke=A-se,Be=O(se),gt=lt.current[Be];if(Yt(gt))return O(A)%t.length;const Wt=lt.current[Be+1],Kt=gt?Wt?Wt.offsetLeft-gt.offsetLeft:gt.offsetWidth:0,sn=Kt>0?ke>Kt*Xr?1:ke<-Kt*Xr?-1:0:0;return sn===0?fe:qe?(fe+sn+t.length)%t.length:Math.max(0,Math.min(t.length-1,fe+sn))},Oe=s.useCallback((A=!1)=>{if(N!=="on"||o)return;const se=tt.current,fe=L.current,ke=ot.current[fe];if(!se||!ke||se.scrollWidth<=se.clientWidth)return;const Be=se.scrollLeft,gt=Be+se.clientWidth,Wt=ke.offsetLeft,Kt=Wt+ke.offsetWidth;if(Wt>=Be&&Kt<=gt)return;const sn=se.scrollWidth-se.clientWidth;let en=Be;if(!A&&$e.current===null){const gi=ot.current[fe-1],An=ot.current[fe+1],Zn=gi?ke.offsetLeft-gi.offsetLeft:An?An.offsetLeft-ke.offsetLeft:ke.offsetWidth;Kt>gt?en+=Zn:Wt<Be&&(en-=Zn)}else Kt>gt?en=Kt-se.clientWidth:en=Wt;se.scrollLeft=Math.max(0,Math.min(sn,en))},[o,N]),ft=s.useCallback((A=!1)=>{A&&(ht.current=!0),Ge.current===null&&(Ge.current=requestAnimationFrame(()=>{Ge.current=null;const se=ht.current;ht.current=!1,Oe(se)}))},[Oe]),Tt=s.useCallback(A=>{if(A===L.current)return;const se=L.current;L.current=A;const fe=Math.abs(A-se)>1,ke=qe&&t.length>1&&(se===t.length-1&&A===0||se===0&&A===t.length-1);ce(A),ft(fe||ke)},[t.length,qe,ft]),et=()=>{if(!ze.current||t.length===0||$e.current!==null||rt.current.isActive&&rt.current.hasMoved)return;const A=ze.current.scrollLeft,se=O(A)%t.length;se!==L.current&&Tt(se)},Mt=()=>{$e.current=null},Ct=A=>{const se=ze.current;se&&(se.style.scrollSnapType=A?"":"none")},Ht=()=>{var A;(A=We.current)==null||A.call(We),We.current=null},on=()=>{pe.current!==null&&(cancelAnimationFrame(pe.current),pe.current=null),De.current=!1},fn=()=>{const A=ze.current;if(!A){pe.current=null,De.current=!1;return}const se=Ke.current-A.scrollLeft;if(Math.abs(se)<.5){A.scrollLeft=Ke.current,Vt(),et(),pe.current=null,De.current=!1;return}A.scrollLeft+=se*Wx,Vt(),et(),Ot(),pe.current=requestAnimationFrame(fn)},bn=()=>{const A=Ze.current;A&&(A.style.transition="",A.style.transform="",A.style.willChange="")},ui=(A,se,fe,ke)=>{bn(),A.scrollLeft=se,vt.current=A.scrollLeft,Vt(),fe!==void 0?(L.current=fe,ce(fe)):et(),Ct(!0),ke==null||ke()},dn=(A,{behavior:se="smooth",activeIndex:fe,onComplete:ke}={})=>{const Be=ze.current,gt=Ze.current;if(!Be||!gt)return;if(on(),Ht(),Ct(!1),se==="auto"){ui(Be,A,fe,ke);return}const Wt=Math.abs(A-Be.scrollLeft),Kt=Mx(Wt,kx,Ax,Be.clientWidth*.55);We.current=Rx(Be,gt,A,{duration:Kt,easing:Fx,onComplete:()=>{We.current=null,ui(Be,A,fe,ke)}})},pi=(A="smooth")=>{const se=ze.current;if(!se||t.length===0)return;const fe=O()%t.length,ke=Gt(fe,se.scrollLeft),Be=lt.current[ke];Be&&dn(Be.offsetLeft,{behavior:A,activeIndex:fe})},Yn=(A,se="smooth",fe,ke)=>{const Be=ze.current;if(!Be||t.length===0)return;const gt=(ke??Be.scrollLeft)-A,Wt=O(A),Kt=lt.current[Wt];if(Yt(Kt)){Ct(!0),et();return}const sn=lt.current[Wt+1],en=Kt?sn?sn.offsetLeft-Kt.offsetLeft:Kt.offsetWidth:0;if((en>0?gt>en*Xr?1:gt<-en*Xr?-1:0:0)!==0){const Ql=fe??Wt%t.length,Go=Fe(ke??Be.scrollLeft,A,Ql);Sn(Go,se);return}const An=ke??Be.scrollLeft,Zn=O(An),kr=lt.current[Zn];if(kr&&Math.abs(kr.offsetLeft-An)<1){Ct(!0),et();return}pi("auto")},Sn=(A,se="smooth")=>{const fe=ze.current;if(!fe||t.length===0)return;const ke=Gt(A,fe.scrollLeft),Be=lt.current[ke];Be&&(se==="smooth"?$e.current=A:$e.current=null,L.current=A,ce(A),ft(!0),dn(Be.offsetLeft,{behavior:se,activeIndex:A,onComplete:se==="smooth"?Mt:void 0}))},mi=()=>{_e.current&&(window.removeEventListener("pointerup",_e.current),window.removeEventListener("pointercancel",_e.current),_e.current=null)},eo=(A,se,fe,ke,Be)=>{const gt=fe-A,Wt=ke-se,Kt=Math.abs(gt),sn=Math.abs(Wt);if(Kt<Dx||Kt<=sn)return!1;const en=gt<0?1:-1,gi=qe?(Be+en+t.length)%t.length:Math.max(0,Math.min(t.length-1,Be+en));return gi===Be?!1:(Sn(gi),!0)},wn=A=>{if(!rt.current.isActive)return;mi();const se=ze.current;if(!se)return;const{scrollLeft:fe,startActiveIndex:ke,hasMoved:Be}=rt.current,gt=se.scrollLeft;Vt(!0),rt.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},ct(!1),A!==void 0&&se.hasPointerCapture(A)&&se.releasePointerCapture(A),Be?Yn(fe,"smooth",ke,gt):(Ct(!0),et()),Ot()},Qn=(A,se)=>{const fe=xt.current;xt.current=null,fe&&(eo(fe.startX,fe.startY,A,se,fe.startActiveIndex),Ot())},to=A=>{if(!Se)return;if(A.pointerType==="touch"){if(on(),Ct(!0),Qe(A.target))return;xt.current={startX:A.clientX,startY:A.clientY,startActiveIndex:L.current};return}if(A.pointerType!=="mouse"||A.button!==0||Qe(A.target))return;const se=ze.current;if(!se)return;on(),Ht(),bn(),$e.current=null,rt.current={isActive:!0,startX:A.clientX,scrollLeft:se.scrollLeft,startActiveIndex:L.current,hasMoved:!1},Ct(!1),Ot(),se.setPointerCapture(A.pointerId),mi();const fe=ke=>{ke.pointerType==="mouse"&&wn(ke.pointerId)};_e.current=fe,window.addEventListener("pointerup",fe),window.addEventListener("pointercancel",fe)},no=A=>{if(!Se||A.pointerType!=="mouse")return;const se=ze.current;if(!se||!rt.current.isActive)return;if(A.buttons===0){wn(A.pointerId);return}const fe=A.clientX-rt.current.startX;Math.abs(fe)>Ox&&(rt.current.hasMoved=!0,ct(!0)),rt.current.hasMoved&&(A.preventDefault(),se.scrollLeft=rt.current.scrollLeft-fe,Vt(!0),et(),Ot())},we=A=>{if(Se){if(A.pointerType==="touch"){A.type==="pointerup"?Qn(A.clientX,A.clientY):xt.current=null;return}A.pointerType==="mouse"&&wn(A.pointerId)}},Ye=A=>{!Se||A.pointerType!=="mouse"||wn(A.pointerId)};return Vl(),s.useEffect(()=>{const A=requestAnimationFrame(()=>nt(!0));return()=>{cancelAnimationFrame(A),Ht(),mi(),Ge.current!==null&&(cancelAnimationFrame(Ge.current),Ge.current=null),$t.current&&clearTimeout($t.current),mt.current&&clearTimeout(mt.current)}},[]),s.useEffect(()=>{if(!ge){jt(!0);return}Ot();const A=()=>Ot();return document.addEventListener("pointermove",A,{passive:!0}),document.addEventListener("pointerdown",A,{passive:!0}),()=>{document.removeEventListener("pointermove",A),document.removeEventListener("pointerdown",A),mt.current&&clearTimeout(mt.current)}},[ge,Ot]),s.useEffect(()=>{const A=se=>{se.key==="Escape"&&zt()};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[zt]),s.useLayoutEffect(()=>{Dt()},[h,t.length,qe]),s.useLayoutEffect(()=>{o||Sn(L.current,"auto")},[h,o]),s.useLayoutEffect(()=>{Sn(0,"auto")},[t.length,qe]),s.useEffect(()=>{const A=ze.current;if(!A||o||!oe)return;const se=fe=>{if(fe.preventDefault(),Math.abs(fe.deltaY)<=Math.abs(fe.deltaX))return;const ke=fe.deltaMode===1?Hx:fe.deltaMode===2?A.clientHeight:1,Be=fe.deltaY*ke*_x;if(Be!==0){if(Ht(),De.current||(De.current=!0,Ke.current=A.scrollLeft,$e.current=null,Ct(!1)),Ke.current+=Be,!qe){const gt=A.scrollWidth-A.clientWidth;Ke.current=Math.max(0,Math.min(gt,Ke.current))}Ot(),pe.current===null&&(pe.current=requestAnimationFrame(fn))}};return A.addEventListener("wheel",se,{passive:!1}),()=>{A.removeEventListener("wheel",se),on()}},[o,oe,qe]),s.useEffect(()=>{const A=ze.current;if(!A)return;const se=()=>{Vt(rt.current.isActive);const ke=A.scrollLeft,Be=ke-vt.current;vt.current=ke;const gt=it.current>0?it.current*.5:1/0;if(Be!==0&&Math.abs(Be)<gt){const Wt=Be>0?"forward":"backward";Wt!==Ve.current&&(Ve.current=Wt,Me(Wt))}rt.current.isActive&&rt.current.hasMoved||et()};A.addEventListener("scroll",se,{passive:!0});const fe=new ResizeObserver(()=>{Dt(),Vt(rt.current.isActive),Me(Ve.current),et()});return fe.observe(A),()=>{Ht(),A.removeEventListener("scroll",se),fe.disconnect()}},[t.length,qe]),a.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{at||zt()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:wt?1:0,transition:`opacity ${cr}ms ease`,pointerEvents:wt?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:c,...It}}),a.jsxs("div",{ref:Ie,className:`${e}-lightbox-dismiss-area`,style:qt,...Ut,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:At,onClick:A=>A.stopPropagation(),children:a.jsx("div",{ref:ze,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":Se&&t.length>0?"true":"false","data-mouse-dragging":Rt?"true":"false",onPointerDown:to,onPointerMove:no,onPointerUp:we,onPointerCancel:we,onLostPointerCapture:Ye,children:a.jsx("div",{ref:Ze,className:`${e}-lightbox-strip-track`,style:{gap:h},children:yt.map((A,se)=>{const fe=A.image.objectFit??"contain",ke=se%t.length,Be=Math.floor(se/t.length),gt=Ur(h),Wt=`calc(-0.5 * (${gt} + ${h}))`;return a.jsxs("div",{ref:Kt=>lt.current[se]=Kt,className:`${e}-strip-item`,style:{height:q==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[a.jsx("img",{src:A.image.assetId,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:fe}}),o&&ke<t.length-1&&Be===0&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Wt,width:gt,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Be}-${A.image.assetId}-${ke}`)})})})}),a.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":_t?"true":"false",style:pt,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:J,flexShrink:0,pointerEvents:"none"},children:o&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-handle-left-fraction":"0.05",style:{position:"absolute",left:0,right:0,top:0,height:V,pointerEvents:"auto",zIndex:3}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:a.jsx("div",{className:`${e}-lightbox-content-area${le?` ${e}-lightbox-content-area-stacked`:""}`,children:(Ce||x)&&a.jsx("div",{className:`${e}-header ${le?`${e}-header-two-row`:`${e}-header-single-row`}`,children:le?ut():Ce||x?kt():null})})})]}),t.length>1&&N==="on"&&(()=>{const A=Ur(P),se=`calc(-0.5 * (${P} + ${A}))`;return a.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:P},children:a.jsx("div",{ref:tt,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:fe=>fe.stopPropagation(),children:a.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":M,style:{gap:K,"--thumbnail-active-color":E},children:[t.map((fe,ke)=>{const Be=Ur(K),gt=`calc(-0.5 * (${Be} + ${K}))`;return a.jsxs("div",{ref:Wt=>{ot.current[ke]=Wt},style:{position:"relative",flex:"0 0 auto"},children:[a.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":k===ke?"true":"false",onClick:()=>oe&&w==="click"&&Sn(ke),onMouseEnter:()=>Re&&w==="hover"&&Sn(ke),"aria-label":fe.image.name?`View ${fe.image.name}`:`View image ${ke+1}`,"aria-current":k===ke?"true":void 0,children:a.jsx("img",{className:`${e}-thumb-image${Ne?` ${e}-thumb-image-cover`:""}`,src:fe.image.assetId,alt:"",draggable:!1,style:{...Te,maxWidth:F,maxHeight:F,width:v.display==="cover"?"auto":"100%",height:"auto",objectFit:v.display==="cover"?"cover":"contain"}})}),o&&ke<t.length-1&&a.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:gt,width:Be,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${fe.image.assetId}-${ke}`)}),o&&a.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:se,height:A,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function Zx(e){return`
14731
14731
  .${e}-wrapper {
14732
14732
  position: relative;
14733
14733
  width: 100%;
@@ -15112,7 +15112,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
15112
15112
  pointer-events: auto;
15113
15113
  z-index: 10;
15114
15114
  }
15115
- `}const Zx=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r})=>{const{prefix:l}=b.useScopedStyles(),{cover:c,coverFit:d}=e,u=s.useRef(null),[p,y]=s.useState(!1),x=t??[],m=p&&x.length>0,f=()=>{x.length!==0&&y(!0)};return s.useEffect(()=>{!n||i||o||y(!1)},[n,i,o]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:u,className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Qx(l)}}),c&&a.jsx("div",{className:`${l}-cover ${li(d)?`${l}-ratio-wrapper-cover`:`${l}-ratio-wrapper-fit`}`,onClick:()=>f(),style:{...li(d)?{"--image-aspect-ratio":ja(d)}:{}},"aria-label":"Open image gallery",children:a.jsx("img",{className:`${l}-cover-image ${li(d)?`${l}-cover-image-cover`:`${l}-cover-image-fit`}`,src:c,alt:"cover"})})]}),m&&typeof document<"u"&&(()=>{const S=(r?document.getElementById(r):null)??document.body;return qn.createPortal(a.jsx(Yx,{prefix:l,images:x,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>y(!1)}),S)})()]})},Jx=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
15115
+ `}const Jx=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r})=>{const{prefix:l}=b.useScopedStyles(),{cover:c,coverFit:d}=e,u=s.useRef(null),[p,y]=s.useState(!1),x=t??[],m=p&&x.length>0,f=()=>{x.length!==0&&y(!0)};return s.useEffect(()=>{!n||i||o||y(!1)},[n,i,o]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:u,className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Zx(l)}}),c&&a.jsx("div",{className:`${l}-cover ${li(d)?`${l}-ratio-wrapper-cover`:`${l}-ratio-wrapper-fit`}`,onClick:()=>f(),style:{...li(d)?{"--image-aspect-ratio":Va(d)}:{}},"aria-label":"Open image gallery",children:a.jsx("img",{className:`${l}-cover-image ${li(d)?`${l}-cover-image-cover`:`${l}-cover-image-fit`}`,src:c,alt:"cover"})})]}),m&&typeof document<"u"&&(()=>{const S=(r?document.getElementById(r):null)??document.body;return qn.createPortal(a.jsx(Qx,{prefix:l,images:x,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>y(!1)}),S)})()]})},eb=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
15116
15116
  import { createPortal } from 'react-dom';
15117
15117
  import { CommonComponentProps } from '../props';
15118
15118
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -15658,7 +15658,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
15658
15658
  </>
15659
15659
  );
15660
15660
  };
15661
- `,eb="01M3SBP3P8CMVMM1ZZ0QVD2PPF",Di={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 tb(e){const t={};return t[Jt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Jt(e,"fontSettings")]={...Di.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Jt(e,"fontSize")]={...Di.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Jt(e,"lineHeight")]={...Di.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Jt(e,"letterSpacing")]={...Di.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Jt(e,"wordSpacing")]={...Di.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Jt(e,"textAlign")]={...Di.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Jt(e,"textAppearance")]={...Di.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const nb=Fo.reduce((e,t)=>({...e,...tb(t)}),{}),ib=Fo.reduce((e,t)=>({...e,[Jt(t,"fontFamily")]:"Goudy Bookletter 1911",[Jt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Jt(t,"letterSpacing")]:0,[Jt(t,"wordSpacing")]:0,[Jt(t,"textAlign")]:"left",[Jt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function fs(e){return Fo.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Jt(n,"fontSize")]=i),o!==void 0&&(t[Jt(n,"lineHeight")]=o),t},{})}const ob=Ux(),rb={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"}},...nb,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:"01M3QM74XESYN1HRYH9VRTZ5CK",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:eb,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...ib},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,...fs({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,...fs({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,...fs({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:[ob]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{allowsCollection:!0,addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",contentKey:"gallery",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"}},title1:{type:"string",label:"Title",contentKey:"title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",contentKey:"subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}}}},default:[{image:{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"}]}},ab={element:Zx,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:rb,sourceCode:Jx,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0},{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[...Fo.map(e=>({path:`${Jt(e,"fontFamily")}`}))]},fontRelations:{...Fo.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Jt(t,"fontFamily")}`}),{})}},sb=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,initialSlideIndex:l=0,enableUrlSync:c=!1,journalItemId:d=null,onBeforeClose:u,onClose:p})=>{const{type:y,coverFit:x,backgroundColor:m,imageGap:f,maxWidth:S,maxHeight:w,textTransition:N,title1Width:v,title2Width:M,title3Width:R,title1MarginLeft:U=0,title2MarginLeft:X=0,title3MarginLeft:D=0,titleRowMarginBottom:_=0,titleHeaderLayout:W="single-row",countCloseGap:T=0,closeIcon:C,closeIconMaxWidth:q,closeIconColor:E,closeIconHoverColor:$,contentMarginTop:I=0,iconMarginRight:j=0}=n,F=s.useCallback(we=>b.scalingValue(we,i??!1),[i]),K=F(f??0),P=`${S}%`,h=`${w}%`,J=F(T),V=F(I),he=F(j),k=Gi("title1",Vi(n,"title1"),i),ce=Gi("title2",Vi(n,"title2"),i),L=Gi("title3",Vi(n,"title3"),i),me=Gi("count",Vi(n,"count"),i),te=W==="mobile",ve=!i||!!r,Le=!o&&(!i||!!r),de=s.useMemo(()=>pa(t,y),[t,y]),[ue,Z]=s.useState(l),le=de[ue],oe=le==null?void 0:le.entry,[ge,Se]=s.useState(!1),[Ee,Ne]=s.useState(null),[Te,Ce]=s.useState(!1),[g,Y]=s.useState(null),[ee,ae]=s.useState(!1),[ye,ne]=s.useState(0),[B,G]=s.useState(),[z,ie]=s.useState(),[H,be]=s.useState(null),re=s.useRef(null),Q=s.useRef(0),Pe=s.useRef(0),Ae=s.useRef(0),He=s.useRef(!1),Xe=s.useRef(null),Ue=s.useRef(null),Je=s.useRef(null),je=s.useRef(null),xe=s.useRef(null),Ie=s.useRef(null),ze=s.useRef(null),Ze=s.useCallback(()=>{const we=Ue.current;if(!we)return;const Ye=we.closest(`.${e}-lightbox-content-area`);if(!Ye)return we.getBoundingClientRect().width;const A=Array.from(Ye.children).reduce((se,fe)=>!(fe instanceof HTMLElement)||fe.contains(we)?se:se+fe.getBoundingClientRect().width,0);return Ye.getBoundingClientRect().width-A},[e]),tt=s.useCallback(()=>{re.current&&(clearTimeout(re.current),re.current=null)},[]),ot=s.useCallback(we=>{we===Q.current&&(Y(null),ae(!1))},[]),lt=s.useCallback(()=>{o||He.current||(He.current=!0,u==null||u(),Se(!1),Xe.current=setTimeout(()=>{p()},300))},[o,u,p]),it=s.useCallback(we=>!!(we.closest("[data-controls]")||we.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:xt,backdropStyle:rt,mediaAreaStyle:_e,overlayContentStyle:We,swipeHandlers:vt,dismissAreaStyle:Ve}=bp({enabled:Le,onClose:lt,animMs:300,isBlockedTarget:it}),Ke=s.useCallback(we=>{c&&np(we+1,d,!0)},[c,d]),pe=s.useCallback(we=>{if(we)return we.getBoundingClientRect().height},[]),De=s.useCallback(we=>{if(de.length===0)return;const Ye=(we%de.length+de.length)%de.length;if(Ye===ue)return;const A=de[ue],se=de[Ye];Q.current+=1;const fe=Q.current,ke=N==="fade"&&Fc(A==null?void 0:A.entry)!==Fc(se==null?void 0:se.entry),Be=pe(Je.current),gt=ke?(()=>{const Kt=Ze();qn.flushSync(()=>{be(se.entry)}),Je.current&&Kt&&(Je.current.style.width=`${Kt}px`);const sn=pe(Je.current);return Je.current&&(Je.current.style.width=""),{measuredIncomingTitlesHeight:sn,incomingTitlesMeasureWidth:Kt}})():void 0,Wt=Math.max(Be??0,(gt==null?void 0:gt.measuredIncomingTitlesHeight)??0)||void 0;ne(fe),Y(ue),ae(!0),Z(Ye),Ke(Ye),Ae.current=Ye,ke?(tt(),Wt&&G(Wt),gt!=null&&gt.incomingTitlesMeasureWidth&&ie(gt.incomingTitlesMeasureWidth),Ne((A==null?void 0:A.entryIndex)??null),Ce(!0),Pe.current=se.entryIndex,re.current=setTimeout(()=>{Ne(null),Ce(!1),G(void 0),ie(void 0),be(null),re.current=null},400)):(tt(),Ne(null),Ce(!1),G(void 0),ie(void 0),be(null),Pe.current=se.entryIndex)},[ue,tt,Ze,pe,de,Ke,N]),qe=s.useCallback(()=>{ze.current=null},[]),bt=s.useCallback(we=>{!ve||de.length<=1||we.pointerType==="mouse"&&we.button!==0||we.target.closest("[data-controls]")||(ze.current={startX:we.clientX,startY:we.clientY,pointerId:we.pointerId})},[ve,de.length]),yt=s.useCallback(we=>{var Kt;if(!ve||de.length<=1||we.pointerType==="mouse"&&we.button!==0)return;if(xt){qe();return}const Ye=ze.current;if(!Ye||Ye.pointerId!==we.pointerId||(qe(),we.target.closest("[data-controls]")))return;const se=we.clientX-Ye.startX,fe=we.clientY-Ye.startY,ke=Math.abs(se),Be=Math.abs(fe);if(ke>=yv&&ke>Be){De(se>0?ue-1:ue+1);return}if(ke>Rc||Be>Rc)return;const gt=(Kt=je.current)==null?void 0:Kt.getBoundingClientRect(),Wt=gt?gt.left+gt.width/2:window.innerWidth/2;De(we.clientX<Wt?ue-1:ue+1)},[ue,ve,De,xt,qe,de.length]),Et=s.useCallback(we=>{const Ye=ze.current;(Ye==null?void 0:Ye.pointerId)===we.pointerId&&qe()},[qe]);jl(),s.useEffect(()=>{Ie.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const we=requestAnimationFrame(()=>{Se(!0),requestAnimationFrame(()=>{xe.current?xe.current.focus():je.current&&je.current.focus()})});return()=>{cancelAnimationFrame(we),Xe.current&&clearTimeout(Xe.current),re.current&&clearTimeout(re.current);const Ye=Ie.current;Ye&&document.contains(Ye)&&Ye.focus({preventScroll:!0})}},[]),s.useEffect(()=>{var we;N!=="fade"&&(Pe.current=((we=de[ue])==null?void 0:we.entryIndex)??0,tt(),Ne(null),Ce(!1),G(void 0),ie(void 0))},[ue,tt,de,N]),s.useEffect(()=>{const we=Ye=>{if(Ye.key==="Escape"){lt();return}if(Ye.key==="ArrowLeft"&&de.length>1){De(ue-1);return}if(Ye.key==="ArrowRight"&&de.length>1){De(ue+1);return}if(Ye.key==="Tab"&&je.current){const A=je.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),se=Array.from(A).filter(gt=>!gt.closest('[aria-hidden="true"]'));if(se.length===0)return;const fe=se[0],ke=se[se.length-1],Be=document.activeElement;Ye.shiftKey?(Be===fe||!je.current.contains(Be))&&(Ye.preventDefault(),ke.focus()):(Be===ke||!je.current.contains(Be))&&(Ye.preventDefault(),fe.focus())}};return window.addEventListener("keydown",we),()=>window.removeEventListener("keydown",we)},[De,lt,ue,de.length]),s.useLayoutEffect(()=>{tt(),Q.current=0,ne(0),Y(null),ae(!1),Ne(null),Ce(!1),G(void 0),ie(void 0),be(null),Z(we=>{const Ye=Math.max(0,de.length-1);return Math.min(we,Ye)})},[tt,t.length,y,de.length]),s.useLayoutEffect(()=>{var A;const we=Math.max(0,de.length-1),Ye=Math.min(Math.max(0,l),we);Ae.current=Ye,Pe.current=((A=de[Ye])==null?void 0:A.entryIndex)??0,Z(Ye)},[l]);const ct=Ee!==null?t[Ee]:null,wt=g!==null?de[g]:null,nt=(oe==null?void 0:oe.title1)||(oe==null?void 0:oe.title2)||(oe==null?void 0:oe.title3)||(ct==null?void 0:ct.title1)||(ct==null?void 0:ct.title2)||(ct==null?void 0:ct.title3),Nt=Tv(y,de,t),jt=C!==null,$e=nt||Nt||jt,Ge=Nt&&jt?{gap:J}:void 0,ht=`${e}-titles-stack${te?` ${e}-titles-stack-stacked`:""}`,Lt=`${e}-titles-layer-out${te?` ${e}-titles-layer-out-stacked`:""}`,$t=`${e}-titles-layer-out`,mt=(U??0)>0||o,_t=F(_),Ot=s.useMemo(()=>({title1Width:v??So.title1Width,title2Width:M??So.title2Width,title3Width:R??So.title3Width}),[v,M,R]),zt=s.useMemo(()=>({title2MarginLeft:X,title3MarginLeft:D}),[X,D]),Re=s.useMemo(()=>oe?Ti(e,oe,k,ce,L):[],[e,oe,k,ce,L]),dt=s.useMemo(()=>Re.map(we=>Ot[we.widthKey]),[Re,Ot]),ut=s.useMemo(()=>Mo(Re.length,dt),[Re.length,dt]),kt=s.useMemo(()=>vr(Re.length,dt),[Re.length,dt]),Qe=s.useMemo(()=>Re.filter(we=>we.prefix==="title1"),[Re]),at=s.useMemo(()=>Re.filter(we=>we.prefix==="title2"||we.prefix==="title3"),[Re]),It=s.useMemo(()=>Ii(Qe,Ot),[Qe,Ot]),At=s.useMemo(()=>Ii(at,Ot),[at,Ot]),pt=s.useCallback((we,Ye)=>{const A=Re.findIndex(fe=>fe.prefix===we.prefix);if(!te||Ye==="single-row")return{effectiveWidth:kt[A]??0,resolvedWidth:ut[A]??0,maxWidth:vn(A,ut)};if(Ye==="two-row-top"){const fe=Qe.findIndex(ke=>ke.prefix===we.prefix);return{effectiveWidth:It.effective[fe]??0,resolvedWidth:It.resolved[fe]??0,maxWidth:vn(fe,It.resolved)}}const se=at.findIndex(fe=>fe.prefix===we.prefix);return{effectiveWidth:At.effective[se]??0,resolvedWidth:At.resolved[se]??0,maxWidth:vn(se,At.resolved)}},[Re,at,At,kt,ut,Qe,It,te]),Ut=s.useCallback(we=>ap(Re,ut,zt,we)+(te?0:U??0),[Re,ut,zt,te,U]),qt=s.useCallback(()=>te?0:U??0,[te,U]),Dt=s.useCallback(we=>at.slice(0,we).reduce((Ye,A,se)=>Ye+(A.marginLeftKey?zt[A.marginLeftKey]??0:0)+(At.resolved[se]??0),0),[at,At.resolved,zt]),Vt=s.useCallback(we=>{const Ye=at[we];return Dt(we)+(Ye.marginLeftKey?zt[Ye.marginLeftKey]??0:0)+(At.resolved[we]??0)},[at,At.resolved,Dt,zt]),Gt=s.useCallback((we,Ye,A)=>{if(!te||A==="single-row"){const gt=we.findIndex(en=>en.prefix===Ye.prefix),Wt=we.map(en=>Ot[en.widthKey]),Kt=Mo(we.length,Wt);return{effectiveWidth:vr(we.length,Wt)[gt]??0,resolvedWidth:Kt[gt]??0,maxWidth:vn(gt,Kt)}}if(A==="two-row-top"){const gt=we.filter(en=>en.prefix==="title1"),Wt=gt.findIndex(en=>en.prefix===Ye.prefix),{resolved:Kt,effective:sn}=Ii(gt,Ot);return{effectiveWidth:sn[Wt]??0,resolvedWidth:Kt[Wt]??0,maxWidth:vn(Wt,Kt)}}const se=we.filter(gt=>gt.prefix==="title2"||gt.prefix==="title3"),fe=se.findIndex(gt=>gt.prefix===Ye.prefix),{resolved:ke,effective:Be}=Ii(se,Ot);return{effectiveWidth:Be[fe]??0,resolvedWidth:ke[fe]??0,maxWidth:vn(fe,ke)}},[Ot,te]),Bt=(we,Ye,A)=>{const se=we.marginLeftKey?zt[we.marginLeftKey]??0:0,{effectiveWidth:fe,resolvedWidth:ke,maxWidth:Be}=A??pt(we,Ye),gt=Math.max(se,ii),Wt=o&&Ye==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":we.prefix,style:{width:F(fe),...se>0?{marginLeft:F(se)}:{}},children:[a.jsx("p",{className:we.className,style:we.style,children:we.text}),Wt&&we.marginLeftKey?a.jsx("div",{"data-controls":we.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ke),style:{position:"absolute",top:0,left:F(-se),width:F(gt),height:"100%",pointerEvents:"auto"}}):null,Wt?a.jsx("div",{"data-controls":we.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Be),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:F(-Pn/2),width:F(Pn),height:"100%",pointerEvents:"auto"}}):null]},we.className)},Yt=(we="two-row")=>{const Ye=Re.findIndex(fe=>fe.prefix==="title1"),A=Ye>=0?ut[Ye]:Ot.title1Width,se=we==="two-row"&&o;return a.jsx("div",{...se?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(A)}:{},style:{width:F(U??0),flexShrink:0,alignSelf:"stretch",...se?{pointerEvents:"auto"}:{}}})},O=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:k,"aria-hidden":"true",children:" "}),Me=()=>a.jsx("span",{className:`${e}-entry-counter`,style:me,"aria-live":"polite","aria-atomic":"true",children:Cv(de,ue,y,t)}),Fe=()=>Nt?o&&jt?a.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Me(),a.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${as(J)} + ${J}))`,width:as(J),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Me():null,Oe=()=>!Nt&&!jt?null:a.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Ge,children:[Fe(),jt?et():null]}),ft=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Nt||nt?O():null,mt?Yt("single-row"):null,Ct(oe),a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),Oe(),Sn()]}),Tt=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Nt||nt?O():null,mt?Yt("single-row"):null,a.jsxs("div",{className:`${e}-titles-row-titles`,style:Te&&B?{minHeight:B}:void 0,children:[a.jsx("div",{ref:Je,className:ht,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:bn(H||oe)}),a.jsxs("div",{ref:Ue,className:ht,style:{position:Te?"absolute":"relative",inset:Te?0:void 0,width:"100%",...Te&&z?{width:z,maxWidth:"100%"}:void 0},children:[ct&&Te?a.jsx("div",{className:`${Lt} ${e}-titles-fade-out`,children:bn(ct)}):null,a.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:bn(oe)})]})]}),Oe(),Sn()]}),et=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:b.scalingValue(q??0,i),height:b.scalingValue(q??0,i),marginRight:he,"--close-icon-hover-color":$},children:[a.jsx("button",{ref:xe,type:"button",className:`${e}-close-icon-inner`,onClick:lt,"aria-label":"Close",children:a.jsx(mn,{url:C??"",fill:E,hoverFill:i&&!r?E:$,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:he,height:"100%",pointerEvents:"auto"}})]}),Mt=(we,Ye)=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[Nt||nt?O():null,mt?Yt("two-row"):null,Ye!==void 0?a.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:Ye},children:we}):a.jsxs(a.Fragment,{children:[we,a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),Oe()]}),Ct=we=>{if(!we)return null;const Ye=Ti(e,we,k,ce,L);return a.jsx(a.Fragment,{children:Ye.map(A=>Bt(A,"single-row",Gt(Ye,A,"single-row")))})},Ht=we=>{if(!we)return null;const Ye=Ti(e,we,k,ce,L),A=Ye.find(se=>se.prefix==="title1");return A?Bt(A,"two-row-top",Gt(Ye,A,"two-row-top")):null},on=(we,Ye=!1)=>{const A=we?Ti(e,we,k,ce,L):[],se=A.filter(Be=>Be.prefix==="title2"||Be.prefix==="title3"),fe=o&&Ye;return se.length>0||fe||(_??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[se.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[se.map(Be=>Bt(Be,"two-row-bottom",Gt(A,Be,"two-row-bottom"))),Ye&&o?a.jsxs(a.Fragment,{children:[pi(),Yn()]}):null]}):null,(_??0)>0||fe?a.jsx("div",{"data-controls":fe?"titleRowMarginBottom":void 0,"data-controls-axis":fe?"y":void 0,"data-controls-reverse":fe?"":void 0,className:fe?`${e}-control`:void 0,style:{height:_t,width:"100%",flexShrink:0,pointerEvents:fe?"auto":"none"}}):null]}):null},fn=(we,Ye=!1)=>a.jsxs(a.Fragment,{children:[Mt(Ht(we)),on(we,Ye)]}),bn=we=>te?a.jsx("div",{className:`${e}-titles-row-two-row`,children:fn(we)}):we?a.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Ct(we)}):null,ui=()=>{const we=te?-1:Re.findIndex(se=>se.prefix==="title1"),Ye=!te&&(o||(U??0)>0)?(()=>{const se=U??0,fe=we>=0?ut[we]:Ot.title1Width,ke=Math.max(se,ii);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(fe),style:{position:"absolute",top:0,left:0,width:F(ke),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,A=Re.flatMap((se,fe)=>{if(!se.marginLeftKey)return[];const ke=zt[se.marginLeftKey]??0,Be=rp(Re,ut,zt,fe)+qt(),gt=Math.max(ke,ii);return a.jsx("div",{"data-controls":se.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ut[fe]),style:{position:"absolute",top:0,left:F(Be),width:F(gt),height:"100%",pointerEvents:"auto"}},se.marginLeftKey)});return Ye?[Ye,...A]:A},dn=()=>Re.map((we,Ye)=>{const A=vn(Ye,ut),fe=Ut(Ye)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":we.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(A),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:F(fe),width:F(Pn),height:"100%",pointerEvents:"auto"}})},`${we.widthKey}-junction`)}),pi=()=>at.flatMap((we,Ye)=>{if(!we.marginLeftKey)return[];const A=zt[we.marginLeftKey]??0,se=Dt(Ye),fe=Math.max(A,ii),{resolvedWidth:ke}=pt(we,"two-row-bottom");return a.jsx("div",{"data-controls":we.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ke),style:{position:"absolute",top:0,left:F(se),width:F(fe),height:"100%",pointerEvents:"auto"}},we.marginLeftKey)}),Yn=()=>at.map((we,Ye)=>{const{maxWidth:A}=pt(we,"two-row-bottom"),fe=Vt(Ye)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":we.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(A),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:F(fe),width:F(Pn),height:"100%",pointerEvents:"auto"}})},`${we.widthKey}-junction`)}),Sn=()=>!o||te?null:a.jsxs(a.Fragment,{children:[ui(),dn()]}),mi=we=>{const Ye=!we.objectFit&&li(x);return{className:`${e}-slide-image-cell${Ye?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:P,maxHeight:h,...Ye?{"--image-aspect-ratio":ja(x)}:{}}}},eo=we=>we.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":we.objectFit}}:li(x)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},wn=we=>{if(we.length===0)return null;const Ye=we.length>1,A=as(K),se=`calc(-0.5 * (${A} + ${K}))`;if(we.length===1){const fe=we[0];return a.jsx("div",{...mi(fe),children:a.jsx("img",{...eo(fe),src:fe.assetId,alt:fe.name??"",draggable:!1})})}return a.jsx("div",{className:`${e}-slide-inner`,style:Ye?{gap:K}:void 0,children:we.map((fe,ke)=>a.jsxs("div",{...mi(fe),children:[a.jsx("img",{...eo(fe),src:fe.assetId,alt:fe.name??"",draggable:!1}),o&&Ye&&ke<we.length-1&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:se,width:A,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${fe.assetId}-${ke}`))})},Qn=!!(oe!=null&&oe.title2||oe!=null&&oe.title3||ct!=null&&ct.title2||ct!=null&&ct.title3||(_??0)>0||o),to=()=>a.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[a.jsx("div",{ref:Je,className:ht,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:fn(H||oe)}),a.jsxs("div",{ref:Ue,className:`${e}-titles-row-two-row`,style:{...Te&&B?{minHeight:B}:void 0,...Te&&z?{width:z,maxWidth:"100%"}:void 0},children:[Mt(a.jsxs("div",{className:ht,style:{position:Te?"absolute":"relative",inset:Te?0:void 0,width:"100%"},children:[ct&&Te?a.jsx("div",{className:`${$t} ${e}-titles-fade-out`,children:Ht(ct)}):null,a.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Ht(oe)})]}),Te&&B?B:void 0),Qn?a.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[ct&&Te?a.jsx("div",{className:`${Lt} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:on(ct)}):null,a.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${te?` ${e}-titles-layer-in-stacked`:""}`,children:on(oe,!0)})]}):null]})]}),no=()=>{const we=Qn;return a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...we?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:we?void 0:{flex:"0 0 auto",height:"auto"},children:fn(oe,!0)}),Sn()]})};return a.jsxs("div",{ref:je,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{xt||lt()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:jt?void 0:-1,style:{opacity:ge?1:0,transition:"opacity 300ms ease",pointerEvents:ge?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:m,...rt}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:Ve,...vt,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:_e,onClick:we=>we.stopPropagation(),children:a.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":ve&&de.length>1?"true":"false",onPointerDown:ve?bt:void 0,onPointerUp:ve?yt:void 0,onPointerCancel:ve?Et:void 0,children:a.jsxs("div",{className:`${e}-slide-stack`,children:[wt&&ee?a.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:we=>{we.target===we.currentTarget&&ot(ye)},children:a.jsx("div",{className:`${e}-slide-area`,children:wn(wt.images)})},`slide-out-${ye}`):null,a.jsx("div",{className:`${e}-slide-layer-in${ee?` ${e}-slide-fade-in`:""}`,children:a.jsx("div",{className:`${e}-slide-area`,children:le?wn(le.images):null})},`slide-in-${ye}-${ue}`)]})})}),a.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:We,children:[a.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:V,width:"100%"}}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...te?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${te?` ${e}-lightbox-content-area-stacked`:""}`,children:$e&&a.jsx("div",{className:`${e}-text-bar-cell${te?` ${e}-text-bar-cell-stacked`:""}`,style:te?void 0:{flex:1,minWidth:0,width:"100%"},children:te?N==="fade"?to():no():N==="fade"?Tt():ft()})})})]})]})]})};function lb(e){return`
15661
+ `,tb="01M3SBP3P8CMVMM1ZZ0QVD2PPF",Di={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 nb(e){const t={};return t[Jt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Jt(e,"fontSettings")]={...Di.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Jt(e,"fontSize")]={...Di.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Jt(e,"lineHeight")]={...Di.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Jt(e,"letterSpacing")]={...Di.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Jt(e,"wordSpacing")]={...Di.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Jt(e,"textAlign")]={...Di.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Jt(e,"textAppearance")]={...Di.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const ib=Fo.reduce((e,t)=>({...e,...nb(t)}),{}),ob=Fo.reduce((e,t)=>({...e,[Jt(t,"fontFamily")]:"Goudy Bookletter 1911",[Jt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Jt(t,"letterSpacing")]:0,[Jt(t,"wordSpacing")]:0,[Jt(t,"textAlign")]:"left",[Jt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ys(e){return Fo.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Jt(n,"fontSize")]=i),o!==void 0&&(t[Jt(n,"lineHeight")]=o),t},{})}const rb=qx(),ab={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"}},...ib,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:"01M3QM74XESYN1HRYH9VRTZ5CK",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:tb,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...ob},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,...ys({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,...ys({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,...ys({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:[rb]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{allowsCollection:!0,addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",contentKey:"gallery",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"}},title1:{type:"string",label:"Title",contentKey:"title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",contentKey:"subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}}}},default:[{image:{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"}]}},sb={element:Jx,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:ab,sourceCode:eb,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0},{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[...Fo.map(e=>({path:`${Jt(e,"fontFamily")}`}))]},fontRelations:{...Fo.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Jt(t,"fontFamily")}`}),{})}},lb=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,initialSlideIndex:l=0,enableUrlSync:c=!1,journalItemId:d=null,onBeforeClose:u,onClose:p})=>{const{type:y,coverFit:x,backgroundColor:m,imageGap:f,maxWidth:S,maxHeight:w,textTransition:N,title1Width:v,title2Width:M,title3Width:E,title1MarginLeft:U=0,title2MarginLeft:X=0,title3MarginLeft:D=0,titleRowMarginBottom:_=0,titleHeaderLayout:W="single-row",countCloseGap:T=0,closeIcon:C,closeIconMaxWidth:q,closeIconColor:R,closeIconHoverColor:$,contentMarginTop:I=0,iconMarginRight:j=0}=n,F=s.useCallback(we=>b.scalingValue(we,i??!1),[i]),K=F(f??0),P=`${S}%`,h=`${w}%`,J=F(T),V=F(I),he=F(j),k=Gi("title1",Vi(n,"title1"),i),ce=Gi("title2",Vi(n,"title2"),i),L=Gi("title3",Vi(n,"title3"),i),me=Gi("count",Vi(n,"count"),i),te=W==="mobile",ve=!i||!!r,Le=!o&&(!i||!!r),de=s.useMemo(()=>ma(t,y),[t,y]),[ue,Z]=s.useState(l),le=de[ue],oe=le==null?void 0:le.entry,[ge,Se]=s.useState(!1),[Re,Ne]=s.useState(null),[Te,Ce]=s.useState(!1),[g,Y]=s.useState(null),[ee,ae]=s.useState(!1),[ye,ne]=s.useState(0),[B,G]=s.useState(),[z,ie]=s.useState(),[H,be]=s.useState(null),re=s.useRef(null),Q=s.useRef(0),Pe=s.useRef(0),Ae=s.useRef(0),He=s.useRef(!1),Xe=s.useRef(null),Ue=s.useRef(null),Je=s.useRef(null),je=s.useRef(null),xe=s.useRef(null),Ie=s.useRef(null),ze=s.useRef(null),Ze=s.useCallback(()=>{const we=Ue.current;if(!we)return;const Ye=we.closest(`.${e}-lightbox-content-area`);if(!Ye)return we.getBoundingClientRect().width;const A=Array.from(Ye.children).reduce((se,fe)=>!(fe instanceof HTMLElement)||fe.contains(we)?se:se+fe.getBoundingClientRect().width,0);return Ye.getBoundingClientRect().width-A},[e]),tt=s.useCallback(()=>{re.current&&(clearTimeout(re.current),re.current=null)},[]),ot=s.useCallback(we=>{we===Q.current&&(Y(null),ae(!1))},[]),lt=s.useCallback(()=>{o||He.current||(He.current=!0,u==null||u(),Se(!1),Xe.current=setTimeout(()=>{p()},300))},[o,u,p]),it=s.useCallback(we=>!!(we.closest("[data-controls]")||we.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:xt,backdropStyle:rt,mediaAreaStyle:_e,overlayContentStyle:We,swipeHandlers:vt,dismissAreaStyle:Ve}=Sp({enabled:Le,onClose:lt,animMs:300,isBlockedTarget:it}),Ke=s.useCallback(we=>{c&&ip(we+1,d,!0)},[c,d]),pe=s.useCallback(we=>{if(we)return we.getBoundingClientRect().height},[]),De=s.useCallback(we=>{if(de.length===0)return;const Ye=(we%de.length+de.length)%de.length;if(Ye===ue)return;const A=de[ue],se=de[Ye];Q.current+=1;const fe=Q.current,ke=N==="fade"&&Nc(A==null?void 0:A.entry)!==Nc(se==null?void 0:se.entry),Be=pe(Je.current),gt=ke?(()=>{const Kt=Ze();qn.flushSync(()=>{be(se.entry)}),Je.current&&Kt&&(Je.current.style.width=`${Kt}px`);const sn=pe(Je.current);return Je.current&&(Je.current.style.width=""),{measuredIncomingTitlesHeight:sn,incomingTitlesMeasureWidth:Kt}})():void 0,Wt=Math.max(Be??0,(gt==null?void 0:gt.measuredIncomingTitlesHeight)??0)||void 0;ne(fe),Y(ue),ae(!0),Z(Ye),Ke(Ye),Ae.current=Ye,ke?(tt(),Wt&&G(Wt),gt!=null&&gt.incomingTitlesMeasureWidth&&ie(gt.incomingTitlesMeasureWidth),Ne((A==null?void 0:A.entryIndex)??null),Ce(!0),Pe.current=se.entryIndex,re.current=setTimeout(()=>{Ne(null),Ce(!1),G(void 0),ie(void 0),be(null),re.current=null},400)):(tt(),Ne(null),Ce(!1),G(void 0),ie(void 0),be(null),Pe.current=se.entryIndex)},[ue,tt,Ze,pe,de,Ke,N]),qe=s.useCallback(()=>{ze.current=null},[]),bt=s.useCallback(we=>{!ve||de.length<=1||we.pointerType==="mouse"&&we.button!==0||we.target.closest("[data-controls]")||(ze.current={startX:we.clientX,startY:we.clientY,pointerId:we.pointerId})},[ve,de.length]),yt=s.useCallback(we=>{var Kt;if(!ve||de.length<=1||we.pointerType==="mouse"&&we.button!==0)return;if(xt){qe();return}const Ye=ze.current;if(!Ye||Ye.pointerId!==we.pointerId||(qe(),we.target.closest("[data-controls]")))return;const se=we.clientX-Ye.startX,fe=we.clientY-Ye.startY,ke=Math.abs(se),Be=Math.abs(fe);if(ke>=vv&&ke>Be){De(se>0?ue-1:ue+1);return}if(ke>Rc||Be>Rc)return;const gt=(Kt=je.current)==null?void 0:Kt.getBoundingClientRect(),Wt=gt?gt.left+gt.width/2:window.innerWidth/2;De(we.clientX<Wt?ue-1:ue+1)},[ue,ve,De,xt,qe,de.length]),Rt=s.useCallback(we=>{const Ye=ze.current;(Ye==null?void 0:Ye.pointerId)===we.pointerId&&qe()},[qe]);Vl(),s.useEffect(()=>{Ie.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const we=requestAnimationFrame(()=>{Se(!0),requestAnimationFrame(()=>{xe.current?xe.current.focus():je.current&&je.current.focus()})});return()=>{cancelAnimationFrame(we),Xe.current&&clearTimeout(Xe.current),re.current&&clearTimeout(re.current);const Ye=Ie.current;Ye&&document.contains(Ye)&&Ye.focus({preventScroll:!0})}},[]),s.useEffect(()=>{var we;N!=="fade"&&(Pe.current=((we=de[ue])==null?void 0:we.entryIndex)??0,tt(),Ne(null),Ce(!1),G(void 0),ie(void 0))},[ue,tt,de,N]),s.useEffect(()=>{const we=Ye=>{if(Ye.key==="Escape"){lt();return}if(Ye.key==="ArrowLeft"&&de.length>1){De(ue-1);return}if(Ye.key==="ArrowRight"&&de.length>1){De(ue+1);return}if(Ye.key==="Tab"&&je.current){const A=je.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),se=Array.from(A).filter(gt=>!gt.closest('[aria-hidden="true"]'));if(se.length===0)return;const fe=se[0],ke=se[se.length-1],Be=document.activeElement;Ye.shiftKey?(Be===fe||!je.current.contains(Be))&&(Ye.preventDefault(),ke.focus()):(Be===ke||!je.current.contains(Be))&&(Ye.preventDefault(),fe.focus())}};return window.addEventListener("keydown",we),()=>window.removeEventListener("keydown",we)},[De,lt,ue,de.length]),s.useLayoutEffect(()=>{tt(),Q.current=0,ne(0),Y(null),ae(!1),Ne(null),Ce(!1),G(void 0),ie(void 0),be(null),Z(we=>{const Ye=Math.max(0,de.length-1);return Math.min(we,Ye)})},[tt,t.length,y,de.length]),s.useLayoutEffect(()=>{var A;const we=Math.max(0,de.length-1),Ye=Math.min(Math.max(0,l),we);Ae.current=Ye,Pe.current=((A=de[Ye])==null?void 0:A.entryIndex)??0,Z(Ye)},[l]);const ct=Re!==null?t[Re]:null,wt=g!==null?de[g]:null,nt=(oe==null?void 0:oe.title1)||(oe==null?void 0:oe.title2)||(oe==null?void 0:oe.title3)||(ct==null?void 0:ct.title1)||(ct==null?void 0:ct.title2)||(ct==null?void 0:ct.title3),Nt=Iv(y,de,t),jt=C!==null,$e=nt||Nt||jt,Ge=Nt&&jt?{gap:J}:void 0,ht=`${e}-titles-stack${te?` ${e}-titles-stack-stacked`:""}`,Lt=`${e}-titles-layer-out${te?` ${e}-titles-layer-out-stacked`:""}`,$t=`${e}-titles-layer-out`,mt=(U??0)>0||o,_t=F(_),Ot=s.useMemo(()=>({title1Width:v??So.title1Width,title2Width:M??So.title2Width,title3Width:E??So.title3Width}),[v,M,E]),zt=s.useMemo(()=>({title2MarginLeft:X,title3MarginLeft:D}),[X,D]),Ee=s.useMemo(()=>oe?Ti(e,oe,k,ce,L):[],[e,oe,k,ce,L]),dt=s.useMemo(()=>Ee.map(we=>Ot[we.widthKey]),[Ee,Ot]),ut=s.useMemo(()=>Mo(Ee.length,dt),[Ee.length,dt]),kt=s.useMemo(()=>vr(Ee.length,dt),[Ee.length,dt]),Qe=s.useMemo(()=>Ee.filter(we=>we.prefix==="title1"),[Ee]),at=s.useMemo(()=>Ee.filter(we=>we.prefix==="title2"||we.prefix==="title3"),[Ee]),It=s.useMemo(()=>Ii(Qe,Ot),[Qe,Ot]),At=s.useMemo(()=>Ii(at,Ot),[at,Ot]),pt=s.useCallback((we,Ye)=>{const A=Ee.findIndex(fe=>fe.prefix===we.prefix);if(!te||Ye==="single-row")return{effectiveWidth:kt[A]??0,resolvedWidth:ut[A]??0,maxWidth:vn(A,ut)};if(Ye==="two-row-top"){const fe=Qe.findIndex(ke=>ke.prefix===we.prefix);return{effectiveWidth:It.effective[fe]??0,resolvedWidth:It.resolved[fe]??0,maxWidth:vn(fe,It.resolved)}}const se=at.findIndex(fe=>fe.prefix===we.prefix);return{effectiveWidth:At.effective[se]??0,resolvedWidth:At.resolved[se]??0,maxWidth:vn(se,At.resolved)}},[Ee,at,At,kt,ut,Qe,It,te]),Ut=s.useCallback(we=>sp(Ee,ut,zt,we)+(te?0:U??0),[Ee,ut,zt,te,U]),qt=s.useCallback(()=>te?0:U??0,[te,U]),Dt=s.useCallback(we=>at.slice(0,we).reduce((Ye,A,se)=>Ye+(A.marginLeftKey?zt[A.marginLeftKey]??0:0)+(At.resolved[se]??0),0),[at,At.resolved,zt]),Vt=s.useCallback(we=>{const Ye=at[we];return Dt(we)+(Ye.marginLeftKey?zt[Ye.marginLeftKey]??0:0)+(At.resolved[we]??0)},[at,At.resolved,Dt,zt]),Gt=s.useCallback((we,Ye,A)=>{if(!te||A==="single-row"){const gt=we.findIndex(en=>en.prefix===Ye.prefix),Wt=we.map(en=>Ot[en.widthKey]),Kt=Mo(we.length,Wt);return{effectiveWidth:vr(we.length,Wt)[gt]??0,resolvedWidth:Kt[gt]??0,maxWidth:vn(gt,Kt)}}if(A==="two-row-top"){const gt=we.filter(en=>en.prefix==="title1"),Wt=gt.findIndex(en=>en.prefix===Ye.prefix),{resolved:Kt,effective:sn}=Ii(gt,Ot);return{effectiveWidth:sn[Wt]??0,resolvedWidth:Kt[Wt]??0,maxWidth:vn(Wt,Kt)}}const se=we.filter(gt=>gt.prefix==="title2"||gt.prefix==="title3"),fe=se.findIndex(gt=>gt.prefix===Ye.prefix),{resolved:ke,effective:Be}=Ii(se,Ot);return{effectiveWidth:Be[fe]??0,resolvedWidth:ke[fe]??0,maxWidth:vn(fe,ke)}},[Ot,te]),Bt=(we,Ye,A)=>{const se=we.marginLeftKey?zt[we.marginLeftKey]??0:0,{effectiveWidth:fe,resolvedWidth:ke,maxWidth:Be}=A??pt(we,Ye),gt=Math.max(se,ii),Wt=o&&Ye==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":we.prefix,style:{width:F(fe),...se>0?{marginLeft:F(se)}:{}},children:[a.jsx("p",{className:we.className,style:we.style,children:we.text}),Wt&&we.marginLeftKey?a.jsx("div",{"data-controls":we.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ke),style:{position:"absolute",top:0,left:F(-se),width:F(gt),height:"100%",pointerEvents:"auto"}}):null,Wt?a.jsx("div",{"data-controls":we.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Be),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:F(-Pn/2),width:F(Pn),height:"100%",pointerEvents:"auto"}}):null]},we.className)},Yt=(we="two-row")=>{const Ye=Ee.findIndex(fe=>fe.prefix==="title1"),A=Ye>=0?ut[Ye]:Ot.title1Width,se=we==="two-row"&&o;return a.jsx("div",{...se?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(A)}:{},style:{width:F(U??0),flexShrink:0,alignSelf:"stretch",...se?{pointerEvents:"auto"}:{}}})},O=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:k,"aria-hidden":"true",children:" "}),Me=()=>a.jsx("span",{className:`${e}-entry-counter`,style:me,"aria-live":"polite","aria-atomic":"true",children:Tv(de,ue,y,t)}),Fe=()=>Nt?o&&jt?a.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Me(),a.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${ss(J)} + ${J}))`,width:ss(J),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Me():null,Oe=()=>!Nt&&!jt?null:a.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Ge,children:[Fe(),jt?et():null]}),ft=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Nt||nt?O():null,mt?Yt("single-row"):null,Ct(oe),a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),Oe(),Sn()]}),Tt=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Nt||nt?O():null,mt?Yt("single-row"):null,a.jsxs("div",{className:`${e}-titles-row-titles`,style:Te&&B?{minHeight:B}:void 0,children:[a.jsx("div",{ref:Je,className:ht,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:bn(H||oe)}),a.jsxs("div",{ref:Ue,className:ht,style:{position:Te?"absolute":"relative",inset:Te?0:void 0,width:"100%",...Te&&z?{width:z,maxWidth:"100%"}:void 0},children:[ct&&Te?a.jsx("div",{className:`${Lt} ${e}-titles-fade-out`,children:bn(ct)}):null,a.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:bn(oe)})]})]}),Oe(),Sn()]}),et=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:b.scalingValue(q??0,i),height:b.scalingValue(q??0,i),marginRight:he,"--close-icon-hover-color":$},children:[a.jsx("button",{ref:xe,type:"button",className:`${e}-close-icon-inner`,onClick:lt,"aria-label":"Close",children:a.jsx(mn,{url:C??"",fill:R,hoverFill:i&&!r?R:$,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:he,height:"100%",pointerEvents:"auto"}})]}),Mt=(we,Ye)=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[Nt||nt?O():null,mt?Yt("two-row"):null,Ye!==void 0?a.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:Ye},children:we}):a.jsxs(a.Fragment,{children:[we,a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),Oe()]}),Ct=we=>{if(!we)return null;const Ye=Ti(e,we,k,ce,L);return a.jsx(a.Fragment,{children:Ye.map(A=>Bt(A,"single-row",Gt(Ye,A,"single-row")))})},Ht=we=>{if(!we)return null;const Ye=Ti(e,we,k,ce,L),A=Ye.find(se=>se.prefix==="title1");return A?Bt(A,"two-row-top",Gt(Ye,A,"two-row-top")):null},on=(we,Ye=!1)=>{const A=we?Ti(e,we,k,ce,L):[],se=A.filter(Be=>Be.prefix==="title2"||Be.prefix==="title3"),fe=o&&Ye;return se.length>0||fe||(_??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[se.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[se.map(Be=>Bt(Be,"two-row-bottom",Gt(A,Be,"two-row-bottom"))),Ye&&o?a.jsxs(a.Fragment,{children:[pi(),Yn()]}):null]}):null,(_??0)>0||fe?a.jsx("div",{"data-controls":fe?"titleRowMarginBottom":void 0,"data-controls-axis":fe?"y":void 0,"data-controls-reverse":fe?"":void 0,className:fe?`${e}-control`:void 0,style:{height:_t,width:"100%",flexShrink:0,pointerEvents:fe?"auto":"none"}}):null]}):null},fn=(we,Ye=!1)=>a.jsxs(a.Fragment,{children:[Mt(Ht(we)),on(we,Ye)]}),bn=we=>te?a.jsx("div",{className:`${e}-titles-row-two-row`,children:fn(we)}):we?a.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Ct(we)}):null,ui=()=>{const we=te?-1:Ee.findIndex(se=>se.prefix==="title1"),Ye=!te&&(o||(U??0)>0)?(()=>{const se=U??0,fe=we>=0?ut[we]:Ot.title1Width,ke=Math.max(se,ii);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(fe),style:{position:"absolute",top:0,left:0,width:F(ke),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,A=Ee.flatMap((se,fe)=>{if(!se.marginLeftKey)return[];const ke=zt[se.marginLeftKey]??0,Be=ap(Ee,ut,zt,fe)+qt(),gt=Math.max(ke,ii);return a.jsx("div",{"data-controls":se.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ut[fe]),style:{position:"absolute",top:0,left:F(Be),width:F(gt),height:"100%",pointerEvents:"auto"}},se.marginLeftKey)});return Ye?[Ye,...A]:A},dn=()=>Ee.map((we,Ye)=>{const A=vn(Ye,ut),fe=Ut(Ye)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":we.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(A),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:F(fe),width:F(Pn),height:"100%",pointerEvents:"auto"}})},`${we.widthKey}-junction`)}),pi=()=>at.flatMap((we,Ye)=>{if(!we.marginLeftKey)return[];const A=zt[we.marginLeftKey]??0,se=Dt(Ye),fe=Math.max(A,ii),{resolvedWidth:ke}=pt(we,"two-row-bottom");return a.jsx("div",{"data-controls":we.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ke),style:{position:"absolute",top:0,left:F(se),width:F(fe),height:"100%",pointerEvents:"auto"}},we.marginLeftKey)}),Yn=()=>at.map((we,Ye)=>{const{maxWidth:A}=pt(we,"two-row-bottom"),fe=Vt(Ye)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":we.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(A),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:F(fe),width:F(Pn),height:"100%",pointerEvents:"auto"}})},`${we.widthKey}-junction`)}),Sn=()=>!o||te?null:a.jsxs(a.Fragment,{children:[ui(),dn()]}),mi=we=>{const Ye=!we.objectFit&&li(x);return{className:`${e}-slide-image-cell${Ye?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:P,maxHeight:h,...Ye?{"--image-aspect-ratio":Va(x)}:{}}}},eo=we=>we.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":we.objectFit}}:li(x)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},wn=we=>{if(we.length===0)return null;const Ye=we.length>1,A=ss(K),se=`calc(-0.5 * (${A} + ${K}))`;if(we.length===1){const fe=we[0];return a.jsx("div",{...mi(fe),children:a.jsx("img",{...eo(fe),src:fe.assetId,alt:fe.name??"",draggable:!1})})}return a.jsx("div",{className:`${e}-slide-inner`,style:Ye?{gap:K}:void 0,children:we.map((fe,ke)=>a.jsxs("div",{...mi(fe),children:[a.jsx("img",{...eo(fe),src:fe.assetId,alt:fe.name??"",draggable:!1}),o&&Ye&&ke<we.length-1&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:se,width:A,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${fe.assetId}-${ke}`))})},Qn=!!(oe!=null&&oe.title2||oe!=null&&oe.title3||ct!=null&&ct.title2||ct!=null&&ct.title3||(_??0)>0||o),to=()=>a.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[a.jsx("div",{ref:Je,className:ht,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:fn(H||oe)}),a.jsxs("div",{ref:Ue,className:`${e}-titles-row-two-row`,style:{...Te&&B?{minHeight:B}:void 0,...Te&&z?{width:z,maxWidth:"100%"}:void 0},children:[Mt(a.jsxs("div",{className:ht,style:{position:Te?"absolute":"relative",inset:Te?0:void 0,width:"100%"},children:[ct&&Te?a.jsx("div",{className:`${$t} ${e}-titles-fade-out`,children:Ht(ct)}):null,a.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Ht(oe)})]}),Te&&B?B:void 0),Qn?a.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[ct&&Te?a.jsx("div",{className:`${Lt} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:on(ct)}):null,a.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${te?` ${e}-titles-layer-in-stacked`:""}`,children:on(oe,!0)})]}):null]})]}),no=()=>{const we=Qn;return a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...we?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:we?void 0:{flex:"0 0 auto",height:"auto"},children:fn(oe,!0)}),Sn()]})};return a.jsxs("div",{ref:je,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{xt||lt()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:jt?void 0:-1,style:{opacity:ge?1:0,transition:"opacity 300ms ease",pointerEvents:ge?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:m,...rt}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:Ve,...vt,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:_e,onClick:we=>we.stopPropagation(),children:a.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":ve&&de.length>1?"true":"false",onPointerDown:ve?bt:void 0,onPointerUp:ve?yt:void 0,onPointerCancel:ve?Rt:void 0,children:a.jsxs("div",{className:`${e}-slide-stack`,children:[wt&&ee?a.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:we=>{we.target===we.currentTarget&&ot(ye)},children:a.jsx("div",{className:`${e}-slide-area`,children:wn(wt.images)})},`slide-out-${ye}`):null,a.jsx("div",{className:`${e}-slide-layer-in${ee?` ${e}-slide-fade-in`:""}`,children:a.jsx("div",{className:`${e}-slide-area`,children:le?wn(le.images):null})},`slide-in-${ye}-${ue}`)]})})}),a.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:We,children:[a.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:V,width:"100%"}}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...te?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${te?` ${e}-lightbox-content-area-stacked`:""}`,children:$e&&a.jsx("div",{className:`${e}-text-bar-cell${te?` ${e}-text-bar-cell-stacked`:""}`,style:te?void 0:{flex:1,minWidth:0,width:"100%"},children:te?N==="fade"?to():no():N==="fade"?Tt():ft()})})})]})]})]})};function cb(e){return`
15662
15662
  .${e}-wrapper {
15663
15663
  position: relative;
15664
15664
  width: 100%;
@@ -16180,7 +16180,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
16180
16180
  pointer-events: auto;
16181
16181
  z-index: 10;
16182
16182
  }
16183
- `}const cb=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r,metadata:l})=>{const{prefix:c}=b.useScopedStyles(),d=(l==null?void 0:l.itemId)??null,{cover:u,coverFit:p,type:y}=e,x=s.useRef(null),[m,f]=s.useState(!1),[S,w]=s.useState(0),N=s.useRef(!1),v=s.useRef(!1),M=s.useRef(!1),R=s.useMemo(()=>(t??[]).filter(T=>Lo(T).length>0),[t]),U=m&&R.length>0,X=!n,D=s.useCallback(()=>{X&&(M.current=!0,xv(v.current,d),v.current=!1)},[X,d]),_=(T=0)=>{if(R.length===0||n&&!i&&!o)return;const C=pa(R,y),q=Math.max(0,Math.min(T,C.length-1));if(w(q),X){const E=ip();np(q+1,d,E),v.current=!E}f(!0)},W=s.useCallback(()=>{f(!1),M.current=!1},[]);return s.useEffect(()=>{!n||i||o||f(!1)},[n,i,o]),s.useEffect(()=>{if(!X||typeof window>"u")return;const T=window.history.scrollRestoration;return window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration=T}},[X]),s.useEffect(()=>{if(!X||N.current)return;N.current=!0;const T=kc(d);if(!T)return;const C=Ac(T,pa(R,y).length);C<0||(w(C),f(!0))},[R,d,X,y]),s.useEffect(()=>{if(!X)return;const T=()=>{if(M.current){M.current=!1,f(!1);return}const C=kc(d);if(!C){f(!1);return}const q=Ac(C,pa(R,y).length);if(q<0){f(!1);return}v.current=!1,w(q),f(!0)};return window.addEventListener("popstate",T),()=>window.removeEventListener("popstate",T)},[R,d,X,y]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:x,className:`${c}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:lb(c)}}),u?a.jsx("button",{type:"button",className:`${c}-cover ${li(p)?`${c}-ratio-wrapper-cover`:`${c}-ratio-wrapper-fit`}`,onClick:()=>_(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...li(p)?{"--image-aspect-ratio":ja(p)}:{}},"aria-label":"Open journal gallery",children:a.jsx("img",{className:`${c}-cover-image ${li(p)?`${c}-cover-image-cover`:`${c}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),U&&typeof document<"u"&&(()=>{const T=(r?document.getElementById(r):null)??document.body;return qn.createPortal(a.jsx(sb,{prefix:c,entries:R,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:S,enableUrlSync:X,journalItemId:d,onBeforeClose:D,onClose:W}),T)})()]})},db=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
16183
+ `}const db=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r,metadata:l})=>{const{prefix:c}=b.useScopedStyles(),d=(l==null?void 0:l.itemId)??null,{cover:u,coverFit:p,type:y}=e,x=s.useRef(null),[m,f]=s.useState(!1),[S,w]=s.useState(0),N=s.useRef(!1),v=s.useRef(!1),M=s.useRef(!1),E=s.useMemo(()=>(t??[]).filter(T=>Lo(T).length>0),[t]),U=m&&E.length>0,X=!n,D=s.useCallback(()=>{X&&(M.current=!0,bv(v.current,d),v.current=!1)},[X,d]),_=(T=0)=>{if(E.length===0||n&&!i&&!o)return;const C=ma(E,y),q=Math.max(0,Math.min(T,C.length-1));if(w(q),X){const R=op();ip(q+1,d,R),v.current=!R}f(!0)},W=s.useCallback(()=>{f(!1),M.current=!1},[]);return s.useEffect(()=>{!n||i||o||f(!1)},[n,i,o]),s.useEffect(()=>{if(!X||typeof window>"u")return;const T=window.history.scrollRestoration;return window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration=T}},[X]),s.useEffect(()=>{if(!X||N.current)return;N.current=!0;const T=Ac(d);if(!T)return;const C=Fc(T,ma(E,y).length);C<0||(w(C),f(!0))},[E,d,X,y]),s.useEffect(()=>{if(!X)return;const T=()=>{if(M.current){M.current=!1,f(!1);return}const C=Ac(d);if(!C){f(!1);return}const q=Fc(C,ma(E,y).length);if(q<0){f(!1);return}v.current=!1,w(q),f(!0)};return window.addEventListener("popstate",T),()=>window.removeEventListener("popstate",T)},[E,d,X,y]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:x,className:`${c}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:cb(c)}}),u?a.jsx("button",{type:"button",className:`${c}-cover ${li(p)?`${c}-ratio-wrapper-cover`:`${c}-ratio-wrapper-fit`}`,onClick:()=>_(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...li(p)?{"--image-aspect-ratio":Va(p)}:{}},"aria-label":"Open journal gallery",children:a.jsx("img",{className:`${c}-cover-image ${li(p)?`${c}-cover-image-cover`:`${c}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),U&&typeof document<"u"&&(()=>{const T=(r?document.getElementById(r):null)??document.body;return qn.createPortal(a.jsx(lb,{prefix:c,entries:E,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:S,enableUrlSync:X,journalItemId:d,onBeforeClose:D,onClose:W}),T)})()]})},ub=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
16184
16184
  import { createPortal } from 'react-dom';
16185
16185
  import { CommonComponentProps } from '../props';
16186
16186
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -16945,7 +16945,7 @@ export type LightboxJournalSettings = {
16945
16945
  closeIconColor: string;
16946
16946
  closeIconHoverColor: string;
16947
16947
  };
16948
- `,ub="01M3SBP3P8CMVMM1ZZ0QVD2PPF",zi={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 pb(e){const t={};return t[St(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[St(e,"fontSettings")]={...zi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[St(e,"fontSize")]={...zi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[St(e,"lineHeight")]={...zi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[St(e,"letterSpacing")]={...zi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[St(e,"wordSpacing")]={...zi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[St(e,"textAlign")]={...zi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[St(e,"textAppearance")]={...zi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const mb=Ri.reduce((e,t)=>({...e,...pb(t)}),{}),gb=Ri.reduce((e,t)=>({...e,[St(t,"fontFamily")]:"Goudy Bookletter 1911",[St(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[St(t,"letterSpacing")]:0,[St(t,"wordSpacing")]:0,[St(t,"textAlign")]:"left",[St(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ys(e){return Ri.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[St(n,"fontSize")]=i),o!==void 0&&(t[St(n,"lineHeight")]=o),t},{})}const hb=Iv(),fb={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"}},...mb,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:"01M3QM74XESYN1HRYH9VRTZ5CK",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:ub,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...gb,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,...ys({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,...ys({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,...ys({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:[hb]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","countColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{allowsCollection:!0,addItemWithoutImage:!0},items:{type:"object",properties:{title1:{type:"string",label:"Title",contentKey:"title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",contentKey:"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",contentKey:"gallery",max:2,display:{type:"media-list-input"},properties:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]}}},default:[{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"contain"},{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"contain"},{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"contain"}]}]}},yb={element:cb,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:fb,sourceCode:db,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0},{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[...Ri.map(e=>({path:`${St(e,"fontFamily")}`}))]},fontRelations:{...Ri.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${St(t,"fontFamily")}`}),{})}},vb={sizeType:"custom",value:700,min:400,max:700};function Ca(e,t){return{widthPx:e,heightPx:e*t}}function Us(e,t,n,i,o,r){return{x:Math.min(Math.max(e,o/2),n-o/2),y:Math.min(Math.max(t,r/2),i-r/2)}}function ad(e,t,n,i){const{heightPx:o}=Ca(n,i);return Us(e/2,t/2,e,t,n,o)}function wp(e,t,n){for(const i of n){const{heightPx:o}=Ca(i.widthPx,i.aspectRatio),r=i.widthPx/2,l=o/2;if(e>=i.x-r&&e<=i.x+r&&t>=i.y-l&&t<=i.y+l)return!0}return!1}function xb(e,t,n,i,o,r,l,c){if(o==="system")return"none";const d=i.getBoundingClientRect(),u=document.elementFromPoint(d.left+e,d.top+t);return u&&u.closest("a")?"none":wp(e,t,n)||r==="area"?l??"none":c??"none"}function sd(e,t,n){var c;const{sizeType:i,value:o,min:r,max:l}=t;return i==="custom"?o:i==="as is"?((c=n.get(e))==null?void 0:c.naturalWidth)??o:Math.round(Math.random()*(l-r)+r)}function bb(e){return`
16948
+ `,pb="01M3SBP3P8CMVMM1ZZ0QVD2PPF",zi={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 mb(e){const t={};return t[St(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[St(e,"fontSettings")]={...zi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[St(e,"fontSize")]={...zi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[St(e,"lineHeight")]={...zi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[St(e,"letterSpacing")]={...zi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[St(e,"wordSpacing")]={...zi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[St(e,"textAlign")]={...zi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[St(e,"textAppearance")]={...zi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const gb=Ei.reduce((e,t)=>({...e,...mb(t)}),{}),hb=Ei.reduce((e,t)=>({...e,[St(t,"fontFamily")]:"Goudy Bookletter 1911",[St(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[St(t,"letterSpacing")]:0,[St(t,"wordSpacing")]:0,[St(t,"textAlign")]:"left",[St(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function vs(e){return Ei.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[St(n,"fontSize")]=i),o!==void 0&&(t[St(n,"lineHeight")]=o),t},{})}const fb=Lv(),yb={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"}},...gb,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:"01M3QM74XESYN1HRYH9VRTZ5CK",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:pb,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...hb,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,...vs({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,...vs({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,...vs({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:[fb]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","countColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{allowsCollection:!0,addItemWithoutImage:!0},items:{type:"object",properties:{title1:{type:"string",label:"Title",contentKey:"title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",contentKey:"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",contentKey:"gallery",max:2,display:{type:"media-list-input"},properties:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]}}},default:[{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"contain"},{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"contain"},{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"contain"}]}]}},vb={element:db,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:yb,sourceCode:ub,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0},{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[...Ei.map(e=>({path:`${St(e,"fontFamily")}`}))]},fontRelations:{...Ei.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${St(t,"fontFamily")}`}),{})}},xb={sizeType:"custom",value:700,min:400,max:700};function Ta(e,t){return{widthPx:e,heightPx:e*t}}function qs(e,t,n,i,o,r){return{x:Math.min(Math.max(e,o/2),n-o/2),y:Math.min(Math.max(t,r/2),i-r/2)}}function sd(e,t,n,i){const{heightPx:o}=Ta(n,i);return qs(e/2,t/2,e,t,n,o)}function $p(e,t,n){for(const i of n){const{heightPx:o}=Ta(i.widthPx,i.aspectRatio),r=i.widthPx/2,l=o/2;if(e>=i.x-r&&e<=i.x+r&&t>=i.y-l&&t<=i.y+l)return!0}return!1}function bb(e,t,n,i,o,r,l,c){if(o==="system")return"none";const d=i.getBoundingClientRect(),u=document.elementFromPoint(d.left+e,d.top+t);return u&&u.closest("a")?"none":$p(e,t,n)||r==="area"?l??"none":c??"none"}function ld(e,t,n){var c;const{sizeType:i,value:o,min:r,max:l}=t;return i==="custom"?o:i==="as is"?((c=n.get(e))==null?void 0:c.naturalWidth)??o:Math.round(Math.random()*(l-r)+r)}function Sb(e){return`
16949
16949
  .${e}-root {
16950
16950
  position: absolute;
16951
16951
  top: 0;
@@ -16980,7 +16980,7 @@ export type LightboxJournalSettings = {
16980
16980
  width: 32px;
16981
16981
  height: 32px;
16982
16982
  }
16983
- `}function Sb(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 wb(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await Sb(i)]));return new Map(n)}function $b({settings:e,content:t=[],isEditor:n}){const{prefix:i}=b.useScopedStyles(),[o,r]=s.useState(null),[l,c]=s.useState([]),[d,u]=s.useState(0),p=s.useRef(0),[y,x]=s.useState({x:0,y:0}),[m,f]=s.useState("none"),S=s.useRef({x:0,y:0}),[w,N]=s.useState(!1),[v,M]=s.useState(!1),R=s.useRef(new Map),{imageSize:U=vb,cursor:X="system",target:D="area",position:_="random",visible:W="all",defaultCursor:T=null,hoverCursor:C=null}=e,q=t.filter(P=>{var h;return!!((h=P==null?void 0:P.image)!=null&&h.assetId)}),E=s.useMemo(()=>bb(i),[i]),$=s.useCallback((P,h,J=l)=>{if(!o)return;const V=o.getBoundingClientRect(),he=P-V.left,k=h-V.top;x({x:he,y:k}),f(xb(he,k,J,o,X,D,C,T))},[o,l,X,D,C,T]);s.useEffect(()=>{const P=[...q.map(J=>J.image.assetId),T,C].filter(J=>!!J);if(P.length===0){R.current=new Map,M(!0);return}let h=!1;return M(!1),wb(P).then(J=>{h||(R.current=J,M(!0))}),()=>{h=!0}},[t,T,C]),s.useEffect(()=>{if(!o)return;const P=J=>{J.stopPropagation(),S.current={x:J.clientX,y:J.clientY},$(J.clientX,J.clientY)},h=()=>{w&&$(S.current.x,S.current.y)};return o.addEventListener("mousemove",P),window.addEventListener("scroll",h,!0),()=>{o.removeEventListener("mousemove",P),window.removeEventListener("scroll",h,!0)}},[o,w,$]),s.useEffect(()=>{!o||!w||$(S.current.x,S.current.y)},[l,o,w,$]),s.useEffect(()=>{w||f("none")},[w]);const I=(P,h,J,V={})=>{var te,ve;if(!((te=P==null?void 0:P.image)!=null&&te.assetId))return null;const he=((ve=R.current.get(P.image.assetId))==null?void 0:ve.aspectRatio)??1,k=sd(P.image.assetId,U,R.current),{heightPx:ce}=Ca(k,he);let L=0,me=0;return _==="same"?{x:L,y:me}=ad(h,J,k,he):(L=V.x??Math.random()*h,me=V.y??Math.random()*J,{x:L,y:me}=Us(L,me,h,J,k,ce)),{id:p.current++,assetId:P.image.assetId,link:P.link,name:P.image.name,x:L,y:me,xRatio:L/h,yRatio:me/J,aspectRatio:he,widthPx:k}},j=()=>{if(!o)return;const P=o.getBoundingClientRect(),h=P.width,J=P.height;h===0||J===0||c(V=>V.length===0?V:V.map(he=>{const k=U.sizeType==="random"?he.widthPx:sd(he.assetId,U,R.current),{heightPx:ce}=Ca(k,he.aspectRatio);if(_==="same"){const{x:te,y:ve}=ad(h,J,k,he.aspectRatio);return{...he,x:te,y:ve,widthPx:k}}const{x:L,y:me}=Us(he.xRatio*h,he.yRatio*J,h,J,k,ce);return{...he,x:L,y:me,widthPx:k}}))};s.useEffect(()=>{if(!o||q.length===0||!v)return;const P=o.getBoundingClientRect(),h=P.width,J=P.height,V=I(q[0],h,J);V&&(c([V]),u(q.length>1?1:0))},[U,_,o,t,v]),s.useEffect(()=>{if(!o)return;j();const P=new ResizeObserver(j);return P.observe(o),window.addEventListener("resize",j),()=>{P.disconnect(),window.removeEventListener("resize",j)}},[o,_,U,l.length]),s.useEffect(()=>{W==="last One"&&c(P=>P.length>0?[P[P.length-1]]:[])},[W]);const F=P=>{if(!o||q.length===0||!v)return;const h=o.getBoundingClientRect(),J=P.clientX-h.left,V=P.clientY-h.top;if(D==="image"&&!wp(J,V,l))return;let he=0,k=0;_==="on Click"?(he=J,k=V):_==="same"?(he=h.width/2,k=h.height/2):(he=Math.random()*h.width,k=Math.random()*h.height);const ce=q[d%q.length],L=I(ce,h.width,h.height,{x:he,y:k});if(!L)return;const me=W==="all"?[...l,L]:[L];c(me),u(te=>(te+1)%q.length),$(P.clientX,P.clientY,me)},K=X==="custom"&&m!=="none";return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:E}}),a.jsxs("div",{ref:r,onClick:F,onMouseEnter:()=>N(!0),onMouseLeave:()=>N(!1),className:`${i}-root`,style:{cursor:K?"none":"default"},children:[l.map(P=>a.jsx("div",{className:`${i}-wrapper`,style:{top:`${P.y}px`,left:`${P.x}px`,width:`${P.widthPx}px`,cursor:K?"none":"default"},children:a.jsx(b.LinkWrapper,{link:D==="area"?P.link:void 0,className:`${i}-link`,children:a.jsx("img",{src:P.assetId,alt:P.name,className:`${i}-image`})})},P.id)),w&&K&&a.jsx("div",{className:`${i}-cursor`,style:{left:`${y.x}px`,top:`${y.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const Cb=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
16983
+ `}function wb(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 $b(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await wb(i)]));return new Map(n)}function Cb({settings:e,content:t=[],isEditor:n}){const{prefix:i}=b.useScopedStyles(),[o,r]=s.useState(null),[l,c]=s.useState([]),[d,u]=s.useState(0),p=s.useRef(0),[y,x]=s.useState({x:0,y:0}),[m,f]=s.useState("none"),S=s.useRef({x:0,y:0}),[w,N]=s.useState(!1),[v,M]=s.useState(!1),E=s.useRef(new Map),{imageSize:U=xb,cursor:X="system",target:D="area",position:_="random",visible:W="all",defaultCursor:T=null,hoverCursor:C=null}=e,q=t.filter(P=>{var h;return!!((h=P==null?void 0:P.image)!=null&&h.assetId)}),R=s.useMemo(()=>Sb(i),[i]),$=s.useCallback((P,h,J=l)=>{if(!o)return;const V=o.getBoundingClientRect(),he=P-V.left,k=h-V.top;x({x:he,y:k}),f(bb(he,k,J,o,X,D,C,T))},[o,l,X,D,C,T]);s.useEffect(()=>{const P=[...q.map(J=>J.image.assetId),T,C].filter(J=>!!J);if(P.length===0){E.current=new Map,M(!0);return}let h=!1;return M(!1),$b(P).then(J=>{h||(E.current=J,M(!0))}),()=>{h=!0}},[t,T,C]),s.useEffect(()=>{if(!o)return;const P=J=>{J.stopPropagation(),S.current={x:J.clientX,y:J.clientY},$(J.clientX,J.clientY)},h=()=>{w&&$(S.current.x,S.current.y)};return o.addEventListener("mousemove",P),window.addEventListener("scroll",h,!0),()=>{o.removeEventListener("mousemove",P),window.removeEventListener("scroll",h,!0)}},[o,w,$]),s.useEffect(()=>{!o||!w||$(S.current.x,S.current.y)},[l,o,w,$]),s.useEffect(()=>{w||f("none")},[w]);const I=(P,h,J,V={})=>{var te,ve;if(!((te=P==null?void 0:P.image)!=null&&te.assetId))return null;const he=((ve=E.current.get(P.image.assetId))==null?void 0:ve.aspectRatio)??1,k=ld(P.image.assetId,U,E.current),{heightPx:ce}=Ta(k,he);let L=0,me=0;return _==="same"?{x:L,y:me}=sd(h,J,k,he):(L=V.x??Math.random()*h,me=V.y??Math.random()*J,{x:L,y:me}=qs(L,me,h,J,k,ce)),{id:p.current++,assetId:P.image.assetId,link:P.link,name:P.image.name,x:L,y:me,xRatio:L/h,yRatio:me/J,aspectRatio:he,widthPx:k}},j=()=>{if(!o)return;const P=o.getBoundingClientRect(),h=P.width,J=P.height;h===0||J===0||c(V=>V.length===0?V:V.map(he=>{const k=U.sizeType==="random"?he.widthPx:ld(he.assetId,U,E.current),{heightPx:ce}=Ta(k,he.aspectRatio);if(_==="same"){const{x:te,y:ve}=sd(h,J,k,he.aspectRatio);return{...he,x:te,y:ve,widthPx:k}}const{x:L,y:me}=qs(he.xRatio*h,he.yRatio*J,h,J,k,ce);return{...he,x:L,y:me,widthPx:k}}))};s.useEffect(()=>{if(!o||q.length===0||!v)return;const P=o.getBoundingClientRect(),h=P.width,J=P.height,V=I(q[0],h,J);V&&(c([V]),u(q.length>1?1:0))},[U,_,o,t,v]),s.useEffect(()=>{if(!o)return;j();const P=new ResizeObserver(j);return P.observe(o),window.addEventListener("resize",j),()=>{P.disconnect(),window.removeEventListener("resize",j)}},[o,_,U,l.length]),s.useEffect(()=>{W==="last One"&&c(P=>P.length>0?[P[P.length-1]]:[])},[W]);const F=P=>{if(!o||q.length===0||!v)return;const h=o.getBoundingClientRect(),J=P.clientX-h.left,V=P.clientY-h.top;if(D==="image"&&!$p(J,V,l))return;let he=0,k=0;_==="on Click"?(he=J,k=V):_==="same"?(he=h.width/2,k=h.height/2):(he=Math.random()*h.width,k=Math.random()*h.height);const ce=q[d%q.length],L=I(ce,h.width,h.height,{x:he,y:k});if(!L)return;const me=W==="all"?[...l,L]:[L];c(me),u(te=>(te+1)%q.length),$(P.clientX,P.clientY,me)},K=X==="custom"&&m!=="none";return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:R}}),a.jsxs("div",{ref:r,onClick:F,onMouseEnter:()=>N(!0),onMouseLeave:()=>N(!1),className:`${i}-root`,style:{cursor:K?"none":"default"},children:[l.map(P=>a.jsx("div",{className:`${i}-wrapper`,style:{top:`${P.y}px`,left:`${P.x}px`,width:`${P.widthPx}px`,cursor:K?"none":"default"},children:a.jsx(b.LinkWrapper,{link:D==="area"?P.link:void 0,className:`${i}-link`,children:a.jsx("img",{src:P.assetId,alt:P.name,className:`${i}-image`})})},P.id)),w&&K&&a.jsx("div",{className:`${i}-cursor`,style:{left:`${y.x}px`,top:`${y.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const Tb=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
16984
16984
  import { CommonComponentProps } from '../props';
16985
16985
  import { LinkWrapper, useScopedStyles, type ContentLink } from '../utils/index';
16986
16986
 
@@ -17506,7 +17506,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
17506
17506
  </>
17507
17507
  );
17508
17508
  }
17509
- `,Tb={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"}},required:["assetId","name"]},link:{type:"object",label:"URL",display:{type:"link-input"}}},required:["image"]},default:[{image:{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:"Slider-1.png"},link:{type:"url",value:"",target:"blank"}},{image:{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"Slider-2.png"},link:{type:"url",value:"",target:"blank"}},{image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"Slider-3.png"},link:{type:"url",value:"",target:"blank"}},{image:{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"Slider-4.png"},link:{type:"url",value:"",target:"blank"}},{image:{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"Slider-5.png"},link:{type:"url",value:"",target:"blank"}},{image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"Slider-6.png"},link:{type:"url",value:"",target:"blank"}},{image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"Slider-7.png"},link:{type:"url",value:"",target:"blank"}}]},settings:{sizing:"manual",properties:{imageSize:{type:"object",scope:"layout",title:"Img Size",display:{type:"toggle-cycle-numeric-input",enum:["custom","as is","random"],inputs:{custom:"single","as is":"none",random:"range"},defaultValue:700,defaultMin:400,defaultMax:700},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},cursor:{type:"string",scope:"common",title:"Cursor",display:{type:"toggle-cycle",enum:["system","custom"]}},target:{type:"string",scope:"common",title:"Target",display:{type:"toggle-cycle",enum:["area","image"]}},position:{type:"string",scope:"common",title:"Position",display:{type:"toggle-cycle",enum:["random","same","on Click"]}},visible:{type:"string",scope:"common",title:"Visible",display:{type:"toggle-cycle",enum:["all","last One"]}},defaultCursor:{type:["string","null"],scope:"common",title:"Default",display:{type:"settings-image-input",visible:!1}},hoverCursor:{type:["string","null"],scope:"common",title:"Hover",display:{type:"settings-image-input",visible:!1}}},defaults:{imageSize:{sizeType:"custom",value:700,min:400,max:700},cursor:"system",target:"area",position:"random",visible:"all",defaultCursor:null,hoverCursor:null},layoutDefaults:{m:{imageSize:{sizeType:"custom",value:500,min:400,max:700}},t:{imageSize:{sizeType:"custom",value:600,min:400,max:700}},d:{imageSize:{sizeType:"custom",value:700,min:400,max:700}}},displayRules:[{if:{name:"cursor",value:"custom"},then:{name:"properties.defaultCursor.display.visible",value:!0}},{if:{name:"cursor",value:"custom"},then:{name:"properties.hoverCursor.display.visible",value:!0}}],layout:["__componentName__","imageSize","cursor","target","position","visible","defaultCursor","hoverCursor"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["imageSize"]},{type:"row",title:"",items:["cursor","target"]},{type:"row",title:"",items:["position","visible"]},{type:"row",title:"Custom Cursor",items:["defaultCursor","hoverCursor"]}]}]},Ib={element:$b,id:"click-gallerie",name:"Click",category:"galleries",version:1,defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},schema:Tb,sourceCode:Cb,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"defaultCursor"},{path:"hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]}},Lb=100,Mb=70,vi="cubic-bezier(0.86, 0, 0.07, 1)";function Pb(e){return`
17509
+ `,Ib={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"}},required:["assetId","name"]},link:{type:"object",label:"URL",display:{type:"link-input"}}},required:["image"]},default:[{image:{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:"Slider-1.png"},link:{type:"url",value:"",target:"blank"}},{image:{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"Slider-2.png"},link:{type:"url",value:"",target:"blank"}},{image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"Slider-3.png"},link:{type:"url",value:"",target:"blank"}},{image:{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"Slider-4.png"},link:{type:"url",value:"",target:"blank"}},{image:{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"Slider-5.png"},link:{type:"url",value:"",target:"blank"}},{image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"Slider-6.png"},link:{type:"url",value:"",target:"blank"}},{image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"Slider-7.png"},link:{type:"url",value:"",target:"blank"}}]},settings:{sizing:"manual",properties:{imageSize:{type:"object",scope:"layout",title:"Img Size",display:{type:"toggle-cycle-numeric-input",enum:["custom","as is","random"],inputs:{custom:"single","as is":"none",random:"range"},defaultValue:700,defaultMin:400,defaultMax:700},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},cursor:{type:"string",scope:"common",title:"Cursor",display:{type:"toggle-cycle",enum:["system","custom"]}},target:{type:"string",scope:"common",title:"Target",display:{type:"toggle-cycle",enum:["area","image"]}},position:{type:"string",scope:"common",title:"Position",display:{type:"toggle-cycle",enum:["random","same","on Click"]}},visible:{type:"string",scope:"common",title:"Visible",display:{type:"toggle-cycle",enum:["all","last One"]}},defaultCursor:{type:["string","null"],scope:"common",title:"Default",display:{type:"settings-image-input",visible:!1}},hoverCursor:{type:["string","null"],scope:"common",title:"Hover",display:{type:"settings-image-input",visible:!1}}},defaults:{imageSize:{sizeType:"custom",value:700,min:400,max:700},cursor:"system",target:"area",position:"random",visible:"all",defaultCursor:null,hoverCursor:null},layoutDefaults:{m:{imageSize:{sizeType:"custom",value:500,min:400,max:700}},t:{imageSize:{sizeType:"custom",value:600,min:400,max:700}},d:{imageSize:{sizeType:"custom",value:700,min:400,max:700}}},displayRules:[{if:{name:"cursor",value:"custom"},then:{name:"properties.defaultCursor.display.visible",value:!0}},{if:{name:"cursor",value:"custom"},then:{name:"properties.hoverCursor.display.visible",value:!0}}],layout:["__componentName__","imageSize","cursor","target","position","visible","defaultCursor","hoverCursor"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["imageSize"]},{type:"row",title:"",items:["cursor","target"]},{type:"row",title:"",items:["position","visible"]},{type:"row",title:"Custom Cursor",items:["defaultCursor","hoverCursor"]}]}]},Lb={element:Cb,id:"click-gallerie",name:"Click",category:"galleries",version:1,defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},schema:Ib,sourceCode:Tb,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"defaultCursor"},{path:"hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]}},Mb=100,Pb=70,vi="cubic-bezier(0.86, 0, 0.07, 1)";function Eb(e){return`
17510
17510
  .${e}-wrapper {
17511
17511
  position: relative;
17512
17512
  width: 100%;
@@ -17616,7 +17616,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
17616
17616
  display: block;
17617
17617
  pointer-events: none;
17618
17618
  }
17619
- `}function Rb(e){return e==="blur"?Mb:e==="greyscale"?Lb:0}function Yo(e,t=1,n=1){const i=Rb(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 ld(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function Eb(e,t){return t<=1?0:(e-1+t)%t}function kb(e,t=1){return!e||e.height===0?t:e.width/e.height}function Ab(e,t,n,i,o){if(e<=0||t<=0)return{widthPercent:i,heightPercent:o};const r=e*i/100,l=t*o/100;let c=r,d=c/n;return d>l&&(d=l,c=d*n),{widthPercent:c/e*100,heightPercent:d/t*100}}function cd(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 $p(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function dd(e,t,n){return{...$p(e),[`--${n}-stage-scale`]:t}}function Fb(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 Nb({settings:e,content:t,isEditor:n,isPreviewMode:i}){var Ce,g,Y,ee,ae,ye,ne;const{prefix:o}=b.useScopedStyles(),r=s.useMemo(()=>Pb(o),[o]),{imageSize:l,maxWidth:c,maxHeight:d,transition:u=1e3,bgImage:p="greyscale"}=e,y=t??[],x=ld(y.length),[m,f]=s.useState(x.activeIndex),[S,w]=s.useState(x.backgroundIndex),[N,v]=s.useState(!1),[M,R]=s.useState(!1),[U,X]=s.useState(null),[D,_]=s.useState(null),[W,T]=s.useState(0),[C,q]=s.useState(1),[E,$]=s.useState("none"),[I,j]=s.useState("next"),[F,K]=s.useState({}),[P,h]=s.useState({width:0,height:0}),J=s.useRef(null),V=s.useRef(null),he=!n||!!i,k=l??60,ce=Math.max(10,Math.min(100,c??k)),L=Math.max(10,Math.min(100,d??k)),me=Math.max(100,u),te=Yo(p),ve=s.useCallback(B=>{const G=kb(B?F[B]:void 0);return Ab(P.width,P.height,G,ce,L)},[P.height,P.width,F,L,ce]);s.useEffect(()=>{const B=V.current;if(!B)return;const G=new ResizeObserver(([z])=>{const{width:ie,height:H}=z.contentRect;h({width:ie,height:H})});return G.observe(B),()=>G.disconnect()},[]),s.useEffect(()=>{const B=(t??[]).map(G=>{var z;return(z=G.image)==null?void 0:z.assetId}).filter(G=>!!G);Fb(B,(G,z)=>{K(ie=>{var H,be;return((H=ie[G])==null?void 0:H.width)===z.width&&((be=ie[G])==null?void 0:be.height)===z.height?ie:{...ie,[G]:z}})})},[t]),s.useEffect(()=>{const{backgroundIndex:B,activeIndex:G}=ld(y.length);f(G),w(B),v(!1),R(!1),X(null),_(null),T(0),q(1),$("none"),j("next")},[y.length,t]),s.useEffect(()=>()=>{J.current&&clearTimeout(J.current)},[]);const Le=s.useCallback(B=>{var re,Q,Pe,Ae;if(!he||N||y.length<=1)return;const G=B==="next"?(m+1)%y.length:(m-1+y.length)%y.length,z=ve((Q=(re=y[m])==null?void 0:re.image)==null?void 0:Q.assetId),ie=ve((Ae=(Pe=y[G])==null?void 0:Pe.image)==null?void 0:Ae.assetId),H=cd(P.width,P.height,z),be=cd(P.width,P.height,ie);J.current&&clearTimeout(J.current),j(B),R(!0),v(!0),B==="next"?(X(m),_(G),T(0),q(1),$(Yo(p,0,1))):(w(Eb(G,y.length)),X(G),_(m),T(1),q(be),$(Yo(p,1,be))),requestAnimationFrame(()=>{R(!1),requestAnimationFrame(()=>{B==="next"?(T(1),q(H),$(Yo(p,1,H))):(T(0),q(1),$(Yo(p,0,1)))})}),J.current=setTimeout(()=>{B==="next"&&w(m),f(G),X(null),_(null),v(!1)},me)},[m,p,P.height,P.width,ve,N,he,y,me]),de=y[m],ue=S!==null?y[S]:null,Z=U!==null?y[U]:null,le=D!==null?y[D]:null,oe=y.length<=1?0:(m-1+y.length)%y.length,ge=y.length<=1?0:(m+1)%y.length,Se=ve((Ce=de==null?void 0:de.image)==null?void 0:Ce.assetId),Ee=ve((g=Z==null?void 0:Z.image)==null?void 0:g.assetId),Ne=ve((Y=le==null?void 0:le.image)==null?void 0:Y.assetId),Te={[`--${o}-transition-ms`]:`${me}ms`};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:r}}),a.jsxs("div",{ref:V,className:Rt(`${o}-wrapper`,M&&`${o}-snap`,n&&!i&&`${o}-editor`),style:Te,"aria-label":"Zoom gallery",children:[((ee=ue==null?void 0:ue.image)==null?void 0:ee.assetId)&&a.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:ue.image.assetId,alt:"",style:{filter:te}})}),N&&((ae=Z==null?void 0:Z.image)==null?void 0:ae.assetId)&&a.jsx("div",{className:Rt(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${I}`),style:dd(Ee,C,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:Z.image.assetId,alt:"",style:{filter:E}})}),N&&((ye=le==null?void 0:le.image)==null?void 0:ye.assetId)&&a.jsx("div",{className:Rt(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${I}`),style:dd(Ne,W,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-image`,src:le.image.assetId,alt:""})}),!N&&((ne=de==null?void 0:de.image)==null?void 0:ne.assetId)&&a.jsx("div",{className:Rt(`${o}-stage`,`${o}-foreground`),style:$p(Se),children:a.jsx("img",{className:`${o}-image`,src:de.image.assetId,alt:de.image.name??""})}),he&&y.length>1&&!N&&a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:Rt(`${o}-nav`,`${o}-nav-prev`),onClick:()=>Le("prev"),"aria-label":`Show previous image (${oe+1} of ${y.length})`}),a.jsx("button",{type:"button",className:Rt(`${o}-nav`,`${o}-nav-next`),onClick:()=>Le("next"),"aria-label":`Show next image (${ge+1} of ${y.length})`})]})]})]})}const _b=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17619
+ `}function Rb(e){return e==="blur"?Pb:e==="greyscale"?Mb:0}function Yo(e,t=1,n=1){const i=Rb(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 cd(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function kb(e,t){return t<=1?0:(e-1+t)%t}function Ab(e,t=1){return!e||e.height===0?t:e.width/e.height}function Fb(e,t,n,i,o){if(e<=0||t<=0)return{widthPercent:i,heightPercent:o};const r=e*i/100,l=t*o/100;let c=r,d=c/n;return d>l&&(d=l,c=d*n),{widthPercent:c/e*100,heightPercent:d/t*100}}function dd(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 Cp(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function ud(e,t,n){return{...Cp(e),[`--${n}-stage-scale`]:t}}function Nb(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 _b({settings:e,content:t,isEditor:n,isPreviewMode:i}){var Ce,g,Y,ee,ae,ye,ne;const{prefix:o}=b.useScopedStyles(),r=s.useMemo(()=>Eb(o),[o]),{imageSize:l,maxWidth:c,maxHeight:d,transition:u=1e3,bgImage:p="greyscale"}=e,y=t??[],x=cd(y.length),[m,f]=s.useState(x.activeIndex),[S,w]=s.useState(x.backgroundIndex),[N,v]=s.useState(!1),[M,E]=s.useState(!1),[U,X]=s.useState(null),[D,_]=s.useState(null),[W,T]=s.useState(0),[C,q]=s.useState(1),[R,$]=s.useState("none"),[I,j]=s.useState("next"),[F,K]=s.useState({}),[P,h]=s.useState({width:0,height:0}),J=s.useRef(null),V=s.useRef(null),he=!n||!!i,k=l??60,ce=Math.max(10,Math.min(100,c??k)),L=Math.max(10,Math.min(100,d??k)),me=Math.max(100,u),te=Yo(p),ve=s.useCallback(B=>{const G=Ab(B?F[B]:void 0);return Fb(P.width,P.height,G,ce,L)},[P.height,P.width,F,L,ce]);s.useEffect(()=>{const B=V.current;if(!B)return;const G=new ResizeObserver(([z])=>{const{width:ie,height:H}=z.contentRect;h({width:ie,height:H})});return G.observe(B),()=>G.disconnect()},[]),s.useEffect(()=>{const B=(t??[]).map(G=>{var z;return(z=G.image)==null?void 0:z.assetId}).filter(G=>!!G);Nb(B,(G,z)=>{K(ie=>{var H,be;return((H=ie[G])==null?void 0:H.width)===z.width&&((be=ie[G])==null?void 0:be.height)===z.height?ie:{...ie,[G]:z}})})},[t]),s.useEffect(()=>{const{backgroundIndex:B,activeIndex:G}=cd(y.length);f(G),w(B),v(!1),E(!1),X(null),_(null),T(0),q(1),$("none"),j("next")},[y.length,t]),s.useEffect(()=>()=>{J.current&&clearTimeout(J.current)},[]);const Le=s.useCallback(B=>{var re,Q,Pe,Ae;if(!he||N||y.length<=1)return;const G=B==="next"?(m+1)%y.length:(m-1+y.length)%y.length,z=ve((Q=(re=y[m])==null?void 0:re.image)==null?void 0:Q.assetId),ie=ve((Ae=(Pe=y[G])==null?void 0:Pe.image)==null?void 0:Ae.assetId),H=dd(P.width,P.height,z),be=dd(P.width,P.height,ie);J.current&&clearTimeout(J.current),j(B),E(!0),v(!0),B==="next"?(X(m),_(G),T(0),q(1),$(Yo(p,0,1))):(w(kb(G,y.length)),X(G),_(m),T(1),q(be),$(Yo(p,1,be))),requestAnimationFrame(()=>{E(!1),requestAnimationFrame(()=>{B==="next"?(T(1),q(H),$(Yo(p,1,H))):(T(0),q(1),$(Yo(p,0,1)))})}),J.current=setTimeout(()=>{B==="next"&&w(m),f(G),X(null),_(null),v(!1)},me)},[m,p,P.height,P.width,ve,N,he,y,me]),de=y[m],ue=S!==null?y[S]:null,Z=U!==null?y[U]:null,le=D!==null?y[D]:null,oe=y.length<=1?0:(m-1+y.length)%y.length,ge=y.length<=1?0:(m+1)%y.length,Se=ve((Ce=de==null?void 0:de.image)==null?void 0:Ce.assetId),Re=ve((g=Z==null?void 0:Z.image)==null?void 0:g.assetId),Ne=ve((Y=le==null?void 0:le.image)==null?void 0:Y.assetId),Te={[`--${o}-transition-ms`]:`${me}ms`};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:r}}),a.jsxs("div",{ref:V,className:Et(`${o}-wrapper`,M&&`${o}-snap`,n&&!i&&`${o}-editor`),style:Te,"aria-label":"Zoom gallery",children:[((ee=ue==null?void 0:ue.image)==null?void 0:ee.assetId)&&a.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:ue.image.assetId,alt:"",style:{filter:te}})}),N&&((ae=Z==null?void 0:Z.image)==null?void 0:ae.assetId)&&a.jsx("div",{className:Et(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${I}`),style:ud(Re,C,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:Z.image.assetId,alt:"",style:{filter:R}})}),N&&((ye=le==null?void 0:le.image)==null?void 0:ye.assetId)&&a.jsx("div",{className:Et(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${I}`),style:ud(Ne,W,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-image`,src:le.image.assetId,alt:""})}),!N&&((ne=de==null?void 0:de.image)==null?void 0:ne.assetId)&&a.jsx("div",{className:Et(`${o}-stage`,`${o}-foreground`),style:Cp(Se),children:a.jsx("img",{className:`${o}-image`,src:de.image.assetId,alt:de.image.name??""})}),he&&y.length>1&&!N&&a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:Et(`${o}-nav`,`${o}-nav-prev`),onClick:()=>Le("prev"),"aria-label":`Show previous image (${oe+1} of ${y.length})`}),a.jsx("button",{type:"button",className:Et(`${o}-nav`,`${o}-nav-next`),onClick:()=>Le("next"),"aria-label":`Show next image (${ge+1} of ${y.length})`})]})]})]})}const Hb=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17620
17620
  import cn from 'classnames';
17621
17621
  import { CommonComponentProps } from '../props';
17622
17622
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -18135,7 +18135,7 @@ export function Scale({ settings, content, isEditor, isPreviewMode }: ScaleProps
18135
18135
  </>
18136
18136
  );
18137
18137
  }
18138
- `,Hb={type:"object",version:1,settings:{sizing:"manual",properties:{maxWidth:{type:"number",scope:"common",title:"Max width (%)",display:{type:"percentage-input"},min:10,max:100},maxHeight:{type:"number",scope:"common",title:"Max height (%)",display:{type:"percentage-input"},min:10,max:100},transition:{type:"number",scope:"common",title:"Transition (ms)",display:{type:"common-numeric-input"},min:100,max:9999},bgImage:{type:"string",scope:"common",title:"BG image",display:{type:"toggle-cycle",enum:["greyscale","blur","as is"]}}},defaults:{maxWidth:60,maxHeight:60,transition:700,bgImage:"greyscale"},layout:["__componentName__","maxWidth","maxHeight","transition","bgImage"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["maxWidth","maxHeight"]},{type:"row",title:"",items:["transition","bgImage"]}]}],content:{type:"array",settings:{allowsCollection:!0,addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",contentKey:"gallery",display:{type:"media-input",isObjectFitEditable:!1}}}},default:[{image:{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:""}},{image:{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:""}},{image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:""}},{image:{assetId:"01M3QM74XE20C38X4NND20C5R4",name:""}},{image:{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:""}},{image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:""}},{image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:""}}]}},Wb={element:Nb,id:"scale",name:"Scale",category:"galleries",version:1,defaultSize:{d:{width:920,height:540},m:{width:"100%",height:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Scale.mp4"},schema:Hb,sourceCode:_b,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Ob={backgroundColor:"background-color",textColor:"text-color",borderColor:"border-color",iconColor:"icon-color",boxShadowColor:"box-shadow-color",innerBoxShadowColor:"inner-box-shadow-color"},Db=["hover","active"],vs={left:"flex-start",center:"center",right:"flex-end"};function zb(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 Bb(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 jb(e){const t=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-box-shadow-color, transparent)`,n=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-inner-box-shadow-color, transparent)`,i=`${t}, ${n}`,o=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-hover-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,r=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-hover-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,l=`${o}, ${r}`,c=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-active-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,d=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-active-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,u=`${c}, ${d}`,p=`0 4px 12px rgba(0, 0, 0, 0.15), ${n}`,y=`.${e}-button:focus-visible, a:focus-visible .${e}-button`,x=`.${e}-button:hover, ${y}`,m=f=>`.${e}-hover-effect-${f}:hover, .${e}-hover-effect-${f}:focus-visible, a:focus-visible .${e}-hover-effect-${f}`;return`
18138
+ `,Wb={type:"object",version:1,settings:{sizing:"manual",properties:{maxWidth:{type:"number",scope:"common",title:"Max width (%)",display:{type:"percentage-input"},min:10,max:100},maxHeight:{type:"number",scope:"common",title:"Max height (%)",display:{type:"percentage-input"},min:10,max:100},transition:{type:"number",scope:"common",title:"Transition (ms)",display:{type:"common-numeric-input"},min:100,max:9999},bgImage:{type:"string",scope:"common",title:"BG image",display:{type:"toggle-cycle",enum:["greyscale","blur","as is"]}}},defaults:{maxWidth:60,maxHeight:60,transition:700,bgImage:"greyscale"},layout:["__componentName__","maxWidth","maxHeight","transition","bgImage"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["maxWidth","maxHeight"]},{type:"row",title:"",items:["transition","bgImage"]}]}],content:{type:"array",settings:{allowsCollection:!0,addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",contentKey:"gallery",display:{type:"media-input",isObjectFitEditable:!1}}}},default:[{image:{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:""}},{image:{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:""}},{image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:""}},{image:{assetId:"01M3QM74XE20C38X4NND20C5R4",name:""}},{image:{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:""}},{image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:""}},{image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:""}}]}},Ob={element:_b,id:"scale",name:"Scale",category:"galleries",version:1,defaultSize:{d:{width:920,height:540},m:{width:"100%",height:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Scale.mp4"},schema:Wb,sourceCode:Hb,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Db={backgroundColor:"background-color",textColor:"text-color",borderColor:"border-color",iconColor:"icon-color",boxShadowColor:"box-shadow-color",innerBoxShadowColor:"inner-box-shadow-color"},zb=["hover","active"],xs={left:"flex-start",center:"center",right:"flex-end"};function Bb(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 jb(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 Vb(e){const t=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-box-shadow-color, transparent)`,n=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-inner-box-shadow-color, transparent)`,i=`${t}, ${n}`,o=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-hover-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,r=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-hover-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,l=`${o}, ${r}`,c=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-active-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,d=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-active-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,u=`${c}, ${d}`,p=`0 4px 12px rgba(0, 0, 0, 0.15), ${n}`,y=`.${e}-button:focus-visible, a:focus-visible .${e}-button`,x=`.${e}-button:hover, ${y}`,m=f=>`.${e}-hover-effect-${f}:hover, .${e}-hover-effect-${f}:focus-visible, a:focus-visible .${e}-hover-effect-${f}`;return`
18139
18139
  .${e}-root {
18140
18140
  line-height: 0;
18141
18141
  }
@@ -18377,7 +18377,7 @@ a:active .${e}-button .${e}-icon-image,
18377
18377
  height: calc(1em * var(--${e}-icon-scale, 1));
18378
18378
  width: calc(1em * var(--${e}-icon-scale, 1));
18379
18379
  }
18380
- `}function xs(e,t,n="",i,o){const r=t();return a.jsxs("span",{className:`${e}-content-roll-wrap ${n}`.trim(),style:i,children:[a.jsx("span",{className:`${e}-content-roll-spacer`,"aria-hidden":"true",style:o,children:r}),a.jsxs("span",{className:`${e}-content-roll-viewport`,children:[a.jsx("span",{className:`${e}-content-roll-layer`,style:o,children:t()}),a.jsx("span",{className:`${e}-content-roll-layer ${e}-content-roll-layer-hover`,"aria-hidden":"true",style:o,children:t()})]})]})}function ud(e,t,n="fill",i=100,o=0,r){if(!t)return null;const l=a.jsx(mn,{url:t,fill:`var(--${e}-icon-color)`,hoverFill:`var(--${e}-icon-color)`,className:`${e}-icon-image`});if(n==="inline")return a.jsx("span",{className:`${e}-icon ${e}-icon-inline`,style:{[`--${e}-icon-scale`]:i/100},"aria-hidden":"true",children:l});if(n==="fixed"&&o>0){const c=b.scalingValue(o,r);return a.jsx("span",{className:`${e}-icon`,style:{width:c,height:c},"aria-hidden":"true",children:l})}return a.jsx("span",{className:`${e}-icon ${e}-icon-fill`,"aria-hidden":"true",children:l})}function Vb({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:r}=b.useScopedStyles(),l=s.useMemo(()=>jb(r),[r]),{type:c="a",label:d="Button",icon:u,alignment:p="center",alignA:y,order:x="text-icon",gap:m=0,iconSize:f=0,iconWidthC:S=0,dimensions:w=!1,padding:N={top:0,right:0,bottom:0,left:0},cornerRadius:v=0,boxShadow:M={top:0,left:0,right:0,bottom:0},boxShadowColor:R="rgba(0, 0, 0, 0)",innerBoxShadow:U={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:X="rgba(0, 0, 0, 0)",stroke:D=0,blur:_=0,backgroundColor:W="#000000",textColor:T="#ffffff",borderColor:C="#ffffff",iconColor:q="#ffffff",hoverEffect:E="none",fontFamily:$,fontSettings:I,fontSize:j,lineHeight:F,letterSpacing:K=0,wordSpacing:P=0,textAppearance:h,stateOverrides:J,minWidth:V=0,minHeight:he=0,width:k=0,height:ce=0}=e,L=b.buildColorVars(r,{backgroundColor:W,textColor:T,borderColor:C,iconColor:q,boxShadowColor:R,innerBoxShadowColor:X},Ob,Db,J),me=i&&i!=="default"?`${r}-state-${i}`:"",te=t&&!n?`${r}-editing`:"",ve=E!=="none"&&(!t||n||i==="hover")?`${r}-hover-effect-${E}`:"",Le=E==="reveal"||E==="swipe",de=E==="content-roll",ue=E==="reveal"&&(!t||n),Z=w===!0,oe=c==="a"?y??p:p,ge=c==="c",Se=c!=="b",Ee={fontSettings:{fontFamily:$,fontWeight:(I==null?void 0:I.fontWeight)??400,fontStyle:(I==null?void 0:I.fontStyle)??"normal"},fontSize:j??.01,lineHeight:F,letterSpacing:K,wordSpacing:P,textAppearance:h,color:T},Te={...Se?pn(nn(Ee,t)):{},[`--${r}-box-shadow-x`]:b.scalingValue(M.left,t),[`--${r}-box-shadow-y`]:b.scalingValue(M.top,t),[`--${r}-box-shadow-blur`]:b.scalingValue(M.right,t),[`--${r}-box-shadow-spread`]:b.scalingValue(M.bottom,t),[`--${r}-inner-box-shadow-x`]:b.scalingValue(U.left,t),[`--${r}-inner-box-shadow-y`]:b.scalingValue(U.top,t),[`--${r}-inner-box-shadow-blur`]:b.scalingValue(U.right,t),[`--${r}-inner-box-shadow-spread`]:b.scalingValue(U.bottom,t),[`--${r}-backdrop-blur`]:_>0?`blur(${b.scalingValue(_,t)})`:void 0,paddingTop:b.scalingValue(N.top,t),paddingRight:b.scalingValue(N.right,t),paddingBottom:b.scalingValue(N.bottom,t),paddingLeft:b.scalingValue(N.left,t),borderRadius:b.scalingValue(v,t),borderWidth:b.scalingValue(D,t),...ge?{}:{justifyContent:vs[oe],textAlign:oe},...ge&&!de?{gap:b.scalingValue(m,t)}:{},...Z?{width:b.scalingValue(k,t),height:b.scalingValue(ce,t)}:{minWidth:b.scalingValue(V,t),minHeight:b.scalingValue(he,t),...ge?{width:"100%"}:{}}};let Ce;const g={display:"inline-flex",alignItems:"center",justifyContent:ge?vs[oe]:vs[c==="a"?oe:"center"],gap:ge?b.scalingValue(m,t):void 0,width:"100%",height:"100%",...c==="a"?{textAlign:oe}:{}};if(c==="b"){const ae=()=>ud(r,u,f>0?"fixed":"fill",100,f,t);Ce=de?xs(r,ae,`${r}-icon-roll`,void 0,g):ae()}else if(c==="c"){const ae=()=>{const ye=a.jsx("span",{className:`${r}-text`,style:{textAlign:oe},children:d}),ne=ud(r,u,S>0?"fixed":"fill",100,S,t);return x==="icon-text"?a.jsxs(a.Fragment,{children:[ne,ye]}):a.jsxs(a.Fragment,{children:[ye,ne]})};Ce=de?xs(r,ae,`${r}-icon-text-roll`,void 0,g):ae()}else Ce=de?xs(r,()=>d,`${r}-label-roll`,void 0,g):Le?a.jsx("span",{className:`${r}-button-inner`,children:d}):d;const Y=ue?ae=>zb(ae,r):void 0,ee=ue?ae=>Bb(ae,r):void 0;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),a.jsx("div",{className:`${r}-root`,style:L,children:a.jsx("div",{className:`${r}-wrapper ${me} ${te}`.trim(),children:a.jsx("div",{className:`${r}-button ${ve}`.trim(),style:Te,onMouseEnter:Y,onMouseLeave:ee,role:"button",tabIndex:o||t&&!n?void 0:0,children:Ce})})})]})}const Gb=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
18380
+ `}function bs(e,t,n="",i,o){const r=t();return a.jsxs("span",{className:`${e}-content-roll-wrap ${n}`.trim(),style:i,children:[a.jsx("span",{className:`${e}-content-roll-spacer`,"aria-hidden":"true",style:o,children:r}),a.jsxs("span",{className:`${e}-content-roll-viewport`,children:[a.jsx("span",{className:`${e}-content-roll-layer`,style:o,children:t()}),a.jsx("span",{className:`${e}-content-roll-layer ${e}-content-roll-layer-hover`,"aria-hidden":"true",style:o,children:t()})]})]})}function pd(e,t,n="fill",i=100,o=0,r){if(!t)return null;const l=a.jsx(mn,{url:t,fill:`var(--${e}-icon-color)`,hoverFill:`var(--${e}-icon-color)`,className:`${e}-icon-image`});if(n==="inline")return a.jsx("span",{className:`${e}-icon ${e}-icon-inline`,style:{[`--${e}-icon-scale`]:i/100},"aria-hidden":"true",children:l});if(n==="fixed"&&o>0){const c=b.scalingValue(o,r);return a.jsx("span",{className:`${e}-icon`,style:{width:c,height:c},"aria-hidden":"true",children:l})}return a.jsx("span",{className:`${e}-icon ${e}-icon-fill`,"aria-hidden":"true",children:l})}function Gb({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:r}=b.useScopedStyles(),l=s.useMemo(()=>Vb(r),[r]),{type:c="a",label:d="Button",icon:u,alignment:p="center",alignA:y,order:x="text-icon",gap:m=0,iconSize:f=0,iconWidthC:S=0,dimensions:w=!1,padding:N={top:0,right:0,bottom:0,left:0},cornerRadius:v=0,boxShadow:M={top:0,left:0,right:0,bottom:0},boxShadowColor:E="rgba(0, 0, 0, 0)",innerBoxShadow:U={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:X="rgba(0, 0, 0, 0)",stroke:D=0,blur:_=0,backgroundColor:W="#000000",textColor:T="#ffffff",borderColor:C="#ffffff",iconColor:q="#ffffff",hoverEffect:R="none",fontFamily:$,fontSettings:I,fontSize:j,lineHeight:F,letterSpacing:K=0,wordSpacing:P=0,textAppearance:h,stateOverrides:J,minWidth:V=0,minHeight:he=0,width:k=0,height:ce=0}=e,L=b.buildColorVars(r,{backgroundColor:W,textColor:T,borderColor:C,iconColor:q,boxShadowColor:E,innerBoxShadowColor:X},Db,zb,J),me=i&&i!=="default"?`${r}-state-${i}`:"",te=t&&!n?`${r}-editing`:"",ve=R!=="none"&&(!t||n||i==="hover")?`${r}-hover-effect-${R}`:"",Le=R==="reveal"||R==="swipe",de=R==="content-roll",ue=R==="reveal"&&(!t||n),Z=w===!0,oe=c==="a"?y??p:p,ge=c==="c",Se=c!=="b",Re={fontSettings:{fontFamily:$,fontWeight:(I==null?void 0:I.fontWeight)??400,fontStyle:(I==null?void 0:I.fontStyle)??"normal"},fontSize:j??.01,lineHeight:F,letterSpacing:K,wordSpacing:P,textAppearance:h,color:T},Te={...Se?pn(nn(Re,t)):{},[`--${r}-box-shadow-x`]:b.scalingValue(M.left,t),[`--${r}-box-shadow-y`]:b.scalingValue(M.top,t),[`--${r}-box-shadow-blur`]:b.scalingValue(M.right,t),[`--${r}-box-shadow-spread`]:b.scalingValue(M.bottom,t),[`--${r}-inner-box-shadow-x`]:b.scalingValue(U.left,t),[`--${r}-inner-box-shadow-y`]:b.scalingValue(U.top,t),[`--${r}-inner-box-shadow-blur`]:b.scalingValue(U.right,t),[`--${r}-inner-box-shadow-spread`]:b.scalingValue(U.bottom,t),[`--${r}-backdrop-blur`]:_>0?`blur(${b.scalingValue(_,t)})`:void 0,paddingTop:b.scalingValue(N.top,t),paddingRight:b.scalingValue(N.right,t),paddingBottom:b.scalingValue(N.bottom,t),paddingLeft:b.scalingValue(N.left,t),borderRadius:b.scalingValue(v,t),borderWidth:b.scalingValue(D,t),...ge?{}:{justifyContent:xs[oe],textAlign:oe},...ge&&!de?{gap:b.scalingValue(m,t)}:{},...Z?{width:b.scalingValue(k,t),height:b.scalingValue(ce,t)}:{minWidth:b.scalingValue(V,t),minHeight:b.scalingValue(he,t),...ge?{width:"100%"}:{}}};let Ce;const g={display:"inline-flex",alignItems:"center",justifyContent:ge?xs[oe]:xs[c==="a"?oe:"center"],gap:ge?b.scalingValue(m,t):void 0,width:"100%",height:"100%",...c==="a"?{textAlign:oe}:{}};if(c==="b"){const ae=()=>pd(r,u,f>0?"fixed":"fill",100,f,t);Ce=de?bs(r,ae,`${r}-icon-roll`,void 0,g):ae()}else if(c==="c"){const ae=()=>{const ye=a.jsx("span",{className:`${r}-text`,style:{textAlign:oe},children:d}),ne=pd(r,u,S>0?"fixed":"fill",100,S,t);return x==="icon-text"?a.jsxs(a.Fragment,{children:[ne,ye]}):a.jsxs(a.Fragment,{children:[ye,ne]})};Ce=de?bs(r,ae,`${r}-icon-text-roll`,void 0,g):ae()}else Ce=de?bs(r,()=>d,`${r}-label-roll`,void 0,g):Le?a.jsx("span",{className:`${r}-button-inner`,children:d}):d;const Y=ue?ae=>Bb(ae,r):void 0,ee=ue?ae=>jb(ae,r):void 0;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),a.jsx("div",{className:`${r}-root`,style:L,children:a.jsx("div",{className:`${r}-wrapper ${me} ${te}`.trim(),children:a.jsx("div",{className:`${r}-button ${ve}`.trim(),style:Te,onMouseEnter:Y,onMouseLeave:ee,role:"button",tabIndex:o||t&&!n?void 0:0,children:Ce})})})]})}const Xb=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
18381
18381
  import { SvgImage } from '../helpers/SvgImage/SvgImage';
18382
18382
  import { CommonComponentProps } from '../props';
18383
18383
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
@@ -19009,7 +19009,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
19009
19009
  </>
19010
19010
  );
19011
19011
  }
19012
- `,Xb={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Ub=["backgroundColor","textColor","borderColor","iconColor","boxShadowColor","innerBoxShadowColor"],qb={type:"object",version:1,settings:{sizing:"auto",hasLinkParameter:!0,properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},label:{type:"string",scope:"common",title:"Label",display:{type:"label-input"}},icon:{type:["string","null"],scope:"common",title:"Icon",display:{type:"settings-image-input",visible:!1}},alignment:{type:"string",scope:"layout",title:"Alignment",display:{type:"toggle-cycle",enum:["left","center","right"]}},alignA:{type:"string",scope:"layout",title:"Alignment",display:{type:"toggle-cycle",enum:["left","center","right"],visible:!1}},order:{type:"string",scope:"layout",title:"Order",display:{type:"toggle-cycle",enum:["text-icon","icon-text"],visible:!1}},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",visible:!1},min:0,max:9999},iconSize:{type:"number",scope:"layout",title:"Icon width",display:{type:"numeric-input",visible:!1},min:0,max:9999},iconWidthC:{type:"number",scope:"layout",title:"Icon width",display:{type:"numeric-input",visible:!1},min:0,max:9999},dimensions:{type:"boolean",scope:"layout",title:"Dimensions",display:{type:"toggle",enum:["auto","fixed"]}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",min:0,display:{type:"numeric-input"}},boxShadow:{type:"object",scope:"layout",title:"Shadow",display:{type:"padding-controls",step:.1,decimal:!0,allowNegative:!0,nonNegativeSides:["right"],sideLetters:{top:"Y",left:"X",right:"B",bottom:"S"}}},boxShadowColor:{type:"string",scope:"common",title:"Shadow Default",titleByState:{default:"Shadow Default",hover:"Shadow Hover",active:"Shadow Active"},display:{type:"palette-color-picker"}},innerBoxShadow:{type:"object",scope:"layout",title:"Inner shadow",display:{type:"padding-controls",step:.1,decimal:!0,allowNegative:!0,nonNegativeSides:["right"],sideLetters:{top:"Y",left:"X",right:"B",bottom:"S"}}},innerBoxShadowColor:{type:"string",scope:"common",title:"Inner Shadow Default",titleByState:{default:"Inner Shadow Default",hover:"Inner Shadow Hover",active:"Inner Shadow Active"},display:{type:"palette-color-picker"}},stroke:{type:"number",scope:"layout",title:"Stroke Width",display:{type:"numeric-input"},min:0,max:9999},blur:{type:"number",scope:"layout",title:"Blur",display:{type:"numeric-input"},min:0,max:100},backgroundColor:{type:"string",scope:"common",title:"BG Default",titleByState:{default:"BG Default",hover:"BG Hover",active:"BG Active"},display:{type:"palette-color-picker"}},textColor:{type:"string",scope:"common",title:"Text Default",titleByState:{default:"Text Default",hover:"Text Hover",active:"Text Active"},display:{type:"palette-color-picker"}},borderColor:{type:"string",scope:"common",title:"Border Default",titleByState:{default:"Border Default",hover:"Border Hover",active:"Border Active"},display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{default:"Icon Default",hover:"Icon Hover",active:"Icon Active"},display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},hoverEffect:{type:"string",scope:"layout",title:"Hover effect",display:{type:"toggle-cycle",enum:["none","scale-up","lift","reveal","swipe","content-roll"]}},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},fontSettings:{...Xb.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},fontSize:{type:"number",scope:"layout",title:"Font size",display:{type:"font-size"}},lineHeight:{type:"number",scope:"layout",title:"Line height",display:{type:"line-height-input"}},letterSpacing:{type:"number",scope:"layout",title:"Letter spacing",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",scope:"layout",title:"Word spacing",display:{type:"word-spacing-input"}},textAppearance:{type:"object",scope:"layout",title:"Text appearance",display:{type:"text-appearance"}},minWidth:{type:"number",scope:"layout",title:"Min width",display:{type:"numeric-input"},min:0,max:9999},minHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input",visible:!1},min:0,max:9999},height:{type:"number",scope:"layout",title:"Height",display:{type:"numeric-input",visible:!1},min:0,max:9999}},defaults:{label:"Button",icon:"01M3QM74XG7DQZZXTPG1E8EBBC",boxShadowColor:"#000000",innerBoxShadowColor:"#000000",backgroundColor:"#2E12F0",textColor:"#ffffff",borderColor:"#ffffff",iconColor:"#ffffff",fontFamily:"Arial",fontSettings:{fontWeight:400,fontStyle:"normal"},blur:0,stateOverrides:{hover:{backgroundColor:"#3642EF"},active:{backgroundColor:"#475FFF"}}},layoutDefaults:{m:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/375,right:20/375,bottom:10/375,left:20/375},minWidth:0/375,minHeight:0/375,width:100/375,height:100/375,cornerRadius:20/375,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,blur:0,hoverEffect:"none",iconSize:16/375,gap:10/375,iconWidthC:16/375,fontSize:16/375,lineHeight:16/375,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},t:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/768,right:20/768,bottom:10/768,left:20/768},minWidth:0/768,minHeight:0/768,width:100/768,height:100/768,cornerRadius:20/768,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,blur:0,hoverEffect:"none",iconSize:16/768,gap:10/768,iconWidthC:16/768,fontSize:16/768,lineHeight:16/768,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},d:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/1440,right:20/1440,bottom:10/1440,left:20/1440},minWidth:0/1440,minHeight:0/1440,width:100/1440,height:100/1440,cornerRadius:20/1440,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,blur:0,hoverEffect:"none",iconSize:16/1440,gap:10/1440,iconWidthC:16/1440,fontSize:16/1440,lineHeight:16/1440,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}},layout:["__componentName__","type","label","icon","alignment","order","gap","iconSize","iconWidthC","hoverEffect",{type:"row",title:"",items:["dimensions","padding"]},"cornerRadius","blur","boxShadow","boxShadowColor","innerBoxShadow","innerBoxShadowColor",{type:"row",title:"",items:["stroke","borderColor"]},{type:"row",title:"",items:["minWidth","minHeight","width","height"]}],displayRules:[{if:{name:"type",value:"a"},then:{name:"properties.icon.display.visible",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignment.display.visible",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignA.display.visible",value:!0}},{if:{name:"type",value:"a"},then:{name:"properties.iconColor.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.icon.display.visible",value:!0}},{if:{name:"type",value:"b"},then:{name:"properties.label.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontFamily.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontSettings.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontSize.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.lineHeight.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.letterSpacing.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.wordSpacing.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.textAppearance.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.iconSize.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.icon.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.order.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.iconWidthC.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.gap.display.visible",value:!0}},{if:{name:"stroke",value:0},then:{name:"properties.borderColor.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.minWidth.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.minHeight.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.width.display.visible",value:!0}},{if:{name:"dimensions",value:!0},then:{name:"properties.height.display.visible",value:!0}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"",items:["label","icon","iconSize","alignA"]},{type:"row",title:"",items:["alignment","order"]},{type:"row",title:"",items:["gap","iconWidthC"]},{type:"row",title:"",items:["dimensions","padding"]},{type:"row",title:"",items:["minWidth","minHeight","width","height"]},{type:"row",title:"",items:["hoverEffect","cornerRadius"]},{type:"row",title:"",items:["blur"]},{type:"row",title:"",items:["boxShadow"]},{type:"row",title:"",items:["innerBoxShadow"]},{type:"row",title:"",items:["stroke"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily","fontSettings",{type:"row",title:"",items:["fontSize","lineHeight","letterSpacing","wordSpacing"]},"textAppearance"]}],paletteBookmark:{items:[...Ub],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"],hover:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"],active:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"]}},states:["default","hover","active"]},Kb={element:Vb,id:"simple-button",name:"Simple Button",category:"ui-elements",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/button-preview.png"},schema:qb,sourceCode:Gb,assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{fontSettings:"fontFamily"}};function Yb(e){return`
19012
+ `,Ub={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},qb=["backgroundColor","textColor","borderColor","iconColor","boxShadowColor","innerBoxShadowColor"],Kb={type:"object",version:1,settings:{sizing:"auto",hasLinkParameter:!0,properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},label:{type:"string",scope:"common",title:"Label",display:{type:"label-input"}},icon:{type:["string","null"],scope:"common",title:"Icon",display:{type:"settings-image-input",visible:!1}},alignment:{type:"string",scope:"layout",title:"Alignment",display:{type:"toggle-cycle",enum:["left","center","right"]}},alignA:{type:"string",scope:"layout",title:"Alignment",display:{type:"toggle-cycle",enum:["left","center","right"],visible:!1}},order:{type:"string",scope:"layout",title:"Order",display:{type:"toggle-cycle",enum:["text-icon","icon-text"],visible:!1}},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",visible:!1},min:0,max:9999},iconSize:{type:"number",scope:"layout",title:"Icon width",display:{type:"numeric-input",visible:!1},min:0,max:9999},iconWidthC:{type:"number",scope:"layout",title:"Icon width",display:{type:"numeric-input",visible:!1},min:0,max:9999},dimensions:{type:"boolean",scope:"layout",title:"Dimensions",display:{type:"toggle",enum:["auto","fixed"]}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",min:0,display:{type:"numeric-input"}},boxShadow:{type:"object",scope:"layout",title:"Shadow",display:{type:"padding-controls",step:.1,decimal:!0,allowNegative:!0,nonNegativeSides:["right"],sideLetters:{top:"Y",left:"X",right:"B",bottom:"S"}}},boxShadowColor:{type:"string",scope:"common",title:"Shadow Default",titleByState:{default:"Shadow Default",hover:"Shadow Hover",active:"Shadow Active"},display:{type:"palette-color-picker"}},innerBoxShadow:{type:"object",scope:"layout",title:"Inner shadow",display:{type:"padding-controls",step:.1,decimal:!0,allowNegative:!0,nonNegativeSides:["right"],sideLetters:{top:"Y",left:"X",right:"B",bottom:"S"}}},innerBoxShadowColor:{type:"string",scope:"common",title:"Inner Shadow Default",titleByState:{default:"Inner Shadow Default",hover:"Inner Shadow Hover",active:"Inner Shadow Active"},display:{type:"palette-color-picker"}},stroke:{type:"number",scope:"layout",title:"Stroke Width",display:{type:"numeric-input"},min:0,max:9999},blur:{type:"number",scope:"layout",title:"Blur",display:{type:"numeric-input"},min:0,max:100},backgroundColor:{type:"string",scope:"common",title:"BG Default",titleByState:{default:"BG Default",hover:"BG Hover",active:"BG Active"},display:{type:"palette-color-picker"}},textColor:{type:"string",scope:"common",title:"Text Default",titleByState:{default:"Text Default",hover:"Text Hover",active:"Text Active"},display:{type:"palette-color-picker"}},borderColor:{type:"string",scope:"common",title:"Border Default",titleByState:{default:"Border Default",hover:"Border Hover",active:"Border Active"},display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{default:"Icon Default",hover:"Icon Hover",active:"Icon Active"},display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},hoverEffect:{type:"string",scope:"layout",title:"Hover effect",display:{type:"toggle-cycle",enum:["none","scale-up","lift","reveal","swipe","content-roll"]}},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},fontSettings:{...Ub.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},fontSize:{type:"number",scope:"layout",title:"Font size",display:{type:"font-size"}},lineHeight:{type:"number",scope:"layout",title:"Line height",display:{type:"line-height-input"}},letterSpacing:{type:"number",scope:"layout",title:"Letter spacing",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",scope:"layout",title:"Word spacing",display:{type:"word-spacing-input"}},textAppearance:{type:"object",scope:"layout",title:"Text appearance",display:{type:"text-appearance"}},minWidth:{type:"number",scope:"layout",title:"Min width",display:{type:"numeric-input"},min:0,max:9999},minHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input",visible:!1},min:0,max:9999},height:{type:"number",scope:"layout",title:"Height",display:{type:"numeric-input",visible:!1},min:0,max:9999}},defaults:{label:"Button",icon:"01M3QM74XG7DQZZXTPG1E8EBBC",boxShadowColor:"#000000",innerBoxShadowColor:"#000000",backgroundColor:"#2E12F0",textColor:"#ffffff",borderColor:"#ffffff",iconColor:"#ffffff",fontFamily:"Arial",fontSettings:{fontWeight:400,fontStyle:"normal"},blur:0,stateOverrides:{hover:{backgroundColor:"#3642EF"},active:{backgroundColor:"#475FFF"}}},layoutDefaults:{m:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/375,right:20/375,bottom:10/375,left:20/375},minWidth:0/375,minHeight:0/375,width:100/375,height:100/375,cornerRadius:20/375,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,blur:0,hoverEffect:"none",iconSize:16/375,gap:10/375,iconWidthC:16/375,fontSize:16/375,lineHeight:16/375,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},t:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/768,right:20/768,bottom:10/768,left:20/768},minWidth:0/768,minHeight:0/768,width:100/768,height:100/768,cornerRadius:20/768,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,blur:0,hoverEffect:"none",iconSize:16/768,gap:10/768,iconWidthC:16/768,fontSize:16/768,lineHeight:16/768,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},d:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/1440,right:20/1440,bottom:10/1440,left:20/1440},minWidth:0/1440,minHeight:0/1440,width:100/1440,height:100/1440,cornerRadius:20/1440,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,blur:0,hoverEffect:"none",iconSize:16/1440,gap:10/1440,iconWidthC:16/1440,fontSize:16/1440,lineHeight:16/1440,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}},layout:["__componentName__","type","label","icon","alignment","order","gap","iconSize","iconWidthC","hoverEffect",{type:"row",title:"",items:["dimensions","padding"]},"cornerRadius","blur","boxShadow","boxShadowColor","innerBoxShadow","innerBoxShadowColor",{type:"row",title:"",items:["stroke","borderColor"]},{type:"row",title:"",items:["minWidth","minHeight","width","height"]}],displayRules:[{if:{name:"type",value:"a"},then:{name:"properties.icon.display.visible",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignment.display.visible",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignA.display.visible",value:!0}},{if:{name:"type",value:"a"},then:{name:"properties.iconColor.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.icon.display.visible",value:!0}},{if:{name:"type",value:"b"},then:{name:"properties.label.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontFamily.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontSettings.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontSize.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.lineHeight.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.letterSpacing.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.wordSpacing.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.textAppearance.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.iconSize.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.icon.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.order.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.iconWidthC.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.gap.display.visible",value:!0}},{if:{name:"stroke",value:0},then:{name:"properties.borderColor.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.minWidth.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.minHeight.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.width.display.visible",value:!0}},{if:{name:"dimensions",value:!0},then:{name:"properties.height.display.visible",value:!0}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"",items:["label","icon","iconSize","alignA"]},{type:"row",title:"",items:["alignment","order"]},{type:"row",title:"",items:["gap","iconWidthC"]},{type:"row",title:"",items:["dimensions","padding"]},{type:"row",title:"",items:["minWidth","minHeight","width","height"]},{type:"row",title:"",items:["hoverEffect","cornerRadius"]},{type:"row",title:"",items:["blur"]},{type:"row",title:"",items:["boxShadow"]},{type:"row",title:"",items:["innerBoxShadow"]},{type:"row",title:"",items:["stroke"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily","fontSettings",{type:"row",title:"",items:["fontSize","lineHeight","letterSpacing","wordSpacing"]},"textAppearance"]}],paletteBookmark:{items:[...qb],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"],hover:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"],active:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"]}},states:["default","hover","active"]},Yb={element:Gb,id:"simple-button",name:"Simple Button",category:"ui-elements",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/button-preview.png"},schema:Kb,sourceCode:Xb,assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{fontSettings:"fontFamily"}};function Qb(e){return`
19013
19013
  .${e}-titles-row {
19014
19014
  position: relative;
19015
19015
  flex: 0 1 auto;
@@ -19207,7 +19207,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
19207
19207
  pointer-events: auto;
19208
19208
  flex-shrink: 0;
19209
19209
  }
19210
- `}const Dn=500,Qo=650,Tn="cubic-bezier(0.22, 1, 0.36, 1)",Qb=72,Zb=50,Jb=1e4,eS=650,tS=500;function nS(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function Cp(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=Sa(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 iS(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?Cp(i,n):null}function oS(e){return e.reduce((t,n,i)=>{var o;return(o=n.image)!=null&&o.assetId&&t.push({gridIndex:i,items:[n.image],entry:{title1:n.title??"",title2:n.subtitle??"",title3:n.caption??""}}),t},[])}function or(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 pd(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return or(e,i,n)}const rS=.03;function Tp(e){return e.width*rS}const bs={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Kr(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function md(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function aS(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function qs(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,c=o/r;if(l>c){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const d=r*l;return{width:d,height:r,left:i.left+(o-d)/2,top:i.top}}function sS(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:qs(e,t.width,t.height)}function lS(e,t){if(b.isEmbedMedia(e)){t(e.assetId,b.getEmbedAspect(e),1);return}if(Va(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.assetId,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.assetId,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.assetId,n.naturalWidth,n.naturalHeight)},n.src=e.assetId}function cS(e){const t=new Set,n=[];for(const i of e){const o=i.image;!(o!=null&&o.assetId)||t.has(o.assetId)||(t.add(o.assetId),n.push(o))}return n}function dS({mediaList:e}){const t=e.filter(n=>!b.isEmbedMedia(n));return t.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:t.map(n=>Va(n)?a.jsx("video",{src:n.assetId,preload:"auto",muted:!0,playsInline:!0},n.assetId):a.jsx("img",{src:n.assetId,alt:""},n.assetId))})}function No(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:c}=n,d=Tp(n);return t==="left"?{left:l+d-i,top:r,width:i,height:o}:{left:l+c-d,top:r,width:i,height:o}}function Ta(e,t,n){const i=No(e,t,n);return{...i,left:2*i.left-e.left}}function uS(e,t,n){const{left:i,width:o}=n,r=Tp(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function Ip(e,t,n,i){const o=No(e,"left",i),r=No(e,"right",i),l=Ta(e,"left",i),c=Ta(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:c,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:c};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function pS(e,t,n,i){const{start:o,end:r}=Ip(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function mS(e,t,n){const i=No(e,t,n),o=Ta(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Va(e){return b.isEmbedMedia(e)?!1:e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.assetId)}function gS({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:r,onTransitionEnd:l}){const c=s.useRef(null);return s.useEffect(()=>{const d=c.current;return n==null||n(d??null),()=>{d==null||d.pause(),n==null||n(null)}},[e,n]),a.jsx("div",{style:i,onTransitionEnd:l,children:a.jsx("video",{ref:c,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:r,onClick:d=>d.stopPropagation(),style:o},e)})}function Yr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return b.isEmbedMedia(e)?a.jsx("img",{src:e.thumbnail,alt:e.name,style:t,onTransitionEnd:n}):Va(e)?a.jsx("video",{src:e.assetId,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.assetId,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.assetId,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.assetId,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function hS({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,canNavigate:d,lightboxEntries:u,entryIdx:p,layoutId:y,sourceRect:x,resolveCloseSourceRect:m,onClose:f,onPrev:S,onNext:w}){const N=s.useRef(null),v=s.useRef(null),M=s.useRef(null),R=s.useRef(new Map),[U,X]=s.useState(0),D=s.useRef(null),_=s.useRef(0),W=s.useRef(0),T=s.useRef("none"),C=s.useRef(!1),q=s.useRef(!1),E=s.useRef(!1),$=s.useRef(null),I=s.useRef(null),j=s.useRef(null),F=s.useRef(()=>{}),K=s.useRef(null),P=s.useRef(null),h=s.useRef(null),J=s.useRef(!1),[V,he]=s.useState(null),[k,ce]=s.useState(bs),[L,me]=s.useState(0),[te,ve]=s.useState("opening"),[Le,de]=s.useState(0),[ue,Z]=s.useState(0),[le,oe]=s.useState(!1),[ge,Se]=s.useState(null),[Ee,Ne]=s.useState(null),[Te,Ce]=s.useState(null),[g,Y]=s.useState(!1),[ee,ae]=s.useState(null),[ye,ne]=s.useState(!1),B=s.useRef(!1),[G,z]=s.useState(!1),[ie,H]=s.useState(!1),be=s.useRef(n),re=s.useRef(void 0),Q=t[n],Pe=Q?Va(Q):!1,Ae=Q?b.isEmbedMedia(Q):!1,He=ue!==0||le,Xe=!l&&(!r||!!c),Ue=d&&!l,Je=u.length>1,je=s.useCallback((O,Me)=>t.length<=1?null:t[(O+Me+t.length)%t.length]??null,[t]),xe=Je?or(u,p,-1):je(n,-1),Ie=Je?or(u,p,1):je(n,1),ze=ge===-1&&He?Je&&Ee!==null?or(u,Ee,-1):Te!==null?je(Te,-1):null:null,Ze=ge===1&&He?Je&&Ee!==null?or(u,Ee,1):Te!==null?je(Te,1):null:null,tt=ze&&ze.assetId!==(xe==null?void 0:xe.assetId)?ze:null,ot=Ze&&Ze.assetId!==(Ie==null?void 0:Ie.assetId)?Ze:null,lt=xe&&Ue?(()=>{const O=Je?pd(u,p,-1):t.length>2?je((n-1+t.length)%t.length,-1):null;return O&&O.assetId!==xe.assetId?O:null})():null,it=Ie&&Ue?(()=>{const O=Je?pd(u,p,1):t.length>2?je((n+1)%t.length,1):null;return O&&O.assetId!==Ie.assetId?O:null})():null,xt=tt??lt,rt=ot??it,_e=s.useCallback((O,Me,Fe)=>{if(!O||!Me||!Fe)return;const Oe=R.current,ft=Oe.get(O);(ft==null?void 0:ft.width)===Me&&(ft==null?void 0:ft.height)===Fe||(Oe.set(O,{width:Me,height:Fe}),X(Tt=>Tt+1))},[]),We=s.useCallback(O=>{if(!(O!=null&&O.assetId))return null;const Me=R.current.get(O.assetId);return sS(v.current,Me)},[U,L]),vt=s.useCallback(()=>{if(!Q)return;const O=We(Q);if(O){he(O);return}const Me=v.current;Me&&he(md(Me))},[Q,We]),Ve=s.useCallback(O=>{if(Je){const Me=u.length;Ne((p+O+Me)%Me),Ce(null);return}t.length>1&&(Ce((n+O+t.length)%t.length),Ne(null))},[Je,u.length,p,t.length,n]),Ke=s.useCallback(O=>{E.current=O,oe(O)},[]),pe=s.useCallback(()=>{$.current!==null&&(window.clearTimeout($.current),$.current=null)},[]),De=s.useCallback(()=>{pe(),$.current=window.setTimeout(()=>{pe(),Ke(!1)},Qo+32)},[pe,Ke]),qe=s.useCallback(()=>{const O=N.current;if(!O){ce({left:0,top:0,width:typeof window<"u"?window.innerWidth:bs.width,height:typeof window<"u"?window.innerHeight:bs.height});return}const Me=O.getBoundingClientRect();ce({left:Me.left,top:Me.top,width:Me.width,height:Me.height})},[]),bt=s.useCallback((O,Me)=>{if(He){if(G&&!le)return`translate(${ue}px, 0px)`;if(le&&ge!==null){const Fe=We(O);if(!Fe)return;const{x:Oe,y:ft}=pS(Fe,Me,ge,k);return`translate(${Oe}px, ${ft}px)`}if(le)return"translate(0px, 0px)"}},[He,G,le,ue,ge,k,We]),yt=s.useCallback(()=>{const O=I.current;I.current=null,pe(),Ke(!1),Se(null),Ne(null),Ce(null),Z(0),z(!1),C.current=!1,W.current=0,T.current="none",O===-1?S():O===1&&w()},[pe,Ke,S,w]),Et=s.useCallback(()=>{pe(),$.current=window.setTimeout(()=>{I.current!==null&&yt()},Qo+32)},[pe,yt]),ct=s.useCallback(()=>{pe(),I.current=null,Ke(!1),Se(null),Ne(null),Ce(null),Z(0),z(!1),C.current=!1,W.current=0,T.current="none"},[pe,Ke]),wt=s.useCallback(O=>{if(!(!Ue||!V)){if(E.current){if(I.current===O){j.current=O,yt();return}ct()}pe(),Ve(O),I.current=O,Se(O),Ke(!0),Et()}},[Ue,V,yt,ct,pe,Ve,Ke,Et]);F.current=wt;const nt=s.useCallback(()=>{K.current=null,J.current=!1,P.current!==null&&(window.clearInterval(P.current),P.current=null),h.current!==null&&(window.clearTimeout(h.current),h.current=null)},[]),Nt=s.useCallback(O=>{P.current!==null&&window.clearInterval(P.current);const Me=J.current?tS:eS;P.current=window.setInterval(()=>{F.current(O)},Me)},[]),jt=s.useCallback(O=>{K.current!==O&&(nt(),K.current=O,J.current=!1,F.current(O),Nt(O),h.current=window.setTimeout(()=>{h.current=null,K.current===O&&(J.current=!0,Nt(O))},Jb))},[nt,Nt]),$e=s.useCallback(()=>{const O=v.current;if(!O)return;const Me=Q==null?void 0:Q.assetId,Fe=Me?R.current.get(Me):void 0;if(Fe!=null&&Fe.width&&(Fe!=null&&Fe.height)){he(qs(O,Fe.width,Fe.height));return}const Oe=M.current;if(Oe&&Me&&(Oe.src===Me||Oe.currentSrc===Me)){const{width:Tt,height:et}=aS(Oe);if(Tt&&et){_e(Me,Tt,et),he(qs(O,Tt,et));return}}const ft=md(O);!ft.width||!ft.height||he(ft)},[Q==null?void 0:Q.assetId,_e]),Ge=s.useCallback(O=>{if(M.current=O,!!O){if(O instanceof HTMLVideoElement){O.readyState>=1&&O.videoWidth>0&&$e();return}O.complete&&O.naturalWidth>0&&$e()}},[$e]),ht=s.useCallback(()=>{qe(),$e(),me(O=>O+1)},[qe,$e]);s.useEffect(()=>{ht();const O=v.current,Me=N.current,Fe=new ResizeObserver(()=>ht());return O&&Fe.observe(O),Me&&Fe.observe(Me),window.addEventListener("resize",ht),()=>{Fe.disconnect(),window.removeEventListener("resize",ht)}},[ht,n,y]),s.useLayoutEffect(()=>{if(!Q)return;const O=M.current;if(O){if(O instanceof HTMLImageElement&&O.complete&&O.naturalWidth>0){$e();return}O instanceof HTMLVideoElement&&O.readyState>=1&&O.videoWidth>0&&$e()}},[Q==null?void 0:Q.assetId,n,$e]),s.useEffect(()=>{vt()},[vt,U]),s.useEffect(()=>{const O=new Set,Me=[],Fe=Oe=>{!(Oe!=null&&Oe.assetId)||O.has(Oe.assetId)||(O.add(Oe.assetId),Me.push(Oe))};t.forEach(Fe),u.forEach(Oe=>Oe.items.forEach(Fe)),Me.forEach(Oe=>{R.current.has(Oe.assetId)||lS(Oe,_e)})},[t,u,_e]),s.useEffect(()=>{if(te!=="opening"||!V)return;if(!x){ve("open");return}Y(!1);const O=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Y(!0),ve("open")})});return()=>cancelAnimationFrame(O)},[te,V,x]),s.useEffect(()=>{if(te!=="closing")return;const O=setTimeout(()=>f(),Dn);return()=>clearTimeout(O)},[te,f]),s.useEffect(()=>()=>{pe()},[pe]),s.useLayoutEffect(()=>{be.current===n&&re.current===(Q==null?void 0:Q.assetId)||(pe(),I.current=null,Se(null),Ne(null),Ce(null),de(0),Z(0),Ke(!1),H(!1),z(!1),_.current=0,W.current=0,T.current="none",C.current=!1,D.current=null,q.current=!1,M.current=null,vt(),be.current=n,re.current=Q==null?void 0:Q.assetId)},[n,Q==null?void 0:Q.assetId,Ke,pe,vt]),s.useLayoutEffect(()=>{const O=j.current;O!==null&&(j.current=null,requestAnimationFrame(()=>{F.current(O)}))},[n,p,Q==null?void 0:Q.assetId]),s.useLayoutEffect(()=>{if(te==="opening"){B.current=!1,ne(!1);return}if(te!=="open"||B.current)return;if(!xe&&!Ie){B.current=!0;return}ne(!1);const O=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ne(!0),B.current=!0})});return()=>cancelAnimationFrame(O)},[te,xe==null?void 0:xe.assetId,Ie==null?void 0:Ie.assetId]),s.useEffect(()=>{if(te!=="open")return;const O=()=>{const et=Mt=>{Mt.stopPropagation(),Mt.preventDefault(),document.removeEventListener("click",et,!0)};document.addEventListener("click",et,!0)},Me=et=>{const Mt=et<0?1:-1;pe(),Ve(Mt),I.current=Mt,Se(Mt),Ke(!0),Et()},Fe=et=>{if(Math.abs(et)>Zb&&Ue){Me(et);return}I.current=null,Se(null),Ne(null),Ce(null),Ke(!0),Z(0),De()},Oe=et=>{if(et.touches.length!==1||E.current)return;const Mt=et.touches[0];q.current=!0,D.current={x:Mt.clientX,y:Mt.clientY},T.current="none",W.current=0,C.current=!1},ft=et=>{if(!D.current||et.touches.length!==1||E.current)return;const Mt=et.touches[0],Ct=Mt.clientX-D.current.x,Ht=Mt.clientY-D.current.y;if(T.current==="none"){if(Math.abs(Ct)<10&&Math.abs(Ht)<10)return;if(Math.abs(Ct)>Math.abs(Ht)){if(!Ue)return;T.current="horizontal"}else if(Ht>0){if(!Xe)return;T.current="vertical"}else return}if(T.current==="horizontal"){C.current=!0,z(!0),W.current=Ct,Z(Ct),et.preventDefault();return}T.current==="vertical"&&(C.current=!0,z(!0),_.current=Ht,de(Ht),et.preventDefault())},Tt=()=>{if(!D.current)return;const et=T.current,Mt=C.current;if(Mt&&et==="horizontal")Fe(W.current),O();else if(Mt&&et==="vertical"){const Ct=_.current;if(Xe&&Ct>Qb){const Ht=window.innerHeight;_.current=Ht,H(!0),de(Ht),ve("closing")}else _.current=0,de(0);O()}else et==="horizontal"&&Math.abs(W.current)>0&&(Fe(W.current),O());D.current=null,T.current="none",W.current=0,C.current=!1,z(!1)};return document.addEventListener("touchstart",Oe,{passive:!0}),document.addEventListener("touchmove",ft,{passive:!1}),document.addEventListener("touchend",Tt),document.addEventListener("touchcancel",Tt),()=>{document.removeEventListener("touchstart",Oe),document.removeEventListener("touchmove",ft),document.removeEventListener("touchend",Tt),document.removeEventListener("touchcancel",Tt)}},[te,Ue,Ke,De,pe,Xe,Et,Ve]);const Lt=s.useCallback(()=>{const O=(m==null?void 0:m())??x??null;O&&V&&(ae(O),Y(!0)),ve("closing")},[m,x,V]);s.useEffect(()=>{const O=Oe=>{if(Oe.key==="Escape"){if(r&&c||te==="closing")return;nt(),Lt();return}if(Oe.key!=="ArrowLeft"&&Oe.key!=="ArrowRight"||te!=="open"||!Ue)return;Oe.preventDefault();const ft=Oe.key==="ArrowLeft"?-1:1;Oe.repeat&&K.current===ft||jt(ft)},Me=Oe=>{if(Oe.key!=="ArrowLeft"&&Oe.key!=="ArrowRight")return;const ft=Oe.key==="ArrowLeft"?-1:1;K.current===ft&&nt()},Fe=()=>{nt()};return window.addEventListener("keydown",O),window.addEventListener("keyup",Me),window.addEventListener("blur",Fe),()=>{window.removeEventListener("keydown",O),window.removeEventListener("keyup",Me),window.removeEventListener("blur",Fe),nt()}},[te,r,c,Lt,Ue,jt,nt]),s.useEffect(()=>{te!=="open"&&nt()},[te,nt]);const $t=()=>{te==="closing"||l||Lt()},mt=te==="open",_t=te==="closing",Ot=Le>0?Math.max(0,1-Le/500):1,zt=Le>0?Math.max(.35,1-Le/500):1,Re=s.useCallback(O=>{if(!(O.propertyName!=="transform"||!E.current)){if(I.current!==null){yt();return}pe(),Ke(!1)}},[pe,Ke,yt]),dt=te==="closing"?ee??x:x,ut=dt&&V&&(te==="opening"||_t)?nS(dt,V):void 0,kt=He&&Q?bt(Q,"center"):Le>0?`translateY(${Le}px)`:ut,Qe=V?Kr(V,k):null,at=!!(dt&&V),It=at&&(te==="closing"||te==="open"&&g),At={position:"absolute",top:Qe==null?void 0:Qe.top,left:Qe==null?void 0:Qe.left,width:Qe==null?void 0:Qe.width,height:Qe==null?void 0:Qe.height,objectFit:"contain",transformOrigin:"top left",transform:kt,opacity:Le>0?zt:at?1:te==="opening"||_t?0:1,transition:G&&!le?"none":le?`transform ${Qo}ms ${Tn}`:ie?`transform ${Dn}ms ${Tn}, opacity ${Dn}ms ${Tn}`:It?`transform ${Dn}ms ${Tn}`:te==="opening"||_t?`opacity ${Dn}ms ${Tn}`:"none",pointerEvents:(Pe||Ae)&&mt&&!He?"auto":"none",touchAction:(Pe||Ae)&&mt?"none":void 0,zIndex:1,overflow:Pe||Ae?"hidden":void 0},pt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:mt&&!He?"auto":"none"},Ut=(O,Me,Fe="adjacent")=>{const Oe=We(O);if(!Oe)return{display:"none"};const ft=Fe==="far"?Me==="left"?"far-left":"far-right":Me==="left"?"left-adjacent":"right-adjacent",{start:Tt}=ge!==null?Ip(Oe,ft,ge,k):{start:Fe==="far"?Ta(Oe,Me,k):No(Oe,Me,k)},et=Kr(Tt,k),Mt=bt(O,ft),Ct=!He&&Fe==="adjacent"&&mt&&!ye?mS(Oe,Me,k):null,Ht=Fe==="far"&&He&&ge===(Me==="left"?-1:1),on=G&&!le?!1:le,fn=Fe==="adjacent"&&mt&&ye&&!He;return{position:"absolute",top:et.top,left:et.left,width:et.width,height:et.height,objectFit:"contain",transform:Mt??(Ct?`translate(${Ct.x}px, ${Ct.y}px)`:void 0),opacity:Fe==="far"?mt&&Ht?1:0:mt?1:0,transition:on?Fe==="far"?`transform ${Qo}ms ${Tn}`:`transform ${Qo}ms ${Tn}, opacity ${Dn}ms ${Tn}`:fn?`transform ${Dn}ms ${Tn}`:te==="opening"||_t?`opacity ${Dn}ms ${Tn}`:"none",pointerEvents:"none",zIndex:1}},qt=(O,Me)=>{const Fe=We(O);return Fe?uS(No(Fe,Me,k),Me,k):null},Dt=O=>Me=>{if(!l){if(q.current){q.current=!1;return}Me.stopPropagation(),wt(O)}},Vt=xe?qt(xe,"left"):null,Gt=Ie?qt(Ie,"right"):null,Bt=Vt?Kr(Vt,k):null,Yt=Gt?Kr(Gt,k):null;return a.jsxs("div",{ref:N,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:te==="open"?"none":void 0},onClick:$t,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:mt?Ot:0,transition:G?"none":`opacity ${Dn}ms ${Tn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:v,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:mt?1:0,transition:G?"none":`opacity ${Dn}ms ${Tn}`,pointerEvents:"none"},children:a.jsx(sp,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,onClose:$t})})]}),mt&&xt&&a.jsx(Yr,{media:xt,style:Ut(xt,"left","far"),onMeasure:_e,onTransitionEnd:Re},`far-prev-${xt.assetId}`),mt&&xe&&a.jsxs(a.Fragment,{children:[a.jsx(Yr,{media:xe,style:Ut(xe,"left"),onMeasure:_e,onTransitionEnd:Re},`prev-${xe.assetId}`),Bt&&a.jsx("div",{style:{position:"absolute",top:Bt.top,left:Bt.left,width:Bt.width,height:Bt.height,cursor:l||G?"default":"pointer",pointerEvents:l||G?"none":"auto",zIndex:3},onClick:Dt(-1)})]}),mt&&Ie&&a.jsxs(a.Fragment,{children:[a.jsx(Yr,{media:Ie,style:Ut(Ie,"right"),onMeasure:_e,onTransitionEnd:Re},`next-${Ie.assetId}`),Yt&&a.jsx("div",{style:{position:"absolute",top:Yt.top,left:Yt.left,width:Yt.width,height:Yt.height,cursor:l||G?"default":"pointer",pointerEvents:l||G?"none":"auto",zIndex:3},onClick:Dt(1)})]}),mt&&rt&&a.jsx(Yr,{media:rt,style:Ut(rt,"right","far"),onMeasure:_e,onTransitionEnd:Re},`far-next-${rt.assetId}`),V&&Q&&(Ae?a.jsx("div",{style:At,onTransitionEnd:Re,children:a.jsx(b.EmbedMediaFrame,{media:Q,mode:"player",fit:"contain",lazy:!1,interactive:mt&&!He,style:pt})},`${n}-${Q.assetId}`):Pe?a.jsx(gS,{src:Q.assetId,phase:te,onMediaElement:Ge,wrapperStyle:At,videoStyle:pt,onLoadedMetadata:$e,onTransitionEnd:Re},`${n}-${Q.assetId}`):a.jsx("img",{ref:Ge,src:Q.assetId,alt:Q.name,onLoad:$e,onTransitionEnd:Re,style:At},`${n}-${Q.assetId}`))]})}const fS=20,yS=.18;function vS(e){return`
19210
+ `}const Dn=500,Qo=650,Tn="cubic-bezier(0.22, 1, 0.36, 1)",Zb=72,Jb=50,eS=1e4,tS=650,nS=500;function iS(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function Tp(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=wa(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 oS(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?Tp(i,n):null}function rS(e){return e.reduce((t,n,i)=>{var o;return(o=n.image)!=null&&o.assetId&&t.push({gridIndex:i,items:[n.image],entry:{title1:n.title??"",title2:n.subtitle??"",title3:n.caption??""}}),t},[])}function or(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 md(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return or(e,i,n)}const aS=.03;function Ip(e){return e.width*aS}const Ss={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Kr(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function gd(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function sS(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Ks(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,c=o/r;if(l>c){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const d=r*l;return{width:d,height:r,left:i.left+(o-d)/2,top:i.top}}function lS(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Ks(e,t.width,t.height)}function cS(e,t){if(b.isEmbedMedia(e)){t(e.assetId,b.getEmbedAspect(e),1);return}if(Ga(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.assetId,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.assetId,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.assetId,n.naturalWidth,n.naturalHeight)},n.src=e.assetId}function dS(e){const t=new Set,n=[];for(const i of e){const o=i.image;!(o!=null&&o.assetId)||t.has(o.assetId)||(t.add(o.assetId),n.push(o))}return n}function uS({mediaList:e}){const t=e.filter(n=>!b.isEmbedMedia(n));return t.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:t.map(n=>Ga(n)?a.jsx("video",{src:n.assetId,preload:"auto",muted:!0,playsInline:!0},n.assetId):a.jsx("img",{src:n.assetId,alt:""},n.assetId))})}function No(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:c}=n,d=Ip(n);return t==="left"?{left:l+d-i,top:r,width:i,height:o}:{left:l+c-d,top:r,width:i,height:o}}function Ia(e,t,n){const i=No(e,t,n);return{...i,left:2*i.left-e.left}}function pS(e,t,n){const{left:i,width:o}=n,r=Ip(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function Lp(e,t,n,i){const o=No(e,"left",i),r=No(e,"right",i),l=Ia(e,"left",i),c=Ia(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:c,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:c};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function mS(e,t,n,i){const{start:o,end:r}=Lp(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function gS(e,t,n){const i=No(e,t,n),o=Ia(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Ga(e){return b.isEmbedMedia(e)?!1:e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.assetId)}function hS({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:r,onTransitionEnd:l}){const c=s.useRef(null);return s.useEffect(()=>{const d=c.current;return n==null||n(d??null),()=>{d==null||d.pause(),n==null||n(null)}},[e,n]),a.jsx("div",{style:i,onTransitionEnd:l,children:a.jsx("video",{ref:c,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:r,onClick:d=>d.stopPropagation(),style:o},e)})}function Yr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return b.isEmbedMedia(e)?a.jsx("img",{src:e.thumbnail,alt:e.name,style:t,onTransitionEnd:n}):Ga(e)?a.jsx("video",{src:e.assetId,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.assetId,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.assetId,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.assetId,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function fS({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,canNavigate:d,lightboxEntries:u,entryIdx:p,layoutId:y,sourceRect:x,resolveCloseSourceRect:m,onClose:f,onPrev:S,onNext:w}){const N=s.useRef(null),v=s.useRef(null),M=s.useRef(null),E=s.useRef(new Map),[U,X]=s.useState(0),D=s.useRef(null),_=s.useRef(0),W=s.useRef(0),T=s.useRef("none"),C=s.useRef(!1),q=s.useRef(!1),R=s.useRef(!1),$=s.useRef(null),I=s.useRef(null),j=s.useRef(null),F=s.useRef(()=>{}),K=s.useRef(null),P=s.useRef(null),h=s.useRef(null),J=s.useRef(!1),[V,he]=s.useState(null),[k,ce]=s.useState(Ss),[L,me]=s.useState(0),[te,ve]=s.useState("opening"),[Le,de]=s.useState(0),[ue,Z]=s.useState(0),[le,oe]=s.useState(!1),[ge,Se]=s.useState(null),[Re,Ne]=s.useState(null),[Te,Ce]=s.useState(null),[g,Y]=s.useState(!1),[ee,ae]=s.useState(null),[ye,ne]=s.useState(!1),B=s.useRef(!1),[G,z]=s.useState(!1),[ie,H]=s.useState(!1),be=s.useRef(n),re=s.useRef(void 0),Q=t[n],Pe=Q?Ga(Q):!1,Ae=Q?b.isEmbedMedia(Q):!1,He=ue!==0||le,Xe=!l&&(!r||!!c),Ue=d&&!l,Je=u.length>1,je=s.useCallback((O,Me)=>t.length<=1?null:t[(O+Me+t.length)%t.length]??null,[t]),xe=Je?or(u,p,-1):je(n,-1),Ie=Je?or(u,p,1):je(n,1),ze=ge===-1&&He?Je&&Re!==null?or(u,Re,-1):Te!==null?je(Te,-1):null:null,Ze=ge===1&&He?Je&&Re!==null?or(u,Re,1):Te!==null?je(Te,1):null:null,tt=ze&&ze.assetId!==(xe==null?void 0:xe.assetId)?ze:null,ot=Ze&&Ze.assetId!==(Ie==null?void 0:Ie.assetId)?Ze:null,lt=xe&&Ue?(()=>{const O=Je?md(u,p,-1):t.length>2?je((n-1+t.length)%t.length,-1):null;return O&&O.assetId!==xe.assetId?O:null})():null,it=Ie&&Ue?(()=>{const O=Je?md(u,p,1):t.length>2?je((n+1)%t.length,1):null;return O&&O.assetId!==Ie.assetId?O:null})():null,xt=tt??lt,rt=ot??it,_e=s.useCallback((O,Me,Fe)=>{if(!O||!Me||!Fe)return;const Oe=E.current,ft=Oe.get(O);(ft==null?void 0:ft.width)===Me&&(ft==null?void 0:ft.height)===Fe||(Oe.set(O,{width:Me,height:Fe}),X(Tt=>Tt+1))},[]),We=s.useCallback(O=>{if(!(O!=null&&O.assetId))return null;const Me=E.current.get(O.assetId);return lS(v.current,Me)},[U,L]),vt=s.useCallback(()=>{if(!Q)return;const O=We(Q);if(O){he(O);return}const Me=v.current;Me&&he(gd(Me))},[Q,We]),Ve=s.useCallback(O=>{if(Je){const Me=u.length;Ne((p+O+Me)%Me),Ce(null);return}t.length>1&&(Ce((n+O+t.length)%t.length),Ne(null))},[Je,u.length,p,t.length,n]),Ke=s.useCallback(O=>{R.current=O,oe(O)},[]),pe=s.useCallback(()=>{$.current!==null&&(window.clearTimeout($.current),$.current=null)},[]),De=s.useCallback(()=>{pe(),$.current=window.setTimeout(()=>{pe(),Ke(!1)},Qo+32)},[pe,Ke]),qe=s.useCallback(()=>{const O=N.current;if(!O){ce({left:0,top:0,width:typeof window<"u"?window.innerWidth:Ss.width,height:typeof window<"u"?window.innerHeight:Ss.height});return}const Me=O.getBoundingClientRect();ce({left:Me.left,top:Me.top,width:Me.width,height:Me.height})},[]),bt=s.useCallback((O,Me)=>{if(He){if(G&&!le)return`translate(${ue}px, 0px)`;if(le&&ge!==null){const Fe=We(O);if(!Fe)return;const{x:Oe,y:ft}=mS(Fe,Me,ge,k);return`translate(${Oe}px, ${ft}px)`}if(le)return"translate(0px, 0px)"}},[He,G,le,ue,ge,k,We]),yt=s.useCallback(()=>{const O=I.current;I.current=null,pe(),Ke(!1),Se(null),Ne(null),Ce(null),Z(0),z(!1),C.current=!1,W.current=0,T.current="none",O===-1?S():O===1&&w()},[pe,Ke,S,w]),Rt=s.useCallback(()=>{pe(),$.current=window.setTimeout(()=>{I.current!==null&&yt()},Qo+32)},[pe,yt]),ct=s.useCallback(()=>{pe(),I.current=null,Ke(!1),Se(null),Ne(null),Ce(null),Z(0),z(!1),C.current=!1,W.current=0,T.current="none"},[pe,Ke]),wt=s.useCallback(O=>{if(!(!Ue||!V)){if(R.current){if(I.current===O){j.current=O,yt();return}ct()}pe(),Ve(O),I.current=O,Se(O),Ke(!0),Rt()}},[Ue,V,yt,ct,pe,Ve,Ke,Rt]);F.current=wt;const nt=s.useCallback(()=>{K.current=null,J.current=!1,P.current!==null&&(window.clearInterval(P.current),P.current=null),h.current!==null&&(window.clearTimeout(h.current),h.current=null)},[]),Nt=s.useCallback(O=>{P.current!==null&&window.clearInterval(P.current);const Me=J.current?nS:tS;P.current=window.setInterval(()=>{F.current(O)},Me)},[]),jt=s.useCallback(O=>{K.current!==O&&(nt(),K.current=O,J.current=!1,F.current(O),Nt(O),h.current=window.setTimeout(()=>{h.current=null,K.current===O&&(J.current=!0,Nt(O))},eS))},[nt,Nt]),$e=s.useCallback(()=>{const O=v.current;if(!O)return;const Me=Q==null?void 0:Q.assetId,Fe=Me?E.current.get(Me):void 0;if(Fe!=null&&Fe.width&&(Fe!=null&&Fe.height)){he(Ks(O,Fe.width,Fe.height));return}const Oe=M.current;if(Oe&&Me&&(Oe.src===Me||Oe.currentSrc===Me)){const{width:Tt,height:et}=sS(Oe);if(Tt&&et){_e(Me,Tt,et),he(Ks(O,Tt,et));return}}const ft=gd(O);!ft.width||!ft.height||he(ft)},[Q==null?void 0:Q.assetId,_e]),Ge=s.useCallback(O=>{if(M.current=O,!!O){if(O instanceof HTMLVideoElement){O.readyState>=1&&O.videoWidth>0&&$e();return}O.complete&&O.naturalWidth>0&&$e()}},[$e]),ht=s.useCallback(()=>{qe(),$e(),me(O=>O+1)},[qe,$e]);s.useEffect(()=>{ht();const O=v.current,Me=N.current,Fe=new ResizeObserver(()=>ht());return O&&Fe.observe(O),Me&&Fe.observe(Me),window.addEventListener("resize",ht),()=>{Fe.disconnect(),window.removeEventListener("resize",ht)}},[ht,n,y]),s.useLayoutEffect(()=>{if(!Q)return;const O=M.current;if(O){if(O instanceof HTMLImageElement&&O.complete&&O.naturalWidth>0){$e();return}O instanceof HTMLVideoElement&&O.readyState>=1&&O.videoWidth>0&&$e()}},[Q==null?void 0:Q.assetId,n,$e]),s.useEffect(()=>{vt()},[vt,U]),s.useEffect(()=>{const O=new Set,Me=[],Fe=Oe=>{!(Oe!=null&&Oe.assetId)||O.has(Oe.assetId)||(O.add(Oe.assetId),Me.push(Oe))};t.forEach(Fe),u.forEach(Oe=>Oe.items.forEach(Fe)),Me.forEach(Oe=>{E.current.has(Oe.assetId)||cS(Oe,_e)})},[t,u,_e]),s.useEffect(()=>{if(te!=="opening"||!V)return;if(!x){ve("open");return}Y(!1);const O=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Y(!0),ve("open")})});return()=>cancelAnimationFrame(O)},[te,V,x]),s.useEffect(()=>{if(te!=="closing")return;const O=setTimeout(()=>f(),Dn);return()=>clearTimeout(O)},[te,f]),s.useEffect(()=>()=>{pe()},[pe]),s.useLayoutEffect(()=>{be.current===n&&re.current===(Q==null?void 0:Q.assetId)||(pe(),I.current=null,Se(null),Ne(null),Ce(null),de(0),Z(0),Ke(!1),H(!1),z(!1),_.current=0,W.current=0,T.current="none",C.current=!1,D.current=null,q.current=!1,M.current=null,vt(),be.current=n,re.current=Q==null?void 0:Q.assetId)},[n,Q==null?void 0:Q.assetId,Ke,pe,vt]),s.useLayoutEffect(()=>{const O=j.current;O!==null&&(j.current=null,requestAnimationFrame(()=>{F.current(O)}))},[n,p,Q==null?void 0:Q.assetId]),s.useLayoutEffect(()=>{if(te==="opening"){B.current=!1,ne(!1);return}if(te!=="open"||B.current)return;if(!xe&&!Ie){B.current=!0;return}ne(!1);const O=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ne(!0),B.current=!0})});return()=>cancelAnimationFrame(O)},[te,xe==null?void 0:xe.assetId,Ie==null?void 0:Ie.assetId]),s.useEffect(()=>{if(te!=="open")return;const O=()=>{const et=Mt=>{Mt.stopPropagation(),Mt.preventDefault(),document.removeEventListener("click",et,!0)};document.addEventListener("click",et,!0)},Me=et=>{const Mt=et<0?1:-1;pe(),Ve(Mt),I.current=Mt,Se(Mt),Ke(!0),Rt()},Fe=et=>{if(Math.abs(et)>Jb&&Ue){Me(et);return}I.current=null,Se(null),Ne(null),Ce(null),Ke(!0),Z(0),De()},Oe=et=>{if(et.touches.length!==1||R.current)return;const Mt=et.touches[0];q.current=!0,D.current={x:Mt.clientX,y:Mt.clientY},T.current="none",W.current=0,C.current=!1},ft=et=>{if(!D.current||et.touches.length!==1||R.current)return;const Mt=et.touches[0],Ct=Mt.clientX-D.current.x,Ht=Mt.clientY-D.current.y;if(T.current==="none"){if(Math.abs(Ct)<10&&Math.abs(Ht)<10)return;if(Math.abs(Ct)>Math.abs(Ht)){if(!Ue)return;T.current="horizontal"}else if(Ht>0){if(!Xe)return;T.current="vertical"}else return}if(T.current==="horizontal"){C.current=!0,z(!0),W.current=Ct,Z(Ct),et.preventDefault();return}T.current==="vertical"&&(C.current=!0,z(!0),_.current=Ht,de(Ht),et.preventDefault())},Tt=()=>{if(!D.current)return;const et=T.current,Mt=C.current;if(Mt&&et==="horizontal")Fe(W.current),O();else if(Mt&&et==="vertical"){const Ct=_.current;if(Xe&&Ct>Zb){const Ht=window.innerHeight;_.current=Ht,H(!0),de(Ht),ve("closing")}else _.current=0,de(0);O()}else et==="horizontal"&&Math.abs(W.current)>0&&(Fe(W.current),O());D.current=null,T.current="none",W.current=0,C.current=!1,z(!1)};return document.addEventListener("touchstart",Oe,{passive:!0}),document.addEventListener("touchmove",ft,{passive:!1}),document.addEventListener("touchend",Tt),document.addEventListener("touchcancel",Tt),()=>{document.removeEventListener("touchstart",Oe),document.removeEventListener("touchmove",ft),document.removeEventListener("touchend",Tt),document.removeEventListener("touchcancel",Tt)}},[te,Ue,Ke,De,pe,Xe,Rt,Ve]);const Lt=s.useCallback(()=>{const O=(m==null?void 0:m())??x??null;O&&V&&(ae(O),Y(!0)),ve("closing")},[m,x,V]);s.useEffect(()=>{const O=Oe=>{if(Oe.key==="Escape"){if(r&&c||te==="closing")return;nt(),Lt();return}if(Oe.key!=="ArrowLeft"&&Oe.key!=="ArrowRight"||te!=="open"||!Ue)return;Oe.preventDefault();const ft=Oe.key==="ArrowLeft"?-1:1;Oe.repeat&&K.current===ft||jt(ft)},Me=Oe=>{if(Oe.key!=="ArrowLeft"&&Oe.key!=="ArrowRight")return;const ft=Oe.key==="ArrowLeft"?-1:1;K.current===ft&&nt()},Fe=()=>{nt()};return window.addEventListener("keydown",O),window.addEventListener("keyup",Me),window.addEventListener("blur",Fe),()=>{window.removeEventListener("keydown",O),window.removeEventListener("keyup",Me),window.removeEventListener("blur",Fe),nt()}},[te,r,c,Lt,Ue,jt,nt]),s.useEffect(()=>{te!=="open"&&nt()},[te,nt]);const $t=()=>{te==="closing"||l||Lt()},mt=te==="open",_t=te==="closing",Ot=Le>0?Math.max(0,1-Le/500):1,zt=Le>0?Math.max(.35,1-Le/500):1,Ee=s.useCallback(O=>{if(!(O.propertyName!=="transform"||!R.current)){if(I.current!==null){yt();return}pe(),Ke(!1)}},[pe,Ke,yt]),dt=te==="closing"?ee??x:x,ut=dt&&V&&(te==="opening"||_t)?iS(dt,V):void 0,kt=He&&Q?bt(Q,"center"):Le>0?`translateY(${Le}px)`:ut,Qe=V?Kr(V,k):null,at=!!(dt&&V),It=at&&(te==="closing"||te==="open"&&g),At={position:"absolute",top:Qe==null?void 0:Qe.top,left:Qe==null?void 0:Qe.left,width:Qe==null?void 0:Qe.width,height:Qe==null?void 0:Qe.height,objectFit:"contain",transformOrigin:"top left",transform:kt,opacity:Le>0?zt:at?1:te==="opening"||_t?0:1,transition:G&&!le?"none":le?`transform ${Qo}ms ${Tn}`:ie?`transform ${Dn}ms ${Tn}, opacity ${Dn}ms ${Tn}`:It?`transform ${Dn}ms ${Tn}`:te==="opening"||_t?`opacity ${Dn}ms ${Tn}`:"none",pointerEvents:(Pe||Ae)&&mt&&!He?"auto":"none",touchAction:(Pe||Ae)&&mt?"none":void 0,zIndex:1,overflow:Pe||Ae?"hidden":void 0},pt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:mt&&!He?"auto":"none"},Ut=(O,Me,Fe="adjacent")=>{const Oe=We(O);if(!Oe)return{display:"none"};const ft=Fe==="far"?Me==="left"?"far-left":"far-right":Me==="left"?"left-adjacent":"right-adjacent",{start:Tt}=ge!==null?Lp(Oe,ft,ge,k):{start:Fe==="far"?Ia(Oe,Me,k):No(Oe,Me,k)},et=Kr(Tt,k),Mt=bt(O,ft),Ct=!He&&Fe==="adjacent"&&mt&&!ye?gS(Oe,Me,k):null,Ht=Fe==="far"&&He&&ge===(Me==="left"?-1:1),on=G&&!le?!1:le,fn=Fe==="adjacent"&&mt&&ye&&!He;return{position:"absolute",top:et.top,left:et.left,width:et.width,height:et.height,objectFit:"contain",transform:Mt??(Ct?`translate(${Ct.x}px, ${Ct.y}px)`:void 0),opacity:Fe==="far"?mt&&Ht?1:0:mt?1:0,transition:on?Fe==="far"?`transform ${Qo}ms ${Tn}`:`transform ${Qo}ms ${Tn}, opacity ${Dn}ms ${Tn}`:fn?`transform ${Dn}ms ${Tn}`:te==="opening"||_t?`opacity ${Dn}ms ${Tn}`:"none",pointerEvents:"none",zIndex:1}},qt=(O,Me)=>{const Fe=We(O);return Fe?pS(No(Fe,Me,k),Me,k):null},Dt=O=>Me=>{if(!l){if(q.current){q.current=!1;return}Me.stopPropagation(),wt(O)}},Vt=xe?qt(xe,"left"):null,Gt=Ie?qt(Ie,"right"):null,Bt=Vt?Kr(Vt,k):null,Yt=Gt?Kr(Gt,k):null;return a.jsxs("div",{ref:N,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:te==="open"?"none":void 0},onClick:$t,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:mt?Ot:0,transition:G?"none":`opacity ${Dn}ms ${Tn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:v,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:mt?1:0,transition:G?"none":`opacity ${Dn}ms ${Tn}`,pointerEvents:"none"},children:a.jsx(lp,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,onClose:$t})})]}),mt&&xt&&a.jsx(Yr,{media:xt,style:Ut(xt,"left","far"),onMeasure:_e,onTransitionEnd:Ee},`far-prev-${xt.assetId}`),mt&&xe&&a.jsxs(a.Fragment,{children:[a.jsx(Yr,{media:xe,style:Ut(xe,"left"),onMeasure:_e,onTransitionEnd:Ee},`prev-${xe.assetId}`),Bt&&a.jsx("div",{style:{position:"absolute",top:Bt.top,left:Bt.left,width:Bt.width,height:Bt.height,cursor:l||G?"default":"pointer",pointerEvents:l||G?"none":"auto",zIndex:3},onClick:Dt(-1)})]}),mt&&Ie&&a.jsxs(a.Fragment,{children:[a.jsx(Yr,{media:Ie,style:Ut(Ie,"right"),onMeasure:_e,onTransitionEnd:Ee},`next-${Ie.assetId}`),Yt&&a.jsx("div",{style:{position:"absolute",top:Yt.top,left:Yt.left,width:Yt.width,height:Yt.height,cursor:l||G?"default":"pointer",pointerEvents:l||G?"none":"auto",zIndex:3},onClick:Dt(1)})]}),mt&&rt&&a.jsx(Yr,{media:rt,style:Ut(rt,"right","far"),onMeasure:_e,onTransitionEnd:Ee},`far-next-${rt.assetId}`),V&&Q&&(Ae?a.jsx("div",{style:At,onTransitionEnd:Ee,children:a.jsx(b.EmbedMediaFrame,{media:Q,mode:"player",fit:"contain",lazy:!1,interactive:mt&&!He,style:pt})},`${n}-${Q.assetId}`):Pe?a.jsx(hS,{src:Q.assetId,phase:te,onMediaElement:Ge,wrapperStyle:At,videoStyle:pt,onLoadedMetadata:$e,onTransitionEnd:Ee},`${n}-${Q.assetId}`):a.jsx("img",{ref:Ge,src:Q.assetId,alt:Q.name,onLoad:$e,onTransitionEnd:Ee,style:At},`${n}-${Q.assetId}`))]})}const yS=20,vS=.18;function xS(e){return`
19211
19211
  .${e}-wrapper {
19212
19212
  box-sizing: border-box;
19213
19213
  max-width: 100%;
@@ -19295,8 +19295,8 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
19295
19295
  z-index: 2;
19296
19296
  pointer-events: auto;
19297
19297
  }
19298
- ${Yb(e)}
19299
- `}function xS(e){const{imageDisplay:t}=e??{},n=(t==null?void 0:t.ratioValue)??"1:1",i=(t==null?void 0:t.reversed)??!1,[o,r]=n.split(":").map(Number),l=i?r:o,c=i?o:r;return c>0?l/c:1}function bS(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 SS(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:b.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:b.scalingValue(i*yS,n??!1),[`--${t}-image-aspect`]:xS(e)}}function wS(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 nn(n,t)}function $S(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 CS(e,t,n,i,o,r){if(!(!e||!t))return l=>{var d;const c=((d=l.currentTarget.closest(`.${i}-item`))==null?void 0:d.querySelector(`[data-waterfall-index="${n}"]`))??(l.currentTarget instanceof HTMLImageElement||l.currentTarget instanceof HTMLVideoElement?l.currentTarget:null);r(n,c?Cp(c,o):void 0)}}function TS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:c}=b.useScopedStyles(),d=s.useMemo(()=>vS(c),[c]),u=t??[],p=(e==null?void 0:e.type)??"a",y=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,x=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,m=b.scalingValue(x,n??!1),f=`max(${m}, ${fS}px)`,{objectFitMode:S,imageStyle:w}=$S(e),N=wS(e,n),v=s.useRef(null),[M,R]=s.useState(!1),[U,X]=s.useState([]),[D,_]=s.useState(0),[W,T]=s.useState(0),[C,q]=s.useState(null),[E,$]=s.useState({title1:"",title2:"",title3:""}),I=(!n||i)&&!M,j=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},F=j.sizeType??"none",K=I&&F!=="none"?`${c}-item-image-hover-${F}`:void 0,P=(j.value??120)/100,h=s.useCallback(ue=>{!ue||F!=="scale"||(ue.style.transformOrigin=ff(ue))},[F]),J=s.useCallback(ue=>{if(ue){if(S==="contain"){const Z=bS(ue);if(Z){const le=ue.closest(`.${c}-item-image`);le instanceof HTMLElement&&le.style.setProperty(`--${c}-item-media-aspect`,String(Z))}}h(ue)}},[c,h,S]),V={width:b.scalingValue(y,n??!1),...N,...SS(e,c,n),[`--${c}-image-hover-scale`]:String(P)},he=(()=>{const ue={},Z=v.current?getComputedStyle(v.current).getPropertyValue("--cntrl-article-width").trim():"";return Z&&(ue["--cntrl-article-width"]=Z),ue})(),k=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),ce=s.useMemo(()=>oS(u),[u]),L=s.useMemo(()=>cS(u),[u]),me=(ue,Z)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const le=ce.findIndex(ge=>ge.gridIndex===ue);if(le<0)return;const oe=ce[le];T(le),X(oe.items),_(0),$(oe.entry),q(Z??null),R(!0)},te=s.useCallback(()=>{R(!1),q(null)},[]),ve=s.useCallback(()=>{const ue=ce[W];return!ue||!v.current?C:iS(v.current,ue.gridIndex,S)??C},[ce,W,C,S]),Le=s.useCallback(ue=>{if(ce.length>1){const Z=ce.length,le=(W+ue+Z)%Z,oe=ce[le];T(le),X(oe.items),_(0),$(oe.entry);return}_(Z=>(Z+ue+U.length)%U.length)},[ce,W,U.length]),de=ce.length>1||U.length>1;return s.useEffect(()=>{if(!M||typeof document>"u")return;const ue=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ue}},[M]),s.useEffect(()=>{!n||o||i||R(!1)},[n,o,i]),s.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&R(!1)},[e==null?void 0:e.lightbox]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),a.jsx(dS,{mediaList:L}),a.jsx("div",{ref:v,className:`${c}-wrapper ${c}-type-${p}`,style:V,children:u.map((ue,Z)=>{var ge,Se;const le=!!((ge=ue.image)!=null&&ge.assetId),oe=CS(!!k,le,Z,c,S,me);return a.jsxs("div",{className:`${c}-item`,children:[ue.title?a.jsx("span",{className:`${c}-item-title`,onClick:oe,style:oe?{cursor:"pointer"}:void 0,children:ue.title}):null,(Se=ue.image)!=null&&Se.assetId?a.jsx("span",{className:[`${c}-item-image`,S==="contain"?`${c}-item-image-fit`:void 0,K].filter(Boolean).join(" "),style:b.isEmbedMedia(ue.image)?{[`--${c}-item-media-aspect`]:String(b.getEmbedAspect(ue.image))}:void 0,children:b.isEmbedMedia(ue.image)?a.jsx(b.EmbedMediaFrame,{media:ue.image,mode:"background",fit:S,"data-waterfall-index":Z,style:{...w,position:"absolute",left:0,bottom:0,width:"100%",height:"1cap"},onClick:oe}):ue.image.type==="video"?a.jsx("video",{ref:J,src:ue.image.assetId,"data-waterfall-index":Z,style:w,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:oe,onLoadedData:Ee=>J(Ee.currentTarget)}):a.jsx("img",{ref:J,src:ue.image.assetId,alt:ue.image.name??"","data-waterfall-index":Z,style:w,onClick:oe,onLoad:Ee=>J(Ee.currentTarget)})}):null,Z<u.length-1&&a.jsx("div",{className:`${c}-item-gap-host`,style:{width:m},children:o&&!M&&a.jsx("div",{"data-controls":"horizontalGap","data-controls-axis":"x","data-controls-min":"0",className:`${c}-item-gap-control`,style:{left:"50%",transform:"translateX(-50%)",width:f,height:"100%"}})})]},Z)})}),M&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const ue=(l?document.getElementById(l):null)??document.body;return qn.createPortal(a.jsx("div",{style:he,"data-selection":"none",children:a.jsx(hS,{prefix:c,items:U,index:D,entry:E,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:de,lightboxEntries:ce,entryIdx:W,layoutId:r,sourceRect:C,resolveCloseSourceRect:ve,onClose:te,onPrev:()=>Le(-1),onNext:()=>Le(1)})}),ue)})()]})}const IS=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
19298
+ ${Qb(e)}
19299
+ `}function bS(e){const{imageDisplay:t}=e??{},n=(t==null?void 0:t.ratioValue)??"1:1",i=(t==null?void 0:t.reversed)??!1,[o,r]=n.split(":").map(Number),l=i?r:o,c=i?o:r;return c>0?l/c:1}function SS(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 wS(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:b.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:b.scalingValue(i*vS,n??!1),[`--${t}-image-aspect`]:bS(e)}}function $S(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 nn(n,t)}function CS(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 TS(e,t,n,i,o,r){if(!(!e||!t))return l=>{var d;const c=((d=l.currentTarget.closest(`.${i}-item`))==null?void 0:d.querySelector(`[data-waterfall-index="${n}"]`))??(l.currentTarget instanceof HTMLImageElement||l.currentTarget instanceof HTMLVideoElement?l.currentTarget:null);r(n,c?Tp(c,o):void 0)}}function IS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:c}=b.useScopedStyles(),d=s.useMemo(()=>xS(c),[c]),u=t??[],p=(e==null?void 0:e.type)??"a",y=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,x=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,m=b.scalingValue(x,n??!1),f=`max(${m}, ${yS}px)`,{objectFitMode:S,imageStyle:w}=CS(e),N=$S(e,n),v=s.useRef(null),[M,E]=s.useState(!1),[U,X]=s.useState([]),[D,_]=s.useState(0),[W,T]=s.useState(0),[C,q]=s.useState(null),[R,$]=s.useState({title1:"",title2:"",title3:""}),I=(!n||i)&&!M,j=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},F=j.sizeType??"none",K=I&&F!=="none"?`${c}-item-image-hover-${F}`:void 0,P=(j.value??120)/100,h=s.useCallback(ue=>{!ue||F!=="scale"||(ue.style.transformOrigin=yf(ue))},[F]),J=s.useCallback(ue=>{if(ue){if(S==="contain"){const Z=SS(ue);if(Z){const le=ue.closest(`.${c}-item-image`);le instanceof HTMLElement&&le.style.setProperty(`--${c}-item-media-aspect`,String(Z))}}h(ue)}},[c,h,S]),V={width:b.scalingValue(y,n??!1),...N,...wS(e,c,n),[`--${c}-image-hover-scale`]:String(P)},he=(()=>{const ue={},Z=v.current?getComputedStyle(v.current).getPropertyValue("--cntrl-article-width").trim():"";return Z&&(ue["--cntrl-article-width"]=Z),ue})(),k=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),ce=s.useMemo(()=>rS(u),[u]),L=s.useMemo(()=>dS(u),[u]),me=(ue,Z)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const le=ce.findIndex(ge=>ge.gridIndex===ue);if(le<0)return;const oe=ce[le];T(le),X(oe.items),_(0),$(oe.entry),q(Z??null),E(!0)},te=s.useCallback(()=>{E(!1),q(null)},[]),ve=s.useCallback(()=>{const ue=ce[W];return!ue||!v.current?C:oS(v.current,ue.gridIndex,S)??C},[ce,W,C,S]),Le=s.useCallback(ue=>{if(ce.length>1){const Z=ce.length,le=(W+ue+Z)%Z,oe=ce[le];T(le),X(oe.items),_(0),$(oe.entry);return}_(Z=>(Z+ue+U.length)%U.length)},[ce,W,U.length]),de=ce.length>1||U.length>1;return s.useEffect(()=>{if(!M||typeof document>"u")return;const ue=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ue}},[M]),s.useEffect(()=>{!n||o||i||E(!1)},[n,o,i]),s.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&E(!1)},[e==null?void 0:e.lightbox]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),a.jsx(uS,{mediaList:L}),a.jsx("div",{ref:v,className:`${c}-wrapper ${c}-type-${p}`,style:V,children:u.map((ue,Z)=>{var ge,Se;const le=!!((ge=ue.image)!=null&&ge.assetId),oe=TS(!!k,le,Z,c,S,me);return a.jsxs("div",{className:`${c}-item`,children:[ue.title?a.jsx("span",{className:`${c}-item-title`,onClick:oe,style:oe?{cursor:"pointer"}:void 0,children:ue.title}):null,(Se=ue.image)!=null&&Se.assetId?a.jsx("span",{className:[`${c}-item-image`,S==="contain"?`${c}-item-image-fit`:void 0,K].filter(Boolean).join(" "),style:b.isEmbedMedia(ue.image)?{[`--${c}-item-media-aspect`]:String(b.getEmbedAspect(ue.image))}:void 0,children:b.isEmbedMedia(ue.image)?a.jsx(b.EmbedMediaFrame,{media:ue.image,mode:"background",fit:S,"data-waterfall-index":Z,style:{...w,position:"absolute",left:0,bottom:0,width:"100%",height:"1cap"},onClick:oe}):ue.image.type==="video"?a.jsx("video",{ref:J,src:ue.image.assetId,"data-waterfall-index":Z,style:w,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:oe,onLoadedData:Re=>J(Re.currentTarget)}):a.jsx("img",{ref:J,src:ue.image.assetId,alt:ue.image.name??"","data-waterfall-index":Z,style:w,onClick:oe,onLoad:Re=>J(Re.currentTarget)})}):null,Z<u.length-1&&a.jsx("div",{className:`${c}-item-gap-host`,style:{width:m},children:o&&!M&&a.jsx("div",{"data-controls":"horizontalGap","data-controls-axis":"x","data-controls-min":"0",className:`${c}-item-gap-control`,style:{left:"50%",transform:"translateX(-50%)",width:f,height:"100%"}})})]},Z)})}),M&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const ue=(l?document.getElementById(l):null)??document.body;return qn.createPortal(a.jsx("div",{style:he,"data-selection":"none",children:a.jsx(fS,{prefix:c,items:U,index:D,entry:R,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:de,lightboxEntries:ce,entryIdx:W,layoutId:r,sourceRect:C,resolveCloseSourceRect:ve,onClose:te,onPrev:()=>Le(-1),onNext:()=>Le(1)})}),ue)})()]})}const LS=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
19300
19300
  import type React from 'react';
19301
19301
  import { createPortal } from 'react-dom';
19302
19302
  import { CommonComponentProps } from '../props';
@@ -19826,7 +19826,7 @@ export function Waterfall({
19826
19826
  </>
19827
19827
  );
19828
19828
  }
19829
- `,LS="01M3SBP3P8CMVMM1ZZ0QVD2PPF",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 MS(e){const t={};return t[St(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[St(e,"fontSettings")]={...Si.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[St(e,"fontSize")]={...Si.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[St(e,"lineHeight")]={...Si.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[St(e,"letterSpacing")]={...Si.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[St(e,"wordSpacing")]={...Si.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[St(e,"textAlign")]={...Si.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[St(e,"textAppearance")]={...Si.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const _o=Ri.filter(e=>e!=="count"),PS=_o.reduce((e,t)=>({...e,...MS(t)}),{}),RS=_o.reduce((e,t)=>({...e,[St(t,"fontFamily")]:"Arial",[St(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[St(t,"letterSpacing")]:0,[St(t,"wordSpacing")]:0,[St(t,"textAlign")]:"left",[St(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Ss(e){return _o.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[St(n,"fontSize")]=i),o!==void 0&&(t[St(n,"lineHeight")]=o),t},{})}const ES={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(_o.map(e=>[Nl[e],_l(e)]))},Qr={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},kS=[{title:"Salton Sea from Above",...Qr,image:{assetId:"01M3QM74XERA3G7J0J00XVKEXX",objectFit:"cover"}},{title:"Lunar Module Pilot",...Qr,image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...Qr,image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",objectFit:"cover"}},{title:"David R. Scott During EVA",...Qr,image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",objectFit:"cover"}}],AS={type:"object",version:1,content:{type:"array",settings:{allowsCollection:!0,addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",contentKey:"title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",contentKey:"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",contentKey:"gallery",display:{isObjectFitEditable:!1,defaultObjectFit:"cover",type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video","vimeo","youtube"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]}},required:["image"]},default:kS},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:{...Si.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"]}}},...PS},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:LS,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...RS},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,...Ss({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,...Ss({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,...Ss({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:[ES]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},FS={element:TS,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.assetId",placeholderEnabled:!0}],parameters:[{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},..._o.map(e=>({path:`${St(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",..._o.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${St(t,"fontFamily")}`}),{})},schema:AS,sourceCode:IS},wo=500,Lp="cubic-bezier(0.25, 1, 0.5, 1)",NS=300,_S=5,HS=.15,WS=.4,OS=100,ao=100,gd={color:"#000000",hover:"#cccccc"},Zo={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},DS={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}},ws={offset:{x:0,y:0},linkColor:"#cccccc"},hd={sizeType:"drag",value:3},zS="left";function BS(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:zS,color:(e==null?void 0:e.titleColor)??"#000000"};return nn(n,t)}function so(e,t,n){return`${e}: ${b.scalingValue(t/1440,n)};`}function rr(e,t){return t<=0?0:(e%t+t)%t}function jS(e,t,n,i){if(!i)return{position:rr(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 VS(e,t){const n=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);return t?n.m41:n.m42}function GS(e,t){const n=document.createElement("div");n.className=t,n.setAttribute("aria-hidden","true"),e.appendChild(n);const i=(p,y)=>{n.style.transform=`translate(${p}px, ${y}px)`;const x=n.getBoundingClientRect();return{x:x.left,y:x.top}},o=i(0,0),r=i(ao,0),l=i(0,ao);e.removeChild(n);const c={x:(r.x-o.x)/ao,y:(r.y-o.y)/ao},d={x:(l.x-o.x)/ao,y:(l.y-o.y)/ao},u=c.x*d.y-d.x*c.y;return{ex:c,ey:d,det:u}}function XS(e,t,n){const{ex:i,ey:o,det:r}=e;return{x:(t*o.y-n*o.x)/r,y:(i.x*n-i.y*t)/r}}function US(e,t){return`
19829
+ `,MS="01M3SBP3P8CMVMM1ZZ0QVD2PPF",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 PS(e){const t={};return t[St(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[St(e,"fontSettings")]={...Si.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[St(e,"fontSize")]={...Si.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[St(e,"lineHeight")]={...Si.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[St(e,"letterSpacing")]={...Si.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[St(e,"wordSpacing")]={...Si.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[St(e,"textAlign")]={...Si.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[St(e,"textAppearance")]={...Si.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const _o=Ei.filter(e=>e!=="count"),ES=_o.reduce((e,t)=>({...e,...PS(t)}),{}),RS=_o.reduce((e,t)=>({...e,[St(t,"fontFamily")]:"Arial",[St(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[St(t,"letterSpacing")]:0,[St(t,"wordSpacing")]:0,[St(t,"textAlign")]:"left",[St(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ws(e){return _o.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[St(n,"fontSize")]=i),o!==void 0&&(t[St(n,"lineHeight")]=o),t},{})}const kS={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(_o.map(e=>[_l[e],Hl(e)]))},Qr={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},AS=[{title:"Salton Sea from Above",...Qr,image:{assetId:"01M3QM74XERA3G7J0J00XVKEXX",objectFit:"cover"}},{title:"Lunar Module Pilot",...Qr,image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...Qr,image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",objectFit:"cover"}},{title:"David R. Scott During EVA",...Qr,image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",objectFit:"cover"}}],FS={type:"object",version:1,content:{type:"array",settings:{allowsCollection:!0,addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",contentKey:"title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",contentKey:"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",contentKey:"gallery",display:{isObjectFitEditable:!1,defaultObjectFit:"cover",type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video","vimeo","youtube"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]}},required:["image"]},default:AS},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:{...Si.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"]}}},...ES},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:MS,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...RS},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,...ws({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,...ws({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,...ws({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:[kS]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},NS={element:IS,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.assetId",placeholderEnabled:!0}],parameters:[{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},..._o.map(e=>({path:`${St(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",..._o.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${St(t,"fontFamily")}`}),{})},schema:FS,sourceCode:LS},wo=500,Mp="cubic-bezier(0.25, 1, 0.5, 1)",_S=300,HS=5,WS=.15,OS=.4,DS=100,ao=100,hd={color:"#000000",hover:"#cccccc"},Zo={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},zS={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}},$s={offset:{x:0,y:0},linkColor:"#cccccc"},fd={sizeType:"drag",value:3},BS="left";function jS(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:BS,color:(e==null?void 0:e.titleColor)??"#000000"};return nn(n,t)}function so(e,t,n){return`${e}: ${b.scalingValue(t/1440,n)};`}function rr(e,t){return t<=0?0:(e%t+t)%t}function VS(e,t,n,i){if(!i)return{position:rr(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 GS(e,t){const n=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);return t?n.m41:n.m42}function XS(e,t){const n=document.createElement("div");n.className=t,n.setAttribute("aria-hidden","true"),e.appendChild(n);const i=(p,y)=>{n.style.transform=`translate(${p}px, ${y}px)`;const x=n.getBoundingClientRect();return{x:x.left,y:x.top}},o=i(0,0),r=i(ao,0),l=i(0,ao);e.removeChild(n);const c={x:(r.x-o.x)/ao,y:(r.y-o.y)/ao},d={x:(l.x-o.x)/ao,y:(l.y-o.y)/ao},u=c.x*d.y-d.x*c.y;return{ex:c,ey:d,det:u}}function US(e,t,n){const{ex:i,ey:o,det:r}=e;return{x:(t*o.y-n*o.x)/r,y:(i.x*n-i.y*t)/r}}function qS(e,t){return`
19830
19830
  .${e}-wrapper {
19831
19831
  position: relative;
19832
19832
  width: 100%;
@@ -19898,7 +19898,7 @@ export function Waterfall({
19898
19898
  top: 0;
19899
19899
  left: 0;
19900
19900
  opacity: 0;
19901
- transition: opacity ${wo}ms ${Lp};
19901
+ transition: opacity ${wo}ms ${Mp};
19902
19902
  }
19903
19903
  .${e}-list-fade .${e}-slide.${e}-is-active {
19904
19904
  opacity: 1;
@@ -20097,7 +20097,7 @@ export function Waterfall({
20097
20097
  from { clip-path: inset(100% 0 0 0); }
20098
20098
  to { clip-path: inset(0 0 0 0); }
20099
20099
  }
20100
- `}function qS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o}){const{prefix:r}=b.useScopedStyles(),l=BS(e,n),c=t??[],d=c.length,u=(e==null?void 0:e.trigger)??hd,p=u.sizeType??"drag",y=u.value??hd.value,x=(e==null?void 0:e.direction)??"horizontal",m=(e==null?void 0:e.transition)??"slide",f=(e==null?void 0:e.nav)??"classic",S=(e==null?void 0:e.navSize)??"m",w=DS[S],N=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,v=xe=>b.scalingValue(xe*N,n),M=(e==null?void 0:e.show)??"always",R=(e==null?void 0:e.controls)??null,U=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,X=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,D=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,_=(e==null?void 0:e.controlsColor)??gd.color,W=(e==null?void 0:e.controlsHoverColor)??gd.hover,T=(e==null?void 0:e.navColor)??Zo.colors.inactive,C=(e==null?void 0:e.navPaginationColor)??Zo.colors.pagination,q=(e==null?void 0:e.navBackgroundColor)??Zo.colors.background,E=(e==null?void 0:e.linkColor)??ws.linkColor,$=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,I=x==="horizontal",j=p==="click",F=p==="drag",K=p==="auto"&&(!n||!!i),P=!n,h=m==="slide",J=f==="classic",V=M!=="never"&&U>0,he=M==="on hover",k=b.scalingValue(U,n),ce={width:k,height:k,maxWidth:k},L=h&&d>1,[me,te]=s.useState(0),[ve,Le]=s.useState(L?1:0),[de,ue]=s.useState(!1),[Z,le]=s.useState(!1),[oe,ge]=s.useState(!1),[Se,Ee]=s.useState(0),[Ne,Te]=s.useState(!1),[Ce,g]=s.useState(!1),Y=s.useRef(!1),ee=s.useRef(ve);ee.current=ve;const ae=s.useRef(null),ye=s.useRef(0),ne=s.useRef(null),B=s.useRef(null),G=s.useRef(null),z=s.useRef(null),ie=s.useCallback(xe=>{Y.current=xe,ue(xe)},[]),H=s.useCallback(xe=>{if(d<2||xe===0)return;const Ie=xe>0?1:-1,ze=Math.abs(xe);if(Te(!0),ie(!0),!h){te(xt=>rr(xt+xe,d));return}let Ze=ee.current;const tt=L&&(Ze===0||Ze===d+1),ot=tt?me+1:null;tt&&(Ze=me+1);let lt=ze;for(;lt>0;){const xt=jS(Ze,Ie,d,L);if(Ze=xt.position,lt-=1,xt.hitBoundary){ye.current=lt*Ie;break}}const it=ze-lt;if(it>0&&te(xt=>rr(xt+it*Ie,d)),ee.current=Ze,ot!==null){if(ee.current=ot,Ze===ot){le(!0),Le(Ze);return}ae.current=Ze,le(!0),Le(ot);return}le(!1),Le(Ze)},[me,d,L,h,ie]),be=s.useCallback(xe=>{H(xe)},[H]),re=s.useCallback(xe=>{if(d<2)return;const Ie=rr(xe,d);if(!(Ie===me&&!Y.current)&&(Te(!0),ie(!0),te(Ie),h)){const ze=Ie+(L?1:0);ae.current=null,ye.current=0,ee.current=ze,le(!1),Le(ze)}},[me,d,L,h,ie]);s.useEffect(()=>{if(!de)return;const xe=window.setTimeout(()=>{if(L&&(ve===0||ve===d+1)){ae.current=null,le(!0),Le(me+1);return}ie(!1)},wo);return()=>window.clearTimeout(xe)},[me,d,L,de,ie,ve]),s.useEffect(()=>{if(!Z)return;let xe=0;const Ie=requestAnimationFrame(()=>{xe=requestAnimationFrame(()=>{const ze=ae.current;ae.current=null;const Ze=ye.current;if(ye.current=0,le(!1),ze!==null){ee.current=ze,Le(ze);return}if(Ze!==0){H(Ze);return}ie(!1)})});return()=>{cancelAnimationFrame(Ie),cancelAnimationFrame(xe)}},[H,ie,Z]);const Q=`${L}:${d}`,Pe=s.useRef(Q);s.useEffect(()=>{if(Pe.current===Q)return;Pe.current=Q;const xe=d>0?Math.min(me,d-1):0;G.current=null,z.current=null,ge(!1),Ee(0),te(xe),le(!0),Le(xe+(L?1:0))},[me,d,L,Q]),s.useEffect(()=>{if(!Ne)return;const xe=window.setTimeout(()=>Te(!1),NS);return()=>window.clearTimeout(xe)},[Ne,me]),s.useEffect(()=>{if(!K||d<2)return;const xe=Math.max(y,.1)*1e3,Ie=window.setInterval(()=>{P&&Ce||be(1)},xe);return()=>window.clearInterval(Ie)},[y,d,be,K,Ce,P]);const Ae=s.useCallback(xe=>{const Ie=G.current;if(!Ie||Ie.pointerId!==xe.pointerId)return;G.current=null,z.current=null;const ze=ne.current;if(ze!=null&&ze.hasPointerCapture(xe.pointerId)&&ze.releasePointerCapture(xe.pointerId),!Ie.isActive){h&&Ee(0);return}const tt=!(xe.timeStamp-Ie.lastTime>OS)&&Math.abs(Ie.velocity)>WS,ot=Ie.size>0&&Math.abs(Ie.offset-Ie.baseOffset)>Ie.size*HS;if(ge(!1),!tt&&!ot){Ee(0);return}const lt=ot?Ie.offset-Ie.baseOffset:Ie.velocity;let it=1;ot&&Ie.size>0&&(it=Math.max(1,Math.round(Math.abs(lt)/Ie.size))),Ee(0),H(lt<0?it:-it)},[H,h]);s.useEffect(()=>{const xe=Ie=>{z.current===null||Ie.pointerId!==z.current||Ae(Ie)};return window.addEventListener("pointerup",xe),window.addEventListener("pointercancel",xe),()=>{window.removeEventListener("pointerup",xe),window.removeEventListener("pointercancel",xe)}},[Ae]);const He=xe=>{const Ie=ne.current;if(!F||d<2||!Ie||xe.pointerType==="mouse"&&xe.button!==0)return;ae.current=null,ye.current=0,Y.current&&ie(!1);let ze=0;const Ze=B.current;if(h&&Ze){const tt=I?Ze.offsetWidth:Ze.offsetHeight;if(tt>0){const ot=VS(Ze,I);let lt=ee.current;L&&(lt===0||lt===d+1)?(lt=me+1,ee.current=lt,le(!0),Le(lt),ze=0):ze=ot+lt*tt,Ee(ze)}}Ie.setPointerCapture(xe.pointerId),z.current=xe.pointerId,G.current={pointerId:xe.pointerId,startClientX:xe.clientX,startClientY:xe.clientY,axes:GS(Ie,`${r}-axis-probe`),size:I?Ie.offsetWidth:Ie.offsetHeight,isActive:!1,baseOffset:ze,offset:ze,lastTime:xe.timeStamp,velocity:0}},Xe=xe=>{const Ie=G.current;if(!Ie||Ie.pointerId!==xe.pointerId)return;if(xe.pointerType==="mouse"&&xe.buttons===0){Ae(xe);return}const ze=xe.clientX-Ie.startClientX,Ze=xe.clientY-Ie.startClientY,tt=Ie.axes?XS(Ie.axes,ze,Ze):{x:ze,y:Ze},ot=I?tt.x:tt.y,lt=I?tt.y:tt.x,it=Ie.baseOffset+ot;if(!Ie.isActive){if(Math.max(Math.abs(ot),Math.abs(lt))<_S)return;if(Math.abs(lt)>Math.abs(ot)){const rt=ne.current;rt!=null&&rt.hasPointerCapture(Ie.pointerId)&&rt.releasePointerCapture(Ie.pointerId),G.current=null,z.current=null,h&&Ee(0);return}Ie.isActive=!0,ge(!0)}const xt=xe.timeStamp-Ie.lastTime;xt>0&&(Ie.velocity=(it-Ie.offset)/xt,Ie.lastTime=xe.timeStamp),Ie.offset=it,h&&Ee(it)},Ue=xe=>{Ae(xe)},Je=I?`translate3d(calc(${-ve*100}% + ${Se}px), 0, 0)`:`translate3d(0, calc(${-ve*100}% + ${Se}px), 0)`,je=L?[c[d-1],...c,c[0]]:c;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:US(r,n)}}),a.jsxs("div",{className:Rt(`${r}-wrapper`,{[`${r}-transition-reveal`]:m==="reveal",[`${r}-transition-reveal-vertical`]:m==="reveal"&&!I}),onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),children:[a.jsxs("div",{className:`${r}-slider-inner`,style:{backgroundColor:"transparent"},children:[a.jsxs("div",{ref:ne,className:Rt(`${r}-track`,{[`${r}-track-draggable`]:F,[`${r}-track-draggable-vertical`]:F&&!I}),onPointerDown:He,onPointerMove:Xe,onPointerUp:Ue,onPointerCancel:Ue,onLostPointerCapture:xe=>{z.current===xe.pointerId&&Ae(xe)},children:[a.jsx("div",{ref:B,className:Rt(`${r}-list`,{[`${r}-list-slide`]:h,[`${r}-list-slide-vertical`]:h&&!I,[`${r}-list-fade`]:!h}),style:h?{transform:Je,transition:oe||Z?"none":`transform ${wo}ms ${Lp}`}:void 0,children:je.map((xe,Ie)=>{const ze=L?rr(Ie-1,d):Ie,tt=L&&(Ie===0||Ie===d+1)?`clone-${Ie===0?"start":"end"}`:`slide-${ze}`;return a.jsx("div",{className:Rt(`${r}-slide`,{[`${r}-is-active`]:!h&&ze===me}),children:a.jsx("div",{className:`${r}-slider-item`,children:a.jsx("div",{className:`${r}-img-wrapper`,children:a.jsx("img",{className:Rt(`${r}-slider-image`,{[`${r}-contain`]:xe.image.objectFit==="contain",[`${r}-cover`]:xe.image.objectFit==="cover"}),src:xe.image.assetId,alt:xe.image.name??"",draggable:!1})})})},tt)})}),j&&a.jsx("div",{className:`${r}-click-overlay`,onClick:()=>be(1)})]}),V&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Rt(`${r}-arrow`,{[`${r}-arrow-prev`]:I,[`${r}-arrow-prev-vertical`]:!I,[`${r}-hover-arrow`]:he}),style:{color:_,"--arrow-hover-color":W,...ce},children:a.jsxs("button",{onClick:xe=>{xe.stopPropagation(),be(-1)},className:`${r}-arrow-inner`,style:{transform:`translate(${b.scalingValue(X,n)}, ${b.scalingValue(D*(I?1:-1),n)}) rotate(${I?"0deg":"90deg"})`},children:[R&&a.jsx(mn,{url:R,fill:_,hoverFill:W,className:Rt(`${r}-arrow-img`,`${r}-mirror`),style:ce}),!R&&a.jsx(fd,{color:_,className:Rt(`${r}-arrow-icon`,`${r}-arrow-img`,`${r}-mirror`)})]})}),a.jsx("div",{className:Rt(`${r}-arrow`,{[`${r}-arrow-next`]:I,[`${r}-arrow-next-vertical`]:!I,[`${r}-hover-arrow`]:he}),style:{color:_,"--arrow-hover-color":W,...ce},children:a.jsxs("button",{className:`${r}-arrow-inner`,onClick:xe=>{xe.stopPropagation(),be(1)},style:{transform:`translate(${b.scalingValue(X*(I?-1:1),n)}, ${b.scalingValue(D,n)}) rotate(${I?"0deg":"90deg"})`},children:[R&&a.jsx(mn,{url:R,fill:_,hoverFill:W,className:`${r}-arrow-img`,style:ce}),!R&&a.jsx(fd,{color:_,className:Rt(`${r}-arrow-icon`,`${r}-arrow-img`)})]})})]}),J&&a.jsx("div",{className:Rt(`${r}-pagination`,{[`${r}-pagination-inside-bottom`]:I,[`${r}-pagination-inside-left`]:!I}),style:I?{bottom:v(w.inset)}:{left:v(w.inset)},children:a.jsx("div",{className:Rt(`${r}-pagination-inner`,{[`${r}-pagination-vertical`]:!I,[`${r}-animate-dots`]:Ne}),style:{backgroundColor:q,gap:v(w.gapInactive-w.activeDot+w.dot),...I?{height:v(w.activeDot+w.paddingY*2),paddingTop:v(w.paddingY),paddingBottom:v(w.paddingY),paddingLeft:v(w.paddingActive),paddingRight:v(w.paddingActive)}:{width:v(w.activeDot+w.paddingY*2),paddingLeft:v(w.paddingY),paddingRight:v(w.paddingY),paddingTop:v(w.paddingActive),paddingBottom:v(w.paddingActive)},borderRadius:v(w.borderRadius),transform:`translate(${b.scalingValue(Zo.offset.x,n)}, ${b.scalingValue(Zo.offset.y,n)})`},children:c.map((xe,Ie)=>{const ze=Ie===me,Ze=ze?w.activeDot:w.dot;return a.jsx("button",{onClick:()=>re(Ie),className:`${r}-pagination-item`,style:{width:v(w.activeDot)},children:a.jsx("div",{className:`${r}-dot`,style:{backgroundColor:ze?C:T,width:v(Ze)}})},Ie)})},`${S}-${x}`)})]}),a.jsxs("div",{className:`${r}-caption-block`,children:[a.jsx("div",{"data-controls":o?"captionMarginTop":void 0,className:o?`${r}-control`:void 0,style:{height:b.scalingValue($,n)}}),a.jsx("div",{className:`${r}-caption-text-wrapper`,children:c.map((xe,Ie)=>a.jsx("div",{className:Rt(`${r}-caption-text`,{[`${r}-with-pointer-events`]:Ie===me&&n,[`${r}-active`]:Ie===me}),style:{...l,width:"max-content",transitionDuration:`${Math.round(wo/2)}ms`},children:a.jsx("div",{className:`${r}-caption-text-inner`,style:{"--link-color":E,"--link-hover-color":E,position:"relative",top:b.scalingValue(ws.offset.y,n),left:b.scalingValue(ws.offset.x,n)},children:a.jsx(Zi,{content:xe.imageCaption})})},Ie))})]})]})]})}function fd({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const KS=`import React, { useCallback, useEffect, useRef, useState } from 'react';
20100
+ `}function KS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o}){const{prefix:r}=b.useScopedStyles(),l=jS(e,n),c=t??[],d=c.length,u=(e==null?void 0:e.trigger)??fd,p=u.sizeType??"drag",y=u.value??fd.value,x=(e==null?void 0:e.direction)??"horizontal",m=(e==null?void 0:e.transition)??"slide",f=(e==null?void 0:e.nav)??"classic",S=(e==null?void 0:e.navSize)??"m",w=zS[S],N=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,v=xe=>b.scalingValue(xe*N,n),M=(e==null?void 0:e.show)??"always",E=(e==null?void 0:e.controls)??null,U=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,X=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,D=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,_=(e==null?void 0:e.controlsColor)??hd.color,W=(e==null?void 0:e.controlsHoverColor)??hd.hover,T=(e==null?void 0:e.navColor)??Zo.colors.inactive,C=(e==null?void 0:e.navPaginationColor)??Zo.colors.pagination,q=(e==null?void 0:e.navBackgroundColor)??Zo.colors.background,R=(e==null?void 0:e.linkColor)??$s.linkColor,$=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,I=x==="horizontal",j=p==="click",F=p==="drag",K=p==="auto"&&(!n||!!i),P=!n,h=m==="slide",J=f==="classic",V=M!=="never"&&U>0,he=M==="on hover",k=b.scalingValue(U,n),ce={width:k,height:k,maxWidth:k},L=h&&d>1,[me,te]=s.useState(0),[ve,Le]=s.useState(L?1:0),[de,ue]=s.useState(!1),[Z,le]=s.useState(!1),[oe,ge]=s.useState(!1),[Se,Re]=s.useState(0),[Ne,Te]=s.useState(!1),[Ce,g]=s.useState(!1),Y=s.useRef(!1),ee=s.useRef(ve);ee.current=ve;const ae=s.useRef(null),ye=s.useRef(0),ne=s.useRef(null),B=s.useRef(null),G=s.useRef(null),z=s.useRef(null),ie=s.useCallback(xe=>{Y.current=xe,ue(xe)},[]),H=s.useCallback(xe=>{if(d<2||xe===0)return;const Ie=xe>0?1:-1,ze=Math.abs(xe);if(Te(!0),ie(!0),!h){te(xt=>rr(xt+xe,d));return}let Ze=ee.current;const tt=L&&(Ze===0||Ze===d+1),ot=tt?me+1:null;tt&&(Ze=me+1);let lt=ze;for(;lt>0;){const xt=VS(Ze,Ie,d,L);if(Ze=xt.position,lt-=1,xt.hitBoundary){ye.current=lt*Ie;break}}const it=ze-lt;if(it>0&&te(xt=>rr(xt+it*Ie,d)),ee.current=Ze,ot!==null){if(ee.current=ot,Ze===ot){le(!0),Le(Ze);return}ae.current=Ze,le(!0),Le(ot);return}le(!1),Le(Ze)},[me,d,L,h,ie]),be=s.useCallback(xe=>{H(xe)},[H]),re=s.useCallback(xe=>{if(d<2)return;const Ie=rr(xe,d);if(!(Ie===me&&!Y.current)&&(Te(!0),ie(!0),te(Ie),h)){const ze=Ie+(L?1:0);ae.current=null,ye.current=0,ee.current=ze,le(!1),Le(ze)}},[me,d,L,h,ie]);s.useEffect(()=>{if(!de)return;const xe=window.setTimeout(()=>{if(L&&(ve===0||ve===d+1)){ae.current=null,le(!0),Le(me+1);return}ie(!1)},wo);return()=>window.clearTimeout(xe)},[me,d,L,de,ie,ve]),s.useEffect(()=>{if(!Z)return;let xe=0;const Ie=requestAnimationFrame(()=>{xe=requestAnimationFrame(()=>{const ze=ae.current;ae.current=null;const Ze=ye.current;if(ye.current=0,le(!1),ze!==null){ee.current=ze,Le(ze);return}if(Ze!==0){H(Ze);return}ie(!1)})});return()=>{cancelAnimationFrame(Ie),cancelAnimationFrame(xe)}},[H,ie,Z]);const Q=`${L}:${d}`,Pe=s.useRef(Q);s.useEffect(()=>{if(Pe.current===Q)return;Pe.current=Q;const xe=d>0?Math.min(me,d-1):0;G.current=null,z.current=null,ge(!1),Re(0),te(xe),le(!0),Le(xe+(L?1:0))},[me,d,L,Q]),s.useEffect(()=>{if(!Ne)return;const xe=window.setTimeout(()=>Te(!1),_S);return()=>window.clearTimeout(xe)},[Ne,me]),s.useEffect(()=>{if(!K||d<2)return;const xe=Math.max(y,.1)*1e3,Ie=window.setInterval(()=>{P&&Ce||be(1)},xe);return()=>window.clearInterval(Ie)},[y,d,be,K,Ce,P]);const Ae=s.useCallback(xe=>{const Ie=G.current;if(!Ie||Ie.pointerId!==xe.pointerId)return;G.current=null,z.current=null;const ze=ne.current;if(ze!=null&&ze.hasPointerCapture(xe.pointerId)&&ze.releasePointerCapture(xe.pointerId),!Ie.isActive){h&&Re(0);return}const tt=!(xe.timeStamp-Ie.lastTime>DS)&&Math.abs(Ie.velocity)>OS,ot=Ie.size>0&&Math.abs(Ie.offset-Ie.baseOffset)>Ie.size*WS;if(ge(!1),!tt&&!ot){Re(0);return}const lt=ot?Ie.offset-Ie.baseOffset:Ie.velocity;let it=1;ot&&Ie.size>0&&(it=Math.max(1,Math.round(Math.abs(lt)/Ie.size))),Re(0),H(lt<0?it:-it)},[H,h]);s.useEffect(()=>{const xe=Ie=>{z.current===null||Ie.pointerId!==z.current||Ae(Ie)};return window.addEventListener("pointerup",xe),window.addEventListener("pointercancel",xe),()=>{window.removeEventListener("pointerup",xe),window.removeEventListener("pointercancel",xe)}},[Ae]);const He=xe=>{const Ie=ne.current;if(!F||d<2||!Ie||xe.pointerType==="mouse"&&xe.button!==0)return;ae.current=null,ye.current=0,Y.current&&ie(!1);let ze=0;const Ze=B.current;if(h&&Ze){const tt=I?Ze.offsetWidth:Ze.offsetHeight;if(tt>0){const ot=GS(Ze,I);let lt=ee.current;L&&(lt===0||lt===d+1)?(lt=me+1,ee.current=lt,le(!0),Le(lt),ze=0):ze=ot+lt*tt,Re(ze)}}Ie.setPointerCapture(xe.pointerId),z.current=xe.pointerId,G.current={pointerId:xe.pointerId,startClientX:xe.clientX,startClientY:xe.clientY,axes:XS(Ie,`${r}-axis-probe`),size:I?Ie.offsetWidth:Ie.offsetHeight,isActive:!1,baseOffset:ze,offset:ze,lastTime:xe.timeStamp,velocity:0}},Xe=xe=>{const Ie=G.current;if(!Ie||Ie.pointerId!==xe.pointerId)return;if(xe.pointerType==="mouse"&&xe.buttons===0){Ae(xe);return}const ze=xe.clientX-Ie.startClientX,Ze=xe.clientY-Ie.startClientY,tt=Ie.axes?US(Ie.axes,ze,Ze):{x:ze,y:Ze},ot=I?tt.x:tt.y,lt=I?tt.y:tt.x,it=Ie.baseOffset+ot;if(!Ie.isActive){if(Math.max(Math.abs(ot),Math.abs(lt))<HS)return;if(Math.abs(lt)>Math.abs(ot)){const rt=ne.current;rt!=null&&rt.hasPointerCapture(Ie.pointerId)&&rt.releasePointerCapture(Ie.pointerId),G.current=null,z.current=null,h&&Re(0);return}Ie.isActive=!0,ge(!0)}const xt=xe.timeStamp-Ie.lastTime;xt>0&&(Ie.velocity=(it-Ie.offset)/xt,Ie.lastTime=xe.timeStamp),Ie.offset=it,h&&Re(it)},Ue=xe=>{Ae(xe)},Je=I?`translate3d(calc(${-ve*100}% + ${Se}px), 0, 0)`:`translate3d(0, calc(${-ve*100}% + ${Se}px), 0)`,je=L?[c[d-1],...c,c[0]]:c;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:qS(r,n)}}),a.jsxs("div",{className:Et(`${r}-wrapper`,{[`${r}-transition-reveal`]:m==="reveal",[`${r}-transition-reveal-vertical`]:m==="reveal"&&!I}),onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),children:[a.jsxs("div",{className:`${r}-slider-inner`,style:{backgroundColor:"transparent"},children:[a.jsxs("div",{ref:ne,className:Et(`${r}-track`,{[`${r}-track-draggable`]:F,[`${r}-track-draggable-vertical`]:F&&!I}),onPointerDown:He,onPointerMove:Xe,onPointerUp:Ue,onPointerCancel:Ue,onLostPointerCapture:xe=>{z.current===xe.pointerId&&Ae(xe)},children:[a.jsx("div",{ref:B,className:Et(`${r}-list`,{[`${r}-list-slide`]:h,[`${r}-list-slide-vertical`]:h&&!I,[`${r}-list-fade`]:!h}),style:h?{transform:Je,transition:oe||Z?"none":`transform ${wo}ms ${Mp}`}:void 0,children:je.map((xe,Ie)=>{const ze=L?rr(Ie-1,d):Ie,tt=L&&(Ie===0||Ie===d+1)?`clone-${Ie===0?"start":"end"}`:`slide-${ze}`;return a.jsx("div",{className:Et(`${r}-slide`,{[`${r}-is-active`]:!h&&ze===me}),children:a.jsx("div",{className:`${r}-slider-item`,children:a.jsx("div",{className:`${r}-img-wrapper`,children:a.jsx("img",{className:Et(`${r}-slider-image`,{[`${r}-contain`]:xe.image.objectFit==="contain",[`${r}-cover`]:xe.image.objectFit==="cover"}),src:xe.image.assetId,alt:xe.image.name??"",draggable:!1})})})},tt)})}),j&&a.jsx("div",{className:`${r}-click-overlay`,onClick:()=>be(1)})]}),V&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Et(`${r}-arrow`,{[`${r}-arrow-prev`]:I,[`${r}-arrow-prev-vertical`]:!I,[`${r}-hover-arrow`]:he}),style:{color:_,"--arrow-hover-color":W,...ce},children:a.jsxs("button",{onClick:xe=>{xe.stopPropagation(),be(-1)},className:`${r}-arrow-inner`,style:{transform:`translate(${b.scalingValue(X,n)}, ${b.scalingValue(D*(I?1:-1),n)}) rotate(${I?"0deg":"90deg"})`},children:[E&&a.jsx(mn,{url:E,fill:_,hoverFill:W,className:Et(`${r}-arrow-img`,`${r}-mirror`),style:ce}),!E&&a.jsx(yd,{color:_,className:Et(`${r}-arrow-icon`,`${r}-arrow-img`,`${r}-mirror`)})]})}),a.jsx("div",{className:Et(`${r}-arrow`,{[`${r}-arrow-next`]:I,[`${r}-arrow-next-vertical`]:!I,[`${r}-hover-arrow`]:he}),style:{color:_,"--arrow-hover-color":W,...ce},children:a.jsxs("button",{className:`${r}-arrow-inner`,onClick:xe=>{xe.stopPropagation(),be(1)},style:{transform:`translate(${b.scalingValue(X*(I?-1:1),n)}, ${b.scalingValue(D,n)}) rotate(${I?"0deg":"90deg"})`},children:[E&&a.jsx(mn,{url:E,fill:_,hoverFill:W,className:`${r}-arrow-img`,style:ce}),!E&&a.jsx(yd,{color:_,className:Et(`${r}-arrow-icon`,`${r}-arrow-img`)})]})})]}),J&&a.jsx("div",{className:Et(`${r}-pagination`,{[`${r}-pagination-inside-bottom`]:I,[`${r}-pagination-inside-left`]:!I}),style:I?{bottom:v(w.inset)}:{left:v(w.inset)},children:a.jsx("div",{className:Et(`${r}-pagination-inner`,{[`${r}-pagination-vertical`]:!I,[`${r}-animate-dots`]:Ne}),style:{backgroundColor:q,gap:v(w.gapInactive-w.activeDot+w.dot),...I?{height:v(w.activeDot+w.paddingY*2),paddingTop:v(w.paddingY),paddingBottom:v(w.paddingY),paddingLeft:v(w.paddingActive),paddingRight:v(w.paddingActive)}:{width:v(w.activeDot+w.paddingY*2),paddingLeft:v(w.paddingY),paddingRight:v(w.paddingY),paddingTop:v(w.paddingActive),paddingBottom:v(w.paddingActive)},borderRadius:v(w.borderRadius),transform:`translate(${b.scalingValue(Zo.offset.x,n)}, ${b.scalingValue(Zo.offset.y,n)})`},children:c.map((xe,Ie)=>{const ze=Ie===me,Ze=ze?w.activeDot:w.dot;return a.jsx("button",{onClick:()=>re(Ie),className:`${r}-pagination-item`,style:{width:v(w.activeDot)},children:a.jsx("div",{className:`${r}-dot`,style:{backgroundColor:ze?C:T,width:v(Ze)}})},Ie)})},`${S}-${x}`)})]}),a.jsxs("div",{className:`${r}-caption-block`,children:[a.jsx("div",{"data-controls":o?"captionMarginTop":void 0,className:o?`${r}-control`:void 0,style:{height:b.scalingValue($,n)}}),a.jsx("div",{className:`${r}-caption-text-wrapper`,children:c.map((xe,Ie)=>a.jsx("div",{className:Et(`${r}-caption-text`,{[`${r}-with-pointer-events`]:Ie===me&&n,[`${r}-active`]:Ie===me}),style:{...l,width:"max-content",transitionDuration:`${Math.round(wo/2)}ms`},children:a.jsx("div",{className:`${r}-caption-text-inner`,style:{"--link-color":R,"--link-hover-color":R,position:"relative",top:b.scalingValue($s.offset.y,n),left:b.scalingValue($s.offset.x,n)},children:a.jsx(Zi,{content:xe.imageCaption})})},Ie))})]})]})]})}function yd({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const YS=`import React, { useCallback, useEffect, useRef, useState } from 'react';
20101
20101
  import cn from 'classnames';
20102
20102
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
20103
20103
  import { scalingValue } from '../utils/scalingValue';
@@ -21279,14 +21279,14 @@ function ArrowIcon({ color, className }: { color: string, className: string }) {
21279
21279
  </svg>
21280
21280
  );
21281
21281
  }
21282
- `,YS={type:"object",version:1,settings:{sizing:"manual",properties:{trigger:{type:"object",scope:"common",title:"Trigger",display:{type:"toggle-cycle-numeric-input",enum:["click","drag","auto"],inputs:{click:"none",drag:"none",auto:"single"},defaultValue:3,showDash:!1},min:1,max:5,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical"]}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["slide","fade in","reveal"]}},nav:{type:"string",scope:"common",title:"Nav",display:{type:"toggle-cycle",enum:["classic","no"]}},navSize:{type:"string",scope:"layout",title:"Nav Size",display:{type:"toggle-cycle",enum:["s","m","l"]}},navUnit:{type:"number",scope:"layout",title:"",display:{type:"numeric-input",visible:!1},min:0,max:1},controls:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},controlsMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},show:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","on hover","never"]}},paddingX:{type:"number",scope:"layout",title:"Padding X",display:{type:"numeric-input"},min:-9999,max:9999},paddingY:{type:"number",scope:"layout",title:"Padding Y",display:{type:"numeric-input"},min:-9999,max:9999},controlsColor:{type:"string",scope:"common",title:"Controls Default",display:{type:"palette-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"palette-color-picker"}},navColor:{type:"string",scope:"common",title:"Dot Nav",display:{type:"palette-color-picker"}},navPaginationColor:{type:"string",scope:"common",title:"Active Nav",display:{type:"palette-color-picker"}},navBackgroundColor:{type:"string",scope:"common",title:"BG Nav",display:{type:"palette-color-picker"}},linkColor:{type:"string",scope:"common",title:"Link Default",display:{type:"palette-color-picker"}},titleColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{type:"object",scope:"common",title:"",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}}},defaults:{trigger:{sizeType:"drag",value:3,min:1,max:5},direction:"horizontal",transition:"slide",nav:"classic",controls:null,show:"always",controlsColor:"#000000",controlsHoverColor:"#3F3F3F",navColor:"#A4A4A4",navPaginationColor:"#FFFFFF",navBackgroundColor:"#000000",linkColor:"#2E12F0",titleColor:"#000000",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{controlsMaxWidth:30/1440,paddingX:0,paddingY:0,captionMarginTop:10/1440,titleFontSize:16/1440,titleLineHeight:16/1440,navSize:"m",navUnit:1/1440},t:{controlsMaxWidth:30/768,paddingX:-10/768,paddingY:0,captionMarginTop:10/768,titleFontSize:16/768,titleLineHeight:16/768,navSize:"m",navUnit:1/768},m:{controlsMaxWidth:30/375,paddingX:-14/375,paddingY:0,captionMarginTop:10/375,titleFontSize:16/375,titleLineHeight:16/375,navSize:"m",navUnit:1/375}},displayRules:[{if:{name:"show",value:"never"},then:{name:"properties.controlsColor.display.visible",value:!1}},{if:{name:"show",value:"never"},then:{name:"properties.controlsHoverColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navPaginationColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navBackgroundColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navSize.display.visible",value:!1}}],layout:["__componentName__","trigger","direction","transition","nav","navSize","controls","controlsMaxWidth","show","paddingX","paddingY","captionMarginTop","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["trigger","direction"]},{type:"row",title:"",items:["transition","nav"]},{type:"row",title:"",items:["navSize"]},{type:"group",title:"Controls",items:[{type:"row",title:"",items:["controls","controlsMaxWidth"]},{type:"row",title:"",items:["paddingX","paddingY"]},{type:"row",title:"",items:["show"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]}]}],paletteBookmark:{items:["controlsColor","controlsHoverColor","navPaginationColor","navColor","navBackgroundColor","titleColor","linkColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{allowsCollection:!0,addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",contentKey:"gallery",display:{type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",contentKey:"title",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",assetId:"01M3QM74XESYN1HRYH9VRTZ5CK"},imageCaption:[{type:"paragraph",children:[{text:"Earth-orbital mission"}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XERA3G7J0J00XVKEXX"},imageCaption:[{type:"paragraph",children:[{text:"Salton Sea from Above"}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEE2101QD8PM6E4JSA"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module Pilot"}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEVZ9F59FC7M9BA63Q"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module 3 porch"}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA"},imageCaption:[{type:"paragraph",children:[{text:"Command Module"}]}]}]}},QS={element:qS,id:"slider-2-0",name:"Slider 2.0",category:"galleries",version:1,defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},schema:YS,sourceCode:KS,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"controls"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily"}},mo=300/1440,ZS=8/1440,ti=.004;function JS(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function $s(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Cs(e,t,n,i,o="title-leading-gap"){const r=e??.01;return t===void 0||t>=r?{}:{[`--${n}-${o}`]:b.scalingValue((r-t)/2,i)}}function ew(e){return`
21282
+ `,QS={type:"object",version:1,settings:{sizing:"manual",properties:{trigger:{type:"object",scope:"common",title:"Trigger",display:{type:"toggle-cycle-numeric-input",enum:["click","drag","auto"],inputs:{click:"none",drag:"none",auto:"single"},defaultValue:3,showDash:!1},min:1,max:5,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical"]}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["slide","fade in","reveal"]}},nav:{type:"string",scope:"common",title:"Nav",display:{type:"toggle-cycle",enum:["classic","no"]}},navSize:{type:"string",scope:"layout",title:"Nav Size",display:{type:"toggle-cycle",enum:["s","m","l"]}},navUnit:{type:"number",scope:"layout",title:"",display:{type:"numeric-input",visible:!1},min:0,max:1},controls:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},controlsMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},show:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","on hover","never"]}},paddingX:{type:"number",scope:"layout",title:"Padding X",display:{type:"numeric-input"},min:-9999,max:9999},paddingY:{type:"number",scope:"layout",title:"Padding Y",display:{type:"numeric-input"},min:-9999,max:9999},controlsColor:{type:"string",scope:"common",title:"Controls Default",display:{type:"palette-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"palette-color-picker"}},navColor:{type:"string",scope:"common",title:"Dot Nav",display:{type:"palette-color-picker"}},navPaginationColor:{type:"string",scope:"common",title:"Active Nav",display:{type:"palette-color-picker"}},navBackgroundColor:{type:"string",scope:"common",title:"BG Nav",display:{type:"palette-color-picker"}},linkColor:{type:"string",scope:"common",title:"Link Default",display:{type:"palette-color-picker"}},titleColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{type:"object",scope:"common",title:"",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}}},defaults:{trigger:{sizeType:"drag",value:3,min:1,max:5},direction:"horizontal",transition:"slide",nav:"classic",controls:null,show:"always",controlsColor:"#000000",controlsHoverColor:"#3F3F3F",navColor:"#A4A4A4",navPaginationColor:"#FFFFFF",navBackgroundColor:"#000000",linkColor:"#2E12F0",titleColor:"#000000",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{controlsMaxWidth:30/1440,paddingX:0,paddingY:0,captionMarginTop:10/1440,titleFontSize:16/1440,titleLineHeight:16/1440,navSize:"m",navUnit:1/1440},t:{controlsMaxWidth:30/768,paddingX:-10/768,paddingY:0,captionMarginTop:10/768,titleFontSize:16/768,titleLineHeight:16/768,navSize:"m",navUnit:1/768},m:{controlsMaxWidth:30/375,paddingX:-14/375,paddingY:0,captionMarginTop:10/375,titleFontSize:16/375,titleLineHeight:16/375,navSize:"m",navUnit:1/375}},displayRules:[{if:{name:"show",value:"never"},then:{name:"properties.controlsColor.display.visible",value:!1}},{if:{name:"show",value:"never"},then:{name:"properties.controlsHoverColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navPaginationColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navBackgroundColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navSize.display.visible",value:!1}}],layout:["__componentName__","trigger","direction","transition","nav","navSize","controls","controlsMaxWidth","show","paddingX","paddingY","captionMarginTop","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["trigger","direction"]},{type:"row",title:"",items:["transition","nav"]},{type:"row",title:"",items:["navSize"]},{type:"group",title:"Controls",items:[{type:"row",title:"",items:["controls","controlsMaxWidth"]},{type:"row",title:"",items:["paddingX","paddingY"]},{type:"row",title:"",items:["show"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]}]}],paletteBookmark:{items:["controlsColor","controlsHoverColor","navPaginationColor","navColor","navBackgroundColor","titleColor","linkColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{allowsCollection:!0,addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",contentKey:"gallery",display:{type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",contentKey:"title",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",assetId:"01M3QM74XESYN1HRYH9VRTZ5CK"},imageCaption:[{type:"paragraph",children:[{text:"Earth-orbital mission"}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XERA3G7J0J00XVKEXX"},imageCaption:[{type:"paragraph",children:[{text:"Salton Sea from Above"}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEE2101QD8PM6E4JSA"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module Pilot"}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEVZ9F59FC7M9BA63Q"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module 3 porch"}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA"},imageCaption:[{type:"paragraph",children:[{text:"Command Module"}]}]}]}},ZS={element:KS,id:"slider-2-0",name:"Slider 2.0",category:"galleries",version:1,defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},schema:QS,sourceCode:YS,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"controls"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily"}},mo=300/1440,JS=8/1440,ti=.004;function ew(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Cs(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Ts(e,t,n,i,o="title-leading-gap"){const r=e??.01;return t===void 0||t>=r?{}:{[`--${n}-${o}`]:b.scalingValue((r-t)/2,i)}}function tw(e){return`
21283
21283
  .${e}-wrapper {
21284
21284
  box-sizing: border-box;
21285
21285
  display: flex;
21286
21286
  flex-direction: column;
21287
21287
  position: relative;
21288
21288
  width: 100%;
21289
- min-height: ${JS(48)};
21289
+ min-height: ${ew(48)};
21290
21290
  }
21291
21291
  .${e}-single-title-layer {
21292
21292
  position: absolute;
@@ -21545,7 +21545,7 @@ function ArrowIcon({ color, className }: { color: string, className: string }) {
21545
21545
  left: 50%;
21546
21546
  transform: translate(-50%, -50%);
21547
21547
  }
21548
- `}const Mp={"left-top":{horizontal:"left",vertical:"top"},"top-center":{horizontal:"center",vertical:"top"},"top-right":{horizontal:"right",vertical:"top"},"left-center":{horizontal:"left",vertical:"center"},center:{horizontal:"center",vertical:"center"},"right-center":{horizontal:"right",vertical:"center"},"left-bottom":{horizontal:"left",vertical:"bottom"},"bottom-center":{horizontal:"center",vertical:"bottom"},"right-bottom":{horizontal:"right",vertical:"bottom"}};function tw(e){return e in Mp}function nw(e){if(e&&tw(e))return e;switch(e){case"center-top":return"top-center";case"right-top":return"top-right";case"top-left":return"left-top";case"center-bottom":return"bottom-center";case"bottom-left":return"left-bottom";case"bottom-right":return"right-bottom";case"center-center":return"center";case"left":return"left-center";case"right":return"right-center";case"top":return"left-top";default:return"center"}}function Gl(e){return Mp[e]}const iw="rgba(28,31,34,0.9)",Jn=500,Bi="cubic-bezier(0.22, 1, 0.36, 1)",ow=72,rw=50,aw={titleColor:"title-color",descriptionColor:"description-color",lightboxCounterColor:"lightbox-counter-color"},sw=[];function lw(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 cw(e){const[t,n]=e.media;return n!=null&&n.assetId?n:t!=null&&t.assetId?t:null}function dw(e){const[t]=e.media;return t!=null&&t.assetId?t:null}function uw(e){if(!Array.isArray(e)||e.length===0)return[];if(lw(e)){const t=[];for(const n of e){const i=cw(n);if(!i)continue;const o=dw(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.assetId?o:null})}return t}return e.filter(t=>t==null?void 0:t.assetId).map(t=>({displayMedia:t,lightboxMedia:t}))}function Ks(e){return e.type==="video"}function pw(e){e.pause(),e.removeAttribute("src"),e.load()}function Zr(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function mw(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}const gw=1140/1440;function hw(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 fw(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 yw(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function vw({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l,onTransitionEnd:c}){return s.useEffect(()=>{const d=n.current;if(d)return()=>{pw(d)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:r,onMouseMove:l,onTransitionEnd:c,style:i})}const xw="https://cdn.cntrl.site/component-assets/defaultCloseIcon.svg",bw=.004;function Sw({prefix:e,closeIcon:t=xw,closeIconMaxWidth:n=.0125,closeIconColor:i="#FFFFFF",closeIconHoverColor:o="#999999",iconMarginRight:r=.01,contentMarginTop:l=.01,isEditor:c,isPreviewMode:d,isEditMode:u,visible:p,onClose:y}){if(!t)return null;const x=b.scalingValue(n,c),m=b.scalingValue(r,c),f=b.scalingValue(l,c),S=b.scalingValue(Math.max(l,bw),c);return a.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,zIndex:1e4,display:"flex",flexDirection:"column",alignItems:"flex-end",pointerEvents:"none",opacity:p?1:0,transition:"opacity 500ms cubic-bezier(0.22, 1, 0.36, 1)"},children:[a.jsx("div",{style:{position:"relative",width:"100%",height:f,flexShrink:0},children:u&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-min":"0",className:`${e}-control`,style:{position:"absolute",top:0,left:0,width:"100%",height:S,pointerEvents:p?"auto":"none"}})}),a.jsxs("div",{className:`${e}-close-icon`,style:{width:x,height:x,marginRight:m,pointerEvents:p?"auto":"none"},onClick:w=>w.stopPropagation(),children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,"aria-label":"Close",onClick:w=>{w.stopPropagation(),y()},children:a.jsx(mn,{url:t,fill:i,hoverFill:c&&!d?i:o,className:`${e}-close-icon-img`})}),u&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:m,height:"100%",pointerEvents:p?"auto":"none"}})]})]})}function ww({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,isPreviewMode:r,isEditMode:l,onClose:c,onPrev:d,onNext:u,counterClassName:p,counterStyle:y,backgroundColor:x,closeIcon:m,closeIconMaxWidth:f,closeIconColor:S,closeIconHoverColor:w,iconMarginRight:N,contentMarginTop:v}){const M=i==="cover",R=s.useRef(null),U=s.useRef(null),X=s.useRef(null),D=s.useRef(0),_=s.useRef(0),W=s.useRef("none"),T=s.useRef(!1),C=s.useRef(!1),q=s.useRef(!1),E=s.useRef(null),[$,I]=s.useState(null),[j,F]=s.useState("opening"),[K,P]=s.useState(0),[h,J]=s.useState(0),[V,he]=s.useState(!1),[k,ce]=s.useState(!1),[L,me]=s.useState(!1),te=s.useRef(n),ve=t[n],Le=ve?Ks(ve):!1,de=ve?b.isEmbedMedia(ve):!1,ue=h!==0||V,Z=s.useCallback(G=>{q.current=G,he(G)},[]),le=s.useCallback(()=>{E.current!==null&&(window.clearTimeout(E.current),E.current=null)},[]),oe=s.useCallback(()=>{le(),E.current=window.setTimeout(()=>{le(),Z(!1)},Jn+32)},[le,Z]),ge=s.useCallback(()=>{const G=R.current,z=U.current;if(!G)return;const ie=G.getBoundingClientRect(),H=ie.width,be=ie.height;if(!H||!be)return;if(i==="cover"){I({width:H,height:be,left:ie.left,top:ie.top});return}let re=ve&&b.isEmbedMedia(ve)?b.getEmbedAspect(ve):null;if(re===null){if(!z){I(Zr(G));return}const{width:Pe,height:Ae}=mw(z);if(!Pe||!Ae){I(Zr(G));return}re=Pe/Ae}const Q=H/be;if(re>Q){const Pe=H/re;I({width:H,height:Pe,left:ie.left,top:ie.top+(be-Pe)/2})}else{const Pe=be*re;I({width:Pe,height:be,left:ie.left+(H-Pe)/2,top:ie.top})}},[i,ve]);s.useEffect(()=>{ge();const G=R.current;if(!G)return;const z=new ResizeObserver(()=>ge());return z.observe(G),()=>z.disconnect()},[ge,n]),s.useEffect(()=>{j==="opening"&&$&&F("open")},[j,$]),s.useEffect(()=>{if(j!=="closing")return;const G=setTimeout(()=>c(),Jn);return()=>clearTimeout(G)},[j,c]),s.useEffect(()=>()=>{le()},[le]),s.useLayoutEffect(()=>{if(te.current===n)return;le(),P(0),J(0),Z(!1),me(!1),ce(!1),D.current=0,_.current=0,W.current="none",T.current=!1,X.current=null,C.current=!1;const G=R.current;G&&I(Zr(G)),te.current=n},[n,Z,le]),s.useEffect(()=>{if(j!=="open")return;let G=null;const z=()=>{G&&(document.removeEventListener("click",G,!0),G=null)},ie=()=>{z(),G=Ae=>{Ae.stopPropagation(),Ae.preventDefault(),z()},document.addEventListener("click",G,!0)},H=Ae=>{le(),q.current=!1,he(!1),J(0),ce(!1),T.current=!1,_.current=0,W.current="none";const He=R.current;He&&I(Zr(He)),Ae<0?u():d()},be=Ae=>{if(Math.abs(Ae)>rw&&t.length>1){H(Ae);return}Z(!0),J(0),oe()},re=Ae=>{if(Ae.touches.length!==1||q.current)return;const He=Ae.touches[0];C.current=!0,X.current={x:He.clientX,y:He.clientY},W.current="none",_.current=0,T.current=!1},Q=Ae=>{if(!X.current||Ae.touches.length!==1||q.current)return;const He=Ae.touches[0],Xe=He.clientX-X.current.x,Ue=He.clientY-X.current.y;if(W.current==="none"){if(Math.abs(Xe)<10&&Math.abs(Ue)<10)return;if(Math.abs(Xe)>Math.abs(Ue)){if(t.length<=1)return;W.current="horizontal"}else if(Ue>0)W.current="vertical";else return}if(W.current==="horizontal"){T.current=!0,ce(!0),_.current=Xe,J(Xe),Ae.preventDefault();return}W.current==="vertical"&&(T.current=!0,ce(!0),D.current=Ue,P(Ue),Ae.preventDefault())},Pe=()=>{if(!X.current)return;const Ae=W.current,He=T.current;if(He&&Ae==="horizontal")be(_.current),ie();else if(He&&Ae==="vertical")if(D.current>ow){const Ue=window.innerHeight;D.current=Ue,me(!0),P(Ue),F("closing")}else D.current=0,P(0),ie();else Ae==="horizontal"&&Math.abs(_.current)>0&&(be(_.current),ie());X.current=null,W.current="none",_.current=0,T.current=!1,ce(!1)};return document.addEventListener("touchstart",re,{passive:!0}),document.addEventListener("touchmove",Q,{passive:!1}),document.addEventListener("touchend",Pe),document.addEventListener("touchcancel",Pe),()=>{document.removeEventListener("touchstart",re),document.removeEventListener("touchmove",Q),document.removeEventListener("touchend",Pe),document.removeEventListener("touchcancel",Pe),z()}},[j,t.length,u,d,Z,oe,le]),s.useEffect(()=>{const G=z=>{z.key==="Escape"&&(z.preventDefault(),z.stopPropagation(),j!=="closing"&&F("closing"))};return window.addEventListener("keydown",G,!0),()=>window.removeEventListener("keydown",G,!0)},[j]);const Se=()=>{j!=="closing"&&F("closing")},Ee=j==="open",Ne=j==="closing",Te=K>0?Math.max(0,1-K/500):1,Ce=K>0?Math.max(.35,1-K/500):1,g=G=>{if(G.stopPropagation(),C.current){C.current=!1;return}if(t.length<=1)return;const z=G.currentTarget.getBoundingClientRect(),ie=G.clientY-z.top,H=Math.min(52,z.height*.2);if(!(ie>z.height-H)){if(G.clientX-z.left<z.width/2){d();return}u()}},Y=G=>{if(t.length<=1)return;const z=G.currentTarget.getBoundingClientRect(),ie=G.clientX-z.left,H=G.clientY-z.top,be=Math.min(52,z.height*.2);if(H>z.height-be){G.currentTarget.style.cursor="default";return}G.currentTarget.style.cursor=ie<z.width/2?"w-resize":"e-resize"},ee=s.useCallback(G=>{G.propertyName!=="transform"||!q.current||(le(),Z(!1))},[le,Z]),ae=ue?`translateX(${h}px)`:K>0?`translateY(${K}px)`:void 0,ye={position:"fixed",top:$==null?void 0:$.top,left:$==null?void 0:$.left,width:$==null?void 0:$.width,height:$==null?void 0:$.height,objectFit:i==="cover"?"cover":"contain",transform:ae,opacity:K>0?Ce:j==="opening"||Ne?0:1,transition:k&&!V?"none":V?`transform ${Jn}ms ${Bi}`:L?`transform ${Jn}ms ${Bi}, opacity ${Jn}ms ${Bi}`:j==="opening"||Ne?`opacity ${Jn}ms ${Bi}`:"none",pointerEvents:(Le||de)&&Ee&&!ue?"auto":"none",touchAction:(Le||de)&&Ee?"none":void 0,zIndex:9998},ne=de&&$?Math.min(52,$.height*.2):0,B=$?{position:"fixed",top:$.top,height:$.height-ne,width:$.width/2,zIndex:9999}:null;return a.jsxs("div",{className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:j==="open"?"none":void 0},onClick:Se,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:x,opacity:Ee?Te:0,transition:k?"none":`opacity ${Jn}ms ${Bi}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:M?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:R,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Ee?1:0,transition:`opacity ${Jn}ms ${Bi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:p,style:y,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:R,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Ee?1:0,transition:`opacity ${Jn}ms ${Bi}`},children:t.length>1&&a.jsxs("p",{className:p,style:y,children:[n+1," / ",t.length]})})]})}),$&&ve&&(de?a.jsx(b.EmbedMediaFrame,{media:ve,mode:"player",fit:i==="cover"?"cover":"contain",lazy:!1,interactive:Ee&&!ue,style:ye,onTransitionEnd:ee},`${n}-${ve.assetId}`):Le?a.jsx(vw,{src:ve.assetId,phase:j,mediaRef:U,mediaStyle:ye,onLoadedMetadata:ge,onClick:g,onMouseMove:Y,onTransitionEnd:ee},`${n}-${ve.assetId}`):a.jsx("img",{ref:U,src:ve.assetId,alt:ve.name,onLoad:ge,onTransitionEnd:ee,style:ye},`${n}-${ve.assetId}`)),Ee&&B&&t.length>1&&!Le&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...B,left:$.left,cursor:"w-resize",pointerEvents:ue?"none":"auto"},onClick:G=>{if(C.current){C.current=!1;return}G.stopPropagation(),d()}}),a.jsx("div",{style:{...B,left:$.left+$.width/2,cursor:"e-resize",pointerEvents:ue?"none":"auto"},onClick:G=>{if(C.current){C.current=!1;return}G.stopPropagation(),u()}})]}),a.jsx(Sw,{prefix:e,closeIcon:m,closeIconMaxWidth:f,closeIconColor:S,closeIconHoverColor:w,iconMarginRight:N,contentMarginTop:v,isEditor:o,isPreviewMode:r,isEditMode:l,visible:Ee,onClose:Se})]})}function yd({P:e,media:t,imgWidth:n,cornerRadius:i,fillGalleryWidth:o,imageDisplay:r,isEditor:l,galleryPaddingBetween:c=0,showPaddingAfter:d=!1,showControls:u=!1,onMediaClick:p}){const y=`${e}-gallery-${Ks(t)?"video":"image"}`,x=r.display==="cover",m=fw(r),f=_=>b.scalingValue(_,l??!1),S=n??mo,w=o?{width:"100%",maxWidth:"100%"}:{width:f(S),maxWidth:"100%"},N=i?{borderRadius:f(i)}:{},v={...w,...x?{aspectRatio:m,height:"auto",overflow:"hidden"}:{},...N},M={...x?{display:"block",width:"100%",height:"100%",objectFit:"cover",maxWidth:"100%"}:{display:"block",maxWidth:"100%",height:"auto",width:o?"100%":f(S)},...p?{cursor:"pointer",pointerEvents:"auto"}:{},...x?{}:N},U={className:y,style:M,onClick:p?_=>{_.stopPropagation(),p()}:void 0},X=Math.max(c,ti),D=b.isEmbedMedia(t)?a.jsx(b.EmbedMediaFrame,{...U,media:t,mode:"background",fit:x?"cover":"contain"}):Ks(t)?a.jsx("video",{...U,src:t.assetId,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):a.jsx("img",{...U,src:t.assetId,alt:t.name??""});return a.jsxs("div",{className:`${e}-gallery-item`,children:[x?a.jsx("div",{style:v,children:D}):D,d&&c>0&&a.jsx("div",{className:`${e}-padding-handle`,style:{height:f(c)},"aria-hidden":"true"}),u&&d&&a.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:f(X)}})]})}function $w({P:e,layoutType:t,galleryWidthStyle:n,galleryPaddingRight:i,galleryPaddingLeft:o,galleryPaddingRightWidth:r,galleryPaddingLeftWidth:l,galleryPaddingMaxFraction:c,showControls:d,scaled:u,children:p}){const y=t==="a"?i:t==="c"?o:0,x=y>0||d;return a.jsxs("div",{className:`${e}-gallery-controls`,children:[t==="c"&&x&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(y)},"aria-hidden":"true"}),d&&t==="c"&&a.jsx("div",{"data-controls":"galleryPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(c),className:`${e}-control-anchor`,style:{top:0,left:0,width:u(l),height:"100%"}}),a.jsx("div",{className:`${e}-gallery`,style:n,children:p}),t==="a"&&x&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(y)},"aria-hidden":"true"}),d&&t==="a"&&a.jsx("div",{"data-controls":"galleryPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(c),className:`${e}-control-anchor`,style:{top:0,right:0,width:u(r),height:"100%"}})]})}function Cw(e){switch(e){case"fade":case"retype":case"scroll":return e;case"default":return"scroll";default:return"scroll"}}function Jr({P:e,controlKey:t,scaled:n,height:i,paired:o,side:r}){return a.jsx("div",{"data-controls":t,...o?{"data-controls-paired":""}:{},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{...r==="top"?{top:0}:{bottom:0},left:0,width:"100%",height:n(i)}})}function vd({P:e,controlKey:t,scaled:n,width:i,maxFraction:o,side:r,paired:l,anchorStyle:c}){return a.jsx("div",{"data-controls":t,...l?{"data-controls-paired":""}:{},"data-controls-axis":"x","data-controls-variant":"column-padding",...r==="right"?{"data-controls-reverse":""}:{},"data-controls-min":"0","data-controls-max-fraction":String(o),className:`${e}-control-anchor`,style:{top:0,...r==="left"?{left:0}:{right:0},width:n(i),height:"100%",...c}})}function Ts({P:e,title:t,description:n,position:i,titleRef:o,titleClassName:r,titleContainerStyle:l,titleTextBoxStyle:c,titleStyle:d,descriptionClassName:u,descriptionStyle:p,descriptionPadding:y,showTextBoxOutline:x=!1,showDescriptionPaddingControl:m=!1,descriptionPaddingPaired:f=!1,topPaddingControl:S,bottomPaddingControl:w}){const N=s.useRef(null),[v,M]=s.useState(0),R=t??"",U=n??"",X=U.length>0,{horizontal:D,vertical:_}=Gl(i),W=_==="center"||_==="bottom",T=_==="bottom";s.useLayoutEffect(()=>{if(!W)return;const $=N.current;if(!$||typeof ResizeObserver>"u")return;const I=()=>M($.offsetHeight);I();const j=new ResizeObserver(I);return j.observe($),()=>j.disconnect()},[R,U,W]);const C=a.jsx("span",{className:`${e}-title-text`,style:d,children:R}),q=X?a.jsx("span",{className:u,style:p,children:U}):null,E=X?a.jsx("div",{className:`${e}-title-texts-gap`,style:{height:y},children:m&&a.jsx("div",{"data-controls":"titleDescriptionPadding",...f?{"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:"100%"}})}):null;return a.jsx("div",{ref:$=>{N.current=$,o($)},className:[r,`${e}-title-h-${D}`,`${e}-title-v-${_}`].join(" "),style:{...W?{[`--${e}-title-height`]:`${v}px`}:{},...l},children:a.jsxs("div",{className:`${e}-title-text-stack`,style:c,children:[S,a.jsx("div",{className:x?`${e}-title-text-inner`:`${e}-title-text-inner-hidden`,style:{width:"100%"},children:a.jsx("div",{className:`${e}-title-texts`,children:T?a.jsxs(a.Fragment,{children:[q,E,C]}):a.jsxs(a.Fragment,{children:[C,E,q]})})}),w]})})}const xd=45;function bd(e,t,n){let i=e;for(;i;){const o=getComputedStyle(i).getPropertyValue(t).trim();if(o){const r=parseFloat(o);if(!Number.isNaN(r))return r}i=i.parentElement}return n}function Tw(e){const t=bd(e,"--cntrl-viewport-height",window.innerHeight),n=bd(e,"--cntrl-article-top",0);return{top:n,height:t,centerY:n+t/2}}function Iw(e,t,n){const{vertical:i}=Gl(t),{top:o,height:r,centerY:l}=Tw(n);if(i==="top"){const d=n&&parseFloat(getComputedStyle(n).top)||o;return Math.abs(e.top-d)}if(i==="bottom")return Math.abs(e.bottom-(o+r));const c=e.top+e.height/2;return Math.abs(c-l)}function Lw(e,t,n){const i=Array.from({length:t},(l,c)=>{const d=e.current[c];if(!d)return 0;const u=d.getBoundingClientRect(),p=Iw(u,n,d);return Math.exp(-(p*p)/(2*xd*xd))});let o=0,r=-1;return i.forEach((l,c)=>{l>r&&(r=l,o=c)}),{opacities:i,dominantIndex:o}}function Mw(e,t,n){const i=s.useRef([]),[{opacities:o,dominantIndex:r},l]=s.useState(()=>({opacities:Array.from({length:e},(d,u)=>u===0?1:0),dominantIndex:0}));return s.useLayoutEffect(()=>{if(!t||e===0){l({opacities:Array.from({length:e},()=>1),dominantIndex:0});return}let d=0;const u=()=>{l(Lw(i,e,n))},p=()=>{d||(d=window.requestAnimationFrame(()=>{d=0,u()}))};return u(),window.addEventListener("scroll",p,{passive:!0}),window.addEventListener("resize",p,{passive:!0}),()=>{d&&window.cancelAnimationFrame(d),window.removeEventListener("scroll",p),window.removeEventListener("resize",p)}},[t,e,n]),{setTitleRef:d=>u=>{i.current[d]=u},opacities:o,dominantIndex:r}}function Sd(e,t){const[n,i]=s.useState(e),o=s.useRef(e);return s.useEffect(()=>{if(!t){o.current=e,i(e);return}const r=Array.from(o.current),l=Array.from(e),c=Math.max(r.length,l.length);if(c===0||o.current===e)return;let d=0;const u=window.setInterval(()=>{d+=1;const p=[...l.slice(0,d),...r.slice(d)].join("");o.current=p,i(p),d>=c&&window.clearInterval(u)},70);return()=>window.clearInterval(u)},[t,e]),n}function Pw({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,portalId:r}){var kt,Qe;const{prefix:l}=b.useScopedStyles(),c=s.useMemo(()=>ew(l),[l]),d=t??[],u=(e==null?void 0:e.wrapperWidth)??1,p=(e==null?void 0:e.type)??"a",y=(e==null?void 0:e.imgWidth)??mo,x=(e==null?void 0:e.titleWidth)??gw,m=hw(e==null?void 0:e.imageDisplay),f=(e==null?void 0:e.cornerRadius)??ZS,S=nw(e==null?void 0:e.position),{horizontal:w,vertical:N}=Gl(S),v=(e==null?void 0:e.titleTopPadding)??0,M=(e==null?void 0:e.titleBottomPadding)??0,R=(e==null?void 0:e.titleLeftPadding)??0,U=(e==null?void 0:e.titleRightPadding)??0,X=(e==null?void 0:e.titleDescriptionPadding)??0,D=Cw(e==null?void 0:e.transition),_=(e==null?void 0:e.lightbox)??"on",W=p==="b",T=D==="fade"||D==="retype",{setTitleRef:C,dominantIndex:q}=Mw(d.length,T,S),E=((kt=d[q])==null?void 0:kt.title)??"",$=((Qe=d[q])==null?void 0:Qe.description)??"",I=Sd(E,D==="retype"),j=Sd($,D==="retype"),F=D==="fade"||D==="retype",K=D==="retype"?I:E,P=D==="retype"?j:$,h=W?void 0:{width:b.scalingValue(y,n??!1)},J=_==="on"&&(!n||i||o),V=o??!1,he=(e==null?void 0:e.galleryPaddingRight)??0,k=(e==null?void 0:e.galleryPaddingLeft)??0,ce=(e==null?void 0:e.galleryPaddingBetween)??0,L=at=>b.scalingValue(at,n??!1),te={width:L(x)},ve=p==="a"?he:k,Le=W?{width:"100%"}:{width:`calc(100% - ${L(y)} - ${L(ve)})`,...p==="c"?{marginLeft:"auto"}:{}},de=Math.max(he,ti),ue=Math.max(k,ti),Z=Math.max(ce,ti),le=Math.max(v,ti),oe=Math.max(M,ti),ge=Math.max(R,ti),Se=Math.max(U,ti),Ee=Math.max(X,ti),Ne=Math.max(0,(u??1)-(y??mo)),Te=p==="a"?Math.max(0,(u??1)-(y??mo)-he):p==="c"?Math.max(0,(u??1)-(y??mo)-k):p==="b"?u??1:1,Ce=V&&N==="top",g=V&&N==="bottom",Y=V&&w==="left",ee=V&&w==="right",ae=d.length>1,ye=W?void 0:L((p==="c"?k:he)+(y??mo)),ne=p==="c"&&ye?{left:ye}:void 0,B=p==="a"&&ye?{right:ye}:void 0,G=W?{left:0,width:"100%"}:p==="a"?{right:L(he),width:L(y)}:{left:L(k),width:L(y)},{titleColor:z,titleFontFamily:ie,titleFontSettings:H,titleFontSize:be,titleLineHeight:re,titleLetterSpacing:Q,titleWordSpacing:Pe,titleAlign:Ae,titleTextAppearance:He,descriptionColor:Xe,descriptionFontFamily:Ue,descriptionFontSettings:Je,descriptionFontSize:je,descriptionLineHeight:xe,descriptionLetterSpacing:Ie,descriptionWordSpacing:ze,descriptionAlign:Ze,descriptionTextAppearance:tt,lightboxCounterColor:ot,lightboxCounterFontFamily:lt,lightboxCounterFontSettings:it,lightboxCounterFontSize:xt,lightboxCounterLineHeight:rt,lightboxCounterLetterSpacing:_e,lightboxCounterWordSpacing:We,lightboxCounterTextAppearance:vt}=e??{},Ve={fontSettings:{fontFamily:ie,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:be??.01,lineHeight:re,letterSpacing:Q??0,wordSpacing:Pe??0,textAlign:Ae??"left",textAppearance:He,color:z??"#000000"},pe=pn(nn(Ve,n)),De=te,qe={...Cs(be,re,l,n),...Cs(je,xe,l,n,"description-leading-gap")},bt=$s(be,re,`${l}-title`,`${l}-text-tight-leading`),yt={fontSettings:{fontFamily:Ue,fontWeight:(Je==null?void 0:Je.fontWeight)??400,fontStyle:(Je==null?void 0:Je.fontStyle)??"normal"},fontSize:je??.01,lineHeight:xe,letterSpacing:Ie??0,wordSpacing:ze??0,textAlign:Ze??"left",textAppearance:tt,color:Xe??"#000000"},Et=pn(nn(yt,n)),ct=$s(je,xe,`${l}-description-text`,`${l}-description-tight-leading`),wt=L(V?Ee:X),nt={fontSettings:{fontFamily:lt,fontWeight:(it==null?void 0:it.fontWeight)??400,fontStyle:(it==null?void 0:it.fontStyle)??"normal"},fontSize:xt??.01,lineHeight:rt,letterSpacing:_e??0,wordSpacing:We??0,textAppearance:vt,color:ot??"#DEDDDD"},jt={...pn(nn(nt,n)),...Cs(xt,rt,l,n)},$e=$s(xt,rt,`${l}-lightbox-counter`,`${l}-text-tight-leading`),Ge=b.buildColorVars(l,{titleColor:z??"#000000",descriptionColor:Xe??"#000000",lightboxCounterColor:ot??"#DEDDDD"},aw,sw),ht=s.useRef(null),[Lt,$t]=s.useState(!1),[mt,_t]=s.useState([]),[Ot,zt]=s.useState(0),Re=s.useCallback((at,It)=>{J&&(_t(at),zt(It),$t(!0))},[J]),dt=s.useCallback(()=>{$t(!1)},[]),ut=s.useMemo(()=>{const at={...Ge},It=ht.current?getComputedStyle(ht.current).getPropertyValue("--cntrl-article-width").trim():"";return It&&(at["--cntrl-article-width"]=It),at},[Ge,Lt]);return s.useEffect(()=>{if(!Lt||_!=="on"||typeof document>"u")return;const at=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=at}},[Lt,_]),s.useEffect(()=>{!n||o||i||$t(!1)},[n,o,i]),s.useEffect(()=>{_==="off"&&$t(!1)},[_]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),a.jsx("div",{style:Ge,children:a.jsxs("div",{ref:ht,className:`${l}-wrapper`,style:{width:b.scalingValue(u,n??!1),[`--${l}-title-top-padding`]:N==="top"?L(v):void 0,[`--${l}-title-bottom-padding`]:N==="bottom"?L(M):void 0,[`--${l}-title-left-padding`]:w==="left"?L(R):void 0,[`--${l}-title-right-padding`]:w==="right"?L(U):void 0},children:[F&&a.jsx("div",{className:`${l}-single-title-layer`,children:a.jsx(Ts,{P:l,title:K,description:P,position:S,titleRef:()=>{},titleClassName:`${bt} ${l}-single-title`,titleContainerStyle:{...qe,...Le},titleTextBoxStyle:De,titleStyle:pe,descriptionClassName:ct,descriptionStyle:Et,descriptionPadding:wt,showTextBoxOutline:V,showDescriptionPaddingControl:V,topPaddingControl:Ce?Jr({P:l,controlKey:"titleTopPadding",scaled:L,height:le,paired:!1,side:"top"}):void 0,bottomPaddingControl:g?Jr({P:l,controlKey:"titleBottomPadding",scaled:L,height:oe,paired:!1,side:"bottom"}):void 0})}),d.map((at,It)=>{const At=uw(at.gallery),pt=It<d.length-1,Ut=At.filter(Dt=>Dt.lightboxMedia).map(Dt=>Dt.lightboxMedia),qt={P:l,position:S,titleRef:C(It),titleClassName:bt,titleContainerStyle:qe,titleTextBoxStyle:F?{maxWidth:"100%"}:De,titleStyle:pe,descriptionClassName:ct,descriptionStyle:Et,descriptionPadding:wt,showTextBoxOutline:V&&!F,showDescriptionPaddingControl:V&&!F,descriptionPaddingPaired:ae,topPaddingControl:Ce&&!F?Jr({P:l,controlKey:"titleTopPadding",scaled:L,height:le,paired:ae,side:"top"}):void 0,bottomPaddingControl:g&&!F?Jr({P:l,controlKey:"titleBottomPadding",scaled:L,height:oe,paired:ae,side:"bottom"}):void 0};return a.jsxs("div",{"data-item-index":It,className:`${l}-item ${l}-item-${p}`,style:{paddingBottom:pt?L(ce):void 0},children:[Y&&vd({P:l,controlKey:"titleLeftPadding",scaled:L,width:ge,maxFraction:Te,side:"left",paired:ae,anchorStyle:ne}),ee&&vd({P:l,controlKey:"titleRightPadding",scaled:L,width:Se,maxFraction:Te,side:"right",paired:ae,anchorStyle:B}),V&&pt&&a.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-control-anchor`,style:{bottom:0,height:L(Z),...G}}),W?a.jsxs("div",{className:`${l}-gallery`,children:[a.jsx("div",{className:`${l}-gallery-media`,children:At.map(({displayMedia:Dt,lightboxMedia:Vt},Gt)=>{const Bt=Vt?Ut.findIndex(Yt=>Yt.assetId===Vt.assetId):-1;return a.jsx(yd,{P:l,media:Dt,imgWidth:y||void 0,cornerRadius:f||void 0,imageDisplay:m,isEditor:n,galleryPaddingBetween:ce,showPaddingAfter:Gt<At.length-1,showControls:V,onMediaClick:J&&Bt>=0?()=>Re(Ut,Bt):void 0},`${Dt.assetId}-${Gt}`)})}),a.jsx("div",{className:`${l}-title-layer`,children:a.jsx(Ts,{...qt,title:F?"":at.title,description:F?"":at.description})})]}):a.jsxs(a.Fragment,{children:[a.jsx(Ts,{...qt,title:F?"":at.title,description:F?"":at.description}),At.length>0&&a.jsx($w,{P:l,layoutType:p,galleryWidthStyle:h,galleryPaddingRight:he,galleryPaddingLeft:k,galleryPaddingRightWidth:de,galleryPaddingLeftWidth:ue,galleryPaddingMaxFraction:Ne,showControls:V,scaled:L,children:At.map(({displayMedia:Dt,lightboxMedia:Vt},Gt)=>{const Bt=Vt?Ut.findIndex(Yt=>Yt.assetId===Vt.assetId):-1;return a.jsx(yd,{P:l,media:Dt,cornerRadius:f||void 0,fillGalleryWidth:!0,imageDisplay:m,isEditor:n,galleryPaddingBetween:ce,showPaddingAfter:Gt<At.length-1,showControls:V,onMediaClick:J&&Bt>=0?()=>Re(Ut,Bt):void 0},`${Dt.assetId}-${Gt}`)})})]})]},It)})]})}),Lt&&_==="on"&&typeof document<"u"&&e&&(()=>{const at=(r?document.getElementById(r):null)??document.body;return qn.createPortal(a.jsx("div",{style:ut,"data-selection":"none",children:a.jsx(ww,{prefix:l,items:mt,index:Ot,imageDisplay:yw(e.lightboxImageDisplay),isEditor:n,isPreviewMode:i,isEditMode:o,closeIcon:e.closeIcon,closeIconMaxWidth:e.closeIconMaxWidth,closeIconColor:e.closeIconColor,closeIconHoverColor:e.closeIconHoverColor,iconMarginRight:e.iconMarginRight,contentMarginTop:e.contentMarginTop,onClose:dt,onPrev:()=>zt(It=>(It-1+mt.length)%mt.length),onNext:()=>zt(It=>(It+1)%mt.length),counterClassName:$e,counterStyle:jt,backgroundColor:e.backgroundColor??iw})}),at)})()]})}const Rw=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
21548
+ `}const Pp={"left-top":{horizontal:"left",vertical:"top"},"top-center":{horizontal:"center",vertical:"top"},"top-right":{horizontal:"right",vertical:"top"},"left-center":{horizontal:"left",vertical:"center"},center:{horizontal:"center",vertical:"center"},"right-center":{horizontal:"right",vertical:"center"},"left-bottom":{horizontal:"left",vertical:"bottom"},"bottom-center":{horizontal:"center",vertical:"bottom"},"right-bottom":{horizontal:"right",vertical:"bottom"}};function nw(e){return e in Pp}function iw(e){if(e&&nw(e))return e;switch(e){case"center-top":return"top-center";case"right-top":return"top-right";case"top-left":return"left-top";case"center-bottom":return"bottom-center";case"bottom-left":return"left-bottom";case"bottom-right":return"right-bottom";case"center-center":return"center";case"left":return"left-center";case"right":return"right-center";case"top":return"left-top";default:return"center"}}function Xl(e){return Pp[e]}const ow="rgba(28,31,34,0.9)",Jn=500,Bi="cubic-bezier(0.22, 1, 0.36, 1)",rw=72,aw=50,sw={titleColor:"title-color",descriptionColor:"description-color",lightboxCounterColor:"lightbox-counter-color"},lw=[];function cw(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 dw(e){const[t,n]=e.media;return n!=null&&n.assetId?n:t!=null&&t.assetId?t:null}function uw(e){const[t]=e.media;return t!=null&&t.assetId?t:null}function pw(e){if(!Array.isArray(e)||e.length===0)return[];if(cw(e)){const t=[];for(const n of e){const i=dw(n);if(!i)continue;const o=uw(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.assetId?o:null})}return t}return e.filter(t=>t==null?void 0:t.assetId).map(t=>({displayMedia:t,lightboxMedia:t}))}function Ys(e){return e.type==="video"}function mw(e){e.pause(),e.removeAttribute("src"),e.load()}function Zr(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function gw(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}const hw=1140/1440;function fw(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 yw(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 vw(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function xw({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l,onTransitionEnd:c}){return s.useEffect(()=>{const d=n.current;if(d)return()=>{mw(d)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:r,onMouseMove:l,onTransitionEnd:c,style:i})}const bw="https://cdn.cntrl.site/component-assets/defaultCloseIcon.svg",Sw=.004;function ww({prefix:e,closeIcon:t=bw,closeIconMaxWidth:n=.0125,closeIconColor:i="#FFFFFF",closeIconHoverColor:o="#999999",iconMarginRight:r=.01,contentMarginTop:l=.01,isEditor:c,isPreviewMode:d,isEditMode:u,visible:p,onClose:y}){if(!t)return null;const x=b.scalingValue(n,c),m=b.scalingValue(r,c),f=b.scalingValue(l,c),S=b.scalingValue(Math.max(l,Sw),c);return a.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,zIndex:1e4,display:"flex",flexDirection:"column",alignItems:"flex-end",pointerEvents:"none",opacity:p?1:0,transition:"opacity 500ms cubic-bezier(0.22, 1, 0.36, 1)"},children:[a.jsx("div",{style:{position:"relative",width:"100%",height:f,flexShrink:0},children:u&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-min":"0",className:`${e}-control`,style:{position:"absolute",top:0,left:0,width:"100%",height:S,pointerEvents:p?"auto":"none"}})}),a.jsxs("div",{className:`${e}-close-icon`,style:{width:x,height:x,marginRight:m,pointerEvents:p?"auto":"none"},onClick:w=>w.stopPropagation(),children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,"aria-label":"Close",onClick:w=>{w.stopPropagation(),y()},children:a.jsx(mn,{url:t,fill:i,hoverFill:c&&!d?i:o,className:`${e}-close-icon-img`})}),u&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:m,height:"100%",pointerEvents:p?"auto":"none"}})]})]})}function $w({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,isPreviewMode:r,isEditMode:l,onClose:c,onPrev:d,onNext:u,counterClassName:p,counterStyle:y,backgroundColor:x,closeIcon:m,closeIconMaxWidth:f,closeIconColor:S,closeIconHoverColor:w,iconMarginRight:N,contentMarginTop:v}){const M=i==="cover",E=s.useRef(null),U=s.useRef(null),X=s.useRef(null),D=s.useRef(0),_=s.useRef(0),W=s.useRef("none"),T=s.useRef(!1),C=s.useRef(!1),q=s.useRef(!1),R=s.useRef(null),[$,I]=s.useState(null),[j,F]=s.useState("opening"),[K,P]=s.useState(0),[h,J]=s.useState(0),[V,he]=s.useState(!1),[k,ce]=s.useState(!1),[L,me]=s.useState(!1),te=s.useRef(n),ve=t[n],Le=ve?Ys(ve):!1,de=ve?b.isEmbedMedia(ve):!1,ue=h!==0||V,Z=s.useCallback(G=>{q.current=G,he(G)},[]),le=s.useCallback(()=>{R.current!==null&&(window.clearTimeout(R.current),R.current=null)},[]),oe=s.useCallback(()=>{le(),R.current=window.setTimeout(()=>{le(),Z(!1)},Jn+32)},[le,Z]),ge=s.useCallback(()=>{const G=E.current,z=U.current;if(!G)return;const ie=G.getBoundingClientRect(),H=ie.width,be=ie.height;if(!H||!be)return;if(i==="cover"){I({width:H,height:be,left:ie.left,top:ie.top});return}let re=ve&&b.isEmbedMedia(ve)?b.getEmbedAspect(ve):null;if(re===null){if(!z){I(Zr(G));return}const{width:Pe,height:Ae}=gw(z);if(!Pe||!Ae){I(Zr(G));return}re=Pe/Ae}const Q=H/be;if(re>Q){const Pe=H/re;I({width:H,height:Pe,left:ie.left,top:ie.top+(be-Pe)/2})}else{const Pe=be*re;I({width:Pe,height:be,left:ie.left+(H-Pe)/2,top:ie.top})}},[i,ve]);s.useEffect(()=>{ge();const G=E.current;if(!G)return;const z=new ResizeObserver(()=>ge());return z.observe(G),()=>z.disconnect()},[ge,n]),s.useEffect(()=>{j==="opening"&&$&&F("open")},[j,$]),s.useEffect(()=>{if(j!=="closing")return;const G=setTimeout(()=>c(),Jn);return()=>clearTimeout(G)},[j,c]),s.useEffect(()=>()=>{le()},[le]),s.useLayoutEffect(()=>{if(te.current===n)return;le(),P(0),J(0),Z(!1),me(!1),ce(!1),D.current=0,_.current=0,W.current="none",T.current=!1,X.current=null,C.current=!1;const G=E.current;G&&I(Zr(G)),te.current=n},[n,Z,le]),s.useEffect(()=>{if(j!=="open")return;let G=null;const z=()=>{G&&(document.removeEventListener("click",G,!0),G=null)},ie=()=>{z(),G=Ae=>{Ae.stopPropagation(),Ae.preventDefault(),z()},document.addEventListener("click",G,!0)},H=Ae=>{le(),q.current=!1,he(!1),J(0),ce(!1),T.current=!1,_.current=0,W.current="none";const He=E.current;He&&I(Zr(He)),Ae<0?u():d()},be=Ae=>{if(Math.abs(Ae)>aw&&t.length>1){H(Ae);return}Z(!0),J(0),oe()},re=Ae=>{if(Ae.touches.length!==1||q.current)return;const He=Ae.touches[0];C.current=!0,X.current={x:He.clientX,y:He.clientY},W.current="none",_.current=0,T.current=!1},Q=Ae=>{if(!X.current||Ae.touches.length!==1||q.current)return;const He=Ae.touches[0],Xe=He.clientX-X.current.x,Ue=He.clientY-X.current.y;if(W.current==="none"){if(Math.abs(Xe)<10&&Math.abs(Ue)<10)return;if(Math.abs(Xe)>Math.abs(Ue)){if(t.length<=1)return;W.current="horizontal"}else if(Ue>0)W.current="vertical";else return}if(W.current==="horizontal"){T.current=!0,ce(!0),_.current=Xe,J(Xe),Ae.preventDefault();return}W.current==="vertical"&&(T.current=!0,ce(!0),D.current=Ue,P(Ue),Ae.preventDefault())},Pe=()=>{if(!X.current)return;const Ae=W.current,He=T.current;if(He&&Ae==="horizontal")be(_.current),ie();else if(He&&Ae==="vertical")if(D.current>rw){const Ue=window.innerHeight;D.current=Ue,me(!0),P(Ue),F("closing")}else D.current=0,P(0),ie();else Ae==="horizontal"&&Math.abs(_.current)>0&&(be(_.current),ie());X.current=null,W.current="none",_.current=0,T.current=!1,ce(!1)};return document.addEventListener("touchstart",re,{passive:!0}),document.addEventListener("touchmove",Q,{passive:!1}),document.addEventListener("touchend",Pe),document.addEventListener("touchcancel",Pe),()=>{document.removeEventListener("touchstart",re),document.removeEventListener("touchmove",Q),document.removeEventListener("touchend",Pe),document.removeEventListener("touchcancel",Pe),z()}},[j,t.length,u,d,Z,oe,le]),s.useEffect(()=>{const G=z=>{z.key==="Escape"&&(z.preventDefault(),z.stopPropagation(),j!=="closing"&&F("closing"))};return window.addEventListener("keydown",G,!0),()=>window.removeEventListener("keydown",G,!0)},[j]);const Se=()=>{j!=="closing"&&F("closing")},Re=j==="open",Ne=j==="closing",Te=K>0?Math.max(0,1-K/500):1,Ce=K>0?Math.max(.35,1-K/500):1,g=G=>{if(G.stopPropagation(),C.current){C.current=!1;return}if(t.length<=1)return;const z=G.currentTarget.getBoundingClientRect(),ie=G.clientY-z.top,H=Math.min(52,z.height*.2);if(!(ie>z.height-H)){if(G.clientX-z.left<z.width/2){d();return}u()}},Y=G=>{if(t.length<=1)return;const z=G.currentTarget.getBoundingClientRect(),ie=G.clientX-z.left,H=G.clientY-z.top,be=Math.min(52,z.height*.2);if(H>z.height-be){G.currentTarget.style.cursor="default";return}G.currentTarget.style.cursor=ie<z.width/2?"w-resize":"e-resize"},ee=s.useCallback(G=>{G.propertyName!=="transform"||!q.current||(le(),Z(!1))},[le,Z]),ae=ue?`translateX(${h}px)`:K>0?`translateY(${K}px)`:void 0,ye={position:"fixed",top:$==null?void 0:$.top,left:$==null?void 0:$.left,width:$==null?void 0:$.width,height:$==null?void 0:$.height,objectFit:i==="cover"?"cover":"contain",transform:ae,opacity:K>0?Ce:j==="opening"||Ne?0:1,transition:k&&!V?"none":V?`transform ${Jn}ms ${Bi}`:L?`transform ${Jn}ms ${Bi}, opacity ${Jn}ms ${Bi}`:j==="opening"||Ne?`opacity ${Jn}ms ${Bi}`:"none",pointerEvents:(Le||de)&&Re&&!ue?"auto":"none",touchAction:(Le||de)&&Re?"none":void 0,zIndex:9998},ne=de&&$?Math.min(52,$.height*.2):0,B=$?{position:"fixed",top:$.top,height:$.height-ne,width:$.width/2,zIndex:9999}:null;return a.jsxs("div",{className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:j==="open"?"none":void 0},onClick:Se,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:x,opacity:Re?Te:0,transition:k?"none":`opacity ${Jn}ms ${Bi}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:M?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:E,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Re?1:0,transition:`opacity ${Jn}ms ${Bi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:p,style:y,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:E,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Re?1:0,transition:`opacity ${Jn}ms ${Bi}`},children:t.length>1&&a.jsxs("p",{className:p,style:y,children:[n+1," / ",t.length]})})]})}),$&&ve&&(de?a.jsx(b.EmbedMediaFrame,{media:ve,mode:"player",fit:i==="cover"?"cover":"contain",lazy:!1,interactive:Re&&!ue,style:ye,onTransitionEnd:ee},`${n}-${ve.assetId}`):Le?a.jsx(xw,{src:ve.assetId,phase:j,mediaRef:U,mediaStyle:ye,onLoadedMetadata:ge,onClick:g,onMouseMove:Y,onTransitionEnd:ee},`${n}-${ve.assetId}`):a.jsx("img",{ref:U,src:ve.assetId,alt:ve.name,onLoad:ge,onTransitionEnd:ee,style:ye},`${n}-${ve.assetId}`)),Re&&B&&t.length>1&&!Le&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...B,left:$.left,cursor:"w-resize",pointerEvents:ue?"none":"auto"},onClick:G=>{if(C.current){C.current=!1;return}G.stopPropagation(),d()}}),a.jsx("div",{style:{...B,left:$.left+$.width/2,cursor:"e-resize",pointerEvents:ue?"none":"auto"},onClick:G=>{if(C.current){C.current=!1;return}G.stopPropagation(),u()}})]}),a.jsx(ww,{prefix:e,closeIcon:m,closeIconMaxWidth:f,closeIconColor:S,closeIconHoverColor:w,iconMarginRight:N,contentMarginTop:v,isEditor:o,isPreviewMode:r,isEditMode:l,visible:Re,onClose:Se})]})}function vd({P:e,media:t,imgWidth:n,cornerRadius:i,fillGalleryWidth:o,imageDisplay:r,isEditor:l,galleryPaddingBetween:c=0,showPaddingAfter:d=!1,showControls:u=!1,onMediaClick:p}){const y=`${e}-gallery-${Ys(t)?"video":"image"}`,x=r.display==="cover",m=yw(r),f=_=>b.scalingValue(_,l??!1),S=n??mo,w=o?{width:"100%",maxWidth:"100%"}:{width:f(S),maxWidth:"100%"},N=i?{borderRadius:f(i)}:{},v={...w,...x?{aspectRatio:m,height:"auto",overflow:"hidden"}:{},...N},M={...x?{display:"block",width:"100%",height:"100%",objectFit:"cover",maxWidth:"100%"}:{display:"block",maxWidth:"100%",height:"auto",width:o?"100%":f(S)},...p?{cursor:"pointer",pointerEvents:"auto"}:{},...x?{}:N},U={className:y,style:M,onClick:p?_=>{_.stopPropagation(),p()}:void 0},X=Math.max(c,ti),D=b.isEmbedMedia(t)?a.jsx(b.EmbedMediaFrame,{...U,media:t,mode:"background",fit:x?"cover":"contain"}):Ys(t)?a.jsx("video",{...U,src:t.assetId,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):a.jsx("img",{...U,src:t.assetId,alt:t.name??""});return a.jsxs("div",{className:`${e}-gallery-item`,children:[x?a.jsx("div",{style:v,children:D}):D,d&&c>0&&a.jsx("div",{className:`${e}-padding-handle`,style:{height:f(c)},"aria-hidden":"true"}),u&&d&&a.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:f(X)}})]})}function Cw({P:e,layoutType:t,galleryWidthStyle:n,galleryPaddingRight:i,galleryPaddingLeft:o,galleryPaddingRightWidth:r,galleryPaddingLeftWidth:l,galleryPaddingMaxFraction:c,showControls:d,scaled:u,children:p}){const y=t==="a"?i:t==="c"?o:0,x=y>0||d;return a.jsxs("div",{className:`${e}-gallery-controls`,children:[t==="c"&&x&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(y)},"aria-hidden":"true"}),d&&t==="c"&&a.jsx("div",{"data-controls":"galleryPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(c),className:`${e}-control-anchor`,style:{top:0,left:0,width:u(l),height:"100%"}}),a.jsx("div",{className:`${e}-gallery`,style:n,children:p}),t==="a"&&x&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(y)},"aria-hidden":"true"}),d&&t==="a"&&a.jsx("div",{"data-controls":"galleryPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(c),className:`${e}-control-anchor`,style:{top:0,right:0,width:u(r),height:"100%"}})]})}function Tw(e){switch(e){case"fade":case"retype":case"scroll":return e;case"default":return"scroll";default:return"scroll"}}function Jr({P:e,controlKey:t,scaled:n,height:i,paired:o,side:r}){return a.jsx("div",{"data-controls":t,...o?{"data-controls-paired":""}:{},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{...r==="top"?{top:0}:{bottom:0},left:0,width:"100%",height:n(i)}})}function xd({P:e,controlKey:t,scaled:n,width:i,maxFraction:o,side:r,paired:l,anchorStyle:c}){return a.jsx("div",{"data-controls":t,...l?{"data-controls-paired":""}:{},"data-controls-axis":"x","data-controls-variant":"column-padding",...r==="right"?{"data-controls-reverse":""}:{},"data-controls-min":"0","data-controls-max-fraction":String(o),className:`${e}-control-anchor`,style:{top:0,...r==="left"?{left:0}:{right:0},width:n(i),height:"100%",...c}})}function Is({P:e,title:t,description:n,position:i,titleRef:o,titleClassName:r,titleContainerStyle:l,titleTextBoxStyle:c,titleStyle:d,descriptionClassName:u,descriptionStyle:p,descriptionPadding:y,showTextBoxOutline:x=!1,showDescriptionPaddingControl:m=!1,descriptionPaddingPaired:f=!1,topPaddingControl:S,bottomPaddingControl:w}){const N=s.useRef(null),[v,M]=s.useState(0),E=t??"",U=n??"",X=U.length>0,{horizontal:D,vertical:_}=Xl(i),W=_==="center"||_==="bottom",T=_==="bottom";s.useLayoutEffect(()=>{if(!W)return;const $=N.current;if(!$||typeof ResizeObserver>"u")return;const I=()=>M($.offsetHeight);I();const j=new ResizeObserver(I);return j.observe($),()=>j.disconnect()},[E,U,W]);const C=a.jsx("span",{className:`${e}-title-text`,style:d,children:E}),q=X?a.jsx("span",{className:u,style:p,children:U}):null,R=X?a.jsx("div",{className:`${e}-title-texts-gap`,style:{height:y},children:m&&a.jsx("div",{"data-controls":"titleDescriptionPadding",...f?{"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:"100%"}})}):null;return a.jsx("div",{ref:$=>{N.current=$,o($)},className:[r,`${e}-title-h-${D}`,`${e}-title-v-${_}`].join(" "),style:{...W?{[`--${e}-title-height`]:`${v}px`}:{},...l},children:a.jsxs("div",{className:`${e}-title-text-stack`,style:c,children:[S,a.jsx("div",{className:x?`${e}-title-text-inner`:`${e}-title-text-inner-hidden`,style:{width:"100%"},children:a.jsx("div",{className:`${e}-title-texts`,children:T?a.jsxs(a.Fragment,{children:[q,R,C]}):a.jsxs(a.Fragment,{children:[C,R,q]})})}),w]})})}const bd=45;function Sd(e,t,n){let i=e;for(;i;){const o=getComputedStyle(i).getPropertyValue(t).trim();if(o){const r=parseFloat(o);if(!Number.isNaN(r))return r}i=i.parentElement}return n}function Iw(e){const t=Sd(e,"--cntrl-viewport-height",window.innerHeight),n=Sd(e,"--cntrl-article-top",0);return{top:n,height:t,centerY:n+t/2}}function Lw(e,t,n){const{vertical:i}=Xl(t),{top:o,height:r,centerY:l}=Iw(n);if(i==="top"){const d=n&&parseFloat(getComputedStyle(n).top)||o;return Math.abs(e.top-d)}if(i==="bottom")return Math.abs(e.bottom-(o+r));const c=e.top+e.height/2;return Math.abs(c-l)}function Mw(e,t,n){const i=Array.from({length:t},(l,c)=>{const d=e.current[c];if(!d)return 0;const u=d.getBoundingClientRect(),p=Lw(u,n,d);return Math.exp(-(p*p)/(2*bd*bd))});let o=0,r=-1;return i.forEach((l,c)=>{l>r&&(r=l,o=c)}),{opacities:i,dominantIndex:o}}function Pw(e,t,n){const i=s.useRef([]),[{opacities:o,dominantIndex:r},l]=s.useState(()=>({opacities:Array.from({length:e},(d,u)=>u===0?1:0),dominantIndex:0}));return s.useLayoutEffect(()=>{if(!t||e===0){l({opacities:Array.from({length:e},()=>1),dominantIndex:0});return}let d=0;const u=()=>{l(Mw(i,e,n))},p=()=>{d||(d=window.requestAnimationFrame(()=>{d=0,u()}))};return u(),window.addEventListener("scroll",p,{passive:!0}),window.addEventListener("resize",p,{passive:!0}),()=>{d&&window.cancelAnimationFrame(d),window.removeEventListener("scroll",p),window.removeEventListener("resize",p)}},[t,e,n]),{setTitleRef:d=>u=>{i.current[d]=u},opacities:o,dominantIndex:r}}function wd(e,t){const[n,i]=s.useState(e),o=s.useRef(e);return s.useEffect(()=>{if(!t){o.current=e,i(e);return}const r=Array.from(o.current),l=Array.from(e),c=Math.max(r.length,l.length);if(c===0||o.current===e)return;let d=0;const u=window.setInterval(()=>{d+=1;const p=[...l.slice(0,d),...r.slice(d)].join("");o.current=p,i(p),d>=c&&window.clearInterval(u)},70);return()=>window.clearInterval(u)},[t,e]),n}function Ew({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,portalId:r}){var kt,Qe;const{prefix:l}=b.useScopedStyles(),c=s.useMemo(()=>tw(l),[l]),d=t??[],u=(e==null?void 0:e.wrapperWidth)??1,p=(e==null?void 0:e.type)??"a",y=(e==null?void 0:e.imgWidth)??mo,x=(e==null?void 0:e.titleWidth)??hw,m=fw(e==null?void 0:e.imageDisplay),f=(e==null?void 0:e.cornerRadius)??JS,S=iw(e==null?void 0:e.position),{horizontal:w,vertical:N}=Xl(S),v=(e==null?void 0:e.titleTopPadding)??0,M=(e==null?void 0:e.titleBottomPadding)??0,E=(e==null?void 0:e.titleLeftPadding)??0,U=(e==null?void 0:e.titleRightPadding)??0,X=(e==null?void 0:e.titleDescriptionPadding)??0,D=Tw(e==null?void 0:e.transition),_=(e==null?void 0:e.lightbox)??"on",W=p==="b",T=D==="fade"||D==="retype",{setTitleRef:C,dominantIndex:q}=Pw(d.length,T,S),R=((kt=d[q])==null?void 0:kt.title)??"",$=((Qe=d[q])==null?void 0:Qe.description)??"",I=wd(R,D==="retype"),j=wd($,D==="retype"),F=D==="fade"||D==="retype",K=D==="retype"?I:R,P=D==="retype"?j:$,h=W?void 0:{width:b.scalingValue(y,n??!1)},J=_==="on"&&(!n||i||o),V=o??!1,he=(e==null?void 0:e.galleryPaddingRight)??0,k=(e==null?void 0:e.galleryPaddingLeft)??0,ce=(e==null?void 0:e.galleryPaddingBetween)??0,L=at=>b.scalingValue(at,n??!1),te={width:L(x)},ve=p==="a"?he:k,Le=W?{width:"100%"}:{width:`calc(100% - ${L(y)} - ${L(ve)})`,...p==="c"?{marginLeft:"auto"}:{}},de=Math.max(he,ti),ue=Math.max(k,ti),Z=Math.max(ce,ti),le=Math.max(v,ti),oe=Math.max(M,ti),ge=Math.max(E,ti),Se=Math.max(U,ti),Re=Math.max(X,ti),Ne=Math.max(0,(u??1)-(y??mo)),Te=p==="a"?Math.max(0,(u??1)-(y??mo)-he):p==="c"?Math.max(0,(u??1)-(y??mo)-k):p==="b"?u??1:1,Ce=V&&N==="top",g=V&&N==="bottom",Y=V&&w==="left",ee=V&&w==="right",ae=d.length>1,ye=W?void 0:L((p==="c"?k:he)+(y??mo)),ne=p==="c"&&ye?{left:ye}:void 0,B=p==="a"&&ye?{right:ye}:void 0,G=W?{left:0,width:"100%"}:p==="a"?{right:L(he),width:L(y)}:{left:L(k),width:L(y)},{titleColor:z,titleFontFamily:ie,titleFontSettings:H,titleFontSize:be,titleLineHeight:re,titleLetterSpacing:Q,titleWordSpacing:Pe,titleAlign:Ae,titleTextAppearance:He,descriptionColor:Xe,descriptionFontFamily:Ue,descriptionFontSettings:Je,descriptionFontSize:je,descriptionLineHeight:xe,descriptionLetterSpacing:Ie,descriptionWordSpacing:ze,descriptionAlign:Ze,descriptionTextAppearance:tt,lightboxCounterColor:ot,lightboxCounterFontFamily:lt,lightboxCounterFontSettings:it,lightboxCounterFontSize:xt,lightboxCounterLineHeight:rt,lightboxCounterLetterSpacing:_e,lightboxCounterWordSpacing:We,lightboxCounterTextAppearance:vt}=e??{},Ve={fontSettings:{fontFamily:ie,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:be??.01,lineHeight:re,letterSpacing:Q??0,wordSpacing:Pe??0,textAlign:Ae??"left",textAppearance:He,color:z??"#000000"},pe=pn(nn(Ve,n)),De=te,qe={...Ts(be,re,l,n),...Ts(je,xe,l,n,"description-leading-gap")},bt=Cs(be,re,`${l}-title`,`${l}-text-tight-leading`),yt={fontSettings:{fontFamily:Ue,fontWeight:(Je==null?void 0:Je.fontWeight)??400,fontStyle:(Je==null?void 0:Je.fontStyle)??"normal"},fontSize:je??.01,lineHeight:xe,letterSpacing:Ie??0,wordSpacing:ze??0,textAlign:Ze??"left",textAppearance:tt,color:Xe??"#000000"},Rt=pn(nn(yt,n)),ct=Cs(je,xe,`${l}-description-text`,`${l}-description-tight-leading`),wt=L(V?Re:X),nt={fontSettings:{fontFamily:lt,fontWeight:(it==null?void 0:it.fontWeight)??400,fontStyle:(it==null?void 0:it.fontStyle)??"normal"},fontSize:xt??.01,lineHeight:rt,letterSpacing:_e??0,wordSpacing:We??0,textAppearance:vt,color:ot??"#DEDDDD"},jt={...pn(nn(nt,n)),...Ts(xt,rt,l,n)},$e=Cs(xt,rt,`${l}-lightbox-counter`,`${l}-text-tight-leading`),Ge=b.buildColorVars(l,{titleColor:z??"#000000",descriptionColor:Xe??"#000000",lightboxCounterColor:ot??"#DEDDDD"},sw,lw),ht=s.useRef(null),[Lt,$t]=s.useState(!1),[mt,_t]=s.useState([]),[Ot,zt]=s.useState(0),Ee=s.useCallback((at,It)=>{J&&(_t(at),zt(It),$t(!0))},[J]),dt=s.useCallback(()=>{$t(!1)},[]),ut=s.useMemo(()=>{const at={...Ge},It=ht.current?getComputedStyle(ht.current).getPropertyValue("--cntrl-article-width").trim():"";return It&&(at["--cntrl-article-width"]=It),at},[Ge,Lt]);return s.useEffect(()=>{if(!Lt||_!=="on"||typeof document>"u")return;const at=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=at}},[Lt,_]),s.useEffect(()=>{!n||o||i||$t(!1)},[n,o,i]),s.useEffect(()=>{_==="off"&&$t(!1)},[_]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),a.jsx("div",{style:Ge,children:a.jsxs("div",{ref:ht,className:`${l}-wrapper`,style:{width:b.scalingValue(u,n??!1),[`--${l}-title-top-padding`]:N==="top"?L(v):void 0,[`--${l}-title-bottom-padding`]:N==="bottom"?L(M):void 0,[`--${l}-title-left-padding`]:w==="left"?L(E):void 0,[`--${l}-title-right-padding`]:w==="right"?L(U):void 0},children:[F&&a.jsx("div",{className:`${l}-single-title-layer`,children:a.jsx(Is,{P:l,title:K,description:P,position:S,titleRef:()=>{},titleClassName:`${bt} ${l}-single-title`,titleContainerStyle:{...qe,...Le},titleTextBoxStyle:De,titleStyle:pe,descriptionClassName:ct,descriptionStyle:Rt,descriptionPadding:wt,showTextBoxOutline:V,showDescriptionPaddingControl:V,topPaddingControl:Ce?Jr({P:l,controlKey:"titleTopPadding",scaled:L,height:le,paired:!1,side:"top"}):void 0,bottomPaddingControl:g?Jr({P:l,controlKey:"titleBottomPadding",scaled:L,height:oe,paired:!1,side:"bottom"}):void 0})}),d.map((at,It)=>{const At=pw(at.gallery),pt=It<d.length-1,Ut=At.filter(Dt=>Dt.lightboxMedia).map(Dt=>Dt.lightboxMedia),qt={P:l,position:S,titleRef:C(It),titleClassName:bt,titleContainerStyle:qe,titleTextBoxStyle:F?{maxWidth:"100%"}:De,titleStyle:pe,descriptionClassName:ct,descriptionStyle:Rt,descriptionPadding:wt,showTextBoxOutline:V&&!F,showDescriptionPaddingControl:V&&!F,descriptionPaddingPaired:ae,topPaddingControl:Ce&&!F?Jr({P:l,controlKey:"titleTopPadding",scaled:L,height:le,paired:ae,side:"top"}):void 0,bottomPaddingControl:g&&!F?Jr({P:l,controlKey:"titleBottomPadding",scaled:L,height:oe,paired:ae,side:"bottom"}):void 0};return a.jsxs("div",{"data-item-index":It,className:`${l}-item ${l}-item-${p}`,style:{paddingBottom:pt?L(ce):void 0},children:[Y&&xd({P:l,controlKey:"titleLeftPadding",scaled:L,width:ge,maxFraction:Te,side:"left",paired:ae,anchorStyle:ne}),ee&&xd({P:l,controlKey:"titleRightPadding",scaled:L,width:Se,maxFraction:Te,side:"right",paired:ae,anchorStyle:B}),V&&pt&&a.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-control-anchor`,style:{bottom:0,height:L(Z),...G}}),W?a.jsxs("div",{className:`${l}-gallery`,children:[a.jsx("div",{className:`${l}-gallery-media`,children:At.map(({displayMedia:Dt,lightboxMedia:Vt},Gt)=>{const Bt=Vt?Ut.findIndex(Yt=>Yt.assetId===Vt.assetId):-1;return a.jsx(vd,{P:l,media:Dt,imgWidth:y||void 0,cornerRadius:f||void 0,imageDisplay:m,isEditor:n,galleryPaddingBetween:ce,showPaddingAfter:Gt<At.length-1,showControls:V,onMediaClick:J&&Bt>=0?()=>Ee(Ut,Bt):void 0},`${Dt.assetId}-${Gt}`)})}),a.jsx("div",{className:`${l}-title-layer`,children:a.jsx(Is,{...qt,title:F?"":at.title,description:F?"":at.description})})]}):a.jsxs(a.Fragment,{children:[a.jsx(Is,{...qt,title:F?"":at.title,description:F?"":at.description}),At.length>0&&a.jsx(Cw,{P:l,layoutType:p,galleryWidthStyle:h,galleryPaddingRight:he,galleryPaddingLeft:k,galleryPaddingRightWidth:de,galleryPaddingLeftWidth:ue,galleryPaddingMaxFraction:Ne,showControls:V,scaled:L,children:At.map(({displayMedia:Dt,lightboxMedia:Vt},Gt)=>{const Bt=Vt?Ut.findIndex(Yt=>Yt.assetId===Vt.assetId):-1;return a.jsx(vd,{P:l,media:Dt,cornerRadius:f||void 0,fillGalleryWidth:!0,imageDisplay:m,isEditor:n,galleryPaddingBetween:ce,showPaddingAfter:Gt<At.length-1,showControls:V,onMediaClick:J&&Bt>=0?()=>Ee(Ut,Bt):void 0},`${Dt.assetId}-${Gt}`)})})]})]},It)})]})}),Lt&&_==="on"&&typeof document<"u"&&e&&(()=>{const at=(r?document.getElementById(r):null)??document.body;return qn.createPortal(a.jsx("div",{style:ut,"data-selection":"none",children:a.jsx($w,{prefix:l,items:mt,index:Ot,imageDisplay:vw(e.lightboxImageDisplay),isEditor:n,isPreviewMode:i,isEditMode:o,closeIcon:e.closeIcon,closeIconMaxWidth:e.closeIconMaxWidth,closeIconColor:e.closeIconColor,closeIconHoverColor:e.closeIconHoverColor,iconMarginRight:e.iconMarginRight,contentMarginTop:e.contentMarginTop,onClose:dt,onPrev:()=>zt(It=>(It-1+mt.length)%mt.length),onNext:()=>zt(It=>(It+1)%mt.length),counterClassName:$e,counterStyle:jt,backgroundColor:e.backgroundColor??ow})}),at)})()]})}const Rw=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
21549
21549
  import { createPortal } from 'react-dom';
21550
21550
  import type React from 'react';
21551
21551
  import { CommonComponentProps } from '../props';
@@ -24070,7 +24070,7 @@ export function Mercury({
24070
24070
  </>
24071
24071
  );
24072
24072
  }
24073
- `,Ew="01M3SBP3P8CMVMM1ZZ0QVD2PPF";function xi(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Jo={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}}},kw={type:"object",version:1,content:{type:"array",settings:{allowsCollection:!0,addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",contentKey:"title",placeholder:"Add Title...",display:{type:"text-input"}},description:{type:"string",label:"Description",contentKey:"subtitle",placeholder:"Add Description...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",contentKey:"gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video","vimeo","youtube"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:[{title:"AX-2 Space Suit",description:"Pressure garment and life support",gallery:[{media:[{assetId:"01M3QM74XFEM0SKERMGHMJ3Q2W",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XG5SKREDC1KS41Y9E7",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGZAMX3BJWP2GWPG2V",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGWVQPRZ334BZBJ0MN",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XG89JTWMZ3JE9DMV05",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGTT2Q8FRDTYX62W0H",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}]},{title:"Earth-orbital mission",description:"Hasselblad documentation series",gallery:[{media:[{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}]},{title:"Salton Sea from Above",description:"Aerial survey, California",gallery:[{media:[{assetId:"01M3QM74XERA3G7J0J00XVKEXX",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGK74ANMH9PH0YAYCY",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGSP2F13EM5TFRQZGJ",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGJPAGBPVYJSM3TV07",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XF9TBBQMH8393VK14S",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XG5BANHQ2F7FV8KXSG",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGTS00H47RCAKVNGE3",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}]}]},settings:{sizing:"auto auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},imgWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},titleWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},galleryPaddingRight:xi("Gallery Padding Right"),galleryPaddingLeft:xi("Gallery Padding Left"),galleryPaddingBetween:xi("Gallery Padding Between"),cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},position:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left-top","top-center","top-right","left-center","center","right-center","left-bottom","bottom-center","right-bottom"]}},titleTopPadding:xi("Title Top Padding"),titleBottomPadding:xi("Title Bottom Padding"),titleLeftPadding:xi("Title Left Padding"),titleRightPadding:xi("Title Right Padding"),titleDescriptionPadding:xi("Title Description Padding"),transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","retype","scroll"]}},titleColor:{type:"string",scope:"common",title:"Title",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Jo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleAlign:{...Jo.textAlign,scope:"layout",title:"Align"},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},descriptionColor:{type:"string",scope:"common",title:"Description",display:{type:"palette-color-picker"}},descriptionFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},descriptionFontSettings:{...Jo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},descriptionFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},descriptionLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},descriptionLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},descriptionWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},descriptionAlign:{...Jo.textAlign,scope:"layout",title:"Align"},descriptionTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},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"}},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"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...Jo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{type:"a",position:"left-center",transition:"scroll",titleColor:"#000000",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleAlign:"center",titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},descriptionColor:"#000000",descriptionFontFamily:"Goudy Bookletter 1911",descriptionFontSettings:{fontWeight:400,fontStyle:"normal"},descriptionLetterSpacing:0,descriptionWordSpacing:0,descriptionAlign:"center",descriptionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightbox:"on",closeIcon:Ew,closeIconColor:"#FFFFFF",closeIconHoverColor:"#999999",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",backgroundColor:"rgba(28,31,34,0.9)",lightboxCounterColor:"#DEDDDD",lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{defaultPaddingTop:30/1440,wrapperWidth:1,imgWidth:600/1440,titleWidth:400/1440,galleryPaddingRight:30/1440,galleryPaddingLeft:30/1440,galleryPaddingBetween:30/1440,titleTopPadding:0,titleBottomPadding:0,titleLeftPadding:0,titleRightPadding:0,titleDescriptionPadding:10/1440,cornerRadius:4/1440,position:"center",titleFontSize:73/1440,titleLineHeight:66/1440,descriptionFontSize:20/1440,descriptionLineHeight:24/1440,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01},m:{defaultPaddingTop:10/375,wrapperWidth:1,imgWidth:170/375,titleWidth:150/375,galleryPaddingRight:10/375,galleryPaddingLeft:10/375,galleryPaddingBetween:10/375,titleTopPadding:0,titleBottomPadding:0,titleLeftPadding:10/375,titleRightPadding:10/375,titleDescriptionPadding:8/375,cornerRadius:8/375,position:"left-center",titleFontSize:30/375,titleLineHeight:25/375,descriptionFontSize:14/375,descriptionLineHeight:18/375,lightboxCounterFontSize:14/375,lightboxCounterLineHeight:14/375,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405},t:{defaultPaddingTop:20/768,wrapperWidth:1,imgWidth:300/768,titleWidth:320/768,galleryPaddingRight:20/768,galleryPaddingLeft:20/768,galleryPaddingBetween:20/768,titleTopPadding:0,titleBottomPadding:0,titleLeftPadding:0,titleRightPadding:0,titleDescriptionPadding:8/768,cornerRadius:8/768,position:"center",titleFontSize:58/768,titleLineHeight:48/768,descriptionFontSize:16/768,descriptionLineHeight:20/768,lightboxCounterFontSize:8/768,lightboxCounterLineHeight:8/768,contentMarginTop:.026,closeIconMaxWidth:.03906,iconMarginRight:.026}},displayRules:[{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.closeIcon.display.visible",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.closeIconMaxWidth.display.visible",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.closeIconColor.display.visible",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.closeIconHoverColor.display.visible",value:!1}}],layout:["__componentName__","type","wrapperWidth","imgWidth","titleWidth","imageDisplay","cornerRadius","position","transition","lightbox","lightboxImageDisplay","contentMarginTop","closeIconMaxWidth","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",items:["wrapperWidth","imgWidth"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",title:"Title",items:["position","transition"]},"titleWidth",{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",items:["backgroundColor"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleAlign","titleTextAppearance"]},{type:"group",title:"Description",items:["descriptionFontFamily","descriptionFontSettings",{type:"row",items:["descriptionFontSize","descriptionLineHeight","descriptionLetterSpacing","descriptionWordSpacing"]},"descriptionAlign","descriptionTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:["titleColor","descriptionColor","backgroundColor","lightboxCounterColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},Aw={element:Pw,id:"mercury",name:"Mercury",category:"lists",layoutMode:"structured",version:1,defaultSize:{d:{width:720,height:540}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Mercury.mp4"},schema:kw,sourceCode:Rw,assetsPaths:{content:[{path:"gallery.media.assetId",placeholderEnabled:!0}],parameters:[{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"descriptionFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",descriptionFontSettings:"descriptionFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"}},Fw=10,Nw=400,_w=1,Hw=1120/1440,Ww=140/1440,Ow=550/1440,Dw=13,zw=4,Bw=38/100,jw=28/100,Pp=2.8,Vw=.9,Rp=.22,Gw=.5,Xw=1,Uw=1.5,qw=0,Kw=.85;function Yw(e){return`
24073
+ `,kw="01M3SBP3P8CMVMM1ZZ0QVD2PPF";function xi(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Jo={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}}},Aw={type:"object",version:1,content:{type:"array",settings:{allowsCollection:!0,addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",contentKey:"title",placeholder:"Add Title...",display:{type:"text-input"}},description:{type:"string",label:"Description",contentKey:"subtitle",placeholder:"Add Description...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",contentKey:"gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video","vimeo","youtube"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:[{title:"AX-2 Space Suit",description:"Pressure garment and life support",gallery:[{media:[{assetId:"01M3QM74XFEM0SKERMGHMJ3Q2W",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XG5SKREDC1KS41Y9E7",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGZAMX3BJWP2GWPG2V",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGWVQPRZ334BZBJ0MN",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XG89JTWMZ3JE9DMV05",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGTT2Q8FRDTYX62W0H",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}]},{title:"Earth-orbital mission",description:"Hasselblad documentation series",gallery:[{media:[{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}]},{title:"Salton Sea from Above",description:"Aerial survey, California",gallery:[{media:[{assetId:"01M3QM74XERA3G7J0J00XVKEXX",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGK74ANMH9PH0YAYCY",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGSP2F13EM5TFRQZGJ",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGJPAGBPVYJSM3TV07",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XF9TBBQMH8393VK14S",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XG5BANHQ2F7FV8KXSG",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGTS00H47RCAKVNGE3",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}]}]},settings:{sizing:"auto auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},imgWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},titleWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},galleryPaddingRight:xi("Gallery Padding Right"),galleryPaddingLeft:xi("Gallery Padding Left"),galleryPaddingBetween:xi("Gallery Padding Between"),cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},position:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left-top","top-center","top-right","left-center","center","right-center","left-bottom","bottom-center","right-bottom"]}},titleTopPadding:xi("Title Top Padding"),titleBottomPadding:xi("Title Bottom Padding"),titleLeftPadding:xi("Title Left Padding"),titleRightPadding:xi("Title Right Padding"),titleDescriptionPadding:xi("Title Description Padding"),transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","retype","scroll"]}},titleColor:{type:"string",scope:"common",title:"Title",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Jo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleAlign:{...Jo.textAlign,scope:"layout",title:"Align"},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},descriptionColor:{type:"string",scope:"common",title:"Description",display:{type:"palette-color-picker"}},descriptionFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},descriptionFontSettings:{...Jo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},descriptionFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},descriptionLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},descriptionLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},descriptionWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},descriptionAlign:{...Jo.textAlign,scope:"layout",title:"Align"},descriptionTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},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"}},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"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...Jo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{type:"a",position:"left-center",transition:"scroll",titleColor:"#000000",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleAlign:"center",titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},descriptionColor:"#000000",descriptionFontFamily:"Goudy Bookletter 1911",descriptionFontSettings:{fontWeight:400,fontStyle:"normal"},descriptionLetterSpacing:0,descriptionWordSpacing:0,descriptionAlign:"center",descriptionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightbox:"on",closeIcon:kw,closeIconColor:"#FFFFFF",closeIconHoverColor:"#999999",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",backgroundColor:"rgba(28,31,34,0.9)",lightboxCounterColor:"#DEDDDD",lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{defaultPaddingTop:30/1440,wrapperWidth:1,imgWidth:600/1440,titleWidth:400/1440,galleryPaddingRight:30/1440,galleryPaddingLeft:30/1440,galleryPaddingBetween:30/1440,titleTopPadding:0,titleBottomPadding:0,titleLeftPadding:0,titleRightPadding:0,titleDescriptionPadding:10/1440,cornerRadius:4/1440,position:"center",titleFontSize:73/1440,titleLineHeight:66/1440,descriptionFontSize:20/1440,descriptionLineHeight:24/1440,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01},m:{defaultPaddingTop:10/375,wrapperWidth:1,imgWidth:170/375,titleWidth:150/375,galleryPaddingRight:10/375,galleryPaddingLeft:10/375,galleryPaddingBetween:10/375,titleTopPadding:0,titleBottomPadding:0,titleLeftPadding:10/375,titleRightPadding:10/375,titleDescriptionPadding:8/375,cornerRadius:8/375,position:"left-center",titleFontSize:30/375,titleLineHeight:25/375,descriptionFontSize:14/375,descriptionLineHeight:18/375,lightboxCounterFontSize:14/375,lightboxCounterLineHeight:14/375,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405},t:{defaultPaddingTop:20/768,wrapperWidth:1,imgWidth:300/768,titleWidth:320/768,galleryPaddingRight:20/768,galleryPaddingLeft:20/768,galleryPaddingBetween:20/768,titleTopPadding:0,titleBottomPadding:0,titleLeftPadding:0,titleRightPadding:0,titleDescriptionPadding:8/768,cornerRadius:8/768,position:"center",titleFontSize:58/768,titleLineHeight:48/768,descriptionFontSize:16/768,descriptionLineHeight:20/768,lightboxCounterFontSize:8/768,lightboxCounterLineHeight:8/768,contentMarginTop:.026,closeIconMaxWidth:.03906,iconMarginRight:.026}},displayRules:[{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.closeIcon.display.visible",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.closeIconMaxWidth.display.visible",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.closeIconColor.display.visible",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.closeIconHoverColor.display.visible",value:!1}}],layout:["__componentName__","type","wrapperWidth","imgWidth","titleWidth","imageDisplay","cornerRadius","position","transition","lightbox","lightboxImageDisplay","contentMarginTop","closeIconMaxWidth","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",items:["wrapperWidth","imgWidth"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",title:"Title",items:["position","transition"]},"titleWidth",{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",items:["backgroundColor"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleAlign","titleTextAppearance"]},{type:"group",title:"Description",items:["descriptionFontFamily","descriptionFontSettings",{type:"row",items:["descriptionFontSize","descriptionLineHeight","descriptionLetterSpacing","descriptionWordSpacing"]},"descriptionAlign","descriptionTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:["titleColor","descriptionColor","backgroundColor","lightboxCounterColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},Fw={element:Ew,id:"mercury",name:"Mercury",category:"lists",layoutMode:"structured",version:1,defaultSize:{d:{width:720,height:540}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Mercury.mp4"},schema:Aw,sourceCode:Rw,assetsPaths:{content:[{path:"gallery.media.assetId",placeholderEnabled:!0}],parameters:[{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"descriptionFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",descriptionFontSettings:"descriptionFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"}},Nw=10,_w=400,Hw=1,Ww=1120/1440,Ow=140/1440,Dw=550/1440,zw=13,Bw=4,jw=38/100,Vw=28/100,Ep=2.8,Gw=.9,Rp=.22,Xw=.5,Uw=1,qw=1.5,Kw=0,Yw=.85;function Qw(e){return`
24074
24074
  .${e}-wrapper {
24075
24075
  position: relative;
24076
24076
  box-sizing: border-box;
@@ -24112,7 +24112,7 @@ export function Mercury({
24112
24112
  object-fit: cover;
24113
24113
  object-position: center;
24114
24114
  }
24115
- `}function Ep(e){return Number(e.toFixed(4))}function wd(e,t,n,i){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,Math.round(r))):t}function Is(e,t,n=0,i=9999){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,r)):t}function Qw(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 Zw(e){const[t,n]=e.ratioValue.split(":").map(Number),i=e.reversed?n:t;return(e.reversed?t:n)/i}function Jw(e){return b.isEmbedMedia(e)?!1:e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.name??"")||/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.assetId??"")}function kp(e,t){return(1-e)/(1-e*Math.cos(t))}function e$(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)*kp(e,i)))}return t||1}function t$(e,t){return e?1:1+Rp*(.35+t)}function n$(e,t,n,i){const o=t*t$(n,i);return Math.max(0,(e-o)/2)}function i$(e,t,n){const i=kp(e,n);return{offset:Math.sin(n)*i/t,scale:i}}function o$(e,t,n){return e/2+t*n}function r$(e,t,n){return`translate(calc(${e(t)} - var(--helix-base-w) / 2), -50%) scale(${Ep(n)})`}function a$(e){return Math.round(e*1e3)}function Ap(e,t,n){const i=Math.cos(e),o=Math.cos(Kw*Math.PI/2);if(i>=o)return n;const r=(i+1)/(o+1);return Ep(t+(n-t)*r)}function s$(e){return Ap(e,Gw,Xw)}function l$(e){return Ap(e,Uw,qw)}function c$(e,t){if(!t)return"none";const n=l$(e);return n<=0?"none":`blur(${n}px)`}function $d(e,t){const n=t*Math.PI*2,{offset:i,scale:o}=i$(e.depthFactor,e.spreadFactor,n),r=o$(e.width,e.orbitRadius,i);return{transform:r$(e.scaled,r,o),zIndex:a$(o),opacity:s$(n),filter:c$(n,e.blurEnabled)}}function Fp(e,t){return(e%t+t)%t}function d$(e,t){return Xl(e,t)/t}function Xl(e,t){return Fp(e,t)}function u$(e,t){return Math.floor(e/t)}function p$(e,t,n,i){return u$(e,t)*n+Xl(e,t)*i}function Cd(e){const t=Math.sin(e*12.9898)*43758.5453;return t-Math.floor(t)}function ha(e){const t=e%1;return t<0?t+1:t}function m$(e,t,n){const i=t/Pp,o=n==="left"?-e*i:e*i;return ha(o)}function g$({settings:e,content:t,isEditor:n,isPreviewMode:i}){const{prefix:o}=b.useScopedStyles(),r=s.useRef(null),l=Is((e==null?void 0:e.width)??(e==null?void 0:e.spread)??(e==null?void 0:e.wrapperWidth),Hw),c=Is(e==null?void 0:e.imageWidth,Ww),d=Is(e==null?void 0:e.turnHeight,Ow),u=wd(e==null?void 0:e.itemsPerTurn,Dw,3,40),p=wd(e==null?void 0:e.turns,zw,1,30),y=Math.min(Vw,Math.max(0,Bw)),x=Math.min(1,Math.max(0,jw)),m=Math.max(0,(e==null?void 0:e.speed)??Pp),f=(e==null?void 0:e.direction)==="left"?"left":"right",S=(e==null?void 0:e.playback)==="scroll"?"scroll":"autoplay",w=(e==null?void 0:e.cornerRadius)??0,N=(e==null?void 0:e.blur)!=="off",v=s.useMemo(()=>Qw(e==null?void 0:e.imageDisplay),[e==null?void 0:e.imageDisplay]),M=v.display==="cover",R=L=>b.scalingValue(L,n??!1),U=s.useMemo(()=>e$(y),[y]),X=s.useMemo(()=>n$(l,c,M,x),[l,c,M,x]),D=s.useMemo(()=>Yw(o),[o]),_=s.useMemo(()=>({scaled:L=>b.scalingValue(L,n??!1),width:l,orbitRadius:X,depthFactor:y,spreadFactor:U,blurEnabled:N}),[n,l,X,y,U,N]),W=s.useRef([]),T=s.useRef(0),C=s.useMemo(()=>(t??[]).filter(L=>{var me;return!!((me=L.image)!=null&&me.assetId)}),[t]),q=d/u,E=c*Zw(v),$=Math.min(Nw,p*u),I=_w*u,j=$+I*2,K=Math.max(0,p-1)*d+(u-1)*q,P=m>0,h=S==="scroll"&&P,J=S==="autoplay"&&P&&(n?!!i:!0),V=J?360/(m*Fw):0,he=C.length===0?0:j,k=s.useMemo(()=>Array.from({length:he},(L,me)=>d$(me-I,u)),[he,I,u]);s.useEffect(()=>{if(!J&&!h)return;const L=r.current;if(!L)return;const me=oe=>{T.current=oe,k.forEach((ge,Se)=>{const Ee=W.current[Se];if(!Ee)return;const Ne=$d(_,ha(ge+oe));Ee.style.transform=Ne.transform,Ee.style.zIndex=String(Ne.zIndex),Ee.style.opacity=String(Ne.opacity),Ee.style.filter=Ne.filter})};if(h){const oe=L.ownerDocument.defaultView??window,ge=()=>{const Ee=L.getBoundingClientRect(),Ne=oe.innerHeight||L.ownerDocument.documentElement.clientHeight,Te=Ne+Ee.height;if(Te<=0)return;const Ce=Math.min(1,Math.max(0,(Ne-Ee.top)/Te));me(m$(Ce,m,f))};ge(),oe.addEventListener("scroll",ge,{passive:!0,capture:!0}),oe.addEventListener("resize",ge);const Se=new ResizeObserver(ge);return Se.observe(L),()=>{oe.removeEventListener("scroll",ge,{capture:!0}),oe.removeEventListener("resize",ge),Se.disconnect()}}const te=f==="left"?-1:1;let ve=null,Le=null;const de=oe=>{if(Le!==null){const ge=(oe-Le)/1e3/V*te;T.current=ha(T.current+ge)}Le=oe,me(T.current),ve=requestAnimationFrame(de)},ue=()=>{ve===null&&(Le=null,ve=requestAnimationFrame(de))},Z=()=>{ve!==null&&cancelAnimationFrame(ve),ve=null},le=new IntersectionObserver(([oe])=>{oe!=null&&oe.isIntersecting?ue():Z()});return le.observe(L),()=>{Z(),le.disconnect()}},[J,h,k,_,V,m,f]);const ce=J||h?T.current:0;return C.length===0?a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:D}}),a.jsx("div",{className:`${o}-wrapper`,style:{width:R(l)}})]}):a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:D}}),a.jsx("div",{ref:r,className:`${o}-wrapper`,style:{width:R(l),height:R(K)},children:Array.from({length:j},(L,me)=>{const te=me-I,Le=C[Fp(te,C.length)].image,de=Xl(te,u),ue=k[me],Z=p$(te,u,d,q),le=x===0?0:(Cd(de+7.3)-.5)*x*q,oe=M?1:1+(Cd(de+3.1)-.5)*2*Rp*(.35+x),ge=c*oe,Se={"--helix-base-w":R(ge),...M?{"--helix-base-h":R(E)}:{}},Ee={top:R(Z+le),...Se,...$d(_,ha(ue+ce))},Ne=w>0?{borderRadius:R(w)}:{},Te=M?{...Ne,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"}:Ne,Ce=b.isEmbedMedia(Le)?a.jsx(b.EmbedMediaFrame,{className:`${o}-media`,style:M?{...Te,position:"absolute",inset:0}:Te,media:Le,mode:"background",fit:M?"cover":"contain"}):Jw(Le)?a.jsx("video",{className:`${o}-media`,style:Te,src:Le.assetId,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:`${o}-media`,style:Te,src:Le.assetId,alt:Le.name??"",loading:"lazy",decoding:"async"});return a.jsx("div",{ref:g=>{W.current[me]=g},className:M?`${o}-item ${o}-item-cover`:`${o}-item`,style:Ee,children:M?a.jsx("div",{className:`${o}-cover`,style:Ne,children:Ce}):Ce},`${p}-${u}-${te}`)})})]})}const h$=`import { useEffect, useMemo, useRef, type CSSProperties } from 'react';
24115
+ `}function kp(e){return Number(e.toFixed(4))}function $d(e,t,n,i){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,Math.round(r))):t}function Ls(e,t,n=0,i=9999){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,r)):t}function Zw(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 Jw(e){const[t,n]=e.ratioValue.split(":").map(Number),i=e.reversed?n:t;return(e.reversed?t:n)/i}function e$(e){return b.isEmbedMedia(e)?!1:e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.name??"")||/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.assetId??"")}function Ap(e,t){return(1-e)/(1-e*Math.cos(t))}function t$(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)*Ap(e,i)))}return t||1}function n$(e,t){return e?1:1+Rp*(.35+t)}function i$(e,t,n,i){const o=t*n$(n,i);return Math.max(0,(e-o)/2)}function o$(e,t,n){const i=Ap(e,n);return{offset:Math.sin(n)*i/t,scale:i}}function r$(e,t,n){return e/2+t*n}function a$(e,t,n){return`translate(calc(${e(t)} - var(--helix-base-w) / 2), -50%) scale(${kp(n)})`}function s$(e){return Math.round(e*1e3)}function Fp(e,t,n){const i=Math.cos(e),o=Math.cos(Yw*Math.PI/2);if(i>=o)return n;const r=(i+1)/(o+1);return kp(t+(n-t)*r)}function l$(e){return Fp(e,Xw,Uw)}function c$(e){return Fp(e,qw,Kw)}function d$(e,t){if(!t)return"none";const n=c$(e);return n<=0?"none":`blur(${n}px)`}function Cd(e,t){const n=t*Math.PI*2,{offset:i,scale:o}=o$(e.depthFactor,e.spreadFactor,n),r=r$(e.width,e.orbitRadius,i);return{transform:a$(e.scaled,r,o),zIndex:s$(o),opacity:l$(n),filter:d$(n,e.blurEnabled)}}function Np(e,t){return(e%t+t)%t}function u$(e,t){return Ul(e,t)/t}function Ul(e,t){return Np(e,t)}function p$(e,t){return Math.floor(e/t)}function m$(e,t,n,i){return p$(e,t)*n+Ul(e,t)*i}function Td(e){const t=Math.sin(e*12.9898)*43758.5453;return t-Math.floor(t)}function fa(e){const t=e%1;return t<0?t+1:t}function g$(e,t,n){const i=t/Ep,o=n==="left"?-e*i:e*i;return fa(o)}function h$({settings:e,content:t,isEditor:n,isPreviewMode:i}){const{prefix:o}=b.useScopedStyles(),r=s.useRef(null),l=Ls((e==null?void 0:e.width)??(e==null?void 0:e.spread)??(e==null?void 0:e.wrapperWidth),Ww),c=Ls(e==null?void 0:e.imageWidth,Ow),d=Ls(e==null?void 0:e.turnHeight,Dw),u=$d(e==null?void 0:e.itemsPerTurn,zw,3,40),p=$d(e==null?void 0:e.turns,Bw,1,30),y=Math.min(Gw,Math.max(0,jw)),x=Math.min(1,Math.max(0,Vw)),m=Math.max(0,(e==null?void 0:e.speed)??Ep),f=(e==null?void 0:e.direction)==="left"?"left":"right",S=(e==null?void 0:e.playback)==="scroll"?"scroll":"autoplay",w=(e==null?void 0:e.cornerRadius)??0,N=(e==null?void 0:e.blur)!=="off",v=s.useMemo(()=>Zw(e==null?void 0:e.imageDisplay),[e==null?void 0:e.imageDisplay]),M=v.display==="cover",E=L=>b.scalingValue(L,n??!1),U=s.useMemo(()=>t$(y),[y]),X=s.useMemo(()=>i$(l,c,M,x),[l,c,M,x]),D=s.useMemo(()=>Qw(o),[o]),_=s.useMemo(()=>({scaled:L=>b.scalingValue(L,n??!1),width:l,orbitRadius:X,depthFactor:y,spreadFactor:U,blurEnabled:N}),[n,l,X,y,U,N]),W=s.useRef([]),T=s.useRef(0),C=s.useMemo(()=>(t??[]).filter(L=>{var me;return!!((me=L.image)!=null&&me.assetId)}),[t]),q=d/u,R=c*Jw(v),$=Math.min(_w,p*u),I=Hw*u,j=$+I*2,K=Math.max(0,p-1)*d+(u-1)*q,P=m>0,h=S==="scroll"&&P,J=S==="autoplay"&&P&&(n?!!i:!0),V=J?360/(m*Nw):0,he=C.length===0?0:j,k=s.useMemo(()=>Array.from({length:he},(L,me)=>u$(me-I,u)),[he,I,u]);s.useEffect(()=>{if(!J&&!h)return;const L=r.current;if(!L)return;const me=oe=>{T.current=oe,k.forEach((ge,Se)=>{const Re=W.current[Se];if(!Re)return;const Ne=Cd(_,fa(ge+oe));Re.style.transform=Ne.transform,Re.style.zIndex=String(Ne.zIndex),Re.style.opacity=String(Ne.opacity),Re.style.filter=Ne.filter})};if(h){const oe=L.ownerDocument.defaultView??window,ge=()=>{const Re=L.getBoundingClientRect(),Ne=oe.innerHeight||L.ownerDocument.documentElement.clientHeight,Te=Ne+Re.height;if(Te<=0)return;const Ce=Math.min(1,Math.max(0,(Ne-Re.top)/Te));me(g$(Ce,m,f))};ge(),oe.addEventListener("scroll",ge,{passive:!0,capture:!0}),oe.addEventListener("resize",ge);const Se=new ResizeObserver(ge);return Se.observe(L),()=>{oe.removeEventListener("scroll",ge,{capture:!0}),oe.removeEventListener("resize",ge),Se.disconnect()}}const te=f==="left"?-1:1;let ve=null,Le=null;const de=oe=>{if(Le!==null){const ge=(oe-Le)/1e3/V*te;T.current=fa(T.current+ge)}Le=oe,me(T.current),ve=requestAnimationFrame(de)},ue=()=>{ve===null&&(Le=null,ve=requestAnimationFrame(de))},Z=()=>{ve!==null&&cancelAnimationFrame(ve),ve=null},le=new IntersectionObserver(([oe])=>{oe!=null&&oe.isIntersecting?ue():Z()});return le.observe(L),()=>{Z(),le.disconnect()}},[J,h,k,_,V,m,f]);const ce=J||h?T.current:0;return C.length===0?a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:D}}),a.jsx("div",{className:`${o}-wrapper`,style:{width:E(l)}})]}):a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:D}}),a.jsx("div",{ref:r,className:`${o}-wrapper`,style:{width:E(l),height:E(K)},children:Array.from({length:j},(L,me)=>{const te=me-I,Le=C[Np(te,C.length)].image,de=Ul(te,u),ue=k[me],Z=m$(te,u,d,q),le=x===0?0:(Td(de+7.3)-.5)*x*q,oe=M?1:1+(Td(de+3.1)-.5)*2*Rp*(.35+x),ge=c*oe,Se={"--helix-base-w":E(ge),...M?{"--helix-base-h":E(R)}:{}},Re={top:E(Z+le),...Se,...Cd(_,fa(ue+ce))},Ne=w>0?{borderRadius:E(w)}:{},Te=M?{...Ne,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"}:Ne,Ce=b.isEmbedMedia(Le)?a.jsx(b.EmbedMediaFrame,{className:`${o}-media`,style:M?{...Te,position:"absolute",inset:0}:Te,media:Le,mode:"background",fit:M?"cover":"contain"}):e$(Le)?a.jsx("video",{className:`${o}-media`,style:Te,src:Le.assetId,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:`${o}-media`,style:Te,src:Le.assetId,alt:Le.name??"",loading:"lazy",decoding:"async"});return a.jsx("div",{ref:g=>{W.current[me]=g},className:M?`${o}-item ${o}-item-cover`:`${o}-item`,style:Re,children:M?a.jsx("div",{className:`${o}-cover`,style:Ne,children:Ce}):Ce},`${p}-${u}-${te}`)})})]})}const f$=`import { useEffect, useMemo, useRef, type CSSProperties } from 'react';
24116
24116
  import { CommonComponentProps } from '../props';
24117
24117
  import { scalingValue } from '../utils/scalingValue';
24118
24118
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -24686,7 +24686,7 @@ export function Helix({
24686
24686
  </>
24687
24687
  );
24688
24688
  }
24689
- `,f$=["01M3QM74XEA13H9Z3AZF1NGY48","01M3QM74XEZJJC5STVP0WF2GN3","01M3QM74XE170PHTE4A34MKNP3","01M3QM74XEZD3SDVVQZ1TF9JPA","01M3QM74XEPJWV4ZR7R3JPS67H"],y$={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video","vimeo","youtube"]}}}}},default:f$.map(e=>({image:{assetId:e,name:""}}))},settings:{sizing:"auto auto",properties:{width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},turnHeight:{type:"number",scope:"layout",title:"Turn height",display:{type:"numeric-input"},min:0,max:9999},itemsPerTurn:{type:"number",scope:"common",title:"Per turn",display:{type:"common-numeric-input"},min:3,max:40},turns:{type:"number",scope:"common",title:"Turns",display:{type:"common-numeric-input"},min:1,max:30},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},playback:{type:"string",scope:"common",title:"Playback",display:{type:"toggle-cycle",enum:["autoplay","scroll"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},blur:{type:"string",scope:"common",title:"Blur",display:{type:"toggle-cycle",enum:["on","off"]}}},defaults:{itemsPerTurn:14,turns:3,direction:"right",playback:"autoplay",blur:"off",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1}},layoutDefaults:{d:{defaultPaddingTop:30/1440,width:800/1440,imageWidth:160/1440,turnHeight:380/1440,speed:2.2,cornerRadius:0},m:{defaultPaddingTop:10/375,width:320/375,imageWidth:75/375,turnHeight:310/375,speed:2.8,cornerRadius:0},t:{defaultPaddingTop:20/768,width:620/768,imageWidth:100/768,turnHeight:280/768,speed:2.8,cornerRadius:0}},layout:["__componentName__","width","imageWidth","turnHeight","itemsPerTurn","turns","playback","speed","direction","imageDisplay","cornerRadius","blur"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",items:["direction","speed"]},{type:"row",items:["width"]},{type:"row",items:["imageWidth","turnHeight"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",items:["itemsPerTurn","turns"]},{type:"row",items:["playback","blur"]}]}]},v$={element:g$,id:"helix",name:"Helix",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Helix.mp4"},version:1,defaultSize:{d:{width:720,height:540}},schema:y$,sourceCode:h$,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},In=300,rn=300,x$=8/1440,ho=.004,b$=50,S$=1440,Xi=b$/S$;function w$(e){if(e==="default"||e==="compact"||e==="open")return e;if(e==="onScroll")return"compact"}function $$(e){return e==="center"||e==="right"?e:"left"}function C$(e){return e==="left"||e==="right"?e:"center"}function T$(e,t,n){const i=b.scalingValue(t,n);return e==="center"?`translateX(calc(-50% + ${i}))`:`translateX(${i})`}function I$(e,t){if(e&&typeof e=="object"){if(t&&typeof e[t]=="string")return e[t];for(const n in e)if(typeof e[n]=="string")return e[n];return}return e}function Np(e,t){const n=(I$(e,t)??"always").trim().toLowerCase().replace(/[_-]+/g," ");return n==="open only"||n==="openonly"?"open only":n==="open and compact"||n==="openandcompact"?"open and compact":n==="default and open"||n==="defaultandopen"?"default and open":n==="default and compact"||n==="defaultandcompact"?"default and compact":"always"}function L$(e,t,n){switch(Np(e.showIn,n)){case"open only":return!1;case"open and compact":return t==="compact";case"default and compact":return!0;case"default and open":return t==="default";default:return!0}}function M$(e,t){switch(Np(e.showIn,t)){case"default and compact":return!1;default:return!0}}function P$(e){return(e==null?void 0:e.find(t=>t.slug===""))??(e==null?void 0:e[0])}function R$(e,t){const n=e?t==null?void 0:t.find(i=>i.id===e):P$(t);return!e&&!n?"":n?n.slug===""?"/":`/${n.slug}`:e.startsWith("/")||e.startsWith("#")||/^[a-z][a-z\d+\-.]*:/i.test(e)?e:t?`/${e}`:e}function Td(e){const t=(e??"").toLowerCase();return t==="blank"||t==="_blank"||t.includes("new")}function _p(e){const t=e.link;if(t&&typeof t=="object"){const i=Td(t.target)?"_blank":void 0;if(t.type==="url")return{type:"url",value:t.value??t.url??"",target:i};if(t.type==="anchor")return{type:"anchor",value:t.value??"",target:i};if(t.type==="page")return{type:"page",value:t.value??"",target:i,anchor:t.anchor};if(typeof t.url=="string")return{type:"url",value:t.url,target:i}}const n=Td(e.openIn)?"_blank":void 0;return e.mode==="url"?{type:"url",value:e.url??"",target:n}:{type:"page",value:e.page??"",target:n,anchor:e.anchor}}function Ys(e,t){const n=e.label||"Link",i=_p(e);if(i.type==="url")return{label:n,href:i.value,target:i.target};if(i.type==="anchor"){const c=i.value.replace(/^#/,"");return{label:n,href:c?`#${c}`:"",target:i.target}}const o=R$(i.value,t),r=(i.anchor??"").replace(/^#/,""),l=r?o?`${o}#${r}`:`#${r}`:o;return{label:n,href:l,target:i.target}}const $i=24,wi=$i*.125,Hp=$i*.125,Ls=($i-(3*wi+2*Hp))/2,Id=wi+Hp;function E$({className:e,lineClassName:t}){return a.jsxs("svg",{className:e,viewBox:`0 0 ${$i} ${$i}`,"aria-hidden":"true",children:[a.jsx("rect",{className:`${t} ${t}-top`,x:"0",y:Ls,width:$i,height:wi,rx:wi/2}),a.jsx("rect",{className:`${t} ${t}-mid`,x:"0",y:Ls+Id,width:$i,height:wi,rx:wi/2}),a.jsx("rect",{className:`${t} ${t}-bot`,x:"0",y:Ls+2*Id,width:$i,height:wi,rx:wi/2})]})}function k$(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function A$(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:b.scalingValue((o-t)/2,i)}}const Wp=.004;let er;function F$(){return er!==void 0?er:typeof document>"u"?(er=null,null):(er=document.createElement("canvas").getContext("2d"),er)}function N$(e){const t=getComputedStyle(e),n=parseFloat(t.fontSize)||0;if(n<=0)return 0;const i=F$();if(!i)return 0;i.font=`${t.fontStyle} ${t.fontWeight} ${n}px ${t.fontFamily}`;const o=i.measureText("H"),r=o.actualBoundingBoxAscent>0?o.actualBoundingBoxAscent:0,l=Math.max(0,o.actualBoundingBoxDescent||0),c=o.fontBoundingBoxAscent||0,d=o.fontBoundingBoxDescent||0;return r<=0||c<=0&&d<=0?0:(d-l-(c-r))/2/n}function Ld(e,t){const[n,i]=s.useState(0);return s.useLayoutEffect(()=>{const o=e.current;if(!o)return;const r=()=>{const d=N$(o);i(u=>Math.abs(u-d)<Wp?u:d)};r();const l=document.fonts;l.ready.then(r).catch(()=>{}),l.addEventListener("loadingdone",r);const c=new ResizeObserver(r);return c.observe(o),()=>{l.removeEventListener("loadingdone",r),c.disconnect()}},[e,t]),n}function Md(e){if(!(Math.abs(e)<Wp))return`translateY(${e}em)`}function Pd(e){var t,n;return[e.fontFamily??"",((t=e.fontSettings)==null?void 0:t.fontWeight)??400,((n=e.fontSettings)==null?void 0:n.fontStyle)??"normal",e.fontSize??"",e.lineHeight??""].join("\0")}function Rd(e){return{fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontSize:e.fontSize,lineHeight:e.lineHeight,position:"absolute",top:0,left:0,visibility:"hidden",pointerEvents:"none",whiteSpace:"nowrap"}}function Ed(e,t={}){return{fontFamily:e.fontFamily??t.fontFamily,fontSettings:e.fontSettings??t.fontSettings,fontSize:e.fontSize??t.fontSize,lineHeight:e.lineHeight??t.lineHeight,letterSpacing:e.letterSpacing??t.letterSpacing??0,wordSpacing:e.wordSpacing??t.wordSpacing??0,textAlign:e.textAlign??t.textAlign??"left",textAppearance:e.textAppearance??t.textAppearance}}function kd(e,t,n){var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??.01,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing??0,wordSpacing:t.wordSpacing??0,textAlign:t.textAlign,textAppearance:t.textAppearance,color:""};return{css:{...pn(nn(i,n)),...A$(t.fontSize,t.lineHeight,e,n)},className:k$(t.fontSize,t.lineHeight,`${e}-link-text`,`${e}-text-tight-leading`)}}function Ad(e){const t=e.split(/\r?\n/);return t.length===1?e:t.map((n,i)=>a.jsxs(s.Fragment,{children:[n,i<t.length-1?a.jsx("br",{}):null]},i))}function Fd(e,t,n,i){const o=Math.max(0,n-i),r=e+t;if(r<=o||r<=0)return{start:e,end:t};const l=o/r;return{start:e*l,end:t*l}}function Op(e){const n=Math.max(Xi,e.fontSize??Xi),{start:i,end:o}=Fd(e.textPaddingTop,e.textPaddingBottom,1,n),{start:r,end:l}=Fd(e.textPaddingLeft,e.textPaddingRight,1,Xi);return{effectivePaddingLeft:r,effectivePaddingRight:l,effectivePaddingTop:i,effectivePaddingBottom:o,panelSize:1}}function _$(e){if(e==="center"||e==="center-center")return{horizontalAlign:"center",verticalAlign:"center"};const[t,n]=e.split("-");return{horizontalAlign:t,verticalAlign:n}}function H$(e){return e.position?_$(e.position):{horizontalAlign:e.horizontalAlign??"left",verticalAlign:e.verticalAlign??"top"}}function W$(e,t){return e.textPaddingLeft!==t.textPaddingLeft||e.textPaddingRight!==t.textPaddingRight||e.textPaddingTop!==t.textPaddingTop||e.textPaddingBottom!==t.textPaddingBottom}const O$=[["onScrollIconColor","compactIconColor"],["onScrollLinkColor","compactLinkColor"],["onScrollLogoColor","compactLogoColor"],["onScrollBackgroundColor","compactBackgroundColor"],["onScrollPanelColor","compactBackgroundColor"],["onScrollLogoMaxWidth","compactLogoMaxWidth"],["onScrollLogoMaxHeight","compactLogoMaxHeight"],["onScrollLogoPosition","compactLogoPosition"],["onScrollPanelHeight","compactPanelHeight"],["onScrollIconSize","compactIconSize"],["onScrollNavTextWidth","compactNavTextWidth"],["onScrollNavGap","compactNavGap"],["onScrollNavPaddingLeft","compactNavPaddingLeft"],["onScrollNavPaddingRight","compactNavPaddingRight"],["onScrollFontFamily","compactFontFamily"],["onScrollFontSettings","compactFontSettings"],["onScrollFontSize","compactFontSize"],["onScrollLineHeight","compactLineHeight"],["onScrollLetterSpacing","compactLetterSpacing"],["onScrollWordSpacing","compactWordSpacing"],["onScrollTextAlign","compactTextAlign"],["onScrollTextAppearance","compactTextAppearance"]];function Dp(e){var o,r;const t=e,n={};for(const[l,c]of O$)e[c]!==void 0||t[l]===void 0||(n[c]=t[l]);const i=t.stateOverrides;return i&&(i.onScroll!==void 0||i["onScroll-hover"]!==void 0)&&(n.stateOverrides={...e.stateOverrides},i.onScroll!==void 0&&((o=e.stateOverrides)==null?void 0:o.compact)===void 0&&(n.stateOverrides.compact=i.onScroll),i["onScroll-hover"]!==void 0&&((r=e.stateOverrides)==null?void 0:r["compact-hover"])===void 0&&(n.stateOverrides["compact-hover"]=i["onScroll-hover"])),Object.keys(n).length===0?e:{...e,...n}}function Nd(e){var o,r,l,c,d,u,p,y,x,m,f,S,w,N,v,M;e=Dp(e);const t=e,n={};if(e.backgroundColor===void 0&&t.panelColor!==void 0&&(n.backgroundColor=t.panelColor),e.openFontFamily===void 0&&e.fontFamily!==void 0&&(n.openFontFamily=e.fontFamily),e.openFontSettings===void 0&&e.fontSettings!==void 0&&(n.openFontSettings=e.fontSettings),e.openFontSize===void 0&&e.fontSize!==void 0&&(n.openFontSize=e.fontSize),e.openLineHeight===void 0&&e.lineHeight!==void 0&&(n.openLineHeight=e.lineHeight),e.openLetterSpacing===void 0&&e.letterSpacing!==void 0&&(n.openLetterSpacing=e.letterSpacing),e.openWordSpacing===void 0&&e.wordSpacing!==void 0&&(n.openWordSpacing=e.wordSpacing),e.openTextAlign===void 0&&e.textAlign!==void 0&&(n.openTextAlign=e.textAlign),e.openTextAppearance===void 0&&e.textAppearance!==void 0&&(n.openTextAppearance=e.textAppearance),e.openLinkColor===void 0){const R=((r=(o=e.stateOverrides)==null?void 0:o.open)==null?void 0:r.openLinkColor)??((c=(l=e.stateOverrides)==null?void 0:l.open)==null?void 0:c.linkColor)??e.linkColor;R!==void 0&&(n.openLinkColor=R)}if(e.compactIconColor===void 0){const R=((u=(d=e.stateOverrides)==null?void 0:d.compact)==null?void 0:u.iconColor)??e.iconColor;R!==void 0&&(n.compactIconColor=R)}if(e.compactLinkColor===void 0){const R=((y=(p=e.stateOverrides)==null?void 0:p.compact)==null?void 0:y.linkColor)??e.linkColor;R!==void 0&&(n.compactLinkColor=R)}if(e.compactLogoColor===void 0){const R=((m=(x=e.stateOverrides)==null?void 0:x.compact)==null?void 0:m.logoColor)??e.logoColor;R!==void 0&&(n.compactLogoColor=R)}if(e.openLogoColor===void 0){const R=((S=(f=e.stateOverrides)==null?void 0:f.open)==null?void 0:S.logoColor)??e.logoColor;R!==void 0&&(n.openLogoColor=R)}if(e.compactBackgroundColor===void 0){const R=((N=(w=e.stateOverrides)==null?void 0:w.compact)==null?void 0:N.backgroundColor)??((M=(v=t.stateOverrides)==null?void 0:v.compact)==null?void 0:M.panelColor)??t.compactPanelColor??t.onScrollPanelColor??e.backgroundColor??n.backgroundColor;R!==void 0&&(n.compactBackgroundColor=R)}e.logoMaxHeight===void 0&&e.logoMaxWidth!==void 0&&(n.logoMaxHeight=e.logoMaxWidth),e.compactLogoMaxHeight===void 0&&e.compactLogoMaxWidth!==void 0&&(n.compactLogoMaxHeight=e.compactLogoMaxWidth);const i=(R,U)=>{if(e[R]!==void 0)return;const X=e[U];X!==void 0&&(n[R]=X)};return i("compactLogoMaxHeight","logoMaxHeight"),i("compactLogoPosition","logoPosition"),i("compactPanelHeight","panelHeight"),i("compactShowIcon","showIcon"),i("compactIconSize","iconSize"),i("compactNavTextWidth","navTextWidth"),i("compactNavTextPosition","navTextPosition"),i("compactNavTextOffset","navTextOffset"),i("compactNavGap","navGap"),i("compactNavPaddingLeft","navPaddingLeft"),i("compactNavPaddingRight","navPaddingRight"),i("compactFontFamily","fontFamily"),i("compactFontSettings","fontSettings"),i("compactFontSize","fontSize"),i("compactLineHeight","lineHeight"),i("compactLetterSpacing","letterSpacing"),i("compactWordSpacing","wordSpacing"),i("compactTextAlign","textAlign"),i("compactTextAppearance","textAppearance"),Object.keys(n).length===0?e:{...e,...n}}function D$(e,t){const n=Op({textPaddingLeft:e.textPaddingLeft??0,textPaddingRight:e.textPaddingRight??0,textPaddingTop:e.textPaddingTop??0,textPaddingBottom:e.textPaddingBottom??0,fontSize:e.openFontSize??e.fontSize??t.openFontSize??t.fontSize}),i={};return(e.textPaddingLeft??0)!==n.effectivePaddingLeft&&(i.textPaddingLeft=n.effectivePaddingLeft),(e.textPaddingRight??0)!==n.effectivePaddingRight&&(i.textPaddingRight=n.effectivePaddingRight),(e.textPaddingTop??0)!==n.effectivePaddingTop&&(i.textPaddingTop=n.effectivePaddingTop),(e.textPaddingBottom??0)!==n.effectivePaddingBottom&&(i.textPaddingBottom=n.effectivePaddingBottom),Object.keys(i).length===0?e:{...e,...i}}function z$(e,t){return{paddingLeft:b.scalingValue(e.effectivePaddingLeft,t),paddingRight:b.scalingValue(e.effectivePaddingRight,t),paddingTop:b.scalingValue(e.effectivePaddingTop,t),paddingBottom:b.scalingValue(e.effectivePaddingBottom,t)}}function B$(e,t,n,i){const o=Math.max(Xi,n??Xi),r=Math.max(t.effectivePaddingTop,ho),l=Math.max(t.effectivePaddingBottom,ho),c=Math.max(0,t.panelSize-t.effectivePaddingBottom-o),d=Math.max(0,t.panelSize-t.effectivePaddingTop-o),u=Math.max(t.effectivePaddingLeft,ho),p=Math.max(t.effectivePaddingRight,ho),y=Math.max(0,t.panelSize-t.effectivePaddingRight-Xi),x=Math.max(0,t.panelSize-t.effectivePaddingLeft-Xi);return a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"textPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-max-fraction":String(c),className:`${e}-control-anchor`,style:{top:0,left:0,width:"100%",height:i(r)}}),a.jsx("div",{"data-controls":"textPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(d),className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:i(l)}}),a.jsx("div",{"data-controls":"textPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(y),className:`${e}-control-anchor`,style:{top:0,left:0,width:i(u),height:"100%"}}),a.jsx("div",{"data-controls":"textPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(x),className:`${e}-control-anchor`,style:{top:0,right:0,width:i(p),height:"100%"}})]})}const j$={iconColor:"icon-color",closeButtonColor:"close-button-color",linkColor:"link-color",openLinkColor:"menu-link-color",compactIconColor:"compact-icon-color",compactLinkColor:"compact-link-color",compactLogoColor:"compact-logo-color",compactBackgroundColor:"compact-background-color",openLogoColor:"open-logo-color",menuBackgroundColor:"menu-background-color",overlayColor:"overlay-color",backgroundColor:"background-color",logoColor:"logo-color"},V$=["hover","open"],G$={top:"flex-start",center:"center",bottom:"flex-end"},X$={left:"flex-start",center:"center",right:"flex-end"};function U$(e){return`
24689
+ `,y$=["01M3QM74XEA13H9Z3AZF1NGY48","01M3QM74XEZJJC5STVP0WF2GN3","01M3QM74XE170PHTE4A34MKNP3","01M3QM74XEZD3SDVVQZ1TF9JPA","01M3QM74XEPJWV4ZR7R3JPS67H"],v$={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video","vimeo","youtube"]}}}}},default:y$.map(e=>({image:{assetId:e,name:""}}))},settings:{sizing:"auto auto",properties:{width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},turnHeight:{type:"number",scope:"layout",title:"Turn height",display:{type:"numeric-input"},min:0,max:9999},itemsPerTurn:{type:"number",scope:"common",title:"Per turn",display:{type:"common-numeric-input"},min:3,max:40},turns:{type:"number",scope:"common",title:"Turns",display:{type:"common-numeric-input"},min:1,max:30},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},playback:{type:"string",scope:"common",title:"Playback",display:{type:"toggle-cycle",enum:["autoplay","scroll"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},blur:{type:"string",scope:"common",title:"Blur",display:{type:"toggle-cycle",enum:["on","off"]}}},defaults:{itemsPerTurn:14,turns:3,direction:"right",playback:"autoplay",blur:"off",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1}},layoutDefaults:{d:{defaultPaddingTop:30/1440,width:800/1440,imageWidth:160/1440,turnHeight:380/1440,speed:2.2,cornerRadius:0},m:{defaultPaddingTop:10/375,width:320/375,imageWidth:75/375,turnHeight:310/375,speed:2.8,cornerRadius:0},t:{defaultPaddingTop:20/768,width:620/768,imageWidth:100/768,turnHeight:280/768,speed:2.8,cornerRadius:0}},layout:["__componentName__","width","imageWidth","turnHeight","itemsPerTurn","turns","playback","speed","direction","imageDisplay","cornerRadius","blur"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",items:["direction","speed"]},{type:"row",items:["width"]},{type:"row",items:["imageWidth","turnHeight"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",items:["itemsPerTurn","turns"]},{type:"row",items:["playback","blur"]}]}]},x$={element:h$,id:"helix",name:"Helix",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Helix.mp4"},version:1,defaultSize:{d:{width:720,height:540}},schema:v$,sourceCode:f$,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},In=300,rn=300,b$=8/1440,ho=.004,S$=50,w$=1440,Xi=S$/w$;function $$(e){if(e==="default"||e==="compact"||e==="open")return e;if(e==="onScroll")return"compact"}function C$(e){return e==="center"||e==="right"?e:"left"}function T$(e){return e==="left"||e==="right"?e:"center"}function I$(e,t,n){const i=b.scalingValue(t,n);return e==="center"?`translateX(calc(-50% + ${i}))`:`translateX(${i})`}function L$(e,t){if(e&&typeof e=="object"){if(t&&typeof e[t]=="string")return e[t];for(const n in e)if(typeof e[n]=="string")return e[n];return}return e}function _p(e,t){const n=(L$(e,t)??"always").trim().toLowerCase().replace(/[_-]+/g," ");return n==="open only"||n==="openonly"?"open only":n==="open and compact"||n==="openandcompact"?"open and compact":n==="default and open"||n==="defaultandopen"?"default and open":n==="default and compact"||n==="defaultandcompact"?"default and compact":"always"}function M$(e,t,n){switch(_p(e.showIn,n)){case"open only":return!1;case"open and compact":return t==="compact";case"default and compact":return!0;case"default and open":return t==="default";default:return!0}}function P$(e,t){switch(_p(e.showIn,t)){case"default and compact":return!1;default:return!0}}function E$(e){return(e==null?void 0:e.find(t=>t.slug===""))??(e==null?void 0:e[0])}function R$(e,t){const n=e?t==null?void 0:t.find(i=>i.id===e):E$(t);return!e&&!n?"":n?n.slug===""?"/":`/${n.slug}`:e.startsWith("/")||e.startsWith("#")||/^[a-z][a-z\d+\-.]*:/i.test(e)?e:t?`/${e}`:e}function Id(e){const t=(e??"").toLowerCase();return t==="blank"||t==="_blank"||t.includes("new")}function Hp(e){const t=e.link;if(t&&typeof t=="object"){const i=Id(t.target)?"_blank":void 0;if(t.type==="url")return{type:"url",value:t.value??t.url??"",target:i};if(t.type==="anchor")return{type:"anchor",value:t.value??"",target:i};if(t.type==="page")return{type:"page",value:t.value??"",target:i,anchor:t.anchor};if(typeof t.url=="string")return{type:"url",value:t.url,target:i}}const n=Id(e.openIn)?"_blank":void 0;return e.mode==="url"?{type:"url",value:e.url??"",target:n}:{type:"page",value:e.page??"",target:n,anchor:e.anchor}}function Qs(e,t){const n=e.label||"Link",i=Hp(e);if(i.type==="url")return{label:n,href:i.value,target:i.target};if(i.type==="anchor"){const c=i.value.replace(/^#/,"");return{label:n,href:c?`#${c}`:"",target:i.target}}const o=R$(i.value,t),r=(i.anchor??"").replace(/^#/,""),l=r?o?`${o}#${r}`:`#${r}`:o;return{label:n,href:l,target:i.target}}const $i=24,wi=$i*.125,Wp=$i*.125,Ms=($i-(3*wi+2*Wp))/2,Ld=wi+Wp;function k$({className:e,lineClassName:t}){return a.jsxs("svg",{className:e,viewBox:`0 0 ${$i} ${$i}`,"aria-hidden":"true",children:[a.jsx("rect",{className:`${t} ${t}-top`,x:"0",y:Ms,width:$i,height:wi,rx:wi/2}),a.jsx("rect",{className:`${t} ${t}-mid`,x:"0",y:Ms+Ld,width:$i,height:wi,rx:wi/2}),a.jsx("rect",{className:`${t} ${t}-bot`,x:"0",y:Ms+2*Ld,width:$i,height:wi,rx:wi/2})]})}function A$(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function F$(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:b.scalingValue((o-t)/2,i)}}const Op=.004;let er;function N$(){return er!==void 0?er:typeof document>"u"?(er=null,null):(er=document.createElement("canvas").getContext("2d"),er)}function _$(e){const t=getComputedStyle(e),n=parseFloat(t.fontSize)||0;if(n<=0)return 0;const i=N$();if(!i)return 0;i.font=`${t.fontStyle} ${t.fontWeight} ${n}px ${t.fontFamily}`;const o=i.measureText("H"),r=o.actualBoundingBoxAscent>0?o.actualBoundingBoxAscent:0,l=Math.max(0,o.actualBoundingBoxDescent||0),c=o.fontBoundingBoxAscent||0,d=o.fontBoundingBoxDescent||0;return r<=0||c<=0&&d<=0?0:(d-l-(c-r))/2/n}function Md(e,t){const[n,i]=s.useState(0);return s.useLayoutEffect(()=>{const o=e.current;if(!o)return;const r=()=>{const d=_$(o);i(u=>Math.abs(u-d)<Op?u:d)};r();const l=document.fonts;l.ready.then(r).catch(()=>{}),l.addEventListener("loadingdone",r);const c=new ResizeObserver(r);return c.observe(o),()=>{l.removeEventListener("loadingdone",r),c.disconnect()}},[e,t]),n}function Pd(e){if(!(Math.abs(e)<Op))return`translateY(${e}em)`}function Ed(e){var t,n;return[e.fontFamily??"",((t=e.fontSettings)==null?void 0:t.fontWeight)??400,((n=e.fontSettings)==null?void 0:n.fontStyle)??"normal",e.fontSize??"",e.lineHeight??""].join("\0")}function Rd(e){return{fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontSize:e.fontSize,lineHeight:e.lineHeight,position:"absolute",top:0,left:0,visibility:"hidden",pointerEvents:"none",whiteSpace:"nowrap"}}function kd(e,t={}){return{fontFamily:e.fontFamily??t.fontFamily,fontSettings:e.fontSettings??t.fontSettings,fontSize:e.fontSize??t.fontSize,lineHeight:e.lineHeight??t.lineHeight,letterSpacing:e.letterSpacing??t.letterSpacing??0,wordSpacing:e.wordSpacing??t.wordSpacing??0,textAlign:e.textAlign??t.textAlign??"left",textAppearance:e.textAppearance??t.textAppearance}}function Ad(e,t,n){var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??.01,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing??0,wordSpacing:t.wordSpacing??0,textAlign:t.textAlign,textAppearance:t.textAppearance,color:""};return{css:{...pn(nn(i,n)),...F$(t.fontSize,t.lineHeight,e,n)},className:A$(t.fontSize,t.lineHeight,`${e}-link-text`,`${e}-text-tight-leading`)}}function Fd(e){const t=e.split(/\r?\n/);return t.length===1?e:t.map((n,i)=>a.jsxs(s.Fragment,{children:[n,i<t.length-1?a.jsx("br",{}):null]},i))}function Nd(e,t,n,i){const o=Math.max(0,n-i),r=e+t;if(r<=o||r<=0)return{start:e,end:t};const l=o/r;return{start:e*l,end:t*l}}function Dp(e){const n=Math.max(Xi,e.fontSize??Xi),{start:i,end:o}=Nd(e.textPaddingTop,e.textPaddingBottom,1,n),{start:r,end:l}=Nd(e.textPaddingLeft,e.textPaddingRight,1,Xi);return{effectivePaddingLeft:r,effectivePaddingRight:l,effectivePaddingTop:i,effectivePaddingBottom:o,panelSize:1}}function H$(e){if(e==="center"||e==="center-center")return{horizontalAlign:"center",verticalAlign:"center"};const[t,n]=e.split("-");return{horizontalAlign:t,verticalAlign:n}}function W$(e){return e.position?H$(e.position):{horizontalAlign:e.horizontalAlign??"left",verticalAlign:e.verticalAlign??"top"}}function O$(e,t){return e.textPaddingLeft!==t.textPaddingLeft||e.textPaddingRight!==t.textPaddingRight||e.textPaddingTop!==t.textPaddingTop||e.textPaddingBottom!==t.textPaddingBottom}const D$=[["onScrollIconColor","compactIconColor"],["onScrollLinkColor","compactLinkColor"],["onScrollLogoColor","compactLogoColor"],["onScrollBackgroundColor","compactBackgroundColor"],["onScrollPanelColor","compactBackgroundColor"],["onScrollLogoMaxWidth","compactLogoMaxWidth"],["onScrollLogoMaxHeight","compactLogoMaxHeight"],["onScrollLogoPosition","compactLogoPosition"],["onScrollPanelHeight","compactPanelHeight"],["onScrollIconSize","compactIconSize"],["onScrollNavTextWidth","compactNavTextWidth"],["onScrollNavGap","compactNavGap"],["onScrollNavPaddingLeft","compactNavPaddingLeft"],["onScrollNavPaddingRight","compactNavPaddingRight"],["onScrollFontFamily","compactFontFamily"],["onScrollFontSettings","compactFontSettings"],["onScrollFontSize","compactFontSize"],["onScrollLineHeight","compactLineHeight"],["onScrollLetterSpacing","compactLetterSpacing"],["onScrollWordSpacing","compactWordSpacing"],["onScrollTextAlign","compactTextAlign"],["onScrollTextAppearance","compactTextAppearance"]];function zp(e){var o,r;const t=e,n={};for(const[l,c]of D$)e[c]!==void 0||t[l]===void 0||(n[c]=t[l]);const i=t.stateOverrides;return i&&(i.onScroll!==void 0||i["onScroll-hover"]!==void 0)&&(n.stateOverrides={...e.stateOverrides},i.onScroll!==void 0&&((o=e.stateOverrides)==null?void 0:o.compact)===void 0&&(n.stateOverrides.compact=i.onScroll),i["onScroll-hover"]!==void 0&&((r=e.stateOverrides)==null?void 0:r["compact-hover"])===void 0&&(n.stateOverrides["compact-hover"]=i["onScroll-hover"])),Object.keys(n).length===0?e:{...e,...n}}function _d(e){var o,r,l,c,d,u,p,y,x,m,f,S,w,N,v,M;e=zp(e);const t=e,n={};if(e.backgroundColor===void 0&&t.panelColor!==void 0&&(n.backgroundColor=t.panelColor),e.openFontFamily===void 0&&e.fontFamily!==void 0&&(n.openFontFamily=e.fontFamily),e.openFontSettings===void 0&&e.fontSettings!==void 0&&(n.openFontSettings=e.fontSettings),e.openFontSize===void 0&&e.fontSize!==void 0&&(n.openFontSize=e.fontSize),e.openLineHeight===void 0&&e.lineHeight!==void 0&&(n.openLineHeight=e.lineHeight),e.openLetterSpacing===void 0&&e.letterSpacing!==void 0&&(n.openLetterSpacing=e.letterSpacing),e.openWordSpacing===void 0&&e.wordSpacing!==void 0&&(n.openWordSpacing=e.wordSpacing),e.openTextAlign===void 0&&e.textAlign!==void 0&&(n.openTextAlign=e.textAlign),e.openTextAppearance===void 0&&e.textAppearance!==void 0&&(n.openTextAppearance=e.textAppearance),e.openLinkColor===void 0){const E=((r=(o=e.stateOverrides)==null?void 0:o.open)==null?void 0:r.openLinkColor)??((c=(l=e.stateOverrides)==null?void 0:l.open)==null?void 0:c.linkColor)??e.linkColor;E!==void 0&&(n.openLinkColor=E)}if(e.compactIconColor===void 0){const E=((u=(d=e.stateOverrides)==null?void 0:d.compact)==null?void 0:u.iconColor)??e.iconColor;E!==void 0&&(n.compactIconColor=E)}if(e.compactLinkColor===void 0){const E=((y=(p=e.stateOverrides)==null?void 0:p.compact)==null?void 0:y.linkColor)??e.linkColor;E!==void 0&&(n.compactLinkColor=E)}if(e.compactLogoColor===void 0){const E=((m=(x=e.stateOverrides)==null?void 0:x.compact)==null?void 0:m.logoColor)??e.logoColor;E!==void 0&&(n.compactLogoColor=E)}if(e.openLogoColor===void 0){const E=((S=(f=e.stateOverrides)==null?void 0:f.open)==null?void 0:S.logoColor)??e.logoColor;E!==void 0&&(n.openLogoColor=E)}if(e.compactBackgroundColor===void 0){const E=((N=(w=e.stateOverrides)==null?void 0:w.compact)==null?void 0:N.backgroundColor)??((M=(v=t.stateOverrides)==null?void 0:v.compact)==null?void 0:M.panelColor)??t.compactPanelColor??t.onScrollPanelColor??e.backgroundColor??n.backgroundColor;E!==void 0&&(n.compactBackgroundColor=E)}e.logoMaxHeight===void 0&&e.logoMaxWidth!==void 0&&(n.logoMaxHeight=e.logoMaxWidth),e.compactLogoMaxHeight===void 0&&e.compactLogoMaxWidth!==void 0&&(n.compactLogoMaxHeight=e.compactLogoMaxWidth);const i=(E,U)=>{if(e[E]!==void 0)return;const X=e[U];X!==void 0&&(n[E]=X)};return i("compactLogoMaxHeight","logoMaxHeight"),i("compactLogoPosition","logoPosition"),i("compactPanelHeight","panelHeight"),i("compactShowIcon","showIcon"),i("compactIconSize","iconSize"),i("compactNavTextWidth","navTextWidth"),i("compactNavTextPosition","navTextPosition"),i("compactNavTextOffset","navTextOffset"),i("compactNavGap","navGap"),i("compactNavPaddingLeft","navPaddingLeft"),i("compactNavPaddingRight","navPaddingRight"),i("compactFontFamily","fontFamily"),i("compactFontSettings","fontSettings"),i("compactFontSize","fontSize"),i("compactLineHeight","lineHeight"),i("compactLetterSpacing","letterSpacing"),i("compactWordSpacing","wordSpacing"),i("compactTextAlign","textAlign"),i("compactTextAppearance","textAppearance"),Object.keys(n).length===0?e:{...e,...n}}function z$(e,t){const n=Dp({textPaddingLeft:e.textPaddingLeft??0,textPaddingRight:e.textPaddingRight??0,textPaddingTop:e.textPaddingTop??0,textPaddingBottom:e.textPaddingBottom??0,fontSize:e.openFontSize??e.fontSize??t.openFontSize??t.fontSize}),i={};return(e.textPaddingLeft??0)!==n.effectivePaddingLeft&&(i.textPaddingLeft=n.effectivePaddingLeft),(e.textPaddingRight??0)!==n.effectivePaddingRight&&(i.textPaddingRight=n.effectivePaddingRight),(e.textPaddingTop??0)!==n.effectivePaddingTop&&(i.textPaddingTop=n.effectivePaddingTop),(e.textPaddingBottom??0)!==n.effectivePaddingBottom&&(i.textPaddingBottom=n.effectivePaddingBottom),Object.keys(i).length===0?e:{...e,...i}}function B$(e,t){return{paddingLeft:b.scalingValue(e.effectivePaddingLeft,t),paddingRight:b.scalingValue(e.effectivePaddingRight,t),paddingTop:b.scalingValue(e.effectivePaddingTop,t),paddingBottom:b.scalingValue(e.effectivePaddingBottom,t)}}function j$(e,t,n,i){const o=Math.max(Xi,n??Xi),r=Math.max(t.effectivePaddingTop,ho),l=Math.max(t.effectivePaddingBottom,ho),c=Math.max(0,t.panelSize-t.effectivePaddingBottom-o),d=Math.max(0,t.panelSize-t.effectivePaddingTop-o),u=Math.max(t.effectivePaddingLeft,ho),p=Math.max(t.effectivePaddingRight,ho),y=Math.max(0,t.panelSize-t.effectivePaddingRight-Xi),x=Math.max(0,t.panelSize-t.effectivePaddingLeft-Xi);return a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"textPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-max-fraction":String(c),className:`${e}-control-anchor`,style:{top:0,left:0,width:"100%",height:i(r)}}),a.jsx("div",{"data-controls":"textPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(d),className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:i(l)}}),a.jsx("div",{"data-controls":"textPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(y),className:`${e}-control-anchor`,style:{top:0,left:0,width:i(u),height:"100%"}}),a.jsx("div",{"data-controls":"textPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(x),className:`${e}-control-anchor`,style:{top:0,right:0,width:i(p),height:"100%"}})]})}const V$={iconColor:"icon-color",closeButtonColor:"close-button-color",linkColor:"link-color",openLinkColor:"menu-link-color",compactIconColor:"compact-icon-color",compactLinkColor:"compact-link-color",compactLogoColor:"compact-logo-color",compactBackgroundColor:"compact-background-color",openLogoColor:"open-logo-color",menuBackgroundColor:"menu-background-color",overlayColor:"overlay-color",backgroundColor:"background-color",logoColor:"logo-color"},G$=["hover","open"],X$={top:"flex-start",center:"center",bottom:"flex-end"},U$={left:"flex-start",center:"center",right:"flex-end"};function q$(e){return`
24690
24690
  .${e}-root {
24691
24691
  position: relative;
24692
24692
  display: block;
@@ -25346,7 +25346,7 @@ export function Helix({
25346
25346
  word-spacing ${rn}ms ease,
25347
25347
  padding ${rn}ms ease;
25348
25348
  }
25349
- `}function Qs(e){return e?!e.startsWith("http://")&&!e.startsWith("https://")&&!e.startsWith("blob:")&&!e.startsWith("data:"):!1}function q$(e,t){var i;const n=(i=e.logo)==null?void 0:i.icon;return!e.logo||Qs(n)||!t?e:{...e,logo:{...e.logo,icon:t}}}function K$(e){return`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`}function Y$(e){const t=e.trim().toLowerCase();return t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")?!0:t.includes(".svg")}function Q$(e){const t=Y$(e),[n,i]=s.useState(!1);return s.useEffect(()=>{if(t||!e.startsWith("blob:")){i(!1);return}let o=!1;return fetch(e).then(r=>r.blob()).then(async r=>{if(o)return;if(r.type.includes("svg")){i(!0);return}if(r.type.startsWith("image/")&&!r.type.includes("svg")){i(!1);return}const l=await r.text();o||i(/<svg[\s>]/i.test(l.trim()))}).catch(()=>{o||i(!1)}),()=>{o=!0}},[t,e]),t||n}function Z$(e,t){const[n,i]=s.useState(yr(e)?e:null);return s.useEffect(()=>{if(!t||!e){i(null);return}if(yr(e)){i(e);return}let o=!1;return qu(e).then(r=>{o||i(r)}).catch(()=>{o||i(null)}),()=>{o=!0}},[t,e]),t?n:null}function J$(e){const t=e.indexOf("#");if(t===-1)return"";try{return decodeURIComponent(e.slice(t+1))}catch{return e.slice(t+1)}}function eC(e){if(!e||e.startsWith("#"))return!0;try{return new URL(e,window.location.href).pathname===window.location.pathname}catch{return!1}}function zp(e){if(!e)return null;const t=document.getElementById(e),n=document.querySelector(`[data-section-id="${CSS.escape(e)}"]`),i=t??n;return i instanceof HTMLElement?i:null}function _d(e){const t=zp(e);return t?(t.scrollIntoView({behavior:"smooth",block:"start"}),!0):!1}function tC(e,t,n={}){const{isEditor:i,isPreviewMode:o,item:r,pages:l,onLinkNavigate:c}=n,d=n.runAfterClose??(x=>x()),u=e.currentTarget.getAttribute("href")??"",p=J$(u),y=e.currentTarget.target==="_blank";if(r&&c){e.preventDefault(),e.stopPropagation();const x=Ys(r,l),m=_p(r),f={mode:m.type==="url"?"url":"page",href:x.href||u,page:m.type==="page"?m.value:void 0,url:m.type==="url"?m.value:void 0,anchor:m.type==="anchor"?m.value.replace(/^#/,""):(m.anchor??"").replace(/^#/,""),target:x.target};f.target==="_blank"?c(f):d(()=>c(f)),t();return}if(i){e.preventDefault(),d(()=>_d(p)),t();return}!y&&p&&eC(u)&&zp(p)&&(e.preventDefault(),d(()=>_d(p))),t()}const nC=["--cntrl-article-width","--cntrl-article-top","--cntrl-article-left","--cntrl-viewport-height"];function iC(e){let t=e;for(;t;){if(getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim())return t;t=t.parentElement}return e}function oC(e){const t={},n=iC(e);if(!n)return t;const i=getComputedStyle(n);for(const o of nC){const r=i.getPropertyValue(o).trim();r&&(t[o]=r)}return t}function Hd(e,t,n,i,o){return a.jsx("span",{className:`${e}-link-text-box`,style:{width:o(n),maxWidth:"100%"},children:a.jsx("span",{className:i?`${e}-link-text-inner`:`${e}-link-text-inner-hidden`,style:{width:"100%"},children:t})})}function rC({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,activeEvent:o,currentState:r,isSwitchClone:l=!1,unavailableStates:c=[],layoutId:d,pages:u,onLinkNavigate:p,onUpdateSettings:y,onOpenChange:x}){var tc;const{prefix:m}=b.useScopedStyles(),f=s.useRef(null),S=s.useRef(null),w=s.useRef(null),N=s.useRef(null),v=s.useRef(null),M=s.useRef(0),R=s.useRef(null),U=s.useRef(null),X=s.useRef(d),D=s.useMemo(()=>U$(m),[m]),[_,W]=s.useState(!1),[T,C]=s.useState(!1),[q,E]=s.useState(!1),$=w$(r),I=s.useMemo(()=>new Set(c),[c]),j=Ft=>!!(Ft&&I.has(Ft)),K=!!(t&&!i&&$==="open"&&!j("open"))||!(t&&!i)&&_,P=!!(t&&!i),h=K&&!P;jl(h),s.useEffect(()=>{if(!K||!P)return;const Ft=document.documentElement,Qt=Ft.style.overflow;return Ft.style.overflow="hidden",()=>{Ft.style.overflow=Qt}},[K,P]);const J=!j("compact")&&!j("onScroll"),V=!t||!!i&&!n,he=o&&o!=="default"?o:void 0,k=J&&$==="compact"?"compact":"default",[ce,L]=s.useState(k),[me,te]=s.useState(!1),ve=!n;k!==ce&&(L(k),ve&&te(!0));const Le=Dp(e),{logo:de,logoMaxHeight:ue=120/1440,logoPosition:Z="left",panelHeight:le=60/1440,backgroundColor:oe="#b3b3b3",logoColor:ge="#000000",position:Se,horizontalAlign:Ee,verticalAlign:Ne,iconColor:Te="#000000",showIcon:Ce="on",iconSize:g=16/1440,linkColor:Y="#000000",openLinkColor:ee="#000000",compactIconColor:ae="#000000",compactLinkColor:ye="#000000",compactLogoColor:ne="#000000",compactBackgroundColor:B="#ffffff",compactLogoMaxHeight:G=120/1440,compactLogoPosition:z,compactPanelHeight:ie=60/1440,compactShowIcon:H="on",compactIconSize:be=16/1440,compactNavTextWidth:re,compactNavTextPosition:Q,compactNavTextOffset:Pe,compactNavGap:Ae,compactNavPaddingLeft:He=10/1440,compactNavPaddingRight:Xe=10/1440,compactFontFamily:Ue,compactFontSettings:Je,compactFontSize:je,compactLineHeight:xe,compactLetterSpacing:Ie=0,compactWordSpacing:ze=0,compactTextAlign:Ze="left",compactTextAppearance:tt,openLogoColor:ot="#000000",menuBackgroundColor:lt="#ffffff",overlayColor:it="rgba(0, 0, 0, 0.45)",closeButtonColor:xt="#000000",effect:rt="fade",openPanelSize:_e=100,textWidth:We=280/1440,navTextWidth:vt,navTextPosition:Ve="center",navTextOffset:Ke=0,gap:pe=0,navGap:De,navPaddingLeft:qe=10/1440,navPaddingRight:bt=10/1440,textPaddingLeft:yt=10/1440,textPaddingRight:Et=10/1440,textPaddingTop:ct=10/1440,textPaddingBottom:wt=10/1440,fontFamily:nt,fontSettings:Nt,fontSize:jt,lineHeight:$e,letterSpacing:Ge=0,wordSpacing:ht=0,textAlign:Lt="left",textAppearance:$t,openFontFamily:mt,openFontSettings:_t,openFontSize:Ot,openLineHeight:zt,openLetterSpacing:Re,openWordSpacing:dt,openTextAlign:ut,openTextAppearance:kt,stateOverrides:Qe,link:at}=Le,{horizontalAlign:It,verticalAlign:At}=H$({position:Se,horizontalAlign:Ee,verticalAlign:Ne}),pt=k==="compact",Ut=pt?G:ue,qt=$$(pt?z:Z),Dt=pt?ie:le,Vt=pt?be:g,Gt=pt?re:vt,Bt=C$(pt?Q:Ve),Yt=(pt?Pe:Ke)??0,O=pt?Ae:De,Me=pt?He:qe,Fe=pt?Xe:bt,Oe=Gt??We,ft=K||(pt?H:Ce)!=="off",Tt=b.buildColorVars(m,{iconColor:Te,closeButtonColor:xt,linkColor:Y,openLinkColor:ee,compactIconColor:ae,compactLinkColor:ye,compactLogoColor:ne,compactBackgroundColor:B,openLogoColor:ot,menuBackgroundColor:lt,overlayColor:it,backgroundColor:oe,logoColor:ge},j$,V$,Qe),et=Ed(pt?{fontFamily:Ue,fontSettings:Je,fontSize:je,lineHeight:xe,letterSpacing:Ie,wordSpacing:ze,textAlign:Ze,textAppearance:tt}:{fontFamily:nt,fontSettings:Nt,fontSize:jt,lineHeight:$e,letterSpacing:Ge,wordSpacing:ht,textAlign:Lt,textAppearance:$t}),Mt=Ed({fontFamily:mt,fontSettings:_t,fontSize:Ot,lineHeight:zt,letterSpacing:Re,wordSpacing:dt,textAlign:ut,textAppearance:kt},et),Ct=kd(m,et,t),Ht=kd(m,Mt,t),on=Ld(w,Pd(et)),fn=Ld(N,Pd(Mt)),bn={...Ht.css,whiteSpace:"pre-wrap",transform:Md(fn)},ui=Ht.className,dn=Ft=>b.scalingValue(Ft,t),pi=O??pe,Yn=Math.max(Me,ho),Sn=Math.max(Fe,ho),mi=Math.max(0,1-Vt),eo=Math.max(0,1-Vt),wn=n??!1,Qn=wn&&!K,to=s.useMemo(()=>Op({textPaddingLeft:yt,textPaddingRight:Et,textPaddingTop:ct,textPaddingBottom:wt,fontSize:Mt.fontSize}),[yt,Et,ct,wt,Mt.fontSize]),no=Ft=>{const Qt=a.jsx("span",{className:ui,style:bn,children:Ad(Ft)});return Hd(m,Qt,We,wn,dn)},Ye=rt==="left"||rt==="right"?{width:`${_e}%`}:{height:`${_e}%`},A={...z$(to,t),...Ye,alignItems:X$[It],justifyContent:G$[At]},se=s.useRef(e),fe=s.useRef(d),ke=s.useRef(null);Qs((tc=e.logo)==null?void 0:tc.icon)&&(ke.current=e.logo.icon),s.useEffect(()=>{var Nr;if(!y||!t){se.current=e,fe.current=d;return}const Ft=(Nr=e.logo)==null?void 0:Nr.icon;if(e.logo&&!Qs(Ft)&&!ke.current){se.current=e,fe.current=d;return}const Qt=_r=>{y(q$(_r,ke.current))};if(fe.current!==d){se.current=e,fe.current=d;const _r=Nd(e);_r!==e&&Qt(_r);return}const cn=Nd(e),yn=se.current,$n=yn!==e,Fn=$n?D$(cn,yn):cn;se.current=e;const io=cn!==e,Xo=$n&&W$(cn,Fn);!io&&!Xo||Qt(Fn)},[e,y,t,d]);const Be=b.scalingValue(Vt,t),gt={width:Be,height:Be,minWidth:Be,minHeight:Be,maxWidth:Be,maxHeight:Be},Wt={...Ct.css,textDecoration:"none",transform:Md(on)},Kt=Ct.className,sn=(de==null?void 0:de.mode)!=="Off",en=(de==null?void 0:de.icon)??"",gi=Q$(en),An=Z$(en,gi),Zn=!!An,kr=dn(Math.min(Ut,Dt)),Go=!!(sn&&en&&qt==="right")?"left":"right",Ql=Array.isArray(at)?at:[],Ga=[k!=="default"?`${m}-state-${k}`:"",K||$==="open"?`${m}-state-open`:"",he&&he!==k&&he!==$?`${m}-state-${he}`:""].filter(Boolean).join(" "),Zp=t&&!i?`${m}-editor`:"",Zl=V?`${m}-interactive`:"",Jp=ve&&(k!==ce||me)?`${m}-nav-state-anim`:"",em=K?`${m}-open`:"",tm=s.useMemo(()=>oC(f.current),[T,K,d]),Xa=()=>{W(!1)},Ua=!t||i,nm=Ft=>{if(h){U.current=Ft;return}Ft()};s.useEffect(()=>{if(K)return;const Ft=U.current;U.current=null,Ft==null||Ft()},[K]);const Jl=(Ft,Qt)=>{tC(Ft,Xa,{isEditor:t,isPreviewMode:i,item:Qt,pages:u,onLinkNavigate:p,runAfterClose:nm})},im=()=>{t&&!i||W(Ft=>!Ft)},om=Ft=>{Ft.pointerType==="touch"&&Ft.currentTarget.blur()},Ar=()=>{R.current!==null&&(window.clearTimeout(R.current),R.current=null)};s.useEffect(()=>{if(!me)return;const Ft=window.setTimeout(()=>{te(!1)},rn);return()=>window.clearTimeout(Ft)},[me,k]),s.useEffect(()=>{if(K){Ar(),C(!0);return}return M.current+=1,E(!1),Ar(),R.current=window.setTimeout(()=>{R.current=null,C(!1)},In),Ar},[K]),s.useLayoutEffect(()=>{X.current!==d&&(X.current=d,M.current+=1,Ar(),W(!1),E(!1),C(!1))},[d]),s.useLayoutEffect(()=>{var cn;if(!T||!K)return;const Ft=M.current+1;M.current=Ft,E(!1),(cn=S.current)==null||cn.offsetHeight;const Qt=requestAnimationFrame(()=>{M.current===Ft&&E(!0)});return()=>{cancelAnimationFrame(Qt)}},[T,K]),s.useLayoutEffect(()=>{if(!h||!T)return;const Ft=v.current;if(!Ft)return;const Qt=getComputedStyle(Ft).backgroundColor;if(!Qt)return;const cn=document.documentElement,{body:yn}=document,$n=cn.style.backgroundColor,Fn=yn.style.backgroundColor;return cn.style.backgroundColor=Qt,yn.style.backgroundColor=Qt,()=>{cn.style.backgroundColor=$n,yn.style.backgroundColor=Fn}},[h,T,Ga,lt,Qe]),s.useEffect(()=>{x==null||x(K)},[K,x]),s.useEffect(()=>{if(!K)return;const Ft=Qt=>{Qt.key==="Escape"&&(t&&i||Xa())};return window.addEventListener("keydown",Ft),()=>window.removeEventListener("keydown",Ft)},[K,t,i]),s.useEffect(()=>{t&&!i&&$!=="open"&&W(!1)},[t,i,$]),s.useEffect(()=>{i&&W(!1)},[i]);const ec=wn&&K,rm=Ft=>Ql.filter(Qt=>M$(Qt,d)).map((Qt,cn)=>{const{label:yn,href:$n,target:Fn}=Ys(Qt,u),io=$n?a.jsx("a",{href:$n,target:Fn,rel:Fn==="_blank"?"noopener noreferrer":void 0,className:`${Ft} ${m}-has-href`,onClick:Xo=>Jl(Xo,Qt),children:no(yn)}):a.jsx("span",{className:Ft,children:no(yn)});return a.jsxs(s.Fragment,{children:[cn>0&&a.jsx("div",{"data-controls":ec?"gap":void 0,"data-controls-axis":"y",className:ec?`${m}-gap-control`:void 0,style:{height:dn(pe)}}),io]},cn)}),am=T?a.jsxs("div",{ref:S,"data-selection":"none",className:[`${m}-lightbox`,`${m}-full-lightbox ${m}-effect-${rt}`,q?`${m}-lightbox-active`:"",`${m}-lightbox-editor`,n?`${m}-lightbox-edit-mode`:"",Zl,Ga].filter(Boolean).join(" "),style:{...Tt,...tm},"aria-hidden":!q,children:[a.jsx("div",{className:[`${m}-backdrop`,Ua?`${m}-backdrop-clickable`:""].filter(Boolean).join(" "),"aria-hidden":"true",onClick:Ua?Xa:void 0}),a.jsxs("nav",{className:[`${m}-panel`,Ua?`${m}-panel-blocking`:""].filter(Boolean).join(" "),style:A,"aria-label":"Menu","data-lightbox-scrollable":"",children:[wn&&B$(m,to,Mt.fontSize,dn),rm(`${m}-link`)]}),h?a.jsx("div",{ref:v,className:`${m}-safari-tint`,"aria-hidden":"true"}):null]}):null,sm=()=>a.jsx("button",{type:"button",className:`${m}-toggle`,onClick:im,onPointerUp:om,"aria-expanded":K,"aria-label":K?"Close menu":"Open menu",children:a.jsx(E$,{className:`${m}-icon`,lineClassName:`${m}-icon-line`})}),Fr=Ft=>{const Qt=Ft==="left",cn=Qt?Me:Fe,yn=Qt?Yn:Sn,$n=Qt?mi:eo,Fn=pt?Qt?"compactNavPaddingLeft":"compactNavPaddingRight":Qt?"navPaddingLeft":"navPaddingRight";return a.jsx("div",{className:Qt?`${m}-nav-padding-left`:`${m}-nav-padding-right`,style:{width:dn(cn),flexShrink:0},children:Qn?a.jsx("div",{"data-controls":Fn,"data-controls-axis":"x","data-controls-variant":"column-padding",...Qt?{}:{"data-controls-reverse":""},"data-controls-min":"0","data-controls-max-fraction":String($n),className:`${m}-control-anchor`,style:{top:0,[Qt?"left":"right"]:0,width:dn(yn),height:"100%"}}):null})},lm=(Ft,Qt)=>{const{label:cn,href:yn,target:$n}=Ys(Ft,u),Fn=a.jsx("span",{className:Kt,style:Wt,children:Ad(cn)}),io=Hd(m,Fn,Oe,Qn,dn),Xo=yn?a.jsx("a",{href:yn,target:$n,rel:$n==="_blank"?"noopener noreferrer":void 0,className:`${m}-nav-link ${m}-has-href`,onClick:Nr=>Jl(Nr,Ft),children:io}):a.jsx("span",{className:`${m}-nav-link`,children:io});return a.jsxs(s.Fragment,{children:[Qt>0&&a.jsx("div",{"data-controls":Qn?pt?"compactNavGap":"navGap":void 0,"data-controls-axis":"x",className:Qn?`${m}-gap-control ${m}-nav-gap-control`:`${m}-nav-gap-control}`,style:{width:dn(pi),flexShrink:0}}),Xo]},Qt)},cm={...Tt,height:b.scalingValue(Dt,t),minHeight:b.scalingValue(Dt,t),[`--${m}-panel-height`]:b.scalingValue(Dt,t)},dm=l&&k==="default"&&$!=="open"&&!i?dn(le+x$):"0px";return a.jsxs("div",{ref:f,className:`${m}-root ${Ga} ${Zp} ${Zl} ${Jp}`.trim(),style:{width:"100%",height:"100%",lineHeight:0,fontSize:0,marginTop:dm,...Tt},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:D}}),a.jsx("span",{ref:w,"aria-hidden":!0,style:Rd(Ct.css),children:"H"}),a.jsx("span",{ref:N,"aria-hidden":!0,style:Rd(Ht.css),children:"H"}),a.jsx("div",{className:`${m}-nav-slide`,children:a.jsxs("div",{className:`${m}-nav-bar`,style:cm,children:[sn&&en?a.jsxs("div",{className:`${m}-nav-logo ${m}-nav-logo-${qt}`,children:[qt==="left"?Fr("left"):null,a.jsxs("div",{className:`${m}-nav-logo-inner${Zn?` ${m}-nav-logo-tinted`:""}`,style:{height:kr,...Zn&&An?{[`--${m}-logo-image`]:K$(An)}:{}},children:[a.jsx("img",{src:Zn&&An?An:en,alt:"",className:`${m}-nav-logo-img`}),Zn?a.jsx("span",{className:`${m}-nav-logo-tint`,"aria-hidden":"true"}):null]}),qt==="right"?Fr("right"):null]}):null,a.jsx("nav",{className:`${m}-nav-links ${m}-nav-links-${Bt}`,style:{transform:T$(Bt,Yt,t)},"aria-label":"Navigation",children:a.jsx("div",{className:`${m}-nav-links-inner`,children:Ql.filter(Ft=>L$(Ft,k,d)).map((Ft,Qt)=>lm(Ft,Qt))})})]})}),am,a.jsxs("div",{className:`${m}-nav-toggle-wrap ${m}-nav-toggle-wrap-${Go}`,children:[Go==="left"?Fr("left"):null,ft?a.jsx("div",{className:`${m}-root ${em}`.trim(),style:gt,children:sm()}):null,Go==="right"?Fr("right"):null]})]})}const aC=`import { Fragment, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type MouseEvent, type PointerEvent, type ReactNode } from 'react';
25349
+ `}function Zs(e){return e?!e.startsWith("http://")&&!e.startsWith("https://")&&!e.startsWith("blob:")&&!e.startsWith("data:"):!1}function K$(e,t){var i;const n=(i=e.logo)==null?void 0:i.icon;return!e.logo||Zs(n)||!t?e:{...e,logo:{...e.logo,icon:t}}}function Y$(e){return`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`}function Q$(e){const t=e.trim().toLowerCase();return t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")?!0:t.includes(".svg")}function Z$(e){const t=Q$(e),[n,i]=s.useState(!1);return s.useEffect(()=>{if(t||!e.startsWith("blob:")){i(!1);return}let o=!1;return fetch(e).then(r=>r.blob()).then(async r=>{if(o)return;if(r.type.includes("svg")){i(!0);return}if(r.type.startsWith("image/")&&!r.type.includes("svg")){i(!1);return}const l=await r.text();o||i(/<svg[\s>]/i.test(l.trim()))}).catch(()=>{o||i(!1)}),()=>{o=!0}},[t,e]),t||n}function J$(e,t){const[n,i]=s.useState(yr(e)?e:null);return s.useEffect(()=>{if(!t||!e){i(null);return}if(yr(e)){i(e);return}let o=!1;return Ku(e).then(r=>{o||i(r)}).catch(()=>{o||i(null)}),()=>{o=!0}},[t,e]),t?n:null}function eC(e){const t=e.indexOf("#");if(t===-1)return"";try{return decodeURIComponent(e.slice(t+1))}catch{return e.slice(t+1)}}function tC(e){if(!e||e.startsWith("#"))return!0;try{return new URL(e,window.location.href).pathname===window.location.pathname}catch{return!1}}function Bp(e){if(!e)return null;const t=document.getElementById(e),n=document.querySelector(`[data-section-id="${CSS.escape(e)}"]`),i=t??n;return i instanceof HTMLElement?i:null}function Hd(e){const t=Bp(e);return t?(t.scrollIntoView({behavior:"smooth",block:"start"}),!0):!1}function nC(e,t,n={}){const{isEditor:i,isPreviewMode:o,item:r,pages:l,onLinkNavigate:c}=n,d=n.runAfterClose??(x=>x()),u=e.currentTarget.getAttribute("href")??"",p=eC(u),y=e.currentTarget.target==="_blank";if(r&&c){e.preventDefault(),e.stopPropagation();const x=Qs(r,l),m=Hp(r),f={mode:m.type==="url"?"url":"page",href:x.href||u,page:m.type==="page"?m.value:void 0,url:m.type==="url"?m.value:void 0,anchor:m.type==="anchor"?m.value.replace(/^#/,""):(m.anchor??"").replace(/^#/,""),target:x.target};f.target==="_blank"?c(f):d(()=>c(f)),t();return}if(i){e.preventDefault(),d(()=>Hd(p)),t();return}!y&&p&&tC(u)&&Bp(p)&&(e.preventDefault(),d(()=>Hd(p))),t()}const iC=["--cntrl-article-width","--cntrl-article-top","--cntrl-article-left","--cntrl-viewport-height"];function oC(e){let t=e;for(;t;){if(getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim())return t;t=t.parentElement}return e}function rC(e){const t={},n=oC(e);if(!n)return t;const i=getComputedStyle(n);for(const o of iC){const r=i.getPropertyValue(o).trim();r&&(t[o]=r)}return t}function Wd(e,t,n,i,o){return a.jsx("span",{className:`${e}-link-text-box`,style:{width:o(n),maxWidth:"100%"},children:a.jsx("span",{className:i?`${e}-link-text-inner`:`${e}-link-text-inner-hidden`,style:{width:"100%"},children:t})})}function aC({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,activeEvent:o,currentState:r,isSwitchClone:l=!1,unavailableStates:c=[],layoutId:d,pages:u,onLinkNavigate:p,onUpdateSettings:y,onOpenChange:x}){var nc;const{prefix:m}=b.useScopedStyles(),f=s.useRef(null),S=s.useRef(null),w=s.useRef(null),N=s.useRef(null),v=s.useRef(null),M=s.useRef(0),E=s.useRef(null),U=s.useRef(null),X=s.useRef(d),D=s.useMemo(()=>q$(m),[m]),[_,W]=s.useState(!1),[T,C]=s.useState(!1),[q,R]=s.useState(!1),$=$$(r),I=s.useMemo(()=>new Set(c),[c]),j=Ft=>!!(Ft&&I.has(Ft)),K=!!(t&&!i&&$==="open"&&!j("open"))||!(t&&!i)&&_,P=!!(t&&!i),h=K&&!P;Vl(h),s.useEffect(()=>{if(!K||!P)return;const Ft=document.documentElement,Qt=Ft.style.overflow;return Ft.style.overflow="hidden",()=>{Ft.style.overflow=Qt}},[K,P]);const J=!j("compact")&&!j("onScroll"),V=!t||!!i&&!n,he=o&&o!=="default"?o:void 0,k=J&&$==="compact"?"compact":"default",[ce,L]=s.useState(k),[me,te]=s.useState(!1),ve=!n;k!==ce&&(L(k),ve&&te(!0));const Le=zp(e),{logo:de,logoMaxHeight:ue=120/1440,logoPosition:Z="left",panelHeight:le=60/1440,backgroundColor:oe="#b3b3b3",logoColor:ge="#000000",position:Se,horizontalAlign:Re,verticalAlign:Ne,iconColor:Te="#000000",showIcon:Ce="on",iconSize:g=16/1440,linkColor:Y="#000000",openLinkColor:ee="#000000",compactIconColor:ae="#000000",compactLinkColor:ye="#000000",compactLogoColor:ne="#000000",compactBackgroundColor:B="#ffffff",compactLogoMaxHeight:G=120/1440,compactLogoPosition:z,compactPanelHeight:ie=60/1440,compactShowIcon:H="on",compactIconSize:be=16/1440,compactNavTextWidth:re,compactNavTextPosition:Q,compactNavTextOffset:Pe,compactNavGap:Ae,compactNavPaddingLeft:He=10/1440,compactNavPaddingRight:Xe=10/1440,compactFontFamily:Ue,compactFontSettings:Je,compactFontSize:je,compactLineHeight:xe,compactLetterSpacing:Ie=0,compactWordSpacing:ze=0,compactTextAlign:Ze="left",compactTextAppearance:tt,openLogoColor:ot="#000000",menuBackgroundColor:lt="#ffffff",overlayColor:it="rgba(0, 0, 0, 0.45)",closeButtonColor:xt="#000000",effect:rt="fade",openPanelSize:_e=100,textWidth:We=280/1440,navTextWidth:vt,navTextPosition:Ve="center",navTextOffset:Ke=0,gap:pe=0,navGap:De,navPaddingLeft:qe=10/1440,navPaddingRight:bt=10/1440,textPaddingLeft:yt=10/1440,textPaddingRight:Rt=10/1440,textPaddingTop:ct=10/1440,textPaddingBottom:wt=10/1440,fontFamily:nt,fontSettings:Nt,fontSize:jt,lineHeight:$e,letterSpacing:Ge=0,wordSpacing:ht=0,textAlign:Lt="left",textAppearance:$t,openFontFamily:mt,openFontSettings:_t,openFontSize:Ot,openLineHeight:zt,openLetterSpacing:Ee,openWordSpacing:dt,openTextAlign:ut,openTextAppearance:kt,stateOverrides:Qe,link:at}=Le,{horizontalAlign:It,verticalAlign:At}=W$({position:Se,horizontalAlign:Re,verticalAlign:Ne}),pt=k==="compact",Ut=pt?G:ue,qt=C$(pt?z:Z),Dt=pt?ie:le,Vt=pt?be:g,Gt=pt?re:vt,Bt=T$(pt?Q:Ve),Yt=(pt?Pe:Ke)??0,O=pt?Ae:De,Me=pt?He:qe,Fe=pt?Xe:bt,Oe=Gt??We,ft=K||(pt?H:Ce)!=="off",Tt=b.buildColorVars(m,{iconColor:Te,closeButtonColor:xt,linkColor:Y,openLinkColor:ee,compactIconColor:ae,compactLinkColor:ye,compactLogoColor:ne,compactBackgroundColor:B,openLogoColor:ot,menuBackgroundColor:lt,overlayColor:it,backgroundColor:oe,logoColor:ge},V$,G$,Qe),et=kd(pt?{fontFamily:Ue,fontSettings:Je,fontSize:je,lineHeight:xe,letterSpacing:Ie,wordSpacing:ze,textAlign:Ze,textAppearance:tt}:{fontFamily:nt,fontSettings:Nt,fontSize:jt,lineHeight:$e,letterSpacing:Ge,wordSpacing:ht,textAlign:Lt,textAppearance:$t}),Mt=kd({fontFamily:mt,fontSettings:_t,fontSize:Ot,lineHeight:zt,letterSpacing:Ee,wordSpacing:dt,textAlign:ut,textAppearance:kt},et),Ct=Ad(m,et,t),Ht=Ad(m,Mt,t),on=Md(w,Ed(et)),fn=Md(N,Ed(Mt)),bn={...Ht.css,whiteSpace:"pre-wrap",transform:Pd(fn)},ui=Ht.className,dn=Ft=>b.scalingValue(Ft,t),pi=O??pe,Yn=Math.max(Me,ho),Sn=Math.max(Fe,ho),mi=Math.max(0,1-Vt),eo=Math.max(0,1-Vt),wn=n??!1,Qn=wn&&!K,to=s.useMemo(()=>Dp({textPaddingLeft:yt,textPaddingRight:Rt,textPaddingTop:ct,textPaddingBottom:wt,fontSize:Mt.fontSize}),[yt,Rt,ct,wt,Mt.fontSize]),no=Ft=>{const Qt=a.jsx("span",{className:ui,style:bn,children:Fd(Ft)});return Wd(m,Qt,We,wn,dn)},Ye=rt==="left"||rt==="right"?{width:`${_e}%`}:{height:`${_e}%`},A={...B$(to,t),...Ye,alignItems:U$[It],justifyContent:X$[At]},se=s.useRef(e),fe=s.useRef(d),ke=s.useRef(null);Zs((nc=e.logo)==null?void 0:nc.icon)&&(ke.current=e.logo.icon),s.useEffect(()=>{var Nr;if(!y||!t){se.current=e,fe.current=d;return}const Ft=(Nr=e.logo)==null?void 0:Nr.icon;if(e.logo&&!Zs(Ft)&&!ke.current){se.current=e,fe.current=d;return}const Qt=_r=>{y(K$(_r,ke.current))};if(fe.current!==d){se.current=e,fe.current=d;const _r=_d(e);_r!==e&&Qt(_r);return}const cn=_d(e),yn=se.current,$n=yn!==e,Fn=$n?z$(cn,yn):cn;se.current=e;const io=cn!==e,Xo=$n&&O$(cn,Fn);!io&&!Xo||Qt(Fn)},[e,y,t,d]);const Be=b.scalingValue(Vt,t),gt={width:Be,height:Be,minWidth:Be,minHeight:Be,maxWidth:Be,maxHeight:Be},Wt={...Ct.css,textDecoration:"none",transform:Pd(on)},Kt=Ct.className,sn=(de==null?void 0:de.mode)!=="Off",en=(de==null?void 0:de.icon)??"",gi=Z$(en),An=J$(en,gi),Zn=!!An,kr=dn(Math.min(Ut,Dt)),Go=!!(sn&&en&&qt==="right")?"left":"right",Zl=Array.isArray(at)?at:[],Xa=[k!=="default"?`${m}-state-${k}`:"",K||$==="open"?`${m}-state-open`:"",he&&he!==k&&he!==$?`${m}-state-${he}`:""].filter(Boolean).join(" "),Jp=t&&!i?`${m}-editor`:"",Jl=V?`${m}-interactive`:"",em=ve&&(k!==ce||me)?`${m}-nav-state-anim`:"",tm=K?`${m}-open`:"",nm=s.useMemo(()=>rC(f.current),[T,K,d]),Ua=()=>{W(!1)},qa=!t||i,im=Ft=>{if(h){U.current=Ft;return}Ft()};s.useEffect(()=>{if(K)return;const Ft=U.current;U.current=null,Ft==null||Ft()},[K]);const ec=(Ft,Qt)=>{nC(Ft,Ua,{isEditor:t,isPreviewMode:i,item:Qt,pages:u,onLinkNavigate:p,runAfterClose:im})},om=()=>{t&&!i||W(Ft=>!Ft)},rm=Ft=>{Ft.pointerType==="touch"&&Ft.currentTarget.blur()},Ar=()=>{E.current!==null&&(window.clearTimeout(E.current),E.current=null)};s.useEffect(()=>{if(!me)return;const Ft=window.setTimeout(()=>{te(!1)},rn);return()=>window.clearTimeout(Ft)},[me,k]),s.useEffect(()=>{if(K){Ar(),C(!0);return}return M.current+=1,R(!1),Ar(),E.current=window.setTimeout(()=>{E.current=null,C(!1)},In),Ar},[K]),s.useLayoutEffect(()=>{X.current!==d&&(X.current=d,M.current+=1,Ar(),W(!1),R(!1),C(!1))},[d]),s.useLayoutEffect(()=>{var cn;if(!T||!K)return;const Ft=M.current+1;M.current=Ft,R(!1),(cn=S.current)==null||cn.offsetHeight;const Qt=requestAnimationFrame(()=>{M.current===Ft&&R(!0)});return()=>{cancelAnimationFrame(Qt)}},[T,K]),s.useLayoutEffect(()=>{if(!h||!T)return;const Ft=v.current;if(!Ft)return;const Qt=getComputedStyle(Ft).backgroundColor;if(!Qt)return;const cn=document.documentElement,{body:yn}=document,$n=cn.style.backgroundColor,Fn=yn.style.backgroundColor;return cn.style.backgroundColor=Qt,yn.style.backgroundColor=Qt,()=>{cn.style.backgroundColor=$n,yn.style.backgroundColor=Fn}},[h,T,Xa,lt,Qe]),s.useEffect(()=>{x==null||x(K)},[K,x]),s.useEffect(()=>{if(!K)return;const Ft=Qt=>{Qt.key==="Escape"&&(t&&i||Ua())};return window.addEventListener("keydown",Ft),()=>window.removeEventListener("keydown",Ft)},[K,t,i]),s.useEffect(()=>{t&&!i&&$!=="open"&&W(!1)},[t,i,$]),s.useEffect(()=>{i&&W(!1)},[i]);const tc=wn&&K,am=Ft=>Zl.filter(Qt=>P$(Qt,d)).map((Qt,cn)=>{const{label:yn,href:$n,target:Fn}=Qs(Qt,u),io=$n?a.jsx("a",{href:$n,target:Fn,rel:Fn==="_blank"?"noopener noreferrer":void 0,className:`${Ft} ${m}-has-href`,onClick:Xo=>ec(Xo,Qt),children:no(yn)}):a.jsx("span",{className:Ft,children:no(yn)});return a.jsxs(s.Fragment,{children:[cn>0&&a.jsx("div",{"data-controls":tc?"gap":void 0,"data-controls-axis":"y",className:tc?`${m}-gap-control`:void 0,style:{height:dn(pe)}}),io]},cn)}),sm=T?a.jsxs("div",{ref:S,"data-selection":"none",className:[`${m}-lightbox`,`${m}-full-lightbox ${m}-effect-${rt}`,q?`${m}-lightbox-active`:"",`${m}-lightbox-editor`,n?`${m}-lightbox-edit-mode`:"",Jl,Xa].filter(Boolean).join(" "),style:{...Tt,...nm},"aria-hidden":!q,children:[a.jsx("div",{className:[`${m}-backdrop`,qa?`${m}-backdrop-clickable`:""].filter(Boolean).join(" "),"aria-hidden":"true",onClick:qa?Ua:void 0}),a.jsxs("nav",{className:[`${m}-panel`,qa?`${m}-panel-blocking`:""].filter(Boolean).join(" "),style:A,"aria-label":"Menu","data-lightbox-scrollable":"",children:[wn&&j$(m,to,Mt.fontSize,dn),am(`${m}-link`)]}),h?a.jsx("div",{ref:v,className:`${m}-safari-tint`,"aria-hidden":"true"}):null]}):null,lm=()=>a.jsx("button",{type:"button",className:`${m}-toggle`,onClick:om,onPointerUp:rm,"aria-expanded":K,"aria-label":K?"Close menu":"Open menu",children:a.jsx(k$,{className:`${m}-icon`,lineClassName:`${m}-icon-line`})}),Fr=Ft=>{const Qt=Ft==="left",cn=Qt?Me:Fe,yn=Qt?Yn:Sn,$n=Qt?mi:eo,Fn=pt?Qt?"compactNavPaddingLeft":"compactNavPaddingRight":Qt?"navPaddingLeft":"navPaddingRight";return a.jsx("div",{className:Qt?`${m}-nav-padding-left`:`${m}-nav-padding-right`,style:{width:dn(cn),flexShrink:0},children:Qn?a.jsx("div",{"data-controls":Fn,"data-controls-axis":"x","data-controls-variant":"column-padding",...Qt?{}:{"data-controls-reverse":""},"data-controls-min":"0","data-controls-max-fraction":String($n),className:`${m}-control-anchor`,style:{top:0,[Qt?"left":"right"]:0,width:dn(yn),height:"100%"}}):null})},cm=(Ft,Qt)=>{const{label:cn,href:yn,target:$n}=Qs(Ft,u),Fn=a.jsx("span",{className:Kt,style:Wt,children:Fd(cn)}),io=Wd(m,Fn,Oe,Qn,dn),Xo=yn?a.jsx("a",{href:yn,target:$n,rel:$n==="_blank"?"noopener noreferrer":void 0,className:`${m}-nav-link ${m}-has-href`,onClick:Nr=>ec(Nr,Ft),children:io}):a.jsx("span",{className:`${m}-nav-link`,children:io});return a.jsxs(s.Fragment,{children:[Qt>0&&a.jsx("div",{"data-controls":Qn?pt?"compactNavGap":"navGap":void 0,"data-controls-axis":"x",className:Qn?`${m}-gap-control ${m}-nav-gap-control`:`${m}-nav-gap-control}`,style:{width:dn(pi),flexShrink:0}}),Xo]},Qt)},dm={...Tt,height:b.scalingValue(Dt,t),minHeight:b.scalingValue(Dt,t),[`--${m}-panel-height`]:b.scalingValue(Dt,t)},um=l&&k==="default"&&$!=="open"&&!i?dn(le+b$):"0px";return a.jsxs("div",{ref:f,className:`${m}-root ${Xa} ${Jp} ${Jl} ${em}`.trim(),style:{width:"100%",height:"100%",lineHeight:0,fontSize:0,marginTop:um,...Tt},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:D}}),a.jsx("span",{ref:w,"aria-hidden":!0,style:Rd(Ct.css),children:"H"}),a.jsx("span",{ref:N,"aria-hidden":!0,style:Rd(Ht.css),children:"H"}),a.jsx("div",{className:`${m}-nav-slide`,children:a.jsxs("div",{className:`${m}-nav-bar`,style:dm,children:[sn&&en?a.jsxs("div",{className:`${m}-nav-logo ${m}-nav-logo-${qt}`,children:[qt==="left"?Fr("left"):null,a.jsxs("div",{className:`${m}-nav-logo-inner${Zn?` ${m}-nav-logo-tinted`:""}`,style:{height:kr,...Zn&&An?{[`--${m}-logo-image`]:Y$(An)}:{}},children:[a.jsx("img",{src:Zn&&An?An:en,alt:"",className:`${m}-nav-logo-img`}),Zn?a.jsx("span",{className:`${m}-nav-logo-tint`,"aria-hidden":"true"}):null]}),qt==="right"?Fr("right"):null]}):null,a.jsx("nav",{className:`${m}-nav-links ${m}-nav-links-${Bt}`,style:{transform:I$(Bt,Yt,t)},"aria-label":"Navigation",children:a.jsx("div",{className:`${m}-nav-links-inner`,children:Zl.filter(Ft=>M$(Ft,k,d)).map((Ft,Qt)=>cm(Ft,Qt))})})]})}),sm,a.jsxs("div",{className:`${m}-nav-toggle-wrap ${m}-nav-toggle-wrap-${Go}`,children:[Go==="left"?Fr("left"):null,ft?a.jsx("div",{className:`${m}-root ${tm}`.trim(),style:gt,children:lm()}):null,Go==="right"?Fr("right"):null]})]})}const sC=`import { Fragment, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type MouseEvent, type PointerEvent, type ReactNode } from 'react';
25350
25350
  import { CommonComponentProps } from '../props';
25351
25351
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
25352
25352
  import { useLightboxScrollLock } from '../utils/useLightboxScrollLock';
@@ -27987,8 +27987,8 @@ export function Burger({
27987
27987
  </div>
27988
27988
  );
27989
27989
  }
27990
- `;function tr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const ji={fontSettings:{type:"object",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0},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 bi(e,t){return e?`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`:t}function Ul(e){return{[bi(e,"fontFamily")]:{type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},[bi(e,"fontSettings")]:{...ji.fontSettings,scope:"common",title:""},[bi(e,"fontSize")]:{...ji.fontSize,scope:"layout",title:""},[bi(e,"lineHeight")]:{...ji.lineHeight,scope:"layout",title:""},[bi(e,"letterSpacing")]:{...ji.letterSpacing,scope:"layout",title:""},[bi(e,"wordSpacing")]:{...ji.wordSpacing,scope:"layout",title:""},[bi(e,"textAlign")]:{...ji.textAlign,scope:"layout",title:""},[bi(e,"textAppearance")]:{...ji.textAppearance,scope:"layout",title:""}}}const sC=Ul(""),lC=Ul("open"),cC=Ul("compact"),dC=["__componentName__",{type:"row",items:["panelHeight","navTextWidth"]},{type:"row",title:"",items:["navTextPosition","navTextOffset"]},{type:"row",title:"Logo",items:["logoMaxHeight","logoPosition"]},{type:"row",title:"Hamburger",items:["iconSize","showIcon"]},"fontFamily","fontSettings",{type:"row",items:["fontSize","lineHeight","letterSpacing","wordSpacing"]},"textAlign","textAppearance","navGap","navPaddingLeft","navPaddingRight"],uC=["__componentName__",{type:"row",items:["compactPanelHeight","compactNavTextWidth"]},{type:"row",title:"",items:["compactNavTextPosition","compactNavTextOffset"]},{type:"row",title:"Logo",items:["compactLogoMaxHeight","compactLogoPosition"]},{type:"row",title:"Hamburger",items:["compactIconSize","compactShowIcon"]},"compactFontFamily","compactFontSettings",{type:"row",items:["compactFontSize","compactLineHeight","compactLetterSpacing","compactWordSpacing"]},"compactTextAlign","compactTextAppearance","compactNavGap","compactNavPaddingLeft","compactNavPaddingRight"],pC=["__componentName__",{type:"row",title:"Text",items:["textWidth","position"]},{type:"row",title:"Menu",items:["openPanelSize","effect"]},"openFontFamily","openFontSettings",{type:"row",items:["openFontSize","openLineHeight","openLetterSpacing","openWordSpacing"]},"openTextAlign","openTextAppearance"],ei={textTransform:"none",textDecoration:"none",fontVariant:"normal"},Ms={fontWeight:400,fontStyle:"normal"},ea={d:"Always",t:"Open Only",m:"Open Only"},mC=["left-top","center-top","right-top","left-center","center","right-center","left-bottom","center-bottom","right-bottom"],gC=["iconColor","logoColor","linkColor","backgroundColor"],hC={type:"object",version:1,settings:{sizing:"auto manual",properties:{link:{type:"array",scope:"common",display:{type:"page-url-link"},items:{type:"object",properties:{link:{type:"object",properties:{type:{type:"string",enum:["url","page","anchor"]},value:{type:"string",message:"Paste URL here..."},target:{type:"string",enum:["blank","self"]},anchor:{type:"string"}}},label:{type:"string"},showIn:{type:"string",scope:"layout",enum:["Always","Open Only","Open and Compact","Default and Open","Default and Compact"]}}}},logo:{type:"object",scope:"common",title:"Logo",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Logo",display:{type:"settings-image-input"}}}},logoMaxHeight:{type:"number",scope:"layout",title:"Max Height",display:{type:"numeric-input"},min:0,max:9999},logoPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},compactLogoPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},logoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{default:"Logo Default",hover:"Logo Hover"},display:{type:"palette-color-picker"}},panelHeight:{type:"number",scope:"layout",title:"Menu Height",display:{type:"numeric-input"},min:0,max:9999},backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{default:"Icon Default",hover:"Icon Hover"},display:{type:"palette-color-picker"}},showIcon:{type:"string",scope:"layout",title:"Show",display:{type:"toggle-cycle",enum:["on","off"]}},iconSize:{type:"number",scope:"layout",title:"Size",display:{type:"numeric-input"},min:0,max:9999},linkColor:{type:"string",scope:"common",title:"Text Default",titleByState:{default:"Text Default",hover:"Text Hover"},display:{type:"palette-color-picker"}},compactShowIcon:{type:"string",scope:"layout",title:"Show",display:{type:"toggle-cycle",enum:["on","off"]}},compactIconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{compact:"Icon Default","compact-hover":"Icon Hover"},display:{type:"palette-color-picker"}},compactLinkColor:{type:"string",scope:"common",title:"Text Default",titleByState:{compact:"Text Default","compact-hover":"Text Hover"},display:{type:"palette-color-picker"}},compactLogoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{compact:"Logo Default","compact-hover":"Logo Hover"},display:{type:"palette-color-picker"}},compactBackgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},openLinkColor:{type:"string",scope:"common",title:"Text Default",titleByState:{open:"Text Default","open-hover":"Text Hover"},display:{type:"palette-color-picker"}},openLogoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{open:"Logo Default","open-hover":"Logo Hover"},display:{type:"palette-color-picker"}},menuBackgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},overlayColor:{type:"string",scope:"common",title:"Overlay Default",display:{type:"palette-color-picker"}},closeButtonColor:{type:"string",scope:"common",title:"Close Default",titleByState:{open:"Close Default","open-hover":"Close Hover"},display:{type:"palette-color-picker"}},effect:{type:"string",scope:"layout",title:"Effect",display:{type:"toggle-cycle",enum:["fade","left","top","right","bottom"]}},openPanelSize:{type:"number",scope:"layout",title:"Height",display:{type:"percentage-input"},min:0,max:100},textWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},navTextWidth:{type:"number",scope:"layout",title:"Text width",display:{type:"numeric-input"},min:0,max:9999},navTextPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},navTextOffset:{type:"number",scope:"layout",title:"Offset",display:{type:"numeric-input"},min:-9999,max:9999},position:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:[...mC]}},stateOverrides:{type:"object",scope:"common"},gap:tr("Gap"),navGap:{type:"number",scope:"layout",title:"Nav gap",min:0,max:100,display:{type:"range-control",visible:!1}},navPaddingLeft:{type:"number",scope:"layout",title:"Nav padding left",min:0,max:100,display:{type:"range-control",visible:!1}},navPaddingRight:{type:"number",scope:"layout",title:"Nav padding right",min:0,max:100,display:{type:"range-control",visible:!1}},textPaddingLeft:tr("Text padding left"),textPaddingRight:tr("Text padding right"),textPaddingTop:tr("Text padding top"),textPaddingBottom:tr("Text padding bottom"),compactLogoMaxHeight:{type:"number",scope:"layout",title:"Max Height",display:{type:"numeric-input"},min:0,max:9999},compactPanelHeight:{type:"number",scope:"layout",title:"Menu Height",display:{type:"numeric-input"},min:0,max:9999},compactIconSize:{type:"number",scope:"layout",title:"Size",display:{type:"numeric-input"},min:0,max:9999},compactNavTextWidth:{type:"number",scope:"layout",title:"Text width",display:{type:"numeric-input"},min:0,max:9999},compactNavTextPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},compactNavTextOffset:{type:"number",scope:"layout",title:"Offset",display:{type:"numeric-input"},min:-9999,max:9999},compactNavGap:{type:"number",scope:"layout",title:"Nav gap",min:0,max:100,display:{type:"range-control",visible:!1}},compactNavPaddingLeft:{type:"number",scope:"layout",title:"Nav padding left",min:0,max:100,display:{type:"range-control",visible:!1}},compactNavPaddingRight:{type:"number",scope:"layout",title:"Nav padding right",min:0,max:100,display:{type:"range-control",visible:!1}},...sC,...lC,...cC},defaults:{link:[{link:{type:"page",value:"",target:"self"},label:"Home",showIn:ea},{link:{type:"page",value:"",target:"self"},label:"Works",showIn:ea},{link:{type:"page",value:"",target:"self"},label:"About",showIn:ea},{link:{type:"page",value:"",target:"self"},label:"Contact",showIn:ea}],logo:{mode:"On",icon:"01M3QM74XE09DSJCWGD1XM6Y45"},backgroundColor:"#ffffff",logoColor:"#000000",iconColor:"#000000",linkColor:"#000000",openLinkColor:"#000000",compactIconColor:"#000000",compactLinkColor:"#000000",compactLogoColor:"#000000",compactBackgroundColor:"#ffffff",openLogoColor:"#000000",menuBackgroundColor:"#ffffff",overlayColor:"rgba(0, 0, 0, 0.45)",closeButtonColor:"#000000",effect:"fade",showIcon:"on",compactShowIcon:"on",logoPosition:"left",compactLogoPosition:"left",navTextPosition:"center",compactNavTextPosition:"center",navTextOffset:0,compactNavTextOffset:0,position:"left-top",fontFamily:"Goudy Bookletter 1911",fontSettings:Ms,textAlign:"left",openFontFamily:"Goudy Bookletter 1911",openFontSettings:Ms,openTextAlign:"left",compactFontFamily:"Goudy Bookletter 1911",compactFontSettings:Ms,compactTextAlign:"left",stateOverrides:{hover:{linkColor:"#666666",iconColor:"#666666",logoColor:"#666666"},"open-hover":{closeButtonColor:"#666666"}}},displayRules:[{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoMaxHeight.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoPosition.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoMaxHeight.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoPosition.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoColor.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoColor.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.openLogoColor.display.visible",value:!1}},{if:{name:"effect",value:"left"},then:{name:"properties.openPanelSize.title",value:"Width"}},{if:{name:"effect",value:"right"},then:{name:"properties.openPanelSize.title",value:"Width"}},{if:{name:"showIcon",value:"off"},then:{name:"properties.iconSize.display.visible",value:!1}},{if:{name:"showIcon",value:"off"},then:{name:"properties.iconColor.display.visible",value:!1}},{if:{name:"compactShowIcon",value:"off"},then:{name:"properties.compactIconSize.display.visible",value:!1}},{if:{name:"compactShowIcon",value:"off"},then:{name:"properties.compactIconColor.display.visible",value:!1}}],layoutDefaults:{m:{position:"center",panelHeight:50/375,logoMaxHeight:30/375,logoPosition:"center",compactLogoPosition:"left",navTextPosition:"center",navTextOffset:0,compactNavTextPosition:"center",compactNavTextOffset:0,showIcon:"on",iconSize:30/375,textWidth:240/375,openPanelSize:100,navTextWidth:120/375,gap:24/375,navGap:24/375,navPaddingLeft:20/375,navPaddingRight:20/375,textPaddingLeft:10/375,textPaddingRight:10/375,textPaddingTop:10/375,textPaddingBottom:10/375,fontSize:16/375,lineHeight:20/375,letterSpacing:0,wordSpacing:0,textAppearance:ei,openFontSize:34/375,openLineHeight:20/375,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:ei,openTextAlign:"center",compactPanelHeight:40/375,compactLogoMaxHeight:20/375,compactShowIcon:"on",compactIconSize:16/375,compactNavTextWidth:80/375,compactNavGap:24/375,compactNavPaddingLeft:20/375,compactNavPaddingRight:20/375,compactFontSize:16/375,compactLineHeight:20/375,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:ei},t:{textAlign:"center",position:"center",panelHeight:60/768,logoMaxHeight:30/768,logoPosition:"left",compactLogoPosition:"left",navTextPosition:"center",navTextOffset:0,compactNavTextPosition:"center",compactNavTextOffset:0,showIcon:"on",iconSize:16/768,textWidth:300/768,openPanelSize:100,navTextWidth:90/768,gap:32/768,navGap:32/768,navPaddingLeft:20/768,navPaddingRight:20/768,textPaddingLeft:10/768,textPaddingRight:10/768,textPaddingTop:10/768,textPaddingBottom:10/768,fontSize:18/768,lineHeight:20/768,letterSpacing:0,wordSpacing:0,textAppearance:ei,openFontSize:75/768,openLineHeight:20/768,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:ei,openTextAlign:"center",compactTextAlign:"center",compactPanelHeight:40/768,compactLogoMaxHeight:20/768,compactShowIcon:"on",compactIconSize:16/768,compactNavTextWidth:80/768,compactNavGap:32/768,compactNavPaddingLeft:20/768,compactNavPaddingRight:20/768,compactFontSize:16/768,compactLineHeight:20/768,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:ei},d:{position:"center",panelHeight:50/1440,logoMaxHeight:30/1440,logoPosition:"left",compactLogoPosition:"left",navTextPosition:"center",navTextOffset:0,compactNavTextPosition:"center",compactNavTextOffset:0,showIcon:"on",iconSize:20/1440,textWidth:300/1440,openPanelSize:100,navTextWidth:60/1440,gap:12/1440,navGap:64/1440,navPaddingLeft:10/1440,navPaddingRight:10/1440,textPaddingLeft:10/1440,textPaddingRight:10/1440,textPaddingTop:10/1440,textPaddingBottom:10/1440,fontSize:16/1440,lineHeight:16/1440,letterSpacing:0,wordSpacing:0,textAppearance:ei,textAlign:"center",openFontSize:90/1440,openLineHeight:16/1440,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:ei,openTextAlign:"center",compactPanelHeight:30/1440,compactLogoMaxHeight:20/1440,compactShowIcon:"on",compactIconSize:20/1440,compactNavTextWidth:60/1440,compactNavGap:20/1440,compactNavPaddingLeft:10/1440,compactNavPaddingRight:10/1440,compactFontSize:16/1440,compactLineHeight:16/1440,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:ei,compactTextAlign:"center"}},layout:["__componentName__","link","logo","logoMaxHeight","logoPosition","panelHeight","backgroundColor","logoColor","iconColor","showIcon","iconSize","linkColor","openLinkColor","compactShowIcon","compactIconColor","compactLinkColor","compactLogoColor","compactBackgroundColor","compactLogoMaxHeight","compactLogoPosition","compactPanelHeight","compactIconSize","compactNavTextWidth","compactNavTextPosition","compactNavTextOffset","compactNavGap","compactNavPaddingLeft","compactNavPaddingRight","compactFontFamily","compactFontSettings","compactFontSize","compactLineHeight","compactLetterSpacing","compactWordSpacing","compactTextAlign","compactTextAppearance","openLogoColor","menuBackgroundColor","overlayColor","closeButtonColor","effect","textWidth","navTextWidth","navTextPosition","navTextOffset","position","gap","navGap","navPaddingLeft","navPaddingRight","textPaddingLeft","textPaddingRight","textPaddingTop","textPaddingBottom","fontFamily","fontSettings","fontSize","lineHeight","letterSpacing","wordSpacing","textAlign","textAppearance","openFontFamily","openFontSettings","openFontSize","openLineHeight","openLetterSpacing","openWordSpacing","openTextAlign","openTextAppearance"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","logo"]},{id:"default",icon:"default",title:"Default",tooltip:"Default State",layout:dC},{id:"compact",icon:"compact",title:"Compact",tooltip:"Compact State",layout:uC,availableWhen:{navigationPosition:["switch"]}},{id:"open",icon:"open",title:"Open",tooltip:"Open State",layout:pC},{id:"links",icon:"content",title:"Links",tooltip:"Link Settings",layout:["__componentName__","link"]}],paletteBookmark:{items:[...gC],panelIds:["default","compact","open"],stateItems:{default:["iconColor","logoColor","linkColor","backgroundColor"],hover:["iconColor","logoColor","linkColor"],compact:["compactIconColor","compactLogoColor","compactLinkColor","compactBackgroundColor"],"compact-hover":["compactIconColor","compactLogoColor","compactLinkColor"],open:["closeButtonColor","openLogoColor","openLinkColor","menuBackgroundColor","overlayColor"],"open-hover":["closeButtonColor","openLogoColor","openLinkColor"]}},states:["default","hover"],statePanels:["default","compact","open"]},fC={element:rC,id:"basic-burger",name:"Basic Burger",category:"navigation",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple Burger.png"},layoutMode:"navigation",defaultSize:{d:{width:"100%",height:60/1440},t:{width:"100%",height:60/768},m:{width:"100%",height:56/375}},defaultNavigationPosition:{d:"switch",t:"switch",m:"stickyTop"},schema:hC,sourceCode:aC,assetsPaths:{content:[],parameters:[{path:"logo.icon",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"},{path:"openFontFamily"},{path:"compactFontFamily"}]},fontRelations:{fontSettings:"fontFamily",openFontSettings:"openFontFamily",compactFontSettings:"compactFontFamily"}},Wd=120,Od=3,yC=.12,ql={x:0,y:0,width:100,height:100};function $o(e,t){return e.map(n=>n.map(i=>({x:(i.x-t.x)/t.width,y:(i.y-t.y)/t.height})))}function Ia(e){return e<0?0:e>1?1:e}function Dd(e,t){return e.filter(n=>n.length>0).map(n=>`M ${n.map(i=>`${i.x*t.width} ${i.y*t.height}`).join(" L ")} Z`).join(" ")}function vC(e,t){let n=1/0,i=1/0,o=-1/0,r=-1/0;for(const d of e)for(const u of d){const p=u.x*t.width,y=u.y*t.height;p<n&&(n=p),p>o&&(o=p),y<i&&(i=y),y>r&&(r=y)}const l=o-n,c=r-i;return!isFinite(l)||!isFinite(c)||l<=0||c<=0?null:{x:n,y:i,width:l,height:c}}function xC(e){return e.map(([t,n])=>({x:t,y:n}))}function Ps(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const c of e)for(const d of c)d.x<t&&(t=d.x),d.x>i&&(i=d.x),d.y<n&&(n=d.y),d.y>o&&(o=d.y);const r=i-t,l=o-n;return!isFinite(r)||!isFinite(l)||r<=0||l<=0?e:e.map(c=>c.map(d=>({x:(d.x-t)/r,y:(d.y-n)/l})))}function bC(e,t){const n=[];for(const o of e)for(let r=0;r<o.length;r+=1){const l=o[r],c=o[(r+1)%o.length];(l.y<=t&&c.y>t||c.y<=t&&l.y>t)&&n.push(l.x+(t-l.y)/(c.y-l.y)*(c.x-l.x))}n.sort((o,r)=>o-r);const i=[];for(let o=0;o+1<n.length;o+=2){const r=Ia(n[o]),l=Ia(n[o+1]);l>r&&i.push({x0:r,x1:l})}return SC(i)}function SC(e){if(e.length<2)return e;const t=[...e].sort((i,o)=>i.x0-o.x0),n=[t[0]];for(let i=1;i<t.length;i+=1){const o=n[n.length-1],r=t[i];r.x0<=o.x1?o.x1=Math.max(o.x1,r.x1):n.push({...r})}return n}function wC(e,t){const n=[];let i=0,o=0;for(;i<e.length&&o<t.length;){const r=Math.max(e[i].x0,t[o].x0),l=Math.min(e[i].x1,t[o].x1);l>r&&n.push({x0:r,x1:l}),e[i].x1<t[o].x1?i+=1:o+=1}return n}function $C(e){const t=[];let n=0;for(const i of e)i.x0>n&&t.push({x0:n,x1:i.x0}),n=Math.max(n,i.x1);return n<1&&t.push({x0:n,x1:1}),t}function CC(e,t){const n=[];for(const i of e){if(t.x1<=i.x0||t.x0>=i.x1){n.push(i);continue}t.x0>i.x0&&n.push({x0:i.x0,x1:t.x0}),t.x1<i.x1&&n.push({x0:t.x1,x1:i.x1})}return n}function TC(e,t,n,i){let o=null;for(let r=0;r<Od;r+=1){const l=Ia(t+(n-t)*r/Math.max(1,Od-1)),c=bC(e,l),d=i==="avoid"?$C(c):c;if(o=o===null?d:wC(o,d),o.length===0)return[]}return o??[]}function zd(e,t="stretch",n=ql){const i=e.trim();if(!i)return null;if(/^[Mm]/.test(i)){const l=ki(i),c=$r(l);if(c.length)return t==="viewbox"?$o(c,n):Ps(c);if(typeof document>"u")return null;const d=i.split(/(?=[Mm])/).map(y=>y.trim()).filter(Boolean),u=document.createElementNS("http://www.w3.org/2000/svg","svg"),p=[];for(const y of d){const x=document.createElementNS("http://www.w3.org/2000/svg","path");x.setAttribute("d",y),u.appendChild(x);let m=0;try{m=x.getTotalLength()}catch{m=0}if(!m)continue;const f=[];for(let S=0;S<Wd;S+=1){const w=x.getPointAtLength(S/Wd*m);f.push({x:w.x,y:w.y})}p.push(f)}return p.length?t==="viewbox"?$o(p,n):Ps(p):null}const o=i.split(/[\s,]+/).map(Number).filter(l=>!Number.isNaN(l));if(o.length<6)return null;const r=[];for(let l=0;l+1<o.length;l+=2)r.push({x:o[l],y:o[l+1]});return t==="viewbox"?$o([r],n):Ps([r])}const Kl={bobbin:"M57.63,0 L57.63,37.24 L74.66,37.24 L74.66,56.07 L57.63,100 L33.84,100 L16.81,56.07 L16.81,37.24 L33.84,37.24 L33.84,0 Z",circle:"M50,0 C77.61,0 100,22.39 100,50 C100,77.61 77.61,100 50,100 C22.39,100 0,77.61 0,50 C0,22.39 22.39,0 50,0 Z",shield:"M0,0 L100,0 L100,50 L50,100 L0,50 Z",vase:"M25.37,0 L91.55,0 C91.55,0 74.8,25.14 83.07,50.03 C91.34,74.92 74.61,100 74.61,100 L8.43,100 C8.43,100 32.3,75.08 23.9,50 C15.5,24.92 25.37,0 25.37,0 Z",parallelogram:"M25.37,0 L91.55,0 L74.61,100 L8.43,100 Z",diamond:"M50,0 L80,50 L50,100 L20,50 Z"},Zs="0 0 100 100",La=100,Js=16,IC=12,LC=16,Rs=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,MC=/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g,Bd=Math.PI/4,PC=8,RC=Math.PI/18,EC=8,fo=24,yo=[];function kC(){return[{closed:!0,nodes:[{p:{x:0,y:0},in:null,out:null},{p:{x:1,y:0},in:null,out:null},{p:{x:1,y:1},in:null,out:null},{p:{x:0,y:1},in:null,out:null}]}]}function Es(e,t){return un(e,n=>({x:(n.x-t.x)/t.width,y:(n.y-t.y)/t.height}))}function AC(e){const t=Li(e),n=t.maxX-t.minX,i=t.maxY-t.minY;return!isFinite(n)||!isFinite(i)||n<=0||i<=0?e:un(e,o=>({x:(o.x-t.minX)/n,y:(o.y-t.minY)/i}))}function FC(e,t){if(!(t.width>0)||!(t.height>0))return e;const n=Math.min(t.width,t.height),i=(t.width-n)/2,o=(t.height-n)/2;return un(e,r=>({x:(i+r.x*n)/t.width,y:(o+r.y*n)/t.height}))}function jd(e,t,n,i,o,r){let l=[];if(t&&t.length)l=Es(t,i);else{const c=e.trim();if(c&&/^[Mm]/.test(c)){const d=ki(c);d.length&&(l=n==="viewbox"?Es(d,i):AC(d))}if(!l.length){const d=o!=="custom"?Kl[o]:void 0;d?l=Es(ki(d),ql):l=kC()}}return o==="circle"?FC(l,r):l}function Vd(e,t){return!(t.width>0)||!(t.height>0)||!e.length?"":Ho(un(e,n=>({x:n.x*t.width,y:n.y*t.height})))}function el(e){const t=e==="rectangle"||e==="custom"?void 0:Kl[e];return t?$o($r(ki(t)),ql):[xC([[0,0],[1,0],[1,1],[0,1]])]}function NC(e){const t=e.match(MC);return t?t.map(Number).filter(n=>!Number.isNaN(n)):[]}function Ln(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function tl(e,t){return{x:t.x*2-e.x,y:t.y*2-e.y}}function gn(e){return{x:e.x,y:e.y}}function _C(e){return{p:gn(e.p),in:e.in?gn(e.in):null,out:e.out?gn(e.out):null}}function Vn(e){return e.map(t=>({closed:t.closed,nodes:t.nodes.map(_C)}))}function un(e,t){return e.map(n=>({closed:n.closed,nodes:n.nodes.map(i=>({p:t(i.p),in:i.in?t(i.in):null,out:i.out?t(i.out):null}))}))}function Gd(e,t,n,i=n){return un(e,o=>({x:t.x+(o.x-t.x)*n,y:t.y+(o.y-t.y)*i}))}function HC(e,t,n,i,o,r,l){let c=Math.abs(t),d=Math.abs(n);if(!c||!d||e.x===l.x&&e.y===l.y)return[{c1:gn(e),c2:gn(l),p:gn(l)}];const u=i*Math.PI/180,p=Math.cos(u),y=Math.sin(u),x=(e.x-l.x)/2,m=(e.y-l.y)/2,f=p*x+y*m,S=-y*x+p*m,w=f*f/(c*c)+S*S/(d*d);if(w>1){const K=Math.sqrt(w);c*=K,d*=K}const N=o===r?-1:1,v=c*c*S*S+d*d*f*f,M=Math.max(0,c*c*d*d-v),R=v===0?0:N*Math.sqrt(M/v),U=R*c*S/d,X=-R*d*f/c,D=p*U-y*X+(e.x+l.x)/2,_=y*U+p*X+(e.y+l.y)/2,W=Math.atan2((S-X)/d,(f-U)/c);let C=Math.atan2((-S-X)/d,(-f-U)/c)-W;!r&&C>0&&(C-=Math.PI*2),r&&C<0&&(C+=Math.PI*2);const q=Math.max(1,Math.ceil(Math.abs(C)/(Math.PI/2))),E=C/q,$=4/3*Math.tan(E/4),I=(K,P)=>({x:D+p*c*K-y*d*P,y:_+y*c*K+p*d*P}),j=[];let F=W;for(let K=0;K<q;K+=1){const P=F+E,h=Math.cos(F),J=Math.sin(F),V=Math.cos(P),he=Math.sin(P);j.push({c1:I(h-$*J,J+$*h),c2:I(V+$*he,he-$*V),p:K===q-1?gn(l):I(V,he)}),F=P}return j}function ki(e){const t=(e??"").trim();if(!t)return[];const n=[];let i=[],o=!1,r={x:0,y:0},l={x:0,y:0},c=null,d=null;const u=()=>{if(o&&i.length>2){const m=i[0],f=i[i.length-1];Math.abs(m.p.x-f.p.x)<1e-6&&Math.abs(m.p.y-f.p.y)<1e-6&&(m.in=f.in??m.in,i.pop())}i.length>1&&n.push({nodes:i,closed:o}),i=[],o=!1},p=(m,f)=>{i.push({p:m,in:Un(f??null,m),out:null}),r=m},y=m=>{if(!i.length)return;const f=i[i.length-1];f.out=Un(m,f.p)};Rs.lastIndex=0;let x=Rs.exec(t);for(;x!==null;){const m=x[1],f=m.toUpperCase(),S=m!==f,w=NC(x[2]),N=v=>S?{x:r.x+w[v],y:r.y+w[v+1]}:{x:w[v],y:w[v+1]};if(f==="Z")o=!0,u(),r=gn(l),c=null,d=null;else if(f==="M"){for(let v=0;v+1<w.length;v+=2){const M=N(v);v===0&&(u(),l=gn(M)),p(M)}c=null,d=null}else if(f==="L"){for(let v=0;v+1<w.length;v+=2)p(N(v));c=null,d=null}else if(f==="H"){for(const v of w)p({x:S?r.x+v:v,y:r.y});c=null,d=null}else if(f==="V"){for(const v of w)p({x:r.x,y:S?r.y+v:v});c=null,d=null}else if(f==="C"){for(let v=0;v+5<w.length;v+=6){const M=N(v),R=N(v+2),U=N(v+4);y(M),p(U,R),c=R}d=null}else if(f==="S"){for(let v=0;v+3<w.length;v+=4){const M=c?tl(c,r):gn(r),R=N(v),U=N(v+2);y(M),p(U,R),c=R}d=null}else if(f==="Q")for(let v=0;v+3<w.length;v+=4){const M=N(v),R=N(v+2);y(Ln(r,M,2/3)),p(R,Ln(R,M,2/3)),d=M,c=null}else if(f==="T")for(let v=0;v+1<w.length;v+=2){const M=d?tl(d,r):gn(r),R=N(v);y(Ln(r,M,2/3)),p(R,Ln(R,M,2/3)),d=M,c=null}else if(f==="A")for(let v=0;v+6<w.length;v+=7){const M=S?{x:r.x+w[v+5],y:r.y+w[v+6]}:{x:w[v+5],y:w[v+6]};for(const R of HC(r,w[v],w[v+1],w[v+2],w[v+3]!==0,w[v+4]!==0,M))y(R.c1),p(R.p,R.c2);c=null,d=null}x=Rs.exec(t)}return u(),n}function Bn(e){return`${Number(e.toFixed(2))}`}function Un(e,t){return!e||Math.abs(e.x-t.x)<1e-6&&Math.abs(e.y-t.y)<1e-6?null:e}function Bp(e){return!!(Un(e.in,e.p)||Un(e.out,e.p))}function Vo(e,t){return!Un(e.out,e.p)&&!Un(t.in,t.p)}function Xd(e,t){if(Vo(e,t))return`L${Bn(t.p.x)},${Bn(t.p.y)}`;const n=Un(e.out,e.p)??e.p,i=Un(t.in,t.p)??t.p;return`C${Bn(n.x)},${Bn(n.y)} ${Bn(i.x)},${Bn(i.y)} ${Bn(t.p.x)},${Bn(t.p.y)}`}function Ho(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const[i,...o]=n.nodes;t.push(`M${Bn(i.p.x)},${Bn(i.p.y)}`);let r=i;for(const l of o)t.push(Xd(r,l)),r=l;if(n.closed){const l=Xd(r,i);l.charAt(0)==="C"&&t.push(l),t.push("Z")}}return t.join(" ")}function jp(e){const t=[];for(let n=0;n+1<e.nodes.length;n+=1)t.push({from:e.nodes[n],to:e.nodes[n+1],index:n});if(e.closed&&e.nodes.length>2){const n=e.nodes.length-1;t.push({from:e.nodes[n],to:e.nodes[0],index:n})}return t}function nl(e,t,n){if(Vo(e,t))return Ln(e.p,t.p,n);const i=e.out??e.p,o=t.in??t.p,r=1-n,l=r*r*r,c=3*r*r*n,d=3*r*n*n,u=n*n*n;return{x:l*e.p.x+c*i.x+d*o.x+u*t.p.x,y:l*e.p.y+c*i.y+d*o.y+u*t.p.y}}function $r(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const i=[];for(const o of jp(n)){if(Vo(o.from,o.to)){i.push(gn(o.from.p));continue}for(let r=0;r<Js;r+=1)i.push(nl(o.from,o.to,r/Js))}n.closed||i.push(gn(n.nodes[n.nodes.length-1].p)),i.length>2&&t.push(i)}return t}function Li(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const r of $r(e))for(const l of r)l.x<t&&(t=l.x),l.x>i&&(i=l.x),l.y<n&&(n=l.y),l.y>o&&(o=l.y);return{minX:t,minY:n,maxX:i,maxY:o}}function WC(e){const t=Li(e);return!isFinite(t.minX)||!isFinite(t.maxX)||!isFinite(t.minY)||!isFinite(t.maxY)?null:{x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2}}function Vp(e,t,n){const i={x:(n.x-e.x)/6,y:(n.y-e.y)/6};return{in:{x:t.x-i.x,y:t.y-i.y},out:{x:t.x+i.x,y:t.y+i.y}}}function Gp(e){return e.filter(t=>t.length>2).map(t=>{if(t.length<=IC)return{closed:!0,nodes:t.map(r=>({p:gn(r),in:null,out:null}))};const n=Math.max(1,Math.round(t.length/LC)),i=[];for(let r=0;r<t.length;r+=n)i.push(t[r]);const o=i.length;return{closed:!0,nodes:i.map((r,l)=>({p:gn(r),...Vp(i[(l-1+o)%o],r,i[(l+1)%o])}))}})}function Xp(e,t,n=1){if(!e.length)return!1;const i=Li(e);if(!isFinite(i.minX)||!isFinite(i.maxX))return!1;const o=i.maxX-i.minX,r=i.maxY-i.minY;if(o<=t.width*2.5&&r<=t.height*2.5)return!1;const l=Math.max(n,t.width*.5),c=Math.max(n,t.height*.5);return i.minX<t.x-l||i.minY<t.y-c||i.maxX>t.x+t.width+l||i.maxY>t.y+t.height+c}function OC(e,t,n,i,o,r,l){const c=t.width>0?n.width/t.width:1,d=t.height>0?n.height/t.height:1;return!(r>0)||!(l>0)||!(c>0)||!(d>0)?e:un(e,u=>{const p=i+(u.x-t.x)*r,y=o+(u.y-t.y)*l;return{x:t.x+p/c,y:t.y+y/d}})}function DC(e,t){if(!e.length)return e;const n=Li(e),i=n.maxX-n.minX,o=n.maxY-n.minY;if(!(i>0)||!(o>0)||n.minX>=t.x-1e-6&&n.minY>=t.y-1e-6&&n.maxX<=t.x+t.width+1e-6&&n.maxY<=t.y+t.height+1e-6)return e;const l=Math.min(t.width/i,t.height/o),c=t.x+(t.width-i*l)/2,d=t.y+(t.height-o*l)/2;return un(e,u=>({x:c+(u.x-n.minX)*l,y:d+(u.y-n.minY)*l}))}function Up(e){const t={x:0,y:0,width:La,height:La},n=e!=="custom"?Kl[e]:void 0,i=n?un(ki(n),r=>({x:r.x/100*t.width+t.x,y:r.y/100*t.height+t.y})):un(Gp(el("rectangle")),r=>({x:r.x*t.width+t.x,y:r.y*t.height+t.y})),o=DC(i,t);return{shape:e,customPath:Ho(o),pathFit:"viewbox",pathViewBox:Zs}}function ta(e,t){return t>0?Math.round(e/t)*t:e}function zC(e,t,n,i){var u;const o=(u=e[t])==null?void 0:u.nodes[n];if(!o)return e;const r=i.x-o.p.x,l=i.y-o.p.y,c=Vn(e),d=c[t].nodes[n];return d.p={x:o.p.x+r,y:o.p.y+l},d.in&&(d.in={x:d.in.x+r,y:d.in.y+l}),d.out&&(d.out={x:d.out.x+r,y:d.out.y+l}),c}function Ud(e,t,n,i){var r;if(!t.length)return e;const o=Vn(e);for(const{contour:l,node:c}of t){const d=(r=o[l])==null?void 0:r.nodes[c];d&&(d.p={x:d.p.x+n,y:d.p.y+i},d.in&&(d.in={x:d.in.x+n,y:d.in.y+i}),d.out&&(d.out={x:d.out.x+n,y:d.out.y+i}))}return o}function BC(e,t){const n=new Map;for(const{contour:o,node:r}of t){const l=n.get(o)??[];l.push(r),n.set(o,l)}let i=e;return n.forEach((o,r)=>{const l=[...o].sort((c,d)=>d-c);for(const c of l)i=qp(i,r,c)}),i}function jC(e,t,n,i,o,r){var u;if(!((u=e[t])==null?void 0:u.nodes[n]))return e;const c=Vn(e),d=c[t].nodes[n];if(d[i]=gn(o),r){const p=i==="in"?"out":"in";d[p]=tl(o,d.p)}return c}function VC(e,t,n,i){var l;const o=(l=e[t])==null?void 0:l.nodes[n];if(!o||!o[i])return e;const r=Vn(e);return r[t].nodes[n][i]=null,r}function GC(e,t,n,i){const o=e[t];if(!o)return{contours:e,nodeIndex:-1};const r=o.nodes[n],l=o.nodes[(n+1)%o.nodes.length];if(!r||!l)return{contours:e,nodeIndex:-1};const c=Vn(e),d=c[t].nodes,u=n+1;if(Vo(r,l))return d.splice(u,0,{p:Ln(r.p,l.p,i),in:null,out:null}),{contours:c,nodeIndex:u};const p=r.out??r.p,y=l.in??l.p,x=Ln(r.p,p,i),m=Ln(p,y,i),f=Ln(y,l.p,i),S=Ln(x,m,i),w=Ln(m,f,i),N=Ln(S,w,i),v=(n+1)%o.nodes.length;return d[n].out=x,d[v].in=f,d.splice(u,0,{p:N,in:S,out:w}),{contours:c,nodeIndex:u}}function qp(e,t,n){const i=e[t];if(!i||i.nodes.length<=3)return e;const o=Vn(e);return o[t].nodes.splice(n,1),o}function qd(e,t,n){const i=e[t];if(!(i==null?void 0:i.nodes[n]))return e;const r=Vn(e),l=r[t].nodes,c=l[n],d=l.length,u=(n-1+d)%d,p=(n+1)%d,y=!!Un(l[u].out,l[u].p),x=!!Un(l[p].in,l[p].p);if(Bp(c)||y||x)return c.in=null,c.out=null,l[u].out=null,l[p].in=null,r;const m=Vp(l[u].p,c.p,l[p].p);return c.in=m.in,c.out=m.out,r}function XC(e,t,n){const i=n.x-t.x,o=n.y-t.y,r=i*i+o*o,l=r===0?0:Math.max(0,Math.min(1,((e.x-t.x)*i+(e.y-t.y)*o)/r)),c={x:t.x+i*l,y:t.y+o*l};return{t:l,distance:Math.hypot(e.x-c.x,e.y-c.y),point:c}}function Kd(e,t){let n=null;return e.forEach((i,o)=>{for(const r of jp(i)){const l=Vo(r.from,r.to)?1:Js;for(let c=0;c<l;c+=1){const d=c/l,u=(c+1)/l,p=XC(t,nl(r.from,r.to,d),nl(r.from,r.to,u));(!n||p.distance<n.distance)&&(n={contour:o,segment:r.index,t:d+(u-d)*p.t,distance:p.distance,point:p.point})}}}),n}function UC(e,t){const n=[];return e.forEach((i,o)=>{i.nodes.forEach((r,l)=>{o===t.contour&&l===t.node||n.push(r.p)})}),n}function Yd(e,t,n){const i=t.filter((r,l)=>isFinite(r)&&t.findIndex(c=>Math.abs(c-r)<1e-6)===l),o=i.map(r=>({value:r,axis:r,from:null}));for(const r of e)o.push({value:r[n],axis:null,from:r});for(const r of i)for(const l of e)o.push({value:r*2-l[n],axis:r,from:l});return o}function Qd(e,t,n,i,o){const r=i(t)[n];let l=null,c=1/0;for(const d of e){const u=n==="x"?{x:d.value,y:t.y}:{x:t.x,y:d.value},p=Math.abs(i(u)[n]-r);p>o||l&&p>=c||(l=d,c=p)}return l}function qC(e,t){return e.length===t.length&&e.every((n,i)=>n.kind===t[i].kind&&n.a.x===t[i].a.x&&n.a.y===t[i].a.y&&n.b.x===t[i].b.x&&n.b.y===t[i].b.y)}function KC(e){const t=Math.PI*2;return((e+Math.PI)%t+t)%t-Math.PI}function il(e,t){const n=t.x-e.x,i=t.y-e.y,o=Math.hypot(n,i);return o<1e-6?null:{x:n/o,y:i/o}}function YC(e,t){const n=il(e,t);return n?{kind:"align",a:{x:e.x-n.x*fo,y:e.y-n.y*fo},b:{x:t.x+n.x*fo,y:t.y+n.y*fo}}:{kind:"align",a:e,b:t}}function ol(e,t,n){return t==="x"?{kind:"center",a:{x:e,y:0},b:{x:e,y:n.height}}:{kind:"center",a:{x:0,y:e},b:{x:n.width,y:e}}}function Zd(e,t,n,i,o){if(e.axis===null)return YC(n,o(e.from??n));const r=t==="x"?{x:e.axis,y:0}:{x:0,y:e.axis};return ol(o(r)[t],t,i)}function QC(e,t,n,i,o){const r=[],l=o(e);return t&&e.x===t.value&&r.push(Zd(t,"x",l,i,o)),n&&e.y===n.value&&r.push(Zd(n,"y",l,i,o)),r}function ZC(e,t,n,i){const o=e==null?void 0:e.nodes[t];if(!e||!o)return null;const r=i(o.p),l=n==="in"?o.out:o.in;if(l)return il(i(l),r);const c=e.nodes.length,d=t+(n==="in"?1:-1);if(!e.closed&&(d<0||d>=c))return null;const u=e.nodes[(d+c)%c];if(!u)return null;const p=(n==="in"?u.in:u.out)??u.p;return il(i(p),r)}function JC(e,t,n,i,o,r,l){const c=r(t),d=r(e),u=d.x-c.x,p=d.y-c.y,y=Math.hypot(u,p);if(y<1e-6)return{point:e,guides:yo};const x=Math.atan2(p,u),m=Math.round(x/Bd)*Bd;let f=o?m:null,S=!1;if(!o){const X=[];n&&X.push({angle:Math.atan2(n.y,n.x),smooth:!0}),X.push({angle:m,smooth:!1});for(const D of X){const _=KC(D.angle-x);if(!(Math.abs(_)>RC)&&!(Math.abs(Math.sin(_))*y>PC)){f=D.angle,S=D.smooth;break}}}const w=i!==null&&i>0&&Math.abs(y-i)<=EC;if(f===null&&!w)return{point:e,guides:yo};const N=f??x,v=w?i:y,M={x:Math.cos(N),y:Math.sin(N)},R=v+(f===null?0:fo),U=w?v:S?fo:0;return{point:l({x:c.x+M.x*v,y:c.y+M.y*v}),guides:[{kind:"angle",a:{x:c.x-M.x*U,y:c.y-M.y*U},b:{x:c.x+M.x*R,y:c.y+M.y*R}}]}}const rl=.1,al=8,eT=4,Jd=10,Ma=(e,t)=>{switch(t){case"nw":return{x:e.minX,y:e.minY};case"ne":return{x:e.maxX,y:e.minY};case"se":return{x:e.maxX,y:e.maxY};case"sw":return{x:e.minX,y:e.maxY}}},Kp=e=>{switch(e){case"nw":return"se";case"ne":return"sw";case"se":return"nw";case"sw":return"ne"}},sl=(e,t)=>{const n=Ma(e,t),i=t==="nw"||t==="sw"?-1:1,o=t==="nw"||t==="ne"?-1:1;return{x:n.x+i*Jd,y:n.y+o*Jd}},ll=(e,t)=>!(t.width>0)||!(t.height>0)||!(e.width>0)||!(e.height>0)?1:Math.max(e.width/t.width,e.height/t.height),Ui=(e,t,n)=>{const i=ll(e,t)*n;return{width:t.width*i,height:t.height*i}},jn=(e,t,n)=>(e-t)*n,vo=(e,t,n,i)=>{const o=e-t;if(Math.abs(o)<1e-6)return .5;const r=n/o;return(i==null?void 0:i.clamp)===!1?r:Math.abs(o)<eT?.5:Ia(r)},tT=(e,t,n,i,o,r)=>{const l=Ui(e,n,r),c=e.x+jn(e.width,l.width,i),d=e.y+jn(e.height,l.height,o),u=ll(e,n),p=ll(t,n),y=Math.min(al,Math.max(rl,p>0?r*(u/p):r)),x=Ui(t,n,y);return{focalX:vo(t.width,x.width,c-t.x,{clamp:!1}),focalY:vo(t.height,x.height,d-t.y,{clamp:!1}),scale:y}},nT=6,iT=3,oT=2,ks="­",rT=new RegExp("\\p{L}","gu"),eu=20,aT={arb:"ar",azj:"az",bel:"be",bos:"bs",bul:"bg",ces:"cs",deu:"de",eng:"en",fas:"fa",fra:"fr",hau:"ha",hin:"hi",hrv:"hr",hun:"hu",ibo:"ig",ind:"id",ita:"it",jav:"jv",kaz:"kk",kin:"rw",lin:"ln",mar:"mr",nep:"ne",nld:"nl",nya:"ny",pol:"pl",por:"pt",ron:"ro",run:"rn",rus:"ru",som:"so",spa:"es",srp:"sr",sun:"su",swe:"sv",swh:"sw",tgl:"tl",tur:"tr",ukr:"uk",urd:"ur",uzn:"uz",vie:"vi",yor:"yo",zlm:"ms",zul:"zu"},cl={be:()=>Promise.resolve().then(()=>require("./index-B1vNL0m-.js")).then(e=>e.index),bg:()=>Promise.resolve().then(()=>require("./index-kFrlcZxC.js")).then(e=>e.index),cs:()=>Promise.resolve().then(()=>require("./index-B6E31HBG.js")).then(e=>e.index),de:()=>Promise.resolve().then(()=>require("./index-CNFsG2yO.js")).then(e=>e.index),en:()=>Promise.resolve().then(()=>require("./index-x_p4zv7D.js")).then(e=>e.index),"en-gb":()=>Promise.resolve().then(()=>require("./index-BkmSPu6z.js")).then(e=>e.index),es:()=>Promise.resolve().then(()=>require("./index-CADju5Cy.js")).then(e=>e.index),fr:()=>Promise.resolve().then(()=>require("./index-Rwqfce2n.js")).then(e=>e.index),hi:()=>Promise.resolve().then(()=>require("./index-HhE2sJlU.js")).then(e=>e.index),hr:()=>Promise.resolve().then(()=>require("./index-DapMA5nM.js")).then(e=>e.index),hu:()=>Promise.resolve().then(()=>require("./index-kjKI70JX.js")).then(e=>e.index),id:()=>Promise.resolve().then(()=>require("./index-BlAuAthm.js")).then(e=>e.index),it:()=>Promise.resolve().then(()=>require("./index-BK-G0i5L.js")).then(e=>e.index),mr:()=>Promise.resolve().then(()=>require("./index-CIgabTwE.js")).then(e=>e.index),nl:()=>Promise.resolve().then(()=>require("./index-BrL2zv3x.js")).then(e=>e.index),pl:()=>Promise.resolve().then(()=>require("./index-DehKWXGA.js")).then(e=>e.index),pt:()=>Promise.resolve().then(()=>require("./index-C0cxTf5o.js")).then(e=>e.index),ro:()=>Promise.resolve().then(()=>require("./index-CJ0NMfJ3.js")).then(e=>e.index),ru:()=>Promise.resolve().then(()=>require("./index-gBhj9Tcu.js")).then(e=>e.index),sr:()=>Promise.resolve().then(()=>require("./index-1HMblVmZ.js")).then(e=>e.index),sv:()=>Promise.resolve().then(()=>require("./index-CDO1-R3j.js")).then(e=>e.index),tr:()=>Promise.resolve().then(()=>require("./index-CG_43X7q.js")).then(e=>e.index),uk:()=>Promise.resolve().then(()=>require("./index-Ypt3vHbi.js")).then(e=>e.index)},sT=(e,t)=>{const n=e;return t(n)??t(n.default)??null};let tu=null;const lT=()=>(tu??(tu=Promise.resolve().then(()=>require("./index-2JTNRDR1.js")).then(e=>e.franc).catch(()=>null)),tu),nu=new Map,cT=e=>{let t=nu.get(e);return t||(t=cl[e]().then(n=>sT(n,i=>i==null?void 0:i.hyphenateSync)).catch(()=>null),nu.set(e,t)),t},iu=e=>{if(!e)return null;const t=e.toLowerCase();if(cl[t])return t;const n=t.split("-")[0];return cl[n]?n:null},dT=(e,t)=>{const n=t.trim();if(n.length<eu)return;const i=e(n,{minLength:eu});if(i!=="und")return aT[i]??i},uT={hyphenateSync:null};function pT(e,t){const[n,i]=s.useState(null);return s.useEffect(()=>{if(!e)return;let o=!1;return lT().then(async r=>{const l=r?dT(r,t):void 0,c=typeof document<"u"?document.documentElement.lang:"",d=iu(l)??iu(c)??"en",u=await cT(d);o||i({lang:l,hyphenateSync:u})}),()=>{o=!0}},[e,t]),e&&n?n:uT}const ou=e=>{var t;return((t=e.match(rT))==null?void 0:t.length)??0};function mT(e,t){if(e.length<2||e.includes(ks))return;const n=new Set;if(t){const o=t(e,{hyphenChar:ks,minWordLength:nT});let r=0;for(let l=0;l<o.length;l+=1)o[l]===ks?n.add(r):r+=1}for(let o=1;o<e.length-1;o+=1)e[o-1]==="-"&&n.add(o);const i=[...n].filter(o=>{const r=e[o-1]==="-";return o>0&&o<e.length&&ou(e.slice(0,o))>=(r?1:iT)&&ou(e.slice(o))>=(r?1:oT)}).sort((o,r)=>o-r);return i.length?i:void 0}const ru=1.08,na=14,ia=8;function gT({P:e,box:t,bounds:n,natural:i,imageUrl:o,maskPath:r,stage:l,onStageChange:c,focalX:d,focalY:u,scale:p,onChange:y,onCommit:x}){const m=s.useRef(null),f=`pretext-image-ghost-${s.useId().replace(/:/g,"")}`,S=s.useRef(null),w=s.useRef(null),N=s.useRef({focalX:d,focalY:u,scale:p});N.current={focalX:d,focalY:u,scale:p};const v=l==="image";s.useEffect(()=>{var E;v&&((E=m.current)==null||E.focus({preventScroll:!0}))},[v]);const M=s.useCallback((E,$)=>{var j;const I=(j=m.current)==null?void 0:j.getBoundingClientRect();return!I||I.width<=0||I.height<=0?{x:0,y:0}:{x:(E-I.left)/I.width*t.width,y:($-I.top)/I.height*t.height}},[t.width,t.height]),R=E=>{var I,j;if(!i)return;E.stopPropagation(),E.preventDefault(),(I=m.current)==null||I.focus({preventScroll:!0});const $=Ui(n,i,p);S.current={pointerId:E.pointerId,origin:M(E.clientX,E.clientY),startX:jn(n.width,$.width,d),startY:jn(n.height,$.height,u),width:$.width,height:$.height,moved:!1},(j=m.current)==null||j.setPointerCapture(E.pointerId)},U=(E,$)=>{var V,he;if(!i)return;E.stopPropagation(),E.preventDefault(),(V=m.current)==null||V.focus({preventScroll:!0});const I=Ui(n,i,p),j=jn(n.width,I.width,d),F=jn(n.height,I.height,u),K={minX:j,minY:F,maxX:j+I.width,maxY:F+I.height},P=Ma(K,Kp($)),h=Ma(K,$),J=Math.hypot(h.x-P.x,h.y-P.y);!isFinite(J)||J<=0||(w.current={pointerId:E.pointerId,anchor:P,startDistance:J,startScale:p,startX:j,startY:F,moved:!1},(he=m.current)==null||he.setPointerCapture(E.pointerId))},X=E=>{if(!i)return;const $=w.current;if($&&E.pointerId===$.pointerId){E.stopPropagation(),E.preventDefault();const j=M(E.clientX,E.clientY),F={x:j.x-n.x,y:j.y-n.y},K=Math.hypot(F.x-$.anchor.x,F.y-$.anchor.y),P=Math.min(al,Math.max(rl,$.startScale*(K/$.startDistance)));if(!$.moved&&Math.abs(P-$.startScale)<1e-4)return;$.moved=!0;const h=P/$.startScale,J=$.anchor.x+($.startX-$.anchor.x)*h,V=$.anchor.y+($.startY-$.anchor.y)*h,he=Ui(n,i,P);y({focalX:vo(n.width,he.width,J),focalY:vo(n.height,he.height,V),scale:P});return}const I=S.current;if(I&&E.pointerId===I.pointerId){E.stopPropagation(),E.preventDefault();const j=M(E.clientX,E.clientY),F=j.x-I.origin.x,K=j.y-I.origin.y;if(!I.moved&&F===0&&K===0)return;I.moved=!0,y({focalX:vo(n.width,I.width,I.startX+F),focalY:vo(n.height,I.height,I.startY+K),scale:p})}},D=E=>{var j,F;const $=S.current;if($&&E.pointerId===$.pointerId){S.current=null,E.stopPropagation(),(j=m.current)!=null&&j.hasPointerCapture($.pointerId)&&m.current.releasePointerCapture($.pointerId),$.moved&&x(N.current);return}const I=w.current;I&&E.pointerId===I.pointerId&&(w.current=null,E.stopPropagation(),(F=m.current)!=null&&F.hasPointerCapture(I.pointerId)&&m.current.releasePointerCapture(I.pointerId),I.moved&&x(N.current))},_=E=>{if(E.key==="Escape"){E.stopPropagation(),c("none");return}if(E.key==="="||E.key==="+"||E.key==="-"||E.key==="_"){E.preventDefault(),E.stopPropagation();const $=E.key==="="||E.key==="+",I=Math.min(al,Math.max(rl,p*($?ru:1/ru))),j={focalX:d,focalY:u,scale:I};y(j),x(j)}},W=["nw","ne","se","sw"],T={minX:n.x,minY:n.y,maxX:n.x+n.width,maxY:n.y+n.height},C=s.useMemo(()=>{const E=i??{width:n.width,height:n.height},$=Ui(n,E,p);return!($.width>0)||!($.height>0)?null:{x:n.x+jn(n.width,$.width,d),y:n.y+jn(n.height,$.height,u),width:$.width,height:$.height}},[i,n.x,n.y,n.width,n.height,d,u,p]),q=C?{minX:C.x,minY:C.y,maxX:C.x+C.width,maxY:C.y+C.height}:T;return a.jsxs("svg",{ref:m,className:`${e}-editor${v?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:_,onPointerMove:X,onPointerUp:D,onPointerCancel:D,onLostPointerCapture:D,"data-pretext-image-editor":!0,children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>c("none")}),v&&o&&C&&r&&a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsxs("mask",{id:f,maskUnits:"userSpaceOnUse",x:C.x,y:C.y,width:C.width,height:C.height,children:[a.jsx("rect",{x:C.x,y:C.y,width:C.width,height:C.height,fill:"#FFFFFF"}),a.jsx("path",{d:r,fillRule:"evenodd",fill:"#000000"})]})}),a.jsx("image",{className:`${e}-editor-ghost`,href:o??void 0,x:C.x,y:C.y,width:C.width,height:C.height,preserveAspectRatio:"none",mask:`url(#${f})`}),a.jsx("rect",{className:`${e}-editor-image-bounds`,x:C.x,y:C.y,width:C.width,height:C.height})]}),v&&a.jsxs(a.Fragment,{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:n.x,y:n.y,width:n.width,height:n.height}),a.jsx("rect",{className:`${e}-editor-body`,x:n.x,y:n.y,width:n.width,height:n.height,onPointerDown:R}),W.map(E=>{const $=sl(q,E),I=E==="ne"||E==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:$.x-ia/2,y:$.y-ia/2,width:ia,height:ia}),a.jsx("rect",{className:`${e}-editor-scale-grab${I?` ${e}-editor-scale-grab-nesw`:""}`,x:$.x-na/2,y:$.y-na/2,width:na,height:na,onPointerDown:j=>U(j,E)})]},E)})]})]})}const dl=10,hT=dl*2,zn=7,fT=4,lo=9,yT=3.5,au=1.08,vT=.05,oa=14,xT=1,ra=14,aa=8;function bT({P:e,box:t,viewBox:n,contours:i,snap:o,stretchToBox:r,uniformStretch:l=!1,stage:c,onStageChange:d,onSelectionChange:u,onChange:p,onCommit:y}){const x=s.useRef(null),m=s.useRef(null),f=s.useRef(i);f.current=i;const S=s.useRef(null),w=s.useRef(null),N=s.useRef(null),v=s.useRef(null),[M,R]=s.useState([]),[U,X]=s.useState(yo),[D,_]=s.useState(null),W=s.useCallback(g=>{X(Y=>qC(Y,g)?Y:g)},[]),T=c==="shape";s.useEffect(()=>{var g;T&&((g=x.current)==null||g.focus({preventScroll:!0}))},[T]),s.useEffect(()=>{T||R(g=>g.length?[]:g)},[T]);const C=M.length>0;s.useEffect(()=>{u==null||u(C)},[C,u]),s.useEffect(()=>()=>u==null?void 0:u(!1),[u]);const q=n.width>0?t.width/n.width:1,E=n.height>0?t.height/n.height:1,$=Math.min(q,E),I=r&&l?$:q,j=r&&l?$:E,F=r&&l?(t.width-n.width*$)/2:0,K=r&&l?(t.height-n.height*$)/2:0,P=s.useCallback(g=>r?{x:F+(g.x-n.x)*I,y:K+(g.y-n.y)*j}:{x:g.x-n.x,y:g.y-n.y},[r,n,I,j,F,K]),h=s.useCallback(g=>r?{x:n.x+(I>0?(g.x-F)/I:0),y:n.y+(j>0?(g.y-K)/j:0)}:{x:n.x+g.x,y:n.y+g.y},[r,n,I,j,F,K]),J=s.useMemo(()=>h({x:t.width/2,y:t.height/2}),[h,t.width,t.height]),V=s.useCallback((g,Y)=>{var ae;const ee=(ae=x.current)==null?void 0:ae.getBoundingClientRect();if(!ee||ee.width<=0||ee.height<=0)return{x:0,y:0};if(r){const ye=(g-ee.left)/ee.width*t.width,ne=(Y-ee.top)/ee.height*t.height;return{x:n.x+(I>0?(ye-F)/I:0),y:n.y+(j>0?(ne-K)/j:0)}}return{x:n.x+(g-ee.left),y:n.y+(Y-ee.top)}},[r,n,t.width,t.height,I,j,F,K]),he=s.useCallback((g,Y)=>{var ae;const ee=(ae=x.current)==null?void 0:ae.getBoundingClientRect();return!ee||ee.width<=0||ee.height<=0?{x:0,y:0}:{x:(g-ee.left)/ee.width*t.width,y:(Y-ee.top)/ee.height*t.height}},[t.width,t.height]),k=s.useCallback((g,Y)=>{const ee=l&&!(Y!=null&&Y.preserveShape)?OC(g,n,t,F,K,I,j):g;y(ee,Y)},[y,l,n,t,F,K,I,j]),ce=s.useCallback(()=>{_(null)},[]),L=s.useCallback((g,Y,ee)=>{if(!ee||S.current||w.current||N.current||v.current){ce();return}const ae=he(g,Y),ye=un(f.current,P);for(const H of ye)for(const be of H.nodes)if(Math.hypot(be.p.x-ae.x,be.p.y-ae.y)<=lo){ce();return}const ne=Kd(ye,ae);if(!ne||ne.distance>dl){ce();return}const B=ye[ne.contour],G=B==null?void 0:B.nodes[ne.segment],z=B==null?void 0:B.nodes[(ne.segment+1)%((B==null?void 0:B.nodes.length)??1)],ie=!!(G&&z&&!Vo(G,z));_(H=>H&&H.curved===ie&&Math.hypot(H.point.x-ne.point.x,H.point.y-ne.point.y)<.25?H:{point:ne.point,curved:ie})},[he,P,ce]),me=g=>{var Ae;const Y=g.metaKey||g.ctrlKey,ee=N.current;if(ee&&g.pointerId===ee.pointerId){if(g.stopPropagation(),g.preventDefault(),ee.startDistance<=0)return;const He=V(g.clientX,g.clientY),Xe=Math.hypot(He.x-ee.origin.x,He.y-ee.origin.y),Ue=Math.max(vT,Xe/ee.startDistance);if(!ee.moved&&Math.abs(Ue-1)<1e-4)return;ee.moved=!0,p(Gd(ee.startContours,ee.origin,Ue));return}const ae=w.current;if(ae&&g.pointerId===ae.pointerId){g.stopPropagation(),g.preventDefault();const He=V(g.clientX,g.clientY),{bbox:Xe}=ae,Ue=Xe.maxX-Xe.minX,Je=Xe.maxY-Xe.minY,je=He.x-ae.origin.x,xe=He.y-ae.origin.y;let Ie=je,ze=xe;if(isFinite(Ue)&&isFinite(Je))if(r){let tt=n.x,ot=n.x+n.width,lt=n.y,it=n.y+n.height;l&&(I>0&&(tt=n.x+(0-F)/I,ot=n.x+(t.width-F)/I),j>0&&(lt=n.y+(0-K)/j,it=n.y+(t.height-K)/j));const xt=Math.min(tt,ot-Ue),rt=Math.max(tt,ot-Ue),_e=Math.min(lt,it-Je),We=Math.max(lt,it-Je),vt=Math.min(rt,Math.max(xt,Xe.minX+je)),Ve=Math.min(We,Math.max(_e,Xe.minY+xe));Ie=vt-Xe.minX,ze=Ve-Xe.minY}else{const tt=Xe.minX-n.x,ot=Xe.minY-n.y,lt=Math.min(0,t.width-Ue),it=Math.max(0,t.width-Ue),xt=Math.min(0,t.height-Je),rt=Math.max(0,t.height-Je),_e=Math.min(it,Math.max(lt,tt+je)),We=Math.min(rt,Math.max(xt,ot+xe));Ie=_e-tt,ze=We-ot}const Ze=[];if(!Y&&isFinite(Ue)&&isFinite(Je)){const tt=P({x:Xe.minX+Ue/2+Ie,y:Xe.minY+Je/2+ze}),ot={x:t.width/2,y:t.height/2};Math.abs(tt.x-ot.x)<=oa&&(Ie=J.x-Xe.minX-Ue/2,Ze.push(ol(ot.x,"x",t))),Math.abs(tt.y-ot.y)<=oa&&(ze=J.y-Xe.minY-Je/2,Ze.push(ol(ot.y,"y",t)))}if(!ae.moved&&Ie===0&&ze===0)return;ae.moved=!0,W(Ze.length?Ze:yo),p(un(ae.startContours,tt=>({x:tt.x+Ie,y:tt.y+ze})),{carryImage:!0});return}const ye=v.current;if(ye&&g.pointerId===ye.pointerId){g.stopPropagation(),g.preventDefault();const He=V(g.clientX,g.clientY);let Xe=He.x-ye.origin.x,Ue=He.y-ye.origin.y;if(g.shiftKey&&(Math.abs(Xe)>Math.abs(Ue)?Ue=0:Xe=0),!ye.moved&&Xe===0&&Ue===0)return;ye.moved=!0,p(Ud(ye.startContours,ye.selection,Xe,Ue));return}const ne=S.current;if(!ne||g.pointerId!==ne.pointerId){L(g.clientX,g.clientY,M.length>0||T);return}ce(),g.stopPropagation(),g.preventDefault();const B=V(g.clientX,g.clientY);if(ne.kind==="anchor"){const He={x:ne.anchor.x+(B.x-ne.origin.x),y:ne.anchor.y+(B.y-ne.origin.y)},Xe=Y?[]:UC(f.current,{contour:ne.contour,node:ne.node}),Ue=Y||!ne.center?[]:[ne.center],Je=Qd(Yd(Xe,Ue.map(Ie=>Ie.x),"x"),He,"x",P,oa),je=Qd(Yd(Xe,Ue.map(Ie=>Ie.y),"y"),He,"y",P,oa),xe=Y?He:{x:(Je==null?void 0:Je.value)??ta(He.x,o),y:(je==null?void 0:je.value)??ta(He.y,o)};if(g.shiftKey&&(Math.abs(xe.x-ne.anchor.x)>Math.abs(xe.y-ne.anchor.y)?xe.y=ne.anchor.y:xe.x=ne.anchor.x),!ne.moved&&xe.x===ne.anchor.x&&xe.y===ne.anchor.y)return;ne.moved=!0,W(QC(xe,Je,je,t,P)),p(zC(f.current,ne.contour,ne.node,xe));return}const G=(Ae=f.current[ne.contour])==null?void 0:Ae.nodes[ne.node],z=ne.mirror&&!g.altKey,ie=z||Y?null:ne.kind==="in"?G==null?void 0:G.out:G==null?void 0:G.in,H=G?P(G.p):null,be=ie?P(ie):null,re=G&&(!Y||g.shiftKey)?JC(B,G.p,z||Y?null:ZC(f.current[ne.contour],ne.node,ne.kind,P),H&&be?Math.hypot(be.x-H.x,be.y-H.y):null,g.shiftKey,P,h):{point:B,guides:yo},Q=re.guides.length?re.point:Y?B:{x:ta(B.x,o),y:ta(B.y,o)},Pe=ne.kind==="in"?G==null?void 0:G.in:G==null?void 0:G.out;!ne.moved&&Pe&&Q.x===Pe.x&&Q.y===Pe.y||(ne.moved=!0,W(re.guides),p(jC(f.current,ne.contour,ne.node,ne.kind,Q,z)))},te=g=>{W(yo);const Y=N.current;if(Y&&g.pointerId===Y.pointerId){N.current=null,g.stopPropagation();const ie=x.current;ie!=null&&ie.hasPointerCapture(Y.pointerId)&&ie.releasePointerCapture(Y.pointerId),Y.moved&&k(f.current,{preserveShape:!0});return}const ee=w.current;if(ee&&g.pointerId===ee.pointerId){w.current=null,g.stopPropagation();const ie=x.current;ie!=null&&ie.hasPointerCapture(ee.pointerId)&&ie.releasePointerCapture(ee.pointerId),ee.moved?k(f.current,{preserveShape:!0}):R([]);return}const ae=v.current;if(ae&&g.pointerId===ae.pointerId){v.current=null,g.stopPropagation();const ie=x.current;ie!=null&&ie.hasPointerCapture(ae.pointerId)&&ie.releasePointerCapture(ae.pointerId),ae.moved&&k(f.current);return}const ye=S.current;if(!ye||g.pointerId!==ye.pointerId)return;S.current=null,g.stopPropagation();const ne=x.current;ne!=null&&ne.hasPointerCapture(ye.pointerId)&&ne.releasePointerCapture(ye.pointerId);const B=Math.hypot(g.clientX-ye.clientOrigin.x,g.clientY-ye.clientOrigin.y);if(ye.moved||B>fT){ye.moved&&k(f.current);return}if(!ye.toggleOnRelease||g.type!=="pointerup")return;const z=qd(f.current,ye.contour,ye.node);z!==f.current&&(p(z),k(z))},ve=g=>{g.stopPropagation()},Le=g=>{var Y,ee;g.stopPropagation(),g.preventDefault(),ce(),(Y=x.current)==null||Y.focus({preventScroll:!0}),w.current={pointerId:g.pointerId,origin:V(g.clientX,g.clientY),startContours:Vn(i),bbox:Li(i),moved:!1},(ee=x.current)==null||ee.setPointerCapture(g.pointerId)},de=(g,Y)=>{var B,G;g.stopPropagation(),g.preventDefault(),ce(),(B=x.current)==null||B.focus({preventScroll:!0}),R([]),d("shape");const ee=Li(i),ae=Ma(ee,Kp(Y)),ye=sl(ee,Y),ne=Math.hypot(ye.x-ae.x,ye.y-ae.y);!isFinite(ne)||ne<=0||(N.current={pointerId:g.pointerId,corner:Y,origin:ae,startDistance:ne,startContours:Vn(i),moved:!1},(G=x.current)==null||G.setPointerCapture(g.pointerId))},ue=(g,Y,ee,ae)=>{var B,G,z,ie;g.stopPropagation(),g.preventDefault(),ce(),(B=x.current)==null||B.focus({preventScroll:!0});const ye=(G=i[ee])==null?void 0:G.nodes[ae];if(!ye)return;if(g.altKey){const H=Y==="anchor"?qp(i,ee,ae):VC(i,ee,ae,Y);if(H===i)return;R(Y==="anchor"?[]:[{contour:ee,node:ae}]),p(H),k(H);return}const ne=g.metaKey||g.ctrlKey;if(Y==="anchor"&&g.shiftKey&&!ne){R(H=>H.some(be=>be.contour===ee&&be.node===ae)?H.filter(be=>!(be.contour===ee&&be.node===ae)):[...H,{contour:ee,node:ae}]);return}if(Y==="anchor"&&!ne&&M.length>1&&M.some(H=>H.contour===ee&&H.node===ae)){v.current={pointerId:g.pointerId,origin:V(g.clientX,g.clientY),startContours:Vn(i),selection:M,moved:!1},(z=x.current)==null||z.setPointerCapture(g.pointerId);return}R([{contour:ee,node:ae}]),S.current={kind:Y,contour:ee,node:ae,pointerId:g.pointerId,origin:V(g.clientX,g.clientY),clientOrigin:{x:g.clientX,y:g.clientY},anchor:ye.p,center:WC(i),mirror:Y!=="anchor"&&!!(ye.in&&ye.out),toggleOnRelease:ne,moved:!1},(ie=x.current)==null||ie.setPointerCapture(g.pointerId)},Z=g=>{g.stopPropagation(),g.preventDefault(),ce();const Y=un(i,P),ee=Kd(Y,he(g.clientX,g.clientY));if(!ee||ee.distance>dl)return;const{contours:ae,nodeIndex:ye}=GC(i,ee.contour,ee.segment,ee.t);ye<0||(R([{contour:ee.contour,node:ye}]),p(ae),k(ae))},le=g=>{if(g.key==="="||g.key==="+"||g.key==="-"||g.key==="_"){g.preventDefault(),g.stopPropagation();const ne=Li(i);if(!isFinite(ne.minX)||!isFinite(ne.maxX))return;const B={x:(ne.minX+ne.maxX)/2,y:(ne.minY+ne.maxY)/2},z=g.key==="="||g.key==="+"?au:1/au,ie=Gd(i,B,z);p(ie),k(ie,{preserveShape:!0});return}if(g.key==="Escape"){g.stopPropagation(),R([]),d("none");return}if(!M.length)return;if(g.key==="Backspace"||g.key==="Delete"){g.preventDefault(),g.stopPropagation();const ne=BC(i,M);if(ne===i)return;R([]),p(ne),k(ne);return}const Y=o>0?o:xT,ee=g.shiftKey?Y*10:Y,ae={ArrowLeft:[-ee,0],ArrowRight:[ee,0],ArrowUp:[0,-ee],ArrowDown:[0,ee]}[g.key];if(!ae)return;g.preventDefault(),g.stopPropagation();const ye=Ud(i,M,ae[0],ae[1]);p(ye),k(ye)},oe=s.useMemo(()=>Ho(un(i,P)),[i,P]),ge=s.useMemo(()=>Li(i),[i]),Se=P({x:ge.minX,y:ge.minY}),Ee={width:P({x:ge.maxX,y:ge.minY}).x-Se.x,height:P({x:ge.minX,y:ge.maxY}).y-Se.y},Ne=T&&M.length===0&&isFinite(ge.minX)&&isFinite(ge.maxX)&&ge.maxX>ge.minX&&ge.maxY>ge.minY,Te=M.length>0||T,Ce=Te;return a.jsxs("svg",{ref:x,className:`${e}-editor${Te?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:le,onPointerDown:()=>{var g;return(g=x.current)==null?void 0:g.focus({preventScroll:!0})},onPointerMove:me,onPointerLeave:ce,onPointerUp:te,onPointerCancel:te,onLostPointerCapture:te,onContextMenu:g=>{g.preventDefault()},"data-pretext-path-editor":!0,"data-selection":"none",children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>{R([]),d("none")},onClick:Z}),Ce&&a.jsx("path",{className:`${e}-editor-outline`,d:oe}),Ce&&U.map((g,Y)=>a.jsx("line",{className:`${e}-editor-snap ${e}-editor-snap-${g.kind}`,x1:g.a.x,y1:g.a.y,x2:g.b.x,y2:g.b.y},`${g.kind}-${Y}`)),a.jsx("path",{ref:m,className:`${e}-editor-body`,d:oe,fillRule:"evenodd",onPointerDown:Le,onClick:Z}),Ce&&a.jsx("path",{className:`${e}-editor-hit`,d:oe,style:{strokeWidth:hT},onClick:Z}),Ce&&D&&a.jsx("rect",{className:`${e}-editor-add-preview`,x:D.point.x-zn/2,y:D.point.y-zn/2,width:zn,height:zn,rx:D.curved?zn/2:0}),Ce&&i.map((g,Y)=>g.nodes.map((ee,ae)=>{const ye=M.some(B=>B.contour===Y&&B.node===ae),ne=P(ee.p);return a.jsxs("g",{children:[ye&&M.length===1&&["in","out"].map(B=>{const G=ee[B];if(!G)return null;const z=P(G);return a.jsxs("g",{children:[a.jsx("line",{className:`${e}-editor-handle-line`,x1:ne.x,y1:ne.y,x2:z.x,y2:z.y}),a.jsx("circle",{className:`${e}-editor-handle`,cx:z.x,cy:z.y,r:yT}),a.jsx("circle",{className:`${e}-editor-grab`,cx:z.x,cy:z.y,r:lo,onPointerDown:ie=>ue(ie,B,Y,ae),onClick:ve})]},B)}),a.jsx("rect",{className:`${e}-editor-anchor${ye?` ${e}-editor-anchor-selected`:""}`,x:ne.x-zn/2,y:ne.y-zn/2,width:zn,height:zn,rx:Bp(ee)?zn/2:0}),a.jsx("rect",{className:`${e}-editor-grab`,x:ne.x-lo,y:ne.y-lo,width:lo*2,height:lo*2,onPointerDown:B=>ue(B,"anchor",Y,ae),onClick:ve,onDoubleClick:B=>{B.stopPropagation(),B.preventDefault();const G=qd(i,Y,ae);p(G),k(G)}})]},`${Y}-${ae}`)})),Ne&&a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:Se.x,y:Se.y,width:Ee.width,height:Ee.height}),["nw","ne","se","sw"].map(g=>{const Y=P(sl(ge,g)),ee=g==="ne"||g==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:Y.x-aa/2,y:Y.y-aa/2,width:aa,height:aa}),a.jsx("rect",{className:`${e}-editor-scale-grab${ee?` ${e}-editor-scale-grab-nesw`:""}`,x:Y.x-ra/2,y:Y.y-ra/2,width:ra,height:ra,onPointerDown:ae=>de(ae,g),onClick:ve})]},g)})]})]})}const ST=4e3,wT=/^(?:https?:|mailto:|tel:)/i;function Yp(e){return!!e&&typeof e=="object"&&e.type==="link"}function $T(e){if(!e)return;const t=e.replace(/\s+/g,"");if(!(/^[a-z][a-z0-9+.-]*:/i.test(t)&&!wT.test(t)))return t}function CT(e){const t=[];return e.forEach((n,i)=>{const o=(r,l,c)=>{for(const d of r){if(Yp(d)){o(d.children??[],$T(d.value),d.target);continue}const u=d,p=(u==null?void 0:u.text)??"";if(p.trim())for(const y of p.split(/\s+/))y&&t.push({text:y,leaf:u,href:l,target:c,para:i})}};o((n==null?void 0:n.children)??[])}),t}function su(e){return{...e.fontFamily&&{fontFamily:zo(e.fontFamily)},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}function TT(e){return e.map(t=>{const n=[],i=o=>{for(const r of o){if(Yp(r)){i(r.children??[]);continue}n.push((r==null?void 0:r.text)??"")}};return i((t==null?void 0:t.children)??[]),n.join("")})}function IT(e,t,n,i,o){if(t<=0||!e.length||n<=0||i<=0)return e;const r=o==="avoid"?1:-1;return e.map(l=>{if(!l.length)return l;let c=1/0,d=-1/0,u=1/0,p=-1/0;for(const m of l){const f=m.x*n,S=m.y*i;f<c&&(c=f),f>d&&(d=f),S<u&&(u=S),S>p&&(p=S)}const y=(c+d)/2,x=(u+p)/2;return l.map(m=>{const f=m.x*n,S=m.y*i,w=f-y,N=S-x,v=Math.sqrt(w*w+N*N);if(v<1e-6)return m;const R=Math.max(0,v+r*t)/v;return{x:(y+w*R)/n,y:(x+N*R)/i}})})}const LT=.75;function lu(e,t,n,i,o,r){if(e.kind==="fragment"||!t)return null;const l=e.token.text,c=e.offset>0?t[e.offset-1]:0,d=n?n.map(u=>u-e.offset).filter(u=>u>=(e.offset>0?2:1)&&u<l.length):Array.from({length:l.length-1},(u,p)=>p+1);for(let u=d.length-1;u>=0;u-=1){const p=d[u];if(e.offset+p>t.length)continue;const y=!!n&&l[p-1]!=="-",x=t[e.offset+p-1]-c,m=x+(y?r:0);if(!(m*o>i))return{chars:p,fragmentText:y?`${l.slice(0,p)}-`:l.slice(0,p),remainderText:l.slice(p),fragmentWidth:m,remainderWidth:Math.max(0,e.width-x)}}return null}function cu(e){const{tokens:t,widths:n,rings:i,mode:o,align:r,scale:l,width:c,height:d,allowOverflow:u,capInset:p,capLines:y}=e,x=!!e.hyphenate,m=e.charWidths??[],f=e.hyphenPoints??[],S=e.hyphenWidth??0,w=e.lineHeight*l,N=e.spaceWidth*l,v=Math.max(0,e.shapeMargin??0),M=[],R=t.map((P,h)=>({token:P,originalIndex:h,width:n[h],kind:"whole",offset:0}));if(!R.length||c<=0||w<=0)return{segments:M,placed:0,height:0,capLeft:0,capTop:0,renderTokens:t};const U=Math.max(1,N*.5),X=w*yC,D=IT(i,v,c,d,o),_=Math.max(1,Math.floor(e.columns??1)),W=_>1?Math.max(0,e.columnGap??0):0,T=(c-W*(_-1))/_;let C=0,q=0,E=0,$=0,I=0,j=null;const F=(P,h,J)=>TC(D,(P+X)/d,(P+w-X)/d,o).map(V=>({x0:Math.max(h,V.x0*c),x1:Math.min(J,V.x1*c)})).filter(V=>V.x1>V.x0);for(let P=0;P<_&&C<R.length&&T>0;P+=1){const h=P*(T+W),J=h+T,V=u&&P===_-1;let he=0;for(let L=0;L+w<=d;L+=w)for(const me of F(L,h,J))he=Math.max(he,me.x1-me.x0);let k=R[C].token.para,ce=0;for(;C<R.length&&E<ST;){const L=ce+w>d;if(L&&!V)break;const me=R[C].token.para;if(me>k+1){ce+=w*(me-k-1),k=me-1,E+=1;continue}let te=L?[{x0:h,x1:J}]:F(ce,h,J);p>0&&y>0&&P===0&&!L&&te.length&&(j===null&&(j=E,$=te[0].x0,I=ce),E-j<y&&(te=CC(te,{x0:$,x1:$+p})));const ve=te.reduce((Le,de)=>Math.max(Le,de.x1-de.x0),0);for(const Le of te){const de=Le.x1-Le.x0;if(de<U)continue;if(C>=R.length||R[C].token.para!==me)break;const ue=C;let Z=0;for(;C<R.length&&R[C].token.para===me;){const le=R[C],oe=C===ue,ge=le.width*l,Se=oe?ge:N+ge;if(Z+Se<=de){Z+=Se,C+=1;continue}const Ee=de-Z-(oe?0:N),Ne=oe&&ge>T-.5,Te=de>=ve-.5&&de>=he*LT,Ce=m[le.originalIndex],g=f[le.originalIndex],Y=(x&&g?lu(le,Ce,g,Ee,l,S):null)??(Ne&&Te?lu(le,Ce,void 0,Ee,l,S):null);if(Y){const ee={token:{...le.token,text:Y.fragmentText},originalIndex:le.originalIndex,width:Y.fragmentWidth,kind:"fragment",offset:le.offset},ae={token:{...le.token,text:Y.remainderText},originalIndex:le.originalIndex,width:Y.remainderWidth,kind:"remainder",offset:le.offset+Y.chars};R.splice(C,1,ee,ae),Z+=(oe?0:N)+Y.fragmentWidth*l,C+=1;break}if(Ne&&_===1&&de>=he-.5){Z+=Se,C+=1;continue}break}if(C>ue){const le=C>=R.length||R[C].token.para!==me;M.push({top:ce,left:Le.x0,width:de,from:ue,to:C,justify:r==="justify"&&!le})}if(C>=R.length||R[C].token.para!==me)break}k=me,ce+=w,E+=1}q=Math.max(q,ce)}let K=0;if(C>0){const P=R[C-1];K=P.kind==="fragment"?P.originalIndex:P.originalIndex+1}return{segments:M,placed:K,height:M.length?q:0,capLeft:$,capTop:I,renderTokens:R.map(P=>P.token)}}const MT=.12,PT=2,RT=10,As=.25,ET=e=>{const t=e.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}},kT=(e,t)=>Math.abs(e.top-t.top)<.5&&Math.abs(e.left-t.left)<.5&&Math.abs(e.width-t.width)<.5&&Math.abs(e.height-t.height)<.5,AT=(e,t)=>{const[n,i]=s.useState(null);return s.useEffect(()=>{if(!e||!t){i(null);return}let o=0,r=null;const l=()=>{const c=ET(e);(!r||!kT(r,c))&&(r=c,i(c)),o=requestAnimationFrame(l)};return l(),()=>cancelAnimationFrame(o)},[e,t]),n},Fs=(e,t)=>{if(!(t.width>0)||!(t.height>0))return e;const n=Math.min(t.width,t.height),i=(t.width-n)/2,o=(t.height-n)/2;return e.map(r=>r.map(l=>({x:(i+l.x*n)/t.width,y:(o+l.y*n)/t.height})))},nr=typeof window>"u"?s.useEffect:s.useLayoutEffect;function FT(){return typeof document>"u"?null:document.body}function NT({P:e,item:t,shape:n,customPath:i,pathFit:o,viewBox:r,mode:l,align:c,allowOverflow:d,fitEnabled:u,scale:p,onFitScale:y,padding:x,columns:m,gutter:f,hyphenate:S,showOverflowIndicator:w,dropCapLines:N,dropCapSize:v,showGuides:M,typography:R,imageUrl:U,imageFocalX:X,imageFocalY:D,imageScale:_,imageCustomPath:W,imagePathEdited:T,pathDragActive:C,pathCarryImage:q,onCarryImageConsumed:E,pathEditor:$,imageEditor:I}){var Nt,jt;const j=`pretext-shape-image-${s.useId().replace(/:/g,"")}`,[F,K]=s.useState(null),P=s.useRef(null),[h,J]=s.useState({width:0,height:0}),[V,he]=s.useState(0),[k,ce]=s.useState(0),[L,me]=s.useState(null),[te,ve]=s.useState(0),[Le,de]=s.useState("none");s.useEffect(()=>{!$&&!I&&de("none")},[$,I]);const[ue,Z]=s.useState(null);s.useEffect(()=>{if(!U||typeof Image>"u"){Z(null);return}let $e=!1;const Ge=new Image;return Ge.onload=()=>{$e||Z({width:Ge.naturalWidth,height:Ge.naturalHeight})},Ge.src=U,()=>{$e=!0}},[U]);const le=s.useMemo(()=>Array.isArray(t==null?void 0:t.text)?t.text:[],[t]),oe=s.useMemo(()=>CT(le),[le]),ge=s.useMemo(()=>TT(le),[le]),Se=s.useMemo(()=>ge.join(`
27991
- `),[ge]),{lang:Ee,hyphenateSync:Ne}=pT(S,Se),Te=s.useMemo(()=>S?oe.map($e=>mT($e.text,Ne)):[],[S,oe,Ne]),Ce=N>0&&v>1?((jt=(Nt=oe[0])==null?void 0:Nt.text)==null?void 0:jt.charAt(0))??"":"",g=($==null?void 0:$.contours)??null,Y=s.useMemo(()=>{let $e=[];if(g){const Ge=$r(g);Ge.length&&($e=$o(Ge,r))}if(!$e.length){const Ge=i.trim(),ht=Ge?zd(Ge,o,r):null;ht&&ht.length?$e=ht:$e=el(n==="custom"?"rectangle":n)}return n==="circle"?Fs($e,h):$e},[g,n,i,o,r,h.width,h.height]),ee=$==null?void 0:$.onConvert,ae=($==null?void 0:$.needsConversion)??!1,ye=s.useMemo(()=>{if(n==="circle")return!1;const $e=g??(i.trim()?ki(i):null);return!!($e&&Xp($e,r))},[g,i,r,n]),[ne,B]=s.useState(null);nr(()=>{if(!ye){ne&&B(null);return}!ne&&h.width>0&&h.height>0&&B({width:h.width,height:h.height})},[ye,h.width,h.height,ne]);const G=s.useMemo(()=>{if(!ye||h.width<=0||h.height<=0)return Y;const $e=ne??h,Ge=r.width/$e.width,ht=r.height/$e.height;return Y.map(Lt=>Lt.map($t=>({x:$t.x*Ge,y:$t.y*ht})))},[Y,ye,ne,r.width,r.height,h.width,h.height]),z=s.useMemo(()=>{if(g){const Lt=$r(g);if(Lt.length){const $t=$o(Lt,r);return n==="circle"?Fs($t,h):$t}}const $e=W.trim(),Ge=$e?zd($e,o,r):null,ht=Ge&&Ge.length?Ge:el(n==="custom"?"rectangle":n);return n==="circle"?Fs(ht,h):ht},[g,n,W,o,r,h.width,h.height]),ie=s.useMemo(()=>{if(!ye||h.width<=0||h.height<=0)return z;const $e=ne??h,Ge=r.width/$e.width,ht=r.height/$e.height;return z.map(Lt=>Lt.map($t=>({x:$t.x*Ge,y:$t.y*ht})))},[z,ye,ne,r.width,r.height,h.width,h.height]),H=s.useRef(null),be=s.useRef(!1);s.useEffect(()=>{if(!(!ee||h.width<=0||h.height<=0)){if(ye){if(H.current===i)return;const $e=g??(i.trim()?ki(i):null);if(!($e!=null&&$e.length))return;const Ge=un($e,ht=>({x:r.x+(ht.x-r.x)/h.width*r.width,y:r.y+(ht.y-r.y)/h.height*r.height}));H.current=Ho(Ge),ee(Ge);return}!ae||!Y.length||be.current||(be.current=!0,ee(un(Gp(Y),$e=>({x:$e.x*La,y:$e.y*La}))))}},[ae,ye,ee,Y,g,i,r,h.width,h.height]);const re=s.useCallback(()=>{const $e=F;if(!$e)return;const Ge=$e.getBoundingClientRect(),ht=window.getComputedStyle($e),Lt=parseFloat(ht.paddingTop)||0;he(_t=>Math.abs(_t-Lt)<.5?_t:Lt);const $t=parseFloat(ht.columnGap)||0;ce(_t=>Math.abs(_t-$t)<.5?_t:$t);const mt={width:Ge.width,height:Ge.height};J(_t=>Math.abs(_t.width-mt.width)<.5&&Math.abs(_t.height-mt.height)<.5?_t:mt)},[F]);nr(()=>{const $e=F;if(!$e||typeof ResizeObserver>"u")return;re();const Ge=new ResizeObserver(re);return Ge.observe($e),()=>Ge.disconnect()},[F,re]),nr(()=>{re()},[x,f,re]),s.useEffect(()=>{const $e=typeof document<"u"?document.fonts:void 0;$e!=null&&$e.ready&&$e.ready.then(()=>{ve(Ge=>Ge+1)})},[]),nr(()=>{const $e=P.current;if(!$e)return;if(!oe.length){me(null);return}const Ge=[],ht=document.createDocumentFragment();for(const Ct of oe){const Ht=document.createElement("span");Object.assign(Ht.style,su(Ct.leaf)),Ht.textContent=Ct.text,ht.appendChild(Ht),Ge.push(Ht)}const Lt=document.createElement("span");Lt.textContent=" ",ht.appendChild(Lt);const $t=document.createElement("span");$t.textContent="-",ht.appendChild($t);const mt=Ce||"H",_t=document.createElement("span");_t.textContent=mt,_t.style.lineHeight="1",ht.appendChild(_t),$e.replaceChildren(ht);const Ot=window.getComputedStyle($e),zt=parseFloat(Ot.fontSize)||16,Re=parseFloat(Ot.lineHeight),dt=Number.isNaN(Re)?zt*1.2:Re,ut=Math.max(dt,zt),kt=document.createElement("span");kt.textContent=mt,kt.style.lineHeight=`${ut}px`;const Qe=document.createElement("span");Qe.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",kt.appendChild(Qe),$e.appendChild(kt);const at=kt.getBoundingClientRect().top,It=Qe.getBoundingClientRect().top,At=Math.max(1,It-at);kt.remove();let pt=At*.8;const qt=document.createElement("canvas").getContext("2d"),Dt=Ct=>`${Ot.fontStyle} ${Ot.fontWeight} ${Ct}px ${Ot.fontFamily}`;if(qt){qt.font=Dt(zt);const Ct=qt.measureText(mt).actualBoundingBoxAscent;Ct>0&&(pt=Ct)}const Vt=v>1?(v-1)*ut+pt:pt;let Gt=zt*(Vt/pt);if(qt){qt.font=Dt(Gt);const Ct=qt.measureText(mt).actualBoundingBoxAscent;Ct>0&&(Gt=Gt*(Vt/Ct))}_t.style.fontSize=`${Gt}px`,_t.style.lineHeight=`${Gt}px`;const Bt=document.createElement("span");Bt.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",_t.appendChild(Bt);const Yt=Math.max(1,Bt.getBoundingClientRect().top-_t.getBoundingClientRect().top);Bt.remove();const Me=(v-1)*ut+At-Yt,Fe=Ge.map(Ct=>Ct.getBoundingClientRect().width),Oe=Lt.getBoundingClientRect().width,ft=$t.getBoundingClientRect().width,Tt=Ce?_t.getBoundingClientRect().width:0,et=(h.width-k*(m-1))/m,Mt=Ge.map((Ct,Ht)=>{var pi;const on=Ct.firstChild;if(!(on instanceof Text)||on.data.length<2||!(Fe[Ht]>et-.5)&&!((pi=Te[Ht])!=null&&pi.length))return;const bn=document.createRange(),ui=Ct.getBoundingClientRect().left,dn=[];for(let Yn=1;Yn<=on.data.length;Yn+=1)bn.setStart(on,0),bn.setEnd(on,Yn),dn.push(bn.getBoundingClientRect().right-ui);return dn});$e.replaceChildren(),me({widths:Fe,spaceWidth:Oe,dashWidth:ft,charWidths:Mt,lineHeight:ut,capWidth:Tt,dropCapFontSize:Gt,dropCapTopAdjust:Me})},[oe,R,Ce,N,v,te,h.width,S,Te,m,k]);const Q=L&&Ce?L.capWidth+L.lineHeight*MT:0,Pe=Math.max(N,Math.ceil(v)),Ae=s.useMemo(()=>{if(!L||!oe.length||h.width<=0||h.height<=0||!u)return 1;const $e=Lt=>cu({tokens:oe,widths:L.widths,spaceWidth:L.spaceWidth,lineHeight:L.lineHeight,width:h.width,height:h.height,rings:G,mode:l,align:c,scale:Lt,allowOverflow:!1,capInset:Q*Lt,capLines:Ce?Pe:0,hyphenate:S,charWidths:L.charWidths,hyphenPoints:Te,hyphenWidth:L.dashWidth,shapeMargin:V,columns:m,columnGap:k});if($e(1).placed>=oe.length)return 1;if($e(As).placed<oe.length)return As;let Ge=As,ht=1;for(let Lt=0;Lt<RT;Lt+=1){const $t=(Ge+ht)/2;$e($t).placed>=oe.length?Ge=$t:ht=$t}return Ge},[L,oe,h.width,h.height,G,l,c,u,Q,Ce,Pe,S,Te,V,m,k]);s.useEffect(()=>{y(Ae)},[Ae,y]);const He=u?Math.min(p,Ae):1,Xe=s.useMemo(()=>!L||!oe.length||h.width<=0||h.height<=0?{segments:[],placed:0,height:0,capLeft:0,capTop:0,renderTokens:oe}:cu({tokens:oe,widths:L.widths,spaceWidth:L.spaceWidth,lineHeight:L.lineHeight,width:h.width,height:h.height,rings:G,mode:l,align:c,scale:He,allowOverflow:d,capInset:Q*He,capLines:Ce?Pe:0,hyphenate:S,charWidths:L.charWidths,hyphenPoints:Te,hyphenWidth:L.dashWidth,shapeMargin:V,columns:m,columnGap:k}),[L,oe,h.width,h.height,G,l,c,He,d,Q,Ce,Pe,S,Te,V,m,k]),Ue=w&&oe.length>0&&Xe.placed<oe.length,Je=L?L.dropCapFontSize*He:0,je=L?L.dropCapTopAdjust*He:0,xe=c==="justify"?"left":c,Ie=L?L.lineHeight*He:0,ze=Xe.segments.length?Xe.segments[Xe.segments.length-1]:null,Ze=ze?{top:ze.top+Ie,left:ze.left+ze.width/2}:{top:h.height,left:h.width/2},tt=!!($&&g&&h.width>0&&h.height>0),ot=!!I,lt=(tt||ot)&&h.width>0&&h.height>0,it=AT(F,lt),xt=lt&&it?FT():null,rt=s.useRef(!1),_e=s.useCallback($e=>{rt.current=$e},[]);s.useEffect(()=>{if(!tt&&!ot)return;const $e=Ge=>{const ht=F;if(!ht)return;const Lt=ht.getBoundingClientRect();Ge.clientX>=Lt.left&&Ge.clientX<=Lt.right&&Ge.clientY>=Lt.top&&Ge.clientY<=Lt.bottom&&(Ge.preventDefault(),Ge.stopPropagation(),de(mt=>mt==="shape"&&rt.current?mt:mt==="shape"&&ot?"image":tt?"shape":"image"))};return document.addEventListener("dblclick",$e,!0),()=>document.removeEventListener("dblclick",$e,!0)},[tt,ot,F]);const We=s.useMemo(()=>U&&h.width>0&&h.height>0?vC(ie,h):null,[U,ie,h.width,h.height]),vt=s.useRef(null),Ve=(()=>{const $e=vt.current;return q||!T||!I||!ue||!We||!$e||W===$e.customPath||$e.shape!==n&&n!=="custom"?null:tT($e.bounds,We,ue,$e.focalX,$e.focalY,$e.scale)})();nr(()=>{if(!I){vt.current=null;return}if(C||!ue||!We)return;const $e=vt.current,Ge=!!($e&&W!==$e.customPath);Ge&&Ve&&I.onCommit(Ve),Ge&&q&&(E==null||E()),vt.current={rings:ie,bounds:We,focalX:(Ve==null?void 0:Ve.focalX)??X,focalY:(Ve==null?void 0:Ve.focalY)??D,scale:(Ve==null?void 0:Ve.scale)??_,customPath:W,shape:n}},[C,q,W,n,ie,We,I,ue,X,D,_,Ve,E]);const Ke=vt.current,pe=!!(C&&!q&&Ke&&!Ve),De=pe&&Ke?Ke.focalX:(Ve==null?void 0:Ve.focalX)??X,qe=pe&&Ke?Ke.focalY:(Ve==null?void 0:Ve.focalY)??D,bt=pe&&Ke?Ke.scale:(Ve==null?void 0:Ve.scale)??_,yt=pe&&Ke?Ke.bounds:We,Et=s.useMemo(()=>{if(!(h.width>0)||!(h.height>0))return"";let $e=jd(i,g,o,r,n,h);if(ye){const Ge=ne??h,ht=r.width/Ge.width,Lt=r.height/Ge.height;$e=un($e,$t=>({x:$t.x*ht,y:$t.y*Lt}))}return Vd($e,h)||Dd(G,h)},[i,g,o,r,n,h.width,h.height,ye,ne,G]),ct=s.useMemo(()=>{if(!U||!(h.width>0)||!(h.height>0))return"";let $e=jd(W,g,o,r,n,h);if(ye){const Ge=ne??h,ht=r.width/Ge.width,Lt=r.height/Ge.height;$e=un($e,$t=>({x:$t.x*ht,y:$t.y*Lt}))}return Vd($e,h)||Dd(ie,h)},[U,W,g,o,r,n,h.width,h.height,ye,ne,ie]),wt=`${j}-clip`,nt=s.useMemo(()=>{if(!yt)return null;const $e=ue??{width:yt.width,height:yt.height},Ge=Ui(yt,$e,bt);return{x:jn(yt.width,Ge.width,De),y:jn(yt.height,Ge.height,qe),width:Ge.width,height:Ge.height}},[yt,ue,De,qe,bt]);return a.jsxs("div",{className:`${e}-column`,style:{padding:x,columnGap:f},lang:Ee,ref:K,children:[Et?a.jsxs("svg",{className:`${e}-shape-fill`,style:{top:0,left:0,width:h.width,height:h.height},viewBox:`0 0 ${h.width} ${h.height}`,preserveAspectRatio:"none","aria-hidden":!0,children:[a.jsx("path",{className:`${e}-shape-fill-path`,d:Et,fillRule:"evenodd"}),U&&ct&&yt&&nt?a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsx("clipPath",{id:wt,clipPathUnits:"userSpaceOnUse",children:a.jsx("path",{d:ct,fillRule:"evenodd"})})}),a.jsx("image",{href:U,x:yt.x+nt.x,y:yt.y+nt.y,width:nt.width,height:nt.height,preserveAspectRatio:"none",clipPath:`url(#${wt})`})]}):null]}):null,a.jsxs("div",{className:`${e}-flow${d?"":` ${e}-clip`}`,style:{...R,["--"+e+"-fit"]:He,top:0,left:0,width:h.width,height:h.height},children:[a.jsx("div",{className:`${e}-measure`,ref:P,style:R,"aria-hidden":!0}),Xe.segments.map(($e,Ge)=>{const ht=Xe.renderTokens.slice($e.from,$e.to),Lt=Ge===0;return a.jsx("div",{className:`${e}-line${$e.justify?` ${e}-line-justify`:""}`,"aria-hidden":!0,style:{top:`${$e.top}px`,left:`${$e.left}px`,width:`${$e.width}px`,textAlign:$e.justify?void 0:xe},children:ht.map(($t,mt)=>{const Ot=Ce&&Lt&&$e.from===0&&mt===0?$t.text.slice(1):$t.text,zt=su($t.leaf),Re=$t.href?a.jsx("a",{className:`${e}-link`,href:$t.href,target:$t.target,rel:$t.target?"noopener noreferrer":void 0,style:zt,children:Ot}):a.jsx("span",{style:zt,children:Ot});return a.jsxs("span",{children:[!$e.justify&&mt>0?" ":null,Re]},mt)})},`${$e.from}-${$e.to}-${Ge}`)}),M&&!g&&a.jsx("svg",{className:`${e}-guides`,viewBox:"0 0 1 1",preserveAspectRatio:"none","aria-hidden":!0,children:G.map(($e,Ge)=>a.jsx("polygon",{points:$e.map(ht=>`${ht.x},${ht.y}`).join(" ")},Ge))})]}),Ce&&L&&a.jsx("div",{className:`${e}-drop-cap`,"aria-hidden":!0,style:{...R,top:`${Xe.capTop+je}px`,left:`${Xe.capLeft}px`,fontSize:`${Je}px`,lineHeight:`${Je}px`},children:Ce}),xt&&it&&(g&&$||I)&&qn.createPortal(a.jsxs("div",{"data-selection":"none",style:{position:"fixed",top:it.top,left:it.left,width:it.width,height:it.height,zIndex:PT,pointerEvents:"none"},children:[g&&$&&a.jsx(bT,{P:e,box:{width:it.width,height:it.height},viewBox:r,contours:g,snap:$.snap,stretchToBox:!ye,uniformStretch:n==="circle",stage:Le,onStageChange:de,onSelectionChange:_e,onChange:$.onChange,onCommit:$.onCommit}),I&&yt&&a.jsx(gT,{P:e,box:{width:it.width,height:it.height},bounds:yt,natural:ue,imageUrl:U,maskPath:ct,stage:Le,onStageChange:de,focalX:De,focalY:qe,scale:bt,onChange:I.onChange,onCommit:I.onCommit})]}),xt),a.jsx("div",{className:`${e}-a11y`,children:ge.map(($e,Ge)=>a.jsx("p",{children:$e},Ge))}),Ue&&a.jsxs("svg",{className:`${e}-overflow-icon`,width:"33",height:"24",viewBox:"0 0 33 24",style:{top:Ze.top,left:Ze.left},"aria-hidden":!0,children:[a.jsx("path",{d:"M12.8,4 L20.2,4 C24.68042,4 26.9206301,4 28.631924,4.87194781 C31.3123488,6.23769248 33,8.99168887 33,12 C33,15.0083111 31.3123488,17.7623075 28.631924,19.1280522 C26.9206301,20 24.68042,20 20.2,20 L12.8,20 C8.31957995,20 6.07936993,20 4.368076,19.1280522 C1.68765116,17.7623075 0,15.0083111 0,12 C0,8.99168887 1.68765116,6.23769248 4.368076,4.87194781 C6.07936993,4 8.31957995,4 12.8,4 Z",fill:"#FF4400"}),a.jsx("path",{transform:"translate(5, 0)",fill:"#FFFFFF",d:"M12,5.625 C12.3846269,5.625 12.7016304,5.91453014 12.7449542,6.28753416 L12.75,6.375 L12.75,11.25 L17.625,11.25 C18.0392136,11.25 18.375,11.5857864 18.375,12 C18.375,12.3846269 18.0854699,12.7016304 17.7124658,12.7449542 L17.625,12.75 L12.75,12.75 L12.75,17.625 C12.75,18.0392136 12.4142136,18.375 12,18.375 C11.6153731,18.375 11.2983696,18.0854699 11.2550458,17.7124658 L11.25,17.625 L11.25,12.75 L6.375,12.75 C5.96078644,12.75 5.625,12.4142136 5.625,12 C5.625,11.6153731 5.91453014,11.2983696 6.28753416,11.2550458 L6.375,11.25 L11.25,11.25 L11.25,6.375 C11.25,5.96078644 11.5857864,5.625 12,5.625 Z"})]})]})}const Qp=["diamond","parallelogram","vase","circle","shield","bobbin","custom"],_T={x:0,y:0,width:100,height:100},HT=e=>{const t=(e??"").trim().split(/[\s,]+/).map(Number).filter(n=>!Number.isNaN(n));return t.length<4||t[2]<=0||t[3]<=0?_T:{x:t[0],y:t[1],width:t[2],height:t[3]}},WT=e=>`
27990
+ `;function tr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const ji={fontSettings:{type:"object",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0},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 bi(e,t){return e?`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`:t}function ql(e){return{[bi(e,"fontFamily")]:{type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},[bi(e,"fontSettings")]:{...ji.fontSettings,scope:"common",title:""},[bi(e,"fontSize")]:{...ji.fontSize,scope:"layout",title:""},[bi(e,"lineHeight")]:{...ji.lineHeight,scope:"layout",title:""},[bi(e,"letterSpacing")]:{...ji.letterSpacing,scope:"layout",title:""},[bi(e,"wordSpacing")]:{...ji.wordSpacing,scope:"layout",title:""},[bi(e,"textAlign")]:{...ji.textAlign,scope:"layout",title:""},[bi(e,"textAppearance")]:{...ji.textAppearance,scope:"layout",title:""}}}const lC=ql(""),cC=ql("open"),dC=ql("compact"),uC=["__componentName__",{type:"row",items:["panelHeight","navTextWidth"]},{type:"row",title:"",items:["navTextPosition","navTextOffset"]},{type:"row",title:"Logo",items:["logoMaxHeight","logoPosition"]},{type:"row",title:"Hamburger",items:["iconSize","showIcon"]},"fontFamily","fontSettings",{type:"row",items:["fontSize","lineHeight","letterSpacing","wordSpacing"]},"textAlign","textAppearance","navGap","navPaddingLeft","navPaddingRight"],pC=["__componentName__",{type:"row",items:["compactPanelHeight","compactNavTextWidth"]},{type:"row",title:"",items:["compactNavTextPosition","compactNavTextOffset"]},{type:"row",title:"Logo",items:["compactLogoMaxHeight","compactLogoPosition"]},{type:"row",title:"Hamburger",items:["compactIconSize","compactShowIcon"]},"compactFontFamily","compactFontSettings",{type:"row",items:["compactFontSize","compactLineHeight","compactLetterSpacing","compactWordSpacing"]},"compactTextAlign","compactTextAppearance","compactNavGap","compactNavPaddingLeft","compactNavPaddingRight"],mC=["__componentName__",{type:"row",title:"Text",items:["textWidth","position"]},{type:"row",title:"Menu",items:["openPanelSize","effect"]},"openFontFamily","openFontSettings",{type:"row",items:["openFontSize","openLineHeight","openLetterSpacing","openWordSpacing"]},"openTextAlign","openTextAppearance"],ei={textTransform:"none",textDecoration:"none",fontVariant:"normal"},Ps={fontWeight:400,fontStyle:"normal"},ea={d:"Always",t:"Open Only",m:"Open Only"},gC=["left-top","center-top","right-top","left-center","center","right-center","left-bottom","center-bottom","right-bottom"],hC=["iconColor","logoColor","linkColor","backgroundColor"],fC={type:"object",version:1,settings:{sizing:"auto manual",properties:{link:{type:"array",scope:"common",display:{type:"page-url-link"},items:{type:"object",properties:{link:{type:"object",properties:{type:{type:"string",enum:["url","page","anchor"]},value:{type:"string",message:"Paste URL here..."},target:{type:"string",enum:["blank","self"]},anchor:{type:"string"}}},label:{type:"string"},showIn:{type:"string",scope:"layout",enum:["Always","Open Only","Open and Compact","Default and Open","Default and Compact"]}}}},logo:{type:"object",scope:"common",title:"Logo",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Logo",display:{type:"settings-image-input"}}}},logoMaxHeight:{type:"number",scope:"layout",title:"Max Height",display:{type:"numeric-input"},min:0,max:9999},logoPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},compactLogoPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},logoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{default:"Logo Default",hover:"Logo Hover"},display:{type:"palette-color-picker"}},panelHeight:{type:"number",scope:"layout",title:"Menu Height",display:{type:"numeric-input"},min:0,max:9999},backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{default:"Icon Default",hover:"Icon Hover"},display:{type:"palette-color-picker"}},showIcon:{type:"string",scope:"layout",title:"Show",display:{type:"toggle-cycle",enum:["on","off"]}},iconSize:{type:"number",scope:"layout",title:"Size",display:{type:"numeric-input"},min:0,max:9999},linkColor:{type:"string",scope:"common",title:"Text Default",titleByState:{default:"Text Default",hover:"Text Hover"},display:{type:"palette-color-picker"}},compactShowIcon:{type:"string",scope:"layout",title:"Show",display:{type:"toggle-cycle",enum:["on","off"]}},compactIconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{compact:"Icon Default","compact-hover":"Icon Hover"},display:{type:"palette-color-picker"}},compactLinkColor:{type:"string",scope:"common",title:"Text Default",titleByState:{compact:"Text Default","compact-hover":"Text Hover"},display:{type:"palette-color-picker"}},compactLogoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{compact:"Logo Default","compact-hover":"Logo Hover"},display:{type:"palette-color-picker"}},compactBackgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},openLinkColor:{type:"string",scope:"common",title:"Text Default",titleByState:{open:"Text Default","open-hover":"Text Hover"},display:{type:"palette-color-picker"}},openLogoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{open:"Logo Default","open-hover":"Logo Hover"},display:{type:"palette-color-picker"}},menuBackgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},overlayColor:{type:"string",scope:"common",title:"Overlay Default",display:{type:"palette-color-picker"}},closeButtonColor:{type:"string",scope:"common",title:"Close Default",titleByState:{open:"Close Default","open-hover":"Close Hover"},display:{type:"palette-color-picker"}},effect:{type:"string",scope:"layout",title:"Effect",display:{type:"toggle-cycle",enum:["fade","left","top","right","bottom"]}},openPanelSize:{type:"number",scope:"layout",title:"Height",display:{type:"percentage-input"},min:0,max:100},textWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},navTextWidth:{type:"number",scope:"layout",title:"Text width",display:{type:"numeric-input"},min:0,max:9999},navTextPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},navTextOffset:{type:"number",scope:"layout",title:"Offset",display:{type:"numeric-input"},min:-9999,max:9999},position:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:[...gC]}},stateOverrides:{type:"object",scope:"common"},gap:tr("Gap"),navGap:{type:"number",scope:"layout",title:"Nav gap",min:0,max:100,display:{type:"range-control",visible:!1}},navPaddingLeft:{type:"number",scope:"layout",title:"Nav padding left",min:0,max:100,display:{type:"range-control",visible:!1}},navPaddingRight:{type:"number",scope:"layout",title:"Nav padding right",min:0,max:100,display:{type:"range-control",visible:!1}},textPaddingLeft:tr("Text padding left"),textPaddingRight:tr("Text padding right"),textPaddingTop:tr("Text padding top"),textPaddingBottom:tr("Text padding bottom"),compactLogoMaxHeight:{type:"number",scope:"layout",title:"Max Height",display:{type:"numeric-input"},min:0,max:9999},compactPanelHeight:{type:"number",scope:"layout",title:"Menu Height",display:{type:"numeric-input"},min:0,max:9999},compactIconSize:{type:"number",scope:"layout",title:"Size",display:{type:"numeric-input"},min:0,max:9999},compactNavTextWidth:{type:"number",scope:"layout",title:"Text width",display:{type:"numeric-input"},min:0,max:9999},compactNavTextPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},compactNavTextOffset:{type:"number",scope:"layout",title:"Offset",display:{type:"numeric-input"},min:-9999,max:9999},compactNavGap:{type:"number",scope:"layout",title:"Nav gap",min:0,max:100,display:{type:"range-control",visible:!1}},compactNavPaddingLeft:{type:"number",scope:"layout",title:"Nav padding left",min:0,max:100,display:{type:"range-control",visible:!1}},compactNavPaddingRight:{type:"number",scope:"layout",title:"Nav padding right",min:0,max:100,display:{type:"range-control",visible:!1}},...lC,...cC,...dC},defaults:{link:[{link:{type:"page",value:"",target:"self"},label:"Home",showIn:ea},{link:{type:"page",value:"",target:"self"},label:"Works",showIn:ea},{link:{type:"page",value:"",target:"self"},label:"About",showIn:ea},{link:{type:"page",value:"",target:"self"},label:"Contact",showIn:ea}],logo:{mode:"On",icon:"01M3QM74XE09DSJCWGD1XM6Y45"},backgroundColor:"#ffffff",logoColor:"#000000",iconColor:"#000000",linkColor:"#000000",openLinkColor:"#000000",compactIconColor:"#000000",compactLinkColor:"#000000",compactLogoColor:"#000000",compactBackgroundColor:"#ffffff",openLogoColor:"#000000",menuBackgroundColor:"#ffffff",overlayColor:"rgba(0, 0, 0, 0.45)",closeButtonColor:"#000000",effect:"fade",showIcon:"on",compactShowIcon:"on",logoPosition:"left",compactLogoPosition:"left",navTextPosition:"center",compactNavTextPosition:"center",navTextOffset:0,compactNavTextOffset:0,position:"left-top",fontFamily:"Goudy Bookletter 1911",fontSettings:Ps,textAlign:"left",openFontFamily:"Goudy Bookletter 1911",openFontSettings:Ps,openTextAlign:"left",compactFontFamily:"Goudy Bookletter 1911",compactFontSettings:Ps,compactTextAlign:"left",stateOverrides:{hover:{linkColor:"#666666",iconColor:"#666666",logoColor:"#666666"},"open-hover":{closeButtonColor:"#666666"}}},displayRules:[{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoMaxHeight.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoPosition.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoMaxHeight.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoPosition.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoColor.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoColor.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.openLogoColor.display.visible",value:!1}},{if:{name:"effect",value:"left"},then:{name:"properties.openPanelSize.title",value:"Width"}},{if:{name:"effect",value:"right"},then:{name:"properties.openPanelSize.title",value:"Width"}},{if:{name:"showIcon",value:"off"},then:{name:"properties.iconSize.display.visible",value:!1}},{if:{name:"showIcon",value:"off"},then:{name:"properties.iconColor.display.visible",value:!1}},{if:{name:"compactShowIcon",value:"off"},then:{name:"properties.compactIconSize.display.visible",value:!1}},{if:{name:"compactShowIcon",value:"off"},then:{name:"properties.compactIconColor.display.visible",value:!1}}],layoutDefaults:{m:{position:"center",panelHeight:50/375,logoMaxHeight:30/375,logoPosition:"center",compactLogoPosition:"left",navTextPosition:"center",navTextOffset:0,compactNavTextPosition:"center",compactNavTextOffset:0,showIcon:"on",iconSize:30/375,textWidth:240/375,openPanelSize:100,navTextWidth:120/375,gap:24/375,navGap:24/375,navPaddingLeft:20/375,navPaddingRight:20/375,textPaddingLeft:10/375,textPaddingRight:10/375,textPaddingTop:10/375,textPaddingBottom:10/375,fontSize:16/375,lineHeight:20/375,letterSpacing:0,wordSpacing:0,textAppearance:ei,openFontSize:34/375,openLineHeight:20/375,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:ei,openTextAlign:"center",compactPanelHeight:40/375,compactLogoMaxHeight:20/375,compactShowIcon:"on",compactIconSize:16/375,compactNavTextWidth:80/375,compactNavGap:24/375,compactNavPaddingLeft:20/375,compactNavPaddingRight:20/375,compactFontSize:16/375,compactLineHeight:20/375,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:ei},t:{textAlign:"center",position:"center",panelHeight:60/768,logoMaxHeight:30/768,logoPosition:"left",compactLogoPosition:"left",navTextPosition:"center",navTextOffset:0,compactNavTextPosition:"center",compactNavTextOffset:0,showIcon:"on",iconSize:16/768,textWidth:300/768,openPanelSize:100,navTextWidth:90/768,gap:32/768,navGap:32/768,navPaddingLeft:20/768,navPaddingRight:20/768,textPaddingLeft:10/768,textPaddingRight:10/768,textPaddingTop:10/768,textPaddingBottom:10/768,fontSize:18/768,lineHeight:20/768,letterSpacing:0,wordSpacing:0,textAppearance:ei,openFontSize:75/768,openLineHeight:20/768,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:ei,openTextAlign:"center",compactTextAlign:"center",compactPanelHeight:40/768,compactLogoMaxHeight:20/768,compactShowIcon:"on",compactIconSize:16/768,compactNavTextWidth:80/768,compactNavGap:32/768,compactNavPaddingLeft:20/768,compactNavPaddingRight:20/768,compactFontSize:16/768,compactLineHeight:20/768,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:ei},d:{position:"center",panelHeight:50/1440,logoMaxHeight:30/1440,logoPosition:"left",compactLogoPosition:"left",navTextPosition:"center",navTextOffset:0,compactNavTextPosition:"center",compactNavTextOffset:0,showIcon:"on",iconSize:20/1440,textWidth:300/1440,openPanelSize:100,navTextWidth:60/1440,gap:12/1440,navGap:64/1440,navPaddingLeft:10/1440,navPaddingRight:10/1440,textPaddingLeft:10/1440,textPaddingRight:10/1440,textPaddingTop:10/1440,textPaddingBottom:10/1440,fontSize:16/1440,lineHeight:16/1440,letterSpacing:0,wordSpacing:0,textAppearance:ei,textAlign:"center",openFontSize:90/1440,openLineHeight:16/1440,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:ei,openTextAlign:"center",compactPanelHeight:30/1440,compactLogoMaxHeight:20/1440,compactShowIcon:"on",compactIconSize:20/1440,compactNavTextWidth:60/1440,compactNavGap:20/1440,compactNavPaddingLeft:10/1440,compactNavPaddingRight:10/1440,compactFontSize:16/1440,compactLineHeight:16/1440,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:ei,compactTextAlign:"center"}},layout:["__componentName__","link","logo","logoMaxHeight","logoPosition","panelHeight","backgroundColor","logoColor","iconColor","showIcon","iconSize","linkColor","openLinkColor","compactShowIcon","compactIconColor","compactLinkColor","compactLogoColor","compactBackgroundColor","compactLogoMaxHeight","compactLogoPosition","compactPanelHeight","compactIconSize","compactNavTextWidth","compactNavTextPosition","compactNavTextOffset","compactNavGap","compactNavPaddingLeft","compactNavPaddingRight","compactFontFamily","compactFontSettings","compactFontSize","compactLineHeight","compactLetterSpacing","compactWordSpacing","compactTextAlign","compactTextAppearance","openLogoColor","menuBackgroundColor","overlayColor","closeButtonColor","effect","textWidth","navTextWidth","navTextPosition","navTextOffset","position","gap","navGap","navPaddingLeft","navPaddingRight","textPaddingLeft","textPaddingRight","textPaddingTop","textPaddingBottom","fontFamily","fontSettings","fontSize","lineHeight","letterSpacing","wordSpacing","textAlign","textAppearance","openFontFamily","openFontSettings","openFontSize","openLineHeight","openLetterSpacing","openWordSpacing","openTextAlign","openTextAppearance"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","logo"]},{id:"default",icon:"default",title:"Default",tooltip:"Default State",layout:uC},{id:"compact",icon:"compact",title:"Compact",tooltip:"Compact State",layout:pC,availableWhen:{navigationPosition:["switch"]}},{id:"open",icon:"open",title:"Open",tooltip:"Open State",layout:mC},{id:"links",icon:"content",title:"Links",tooltip:"Link Settings",layout:["__componentName__","link"]}],paletteBookmark:{items:[...hC],panelIds:["default","compact","open"],stateItems:{default:["iconColor","logoColor","linkColor","backgroundColor"],hover:["iconColor","logoColor","linkColor"],compact:["compactIconColor","compactLogoColor","compactLinkColor","compactBackgroundColor"],"compact-hover":["compactIconColor","compactLogoColor","compactLinkColor"],open:["closeButtonColor","openLogoColor","openLinkColor","menuBackgroundColor","overlayColor"],"open-hover":["closeButtonColor","openLogoColor","openLinkColor"]}},states:["default","hover"],statePanels:["default","compact","open"]},yC={element:aC,id:"basic-burger",name:"Basic Burger",category:"navigation",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple Burger.png"},layoutMode:"navigation",defaultSize:{d:{width:"100%",height:60/1440},t:{width:"100%",height:60/768},m:{width:"100%",height:56/375}},defaultNavigationPosition:{d:"switch",t:"switch",m:"stickyTop"},schema:fC,sourceCode:sC,assetsPaths:{content:[],parameters:[{path:"logo.icon",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"},{path:"openFontFamily"},{path:"compactFontFamily"}]},fontRelations:{fontSettings:"fontFamily",openFontSettings:"openFontFamily",compactFontSettings:"compactFontFamily"}},Od=120,Dd=3,vC=.12,Kl={x:0,y:0,width:100,height:100};function $o(e,t){return e.map(n=>n.map(i=>({x:(i.x-t.x)/t.width,y:(i.y-t.y)/t.height})))}function La(e){return e<0?0:e>1?1:e}function zd(e,t){return e.filter(n=>n.length>0).map(n=>`M ${n.map(i=>`${i.x*t.width} ${i.y*t.height}`).join(" L ")} Z`).join(" ")}function xC(e,t){let n=1/0,i=1/0,o=-1/0,r=-1/0;for(const d of e)for(const u of d){const p=u.x*t.width,y=u.y*t.height;p<n&&(n=p),p>o&&(o=p),y<i&&(i=y),y>r&&(r=y)}const l=o-n,c=r-i;return!isFinite(l)||!isFinite(c)||l<=0||c<=0?null:{x:n,y:i,width:l,height:c}}function bC(e){return e.map(([t,n])=>({x:t,y:n}))}function Es(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const c of e)for(const d of c)d.x<t&&(t=d.x),d.x>i&&(i=d.x),d.y<n&&(n=d.y),d.y>o&&(o=d.y);const r=i-t,l=o-n;return!isFinite(r)||!isFinite(l)||r<=0||l<=0?e:e.map(c=>c.map(d=>({x:(d.x-t)/r,y:(d.y-n)/l})))}function SC(e,t){const n=[];for(const o of e)for(let r=0;r<o.length;r+=1){const l=o[r],c=o[(r+1)%o.length];(l.y<=t&&c.y>t||c.y<=t&&l.y>t)&&n.push(l.x+(t-l.y)/(c.y-l.y)*(c.x-l.x))}n.sort((o,r)=>o-r);const i=[];for(let o=0;o+1<n.length;o+=2){const r=La(n[o]),l=La(n[o+1]);l>r&&i.push({x0:r,x1:l})}return wC(i)}function wC(e){if(e.length<2)return e;const t=[...e].sort((i,o)=>i.x0-o.x0),n=[t[0]];for(let i=1;i<t.length;i+=1){const o=n[n.length-1],r=t[i];r.x0<=o.x1?o.x1=Math.max(o.x1,r.x1):n.push({...r})}return n}function $C(e,t){const n=[];let i=0,o=0;for(;i<e.length&&o<t.length;){const r=Math.max(e[i].x0,t[o].x0),l=Math.min(e[i].x1,t[o].x1);l>r&&n.push({x0:r,x1:l}),e[i].x1<t[o].x1?i+=1:o+=1}return n}function CC(e){const t=[];let n=0;for(const i of e)i.x0>n&&t.push({x0:n,x1:i.x0}),n=Math.max(n,i.x1);return n<1&&t.push({x0:n,x1:1}),t}function TC(e,t){const n=[];for(const i of e){if(t.x1<=i.x0||t.x0>=i.x1){n.push(i);continue}t.x0>i.x0&&n.push({x0:i.x0,x1:t.x0}),t.x1<i.x1&&n.push({x0:t.x1,x1:i.x1})}return n}function IC(e,t,n,i){let o=null;for(let r=0;r<Dd;r+=1){const l=La(t+(n-t)*r/Math.max(1,Dd-1)),c=SC(e,l),d=i==="avoid"?CC(c):c;if(o=o===null?d:$C(o,d),o.length===0)return[]}return o??[]}function Bd(e,t="stretch",n=Kl){const i=e.trim();if(!i)return null;if(/^[Mm]/.test(i)){const l=ki(i),c=$r(l);if(c.length)return t==="viewbox"?$o(c,n):Es(c);if(typeof document>"u")return null;const d=i.split(/(?=[Mm])/).map(y=>y.trim()).filter(Boolean),u=document.createElementNS("http://www.w3.org/2000/svg","svg"),p=[];for(const y of d){const x=document.createElementNS("http://www.w3.org/2000/svg","path");x.setAttribute("d",y),u.appendChild(x);let m=0;try{m=x.getTotalLength()}catch{m=0}if(!m)continue;const f=[];for(let S=0;S<Od;S+=1){const w=x.getPointAtLength(S/Od*m);f.push({x:w.x,y:w.y})}p.push(f)}return p.length?t==="viewbox"?$o(p,n):Es(p):null}const o=i.split(/[\s,]+/).map(Number).filter(l=>!Number.isNaN(l));if(o.length<6)return null;const r=[];for(let l=0;l+1<o.length;l+=2)r.push({x:o[l],y:o[l+1]});return t==="viewbox"?$o([r],n):Es([r])}const Yl={bobbin:"M57.63,0 L57.63,37.24 L74.66,37.24 L74.66,56.07 L57.63,100 L33.84,100 L16.81,56.07 L16.81,37.24 L33.84,37.24 L33.84,0 Z",circle:"M50,0 C77.61,0 100,22.39 100,50 C100,77.61 77.61,100 50,100 C22.39,100 0,77.61 0,50 C0,22.39 22.39,0 50,0 Z",shield:"M0,0 L100,0 L100,50 L50,100 L0,50 Z",vase:"M25.37,0 L91.55,0 C91.55,0 74.8,25.14 83.07,50.03 C91.34,74.92 74.61,100 74.61,100 L8.43,100 C8.43,100 32.3,75.08 23.9,50 C15.5,24.92 25.37,0 25.37,0 Z",parallelogram:"M25.37,0 L91.55,0 L74.61,100 L8.43,100 Z",diamond:"M50,0 L80,50 L50,100 L20,50 Z"},Js="0 0 100 100",Ma=100,el=16,LC=12,MC=16,Rs=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,PC=/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g,jd=Math.PI/4,EC=8,RC=Math.PI/18,kC=8,fo=24,yo=[];function AC(){return[{closed:!0,nodes:[{p:{x:0,y:0},in:null,out:null},{p:{x:1,y:0},in:null,out:null},{p:{x:1,y:1},in:null,out:null},{p:{x:0,y:1},in:null,out:null}]}]}function ks(e,t){return un(e,n=>({x:(n.x-t.x)/t.width,y:(n.y-t.y)/t.height}))}function FC(e){const t=Li(e),n=t.maxX-t.minX,i=t.maxY-t.minY;return!isFinite(n)||!isFinite(i)||n<=0||i<=0?e:un(e,o=>({x:(o.x-t.minX)/n,y:(o.y-t.minY)/i}))}function NC(e,t){if(!(t.width>0)||!(t.height>0))return e;const n=Math.min(t.width,t.height),i=(t.width-n)/2,o=(t.height-n)/2;return un(e,r=>({x:(i+r.x*n)/t.width,y:(o+r.y*n)/t.height}))}function Vd(e,t,n,i,o,r){let l=[];if(t&&t.length)l=ks(t,i);else{const c=e.trim();if(c&&/^[Mm]/.test(c)){const d=ki(c);d.length&&(l=n==="viewbox"?ks(d,i):FC(d))}if(!l.length){const d=o!=="custom"?Yl[o]:void 0;d?l=ks(ki(d),Kl):l=AC()}}return o==="circle"?NC(l,r):l}function Gd(e,t){return!(t.width>0)||!(t.height>0)||!e.length?"":Ho(un(e,n=>({x:n.x*t.width,y:n.y*t.height})))}function tl(e){const t=e==="rectangle"||e==="custom"?void 0:Yl[e];return t?$o($r(ki(t)),Kl):[bC([[0,0],[1,0],[1,1],[0,1]])]}function _C(e){const t=e.match(PC);return t?t.map(Number).filter(n=>!Number.isNaN(n)):[]}function Ln(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function nl(e,t){return{x:t.x*2-e.x,y:t.y*2-e.y}}function gn(e){return{x:e.x,y:e.y}}function HC(e){return{p:gn(e.p),in:e.in?gn(e.in):null,out:e.out?gn(e.out):null}}function Vn(e){return e.map(t=>({closed:t.closed,nodes:t.nodes.map(HC)}))}function un(e,t){return e.map(n=>({closed:n.closed,nodes:n.nodes.map(i=>({p:t(i.p),in:i.in?t(i.in):null,out:i.out?t(i.out):null}))}))}function Xd(e,t,n,i=n){return un(e,o=>({x:t.x+(o.x-t.x)*n,y:t.y+(o.y-t.y)*i}))}function WC(e,t,n,i,o,r,l){let c=Math.abs(t),d=Math.abs(n);if(!c||!d||e.x===l.x&&e.y===l.y)return[{c1:gn(e),c2:gn(l),p:gn(l)}];const u=i*Math.PI/180,p=Math.cos(u),y=Math.sin(u),x=(e.x-l.x)/2,m=(e.y-l.y)/2,f=p*x+y*m,S=-y*x+p*m,w=f*f/(c*c)+S*S/(d*d);if(w>1){const K=Math.sqrt(w);c*=K,d*=K}const N=o===r?-1:1,v=c*c*S*S+d*d*f*f,M=Math.max(0,c*c*d*d-v),E=v===0?0:N*Math.sqrt(M/v),U=E*c*S/d,X=-E*d*f/c,D=p*U-y*X+(e.x+l.x)/2,_=y*U+p*X+(e.y+l.y)/2,W=Math.atan2((S-X)/d,(f-U)/c);let C=Math.atan2((-S-X)/d,(-f-U)/c)-W;!r&&C>0&&(C-=Math.PI*2),r&&C<0&&(C+=Math.PI*2);const q=Math.max(1,Math.ceil(Math.abs(C)/(Math.PI/2))),R=C/q,$=4/3*Math.tan(R/4),I=(K,P)=>({x:D+p*c*K-y*d*P,y:_+y*c*K+p*d*P}),j=[];let F=W;for(let K=0;K<q;K+=1){const P=F+R,h=Math.cos(F),J=Math.sin(F),V=Math.cos(P),he=Math.sin(P);j.push({c1:I(h-$*J,J+$*h),c2:I(V+$*he,he-$*V),p:K===q-1?gn(l):I(V,he)}),F=P}return j}function ki(e){const t=(e??"").trim();if(!t)return[];const n=[];let i=[],o=!1,r={x:0,y:0},l={x:0,y:0},c=null,d=null;const u=()=>{if(o&&i.length>2){const m=i[0],f=i[i.length-1];Math.abs(m.p.x-f.p.x)<1e-6&&Math.abs(m.p.y-f.p.y)<1e-6&&(m.in=f.in??m.in,i.pop())}i.length>1&&n.push({nodes:i,closed:o}),i=[],o=!1},p=(m,f)=>{i.push({p:m,in:Un(f??null,m),out:null}),r=m},y=m=>{if(!i.length)return;const f=i[i.length-1];f.out=Un(m,f.p)};Rs.lastIndex=0;let x=Rs.exec(t);for(;x!==null;){const m=x[1],f=m.toUpperCase(),S=m!==f,w=_C(x[2]),N=v=>S?{x:r.x+w[v],y:r.y+w[v+1]}:{x:w[v],y:w[v+1]};if(f==="Z")o=!0,u(),r=gn(l),c=null,d=null;else if(f==="M"){for(let v=0;v+1<w.length;v+=2){const M=N(v);v===0&&(u(),l=gn(M)),p(M)}c=null,d=null}else if(f==="L"){for(let v=0;v+1<w.length;v+=2)p(N(v));c=null,d=null}else if(f==="H"){for(const v of w)p({x:S?r.x+v:v,y:r.y});c=null,d=null}else if(f==="V"){for(const v of w)p({x:r.x,y:S?r.y+v:v});c=null,d=null}else if(f==="C"){for(let v=0;v+5<w.length;v+=6){const M=N(v),E=N(v+2),U=N(v+4);y(M),p(U,E),c=E}d=null}else if(f==="S"){for(let v=0;v+3<w.length;v+=4){const M=c?nl(c,r):gn(r),E=N(v),U=N(v+2);y(M),p(U,E),c=E}d=null}else if(f==="Q")for(let v=0;v+3<w.length;v+=4){const M=N(v),E=N(v+2);y(Ln(r,M,2/3)),p(E,Ln(E,M,2/3)),d=M,c=null}else if(f==="T")for(let v=0;v+1<w.length;v+=2){const M=d?nl(d,r):gn(r),E=N(v);y(Ln(r,M,2/3)),p(E,Ln(E,M,2/3)),d=M,c=null}else if(f==="A")for(let v=0;v+6<w.length;v+=7){const M=S?{x:r.x+w[v+5],y:r.y+w[v+6]}:{x:w[v+5],y:w[v+6]};for(const E of WC(r,w[v],w[v+1],w[v+2],w[v+3]!==0,w[v+4]!==0,M))y(E.c1),p(E.p,E.c2);c=null,d=null}x=Rs.exec(t)}return u(),n}function Bn(e){return`${Number(e.toFixed(2))}`}function Un(e,t){return!e||Math.abs(e.x-t.x)<1e-6&&Math.abs(e.y-t.y)<1e-6?null:e}function jp(e){return!!(Un(e.in,e.p)||Un(e.out,e.p))}function Vo(e,t){return!Un(e.out,e.p)&&!Un(t.in,t.p)}function Ud(e,t){if(Vo(e,t))return`L${Bn(t.p.x)},${Bn(t.p.y)}`;const n=Un(e.out,e.p)??e.p,i=Un(t.in,t.p)??t.p;return`C${Bn(n.x)},${Bn(n.y)} ${Bn(i.x)},${Bn(i.y)} ${Bn(t.p.x)},${Bn(t.p.y)}`}function Ho(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const[i,...o]=n.nodes;t.push(`M${Bn(i.p.x)},${Bn(i.p.y)}`);let r=i;for(const l of o)t.push(Ud(r,l)),r=l;if(n.closed){const l=Ud(r,i);l.charAt(0)==="C"&&t.push(l),t.push("Z")}}return t.join(" ")}function Vp(e){const t=[];for(let n=0;n+1<e.nodes.length;n+=1)t.push({from:e.nodes[n],to:e.nodes[n+1],index:n});if(e.closed&&e.nodes.length>2){const n=e.nodes.length-1;t.push({from:e.nodes[n],to:e.nodes[0],index:n})}return t}function il(e,t,n){if(Vo(e,t))return Ln(e.p,t.p,n);const i=e.out??e.p,o=t.in??t.p,r=1-n,l=r*r*r,c=3*r*r*n,d=3*r*n*n,u=n*n*n;return{x:l*e.p.x+c*i.x+d*o.x+u*t.p.x,y:l*e.p.y+c*i.y+d*o.y+u*t.p.y}}function $r(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const i=[];for(const o of Vp(n)){if(Vo(o.from,o.to)){i.push(gn(o.from.p));continue}for(let r=0;r<el;r+=1)i.push(il(o.from,o.to,r/el))}n.closed||i.push(gn(n.nodes[n.nodes.length-1].p)),i.length>2&&t.push(i)}return t}function Li(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const r of $r(e))for(const l of r)l.x<t&&(t=l.x),l.x>i&&(i=l.x),l.y<n&&(n=l.y),l.y>o&&(o=l.y);return{minX:t,minY:n,maxX:i,maxY:o}}function OC(e){const t=Li(e);return!isFinite(t.minX)||!isFinite(t.maxX)||!isFinite(t.minY)||!isFinite(t.maxY)?null:{x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2}}function Gp(e,t,n){const i={x:(n.x-e.x)/6,y:(n.y-e.y)/6};return{in:{x:t.x-i.x,y:t.y-i.y},out:{x:t.x+i.x,y:t.y+i.y}}}function Xp(e){return e.filter(t=>t.length>2).map(t=>{if(t.length<=LC)return{closed:!0,nodes:t.map(r=>({p:gn(r),in:null,out:null}))};const n=Math.max(1,Math.round(t.length/MC)),i=[];for(let r=0;r<t.length;r+=n)i.push(t[r]);const o=i.length;return{closed:!0,nodes:i.map((r,l)=>({p:gn(r),...Gp(i[(l-1+o)%o],r,i[(l+1)%o])}))}})}function Up(e,t,n=1){if(!e.length)return!1;const i=Li(e);if(!isFinite(i.minX)||!isFinite(i.maxX))return!1;const o=i.maxX-i.minX,r=i.maxY-i.minY;if(o<=t.width*2.5&&r<=t.height*2.5)return!1;const l=Math.max(n,t.width*.5),c=Math.max(n,t.height*.5);return i.minX<t.x-l||i.minY<t.y-c||i.maxX>t.x+t.width+l||i.maxY>t.y+t.height+c}function DC(e,t,n,i,o,r,l){const c=t.width>0?n.width/t.width:1,d=t.height>0?n.height/t.height:1;return!(r>0)||!(l>0)||!(c>0)||!(d>0)?e:un(e,u=>{const p=i+(u.x-t.x)*r,y=o+(u.y-t.y)*l;return{x:t.x+p/c,y:t.y+y/d}})}function zC(e,t){if(!e.length)return e;const n=Li(e),i=n.maxX-n.minX,o=n.maxY-n.minY;if(!(i>0)||!(o>0)||n.minX>=t.x-1e-6&&n.minY>=t.y-1e-6&&n.maxX<=t.x+t.width+1e-6&&n.maxY<=t.y+t.height+1e-6)return e;const l=Math.min(t.width/i,t.height/o),c=t.x+(t.width-i*l)/2,d=t.y+(t.height-o*l)/2;return un(e,u=>({x:c+(u.x-n.minX)*l,y:d+(u.y-n.minY)*l}))}function qp(e){const t={x:0,y:0,width:Ma,height:Ma},n=e!=="custom"?Yl[e]:void 0,i=n?un(ki(n),r=>({x:r.x/100*t.width+t.x,y:r.y/100*t.height+t.y})):un(Xp(tl("rectangle")),r=>({x:r.x*t.width+t.x,y:r.y*t.height+t.y})),o=zC(i,t);return{shape:e,customPath:Ho(o),pathFit:"viewbox",pathViewBox:Js}}function ta(e,t){return t>0?Math.round(e/t)*t:e}function BC(e,t,n,i){var u;const o=(u=e[t])==null?void 0:u.nodes[n];if(!o)return e;const r=i.x-o.p.x,l=i.y-o.p.y,c=Vn(e),d=c[t].nodes[n];return d.p={x:o.p.x+r,y:o.p.y+l},d.in&&(d.in={x:d.in.x+r,y:d.in.y+l}),d.out&&(d.out={x:d.out.x+r,y:d.out.y+l}),c}function qd(e,t,n,i){var r;if(!t.length)return e;const o=Vn(e);for(const{contour:l,node:c}of t){const d=(r=o[l])==null?void 0:r.nodes[c];d&&(d.p={x:d.p.x+n,y:d.p.y+i},d.in&&(d.in={x:d.in.x+n,y:d.in.y+i}),d.out&&(d.out={x:d.out.x+n,y:d.out.y+i}))}return o}function jC(e,t){const n=new Map;for(const{contour:o,node:r}of t){const l=n.get(o)??[];l.push(r),n.set(o,l)}let i=e;return n.forEach((o,r)=>{const l=[...o].sort((c,d)=>d-c);for(const c of l)i=Kp(i,r,c)}),i}function VC(e,t,n,i,o,r){var u;if(!((u=e[t])==null?void 0:u.nodes[n]))return e;const c=Vn(e),d=c[t].nodes[n];if(d[i]=gn(o),r){const p=i==="in"?"out":"in";d[p]=nl(o,d.p)}return c}function GC(e,t,n,i){var l;const o=(l=e[t])==null?void 0:l.nodes[n];if(!o||!o[i])return e;const r=Vn(e);return r[t].nodes[n][i]=null,r}function XC(e,t,n,i){const o=e[t];if(!o)return{contours:e,nodeIndex:-1};const r=o.nodes[n],l=o.nodes[(n+1)%o.nodes.length];if(!r||!l)return{contours:e,nodeIndex:-1};const c=Vn(e),d=c[t].nodes,u=n+1;if(Vo(r,l))return d.splice(u,0,{p:Ln(r.p,l.p,i),in:null,out:null}),{contours:c,nodeIndex:u};const p=r.out??r.p,y=l.in??l.p,x=Ln(r.p,p,i),m=Ln(p,y,i),f=Ln(y,l.p,i),S=Ln(x,m,i),w=Ln(m,f,i),N=Ln(S,w,i),v=(n+1)%o.nodes.length;return d[n].out=x,d[v].in=f,d.splice(u,0,{p:N,in:S,out:w}),{contours:c,nodeIndex:u}}function Kp(e,t,n){const i=e[t];if(!i||i.nodes.length<=3)return e;const o=Vn(e);return o[t].nodes.splice(n,1),o}function Kd(e,t,n){const i=e[t];if(!(i==null?void 0:i.nodes[n]))return e;const r=Vn(e),l=r[t].nodes,c=l[n],d=l.length,u=(n-1+d)%d,p=(n+1)%d,y=!!Un(l[u].out,l[u].p),x=!!Un(l[p].in,l[p].p);if(jp(c)||y||x)return c.in=null,c.out=null,l[u].out=null,l[p].in=null,r;const m=Gp(l[u].p,c.p,l[p].p);return c.in=m.in,c.out=m.out,r}function UC(e,t,n){const i=n.x-t.x,o=n.y-t.y,r=i*i+o*o,l=r===0?0:Math.max(0,Math.min(1,((e.x-t.x)*i+(e.y-t.y)*o)/r)),c={x:t.x+i*l,y:t.y+o*l};return{t:l,distance:Math.hypot(e.x-c.x,e.y-c.y),point:c}}function Yd(e,t){let n=null;return e.forEach((i,o)=>{for(const r of Vp(i)){const l=Vo(r.from,r.to)?1:el;for(let c=0;c<l;c+=1){const d=c/l,u=(c+1)/l,p=UC(t,il(r.from,r.to,d),il(r.from,r.to,u));(!n||p.distance<n.distance)&&(n={contour:o,segment:r.index,t:d+(u-d)*p.t,distance:p.distance,point:p.point})}}}),n}function qC(e,t){const n=[];return e.forEach((i,o)=>{i.nodes.forEach((r,l)=>{o===t.contour&&l===t.node||n.push(r.p)})}),n}function Qd(e,t,n){const i=t.filter((r,l)=>isFinite(r)&&t.findIndex(c=>Math.abs(c-r)<1e-6)===l),o=i.map(r=>({value:r,axis:r,from:null}));for(const r of e)o.push({value:r[n],axis:null,from:r});for(const r of i)for(const l of e)o.push({value:r*2-l[n],axis:r,from:l});return o}function Zd(e,t,n,i,o){const r=i(t)[n];let l=null,c=1/0;for(const d of e){const u=n==="x"?{x:d.value,y:t.y}:{x:t.x,y:d.value},p=Math.abs(i(u)[n]-r);p>o||l&&p>=c||(l=d,c=p)}return l}function KC(e,t){return e.length===t.length&&e.every((n,i)=>n.kind===t[i].kind&&n.a.x===t[i].a.x&&n.a.y===t[i].a.y&&n.b.x===t[i].b.x&&n.b.y===t[i].b.y)}function YC(e){const t=Math.PI*2;return((e+Math.PI)%t+t)%t-Math.PI}function ol(e,t){const n=t.x-e.x,i=t.y-e.y,o=Math.hypot(n,i);return o<1e-6?null:{x:n/o,y:i/o}}function QC(e,t){const n=ol(e,t);return n?{kind:"align",a:{x:e.x-n.x*fo,y:e.y-n.y*fo},b:{x:t.x+n.x*fo,y:t.y+n.y*fo}}:{kind:"align",a:e,b:t}}function rl(e,t,n){return t==="x"?{kind:"center",a:{x:e,y:0},b:{x:e,y:n.height}}:{kind:"center",a:{x:0,y:e},b:{x:n.width,y:e}}}function Jd(e,t,n,i,o){if(e.axis===null)return QC(n,o(e.from??n));const r=t==="x"?{x:e.axis,y:0}:{x:0,y:e.axis};return rl(o(r)[t],t,i)}function ZC(e,t,n,i,o){const r=[],l=o(e);return t&&e.x===t.value&&r.push(Jd(t,"x",l,i,o)),n&&e.y===n.value&&r.push(Jd(n,"y",l,i,o)),r}function JC(e,t,n,i){const o=e==null?void 0:e.nodes[t];if(!e||!o)return null;const r=i(o.p),l=n==="in"?o.out:o.in;if(l)return ol(i(l),r);const c=e.nodes.length,d=t+(n==="in"?1:-1);if(!e.closed&&(d<0||d>=c))return null;const u=e.nodes[(d+c)%c];if(!u)return null;const p=(n==="in"?u.in:u.out)??u.p;return ol(i(p),r)}function eT(e,t,n,i,o,r,l){const c=r(t),d=r(e),u=d.x-c.x,p=d.y-c.y,y=Math.hypot(u,p);if(y<1e-6)return{point:e,guides:yo};const x=Math.atan2(p,u),m=Math.round(x/jd)*jd;let f=o?m:null,S=!1;if(!o){const X=[];n&&X.push({angle:Math.atan2(n.y,n.x),smooth:!0}),X.push({angle:m,smooth:!1});for(const D of X){const _=YC(D.angle-x);if(!(Math.abs(_)>RC)&&!(Math.abs(Math.sin(_))*y>EC)){f=D.angle,S=D.smooth;break}}}const w=i!==null&&i>0&&Math.abs(y-i)<=kC;if(f===null&&!w)return{point:e,guides:yo};const N=f??x,v=w?i:y,M={x:Math.cos(N),y:Math.sin(N)},E=v+(f===null?0:fo),U=w?v:S?fo:0;return{point:l({x:c.x+M.x*v,y:c.y+M.y*v}),guides:[{kind:"angle",a:{x:c.x-M.x*U,y:c.y-M.y*U},b:{x:c.x+M.x*E,y:c.y+M.y*E}}]}}const al=.1,sl=8,tT=4,eu=10,Pa=(e,t)=>{switch(t){case"nw":return{x:e.minX,y:e.minY};case"ne":return{x:e.maxX,y:e.minY};case"se":return{x:e.maxX,y:e.maxY};case"sw":return{x:e.minX,y:e.maxY}}},Yp=e=>{switch(e){case"nw":return"se";case"ne":return"sw";case"se":return"nw";case"sw":return"ne"}},ll=(e,t)=>{const n=Pa(e,t),i=t==="nw"||t==="sw"?-1:1,o=t==="nw"||t==="ne"?-1:1;return{x:n.x+i*eu,y:n.y+o*eu}},cl=(e,t)=>!(t.width>0)||!(t.height>0)||!(e.width>0)||!(e.height>0)?1:Math.max(e.width/t.width,e.height/t.height),Ui=(e,t,n)=>{const i=cl(e,t)*n;return{width:t.width*i,height:t.height*i}},jn=(e,t,n)=>(e-t)*n,vo=(e,t,n,i)=>{const o=e-t;if(Math.abs(o)<1e-6)return .5;const r=n/o;return(i==null?void 0:i.clamp)===!1?r:Math.abs(o)<tT?.5:La(r)},nT=(e,t,n,i,o,r)=>{const l=Ui(e,n,r),c=e.x+jn(e.width,l.width,i),d=e.y+jn(e.height,l.height,o),u=cl(e,n),p=cl(t,n),y=Math.min(sl,Math.max(al,p>0?r*(u/p):r)),x=Ui(t,n,y);return{focalX:vo(t.width,x.width,c-t.x,{clamp:!1}),focalY:vo(t.height,x.height,d-t.y,{clamp:!1}),scale:y}},iT=6,oT=3,rT=2,As="­",aT=new RegExp("\\p{L}","gu"),tu=20,sT={arb:"ar",azj:"az",bel:"be",bos:"bs",bul:"bg",ces:"cs",deu:"de",eng:"en",fas:"fa",fra:"fr",hau:"ha",hin:"hi",hrv:"hr",hun:"hu",ibo:"ig",ind:"id",ita:"it",jav:"jv",kaz:"kk",kin:"rw",lin:"ln",mar:"mr",nep:"ne",nld:"nl",nya:"ny",pol:"pl",por:"pt",ron:"ro",run:"rn",rus:"ru",som:"so",spa:"es",srp:"sr",sun:"su",swe:"sv",swh:"sw",tgl:"tl",tur:"tr",ukr:"uk",urd:"ur",uzn:"uz",vie:"vi",yor:"yo",zlm:"ms",zul:"zu"},dl={be:()=>Promise.resolve().then(()=>require("./index-B1vNL0m-.js")).then(e=>e.index),bg:()=>Promise.resolve().then(()=>require("./index-kFrlcZxC.js")).then(e=>e.index),cs:()=>Promise.resolve().then(()=>require("./index-B6E31HBG.js")).then(e=>e.index),de:()=>Promise.resolve().then(()=>require("./index-CNFsG2yO.js")).then(e=>e.index),en:()=>Promise.resolve().then(()=>require("./index-x_p4zv7D.js")).then(e=>e.index),"en-gb":()=>Promise.resolve().then(()=>require("./index-BkmSPu6z.js")).then(e=>e.index),es:()=>Promise.resolve().then(()=>require("./index-CADju5Cy.js")).then(e=>e.index),fr:()=>Promise.resolve().then(()=>require("./index-Rwqfce2n.js")).then(e=>e.index),hi:()=>Promise.resolve().then(()=>require("./index-HhE2sJlU.js")).then(e=>e.index),hr:()=>Promise.resolve().then(()=>require("./index-DapMA5nM.js")).then(e=>e.index),hu:()=>Promise.resolve().then(()=>require("./index-kjKI70JX.js")).then(e=>e.index),id:()=>Promise.resolve().then(()=>require("./index-BlAuAthm.js")).then(e=>e.index),it:()=>Promise.resolve().then(()=>require("./index-BK-G0i5L.js")).then(e=>e.index),mr:()=>Promise.resolve().then(()=>require("./index-CIgabTwE.js")).then(e=>e.index),nl:()=>Promise.resolve().then(()=>require("./index-BrL2zv3x.js")).then(e=>e.index),pl:()=>Promise.resolve().then(()=>require("./index-DehKWXGA.js")).then(e=>e.index),pt:()=>Promise.resolve().then(()=>require("./index-C0cxTf5o.js")).then(e=>e.index),ro:()=>Promise.resolve().then(()=>require("./index-CJ0NMfJ3.js")).then(e=>e.index),ru:()=>Promise.resolve().then(()=>require("./index-gBhj9Tcu.js")).then(e=>e.index),sr:()=>Promise.resolve().then(()=>require("./index-1HMblVmZ.js")).then(e=>e.index),sv:()=>Promise.resolve().then(()=>require("./index-CDO1-R3j.js")).then(e=>e.index),tr:()=>Promise.resolve().then(()=>require("./index-CG_43X7q.js")).then(e=>e.index),uk:()=>Promise.resolve().then(()=>require("./index-Ypt3vHbi.js")).then(e=>e.index)},lT=(e,t)=>{const n=e;return t(n)??t(n.default)??null};let nu=null;const cT=()=>(nu??(nu=Promise.resolve().then(()=>require("./index-2JTNRDR1.js")).then(e=>e.franc).catch(()=>null)),nu),iu=new Map,dT=e=>{let t=iu.get(e);return t||(t=dl[e]().then(n=>lT(n,i=>i==null?void 0:i.hyphenateSync)).catch(()=>null),iu.set(e,t)),t},ou=e=>{if(!e)return null;const t=e.toLowerCase();if(dl[t])return t;const n=t.split("-")[0];return dl[n]?n:null},uT=(e,t)=>{const n=t.trim();if(n.length<tu)return;const i=e(n,{minLength:tu});if(i!=="und")return sT[i]??i},pT={hyphenateSync:null};function mT(e,t){const[n,i]=s.useState(null);return s.useEffect(()=>{if(!e)return;let o=!1;return cT().then(async r=>{const l=r?uT(r,t):void 0,c=typeof document<"u"?document.documentElement.lang:"",d=ou(l)??ou(c)??"en",u=await dT(d);o||i({lang:l,hyphenateSync:u})}),()=>{o=!0}},[e,t]),e&&n?n:pT}const ru=e=>{var t;return((t=e.match(aT))==null?void 0:t.length)??0};function gT(e,t){if(e.length<2||e.includes(As))return;const n=new Set;if(t){const o=t(e,{hyphenChar:As,minWordLength:iT});let r=0;for(let l=0;l<o.length;l+=1)o[l]===As?n.add(r):r+=1}for(let o=1;o<e.length-1;o+=1)e[o-1]==="-"&&n.add(o);const i=[...n].filter(o=>{const r=e[o-1]==="-";return o>0&&o<e.length&&ru(e.slice(0,o))>=(r?1:oT)&&ru(e.slice(o))>=(r?1:rT)}).sort((o,r)=>o-r);return i.length?i:void 0}const au=1.08,na=14,ia=8;function hT({P:e,box:t,bounds:n,natural:i,imageUrl:o,maskPath:r,stage:l,onStageChange:c,focalX:d,focalY:u,scale:p,onChange:y,onCommit:x}){const m=s.useRef(null),f=`pretext-image-ghost-${s.useId().replace(/:/g,"")}`,S=s.useRef(null),w=s.useRef(null),N=s.useRef({focalX:d,focalY:u,scale:p});N.current={focalX:d,focalY:u,scale:p};const v=l==="image";s.useEffect(()=>{var R;v&&((R=m.current)==null||R.focus({preventScroll:!0}))},[v]);const M=s.useCallback((R,$)=>{var j;const I=(j=m.current)==null?void 0:j.getBoundingClientRect();return!I||I.width<=0||I.height<=0?{x:0,y:0}:{x:(R-I.left)/I.width*t.width,y:($-I.top)/I.height*t.height}},[t.width,t.height]),E=R=>{var I,j;if(!i)return;R.stopPropagation(),R.preventDefault(),(I=m.current)==null||I.focus({preventScroll:!0});const $=Ui(n,i,p);S.current={pointerId:R.pointerId,origin:M(R.clientX,R.clientY),startX:jn(n.width,$.width,d),startY:jn(n.height,$.height,u),width:$.width,height:$.height,moved:!1},(j=m.current)==null||j.setPointerCapture(R.pointerId)},U=(R,$)=>{var V,he;if(!i)return;R.stopPropagation(),R.preventDefault(),(V=m.current)==null||V.focus({preventScroll:!0});const I=Ui(n,i,p),j=jn(n.width,I.width,d),F=jn(n.height,I.height,u),K={minX:j,minY:F,maxX:j+I.width,maxY:F+I.height},P=Pa(K,Yp($)),h=Pa(K,$),J=Math.hypot(h.x-P.x,h.y-P.y);!isFinite(J)||J<=0||(w.current={pointerId:R.pointerId,anchor:P,startDistance:J,startScale:p,startX:j,startY:F,moved:!1},(he=m.current)==null||he.setPointerCapture(R.pointerId))},X=R=>{if(!i)return;const $=w.current;if($&&R.pointerId===$.pointerId){R.stopPropagation(),R.preventDefault();const j=M(R.clientX,R.clientY),F={x:j.x-n.x,y:j.y-n.y},K=Math.hypot(F.x-$.anchor.x,F.y-$.anchor.y),P=Math.min(sl,Math.max(al,$.startScale*(K/$.startDistance)));if(!$.moved&&Math.abs(P-$.startScale)<1e-4)return;$.moved=!0;const h=P/$.startScale,J=$.anchor.x+($.startX-$.anchor.x)*h,V=$.anchor.y+($.startY-$.anchor.y)*h,he=Ui(n,i,P);y({focalX:vo(n.width,he.width,J),focalY:vo(n.height,he.height,V),scale:P});return}const I=S.current;if(I&&R.pointerId===I.pointerId){R.stopPropagation(),R.preventDefault();const j=M(R.clientX,R.clientY),F=j.x-I.origin.x,K=j.y-I.origin.y;if(!I.moved&&F===0&&K===0)return;I.moved=!0,y({focalX:vo(n.width,I.width,I.startX+F),focalY:vo(n.height,I.height,I.startY+K),scale:p})}},D=R=>{var j,F;const $=S.current;if($&&R.pointerId===$.pointerId){S.current=null,R.stopPropagation(),(j=m.current)!=null&&j.hasPointerCapture($.pointerId)&&m.current.releasePointerCapture($.pointerId),$.moved&&x(N.current);return}const I=w.current;I&&R.pointerId===I.pointerId&&(w.current=null,R.stopPropagation(),(F=m.current)!=null&&F.hasPointerCapture(I.pointerId)&&m.current.releasePointerCapture(I.pointerId),I.moved&&x(N.current))},_=R=>{if(R.key==="Escape"){R.stopPropagation(),c("none");return}if(R.key==="="||R.key==="+"||R.key==="-"||R.key==="_"){R.preventDefault(),R.stopPropagation();const $=R.key==="="||R.key==="+",I=Math.min(sl,Math.max(al,p*($?au:1/au))),j={focalX:d,focalY:u,scale:I};y(j),x(j)}},W=["nw","ne","se","sw"],T={minX:n.x,minY:n.y,maxX:n.x+n.width,maxY:n.y+n.height},C=s.useMemo(()=>{const R=i??{width:n.width,height:n.height},$=Ui(n,R,p);return!($.width>0)||!($.height>0)?null:{x:n.x+jn(n.width,$.width,d),y:n.y+jn(n.height,$.height,u),width:$.width,height:$.height}},[i,n.x,n.y,n.width,n.height,d,u,p]),q=C?{minX:C.x,minY:C.y,maxX:C.x+C.width,maxY:C.y+C.height}:T;return a.jsxs("svg",{ref:m,className:`${e}-editor${v?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:_,onPointerMove:X,onPointerUp:D,onPointerCancel:D,onLostPointerCapture:D,"data-pretext-image-editor":!0,children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>c("none")}),v&&o&&C&&r&&a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsxs("mask",{id:f,maskUnits:"userSpaceOnUse",x:C.x,y:C.y,width:C.width,height:C.height,children:[a.jsx("rect",{x:C.x,y:C.y,width:C.width,height:C.height,fill:"#FFFFFF"}),a.jsx("path",{d:r,fillRule:"evenodd",fill:"#000000"})]})}),a.jsx("image",{className:`${e}-editor-ghost`,href:o??void 0,x:C.x,y:C.y,width:C.width,height:C.height,preserveAspectRatio:"none",mask:`url(#${f})`}),a.jsx("rect",{className:`${e}-editor-image-bounds`,x:C.x,y:C.y,width:C.width,height:C.height})]}),v&&a.jsxs(a.Fragment,{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:n.x,y:n.y,width:n.width,height:n.height}),a.jsx("rect",{className:`${e}-editor-body`,x:n.x,y:n.y,width:n.width,height:n.height,onPointerDown:E}),W.map(R=>{const $=ll(q,R),I=R==="ne"||R==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:$.x-ia/2,y:$.y-ia/2,width:ia,height:ia}),a.jsx("rect",{className:`${e}-editor-scale-grab${I?` ${e}-editor-scale-grab-nesw`:""}`,x:$.x-na/2,y:$.y-na/2,width:na,height:na,onPointerDown:j=>U(j,R)})]},R)})]})]})}const ul=10,fT=ul*2,zn=7,yT=4,lo=9,vT=3.5,su=1.08,xT=.05,oa=14,bT=1,ra=14,aa=8;function ST({P:e,box:t,viewBox:n,contours:i,snap:o,stretchToBox:r,uniformStretch:l=!1,stage:c,onStageChange:d,onSelectionChange:u,onChange:p,onCommit:y}){const x=s.useRef(null),m=s.useRef(null),f=s.useRef(i);f.current=i;const S=s.useRef(null),w=s.useRef(null),N=s.useRef(null),v=s.useRef(null),[M,E]=s.useState([]),[U,X]=s.useState(yo),[D,_]=s.useState(null),W=s.useCallback(g=>{X(Y=>KC(Y,g)?Y:g)},[]),T=c==="shape";s.useEffect(()=>{var g;T&&((g=x.current)==null||g.focus({preventScroll:!0}))},[T]),s.useEffect(()=>{T||E(g=>g.length?[]:g)},[T]);const C=M.length>0;s.useEffect(()=>{u==null||u(C)},[C,u]),s.useEffect(()=>()=>u==null?void 0:u(!1),[u]);const q=n.width>0?t.width/n.width:1,R=n.height>0?t.height/n.height:1,$=Math.min(q,R),I=r&&l?$:q,j=r&&l?$:R,F=r&&l?(t.width-n.width*$)/2:0,K=r&&l?(t.height-n.height*$)/2:0,P=s.useCallback(g=>r?{x:F+(g.x-n.x)*I,y:K+(g.y-n.y)*j}:{x:g.x-n.x,y:g.y-n.y},[r,n,I,j,F,K]),h=s.useCallback(g=>r?{x:n.x+(I>0?(g.x-F)/I:0),y:n.y+(j>0?(g.y-K)/j:0)}:{x:n.x+g.x,y:n.y+g.y},[r,n,I,j,F,K]),J=s.useMemo(()=>h({x:t.width/2,y:t.height/2}),[h,t.width,t.height]),V=s.useCallback((g,Y)=>{var ae;const ee=(ae=x.current)==null?void 0:ae.getBoundingClientRect();if(!ee||ee.width<=0||ee.height<=0)return{x:0,y:0};if(r){const ye=(g-ee.left)/ee.width*t.width,ne=(Y-ee.top)/ee.height*t.height;return{x:n.x+(I>0?(ye-F)/I:0),y:n.y+(j>0?(ne-K)/j:0)}}return{x:n.x+(g-ee.left),y:n.y+(Y-ee.top)}},[r,n,t.width,t.height,I,j,F,K]),he=s.useCallback((g,Y)=>{var ae;const ee=(ae=x.current)==null?void 0:ae.getBoundingClientRect();return!ee||ee.width<=0||ee.height<=0?{x:0,y:0}:{x:(g-ee.left)/ee.width*t.width,y:(Y-ee.top)/ee.height*t.height}},[t.width,t.height]),k=s.useCallback((g,Y)=>{const ee=l&&!(Y!=null&&Y.preserveShape)?DC(g,n,t,F,K,I,j):g;y(ee,Y)},[y,l,n,t,F,K,I,j]),ce=s.useCallback(()=>{_(null)},[]),L=s.useCallback((g,Y,ee)=>{if(!ee||S.current||w.current||N.current||v.current){ce();return}const ae=he(g,Y),ye=un(f.current,P);for(const H of ye)for(const be of H.nodes)if(Math.hypot(be.p.x-ae.x,be.p.y-ae.y)<=lo){ce();return}const ne=Yd(ye,ae);if(!ne||ne.distance>ul){ce();return}const B=ye[ne.contour],G=B==null?void 0:B.nodes[ne.segment],z=B==null?void 0:B.nodes[(ne.segment+1)%((B==null?void 0:B.nodes.length)??1)],ie=!!(G&&z&&!Vo(G,z));_(H=>H&&H.curved===ie&&Math.hypot(H.point.x-ne.point.x,H.point.y-ne.point.y)<.25?H:{point:ne.point,curved:ie})},[he,P,ce]),me=g=>{var Ae;const Y=g.metaKey||g.ctrlKey,ee=N.current;if(ee&&g.pointerId===ee.pointerId){if(g.stopPropagation(),g.preventDefault(),ee.startDistance<=0)return;const He=V(g.clientX,g.clientY),Xe=Math.hypot(He.x-ee.origin.x,He.y-ee.origin.y),Ue=Math.max(xT,Xe/ee.startDistance);if(!ee.moved&&Math.abs(Ue-1)<1e-4)return;ee.moved=!0,p(Xd(ee.startContours,ee.origin,Ue));return}const ae=w.current;if(ae&&g.pointerId===ae.pointerId){g.stopPropagation(),g.preventDefault();const He=V(g.clientX,g.clientY),{bbox:Xe}=ae,Ue=Xe.maxX-Xe.minX,Je=Xe.maxY-Xe.minY,je=He.x-ae.origin.x,xe=He.y-ae.origin.y;let Ie=je,ze=xe;if(isFinite(Ue)&&isFinite(Je))if(r){let tt=n.x,ot=n.x+n.width,lt=n.y,it=n.y+n.height;l&&(I>0&&(tt=n.x+(0-F)/I,ot=n.x+(t.width-F)/I),j>0&&(lt=n.y+(0-K)/j,it=n.y+(t.height-K)/j));const xt=Math.min(tt,ot-Ue),rt=Math.max(tt,ot-Ue),_e=Math.min(lt,it-Je),We=Math.max(lt,it-Je),vt=Math.min(rt,Math.max(xt,Xe.minX+je)),Ve=Math.min(We,Math.max(_e,Xe.minY+xe));Ie=vt-Xe.minX,ze=Ve-Xe.minY}else{const tt=Xe.minX-n.x,ot=Xe.minY-n.y,lt=Math.min(0,t.width-Ue),it=Math.max(0,t.width-Ue),xt=Math.min(0,t.height-Je),rt=Math.max(0,t.height-Je),_e=Math.min(it,Math.max(lt,tt+je)),We=Math.min(rt,Math.max(xt,ot+xe));Ie=_e-tt,ze=We-ot}const Ze=[];if(!Y&&isFinite(Ue)&&isFinite(Je)){const tt=P({x:Xe.minX+Ue/2+Ie,y:Xe.minY+Je/2+ze}),ot={x:t.width/2,y:t.height/2};Math.abs(tt.x-ot.x)<=oa&&(Ie=J.x-Xe.minX-Ue/2,Ze.push(rl(ot.x,"x",t))),Math.abs(tt.y-ot.y)<=oa&&(ze=J.y-Xe.minY-Je/2,Ze.push(rl(ot.y,"y",t)))}if(!ae.moved&&Ie===0&&ze===0)return;ae.moved=!0,W(Ze.length?Ze:yo),p(un(ae.startContours,tt=>({x:tt.x+Ie,y:tt.y+ze})),{carryImage:!0});return}const ye=v.current;if(ye&&g.pointerId===ye.pointerId){g.stopPropagation(),g.preventDefault();const He=V(g.clientX,g.clientY);let Xe=He.x-ye.origin.x,Ue=He.y-ye.origin.y;if(g.shiftKey&&(Math.abs(Xe)>Math.abs(Ue)?Ue=0:Xe=0),!ye.moved&&Xe===0&&Ue===0)return;ye.moved=!0,p(qd(ye.startContours,ye.selection,Xe,Ue));return}const ne=S.current;if(!ne||g.pointerId!==ne.pointerId){L(g.clientX,g.clientY,M.length>0||T);return}ce(),g.stopPropagation(),g.preventDefault();const B=V(g.clientX,g.clientY);if(ne.kind==="anchor"){const He={x:ne.anchor.x+(B.x-ne.origin.x),y:ne.anchor.y+(B.y-ne.origin.y)},Xe=Y?[]:qC(f.current,{contour:ne.contour,node:ne.node}),Ue=Y||!ne.center?[]:[ne.center],Je=Zd(Qd(Xe,Ue.map(Ie=>Ie.x),"x"),He,"x",P,oa),je=Zd(Qd(Xe,Ue.map(Ie=>Ie.y),"y"),He,"y",P,oa),xe=Y?He:{x:(Je==null?void 0:Je.value)??ta(He.x,o),y:(je==null?void 0:je.value)??ta(He.y,o)};if(g.shiftKey&&(Math.abs(xe.x-ne.anchor.x)>Math.abs(xe.y-ne.anchor.y)?xe.y=ne.anchor.y:xe.x=ne.anchor.x),!ne.moved&&xe.x===ne.anchor.x&&xe.y===ne.anchor.y)return;ne.moved=!0,W(ZC(xe,Je,je,t,P)),p(BC(f.current,ne.contour,ne.node,xe));return}const G=(Ae=f.current[ne.contour])==null?void 0:Ae.nodes[ne.node],z=ne.mirror&&!g.altKey,ie=z||Y?null:ne.kind==="in"?G==null?void 0:G.out:G==null?void 0:G.in,H=G?P(G.p):null,be=ie?P(ie):null,re=G&&(!Y||g.shiftKey)?eT(B,G.p,z||Y?null:JC(f.current[ne.contour],ne.node,ne.kind,P),H&&be?Math.hypot(be.x-H.x,be.y-H.y):null,g.shiftKey,P,h):{point:B,guides:yo},Q=re.guides.length?re.point:Y?B:{x:ta(B.x,o),y:ta(B.y,o)},Pe=ne.kind==="in"?G==null?void 0:G.in:G==null?void 0:G.out;!ne.moved&&Pe&&Q.x===Pe.x&&Q.y===Pe.y||(ne.moved=!0,W(re.guides),p(VC(f.current,ne.contour,ne.node,ne.kind,Q,z)))},te=g=>{W(yo);const Y=N.current;if(Y&&g.pointerId===Y.pointerId){N.current=null,g.stopPropagation();const ie=x.current;ie!=null&&ie.hasPointerCapture(Y.pointerId)&&ie.releasePointerCapture(Y.pointerId),Y.moved&&k(f.current,{preserveShape:!0});return}const ee=w.current;if(ee&&g.pointerId===ee.pointerId){w.current=null,g.stopPropagation();const ie=x.current;ie!=null&&ie.hasPointerCapture(ee.pointerId)&&ie.releasePointerCapture(ee.pointerId),ee.moved?k(f.current,{preserveShape:!0}):E([]);return}const ae=v.current;if(ae&&g.pointerId===ae.pointerId){v.current=null,g.stopPropagation();const ie=x.current;ie!=null&&ie.hasPointerCapture(ae.pointerId)&&ie.releasePointerCapture(ae.pointerId),ae.moved&&k(f.current);return}const ye=S.current;if(!ye||g.pointerId!==ye.pointerId)return;S.current=null,g.stopPropagation();const ne=x.current;ne!=null&&ne.hasPointerCapture(ye.pointerId)&&ne.releasePointerCapture(ye.pointerId);const B=Math.hypot(g.clientX-ye.clientOrigin.x,g.clientY-ye.clientOrigin.y);if(ye.moved||B>yT){ye.moved&&k(f.current);return}if(!ye.toggleOnRelease||g.type!=="pointerup")return;const z=Kd(f.current,ye.contour,ye.node);z!==f.current&&(p(z),k(z))},ve=g=>{g.stopPropagation()},Le=g=>{var Y,ee;g.stopPropagation(),g.preventDefault(),ce(),(Y=x.current)==null||Y.focus({preventScroll:!0}),w.current={pointerId:g.pointerId,origin:V(g.clientX,g.clientY),startContours:Vn(i),bbox:Li(i),moved:!1},(ee=x.current)==null||ee.setPointerCapture(g.pointerId)},de=(g,Y)=>{var B,G;g.stopPropagation(),g.preventDefault(),ce(),(B=x.current)==null||B.focus({preventScroll:!0}),E([]),d("shape");const ee=Li(i),ae=Pa(ee,Yp(Y)),ye=ll(ee,Y),ne=Math.hypot(ye.x-ae.x,ye.y-ae.y);!isFinite(ne)||ne<=0||(N.current={pointerId:g.pointerId,corner:Y,origin:ae,startDistance:ne,startContours:Vn(i),moved:!1},(G=x.current)==null||G.setPointerCapture(g.pointerId))},ue=(g,Y,ee,ae)=>{var B,G,z,ie;g.stopPropagation(),g.preventDefault(),ce(),(B=x.current)==null||B.focus({preventScroll:!0});const ye=(G=i[ee])==null?void 0:G.nodes[ae];if(!ye)return;if(g.altKey){const H=Y==="anchor"?Kp(i,ee,ae):GC(i,ee,ae,Y);if(H===i)return;E(Y==="anchor"?[]:[{contour:ee,node:ae}]),p(H),k(H);return}const ne=g.metaKey||g.ctrlKey;if(Y==="anchor"&&g.shiftKey&&!ne){E(H=>H.some(be=>be.contour===ee&&be.node===ae)?H.filter(be=>!(be.contour===ee&&be.node===ae)):[...H,{contour:ee,node:ae}]);return}if(Y==="anchor"&&!ne&&M.length>1&&M.some(H=>H.contour===ee&&H.node===ae)){v.current={pointerId:g.pointerId,origin:V(g.clientX,g.clientY),startContours:Vn(i),selection:M,moved:!1},(z=x.current)==null||z.setPointerCapture(g.pointerId);return}E([{contour:ee,node:ae}]),S.current={kind:Y,contour:ee,node:ae,pointerId:g.pointerId,origin:V(g.clientX,g.clientY),clientOrigin:{x:g.clientX,y:g.clientY},anchor:ye.p,center:OC(i),mirror:Y!=="anchor"&&!!(ye.in&&ye.out),toggleOnRelease:ne,moved:!1},(ie=x.current)==null||ie.setPointerCapture(g.pointerId)},Z=g=>{g.stopPropagation(),g.preventDefault(),ce();const Y=un(i,P),ee=Yd(Y,he(g.clientX,g.clientY));if(!ee||ee.distance>ul)return;const{contours:ae,nodeIndex:ye}=XC(i,ee.contour,ee.segment,ee.t);ye<0||(E([{contour:ee.contour,node:ye}]),p(ae),k(ae))},le=g=>{if(g.key==="="||g.key==="+"||g.key==="-"||g.key==="_"){g.preventDefault(),g.stopPropagation();const ne=Li(i);if(!isFinite(ne.minX)||!isFinite(ne.maxX))return;const B={x:(ne.minX+ne.maxX)/2,y:(ne.minY+ne.maxY)/2},z=g.key==="="||g.key==="+"?su:1/su,ie=Xd(i,B,z);p(ie),k(ie,{preserveShape:!0});return}if(g.key==="Escape"){g.stopPropagation(),E([]),d("none");return}if(!M.length)return;if(g.key==="Backspace"||g.key==="Delete"){g.preventDefault(),g.stopPropagation();const ne=jC(i,M);if(ne===i)return;E([]),p(ne),k(ne);return}const Y=o>0?o:bT,ee=g.shiftKey?Y*10:Y,ae={ArrowLeft:[-ee,0],ArrowRight:[ee,0],ArrowUp:[0,-ee],ArrowDown:[0,ee]}[g.key];if(!ae)return;g.preventDefault(),g.stopPropagation();const ye=qd(i,M,ae[0],ae[1]);p(ye),k(ye)},oe=s.useMemo(()=>Ho(un(i,P)),[i,P]),ge=s.useMemo(()=>Li(i),[i]),Se=P({x:ge.minX,y:ge.minY}),Re={width:P({x:ge.maxX,y:ge.minY}).x-Se.x,height:P({x:ge.minX,y:ge.maxY}).y-Se.y},Ne=T&&M.length===0&&isFinite(ge.minX)&&isFinite(ge.maxX)&&ge.maxX>ge.minX&&ge.maxY>ge.minY,Te=M.length>0||T,Ce=Te;return a.jsxs("svg",{ref:x,className:`${e}-editor${Te?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:le,onPointerDown:()=>{var g;return(g=x.current)==null?void 0:g.focus({preventScroll:!0})},onPointerMove:me,onPointerLeave:ce,onPointerUp:te,onPointerCancel:te,onLostPointerCapture:te,onContextMenu:g=>{g.preventDefault()},"data-pretext-path-editor":!0,"data-selection":"none",children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>{E([]),d("none")},onClick:Z}),Ce&&a.jsx("path",{className:`${e}-editor-outline`,d:oe}),Ce&&U.map((g,Y)=>a.jsx("line",{className:`${e}-editor-snap ${e}-editor-snap-${g.kind}`,x1:g.a.x,y1:g.a.y,x2:g.b.x,y2:g.b.y},`${g.kind}-${Y}`)),a.jsx("path",{ref:m,className:`${e}-editor-body`,d:oe,fillRule:"evenodd",onPointerDown:Le,onClick:Z}),Ce&&a.jsx("path",{className:`${e}-editor-hit`,d:oe,style:{strokeWidth:fT},onClick:Z}),Ce&&D&&a.jsx("rect",{className:`${e}-editor-add-preview`,x:D.point.x-zn/2,y:D.point.y-zn/2,width:zn,height:zn,rx:D.curved?zn/2:0}),Ce&&i.map((g,Y)=>g.nodes.map((ee,ae)=>{const ye=M.some(B=>B.contour===Y&&B.node===ae),ne=P(ee.p);return a.jsxs("g",{children:[ye&&M.length===1&&["in","out"].map(B=>{const G=ee[B];if(!G)return null;const z=P(G);return a.jsxs("g",{children:[a.jsx("line",{className:`${e}-editor-handle-line`,x1:ne.x,y1:ne.y,x2:z.x,y2:z.y}),a.jsx("circle",{className:`${e}-editor-handle`,cx:z.x,cy:z.y,r:vT}),a.jsx("circle",{className:`${e}-editor-grab`,cx:z.x,cy:z.y,r:lo,onPointerDown:ie=>ue(ie,B,Y,ae),onClick:ve})]},B)}),a.jsx("rect",{className:`${e}-editor-anchor${ye?` ${e}-editor-anchor-selected`:""}`,x:ne.x-zn/2,y:ne.y-zn/2,width:zn,height:zn,rx:jp(ee)?zn/2:0}),a.jsx("rect",{className:`${e}-editor-grab`,x:ne.x-lo,y:ne.y-lo,width:lo*2,height:lo*2,onPointerDown:B=>ue(B,"anchor",Y,ae),onClick:ve,onDoubleClick:B=>{B.stopPropagation(),B.preventDefault();const G=Kd(i,Y,ae);p(G),k(G)}})]},`${Y}-${ae}`)})),Ne&&a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:Se.x,y:Se.y,width:Re.width,height:Re.height}),["nw","ne","se","sw"].map(g=>{const Y=P(ll(ge,g)),ee=g==="ne"||g==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:Y.x-aa/2,y:Y.y-aa/2,width:aa,height:aa}),a.jsx("rect",{className:`${e}-editor-scale-grab${ee?` ${e}-editor-scale-grab-nesw`:""}`,x:Y.x-ra/2,y:Y.y-ra/2,width:ra,height:ra,onPointerDown:ae=>de(ae,g),onClick:ve})]},g)})]})]})}const wT=4e3,$T=/^(?:https?:|mailto:|tel:)/i;function Qp(e){return!!e&&typeof e=="object"&&e.type==="link"}function CT(e){if(!e)return;const t=e.replace(/\s+/g,"");if(!(/^[a-z][a-z0-9+.-]*:/i.test(t)&&!$T.test(t)))return t}function TT(e){const t=[];return e.forEach((n,i)=>{const o=(r,l,c)=>{for(const d of r){if(Qp(d)){o(d.children??[],CT(d.value),d.target);continue}const u=d,p=(u==null?void 0:u.text)??"";if(p.trim())for(const y of p.split(/\s+/))y&&t.push({text:y,leaf:u,href:l,target:c,para:i})}};o((n==null?void 0:n.children)??[])}),t}function lu(e){return{...e.fontFamily&&{fontFamily:zo(e.fontFamily)},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}function IT(e){return e.map(t=>{const n=[],i=o=>{for(const r of o){if(Qp(r)){i(r.children??[]);continue}n.push((r==null?void 0:r.text)??"")}};return i((t==null?void 0:t.children)??[]),n.join("")})}function LT(e,t,n,i,o){if(t<=0||!e.length||n<=0||i<=0)return e;const r=o==="avoid"?1:-1;return e.map(l=>{if(!l.length)return l;let c=1/0,d=-1/0,u=1/0,p=-1/0;for(const m of l){const f=m.x*n,S=m.y*i;f<c&&(c=f),f>d&&(d=f),S<u&&(u=S),S>p&&(p=S)}const y=(c+d)/2,x=(u+p)/2;return l.map(m=>{const f=m.x*n,S=m.y*i,w=f-y,N=S-x,v=Math.sqrt(w*w+N*N);if(v<1e-6)return m;const E=Math.max(0,v+r*t)/v;return{x:(y+w*E)/n,y:(x+N*E)/i}})})}const MT=.75;function cu(e,t,n,i,o,r){if(e.kind==="fragment"||!t)return null;const l=e.token.text,c=e.offset>0?t[e.offset-1]:0,d=n?n.map(u=>u-e.offset).filter(u=>u>=(e.offset>0?2:1)&&u<l.length):Array.from({length:l.length-1},(u,p)=>p+1);for(let u=d.length-1;u>=0;u-=1){const p=d[u];if(e.offset+p>t.length)continue;const y=!!n&&l[p-1]!=="-",x=t[e.offset+p-1]-c,m=x+(y?r:0);if(!(m*o>i))return{chars:p,fragmentText:y?`${l.slice(0,p)}-`:l.slice(0,p),remainderText:l.slice(p),fragmentWidth:m,remainderWidth:Math.max(0,e.width-x)}}return null}function du(e){const{tokens:t,widths:n,rings:i,mode:o,align:r,scale:l,width:c,height:d,allowOverflow:u,capInset:p,capLines:y}=e,x=!!e.hyphenate,m=e.charWidths??[],f=e.hyphenPoints??[],S=e.hyphenWidth??0,w=e.lineHeight*l,N=e.spaceWidth*l,v=Math.max(0,e.shapeMargin??0),M=[],E=t.map((P,h)=>({token:P,originalIndex:h,width:n[h],kind:"whole",offset:0}));if(!E.length||c<=0||w<=0)return{segments:M,placed:0,height:0,capLeft:0,capTop:0,renderTokens:t};const U=Math.max(1,N*.5),X=w*vC,D=LT(i,v,c,d,o),_=Math.max(1,Math.floor(e.columns??1)),W=_>1?Math.max(0,e.columnGap??0):0,T=(c-W*(_-1))/_;let C=0,q=0,R=0,$=0,I=0,j=null;const F=(P,h,J)=>IC(D,(P+X)/d,(P+w-X)/d,o).map(V=>({x0:Math.max(h,V.x0*c),x1:Math.min(J,V.x1*c)})).filter(V=>V.x1>V.x0);for(let P=0;P<_&&C<E.length&&T>0;P+=1){const h=P*(T+W),J=h+T,V=u&&P===_-1;let he=0;for(let L=0;L+w<=d;L+=w)for(const me of F(L,h,J))he=Math.max(he,me.x1-me.x0);let k=E[C].token.para,ce=0;for(;C<E.length&&R<wT;){const L=ce+w>d;if(L&&!V)break;const me=E[C].token.para;if(me>k+1){ce+=w*(me-k-1),k=me-1,R+=1;continue}let te=L?[{x0:h,x1:J}]:F(ce,h,J);p>0&&y>0&&P===0&&!L&&te.length&&(j===null&&(j=R,$=te[0].x0,I=ce),R-j<y&&(te=TC(te,{x0:$,x1:$+p})));const ve=te.reduce((Le,de)=>Math.max(Le,de.x1-de.x0),0);for(const Le of te){const de=Le.x1-Le.x0;if(de<U)continue;if(C>=E.length||E[C].token.para!==me)break;const ue=C;let Z=0;for(;C<E.length&&E[C].token.para===me;){const le=E[C],oe=C===ue,ge=le.width*l,Se=oe?ge:N+ge;if(Z+Se<=de){Z+=Se,C+=1;continue}const Re=de-Z-(oe?0:N),Ne=oe&&ge>T-.5,Te=de>=ve-.5&&de>=he*MT,Ce=m[le.originalIndex],g=f[le.originalIndex],Y=(x&&g?cu(le,Ce,g,Re,l,S):null)??(Ne&&Te?cu(le,Ce,void 0,Re,l,S):null);if(Y){const ee={token:{...le.token,text:Y.fragmentText},originalIndex:le.originalIndex,width:Y.fragmentWidth,kind:"fragment",offset:le.offset},ae={token:{...le.token,text:Y.remainderText},originalIndex:le.originalIndex,width:Y.remainderWidth,kind:"remainder",offset:le.offset+Y.chars};E.splice(C,1,ee,ae),Z+=(oe?0:N)+Y.fragmentWidth*l,C+=1;break}if(Ne&&_===1&&de>=he-.5){Z+=Se,C+=1;continue}break}if(C>ue){const le=C>=E.length||E[C].token.para!==me;M.push({top:ce,left:Le.x0,width:de,from:ue,to:C,justify:r==="justify"&&!le})}if(C>=E.length||E[C].token.para!==me)break}k=me,ce+=w,R+=1}q=Math.max(q,ce)}let K=0;if(C>0){const P=E[C-1];K=P.kind==="fragment"?P.originalIndex:P.originalIndex+1}return{segments:M,placed:K,height:M.length?q:0,capLeft:$,capTop:I,renderTokens:E.map(P=>P.token)}}const PT=.12,ET=2,RT=10,Fs=.25,kT=e=>{const t=e.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}},AT=(e,t)=>Math.abs(e.top-t.top)<.5&&Math.abs(e.left-t.left)<.5&&Math.abs(e.width-t.width)<.5&&Math.abs(e.height-t.height)<.5,FT=(e,t)=>{const[n,i]=s.useState(null);return s.useEffect(()=>{if(!e||!t){i(null);return}let o=0,r=null;const l=()=>{const c=kT(e);(!r||!AT(r,c))&&(r=c,i(c)),o=requestAnimationFrame(l)};return l(),()=>cancelAnimationFrame(o)},[e,t]),n},Ns=(e,t)=>{if(!(t.width>0)||!(t.height>0))return e;const n=Math.min(t.width,t.height),i=(t.width-n)/2,o=(t.height-n)/2;return e.map(r=>r.map(l=>({x:(i+l.x*n)/t.width,y:(o+l.y*n)/t.height})))},nr=typeof window>"u"?s.useEffect:s.useLayoutEffect;function NT(){return typeof document>"u"?null:document.body}function _T({P:e,item:t,shape:n,customPath:i,pathFit:o,viewBox:r,mode:l,align:c,allowOverflow:d,fitEnabled:u,scale:p,onFitScale:y,padding:x,columns:m,gutter:f,hyphenate:S,showOverflowIndicator:w,dropCapLines:N,dropCapSize:v,showGuides:M,typography:E,imageUrl:U,imageFocalX:X,imageFocalY:D,imageScale:_,imageCustomPath:W,imagePathEdited:T,pathDragActive:C,pathCarryImage:q,onCarryImageConsumed:R,pathEditor:$,imageEditor:I}){var Nt,jt;const j=`pretext-shape-image-${s.useId().replace(/:/g,"")}`,[F,K]=s.useState(null),P=s.useRef(null),[h,J]=s.useState({width:0,height:0}),[V,he]=s.useState(0),[k,ce]=s.useState(0),[L,me]=s.useState(null),[te,ve]=s.useState(0),[Le,de]=s.useState("none");s.useEffect(()=>{!$&&!I&&de("none")},[$,I]);const[ue,Z]=s.useState(null);s.useEffect(()=>{if(!U||typeof Image>"u"){Z(null);return}let $e=!1;const Ge=new Image;return Ge.onload=()=>{$e||Z({width:Ge.naturalWidth,height:Ge.naturalHeight})},Ge.src=U,()=>{$e=!0}},[U]);const le=s.useMemo(()=>Array.isArray(t==null?void 0:t.text)?t.text:[],[t]),oe=s.useMemo(()=>TT(le),[le]),ge=s.useMemo(()=>IT(le),[le]),Se=s.useMemo(()=>ge.join(`
27991
+ `),[ge]),{lang:Re,hyphenateSync:Ne}=mT(S,Se),Te=s.useMemo(()=>S?oe.map($e=>gT($e.text,Ne)):[],[S,oe,Ne]),Ce=N>0&&v>1?((jt=(Nt=oe[0])==null?void 0:Nt.text)==null?void 0:jt.charAt(0))??"":"",g=($==null?void 0:$.contours)??null,Y=s.useMemo(()=>{let $e=[];if(g){const Ge=$r(g);Ge.length&&($e=$o(Ge,r))}if(!$e.length){const Ge=i.trim(),ht=Ge?Bd(Ge,o,r):null;ht&&ht.length?$e=ht:$e=tl(n==="custom"?"rectangle":n)}return n==="circle"?Ns($e,h):$e},[g,n,i,o,r,h.width,h.height]),ee=$==null?void 0:$.onConvert,ae=($==null?void 0:$.needsConversion)??!1,ye=s.useMemo(()=>{if(n==="circle")return!1;const $e=g??(i.trim()?ki(i):null);return!!($e&&Up($e,r))},[g,i,r,n]),[ne,B]=s.useState(null);nr(()=>{if(!ye){ne&&B(null);return}!ne&&h.width>0&&h.height>0&&B({width:h.width,height:h.height})},[ye,h.width,h.height,ne]);const G=s.useMemo(()=>{if(!ye||h.width<=0||h.height<=0)return Y;const $e=ne??h,Ge=r.width/$e.width,ht=r.height/$e.height;return Y.map(Lt=>Lt.map($t=>({x:$t.x*Ge,y:$t.y*ht})))},[Y,ye,ne,r.width,r.height,h.width,h.height]),z=s.useMemo(()=>{if(g){const Lt=$r(g);if(Lt.length){const $t=$o(Lt,r);return n==="circle"?Ns($t,h):$t}}const $e=W.trim(),Ge=$e?Bd($e,o,r):null,ht=Ge&&Ge.length?Ge:tl(n==="custom"?"rectangle":n);return n==="circle"?Ns(ht,h):ht},[g,n,W,o,r,h.width,h.height]),ie=s.useMemo(()=>{if(!ye||h.width<=0||h.height<=0)return z;const $e=ne??h,Ge=r.width/$e.width,ht=r.height/$e.height;return z.map(Lt=>Lt.map($t=>({x:$t.x*Ge,y:$t.y*ht})))},[z,ye,ne,r.width,r.height,h.width,h.height]),H=s.useRef(null),be=s.useRef(!1);s.useEffect(()=>{if(!(!ee||h.width<=0||h.height<=0)){if(ye){if(H.current===i)return;const $e=g??(i.trim()?ki(i):null);if(!($e!=null&&$e.length))return;const Ge=un($e,ht=>({x:r.x+(ht.x-r.x)/h.width*r.width,y:r.y+(ht.y-r.y)/h.height*r.height}));H.current=Ho(Ge),ee(Ge);return}!ae||!Y.length||be.current||(be.current=!0,ee(un(Xp(Y),$e=>({x:$e.x*Ma,y:$e.y*Ma}))))}},[ae,ye,ee,Y,g,i,r,h.width,h.height]);const re=s.useCallback(()=>{const $e=F;if(!$e)return;const Ge=$e.getBoundingClientRect(),ht=window.getComputedStyle($e),Lt=parseFloat(ht.paddingTop)||0;he(_t=>Math.abs(_t-Lt)<.5?_t:Lt);const $t=parseFloat(ht.columnGap)||0;ce(_t=>Math.abs(_t-$t)<.5?_t:$t);const mt={width:Ge.width,height:Ge.height};J(_t=>Math.abs(_t.width-mt.width)<.5&&Math.abs(_t.height-mt.height)<.5?_t:mt)},[F]);nr(()=>{const $e=F;if(!$e||typeof ResizeObserver>"u")return;re();const Ge=new ResizeObserver(re);return Ge.observe($e),()=>Ge.disconnect()},[F,re]),nr(()=>{re()},[x,f,re]),s.useEffect(()=>{const $e=typeof document<"u"?document.fonts:void 0;$e!=null&&$e.ready&&$e.ready.then(()=>{ve(Ge=>Ge+1)})},[]),nr(()=>{const $e=P.current;if(!$e)return;if(!oe.length){me(null);return}const Ge=[],ht=document.createDocumentFragment();for(const Ct of oe){const Ht=document.createElement("span");Object.assign(Ht.style,lu(Ct.leaf)),Ht.textContent=Ct.text,ht.appendChild(Ht),Ge.push(Ht)}const Lt=document.createElement("span");Lt.textContent=" ",ht.appendChild(Lt);const $t=document.createElement("span");$t.textContent="-",ht.appendChild($t);const mt=Ce||"H",_t=document.createElement("span");_t.textContent=mt,_t.style.lineHeight="1",ht.appendChild(_t),$e.replaceChildren(ht);const Ot=window.getComputedStyle($e),zt=parseFloat(Ot.fontSize)||16,Ee=parseFloat(Ot.lineHeight),dt=Number.isNaN(Ee)?zt*1.2:Ee,ut=Math.max(dt,zt),kt=document.createElement("span");kt.textContent=mt,kt.style.lineHeight=`${ut}px`;const Qe=document.createElement("span");Qe.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",kt.appendChild(Qe),$e.appendChild(kt);const at=kt.getBoundingClientRect().top,It=Qe.getBoundingClientRect().top,At=Math.max(1,It-at);kt.remove();let pt=At*.8;const qt=document.createElement("canvas").getContext("2d"),Dt=Ct=>`${Ot.fontStyle} ${Ot.fontWeight} ${Ct}px ${Ot.fontFamily}`;if(qt){qt.font=Dt(zt);const Ct=qt.measureText(mt).actualBoundingBoxAscent;Ct>0&&(pt=Ct)}const Vt=v>1?(v-1)*ut+pt:pt;let Gt=zt*(Vt/pt);if(qt){qt.font=Dt(Gt);const Ct=qt.measureText(mt).actualBoundingBoxAscent;Ct>0&&(Gt=Gt*(Vt/Ct))}_t.style.fontSize=`${Gt}px`,_t.style.lineHeight=`${Gt}px`;const Bt=document.createElement("span");Bt.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",_t.appendChild(Bt);const Yt=Math.max(1,Bt.getBoundingClientRect().top-_t.getBoundingClientRect().top);Bt.remove();const Me=(v-1)*ut+At-Yt,Fe=Ge.map(Ct=>Ct.getBoundingClientRect().width),Oe=Lt.getBoundingClientRect().width,ft=$t.getBoundingClientRect().width,Tt=Ce?_t.getBoundingClientRect().width:0,et=(h.width-k*(m-1))/m,Mt=Ge.map((Ct,Ht)=>{var pi;const on=Ct.firstChild;if(!(on instanceof Text)||on.data.length<2||!(Fe[Ht]>et-.5)&&!((pi=Te[Ht])!=null&&pi.length))return;const bn=document.createRange(),ui=Ct.getBoundingClientRect().left,dn=[];for(let Yn=1;Yn<=on.data.length;Yn+=1)bn.setStart(on,0),bn.setEnd(on,Yn),dn.push(bn.getBoundingClientRect().right-ui);return dn});$e.replaceChildren(),me({widths:Fe,spaceWidth:Oe,dashWidth:ft,charWidths:Mt,lineHeight:ut,capWidth:Tt,dropCapFontSize:Gt,dropCapTopAdjust:Me})},[oe,E,Ce,N,v,te,h.width,S,Te,m,k]);const Q=L&&Ce?L.capWidth+L.lineHeight*PT:0,Pe=Math.max(N,Math.ceil(v)),Ae=s.useMemo(()=>{if(!L||!oe.length||h.width<=0||h.height<=0||!u)return 1;const $e=Lt=>du({tokens:oe,widths:L.widths,spaceWidth:L.spaceWidth,lineHeight:L.lineHeight,width:h.width,height:h.height,rings:G,mode:l,align:c,scale:Lt,allowOverflow:!1,capInset:Q*Lt,capLines:Ce?Pe:0,hyphenate:S,charWidths:L.charWidths,hyphenPoints:Te,hyphenWidth:L.dashWidth,shapeMargin:V,columns:m,columnGap:k});if($e(1).placed>=oe.length)return 1;if($e(Fs).placed<oe.length)return Fs;let Ge=Fs,ht=1;for(let Lt=0;Lt<RT;Lt+=1){const $t=(Ge+ht)/2;$e($t).placed>=oe.length?Ge=$t:ht=$t}return Ge},[L,oe,h.width,h.height,G,l,c,u,Q,Ce,Pe,S,Te,V,m,k]);s.useEffect(()=>{y(Ae)},[Ae,y]);const He=u?Math.min(p,Ae):1,Xe=s.useMemo(()=>!L||!oe.length||h.width<=0||h.height<=0?{segments:[],placed:0,height:0,capLeft:0,capTop:0,renderTokens:oe}:du({tokens:oe,widths:L.widths,spaceWidth:L.spaceWidth,lineHeight:L.lineHeight,width:h.width,height:h.height,rings:G,mode:l,align:c,scale:He,allowOverflow:d,capInset:Q*He,capLines:Ce?Pe:0,hyphenate:S,charWidths:L.charWidths,hyphenPoints:Te,hyphenWidth:L.dashWidth,shapeMargin:V,columns:m,columnGap:k}),[L,oe,h.width,h.height,G,l,c,He,d,Q,Ce,Pe,S,Te,V,m,k]),Ue=w&&oe.length>0&&Xe.placed<oe.length,Je=L?L.dropCapFontSize*He:0,je=L?L.dropCapTopAdjust*He:0,xe=c==="justify"?"left":c,Ie=L?L.lineHeight*He:0,ze=Xe.segments.length?Xe.segments[Xe.segments.length-1]:null,Ze=ze?{top:ze.top+Ie,left:ze.left+ze.width/2}:{top:h.height,left:h.width/2},tt=!!($&&g&&h.width>0&&h.height>0),ot=!!I,lt=(tt||ot)&&h.width>0&&h.height>0,it=FT(F,lt),xt=lt&&it?NT():null,rt=s.useRef(!1),_e=s.useCallback($e=>{rt.current=$e},[]);s.useEffect(()=>{if(!tt&&!ot)return;const $e=Ge=>{const ht=F;if(!ht)return;const Lt=ht.getBoundingClientRect();Ge.clientX>=Lt.left&&Ge.clientX<=Lt.right&&Ge.clientY>=Lt.top&&Ge.clientY<=Lt.bottom&&(Ge.preventDefault(),Ge.stopPropagation(),de(mt=>mt==="shape"&&rt.current?mt:mt==="shape"&&ot?"image":tt?"shape":"image"))};return document.addEventListener("dblclick",$e,!0),()=>document.removeEventListener("dblclick",$e,!0)},[tt,ot,F]);const We=s.useMemo(()=>U&&h.width>0&&h.height>0?xC(ie,h):null,[U,ie,h.width,h.height]),vt=s.useRef(null),Ve=(()=>{const $e=vt.current;return q||!T||!I||!ue||!We||!$e||W===$e.customPath||$e.shape!==n&&n!=="custom"?null:nT($e.bounds,We,ue,$e.focalX,$e.focalY,$e.scale)})();nr(()=>{if(!I){vt.current=null;return}if(C||!ue||!We)return;const $e=vt.current,Ge=!!($e&&W!==$e.customPath);Ge&&Ve&&I.onCommit(Ve),Ge&&q&&(R==null||R()),vt.current={rings:ie,bounds:We,focalX:(Ve==null?void 0:Ve.focalX)??X,focalY:(Ve==null?void 0:Ve.focalY)??D,scale:(Ve==null?void 0:Ve.scale)??_,customPath:W,shape:n}},[C,q,W,n,ie,We,I,ue,X,D,_,Ve,R]);const Ke=vt.current,pe=!!(C&&!q&&Ke&&!Ve),De=pe&&Ke?Ke.focalX:(Ve==null?void 0:Ve.focalX)??X,qe=pe&&Ke?Ke.focalY:(Ve==null?void 0:Ve.focalY)??D,bt=pe&&Ke?Ke.scale:(Ve==null?void 0:Ve.scale)??_,yt=pe&&Ke?Ke.bounds:We,Rt=s.useMemo(()=>{if(!(h.width>0)||!(h.height>0))return"";let $e=Vd(i,g,o,r,n,h);if(ye){const Ge=ne??h,ht=r.width/Ge.width,Lt=r.height/Ge.height;$e=un($e,$t=>({x:$t.x*ht,y:$t.y*Lt}))}return Gd($e,h)||zd(G,h)},[i,g,o,r,n,h.width,h.height,ye,ne,G]),ct=s.useMemo(()=>{if(!U||!(h.width>0)||!(h.height>0))return"";let $e=Vd(W,g,o,r,n,h);if(ye){const Ge=ne??h,ht=r.width/Ge.width,Lt=r.height/Ge.height;$e=un($e,$t=>({x:$t.x*ht,y:$t.y*Lt}))}return Gd($e,h)||zd(ie,h)},[U,W,g,o,r,n,h.width,h.height,ye,ne,ie]),wt=`${j}-clip`,nt=s.useMemo(()=>{if(!yt)return null;const $e=ue??{width:yt.width,height:yt.height},Ge=Ui(yt,$e,bt);return{x:jn(yt.width,Ge.width,De),y:jn(yt.height,Ge.height,qe),width:Ge.width,height:Ge.height}},[yt,ue,De,qe,bt]);return a.jsxs("div",{className:`${e}-column`,style:{padding:x,columnGap:f},lang:Re,ref:K,children:[Rt?a.jsxs("svg",{className:`${e}-shape-fill`,style:{top:0,left:0,width:h.width,height:h.height},viewBox:`0 0 ${h.width} ${h.height}`,preserveAspectRatio:"none","aria-hidden":!0,children:[a.jsx("path",{className:`${e}-shape-fill-path`,d:Rt,fillRule:"evenodd"}),U&&ct&&yt&&nt?a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsx("clipPath",{id:wt,clipPathUnits:"userSpaceOnUse",children:a.jsx("path",{d:ct,fillRule:"evenodd"})})}),a.jsx("image",{href:U,x:yt.x+nt.x,y:yt.y+nt.y,width:nt.width,height:nt.height,preserveAspectRatio:"none",clipPath:`url(#${wt})`})]}):null]}):null,a.jsxs("div",{className:`${e}-flow${d?"":` ${e}-clip`}`,style:{...E,["--"+e+"-fit"]:He,top:0,left:0,width:h.width,height:h.height},children:[a.jsx("div",{className:`${e}-measure`,ref:P,style:E,"aria-hidden":!0}),Xe.segments.map(($e,Ge)=>{const ht=Xe.renderTokens.slice($e.from,$e.to),Lt=Ge===0;return a.jsx("div",{className:`${e}-line${$e.justify?` ${e}-line-justify`:""}`,"aria-hidden":!0,style:{top:`${$e.top}px`,left:`${$e.left}px`,width:`${$e.width}px`,textAlign:$e.justify?void 0:xe},children:ht.map(($t,mt)=>{const Ot=Ce&&Lt&&$e.from===0&&mt===0?$t.text.slice(1):$t.text,zt=lu($t.leaf),Ee=$t.href?a.jsx("a",{className:`${e}-link`,href:$t.href,target:$t.target,rel:$t.target?"noopener noreferrer":void 0,style:zt,children:Ot}):a.jsx("span",{style:zt,children:Ot});return a.jsxs("span",{children:[!$e.justify&&mt>0?" ":null,Ee]},mt)})},`${$e.from}-${$e.to}-${Ge}`)}),M&&!g&&a.jsx("svg",{className:`${e}-guides`,viewBox:"0 0 1 1",preserveAspectRatio:"none","aria-hidden":!0,children:G.map(($e,Ge)=>a.jsx("polygon",{points:$e.map(ht=>`${ht.x},${ht.y}`).join(" ")},Ge))})]}),Ce&&L&&a.jsx("div",{className:`${e}-drop-cap`,"aria-hidden":!0,style:{...E,top:`${Xe.capTop+je}px`,left:`${Xe.capLeft}px`,fontSize:`${Je}px`,lineHeight:`${Je}px`},children:Ce}),xt&&it&&(g&&$||I)&&qn.createPortal(a.jsxs("div",{"data-selection":"none",style:{position:"fixed",top:it.top,left:it.left,width:it.width,height:it.height,zIndex:ET,pointerEvents:"none"},children:[g&&$&&a.jsx(ST,{P:e,box:{width:it.width,height:it.height},viewBox:r,contours:g,snap:$.snap,stretchToBox:!ye,uniformStretch:n==="circle",stage:Le,onStageChange:de,onSelectionChange:_e,onChange:$.onChange,onCommit:$.onCommit}),I&&yt&&a.jsx(hT,{P:e,box:{width:it.width,height:it.height},bounds:yt,natural:ue,imageUrl:U,maskPath:ct,stage:Le,onStageChange:de,focalX:De,focalY:qe,scale:bt,onChange:I.onChange,onCommit:I.onCommit})]}),xt),a.jsx("div",{className:`${e}-a11y`,children:ge.map(($e,Ge)=>a.jsx("p",{children:$e},Ge))}),Ue&&a.jsxs("svg",{className:`${e}-overflow-icon`,width:"33",height:"24",viewBox:"0 0 33 24",style:{top:Ze.top,left:Ze.left},"aria-hidden":!0,children:[a.jsx("path",{d:"M12.8,4 L20.2,4 C24.68042,4 26.9206301,4 28.631924,4.87194781 C31.3123488,6.23769248 33,8.99168887 33,12 C33,15.0083111 31.3123488,17.7623075 28.631924,19.1280522 C26.9206301,20 24.68042,20 20.2,20 L12.8,20 C8.31957995,20 6.07936993,20 4.368076,19.1280522 C1.68765116,17.7623075 0,15.0083111 0,12 C0,8.99168887 1.68765116,6.23769248 4.368076,4.87194781 C6.07936993,4 8.31957995,4 12.8,4 Z",fill:"#FF4400"}),a.jsx("path",{transform:"translate(5, 0)",fill:"#FFFFFF",d:"M12,5.625 C12.3846269,5.625 12.7016304,5.91453014 12.7449542,6.28753416 L12.75,6.375 L12.75,11.25 L17.625,11.25 C18.0392136,11.25 18.375,11.5857864 18.375,12 C18.375,12.3846269 18.0854699,12.7016304 17.7124658,12.7449542 L17.625,12.75 L12.75,12.75 L12.75,17.625 C12.75,18.0392136 12.4142136,18.375 12,18.375 C11.6153731,18.375 11.2983696,18.0854699 11.2550458,17.7124658 L11.25,17.625 L11.25,12.75 L6.375,12.75 C5.96078644,12.75 5.625,12.4142136 5.625,12 C5.625,11.6153731 5.91453014,11.2983696 6.28753416,11.2550458 L6.375,11.25 L11.25,11.25 L11.25,6.375 C11.25,5.96078644 11.5857864,5.625 12,5.625 Z"})]})]})}const Zp=["diamond","parallelogram","vase","circle","shield","bobbin","custom"],HT={x:0,y:0,width:100,height:100},WT=e=>{const t=(e??"").trim().split(/[\s,]+/).map(Number).filter(n=>!Number.isNaN(n));return t.length<4||t[2]<=0||t[3]<=0?HT:{x:t[0],y:t[1],width:t[2],height:t[3]}},OT=e=>`
27992
27992
  .${e}-wrapper {
27993
27993
  box-sizing: border-box;
27994
27994
  display: flex;
@@ -28217,7 +28217,7 @@ export function Burger({
28217
28217
  clip-path: inset(50%);
28218
28218
  white-space: nowrap;
28219
28219
  }
28220
- `,OT=1;function DT({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,isSelected:r,onUpdateSettings:l}){const{prefix:c}=b.useScopedStyles(),d=s.useMemo(()=>WT(c),[c]),u=n??!1,p=!!r||!!o,y=s.useMemo(()=>Array.isArray(t)?t[0]??{}:{},[t]),x=(e==null?void 0:e.shape)??"custom",m=(e==null?void 0:e.customPath)??"",f=(e==null?void 0:e.pathFit)??"stretch",S=s.useMemo(()=>HT(e==null?void 0:e.pathViewBox),[e==null?void 0:e.pathViewBox]),w=(e==null?void 0:e.shapeMode)==="B"?"avoid":"contain",N=(e==null?void 0:e.textAlign)??"left",v=((e==null?void 0:e.overflowMode)??"clip")==="visible",M=((e==null?void 0:e.fitText)??"off")==="on",R=((e==null?void 0:e.hyphenate)??"off")==="on",U=b.scalingValue((e==null?void 0:e.padding)??0,u),X=Math.max(1,Math.round((e==null?void 0:e.columns)??1)),D=b.scalingValue((e==null?void 0:e.columnGutter)??0,u),_=(e==null?void 0:e.dropCapSize)??OT,W=Math.max(1,Math.round((e==null?void 0:e.dropCapLines)??_)),T=u&&p&&!i,C=u&&!i,[q,E]=s.useState(!1);s.useEffect(()=>{if(!u||!p){E(!1);return}const z=()=>E(!0),ie=()=>E(!1),H=["ArticleEditor.Item:drag-start","ArticleEditor.Selection:resize-start","ArticleEditor.Selection:move-start"],be=["ArticleEditor.Item:drag-end","ArticleEditor.Selection:resize-end","ArticleEditor.Selection:move-end"];for(const re of H)window.addEventListener(re,z);for(const re of be)window.addEventListener(re,ie);return()=>{for(const re of H)window.removeEventListener(re,z);for(const re of be)window.removeEventListener(re,ie)}},[u,p]);const $=u&&p&&!i&&typeof l=="function",I=!q,j=Math.max(0,(e==null?void 0:e.pathSnap)??0),F=s.useRef(e??{}),K=s.useRef(""),P=[e==null?void 0:e.customPath,e==null?void 0:e.shape,e==null?void 0:e.pathFit,e==null?void 0:e.pathViewBox,e==null?void 0:e.imageScale,e==null?void 0:e.imageFocalX,e==null?void 0:e.imageFocalY,e==null?void 0:e.image].join("\0");if(P!==K.current)K.current=P,F.current=e??{};else if(e){const{customPath:z,shape:ie,pathFit:H,pathViewBox:be,imageScale:re,imageFocalX:Q,imageFocalY:Pe,image:Ae,...He}=e,Xe=F.current;for(const Ue of Object.keys(He))if(Xe[Ue]!==He[Ue]){F.current={...Xe,...He};break}}const[h,J]=s.useState(null),[V,he]=s.useState(!1),[k,ce]=s.useState(!1),L=s.useCallback(()=>ce(!1),[]),me=F.current.shape??x,te=!!(h&&(h.base===m||h.serialized===m)),ve=te&&h?h.serialized:m;s.useEffect(()=>{$||(he(!1),ce(!1))},[$]),s.useEffect(()=>{!h||V||h.serialized===m&&J(null)},[h,m,V]);const Le=s.useMemo(()=>{if(!$)return null;if(h&&(h.base===m||h.serialized===m))return h.contours;const z=ki(m);return z.length?z:null},[$,h,m]),de=!!(f==="viewbox"&&((e==null?void 0:e.pathViewBox)??"")===Zs&&Le&&(x==="circle"||!Xp(Le,S))),ue=s.useCallback((z,ie,H)=>{const be=Ho(z);if(J(re=>({base:re&&(re.base===m||re.serialized===m)?re.base:m,serialized:be,contours:z})),ie){const re=F.current,Q=H!=null&&H.preserveShape?re.shape:"custom",Pe={...re,shape:Q,customPath:be};F.current=Pe,l==null||l(Pe)}},[m,l]),Z=s.useMemo(()=>$?{contours:de?Le:null,snap:j,needsConversion:!de,onConvert:z=>{const ie=Ho(z);J({base:ie,serialized:ie,contours:z});const H={...F.current,pathFit:"viewbox",pathViewBox:Zs,customPath:ie};F.current=H,l==null||l(H)},onChange:(z,ie)=>{he(!0),ce(!!(ie!=null&&ie.carryImage)),ue(z,!1)},onCommit:(z,ie)=>{ue(z,!0,ie),he(!1)}}:null,[$,de,Le,j,l,ue]),le=w==="avoid"&&!!(e!=null&&e.image),oe=s.useMemo(()=>({focalX:(e==null?void 0:e.imageFocalX)??.5,focalY:(e==null?void 0:e.imageFocalY)??.5,scale:(e==null?void 0:e.imageScale)??1}),[e==null?void 0:e.imageFocalX,e==null?void 0:e.imageFocalY,e==null?void 0:e.imageScale]),[ge,Se]=s.useState(null),Ee=ge??oe,Ne=s.useCallback(z=>Se(z),[]),Te=s.useCallback(z=>{Se(z);const ie={...F.current,imageFocalX:z.focalX,imageFocalY:z.focalY,imageScale:z.scale};F.current=ie,l==null||l(ie)},[l]);s.useEffect(()=>{ge&&Math.abs(ge.focalX-oe.focalX)<1e-9&&Math.abs(ge.focalY-oe.focalY)<1e-9&&Math.abs(ge.scale-oe.scale)<1e-9&&Se(null)},[ge,oe]);const Ce=s.useMemo(()=>!$||!le?null:{onChange:Ne,onCommit:Te},[$,le,Ne,Te]),[g,Y]=s.useState(void 0),ee=s.useRef(void 0),ae=s.useCallback(z=>{const ie=ee.current;ie!==void 0&&Math.abs(ie-z)<.005||(ee.current=z,Y(z))},[]),ye=s.useMemo(()=>M&&typeof g=="number"?g:1,[g,M]),ne=z=>`calc(${z} * var(--${c}-fit, 1))`,B=s.useMemo(()=>{var H,be,re,Q,Pe;const z=(e==null?void 0:e.textFontSize)??.012,ie=Math.max((e==null?void 0:e.textLineHeight)??z,z);return{fontFamily:zo(e==null?void 0:e.textFontFamily),fontWeight:(H=e==null?void 0:e.textFontSettings)==null?void 0:H.fontWeight,fontStyle:(be=e==null?void 0:e.textFontSettings)==null?void 0:be.fontStyle,fontSize:ne(b.scalingValue(z,u)),lineHeight:ne(b.scalingValue(ie,u)),letterSpacing:ne(b.scalingValue((e==null?void 0:e.textLetterSpacing)??0,u)),wordSpacing:ne(b.scalingValue((e==null?void 0:e.textWordSpacing)??0,u)),textTransform:(re=e==null?void 0:e.textTextAppearance)==null?void 0:re.textTransform,textDecoration:(Q=e==null?void 0:e.textTextAppearance)==null?void 0:Q.textDecoration,fontVariant:(Pe=e==null?void 0:e.textTextAppearance)==null?void 0:Pe.fontVariant}},[e,u,c]),G={[`--${c}-text-color`]:(e==null?void 0:e.textColor)??"#000000",[`--${c}-link-color`]:(e==null?void 0:e.linkColor)??(e==null?void 0:e.textColor)??"#000000",[`--${c}-background-color`]:(e==null?void 0:e.backgroundColor)??"transparent"};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),a.jsx("div",{className:`${c}-wrapper`,style:{...G},children:a.jsx(NT,{P:c,item:y,shape:me,customPath:m,pathFit:f,viewBox:S,mode:w,align:N,allowOverflow:v,fitEnabled:M,scale:ye,onFitScale:ae,padding:U,columns:X,gutter:D,hyphenate:R,showOverflowIndicator:C,dropCapLines:W,dropCapSize:_,showGuides:(T||$)&&I,typography:B,imageUrl:w==="avoid"?e==null?void 0:e.image:null,imageFocalX:Ee.focalX,imageFocalY:Ee.focalY,imageScale:Ee.scale,imageCustomPath:ve,imagePathEdited:te,pathDragActive:V,pathCarryImage:k,onCarryImageConsumed:L,pathEditor:I?Z:null,imageEditor:I?Ce:null})})]})}const zT=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
28220
+ `,DT=1;function zT({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,isSelected:r,onUpdateSettings:l}){const{prefix:c}=b.useScopedStyles(),d=s.useMemo(()=>OT(c),[c]),u=n??!1,p=!!r||!!o,y=s.useMemo(()=>Array.isArray(t)?t[0]??{}:{},[t]),x=(e==null?void 0:e.shape)??"custom",m=(e==null?void 0:e.customPath)??"",f=(e==null?void 0:e.pathFit)??"stretch",S=s.useMemo(()=>WT(e==null?void 0:e.pathViewBox),[e==null?void 0:e.pathViewBox]),w=(e==null?void 0:e.shapeMode)==="B"?"avoid":"contain",N=(e==null?void 0:e.textAlign)??"left",v=((e==null?void 0:e.overflowMode)??"clip")==="visible",M=((e==null?void 0:e.fitText)??"off")==="on",E=((e==null?void 0:e.hyphenate)??"off")==="on",U=b.scalingValue((e==null?void 0:e.padding)??0,u),X=Math.max(1,Math.round((e==null?void 0:e.columns)??1)),D=b.scalingValue((e==null?void 0:e.columnGutter)??0,u),_=(e==null?void 0:e.dropCapSize)??DT,W=Math.max(1,Math.round((e==null?void 0:e.dropCapLines)??_)),T=u&&p&&!i,C=u&&!i,[q,R]=s.useState(!1);s.useEffect(()=>{if(!u||!p){R(!1);return}const z=()=>R(!0),ie=()=>R(!1),H=["ArticleEditor.Item:drag-start","ArticleEditor.Selection:resize-start","ArticleEditor.Selection:move-start"],be=["ArticleEditor.Item:drag-end","ArticleEditor.Selection:resize-end","ArticleEditor.Selection:move-end"];for(const re of H)window.addEventListener(re,z);for(const re of be)window.addEventListener(re,ie);return()=>{for(const re of H)window.removeEventListener(re,z);for(const re of be)window.removeEventListener(re,ie)}},[u,p]);const $=u&&p&&!i&&typeof l=="function",I=!q,j=Math.max(0,(e==null?void 0:e.pathSnap)??0),F=s.useRef(e??{}),K=s.useRef(""),P=[e==null?void 0:e.customPath,e==null?void 0:e.shape,e==null?void 0:e.pathFit,e==null?void 0:e.pathViewBox,e==null?void 0:e.imageScale,e==null?void 0:e.imageFocalX,e==null?void 0:e.imageFocalY,e==null?void 0:e.image].join("\0");if(P!==K.current)K.current=P,F.current=e??{};else if(e){const{customPath:z,shape:ie,pathFit:H,pathViewBox:be,imageScale:re,imageFocalX:Q,imageFocalY:Pe,image:Ae,...He}=e,Xe=F.current;for(const Ue of Object.keys(He))if(Xe[Ue]!==He[Ue]){F.current={...Xe,...He};break}}const[h,J]=s.useState(null),[V,he]=s.useState(!1),[k,ce]=s.useState(!1),L=s.useCallback(()=>ce(!1),[]),me=F.current.shape??x,te=!!(h&&(h.base===m||h.serialized===m)),ve=te&&h?h.serialized:m;s.useEffect(()=>{$||(he(!1),ce(!1))},[$]),s.useEffect(()=>{!h||V||h.serialized===m&&J(null)},[h,m,V]);const Le=s.useMemo(()=>{if(!$)return null;if(h&&(h.base===m||h.serialized===m))return h.contours;const z=ki(m);return z.length?z:null},[$,h,m]),de=!!(f==="viewbox"&&((e==null?void 0:e.pathViewBox)??"")===Js&&Le&&(x==="circle"||!Up(Le,S))),ue=s.useCallback((z,ie,H)=>{const be=Ho(z);if(J(re=>({base:re&&(re.base===m||re.serialized===m)?re.base:m,serialized:be,contours:z})),ie){const re=F.current,Q=H!=null&&H.preserveShape?re.shape:"custom",Pe={...re,shape:Q,customPath:be};F.current=Pe,l==null||l(Pe)}},[m,l]),Z=s.useMemo(()=>$?{contours:de?Le:null,snap:j,needsConversion:!de,onConvert:z=>{const ie=Ho(z);J({base:ie,serialized:ie,contours:z});const H={...F.current,pathFit:"viewbox",pathViewBox:Js,customPath:ie};F.current=H,l==null||l(H)},onChange:(z,ie)=>{he(!0),ce(!!(ie!=null&&ie.carryImage)),ue(z,!1)},onCommit:(z,ie)=>{ue(z,!0,ie),he(!1)}}:null,[$,de,Le,j,l,ue]),le=w==="avoid"&&!!(e!=null&&e.image),oe=s.useMemo(()=>({focalX:(e==null?void 0:e.imageFocalX)??.5,focalY:(e==null?void 0:e.imageFocalY)??.5,scale:(e==null?void 0:e.imageScale)??1}),[e==null?void 0:e.imageFocalX,e==null?void 0:e.imageFocalY,e==null?void 0:e.imageScale]),[ge,Se]=s.useState(null),Re=ge??oe,Ne=s.useCallback(z=>Se(z),[]),Te=s.useCallback(z=>{Se(z);const ie={...F.current,imageFocalX:z.focalX,imageFocalY:z.focalY,imageScale:z.scale};F.current=ie,l==null||l(ie)},[l]);s.useEffect(()=>{ge&&Math.abs(ge.focalX-oe.focalX)<1e-9&&Math.abs(ge.focalY-oe.focalY)<1e-9&&Math.abs(ge.scale-oe.scale)<1e-9&&Se(null)},[ge,oe]);const Ce=s.useMemo(()=>!$||!le?null:{onChange:Ne,onCommit:Te},[$,le,Ne,Te]),[g,Y]=s.useState(void 0),ee=s.useRef(void 0),ae=s.useCallback(z=>{const ie=ee.current;ie!==void 0&&Math.abs(ie-z)<.005||(ee.current=z,Y(z))},[]),ye=s.useMemo(()=>M&&typeof g=="number"?g:1,[g,M]),ne=z=>`calc(${z} * var(--${c}-fit, 1))`,B=s.useMemo(()=>{var H,be,re,Q,Pe;const z=(e==null?void 0:e.textFontSize)??.012,ie=Math.max((e==null?void 0:e.textLineHeight)??z,z);return{fontFamily:zo(e==null?void 0:e.textFontFamily),fontWeight:(H=e==null?void 0:e.textFontSettings)==null?void 0:H.fontWeight,fontStyle:(be=e==null?void 0:e.textFontSettings)==null?void 0:be.fontStyle,fontSize:ne(b.scalingValue(z,u)),lineHeight:ne(b.scalingValue(ie,u)),letterSpacing:ne(b.scalingValue((e==null?void 0:e.textLetterSpacing)??0,u)),wordSpacing:ne(b.scalingValue((e==null?void 0:e.textWordSpacing)??0,u)),textTransform:(re=e==null?void 0:e.textTextAppearance)==null?void 0:re.textTransform,textDecoration:(Q=e==null?void 0:e.textTextAppearance)==null?void 0:Q.textDecoration,fontVariant:(Pe=e==null?void 0:e.textTextAppearance)==null?void 0:Pe.fontVariant}},[e,u,c]),G={[`--${c}-text-color`]:(e==null?void 0:e.textColor)??"#000000",[`--${c}-link-color`]:(e==null?void 0:e.linkColor)??(e==null?void 0:e.textColor)??"#000000",[`--${c}-background-color`]:(e==null?void 0:e.backgroundColor)??"transparent"};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),a.jsx("div",{className:`${c}-wrapper`,style:{...G},children:a.jsx(_T,{P:c,item:y,shape:me,customPath:m,pathFit:f,viewBox:S,mode:w,align:N,allowOverflow:v,fitEnabled:M,scale:ye,onFitScale:ae,padding:U,columns:X,gutter:D,hyphenate:E,showOverflowIndicator:C,dropCapLines:W,dropCapSize:_,showGuides:(T||$)&&I,typography:B,imageUrl:w==="avoid"?e==null?void 0:e.image:null,imageFocalX:Re.focalX,imageFocalY:Re.focalY,imageScale:Re.scale,imageCustomPath:ve,imagePathEdited:te,pathDragActive:V,pathCarryImage:k,onCarryImageConsumed:L,pathEditor:I?Z:null,imageEditor:I?Ce:null})})]})}const BT=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
28221
28221
  import type React from 'react';
28222
28222
  import { CommonComponentProps } from '../props';
28223
28223
  import { scalingValue, useScopedStyles } from '../utils/index';
@@ -29055,4 +29055,4 @@ export function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode
29055
29055
  </>
29056
29056
  );
29057
29057
  }
29058
- `,du=[...Qp],BT={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},jT={type:"object",version:1,settings:{sizing:"manual",properties:{shape:{type:"string",scope:"layout",display:{type:"shape-select",isFilled:!0,enum:du},enum:du},customPath:{type:"string",scope:"layout",title:"Path",tooltip:"SVG path (M…) or a point list (0,0 100,0 50,100). Used when Shape is set to custom.",display:{type:"full-width-input",placeholder:"M0,0 C…"}},pathSnap:{type:"number",scope:"common",title:"Snap",tooltip:"Grid the points snap to while dragging, in path units (the path box is 100 x 100). 0 is off.",min:0,max:25,step:.5,display:{type:"numeric-input"}},pathFit:{type:"string",scope:"common",title:"Path fit",tooltip:"Stretch — the drawing fills the box. Viewbox — the drawing keeps its position in path coordinates (0–100).",display:{type:"toggle-cycle",enum:["stretch","viewbox"]}},shapeMode:{type:"string",scope:"common",title:"",tooltip:"A — text fills the path. B — text flows around the path.",display:{type:"radio-group"},enum:["A","B"]},fitText:{type:"string",scope:"common",title:"Fit text",tooltip:"Scales the type down until all text fits the path.",display:{type:"toggle-cycle",enum:["off","on"]}},hyphenate:{type:"string",scope:"common",title:"Hyphenate",tooltip:"Breaks long words between syllables, using the detected language of the text.",display:{type:"toggle-cycle",enum:["off","on"]}},padding:{type:"number",scope:"layout",title:"Padding",tooltip:"Insets the shape and its text on all sides.",min:0,display:{type:"numeric-input"}},columns:{type:"number",scope:"layout",title:"Columns",tooltip:"Splits the text area into columns. Text fills them left to right.",min:1,max:24,step:1,display:{type:"common-numeric-input"}},columnGutter:{type:"number",scope:"layout",title:"Columns gap",tooltip:"Space between columns.",min:0,display:{type:"numeric-input"}},dropCapLines:{type:"number",scope:"common",title:"Drop cap lines",min:1,max:8,step:1,display:{type:"numeric-input"}},dropCapSize:{type:"number",scope:"common",title:"Drop cap size",tooltip:"Height of the drop cap, in lines of body text.",min:1,max:8,step:1,display:{type:"common-numeric-input"}},image:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},backgroundColor:{type:"string",scope:"common",title:"BG Shape",display:{type:"settings-color-picker"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...BT.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},textAlign:{type:"string",scope:"layout",title:"",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"style-panel-color-picker"}},linkColor:{type:"string",scope:"common",title:"Link Default",display:{type:"style-panel-color-picker"}}},defaults:{...Up("circle"),pathSnap:0,shapeMode:"A",fitText:"off",hyphenate:"off",dropCapLines:1,dropCapSize:1,image:"01M3QM74XGCCGW8DXMAHA0RGGH",backgroundColor:"rgba(0, 0, 0, 0)",textFontFamily:"Basteleur",textFontSettings:{fontWeight:400,fontStyle:"normal"},textAlign:"center",textTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",linkColor:"#000000"},layoutDefaults:{m:{textFontSize:.037,textLineHeight:.048,textLetterSpacing:0,textWordSpacing:0,padding:0,columns:1,columnGutter:.04},t:{textFontSize:.018,textLineHeight:.024,textLetterSpacing:0,textWordSpacing:0,padding:0,columns:1,columnGutter:.02},d:{textFontSize:.032,textLineHeight:.0155,textLetterSpacing:-.001,textWordSpacing:0,padding:0,columns:1,columnGutter:.015}},layout:["__componentName__","shape","customPath","pathSnap","pathFit","shapeMode","fitText","hyphenate","padding","columns","columnGutter","dropCapLines","dropCapSize","image"],displayRules:[{if:{name:"shapeMode",value:"B",isNotEqual:!0},then:{name:"properties.image.display.visible",value:!1}},{if:{name:"shapeMode",value:"B",isNotEqual:!0},then:{name:"properties.padding.display.visible",value:!1}},{if:{name:"shapeMode",value:"A"},then:{name:"properties.shape.display.isFilled",value:!0}},{if:{name:"shapeMode",value:"B"},then:{name:"properties.shape.display.isFilled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["shapeMode"]},{type:"row",title:"Shape",items:["shape"]},{type:"row",items:["dropCapSize","hyphenate"]},{type:"row",items:["padding","image"]},{type:"row",items:["columns","columnGutter"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"",items:["textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textAlign","textTextAppearance"]}]}],paletteBookmark:{items:["textColor","linkColor","backgroundColor"],panelIds:["general","typeStyle"]},content:{type:"array",max:1,settings:{addItemWithoutImage:!0,addItemFromFileExplorer:!1},display:{type:"array"},items:{type:"object",properties:{text:{label:"Text",placeholder:"Add Text...",display:{type:"rich-text"}}}},default:[{text:[{type:"paragraph",children:[{text:"Le loro superficie, excelso Duca, fra loro similmente possiamo dire al medesimo modo esser proportionali commo de lor massa corporea s'è dicto, cioè irrationali per la malitia de la figura pentagona che in lo duodecedron se interpone. Ma de l'altre possano a le volte essere rationali, commo quelle del tetracedron, cubo, octocedron, per essere triangole e quadrate e note in proportione con lo diametro de la loro sphera in la quale si formano, commo s'è veduto di sopra."}]}]}]}},VT={element:DT,id:"pretext",name:"Shaped Type",category:"typography",version:1,normalizeLayoutSettingsUpdate:(e,t)=>{const n=e.shape;return typeof n!="string"||n==="custom"||Qp.indexOf(n)===-1||(t==null?void 0:t.shape)===n?e:{...e,...Up(n)}},defaultSize:{d:{width:1420,height:640},t:{width:710,height:320},m:{width:355,height:160}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/pretext.png"},schema:jT,sourceCode:zT,assetsPaths:{content:[],parameters:[{path:"image",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}},GT=[bh,Lh,Ib,bf,Pf,Of,oy,Ly,Fy,zy,fv,d0,hx,Cx,ab,yb,Wb,FS,Kb,QS,Aw,v$,fC,VT];exports.getAvailableStatePanels=b.getAvailableStatePanels;exports.getUnavailableStates=b.getUnavailableStates;exports.isPanelAvailable=b.isPanelAvailable;exports.components=GT;exports.isSchemaV1=um;
29058
+ `,uu=[...Zp],jT={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},VT={type:"object",version:1,settings:{sizing:"manual",properties:{shape:{type:"string",scope:"layout",display:{type:"shape-select",isFilled:!0,enum:uu},enum:uu},customPath:{type:"string",scope:"layout",title:"Path",tooltip:"SVG path (M…) or a point list (0,0 100,0 50,100). Used when Shape is set to custom.",display:{type:"full-width-input",placeholder:"M0,0 C…"}},pathSnap:{type:"number",scope:"common",title:"Snap",tooltip:"Grid the points snap to while dragging, in path units (the path box is 100 x 100). 0 is off.",min:0,max:25,step:.5,display:{type:"numeric-input"}},pathFit:{type:"string",scope:"common",title:"Path fit",tooltip:"Stretch — the drawing fills the box. Viewbox — the drawing keeps its position in path coordinates (0–100).",display:{type:"toggle-cycle",enum:["stretch","viewbox"]}},shapeMode:{type:"string",scope:"common",title:"",tooltip:"A — text fills the path. B — text flows around the path.",display:{type:"radio-group"},enum:["A","B"]},fitText:{type:"string",scope:"common",title:"Fit text",tooltip:"Scales the type down until all text fits the path.",display:{type:"toggle-cycle",enum:["off","on"]}},hyphenate:{type:"string",scope:"common",title:"Hyphenate",tooltip:"Breaks long words between syllables, using the detected language of the text.",display:{type:"toggle-cycle",enum:["off","on"]}},padding:{type:"number",scope:"layout",title:"Padding",tooltip:"Insets the shape and its text on all sides.",min:0,display:{type:"numeric-input"}},columns:{type:"number",scope:"layout",title:"Columns",tooltip:"Splits the text area into columns. Text fills them left to right.",min:1,max:24,step:1,display:{type:"common-numeric-input"}},columnGutter:{type:"number",scope:"layout",title:"Columns gap",tooltip:"Space between columns.",min:0,display:{type:"numeric-input"}},dropCapLines:{type:"number",scope:"common",title:"Drop cap lines",min:1,max:8,step:1,display:{type:"numeric-input"}},dropCapSize:{type:"number",scope:"common",title:"Drop cap size",tooltip:"Height of the drop cap, in lines of body text.",min:1,max:8,step:1,display:{type:"common-numeric-input"}},image:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},backgroundColor:{type:"string",scope:"common",title:"BG Shape",display:{type:"settings-color-picker"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...jT.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},textAlign:{type:"string",scope:"layout",title:"",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"style-panel-color-picker"}},linkColor:{type:"string",scope:"common",title:"Link Default",display:{type:"style-panel-color-picker"}}},defaults:{...qp("circle"),pathSnap:0,shapeMode:"A",fitText:"off",hyphenate:"off",dropCapLines:1,dropCapSize:1,image:"01M3QM74XGCCGW8DXMAHA0RGGH",backgroundColor:"rgba(0, 0, 0, 0)",textFontFamily:"Basteleur",textFontSettings:{fontWeight:400,fontStyle:"normal"},textAlign:"center",textTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",linkColor:"#000000"},layoutDefaults:{m:{textFontSize:.037,textLineHeight:.048,textLetterSpacing:0,textWordSpacing:0,padding:0,columns:1,columnGutter:.04},t:{textFontSize:.018,textLineHeight:.024,textLetterSpacing:0,textWordSpacing:0,padding:0,columns:1,columnGutter:.02},d:{textFontSize:.032,textLineHeight:.0155,textLetterSpacing:-.001,textWordSpacing:0,padding:0,columns:1,columnGutter:.015}},layout:["__componentName__","shape","customPath","pathSnap","pathFit","shapeMode","fitText","hyphenate","padding","columns","columnGutter","dropCapLines","dropCapSize","image"],displayRules:[{if:{name:"shapeMode",value:"B",isNotEqual:!0},then:{name:"properties.image.display.visible",value:!1}},{if:{name:"shapeMode",value:"B",isNotEqual:!0},then:{name:"properties.padding.display.visible",value:!1}},{if:{name:"shapeMode",value:"A"},then:{name:"properties.shape.display.isFilled",value:!0}},{if:{name:"shapeMode",value:"B"},then:{name:"properties.shape.display.isFilled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["shapeMode"]},{type:"row",title:"Shape",items:["shape"]},{type:"row",items:["dropCapSize","hyphenate"]},{type:"row",items:["padding","image"]},{type:"row",items:["columns","columnGutter"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"",items:["textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textAlign","textTextAppearance"]}]}],paletteBookmark:{items:["textColor","linkColor","backgroundColor"],panelIds:["general","typeStyle"]},content:{type:"array",max:1,settings:{addItemWithoutImage:!0,addItemFromFileExplorer:!1},display:{type:"array"},items:{type:"object",properties:{text:{label:"Text",placeholder:"Add Text...",display:{type:"rich-text"}}}},default:[{text:[{type:"paragraph",children:[{text:"Le loro superficie, excelso Duca, fra loro similmente possiamo dire al medesimo modo esser proportionali commo de lor massa corporea s'è dicto, cioè irrationali per la malitia de la figura pentagona che in lo duodecedron se interpone. Ma de l'altre possano a le volte essere rationali, commo quelle del tetracedron, cubo, octocedron, per essere triangole e quadrate e note in proportione con lo diametro de la loro sphera in la quale si formano, commo s'è veduto di sopra."}]}]}]}},GT={element:zT,id:"pretext",name:"Shaped Type",category:"typography",version:1,normalizeLayoutSettingsUpdate:(e,t)=>{const n=e.shape;return typeof n!="string"||n==="custom"||Zp.indexOf(n)===-1||(t==null?void 0:t.shape)===n?e:{...e,...qp(n)}},defaultSize:{d:{width:1420,height:640},t:{width:710,height:320},m:{width:355,height:160}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/pretext.png"},schema:VT,sourceCode:BT,assetsPaths:{content:[],parameters:[{path:"image",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}},XT=[Sh,Mh,Lb,Sf,Ef,Df,ry,My,Ny,By,yv,u0,fx,Tx,sb,vb,Ob,NS,Yb,ZS,Fw,x$,yC,GT];function sa(e){return{assetId:e,name:"",type:"image",objectFit:"cover"}}function UT(e,{text:t,images:n}){switch(e){case"media-pair-list-input":return n.map(i=>({media:[sa(i),sa("")]}));case"media-list-input":return n.map(sa);case"media-input":return n.length>0?sa(n[0]):{assetId:"",name:""};case"rich-text":return[{type:"paragraph",children:[{text:t}]}];case"link-input":return{type:"url",value:"",target:"self"};default:return t}}function qT(e,{pageId:t,slug:n}){return e==="link-input"?{type:"page",value:t,target:"self"}:`/${n}`}function KT(e){var n;const t=((n=e==null?void 0:e.items)==null?void 0:n.properties)??{};return Object.entries(t).map(([i,o])=>{var l;const r=(l=o.display)==null?void 0:l.type;return{fieldKey:i,...o.contentKey!==void 0?{contentKey:o.contentKey}:{},fromEntry:c=>UT(r,c),toPage:c=>qT(r,c)}})}exports.getAvailableStatePanels=b.getAvailableStatePanels;exports.getUnavailableStates=b.getUnavailableStates;exports.isPanelAvailable=b.isPanelAvailable;exports.components=XT;exports.getPostFieldBindings=KT;exports.isSchemaV1=pm;