@cntrl-site/components 1.0.97-alpha.1 → 1.0.97-alpha.2

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"),Ct=require("classnames"),F=require("./panelAvailability-D8c7cdbu.js"),Xn=require("react-dom");function rg(e){return e.type==="object"&&e.version===1}const ag="ControlSlider-module__wrapper___sHEkd",sg="ControlSlider-module__hoverArrow___A-dOH",lg="ControlSlider-module__sliderItem___QQSkR",cg="ControlSlider-module__sliderImage___9hRl-",dg="ControlSlider-module__arrow___05ghY",ug="ControlSlider-module__arrowVertical___tBfVN",pg="ControlSlider-module__nextArrow___-30Yc",gg="ControlSlider-module__arrowInner___aEra3",mg="ControlSlider-module__arrowIcon___S4ztF",hg="ControlSlider-module__arrowImg___2dwJW",fg="ControlSlider-module__mirror___brd6U",yg="ControlSlider-module__pagination___bicLF",vg="ControlSlider-module__paginationInner___bT-P-",xg="ControlSlider-module__paginationVertical___zYqKw",bg="ControlSlider-module__paginationItem___nTRbk",Sg="ControlSlider-module__dot___p1Qun",wg="ControlSlider-module__activeDot___LHFaj",$g="ControlSlider-module__paginationInsideBottom___R3FWn",Cg="ControlSlider-module__paginationInsideTop___V-qb-",Tg="ControlSlider-module__paginationOutsideBottom___14w8D",Lg="ControlSlider-module__paginationOutsideTop___SCLqB",Pg="ControlSlider-module__paginationInsideLeft___yOBRZ",Mg="ControlSlider-module__paginationInsideRight___Rtt3o",Ig="ControlSlider-module__paginationOutsideLeft___lahaw",Rg="ControlSlider-module__paginationOutsideRight___EtuQa",Eg="ControlSlider-module__imgWrapper___UjEgB",kg="ControlSlider-module__captionBlock___dJ6-j",Ag="ControlSlider-module__captionTextWrapper___HFlpf",Fg="ControlSlider-module__captionText___uGBVc",Ng="ControlSlider-module__active___WZK4G",_g="ControlSlider-module__withPointerEvents___t-18M",Hg="ControlSlider-module__topLeftAlignment___zjnGM",Wg="ControlSlider-module__topCenterAlignment___gD1xW",Og="ControlSlider-module__topRightAlignment___NMapS",Dg="ControlSlider-module__middleLeftAlignment___OnUrY",Bg="ControlSlider-module__middleCenterAlignment___Tdkl0",zg="ControlSlider-module__middleRightAlignment___wEbfX",jg="ControlSlider-module__bottomLeftAlignment___cTP2-",Vg="ControlSlider-module__bottomCenterAlignment___c54fB",Gg="ControlSlider-module__bottomRightAlignment___kEwrz",Xg="ControlSlider-module__clickOverlay___DZA28",Ug="ControlSlider-module__contain___pLyq7",qg="ControlSlider-module__cover___KdDat",$t={wrapper:ag,hoverArrow:sg,sliderItem:lg,sliderImage:cg,arrow:dg,arrowVertical:ug,nextArrow:pg,arrowInner:gg,arrowIcon:mg,arrowImg:hg,mirror:fg,pagination:yg,paginationInner:vg,paginationVertical:xg,paginationItem:bg,dot:Sg,activeDot:wg,paginationInsideBottom:$g,paginationInsideTop:Cg,paginationOutsideBottom:Tg,paginationOutsideTop:Lg,paginationInsideLeft:Pg,paginationInsideRight:Mg,paginationOutsideLeft:Ig,paginationOutsideRight:Rg,imgWrapper:Eg,captionBlock:kg,captionTextWrapper:Ag,captionText:Fg,active:Ng,withPointerEvents:_g,topLeftAlignment:Hg,topCenterAlignment:Wg,topRightAlignment:Og,middleLeftAlignment:Dg,middleCenterAlignment:Bg,middleRightAlignment:zg,bottomLeftAlignment:jg,bottomCenterAlignment:Vg,bottomRightAlignment:Gg,clickOverlay:Xg,contain:Ug,cover:qg};function Yg(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 Kg(e,t,n){return t&&Yg(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var nc="(prefers-reduced-motion: reduce)",go=1,Qg=2,$o=3,Ho=4,Cr=5,sa=6,fa=7,Zg={CREATED:go,MOUNTED:Qg,IDLE:$o,MOVING:Ho,SCROLLING:Cr,DRAGGING:sa,DESTROYED:fa};function li(e){e.length=0}function Ri(e,t,n){return Array.prototype.slice.call(e,t,n)}function Jt(e){return e.bind.apply(e,[null].concat(Ri(arguments,1)))}var ru=setTimeout,_s=function(){};function ic(e){return requestAnimationFrame(e)}function Ia(e,t){return typeof t===e}function dr(e){return!pl(e)&&Ia("object",e)}var ul=Array.isArray,au=Jt(Ia,"function"),Ti=Jt(Ia,"string"),Tr=Jt(Ia,"undefined");function pl(e){return e===null}function su(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Lr(e){return ul(e)?e:[e]}function Rn(e,t){Lr(e).forEach(t)}function gl(e,t){return e.indexOf(t)>-1}function la(e,t){return e.push.apply(e,Lr(t)),e}function ii(e,t,n){e&&Rn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function jn(e,t){ii(e,Ti(t)?t.split(" "):t,!0)}function Pr(e,t){Rn(t,e.appendChild.bind(e))}function ml(e,t){Rn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function ur(e,t){return su(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function lu(e,t){var n=e?Ri(e.children):[];return t?n.filter(function(i){return ur(i,t)}):n}function Mr(e,t){return t?lu(e,t)[0]:e.firstElementChild}var pr=Object.keys;function Gi(e,t,n){return e&&(n?pr(e).reverse():pr(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function gr(e){return Ri(arguments,1).forEach(function(t){Gi(t,function(n,i){e[i]=t[i]})}),e}function Si(e){return Ri(arguments,1).forEach(function(t){Gi(t,function(n,i){ul(n)?e[i]=n.slice():dr(n)?e[i]=Si({},dr(e[i])?e[i]:{},n):e[i]=n})}),e}function oc(e,t){Rn(t||pr(e),function(n){delete e[n]})}function Vn(e,t){Rn(e,function(n){Rn(t,function(i){n&&n.removeAttribute(i)})})}function Nt(e,t,n){dr(t)?Gi(t,function(i,o){Nt(e,o,i)}):Rn(e,function(i){pl(n)||n===""?Vn(i,t):i.setAttribute(t,String(n))})}function vo(e,t,n){var i=document.createElement(e);return t&&(Ti(t)?jn(i,t):Nt(i,t)),n&&Pr(n,i),i}function Fn(e,t,n){if(Tr(n))return getComputedStyle(e)[t];pl(n)||(e.style[t]=""+n)}function mr(e,t){Fn(e,"display",t)}function cu(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Nn(e,t){return e.getAttribute(t)}function rc(e,t){return e&&e.classList.contains(t)}function Ln(e){return e.getBoundingClientRect()}function Ui(e){Rn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function du(e){return Mr(new DOMParser().parseFromString(e,"text/html").body)}function ti(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function uu(e,t){return e&&e.querySelector(t)}function hl(e,t){return t?Ri(e.querySelectorAll(t)):[]}function oi(e,t){ii(e,t,!1)}function Hs(e){return e.timeStamp}function Ai(e){return Ti(e)?e:e?e+"px":""}var Ir="splide",fl="data-"+Ir;function ar(e,t){if(!e)throw new Error("["+Ir+"] "+(t||""))}var Li=Math.min,ya=Math.max,va=Math.floor,hr=Math.ceil,vn=Math.abs;function pu(e,t,n){return vn(e-t)<n}function ca(e,t,n,i){var o=Li(t,n),r=ya(t,n);return i?o<e&&e<r:o<=e&&e<=r}function lo(e,t,n){var i=Li(t,n),o=ya(t,n);return Li(ya(i,e),o)}function Ws(e){return+(e>0)-+(e<0)}function Os(e,t){return Rn(t,function(n){e=e.replace("%s",""+n)}),e}function yl(e){return e<10?"0"+e:""+e}var ac={};function Jg(e){return""+e+yl(ac[e]=(ac[e]||0)+1)}function gu(){var e=[];function t(l,c,d,u){o(l,c,function(p,y,v){var g="addEventListener"in p,m=g?p.removeEventListener.bind(p,y,d,u):p.removeListener.bind(p,d);g?p.addEventListener(y,d,u):p.addListener(d),e.push([p,y,v,d,m])})}function n(l,c,d){o(l,c,function(u,p,y){e=e.filter(function(v){return v[0]===u&&v[1]===p&&v[2]===y&&(!d||v[3]===d)?(v[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){Rn(l,function(u){u&&Rn(c,function(p){p.split(" ").forEach(function(y){var v=y.split(".");d(u,v[0],v[1])})})})}function r(){e.forEach(function(l){l[4]()}),li(e)}return{bind:t,unbind:n,dispatch:i,destroy:r}}var Ei="mounted",Ds="ready",ci="move",Wo="moved",vl="click",mu="active",hu="inactive",fu="visible",yu="hidden",sn="refresh",mn="updated",Co="resize",Ra="resized",vu="drag",xu="dragging",bu="dragged",Ea="scroll",Ki="scrolled",em="overflow",xl="destroy",Su="arrows:mounted",wu="arrows:updated",$u="pagination:mounted",Cu="pagination:updated",bl="navigation:mounted",Sl="autoplay:play",Tu="autoplay:playing",wl="autoplay:pause",$l="lazyload:loaded",Lu="sk",Pu="sh",xa="ei";function nn(e){var t=e?e.event.bus:document.createDocumentFragment(),n=gu();function i(r,l){n.bind(t,Lr(r).join(" "),function(c){l.apply(l,ul(c.detail)?c.detail:[])})}function o(r){n.dispatch(t,r,Ri(arguments,1))}return e&&e.event.on(xl,n.destroy),gr(n,{bus:t,on:i,off:Jt(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?Li((o()-r)/e,1):1,n&&n(l),l>=1&&(t(),r=o(),i&&++u>=i))return v();c=ic(p)}}function y(R){R||m(),r=o()-(R?l*e:0),d=!1,c=ic(p)}function v(){d=!0}function g(){r=o(),l=0,n&&n(l)}function m(){c&&cancelAnimationFrame(c),l=0,c=0,d=!0}function x(R){e=R}function b(){return d}return{start:y,rewind:g,pause:v,cancel:m,set:x,isPaused:b}}function tm(e){var t=e;function n(o){t=o}function i(o){return gl(Lr(o),t)}return{set:n,is:i}}function nm(e,t){var n=ka(0,e,null,1);return function(){n.isPaused()&&n.start()}}function im(e,t,n){var i=e.state,o=n.breakpoints||{},r=n.reducedMotion||{},l=gu(),c=[];function d(){var m=n.mediaQuery==="min";pr(o).sort(function(x,b){return m?+x-+b:+b-+x}).forEach(function(x){p(o[x],"("+(m?"min":"max")+"-width:"+x+"px)")}),p(r,nc),y()}function u(m){m&&l.destroy()}function p(m,x){var b=matchMedia(x);l.bind(b,"change",y),c.push([m,b])}function y(){var m=i.is(fa),x=n.direction,b=c.reduce(function(R,f){return Si(R,f[1].matches?f[0]:{})},{});oc(n),g(b),n.destroy?e.destroy(n.destroy==="completely"):m?(u(!0),e.mount()):x!==n.direction&&e.refresh()}function v(m){matchMedia(nc).matches&&(m?Si(n,r):oc(n,pr(r)))}function g(m,x,b){Si(n,m),x&&Si(Object.getPrototypeOf(n),m),(b||!i.is(go))&&e.emit(mn,n)}return{setup:d,destroy:u,reduce:v,set:g}}var Aa="Arrow",Fa=Aa+"Left",Na=Aa+"Right",Mu=Aa+"Up",Iu=Aa+"Down",sc="rtl",_a="ttb",qa={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Mu,Na],ArrowRight:[Iu,Fa]};function om(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 ri="role",xo="tabindex",rm="disabled",_n="aria-",Rr=_n+"controls",Ru=_n+"current",lc=_n+"selected",Mn=_n+"label",Cl=_n+"labelledby",Eu=_n+"hidden",Tl=_n+"orientation",fr=_n+"roledescription",cc=_n+"live",dc=_n+"busy",uc=_n+"atomic",Ll=[ri,xo,rm,Rr,Ru,Mn,Cl,Eu,Tl,fr],Un=Ir+"__",ki="is-",Ya=Ir,pc=Un+"track",am=Un+"list",Ha=Un+"slide",ku=Ha+"--clone",sm=Ha+"__container",Pl=Un+"arrows",Wa=Un+"arrow",Au=Wa+"--prev",Fu=Wa+"--next",Oa=Un+"pagination",Nu=Oa+"__page",lm=Un+"progress",cm=lm+"__bar",dm=Un+"toggle",um=Un+"spinner",pm=Un+"sr",gm=ki+"initialized",qi=ki+"active",_u=ki+"prev",Hu=ki+"next",Bs=ki+"visible",zs=ki+"loading",Wu=ki+"focus-in",Ou=ki+"overflow",mm=[qi,Bs,_u,Hu,zs,Wu,Ou],hm={slide:Ha,clone:ku,arrows:Pl,arrow:Wa,prev:Au,next:Fu,pagination:Oa,page:Nu,spinner:um};function fm(e,t){if(au(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!ur(n,t);)n=n.parentElement;return n}var ym=5,gc=200,Du="touchstart mousedown",Ka="touchmove mousemove",Qa="touchend touchcancel mouseup click";function vm(e,t,n){var i=nn(e),o=i.on,r=i.bind,l=e.root,c=n.i18n,d={},u=[],p=[],y=[],v,g,m;function x(){S(),W(),f()}function b(){o(sn,R),o(sn,x),o(mn,f),r(document,Du+" keydown",function(P){m=P.type==="keydown"},{capture:!0}),r(l,"focusin",function(){ii(l,Wu,!!m)})}function R(P){var _=Ll.concat("style");li(u),oi(l,p),oi(v,y),Vn([v,g],_),Vn(l,P?_:["style",fr])}function f(){oi(l,p),oi(v,y),p=z(Ya),y=z(pc),jn(l,p),jn(v,y),Nt(l,Mn,n.label),Nt(l,Cl,n.labelledby)}function S(){v=q("."+pc),g=Mr(v,"."+am),ar(v&&g,"A track/list element is missing."),la(u,lu(g,"."+Ha+":not(."+ku+")")),Gi({arrows:Pl,pagination:Oa,prev:Au,next:Fu,bar:cm,toggle:dm},function(P,_){d[_]=q("."+P)}),gr(d,{root:l,track:v,list:g,slides:u})}function W(){var P=l.id||Jg(Ir),_=n.role;l.id=P,v.id=v.id||P+"-track",g.id=g.id||P+"-list",!Nn(l,ri)&&l.tagName!=="SECTION"&&_&&Nt(l,ri,_),Nt(l,fr,c.carousel),Nt(g,ri,"presentation")}function q(P){var _=uu(l,P);return _&&fm(_,"."+Ya)===l?_:void 0}function z(P){return[P+"--"+n.type,P+"--"+n.direction,n.drag&&P+"--draggable",n.isNavigation&&P+"--nav",P===Ya&&qi]}return gr(d,{setup:x,mount:b,destroy:R})}var To="slide",Oo="loop",Er="fade";function xm(e,t,n,i){var o=nn(e),r=o.on,l=o.emit,c=o.bind,d=e.Components,u=e.root,p=e.options,y=p.isNavigation,v=p.updateOnMove,g=p.i18n,m=p.pagination,x=p.slideFocus,b=d.Direction.resolve,R=Nn(i,"style"),f=Nn(i,Mn),S=n>-1,W=Mr(i,"."+sm),q;function z(){S||(i.id=u.id+"-slide"+yl(t+1),Nt(i,ri,m?"tabpanel":"group"),Nt(i,fr,g.slide),Nt(i,Mn,f||Os(g.slideLabel,[t+1,e.length]))),P()}function P(){c(i,"click",Jt(l,vl,U)),c(i,"keydown",Jt(l,Lu,U)),r([Wo,Pu,Ki],L),r(bl,G),v&&r(ci,$)}function _(){q=!0,o.destroy(),oi(i,mm),Vn(i,Ll),Nt(i,"style",R),Nt(i,Mn,f||"")}function G(){var M=e.splides.map(function(A){var j=A.splide.Components.Slides.getAt(t);return j?j.slide.id:""}).join(" ");Nt(i,Mn,Os(g.slideX,(S?n:t)+1)),Nt(i,Rr,M),Nt(i,ri,x?"button":""),x&&Vn(i,fr)}function $(){q||L()}function L(){if(!q){var M=e.index;D(),E(),ii(i,_u,t===M-1),ii(i,Hu,t===M+1)}}function D(){var M=C();M!==rc(i,qi)&&(ii(i,qi,M),Nt(i,Ru,y&&M||""),l(M?mu:hu,U))}function E(){var M=V(),A=!M&&(!C()||S);if(e.state.is([Ho,Cr])||Nt(i,Eu,A||""),Nt(hl(i,p.focusableNodes||""),xo,A?-1:""),x&&Nt(i,xo,A?-1:0),M!==rc(i,Bs)&&(ii(i,Bs,M),l(M?fu:yu,U)),!M&&document.activeElement===i){var j=d.Slides.getAt(e.index);j&&cu(j.slide)}}function T(M,A,j){Fn(j&&W||i,M,A)}function C(){var M=e.index;return M===t||p.cloneStatus&&M===n}function V(){if(e.is(Er))return C();var M=Ln(d.Elements.track),A=Ln(i),j=b("left",!0),ie=b("right",!0);return va(M[j])<=hr(A[j])&&va(A[ie])<=hr(M[ie])}function w(M,A){var j=vn(M-t);return!S&&(p.rewind||e.is(Oo))&&(j=Li(j,e.length-j)),j<=A}var U={index:t,slideIndex:n,slide:i,container:W,isClone:S,mount:z,destroy:_,update:L,style:T,isWithin:w};return U}function bm(e,t,n){var i=nn(e),o=i.on,r=i.emit,l=i.bind,c=t.Elements,d=c.slides,u=c.list,p=[];function y(){v(),o(sn,g),o(sn,v)}function v(){d.forEach(function(L,D){x(L,D,-1)})}function g(){q(function(L){L.destroy()}),li(p)}function m(){q(function(L){L.update()})}function x(L,D,E){var T=xm(e,D,E,L);T.mount(),p.push(T),p.sort(function(C,V){return C.index-V.index})}function b(L){return L?z(function(D){return!D.isClone}):p}function R(L){var D=t.Controller,E=D.toIndex(L),T=D.hasFocus()?1:n.perPage;return z(function(C){return ca(C.index,E,E+T-1)})}function f(L){return z(L)[0]}function S(L,D){Rn(L,function(E){if(Ti(E)&&(E=du(E)),su(E)){var T=d[D];T?ml(E,T):Pr(u,E),jn(E,n.classes.slide),_(E,Jt(r,Co))}}),r(sn)}function W(L){Ui(z(L).map(function(D){return D.slide})),r(sn)}function q(L,D){b(D).forEach(L)}function z(L){return p.filter(au(L)?L:function(D){return Ti(L)?ur(D.slide,L):gl(Lr(L),D.index)})}function P(L,D,E){q(function(T){T.style(L,D,E)})}function _(L,D){var E=hl(L,"img"),T=E.length;T?E.forEach(function(C){l(C,"load error",function(){--T||D()})}):D()}function G(L){return L?d.length:p.length}function $(){return p.length>n.perPage}return{mount:y,destroy:g,update:m,register:x,get:b,getIn:R,getAt:f,add:S,remove:W,forEach:q,filter:z,style:P,getLength:G,isEnough:$}}function Sm(e,t,n){var i=nn(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,v=u.list,g=c.getAt,m=c.style,x,b,R;function f(){S(),r(window,"resize load",nm(Jt(l,Co))),o([mn,sn],S),o(Co,W)}function S(){x=n.direction===_a,Fn(p,"maxWidth",Ai(n.width)),Fn(y,d("paddingLeft"),q(!1)),Fn(y,d("paddingRight"),q(!0)),W(!0)}function W(U){var M=Ln(p);(U||b.width!==M.width||b.height!==M.height)&&(Fn(y,"height",z()),m(d("marginRight"),Ai(n.gap)),m("width",_()),m("height",G(),!0),b=M,l(Ra),R!==(R=w())&&(ii(p,Ou,R),l(em,R)))}function q(U){var M=n.padding,A=d(U?"right":"left");return M&&Ai(M[A]||(dr(M)?0:M))||"0px"}function z(){var U="";return x&&(U=P(),ar(U,"height or heightRatio is missing."),U="calc("+U+" - "+q(!1)+" - "+q(!0)+")"),U}function P(){return Ai(n.height||Ln(v).width*n.heightRatio)}function _(){return n.autoWidth?null:Ai(n.fixedWidth)||(x?"":$())}function G(){return Ai(n.fixedHeight)||(x?n.autoHeight?null:$():P())}function $(){var U=Ai(n.gap);return"calc((100%"+(U&&" + "+U)+")/"+(n.perPage||1)+(U&&" - "+U)+")"}function L(){return Ln(v)[d("width")]}function D(U,M){var A=g(U||0);return A?Ln(A.slide)[d("width")]+(M?0:C()):0}function E(U,M){var A=g(U);if(A){var j=Ln(A.slide)[d("right")],ie=Ln(v)[d("left")];return vn(j-ie)+(M?0:C())}return 0}function T(U){return E(e.length-1)-E(0)+D(0,U)}function C(){var U=g(0);return U&&parseFloat(Fn(U.slide,d("marginRight")))||0}function V(U){return parseFloat(Fn(y,d("padding"+(U?"Right":"Left"))))||0}function w(){return e.is(Er)||T(!0)>L()}return{mount:f,resize:W,listSize:L,slideSize:D,sliderSize:T,totalSize:E,getPadding:V,isOverflow:w}}var wm=2;function $m(e,t,n){var i=nn(e),o=i.on,r=t.Elements,l=t.Slides,c=t.Direction.resolve,d=[],u;function p(){o(sn,y),o([mn,Co],g),(u=b())&&(m(u),t.Layout.resize(!0))}function y(){v(),p()}function v(){Ui(d),li(d),i.destroy()}function g(){var R=b();u!==R&&(u<R||!R)&&i.emit(sn)}function m(R){var f=l.get().slice(),S=f.length;if(S){for(;f.length<R;)la(f,f);la(f.slice(-R),f.slice(0,R)).forEach(function(W,q){var z=q<R,P=x(W.slide,q);z?ml(P,f[0].slide):Pr(r.list,P),la(d,P),l.register(P,q-R+(z?0:S),W.index)})}}function x(R,f){var S=R.cloneNode(!0);return jn(S,n.classes.clone),S.id=e.root.id+"-clone"+yl(f+1),S}function b(){var R=n.clones;if(!e.is(Oo))R=0;else if(Tr(R)){var f=n[c("fixedWidth")]&&t.Layout.slideSize(0),S=f&&hr(Ln(r.track)[c("width")]/f);R=S||n[c("autoWidth")]&&e.length||n.perPage*wm}return R}return{mount:p,destroy:v}}function Cm(e,t,n){var i=nn(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,v=c.sliderSize,g=t.Direction,m=g.resolve,x=g.orient,b=t.Elements,R=b.list,f=b.track,S;function W(){S=t.Transition,o([Ei,Ra,mn,sn],q)}function q(){t.Controller.isBusy()||(t.Scroll.cancel(),P(e.index),t.Slides.update())}function z(A,j,ie,ae){A!==j&&U(A>ie)&&(L(),_($(T(),A>ie),!0)),l(Ho),r(ci,j,ie,A),S.start(j,function(){l($o),r(Wo,j,ie,A),ae&&ae()})}function P(A){_(E(A,!0))}function _(A,j){if(!e.is(Er)){var ie=j?A:G(A);Fn(R,"transform","translate"+m("X")+"("+ie+"px)"),A!==ie&&r(Pu)}}function G(A){if(e.is(Oo)){var j=D(A),ie=j>t.Controller.getEnd(),ae=j<0;(ae||ie)&&(A=$(A,ie))}return A}function $(A,j){var ie=A-w(j),ae=v();return A-=x(ae*(hr(vn(ie)/ae)||1))*(j?1:-1),A}function L(){_(T(),!0),S.cancel()}function D(A){for(var j=t.Slides.get(),ie=0,ae=1/0,O=0;O<j.length;O++){var re=j[O].index,N=vn(E(re,!0)-A);if(N<=ae)ae=N,ie=re;else break}return ie}function E(A,j){var ie=x(p(A-1)-V(A));return j?C(ie):ie}function T(){var A=m("left");return Ln(R)[A]-Ln(f)[A]+x(u(!1))}function C(A){return n.trimSpace&&e.is(To)&&(A=lo(A,0,x(v(!0)-y()))),A}function V(A){var j=n.focus;return j==="center"?(y()-d(A,!0))/2:+j*d(A)||0}function w(A){return E(A?t.Controller.getEnd():0,!!n.trimSpace)}function U(A){var j=x($(T(),A));return A?j>=0:j<=R[m("scrollWidth")]-Ln(f)[m("width")]}function M(A,j){j=Tr(j)?T():j;var ie=A!==!0&&x(j)<x(w(!1)),ae=A!==!1&&x(j)>x(w(!0));return ie||ae}return{mount:W,move:z,jump:P,translate:_,shift:$,cancel:L,toIndex:D,toPosition:E,getPosition:T,getLimit:w,exceededLimit:M,reposition:q}}function Tm(e,t,n){var i=nn(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,v=p.getLength,g=n.omitEnd,m=e.is(Oo),x=e.is(To),b=Jt(T,!1),R=Jt(T,!0),f=n.start||0,S,W=f,q,z,P;function _(){G(),o([mn,sn,xa],G),o(Ra,$)}function G(){q=v(!0),z=n.perMove,P=n.perPage,S=U();var N=lo(f,0,g?S:q-1);N!==f&&(f=N,l.reposition())}function $(){S!==U()&&r(xa)}function L(N,le,J){if(!re()){var be=E(N),Pe=w(be);Pe>-1&&(le||Pe!==f)&&(ie(Pe),l.move(be,Pe,W,J))}}function D(N,le,J,be){t.Scroll.scroll(N,le,J,function(){var Pe=w(l.toIndex(c()));ie(g?Li(Pe,S):Pe),be&&be()})}function E(N){var le=f;if(Ti(N)){var J=N.match(/([+\-<>])(\d+)?/)||[],be=J[1],Pe=J[2];be==="+"||be==="-"?le=C(f+ +(""+be+(+Pe||1)),f):be===">"?le=Pe?M(+Pe):b(!0):be==="<"&&(le=R(!0))}else le=m?N:lo(N,0,S);return le}function T(N,le){var J=z||(O()?1:P),be=C(f+J*(N?-1:1),f,!(z||O()));return be===-1&&x&&!pu(c(),d(!N),1)?N?0:S:le?be:w(be)}function C(N,le,J){if(y()||O()){var be=V(N);be!==N&&(le=N,N=be,J=!1),N<0||N>S?!z&&(ca(0,N,le,!0)||ca(S,le,N,!0))?N=M(A(N)):m?N=J?N<0?-(q%P||P):q:N:n.rewind?N=N<0?S:0:N=-1:J&&N!==le&&(N=M(A(le)+(N<le?-1:1)))}else N=-1;return N}function V(N){if(x&&n.trimSpace==="move"&&N!==f)for(var le=c();le===u(N,!0)&&ca(N,0,e.length-1,!n.rewind);)N<f?--N:++N;return N}function w(N){return m?(N+q)%q||0:N}function U(){for(var N=q-(O()||m&&z?1:P);g&&N-- >0;)if(u(q-1,!0)!==u(N,!0)){N++;break}return lo(N,0,q-1)}function M(N){return lo(O()?N:P*N,0,S)}function A(N){return O()?Li(N,S):va((N>=S?q-1:N)/P)}function j(N){var le=l.toIndex(N);return x?lo(le,0,S):le}function ie(N){N!==f&&(W=f,f=N)}function ae(N){return N?W:f}function O(){return!Tr(n.focus)||n.isNavigation}function re(){return e.state.is([Ho,Cr])&&!!n.waitForTransition}return{mount:_,go:L,scroll:D,getNext:b,getPrev:R,getAdjacent:T,getEnd:U,setIndex:ie,getIndex:ae,toIndex:M,toPage:A,toDest:j,hasFocus:O,isBusy:re}}var Lm="http://www.w3.org/2000/svg",Pm="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 Mm(e,t,n){var i=nn(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,v=u.track,g=y,m=u.prev,x=u.next,b,R,f={};function S(){q(),o(mn,W)}function W(){z(),S()}function q(){var D=n.arrows;D&&!(m&&x)&&G(),m&&x&&(gr(f,{prev:m,next:x}),mr(g,D?"":"none"),jn(g,R=Pl+"--"+n.direction),D&&(P(),L(),Nt([m,x],Rr,v.id),l(Su,m,x)))}function z(){i.destroy(),oi(g,R),b?(Ui(y?[m,x]:g),m=x=null):Vn([m,x],Ll)}function P(){o([Ei,Wo,sn,Ki,xa],L),r(x,"click",Jt(_,">")),r(m,"click",Jt(_,"<"))}function _(D){p.go(D,!0)}function G(){g=y||vo("div",c.arrows),m=$(!0),x=$(!1),b=!0,Pr(g,[m,x]),!y&&ml(g,v)}function $(D){var E='<button class="'+c.arrow+" "+(D?c.prev:c.next)+'" type="button"><svg xmlns="'+Lm+'" viewBox="0 0 '+Hr+" "+Hr+'" width="'+Hr+'" height="'+Hr+'" focusable="false"><path d="'+(n.arrowPath||Pm)+'" />';return du(E)}function L(){if(m&&x){var D=e.index,E=p.getPrev(),T=p.getNext(),C=E>-1&&D<E?d.last:d.prev,V=T>-1&&D>T?d.first:d.next;m.disabled=E<0,x.disabled=T<0,Nt(m,Mn,C),Nt(x,Mn,V),l(wu,m,x,E,T)}}return{arrows:f,mount:S,destroy:z,update:L}}var Im=fl+"-interval";function Rm(e,t,n){var i=nn(e),o=i.on,r=i.bind,l=i.emit,c=ka(n.interval,e.go.bind(e,">"),P),d=c.isPaused,u=t.Elements,p=t.Elements,y=p.root,v=p.toggle,g=n.autoplay,m,x,b=g==="pause";function R(){g&&(f(),v&&Nt(v,Rr,u.track.id),b||S(),z())}function f(){n.pauseOnHover&&r(y,"mouseenter mouseleave",function(G){m=G.type==="mouseenter",q()}),n.pauseOnFocus&&r(y,"focusin focusout",function(G){x=G.type==="focusin",q()}),v&&r(v,"click",function(){b?S():W(!0)}),o([ci,Ea,sn],c.rewind),o(ci,_)}function S(){d()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),x=m=b=!1,z(),l(Sl))}function W(G){G===void 0&&(G=!0),b=!!G,z(),d()||(c.pause(),l(wl))}function q(){b||(m||x?W(!1):S())}function z(){v&&(ii(v,qi,!b),Nt(v,Mn,n.i18n[b?"play":"pause"]))}function P(G){var $=u.bar;$&&Fn($,"width",G*100+"%"),l(Tu,G)}function _(G){var $=t.Slides.getAt(G);c.set($&&+Nn($.slide,Im)||n.interval)}return{mount:R,destroy:c.cancel,play:S,pause:W,isPaused:d}}function Em(e,t,n){var i=nn(e),o=i.on;function r(){n.cover&&(o($l,Jt(c,!0)),o([Ei,mn,sn],Jt(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),mr(u,d?"none":"")}return{mount:r,destroy:Jt(l,!1)}}var km=10,Am=600,Fm=.6,Nm=1.5,_m=800;function Hm(e,t,n){var i=nn(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,v=e.is(To),g,m,x=1;function b(){o(ci,W),o([mn,sn],q)}function R(P,_,G,$,L){var D=d();if(W(),G&&(!v||!p())){var E=t.Layout.sliderSize(),T=Ws(P)*E*va(vn(P)/E)||0;P=c.toPosition(t.Controller.toDest(P%E))+T}var C=pu(D,P,1);x=1,_=C?0:_||ya(vn(P-D)/Nm,_m),m=$,g=ka(_,f,Jt(S,D,P,L),1),l(Cr),r(Ea),g.start()}function f(){l($o),m&&m(),r(Ki)}function S(P,_,G,$){var L=d(),D=P+(_-P)*z($),E=(D-L)*x;y(L+E),v&&!G&&p()&&(x*=Fm,vn(E)<km&&R(u(p(!0)),Am,!1,m,!0))}function W(){g&&g.cancel()}function q(){g&&!g.isPaused()&&(W(),f())}function z(P){var _=n.easingFunc;return _?_(P):1-Math.pow(1-P,4)}return{mount:b,destroy:W,scroll:R,cancel:q}}var co={passive:!1,capture:!0};function Wm(e,t,n){var i=nn(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,v=t.Elements.track,g=t.Media.reduce,m=t.Direction,x=m.resolve,b=m.orient,R=u.getPosition,f=u.exceededLimit,S,W,q,z,P,_=!1,G,$,L;function D(){l(v,Ka,_s,co),l(v,Qa,_s,co),l(v,Du,T,co),l(v,"click",w,{capture:!0}),l(v,"dragstart",ti),o([Ei,mn],E)}function E(){var K=n.drag;ce(!K),z=K==="free"}function T(K){if(G=!1,!$){var se=Pe(K);be(K.target)&&(se||!K.button)&&(y.isBusy()?ti(K,!0):(L=se?v:window,P=d.is([Ho,Cr]),q=null,l(L,Ka,C,co),l(L,Qa,V,co),u.cancel(),p.cancel(),U(K)))}}function C(K){if(d.is(sa)||(d.set(sa),r(vu)),K.cancelable)if(P){u.translate(S+J(O(K)));var se=re(K)>gc,pe=_!==(_=f());(se||pe)&&U(K),G=!0,r(xu),ti(K)}else j(K)&&(P=A(K),ti(K))}function V(K){d.is(sa)&&(d.set($o),r(bu)),P&&(M(K),ti(K)),c(L,Ka,C),c(L,Qa,V),P=!1}function w(K){!$&&G&&ti(K,!0)}function U(K){q=W,W=K,S=R()}function M(K){var se=ie(K),pe=ae(se),fe=n.rewind&&n.rewindByDrag;g(!1),z?y.scroll(pe,0,n.snap):e.is(Er)?y.go(b(Ws(se))<0?fe?"<":"-":fe?">":"+"):e.is(To)&&_&&fe?y.go(f(!0)?">":"<"):y.go(y.toDest(pe),!0),g(!0)}function A(K){var se=n.dragMinThreshold,pe=dr(se),fe=pe&&se.mouse||0,we=(pe?se.touch:+se)||10;return vn(O(K))>(Pe(K)?we:fe)}function j(K){return vn(O(K))>vn(O(K,!0))}function ie(K){if(e.is(Oo)||!_){var se=re(K);if(se&&se<gc)return O(K)/se}return 0}function ae(K){return R()+Ws(K)*Li(vn(K)*(n.flickPower||600),z?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function O(K,se){return le(K,se)-le(N(K),se)}function re(K){return Hs(K)-Hs(N(K))}function N(K){return W===K&&q||W}function le(K,se){return(Pe(K)?K.changedTouches[0]:K)["page"+x(se?"Y":"X")]}function J(K){return K/(_&&e.is(To)?ym:1)}function be(K){var se=n.noDrag;return!ur(K,"."+Nu+", ."+Wa)&&(!se||!ur(K,se))}function Pe(K){return typeof TouchEvent<"u"&&K instanceof TouchEvent}function ye(){return P}function ce(K){$=K}return{mount:D,disable:ce,isDragging:ye}}var Om={Spacebar:" ",Right:Na,Left:Fa,Up:Mu,Down:Iu};function Ml(e){return e=Ti(e)?e:e.key,Om[e]||e}var mc="keydown";function Dm(e,t,n){var i=nn(e),o=i.on,r=i.bind,l=i.unbind,c=e.root,d=t.Direction.resolve,u,p;function y(){v(),o(mn,g),o(mn,v),o(ci,x)}function v(){var R=n.keyboard;R&&(u=R==="global"?window:c,r(u,mc,b))}function g(){l(u,mc)}function m(R){p=R}function x(){var R=p;p=!0,ru(function(){p=R})}function b(R){if(!p){var f=Ml(R);f===d(Fa)?e.go("<"):f===d(Na)&&e.go(">")}}return{mount:y,destroy:g,disable:m}}var sr=fl+"-lazy",da=sr+"-srcset",Bm="["+sr+"], ["+da+"]";function zm(e,t,n){var i=nn(e),o=i.on,r=i.off,l=i.bind,c=i.emit,d=n.lazyLoad==="sequential",u=[Wo,Ki],p=[];function y(){n.lazyLoad&&(v(),o(sn,v))}function v(){li(p),g(),d?R():(r(u),o(u,m),m())}function g(){t.Slides.forEach(function(f){hl(f.slide,Bm).forEach(function(S){var W=Nn(S,sr),q=Nn(S,da);if(W!==S.src||q!==S.srcset){var z=n.classes.spinner,P=S.parentElement,_=Mr(P,"."+z)||vo("span",z,P);p.push([S,f,_]),S.src||mr(S,"none")}})})}function m(){p=p.filter(function(f){var S=n.perPage*((n.preloadPages||1)+1)-1;return f[1].isWithin(e.index,S)?x(f):!0}),p.length||r(u)}function x(f){var S=f[0];jn(f[1].slide,zs),l(S,"load error",Jt(b,f)),Nt(S,"src",Nn(S,sr)),Nt(S,"srcset",Nn(S,da)),Vn(S,sr),Vn(S,da)}function b(f,S){var W=f[0],q=f[1];oi(q.slide,zs),S.type!=="error"&&(Ui(f[2]),mr(W,""),c($l,W,q),c(Co)),d&&R()}function R(){p.length&&x(p.shift())}return{mount:y,destroy:Jt(li,p),check:m}}function jm(e,t,n){var i=nn(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,v=u.go,g=t.Direction.resolve,m=d.pagination,x=[],b,R;function f(){S(),o([mn,sn,xa],f);var $=n.pagination;m&&mr(m,$?"":"none"),$&&(o([ci,Ea,Ki],G),W(),G(),r($u,{list:b,items:x},_(e.index)))}function S(){b&&(Ui(m?Ri(b.children):b),oi(b,R),li(x),b=null),i.destroy()}function W(){var $=e.length,L=n.classes,D=n.i18n,E=n.perPage,T=p()?u.getEnd()+1:hr($/E);b=m||vo("ul",L.pagination,d.track.parentElement),jn(b,R=Oa+"--"+P()),Nt(b,ri,"tablist"),Nt(b,Mn,D.select),Nt(b,Tl,P()===_a?"vertical":"");for(var C=0;C<T;C++){var V=vo("li",null,b),w=vo("button",{class:L.page,type:"button"},V),U=c.getIn(C).map(function(A){return A.slide.id}),M=!p()&&E>1?D.pageX:D.slideX;l(w,"click",Jt(q,C)),n.paginationKeyboard&&l(w,"keydown",Jt(z,C)),Nt(V,ri,"presentation"),Nt(w,ri,"tab"),Nt(w,Rr,U.join(" ")),Nt(w,Mn,Os(M,C+1)),Nt(w,xo,-1),x.push({li:V,button:w,page:C})}}function q($){v(">"+$,!0)}function z($,L){var D=x.length,E=Ml(L),T=P(),C=-1;E===g(Na,!1,T)?C=++$%D:E===g(Fa,!1,T)?C=(--$+D)%D:E==="Home"?C=0:E==="End"&&(C=D-1);var V=x[C];V&&(cu(V.button),v(">"+C),ti(L,!0))}function P(){return n.paginationDirection||n.direction}function _($){return x[u.toPage($)]}function G(){var $=_(y(!0)),L=_(y());if($){var D=$.button;oi(D,qi),Vn(D,lc),Nt(D,xo,-1)}if(L){var E=L.button;jn(E,qi),Nt(E,lc,!0),Nt(E,xo,"")}r(Cu,{list:b,items:x},$,L)}return{items:x,mount:f,destroy:S,getAt:_,update:G}}var Vm=[" ","Enter"];function Gm(e,t,n){var i=n.isNavigation,o=n.slideFocus,r=[];function l(){e.splides.forEach(function(m){m.isParent||(u(e,m.splide),u(m.splide,e))}),i&&p()}function c(){r.forEach(function(m){m.destroy()}),li(r)}function d(){c(),l()}function u(m,x){var b=nn(m);b.on(ci,function(R,f,S){x.go(x.is(Oo)?S:R)}),r.push(b)}function p(){var m=nn(e),x=m.on;x(vl,v),x(Lu,g),x([Ei,mn],y),r.push(m),m.emit(bl,e.splides)}function y(){Nt(t.Elements.list,Tl,n.direction===_a?"vertical":"")}function v(m){e.go(m.index)}function g(m,x){gl(Vm,Ml(x))&&(v(m),ti(x))}return{setup:Jt(t.Media.set,{slideFocus:Tr(o)?i:o},!0),mount:l,destroy:c,remount:d}}function Xm(e,t,n){var i=nn(e),o=i.bind,r=0;function l(){n.wheel&&o(t.Elements.track,"wheel",c,co)}function c(u){if(u.cancelable){var p=u.deltaY,y=p<0,v=Hs(u),g=n.wheelMinThreshold||0,m=n.wheelSleep||0;vn(p)>g&&v-r>m&&(e.go(y?"<":">"),r=v),d(y)&&ti(u)}}function d(u){return!n.releaseWheel||e.state.is(Ho)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var Um=90;function qm(e,t,n){var i=nn(e),o=i.on,r=t.Elements.track,l=n.live&&!n.isNavigation,c=vo("span",pm),d=ka(Um,Jt(p,!1));function u(){l&&(v(!t.Autoplay.isPaused()),Nt(r,uc,!0),c.textContent="…",o(Sl,Jt(v,!0)),o(wl,Jt(v,!1)),o([Wo,Ki],Jt(p,!0)))}function p(g){Nt(r,dc,g),g?(Pr(r,c),d.start()):(Ui(c),d.cancel())}function y(){Vn(r,[cc,uc,dc]),Ui(c)}function v(g){l&&Nt(r,cc,g?"off":"polite")}return{mount:u,disable:v,destroy:y}}var Ym=Object.freeze({__proto__:null,Media:im,Direction:om,Elements:vm,Slides:bm,Layout:Sm,Clones:$m,Move:Cm,Controller:Tm,Arrows:Mm,Autoplay:Rm,Cover:Em,Scroll:Hm,Drag:Wm,Keyboard:Dm,LazyLoad:zm,Pagination:jm,Sync:Gm,Wheel:Xm,Live:qm}),Km={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"},Qm={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:hm,i18n:Km,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Zm(e,t,n){var i=t.Slides;function o(){nn(e).on([Ei,sn],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),ru(d)}return{mount:o,start:l,cancel:_s}}function Jm(e,t,n){var i=t.Move,o=t.Controller,r=t.Scroll,l=t.Elements.list,c=Jt(Fn,l,"transition"),d;function u(){nn(e).bind(l,"transitionend",function(g){g.target===l&&d&&(y(),d())})}function p(g,m){var x=i.toPosition(g,!0),b=i.getPosition(),R=v(g);vn(x-b)>=1&&R>=1?n.useScroll?r.scroll(x,R,!1,m):(c("transform "+R+"ms "+n.easing),i.translate(x,!0),d=m):(i.jump(g),m())}function y(){c(""),r.cancel()}function v(g){var m=n.rewindSpeed;if(e.is(To)&&m){var x=o.getIndex(!0),b=o.getEnd();if(x===0&&g>=b||x>=b&&g===0)return m}return n.speed}return{mount:u,start:p,cancel:y}}var eh=(function(){function e(n,i){this.event=nn(),this.Components={},this.state=tm(go),this.splides=[],this._o={},this._E={};var o=Ti(n)?uu(document,n):n;ar(o,o+" is invalid."),this.root=o,i=Si({label:Nn(o,Mn)||"",labelledby:Nn(o,Cl)||""},Qm,e.defaults,i||{});try{Si(i,JSON.parse(Nn(o,fl)))}catch{ar(!1,"Invalid JSON")}this._o=Object.create(Si({},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)?Zm:Jm),this._E=i||this._E;var d=gr({},Ym,this._E,{Transition:this._T});return Gi(d,function(u,p){var y=u(r,c,r._o);c[p]=y,y.setup&&y.setup()}),Gi(c,function(u){u.mount&&u.mount()}),this.emit(Ei),jn(this.root,gm),l.set($o),this.emit(Ds),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is($o)&&(this._C.Sync.remount(),i.Components.Sync.remount()),this},t.go=function(i){return this._C.Controller.go(i),this},t.on=function(i,o){return this.event.on(i,o),this},t.off=function(i){return this.event.off(i),this},t.emit=function(i){var o;return(o=this.event).emit.apply(o,[i].concat(Ri(arguments,1))),this},t.add=function(i,o){return this._C.Slides.add(i,o),this},t.remove=function(i){return this._C.Slides.remove(i),this},t.is=function(i){return this._o.type===i},t.refresh=function(){return this.emit(sn),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,r=this.state;return r.is(go)?nn(this).on(Ds,this.destroy.bind(this,i)):(Gi(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(xl),o.destroy(),i&&li(this.splides),r.set(fa)),this},Kg(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})(),Il=eh;Il.defaults={};Il.STATES=Zg;var hc=[[Ei,"onMounted"],[Ds,"onReady"],[ci,"onMove"],[Wo,"onMoved"],[vl,"onClick"],[mu,"onActive"],[hu,"onInactive"],[fu,"onVisible"],[yu,"onHidden"],[sn,"onRefresh"],[mn,"onUpdated"],[Co,"onResize"],[Ra,"onResized"],[vu,"onDrag"],[xu,"onDragging"],[bu,"onDragged"],[Ea,"onScroll"],[Ki,"onScrolled"],[xl,"onDestroy"],[Su,"onArrowsMounted"],[wu,"onArrowsUpdated"],[$u,"onPaginationMounted"],[Cu,"onPaginationUpdated"],[bl,"onNavigationMounted"],[Sl,"onAutoplayPlay"],[Tu,"onAutoplayPlaying"],[wl,"onAutoplayPause"],[$l,"onLazyLoadLoaded"]];function Rl(...e){return e.filter(Boolean).join(" ")}function ba(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(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)||!js(e[o],t[o]))}return e===t}function th(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function nh(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 nh(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():ba(i)?n[o]=Vs(ba(n[o])?n[o]:{},i):n[o]=i}),n}var ih=({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 Il(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();th(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(ih,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"),Ct=require("classnames"),F=require("./panelAvailability-D8c7cdbu.js"),Xn=require("react-dom");function rg(e){return e.type==="object"&&e.version===1}const ag="ControlSlider-module__wrapper___sHEkd",sg="ControlSlider-module__hoverArrow___A-dOH",lg="ControlSlider-module__sliderItem___QQSkR",cg="ControlSlider-module__sliderImage___9hRl-",dg="ControlSlider-module__arrow___05ghY",ug="ControlSlider-module__arrowVertical___tBfVN",pg="ControlSlider-module__nextArrow___-30Yc",gg="ControlSlider-module__arrowInner___aEra3",mg="ControlSlider-module__arrowIcon___S4ztF",hg="ControlSlider-module__arrowImg___2dwJW",fg="ControlSlider-module__mirror___brd6U",yg="ControlSlider-module__pagination___bicLF",vg="ControlSlider-module__paginationInner___bT-P-",xg="ControlSlider-module__paginationVertical___zYqKw",bg="ControlSlider-module__paginationItem___nTRbk",Sg="ControlSlider-module__dot___p1Qun",wg="ControlSlider-module__activeDot___LHFaj",$g="ControlSlider-module__paginationInsideBottom___R3FWn",Cg="ControlSlider-module__paginationInsideTop___V-qb-",Tg="ControlSlider-module__paginationOutsideBottom___14w8D",Lg="ControlSlider-module__paginationOutsideTop___SCLqB",Pg="ControlSlider-module__paginationInsideLeft___yOBRZ",Ig="ControlSlider-module__paginationInsideRight___Rtt3o",Rg="ControlSlider-module__paginationOutsideLeft___lahaw",Mg="ControlSlider-module__paginationOutsideRight___EtuQa",Eg="ControlSlider-module__imgWrapper___UjEgB",kg="ControlSlider-module__captionBlock___dJ6-j",Ag="ControlSlider-module__captionTextWrapper___HFlpf",Fg="ControlSlider-module__captionText___uGBVc",Ng="ControlSlider-module__active___WZK4G",_g="ControlSlider-module__withPointerEvents___t-18M",Hg="ControlSlider-module__topLeftAlignment___zjnGM",Wg="ControlSlider-module__topCenterAlignment___gD1xW",Og="ControlSlider-module__topRightAlignment___NMapS",Dg="ControlSlider-module__middleLeftAlignment___OnUrY",Bg="ControlSlider-module__middleCenterAlignment___Tdkl0",zg="ControlSlider-module__middleRightAlignment___wEbfX",jg="ControlSlider-module__bottomLeftAlignment___cTP2-",Vg="ControlSlider-module__bottomCenterAlignment___c54fB",Gg="ControlSlider-module__bottomRightAlignment___kEwrz",Xg="ControlSlider-module__clickOverlay___DZA28",Ug="ControlSlider-module__contain___pLyq7",qg="ControlSlider-module__cover___KdDat",$t={wrapper:ag,hoverArrow:sg,sliderItem:lg,sliderImage:cg,arrow:dg,arrowVertical:ug,nextArrow:pg,arrowInner:gg,arrowIcon:mg,arrowImg:hg,mirror:fg,pagination:yg,paginationInner:vg,paginationVertical:xg,paginationItem:bg,dot:Sg,activeDot:wg,paginationInsideBottom:$g,paginationInsideTop:Cg,paginationOutsideBottom:Tg,paginationOutsideTop:Lg,paginationInsideLeft:Pg,paginationInsideRight:Ig,paginationOutsideLeft:Rg,paginationOutsideRight:Mg,imgWrapper:Eg,captionBlock:kg,captionTextWrapper:Ag,captionText:Fg,active:Ng,withPointerEvents:_g,topLeftAlignment:Hg,topCenterAlignment:Wg,topRightAlignment:Og,middleLeftAlignment:Dg,middleCenterAlignment:Bg,middleRightAlignment:zg,bottomLeftAlignment:jg,bottomCenterAlignment:Vg,bottomRightAlignment:Gg,clickOverlay:Xg,contain:Ug,cover:qg};function Yg(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 Kg(e,t,n){return t&&Yg(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var nc="(prefers-reduced-motion: reduce)",go=1,Qg=2,$o=3,Ho=4,Cr=5,sa=6,fa=7,Zg={CREATED:go,MOUNTED:Qg,IDLE:$o,MOVING:Ho,SCROLLING:Cr,DRAGGING:sa,DESTROYED:fa};function li(e){e.length=0}function Mi(e,t,n){return Array.prototype.slice.call(e,t,n)}function Jt(e){return e.bind.apply(e,[null].concat(Mi(arguments,1)))}var ru=setTimeout,_s=function(){};function ic(e){return requestAnimationFrame(e)}function Ra(e,t){return typeof t===e}function dr(e){return!pl(e)&&Ra("object",e)}var ul=Array.isArray,au=Jt(Ra,"function"),Ti=Jt(Ra,"string"),Tr=Jt(Ra,"undefined");function pl(e){return e===null}function su(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Lr(e){return ul(e)?e:[e]}function Mn(e,t){Lr(e).forEach(t)}function gl(e,t){return e.indexOf(t)>-1}function la(e,t){return e.push.apply(e,Lr(t)),e}function ii(e,t,n){e&&Mn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function jn(e,t){ii(e,Ti(t)?t.split(" "):t,!0)}function Pr(e,t){Mn(t,e.appendChild.bind(e))}function ml(e,t){Mn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function ur(e,t){return su(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function lu(e,t){var n=e?Mi(e.children):[];return t?n.filter(function(i){return ur(i,t)}):n}function Ir(e,t){return t?lu(e,t)[0]:e.firstElementChild}var pr=Object.keys;function Gi(e,t,n){return e&&(n?pr(e).reverse():pr(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function gr(e){return Mi(arguments,1).forEach(function(t){Gi(t,function(n,i){e[i]=t[i]})}),e}function Si(e){return Mi(arguments,1).forEach(function(t){Gi(t,function(n,i){ul(n)?e[i]=n.slice():dr(n)?e[i]=Si({},dr(e[i])?e[i]:{},n):e[i]=n})}),e}function oc(e,t){Mn(t||pr(e),function(n){delete e[n]})}function Vn(e,t){Mn(e,function(n){Mn(t,function(i){n&&n.removeAttribute(i)})})}function Nt(e,t,n){dr(t)?Gi(t,function(i,o){Nt(e,o,i)}):Mn(e,function(i){pl(n)||n===""?Vn(i,t):i.setAttribute(t,String(n))})}function vo(e,t,n){var i=document.createElement(e);return t&&(Ti(t)?jn(i,t):Nt(i,t)),n&&Pr(n,i),i}function Fn(e,t,n){if(Tr(n))return getComputedStyle(e)[t];pl(n)||(e.style[t]=""+n)}function mr(e,t){Fn(e,"display",t)}function cu(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Nn(e,t){return e.getAttribute(t)}function rc(e,t){return e&&e.classList.contains(t)}function Ln(e){return e.getBoundingClientRect()}function Ui(e){Mn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function du(e){return Ir(new DOMParser().parseFromString(e,"text/html").body)}function ti(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function uu(e,t){return e&&e.querySelector(t)}function hl(e,t){return t?Mi(e.querySelectorAll(t)):[]}function oi(e,t){ii(e,t,!1)}function Hs(e){return e.timeStamp}function Ai(e){return Ti(e)?e:e?e+"px":""}var Rr="splide",fl="data-"+Rr;function ar(e,t){if(!e)throw new Error("["+Rr+"] "+(t||""))}var Li=Math.min,ya=Math.max,va=Math.floor,hr=Math.ceil,vn=Math.abs;function pu(e,t,n){return vn(e-t)<n}function ca(e,t,n,i){var o=Li(t,n),r=ya(t,n);return i?o<e&&e<r:o<=e&&e<=r}function lo(e,t,n){var i=Li(t,n),o=ya(t,n);return Li(ya(i,e),o)}function Ws(e){return+(e>0)-+(e<0)}function Os(e,t){return Mn(t,function(n){e=e.replace("%s",""+n)}),e}function yl(e){return e<10?"0"+e:""+e}var ac={};function Jg(e){return""+e+yl(ac[e]=(ac[e]||0)+1)}function gu(){var e=[];function t(l,c,d,u){o(l,c,function(p,y,v){var g="addEventListener"in p,m=g?p.removeEventListener.bind(p,y,d,u):p.removeListener.bind(p,d);g?p.addEventListener(y,d,u):p.addListener(d),e.push([p,y,v,d,m])})}function n(l,c,d){o(l,c,function(u,p,y){e=e.filter(function(v){return v[0]===u&&v[1]===p&&v[2]===y&&(!d||v[3]===d)?(v[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){Mn(l,function(u){u&&Mn(c,function(p){p.split(" ").forEach(function(y){var v=y.split(".");d(u,v[0],v[1])})})})}function r(){e.forEach(function(l){l[4]()}),li(e)}return{bind:t,unbind:n,dispatch:i,destroy:r}}var Ei="mounted",Ds="ready",ci="move",Wo="moved",vl="click",mu="active",hu="inactive",fu="visible",yu="hidden",sn="refresh",mn="updated",Co="resize",Ma="resized",vu="drag",xu="dragging",bu="dragged",Ea="scroll",Ki="scrolled",em="overflow",xl="destroy",Su="arrows:mounted",wu="arrows:updated",$u="pagination:mounted",Cu="pagination:updated",bl="navigation:mounted",Sl="autoplay:play",Tu="autoplay:playing",wl="autoplay:pause",$l="lazyload:loaded",Lu="sk",Pu="sh",xa="ei";function nn(e){var t=e?e.event.bus:document.createDocumentFragment(),n=gu();function i(r,l){n.bind(t,Lr(r).join(" "),function(c){l.apply(l,ul(c.detail)?c.detail:[])})}function o(r){n.dispatch(t,r,Mi(arguments,1))}return e&&e.event.on(xl,n.destroy),gr(n,{bus:t,on:i,off:Jt(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?Li((o()-r)/e,1):1,n&&n(l),l>=1&&(t(),r=o(),i&&++u>=i))return v();c=ic(p)}}function y(M){M||m(),r=o()-(M?l*e:0),d=!1,c=ic(p)}function v(){d=!0}function g(){r=o(),l=0,n&&n(l)}function m(){c&&cancelAnimationFrame(c),l=0,c=0,d=!0}function x(M){e=M}function b(){return d}return{start:y,rewind:g,pause:v,cancel:m,set:x,isPaused:b}}function tm(e){var t=e;function n(o){t=o}function i(o){return gl(Lr(o),t)}return{set:n,is:i}}function nm(e,t){var n=ka(0,e,null,1);return function(){n.isPaused()&&n.start()}}function im(e,t,n){var i=e.state,o=n.breakpoints||{},r=n.reducedMotion||{},l=gu(),c=[];function d(){var m=n.mediaQuery==="min";pr(o).sort(function(x,b){return m?+x-+b:+b-+x}).forEach(function(x){p(o[x],"("+(m?"min":"max")+"-width:"+x+"px)")}),p(r,nc),y()}function u(m){m&&l.destroy()}function p(m,x){var b=matchMedia(x);l.bind(b,"change",y),c.push([m,b])}function y(){var m=i.is(fa),x=n.direction,b=c.reduce(function(M,f){return Si(M,f[1].matches?f[0]:{})},{});oc(n),g(b),n.destroy?e.destroy(n.destroy==="completely"):m?(u(!0),e.mount()):x!==n.direction&&e.refresh()}function v(m){matchMedia(nc).matches&&(m?Si(n,r):oc(n,pr(r)))}function g(m,x,b){Si(n,m),x&&Si(Object.getPrototypeOf(n),m),(b||!i.is(go))&&e.emit(mn,n)}return{setup:d,destroy:u,reduce:v,set:g}}var Aa="Arrow",Fa=Aa+"Left",Na=Aa+"Right",Iu=Aa+"Up",Ru=Aa+"Down",sc="rtl",_a="ttb",qa={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Iu,Na],ArrowRight:[Ru,Fa]};function om(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 ri="role",xo="tabindex",rm="disabled",_n="aria-",Mr=_n+"controls",Mu=_n+"current",lc=_n+"selected",In=_n+"label",Cl=_n+"labelledby",Eu=_n+"hidden",Tl=_n+"orientation",fr=_n+"roledescription",cc=_n+"live",dc=_n+"busy",uc=_n+"atomic",Ll=[ri,xo,rm,Mr,Mu,In,Cl,Eu,Tl,fr],Un=Rr+"__",ki="is-",Ya=Rr,pc=Un+"track",am=Un+"list",Ha=Un+"slide",ku=Ha+"--clone",sm=Ha+"__container",Pl=Un+"arrows",Wa=Un+"arrow",Au=Wa+"--prev",Fu=Wa+"--next",Oa=Un+"pagination",Nu=Oa+"__page",lm=Un+"progress",cm=lm+"__bar",dm=Un+"toggle",um=Un+"spinner",pm=Un+"sr",gm=ki+"initialized",qi=ki+"active",_u=ki+"prev",Hu=ki+"next",Bs=ki+"visible",zs=ki+"loading",Wu=ki+"focus-in",Ou=ki+"overflow",mm=[qi,Bs,_u,Hu,zs,Wu,Ou],hm={slide:Ha,clone:ku,arrows:Pl,arrow:Wa,prev:Au,next:Fu,pagination:Oa,page:Nu,spinner:um};function fm(e,t){if(au(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!ur(n,t);)n=n.parentElement;return n}var ym=5,gc=200,Du="touchstart mousedown",Ka="touchmove mousemove",Qa="touchend touchcancel mouseup click";function vm(e,t,n){var i=nn(e),o=i.on,r=i.bind,l=e.root,c=n.i18n,d={},u=[],p=[],y=[],v,g,m;function x(){S(),W(),f()}function b(){o(sn,M),o(sn,x),o(mn,f),r(document,Du+" keydown",function(P){m=P.type==="keydown"},{capture:!0}),r(l,"focusin",function(){ii(l,Wu,!!m)})}function M(P){var _=Ll.concat("style");li(u),oi(l,p),oi(v,y),Vn([v,g],_),Vn(l,P?_:["style",fr])}function f(){oi(l,p),oi(v,y),p=z(Ya),y=z(pc),jn(l,p),jn(v,y),Nt(l,In,n.label),Nt(l,Cl,n.labelledby)}function S(){v=q("."+pc),g=Ir(v,"."+am),ar(v&&g,"A track/list element is missing."),la(u,lu(g,"."+Ha+":not(."+ku+")")),Gi({arrows:Pl,pagination:Oa,prev:Au,next:Fu,bar:cm,toggle:dm},function(P,_){d[_]=q("."+P)}),gr(d,{root:l,track:v,list:g,slides:u})}function W(){var P=l.id||Jg(Rr),_=n.role;l.id=P,v.id=v.id||P+"-track",g.id=g.id||P+"-list",!Nn(l,ri)&&l.tagName!=="SECTION"&&_&&Nt(l,ri,_),Nt(l,fr,c.carousel),Nt(g,ri,"presentation")}function q(P){var _=uu(l,P);return _&&fm(_,"."+Ya)===l?_:void 0}function z(P){return[P+"--"+n.type,P+"--"+n.direction,n.drag&&P+"--draggable",n.isNavigation&&P+"--nav",P===Ya&&qi]}return gr(d,{setup:x,mount:b,destroy:M})}var To="slide",Oo="loop",Er="fade";function xm(e,t,n,i){var o=nn(e),r=o.on,l=o.emit,c=o.bind,d=e.Components,u=e.root,p=e.options,y=p.isNavigation,v=p.updateOnMove,g=p.i18n,m=p.pagination,x=p.slideFocus,b=d.Direction.resolve,M=Nn(i,"style"),f=Nn(i,In),S=n>-1,W=Ir(i,"."+sm),q;function z(){S||(i.id=u.id+"-slide"+yl(t+1),Nt(i,ri,m?"tabpanel":"group"),Nt(i,fr,g.slide),Nt(i,In,f||Os(g.slideLabel,[t+1,e.length]))),P()}function P(){c(i,"click",Jt(l,vl,U)),c(i,"keydown",Jt(l,Lu,U)),r([Wo,Pu,Ki],L),r(bl,G),v&&r(ci,$)}function _(){q=!0,o.destroy(),oi(i,mm),Vn(i,Ll),Nt(i,"style",M),Nt(i,In,f||"")}function G(){var I=e.splides.map(function(A){var j=A.splide.Components.Slides.getAt(t);return j?j.slide.id:""}).join(" ");Nt(i,In,Os(g.slideX,(S?n:t)+1)),Nt(i,Mr,I),Nt(i,ri,x?"button":""),x&&Vn(i,fr)}function $(){q||L()}function L(){if(!q){var I=e.index;D(),E(),ii(i,_u,t===I-1),ii(i,Hu,t===I+1)}}function D(){var I=C();I!==rc(i,qi)&&(ii(i,qi,I),Nt(i,Mu,y&&I||""),l(I?mu:hu,U))}function E(){var I=V(),A=!I&&(!C()||S);if(e.state.is([Ho,Cr])||Nt(i,Eu,A||""),Nt(hl(i,p.focusableNodes||""),xo,A?-1:""),x&&Nt(i,xo,A?-1:0),I!==rc(i,Bs)&&(ii(i,Bs,I),l(I?fu:yu,U)),!I&&document.activeElement===i){var j=d.Slides.getAt(e.index);j&&cu(j.slide)}}function T(I,A,j){Fn(j&&W||i,I,A)}function C(){var I=e.index;return I===t||p.cloneStatus&&I===n}function V(){if(e.is(Er))return C();var I=Ln(d.Elements.track),A=Ln(i),j=b("left",!0),ie=b("right",!0);return va(I[j])<=hr(A[j])&&va(A[ie])<=hr(I[ie])}function w(I,A){var j=vn(I-t);return!S&&(p.rewind||e.is(Oo))&&(j=Li(j,e.length-j)),j<=A}var U={index:t,slideIndex:n,slide:i,container:W,isClone:S,mount:z,destroy:_,update:L,style:T,isWithin:w};return U}function bm(e,t,n){var i=nn(e),o=i.on,r=i.emit,l=i.bind,c=t.Elements,d=c.slides,u=c.list,p=[];function y(){v(),o(sn,g),o(sn,v)}function v(){d.forEach(function(L,D){x(L,D,-1)})}function g(){q(function(L){L.destroy()}),li(p)}function m(){q(function(L){L.update()})}function x(L,D,E){var T=xm(e,D,E,L);T.mount(),p.push(T),p.sort(function(C,V){return C.index-V.index})}function b(L){return L?z(function(D){return!D.isClone}):p}function M(L){var D=t.Controller,E=D.toIndex(L),T=D.hasFocus()?1:n.perPage;return z(function(C){return ca(C.index,E,E+T-1)})}function f(L){return z(L)[0]}function S(L,D){Mn(L,function(E){if(Ti(E)&&(E=du(E)),su(E)){var T=d[D];T?ml(E,T):Pr(u,E),jn(E,n.classes.slide),_(E,Jt(r,Co))}}),r(sn)}function W(L){Ui(z(L).map(function(D){return D.slide})),r(sn)}function q(L,D){b(D).forEach(L)}function z(L){return p.filter(au(L)?L:function(D){return Ti(L)?ur(D.slide,L):gl(Lr(L),D.index)})}function P(L,D,E){q(function(T){T.style(L,D,E)})}function _(L,D){var E=hl(L,"img"),T=E.length;T?E.forEach(function(C){l(C,"load error",function(){--T||D()})}):D()}function G(L){return L?d.length:p.length}function $(){return p.length>n.perPage}return{mount:y,destroy:g,update:m,register:x,get:b,getIn:M,getAt:f,add:S,remove:W,forEach:q,filter:z,style:P,getLength:G,isEnough:$}}function Sm(e,t,n){var i=nn(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,v=u.list,g=c.getAt,m=c.style,x,b,M;function f(){S(),r(window,"resize load",nm(Jt(l,Co))),o([mn,sn],S),o(Co,W)}function S(){x=n.direction===_a,Fn(p,"maxWidth",Ai(n.width)),Fn(y,d("paddingLeft"),q(!1)),Fn(y,d("paddingRight"),q(!0)),W(!0)}function W(U){var I=Ln(p);(U||b.width!==I.width||b.height!==I.height)&&(Fn(y,"height",z()),m(d("marginRight"),Ai(n.gap)),m("width",_()),m("height",G(),!0),b=I,l(Ma),M!==(M=w())&&(ii(p,Ou,M),l(em,M)))}function q(U){var I=n.padding,A=d(U?"right":"left");return I&&Ai(I[A]||(dr(I)?0:I))||"0px"}function z(){var U="";return x&&(U=P(),ar(U,"height or heightRatio is missing."),U="calc("+U+" - "+q(!1)+" - "+q(!0)+")"),U}function P(){return Ai(n.height||Ln(v).width*n.heightRatio)}function _(){return n.autoWidth?null:Ai(n.fixedWidth)||(x?"":$())}function G(){return Ai(n.fixedHeight)||(x?n.autoHeight?null:$():P())}function $(){var U=Ai(n.gap);return"calc((100%"+(U&&" + "+U)+")/"+(n.perPage||1)+(U&&" - "+U)+")"}function L(){return Ln(v)[d("width")]}function D(U,I){var A=g(U||0);return A?Ln(A.slide)[d("width")]+(I?0:C()):0}function E(U,I){var A=g(U);if(A){var j=Ln(A.slide)[d("right")],ie=Ln(v)[d("left")];return vn(j-ie)+(I?0:C())}return 0}function T(U){return E(e.length-1)-E(0)+D(0,U)}function C(){var U=g(0);return U&&parseFloat(Fn(U.slide,d("marginRight")))||0}function V(U){return parseFloat(Fn(y,d("padding"+(U?"Right":"Left"))))||0}function w(){return e.is(Er)||T(!0)>L()}return{mount:f,resize:W,listSize:L,slideSize:D,sliderSize:T,totalSize:E,getPadding:V,isOverflow:w}}var wm=2;function $m(e,t,n){var i=nn(e),o=i.on,r=t.Elements,l=t.Slides,c=t.Direction.resolve,d=[],u;function p(){o(sn,y),o([mn,Co],g),(u=b())&&(m(u),t.Layout.resize(!0))}function y(){v(),p()}function v(){Ui(d),li(d),i.destroy()}function g(){var M=b();u!==M&&(u<M||!M)&&i.emit(sn)}function m(M){var f=l.get().slice(),S=f.length;if(S){for(;f.length<M;)la(f,f);la(f.slice(-M),f.slice(0,M)).forEach(function(W,q){var z=q<M,P=x(W.slide,q);z?ml(P,f[0].slide):Pr(r.list,P),la(d,P),l.register(P,q-M+(z?0:S),W.index)})}}function x(M,f){var S=M.cloneNode(!0);return jn(S,n.classes.clone),S.id=e.root.id+"-clone"+yl(f+1),S}function b(){var M=n.clones;if(!e.is(Oo))M=0;else if(Tr(M)){var f=n[c("fixedWidth")]&&t.Layout.slideSize(0),S=f&&hr(Ln(r.track)[c("width")]/f);M=S||n[c("autoWidth")]&&e.length||n.perPage*wm}return M}return{mount:p,destroy:v}}function Cm(e,t,n){var i=nn(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,v=c.sliderSize,g=t.Direction,m=g.resolve,x=g.orient,b=t.Elements,M=b.list,f=b.track,S;function W(){S=t.Transition,o([Ei,Ma,mn,sn],q)}function q(){t.Controller.isBusy()||(t.Scroll.cancel(),P(e.index),t.Slides.update())}function z(A,j,ie,ae){A!==j&&U(A>ie)&&(L(),_($(T(),A>ie),!0)),l(Ho),r(ci,j,ie,A),S.start(j,function(){l($o),r(Wo,j,ie,A),ae&&ae()})}function P(A){_(E(A,!0))}function _(A,j){if(!e.is(Er)){var ie=j?A:G(A);Fn(M,"transform","translate"+m("X")+"("+ie+"px)"),A!==ie&&r(Pu)}}function G(A){if(e.is(Oo)){var j=D(A),ie=j>t.Controller.getEnd(),ae=j<0;(ae||ie)&&(A=$(A,ie))}return A}function $(A,j){var ie=A-w(j),ae=v();return A-=x(ae*(hr(vn(ie)/ae)||1))*(j?1:-1),A}function L(){_(T(),!0),S.cancel()}function D(A){for(var j=t.Slides.get(),ie=0,ae=1/0,O=0;O<j.length;O++){var re=j[O].index,N=vn(E(re,!0)-A);if(N<=ae)ae=N,ie=re;else break}return ie}function E(A,j){var ie=x(p(A-1)-V(A));return j?C(ie):ie}function T(){var A=m("left");return Ln(M)[A]-Ln(f)[A]+x(u(!1))}function C(A){return n.trimSpace&&e.is(To)&&(A=lo(A,0,x(v(!0)-y()))),A}function V(A){var j=n.focus;return j==="center"?(y()-d(A,!0))/2:+j*d(A)||0}function w(A){return E(A?t.Controller.getEnd():0,!!n.trimSpace)}function U(A){var j=x($(T(),A));return A?j>=0:j<=M[m("scrollWidth")]-Ln(f)[m("width")]}function I(A,j){j=Tr(j)?T():j;var ie=A!==!0&&x(j)<x(w(!1)),ae=A!==!1&&x(j)>x(w(!0));return ie||ae}return{mount:W,move:z,jump:P,translate:_,shift:$,cancel:L,toIndex:D,toPosition:E,getPosition:T,getLimit:w,exceededLimit:I,reposition:q}}function Tm(e,t,n){var i=nn(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,v=p.getLength,g=n.omitEnd,m=e.is(Oo),x=e.is(To),b=Jt(T,!1),M=Jt(T,!0),f=n.start||0,S,W=f,q,z,P;function _(){G(),o([mn,sn,xa],G),o(Ma,$)}function G(){q=v(!0),z=n.perMove,P=n.perPage,S=U();var N=lo(f,0,g?S:q-1);N!==f&&(f=N,l.reposition())}function $(){S!==U()&&r(xa)}function L(N,le,J){if(!re()){var be=E(N),Pe=w(be);Pe>-1&&(le||Pe!==f)&&(ie(Pe),l.move(be,Pe,W,J))}}function D(N,le,J,be){t.Scroll.scroll(N,le,J,function(){var Pe=w(l.toIndex(c()));ie(g?Li(Pe,S):Pe),be&&be()})}function E(N){var le=f;if(Ti(N)){var J=N.match(/([+\-<>])(\d+)?/)||[],be=J[1],Pe=J[2];be==="+"||be==="-"?le=C(f+ +(""+be+(+Pe||1)),f):be===">"?le=Pe?I(+Pe):b(!0):be==="<"&&(le=M(!0))}else le=m?N:lo(N,0,S);return le}function T(N,le){var J=z||(O()?1:P),be=C(f+J*(N?-1:1),f,!(z||O()));return be===-1&&x&&!pu(c(),d(!N),1)?N?0:S:le?be:w(be)}function C(N,le,J){if(y()||O()){var be=V(N);be!==N&&(le=N,N=be,J=!1),N<0||N>S?!z&&(ca(0,N,le,!0)||ca(S,le,N,!0))?N=I(A(N)):m?N=J?N<0?-(q%P||P):q:N:n.rewind?N=N<0?S:0:N=-1:J&&N!==le&&(N=I(A(le)+(N<le?-1:1)))}else N=-1;return N}function V(N){if(x&&n.trimSpace==="move"&&N!==f)for(var le=c();le===u(N,!0)&&ca(N,0,e.length-1,!n.rewind);)N<f?--N:++N;return N}function w(N){return m?(N+q)%q||0:N}function U(){for(var N=q-(O()||m&&z?1:P);g&&N-- >0;)if(u(q-1,!0)!==u(N,!0)){N++;break}return lo(N,0,q-1)}function I(N){return lo(O()?N:P*N,0,S)}function A(N){return O()?Li(N,S):va((N>=S?q-1:N)/P)}function j(N){var le=l.toIndex(N);return x?lo(le,0,S):le}function ie(N){N!==f&&(W=f,f=N)}function ae(N){return N?W:f}function O(){return!Tr(n.focus)||n.isNavigation}function re(){return e.state.is([Ho,Cr])&&!!n.waitForTransition}return{mount:_,go:L,scroll:D,getNext:b,getPrev:M,getAdjacent:T,getEnd:U,setIndex:ie,getIndex:ae,toIndex:I,toPage:A,toDest:j,hasFocus:O,isBusy:re}}var Lm="http://www.w3.org/2000/svg",Pm="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 Im(e,t,n){var i=nn(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,v=u.track,g=y,m=u.prev,x=u.next,b,M,f={};function S(){q(),o(mn,W)}function W(){z(),S()}function q(){var D=n.arrows;D&&!(m&&x)&&G(),m&&x&&(gr(f,{prev:m,next:x}),mr(g,D?"":"none"),jn(g,M=Pl+"--"+n.direction),D&&(P(),L(),Nt([m,x],Mr,v.id),l(Su,m,x)))}function z(){i.destroy(),oi(g,M),b?(Ui(y?[m,x]:g),m=x=null):Vn([m,x],Ll)}function P(){o([Ei,Wo,sn,Ki,xa],L),r(x,"click",Jt(_,">")),r(m,"click",Jt(_,"<"))}function _(D){p.go(D,!0)}function G(){g=y||vo("div",c.arrows),m=$(!0),x=$(!1),b=!0,Pr(g,[m,x]),!y&&ml(g,v)}function $(D){var E='<button class="'+c.arrow+" "+(D?c.prev:c.next)+'" type="button"><svg xmlns="'+Lm+'" viewBox="0 0 '+Hr+" "+Hr+'" width="'+Hr+'" height="'+Hr+'" focusable="false"><path d="'+(n.arrowPath||Pm)+'" />';return du(E)}function L(){if(m&&x){var D=e.index,E=p.getPrev(),T=p.getNext(),C=E>-1&&D<E?d.last:d.prev,V=T>-1&&D>T?d.first:d.next;m.disabled=E<0,x.disabled=T<0,Nt(m,In,C),Nt(x,In,V),l(wu,m,x,E,T)}}return{arrows:f,mount:S,destroy:z,update:L}}var Rm=fl+"-interval";function Mm(e,t,n){var i=nn(e),o=i.on,r=i.bind,l=i.emit,c=ka(n.interval,e.go.bind(e,">"),P),d=c.isPaused,u=t.Elements,p=t.Elements,y=p.root,v=p.toggle,g=n.autoplay,m,x,b=g==="pause";function M(){g&&(f(),v&&Nt(v,Mr,u.track.id),b||S(),z())}function f(){n.pauseOnHover&&r(y,"mouseenter mouseleave",function(G){m=G.type==="mouseenter",q()}),n.pauseOnFocus&&r(y,"focusin focusout",function(G){x=G.type==="focusin",q()}),v&&r(v,"click",function(){b?S():W(!0)}),o([ci,Ea,sn],c.rewind),o(ci,_)}function S(){d()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),x=m=b=!1,z(),l(Sl))}function W(G){G===void 0&&(G=!0),b=!!G,z(),d()||(c.pause(),l(wl))}function q(){b||(m||x?W(!1):S())}function z(){v&&(ii(v,qi,!b),Nt(v,In,n.i18n[b?"play":"pause"]))}function P(G){var $=u.bar;$&&Fn($,"width",G*100+"%"),l(Tu,G)}function _(G){var $=t.Slides.getAt(G);c.set($&&+Nn($.slide,Rm)||n.interval)}return{mount:M,destroy:c.cancel,play:S,pause:W,isPaused:d}}function Em(e,t,n){var i=nn(e),o=i.on;function r(){n.cover&&(o($l,Jt(c,!0)),o([Ei,mn,sn],Jt(l,!0)))}function l(d){t.Slides.forEach(function(u){var p=Ir(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),mr(u,d?"none":"")}return{mount:r,destroy:Jt(l,!1)}}var km=10,Am=600,Fm=.6,Nm=1.5,_m=800;function Hm(e,t,n){var i=nn(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,v=e.is(To),g,m,x=1;function b(){o(ci,W),o([mn,sn],q)}function M(P,_,G,$,L){var D=d();if(W(),G&&(!v||!p())){var E=t.Layout.sliderSize(),T=Ws(P)*E*va(vn(P)/E)||0;P=c.toPosition(t.Controller.toDest(P%E))+T}var C=pu(D,P,1);x=1,_=C?0:_||ya(vn(P-D)/Nm,_m),m=$,g=ka(_,f,Jt(S,D,P,L),1),l(Cr),r(Ea),g.start()}function f(){l($o),m&&m(),r(Ki)}function S(P,_,G,$){var L=d(),D=P+(_-P)*z($),E=(D-L)*x;y(L+E),v&&!G&&p()&&(x*=Fm,vn(E)<km&&M(u(p(!0)),Am,!1,m,!0))}function W(){g&&g.cancel()}function q(){g&&!g.isPaused()&&(W(),f())}function z(P){var _=n.easingFunc;return _?_(P):1-Math.pow(1-P,4)}return{mount:b,destroy:W,scroll:M,cancel:q}}var co={passive:!1,capture:!0};function Wm(e,t,n){var i=nn(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,v=t.Elements.track,g=t.Media.reduce,m=t.Direction,x=m.resolve,b=m.orient,M=u.getPosition,f=u.exceededLimit,S,W,q,z,P,_=!1,G,$,L;function D(){l(v,Ka,_s,co),l(v,Qa,_s,co),l(v,Du,T,co),l(v,"click",w,{capture:!0}),l(v,"dragstart",ti),o([Ei,mn],E)}function E(){var K=n.drag;ce(!K),z=K==="free"}function T(K){if(G=!1,!$){var se=Pe(K);be(K.target)&&(se||!K.button)&&(y.isBusy()?ti(K,!0):(L=se?v:window,P=d.is([Ho,Cr]),q=null,l(L,Ka,C,co),l(L,Qa,V,co),u.cancel(),p.cancel(),U(K)))}}function C(K){if(d.is(sa)||(d.set(sa),r(vu)),K.cancelable)if(P){u.translate(S+J(O(K)));var se=re(K)>gc,pe=_!==(_=f());(se||pe)&&U(K),G=!0,r(xu),ti(K)}else j(K)&&(P=A(K),ti(K))}function V(K){d.is(sa)&&(d.set($o),r(bu)),P&&(I(K),ti(K)),c(L,Ka,C),c(L,Qa,V),P=!1}function w(K){!$&&G&&ti(K,!0)}function U(K){q=W,W=K,S=M()}function I(K){var se=ie(K),pe=ae(se),fe=n.rewind&&n.rewindByDrag;g(!1),z?y.scroll(pe,0,n.snap):e.is(Er)?y.go(b(Ws(se))<0?fe?"<":"-":fe?">":"+"):e.is(To)&&_&&fe?y.go(f(!0)?">":"<"):y.go(y.toDest(pe),!0),g(!0)}function A(K){var se=n.dragMinThreshold,pe=dr(se),fe=pe&&se.mouse||0,we=(pe?se.touch:+se)||10;return vn(O(K))>(Pe(K)?we:fe)}function j(K){return vn(O(K))>vn(O(K,!0))}function ie(K){if(e.is(Oo)||!_){var se=re(K);if(se&&se<gc)return O(K)/se}return 0}function ae(K){return M()+Ws(K)*Li(vn(K)*(n.flickPower||600),z?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function O(K,se){return le(K,se)-le(N(K),se)}function re(K){return Hs(K)-Hs(N(K))}function N(K){return W===K&&q||W}function le(K,se){return(Pe(K)?K.changedTouches[0]:K)["page"+x(se?"Y":"X")]}function J(K){return K/(_&&e.is(To)?ym:1)}function be(K){var se=n.noDrag;return!ur(K,"."+Nu+", ."+Wa)&&(!se||!ur(K,se))}function Pe(K){return typeof TouchEvent<"u"&&K instanceof TouchEvent}function ye(){return P}function ce(K){$=K}return{mount:D,disable:ce,isDragging:ye}}var Om={Spacebar:" ",Right:Na,Left:Fa,Up:Iu,Down:Ru};function Il(e){return e=Ti(e)?e:e.key,Om[e]||e}var mc="keydown";function Dm(e,t,n){var i=nn(e),o=i.on,r=i.bind,l=i.unbind,c=e.root,d=t.Direction.resolve,u,p;function y(){v(),o(mn,g),o(mn,v),o(ci,x)}function v(){var M=n.keyboard;M&&(u=M==="global"?window:c,r(u,mc,b))}function g(){l(u,mc)}function m(M){p=M}function x(){var M=p;p=!0,ru(function(){p=M})}function b(M){if(!p){var f=Il(M);f===d(Fa)?e.go("<"):f===d(Na)&&e.go(">")}}return{mount:y,destroy:g,disable:m}}var sr=fl+"-lazy",da=sr+"-srcset",Bm="["+sr+"], ["+da+"]";function zm(e,t,n){var i=nn(e),o=i.on,r=i.off,l=i.bind,c=i.emit,d=n.lazyLoad==="sequential",u=[Wo,Ki],p=[];function y(){n.lazyLoad&&(v(),o(sn,v))}function v(){li(p),g(),d?M():(r(u),o(u,m),m())}function g(){t.Slides.forEach(function(f){hl(f.slide,Bm).forEach(function(S){var W=Nn(S,sr),q=Nn(S,da);if(W!==S.src||q!==S.srcset){var z=n.classes.spinner,P=S.parentElement,_=Ir(P,"."+z)||vo("span",z,P);p.push([S,f,_]),S.src||mr(S,"none")}})})}function m(){p=p.filter(function(f){var S=n.perPage*((n.preloadPages||1)+1)-1;return f[1].isWithin(e.index,S)?x(f):!0}),p.length||r(u)}function x(f){var S=f[0];jn(f[1].slide,zs),l(S,"load error",Jt(b,f)),Nt(S,"src",Nn(S,sr)),Nt(S,"srcset",Nn(S,da)),Vn(S,sr),Vn(S,da)}function b(f,S){var W=f[0],q=f[1];oi(q.slide,zs),S.type!=="error"&&(Ui(f[2]),mr(W,""),c($l,W,q),c(Co)),d&&M()}function M(){p.length&&x(p.shift())}return{mount:y,destroy:Jt(li,p),check:m}}function jm(e,t,n){var i=nn(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,v=u.go,g=t.Direction.resolve,m=d.pagination,x=[],b,M;function f(){S(),o([mn,sn,xa],f);var $=n.pagination;m&&mr(m,$?"":"none"),$&&(o([ci,Ea,Ki],G),W(),G(),r($u,{list:b,items:x},_(e.index)))}function S(){b&&(Ui(m?Mi(b.children):b),oi(b,M),li(x),b=null),i.destroy()}function W(){var $=e.length,L=n.classes,D=n.i18n,E=n.perPage,T=p()?u.getEnd()+1:hr($/E);b=m||vo("ul",L.pagination,d.track.parentElement),jn(b,M=Oa+"--"+P()),Nt(b,ri,"tablist"),Nt(b,In,D.select),Nt(b,Tl,P()===_a?"vertical":"");for(var C=0;C<T;C++){var V=vo("li",null,b),w=vo("button",{class:L.page,type:"button"},V),U=c.getIn(C).map(function(A){return A.slide.id}),I=!p()&&E>1?D.pageX:D.slideX;l(w,"click",Jt(q,C)),n.paginationKeyboard&&l(w,"keydown",Jt(z,C)),Nt(V,ri,"presentation"),Nt(w,ri,"tab"),Nt(w,Mr,U.join(" ")),Nt(w,In,Os(I,C+1)),Nt(w,xo,-1),x.push({li:V,button:w,page:C})}}function q($){v(">"+$,!0)}function z($,L){var D=x.length,E=Il(L),T=P(),C=-1;E===g(Na,!1,T)?C=++$%D:E===g(Fa,!1,T)?C=(--$+D)%D:E==="Home"?C=0:E==="End"&&(C=D-1);var V=x[C];V&&(cu(V.button),v(">"+C),ti(L,!0))}function P(){return n.paginationDirection||n.direction}function _($){return x[u.toPage($)]}function G(){var $=_(y(!0)),L=_(y());if($){var D=$.button;oi(D,qi),Vn(D,lc),Nt(D,xo,-1)}if(L){var E=L.button;jn(E,qi),Nt(E,lc,!0),Nt(E,xo,"")}r(Cu,{list:b,items:x},$,L)}return{items:x,mount:f,destroy:S,getAt:_,update:G}}var Vm=[" ","Enter"];function Gm(e,t,n){var i=n.isNavigation,o=n.slideFocus,r=[];function l(){e.splides.forEach(function(m){m.isParent||(u(e,m.splide),u(m.splide,e))}),i&&p()}function c(){r.forEach(function(m){m.destroy()}),li(r)}function d(){c(),l()}function u(m,x){var b=nn(m);b.on(ci,function(M,f,S){x.go(x.is(Oo)?S:M)}),r.push(b)}function p(){var m=nn(e),x=m.on;x(vl,v),x(Lu,g),x([Ei,mn],y),r.push(m),m.emit(bl,e.splides)}function y(){Nt(t.Elements.list,Tl,n.direction===_a?"vertical":"")}function v(m){e.go(m.index)}function g(m,x){gl(Vm,Il(x))&&(v(m),ti(x))}return{setup:Jt(t.Media.set,{slideFocus:Tr(o)?i:o},!0),mount:l,destroy:c,remount:d}}function Xm(e,t,n){var i=nn(e),o=i.bind,r=0;function l(){n.wheel&&o(t.Elements.track,"wheel",c,co)}function c(u){if(u.cancelable){var p=u.deltaY,y=p<0,v=Hs(u),g=n.wheelMinThreshold||0,m=n.wheelSleep||0;vn(p)>g&&v-r>m&&(e.go(y?"<":">"),r=v),d(y)&&ti(u)}}function d(u){return!n.releaseWheel||e.state.is(Ho)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var Um=90;function qm(e,t,n){var i=nn(e),o=i.on,r=t.Elements.track,l=n.live&&!n.isNavigation,c=vo("span",pm),d=ka(Um,Jt(p,!1));function u(){l&&(v(!t.Autoplay.isPaused()),Nt(r,uc,!0),c.textContent="…",o(Sl,Jt(v,!0)),o(wl,Jt(v,!1)),o([Wo,Ki],Jt(p,!0)))}function p(g){Nt(r,dc,g),g?(Pr(r,c),d.start()):(Ui(c),d.cancel())}function y(){Vn(r,[cc,uc,dc]),Ui(c)}function v(g){l&&Nt(r,cc,g?"off":"polite")}return{mount:u,disable:v,destroy:y}}var Ym=Object.freeze({__proto__:null,Media:im,Direction:om,Elements:vm,Slides:bm,Layout:Sm,Clones:$m,Move:Cm,Controller:Tm,Arrows:Im,Autoplay:Mm,Cover:Em,Scroll:Hm,Drag:Wm,Keyboard:Dm,LazyLoad:zm,Pagination:jm,Sync:Gm,Wheel:Xm,Live:qm}),Km={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"},Qm={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:hm,i18n:Km,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Zm(e,t,n){var i=t.Slides;function o(){nn(e).on([Ei,sn],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),ru(d)}return{mount:o,start:l,cancel:_s}}function Jm(e,t,n){var i=t.Move,o=t.Controller,r=t.Scroll,l=t.Elements.list,c=Jt(Fn,l,"transition"),d;function u(){nn(e).bind(l,"transitionend",function(g){g.target===l&&d&&(y(),d())})}function p(g,m){var x=i.toPosition(g,!0),b=i.getPosition(),M=v(g);vn(x-b)>=1&&M>=1?n.useScroll?r.scroll(x,M,!1,m):(c("transform "+M+"ms "+n.easing),i.translate(x,!0),d=m):(i.jump(g),m())}function y(){c(""),r.cancel()}function v(g){var m=n.rewindSpeed;if(e.is(To)&&m){var x=o.getIndex(!0),b=o.getEnd();if(x===0&&g>=b||x>=b&&g===0)return m}return n.speed}return{mount:u,start:p,cancel:y}}var eh=(function(){function e(n,i){this.event=nn(),this.Components={},this.state=tm(go),this.splides=[],this._o={},this._E={};var o=Ti(n)?uu(document,n):n;ar(o,o+" is invalid."),this.root=o,i=Si({label:Nn(o,In)||"",labelledby:Nn(o,Cl)||""},Qm,e.defaults,i||{});try{Si(i,JSON.parse(Nn(o,fl)))}catch{ar(!1,"Invalid JSON")}this._o=Object.create(Si({},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)?Zm:Jm),this._E=i||this._E;var d=gr({},Ym,this._E,{Transition:this._T});return Gi(d,function(u,p){var y=u(r,c,r._o);c[p]=y,y.setup&&y.setup()}),Gi(c,function(u){u.mount&&u.mount()}),this.emit(Ei),jn(this.root,gm),l.set($o),this.emit(Ds),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is($o)&&(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(Mi(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(sn),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,r=this.state;return r.is(go)?nn(this).on(Ds,this.destroy.bind(this,i)):(Gi(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(xl),o.destroy(),i&&li(this.splides),r.set(fa)),this},Kg(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})(),Rl=eh;Rl.defaults={};Rl.STATES=Zg;var hc=[[Ei,"onMounted"],[Ds,"onReady"],[ci,"onMove"],[Wo,"onMoved"],[vl,"onClick"],[mu,"onActive"],[hu,"onInactive"],[fu,"onVisible"],[yu,"onHidden"],[sn,"onRefresh"],[mn,"onUpdated"],[Co,"onResize"],[Ma,"onResized"],[vu,"onDrag"],[xu,"onDragging"],[bu,"onDragged"],[Ea,"onScroll"],[Ki,"onScrolled"],[xl,"onDestroy"],[Su,"onArrowsMounted"],[wu,"onArrowsUpdated"],[$u,"onPaginationMounted"],[Cu,"onPaginationUpdated"],[bl,"onNavigationMounted"],[Sl,"onAutoplayPlay"],[Tu,"onAutoplayPlaying"],[wl,"onAutoplayPause"],[$l,"onLazyLoadLoaded"]];function Ml(...e){return e.filter(Boolean).join(" ")}function ba(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(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)||!js(e[o],t[o]))}return e===t}function th(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function nh(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 nh(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():ba(i)?n[o]=Vs(ba(n[o])?n[o]:{},i):n[o]=i}),n}var ih=({children:e,className:t,...n})=>s.createElement("div",{className:Ml("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 Rl(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();th(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:Ml("splide",e),ref:this.splideRef,...this.omit(o,["options",...hc.map(r=>r[1])])},n?s.createElement(ih,null,i):i)}},kl=({children:e,className:t,...n})=>s.createElement("li",{className:Ml("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 oh="RichTextRenderer-module__link___BWeZ2",rh={link:oh},ah=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))},Do=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>ah(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function un(e){const{color:t,...n}=e;return n}function en(e,t){var o,r,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:Do(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:F.scalingValue(e.letterSpacing,t),wordSpacing:F.scalingValue(e.wordSpacing,t),fontSize:F.scalingValue(n,t),lineHeight:i!==void 0?F.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 Bu(e){return e!=null&&e.length?e.some(t=>t.type==="link"?Bu(t.children):!!t.text):!1}const Yi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?a.jsx("a",{className:rh.link,href:i.value,target:i.target,children:t(i.children)},o):a.jsx("span",{style:sh(i),children:i.text},o));return a.jsx(a.Fragment,{children:e.map((n,i)=>{const o=n.children;return a.jsx("div",{children:Bu(o)?t(o):" "},i)})})};function sh(e){return{...e.fontFamily&&{fontFamily:Do(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 lh="SvgImage-module__svg___q3xE-",ch="SvgImage-module__img___VsTm-",fc={svg:lh,img:ch},Za=new Map;function yr(e){return e.startsWith("data:")||e.startsWith("blob:")}function zu(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 dh=e=>{const t=e.trim().toLowerCase();return!!(t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")||t.includes(".svg")||t.startsWith("blob:"))},uh=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,gn=({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(!dh(e)){d(null);return}if(yr(e)){d(e);return}let u=!1;return zu(e).then(p=>{u||d(p)}).catch(()=>{u||d(null)}),()=>{u=!0}},[e]),!c||!r?a.jsx("img",{src:e,alt:"",className:Ct(fc.img,i),style:o}):a.jsx("span",{"data-supports-mask":r,className:Ct(fc.svg,i),style:{"--svg":uh(c),"--fill":t,"--hover-fill":n,...o??{}}})},ph={"top-left":$t.topLeftAlignment,"top-center":$t.topCenterAlignment,"top-right":$t.topRightAlignment,"middle-left":$t.middleLeftAlignment,"middle-center":$t.middleCenterAlignment,"middle-right":$t.middleRightAlignment,"bottom-left":$t.bottomLeftAlignment,"bottom-center":$t.bottomCenterAlignment,"bottom-right":$t.bottomRightAlignment};function gh({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:v,color:g}=n.imageCaption??{},[m,x]=s.useState(void 0),[b,R]=s.useState(null),[f,S]=s.useState(0),[W,q]=s.useState(0),{direction:z,transition:P,controls:_,pagination:G,imageCaption:$,triggers:L}=e,D=s.useRef(P.type),{x:E,y:T}=e.controls.offset,C=V=>{o&&o.go(V)};return s.useEffect(()=>{if(!b)return;const V=new ResizeObserver(w=>{if(!o)return;const[U]=w;x({width:Math.round(U.contentRect.width),height:Math.round(U.contentRect.height)})});return V.observe(b),()=>V.unobserve(b)},[b]),s.useEffect(()=>{!o||D.current===P.type||(q(V=>V+1),D.current=P.type)},[P.type]),a.jsx("div",{className:Ct($t.wrapper,{[$t.editor]:i}),ref:R,children:a.jsxs("div",{className:$t.sliderInner,style:{width:m?m.width:"100%",height:m?m.height:"100%",backgroundColor:P.backgroundColor&&P.type==="fade in"?P.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:Ct($t.captionBlock),children:a.jsx("div",{className:$t.captionTextWrapper,children:t.map((V,w)=>a.jsx("div",{className:Ct($t.captionText,ph[$.alignment],{[$t.withPointerEvents]:w===f&&i,[$t.active]:w===f}),style:{fontFamily:Do(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:l.sizing==="auto"?"max-content":F.scalingValue(l.width,i),letterSpacing:F.scalingValue(d,i),wordSpacing:F.scalingValue(p,i),textAlign:u,fontSize:F.scalingValue(y.fontSize,i),lineHeight:F.scalingValue(y.lineHeight,i),textTransform:v.textTransform??"none",textDecoration:v.textDecoration??"none",fontVariant:v.fontVariant??"normal",color:g,transitionDuration:P.duration?`${Math.round(parseInt(P.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:$t.captionTextInner,style:{"--link-hover-color":$.linkHoverColor,"--link-color":$.linkColor,position:"relative",top:F.scalingValue($.offset.y,i),left:F.scalingValue($.offset.x,i)},children:a.jsx(Yi,{content:V.imageCaption})})},w))})}),a.jsx(El,{onMove:V=>{S(V.index)},ref:r,options:{arrows:!1,speed:P.duration?parseInt(P.duration):500,autoplay:L.autoPlay!==null,...L.autoPlay!==null&&{interval:parseInt(L.autoPlay)*1e3},direction:z==="horiz"||P.type==="fade in"?"ltr":"ttb",pagination:!1,drag:L.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:P.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((V,w)=>a.jsx(kl,{children:a.jsx("div",{className:$t.sliderItem,children:a.jsx("div",{className:$t.imgWrapper,children:a.jsx("img",{className:Ct($t.sliderImage,{[$t.contain]:V.image.objectFit==="contain",[$t.cover]:V.image.objectFit==="cover"}),src:V.image.url,alt:V.image.name??""})})})},w))},W),_.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Ct($t.arrow,{[$t.arrowVertical]:z==="vert",[$t.hoverArrow]:_.show==="on hover"}),style:{color:_.color,"--arrow-hover-color":_.hover},children:a.jsxs("button",{onClick:()=>{C("-1")},className:$t.arrowInner,style:{transform:`translate(${F.scalingValue(E,i)}, ${F.scalingValue(T*(z==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${z==="horiz"?"0deg":"90deg"})`},children:[_.arrowsImgUrl&&a.jsx(gn,{url:_.arrowsImgUrl,fill:_.color,hoverFill:_.hover,className:Ct($t.arrowImg,$t.mirror)}),!_.arrowsImgUrl&&a.jsx(yc,{color:_.color,className:Ct($t.arrowIcon,$t.arrowImg,$t.mirror)})]})}),a.jsx("div",{className:Ct($t.arrow,$t.nextArrow,{[$t.arrowVertical]:z==="vert",[$t.hoverArrow]:_.show==="on hover"}),style:{color:_.color,"--arrow-hover-color":_.hover},children:a.jsxs("button",{className:$t.arrowInner,onClick:()=>C("+1"),style:{transform:`translate(${F.scalingValue(E*(z==="horiz"?-1:1),i)}, ${F.scalingValue(T,i)}) scale(${e.controls.scale/100}) rotate(${z==="horiz"?"0deg":"90deg"})`},children:[_.arrowsImgUrl&&a.jsx(gn,{url:_.arrowsImgUrl,fill:_.color,hoverFill:_.hover,className:$t.arrowImg}),!_.arrowsImgUrl&&a.jsx(yc,{color:_.color,className:Ct($t.arrowIcon,$t.arrowImg)})]})})]}),L.triggersList.click&&a.jsx("div",{className:$t.clickOverlay,onClick:()=>{o&&o.go("+1")}}),G.isActive&&a.jsx("div",{className:Ct($t.pagination,{[$t.paginationInsideBottom]:G.position==="inside-1"&&z==="horiz",[$t.paginationInsideTop]:G.position==="inside-2"&&z==="horiz",[$t.paginationOutsideBottom]:G.position==="outside-1"&&z==="horiz",[$t.paginationOutsideTop]:G.position==="outside-2"&&z==="horiz",[$t.paginationInsideLeft]:G.position==="inside-1"&&z==="vert",[$t.paginationInsideRight]:G.position==="inside-2"&&z==="vert",[$t.paginationOutsideLeft]:G.position==="outside-1"&&z==="vert",[$t.paginationOutsideRight]:G.position==="outside-2"&&z==="vert",[$t.paginationVertical]:z==="vert"}),children:a.jsx("div",{className:$t.paginationInner,style:{backgroundColor:G.colors[2],transform:`scale(${G.scale/100}) translate(${F.scalingValue(G.offset.x,i)}, ${F.scalingValue(G.offset.y,i)}) rotate(${z==="horiz"?"0deg":"90deg"})`},children:t.map((V,w)=>a.jsx("button",{onClick:()=>{o&&o.go(w)},className:Ct($t.paginationItem),children:a.jsx("div",{className:Ct($t.dot,{[$t.activeDot]:w===f}),style:{backgroundColor:w===f?G.colors[0]:G.colors[1],"--pagination-hover-color":G.hover}})},w))})})]})})}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 mh={element:gh,id:"control-slider",name:"Slider",preview:{type:"image",url:"01M3QM74XGDEQTW8Y71W6D7ANX"},defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"inside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"01M3QM74XES6E7GVC0H3KJ2RH6",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"01M3QM74XEAZ8H1DTC5V1S554K",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"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"]}},hh="ImageRevealSlider-module__imageRevealSlider___UE5Ob",fh="ImageRevealSlider-module__image___Qjt-e",yh="ImageRevealSlider-module__link___N-iLG",vh="ImageRevealSlider-module__cursor___2U03d",no={imageRevealSlider:hh,image:fh,link:yh,cursor:vh};function vc(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const r=i.width?Number.parseFloat(i.width):o.naturalWidth,l=o.naturalHeight/o.naturalWidth*r,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 xh(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 bh({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}),[v,g]=s.useState(1),[m,x]=s.useState("none"),b=s.useRef({x:0,y:0}),[R,f]=s.useState(!1),{sizeType:S,imageWidth:W,randomRangeImageWidth:q}=e.imageSize,{revealPosition:z,visible:P}=e.position,{cursorType:_,target:G,defaultCursorScale:$,defaultCursor:L,hoverCursorScale:D,hoverCursor:E}=e.cursor;s.useEffect(()=>{if(!i)return;const V=(M,A)=>{const j=i.getBoundingClientRect(),ie=M-j.left,ae=A-j.top;if(y({x:ie,y:ae}),_==="system"){x("none"),g(1);return}const O=ie,re=ae,N=document.elementFromPoint(j.left+O,j.top+re);if(N&&N.closest("a")){x("none"),g(1);return}const le=vc(O,re,r)||G==="area"?{img:E??"none",scale:D}:{img:L??"none",scale:$};x(le.img),g(le.scale)},w=M=>{M.stopPropagation(),b.current={x:M.clientX,y:M.clientY},V(M.clientX,M.clientY)},U=()=>{R&&V(b.current.x,b.current.y)};return i.addEventListener("mousemove",w),window.addEventListener("scroll",U,!0),()=>{i.removeEventListener("mousemove",w),window.removeEventListener("scroll",U,!0)}},[i,R,p,_,G,E,L,D,$,r]),s.useEffect(()=>{R||(x("none"),g(0))},[R]);const T=async(V,w,U,M={})=>{const{width:A,height:j,finalWidth:ie}=await xh(V.image.url,S,W,q);let ae=0,O=0;z==="same"?(ae=w/2,O=U/2):(ae=M.x??Math.random()*w,O=M.y??Math.random()*U);const re=Math.min(Math.max(ae,A/2),w-A/2),N=Math.min(Math.max(O,j/2),U-j/2);return{id:u.current++,url:V.image.url,link:V.link,name:V.image.name,x:re,y:N,width:ie}};s.useEffect(()=>{if(!i||t.length===0)return;const V=i.getBoundingClientRect(),w=V.width,U=V.height,M=[];(async()=>{const j=t[0],ie=await T(j,w,U);M.push(ie),l(M),d(1)})()},[S,W,q,z,i]),s.useEffect(()=>{P==="last One"&&l(V=>V.length>0?[V[V.length-1]]:[])},[P]);const C=async V=>{if(!i)return;const w=i.getBoundingClientRect(),U=V.clientX-w.left,M=V.clientY-w.top;if(G==="image"&&!vc(U,M,r))return;let A=0,j=0;z==="on Click"?(A=U,j=M):z==="same"?(A=w.width/2,j=w.height/2):(A=Math.random()*w.width,j=Math.random()*w.height);const ie=t[c],ae=await T(ie,w.width,w.height,{x:A,y:j});l(O=>P==="all"?[...O,ae]:[ae]),d(O=>O>=t.length-1?0:O+1)};return a.jsxs("div",{ref:o,onClick:C,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),className:no.imageRevealSlider,style:{cursor:m==="none"?"default":"none"},children:[r.map(V=>a.jsx("div",{className:no.wrapper,style:{top:`${V.y}px`,left:`${V.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:V.width??"auto",height:"auto",cursor:m==="none"?"default":"none"},children:G==="area"&&V.link?a.jsx("a",{href:V.link,target:"_blank",className:no.link,children:a.jsx("img",{src:V.url,alt:V.name,className:no.image},V.id)}):a.jsx("img",{src:V.url,alt:V.name,className:no.image},V.id)},V.id)),R&&a.jsx("div",{className:no.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${v})`,backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Sh={element:bh,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"01M3QM74XEPYV09AFGKHG6H1ZQ"},defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"01M3QM74XGWBJY3AQQ71GC2Z6Q",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",url:"01M3QM74XGMXS1Z5ZY2RFGS3T4",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",url:"01M3QM74XGWG6VCHNEXKVKAJGT",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",url:"01M3QM74XGCVMTPNHFHMR98RPZ",name:"Slider-4.png"},link:""}]}}}},wh="LightBox-module__hidden___9s-9x",$h="LightBox-module__heroImage___sTxNF",Ch="LightBox-module__background___rm9ml",Th="LightBox-module__editor___4ACaY",Lh="LightBox-module__contentStyle___Bgnsq",Ph="LightBox-module__imageStyle___tLIlB",Mh="LightBox-module__imgWrapper___LuFUp",Ih="LightBox-module__contain___8-yaS",Rh="LightBox-module__cover___hNvOG",Eh="LightBox-module__caption___b6L2I",kh="LightBox-module__captionTextInner___rCGNH",Ah="LightBox-module__lightboxSplide___XFuWC",Fh="LightBox-module__arrow___iz38X",Nh="LightBox-module__arrowVertical___Zfz81",_h="LightBox-module__nextArrow___zkAQN",Hh="LightBox-module__arrowInner___p48sW",Wh="LightBox-module__arrowIcon___3VaFf",Oh="LightBox-module__arrowImg___pNV88",Dh="LightBox-module__mirror___pjeXc",Bh="LightBox-module__thumbsWrapper___GB-nU",zh="LightBox-module__thumbsContainerVertical___wttk5",jh="LightBox-module__thumbsContainer___osSma",Vh="LightBox-module__thumbsAlignStart___MO6tY",Gh="LightBox-module__thumbsAlignCenter___Q4sUx",Xh="LightBox-module__thumbsAlignEnd___p4y9R",Uh="LightBox-module__thumbItem___HvnF3",qh="LightBox-module__closeButton___g2khP",Yh="LightBox-module__fadeIn___0m5GW",Kh="LightBox-module__slideInLeft___gPYwC",Qh="LightBox-module__slideInRight___S-pPp",Zh="LightBox-module__slideInTop___DFdAj",Jh="LightBox-module__slideInBottom___m27kZ",ef="LightBox-module__fadeOut___55qBR",tf="LightBox-module__slideOutLeft___NvU7P",nf="LightBox-module__slideOutRight___SK7eC",of="LightBox-module__slideOutTop___Vgg0z",rf="LightBox-module__slideOutBottom___nJ0Ef",af="LightBox-module__scaleSlide___vZriG",at={hidden:wh,heroImage:$h,background:Ch,editor:Th,contentStyle:Lh,imageStyle:Ph,imgWrapper:Mh,contain:Ih,cover:Rh,caption:Eh,captionTextInner:kh,lightboxSplide:Ah,arrow:Fh,arrowVertical:Nh,nextArrow:_h,arrowInner:Hh,arrowIcon:Wh,arrowImg:Oh,mirror:Dh,thumbsWrapper:Bh,thumbsContainerVertical:zh,thumbsContainer:jh,thumbsAlignStart:Vh,thumbsAlignCenter:Gh,thumbsAlignEnd:Xh,thumbItem:Uh,closeButton:qh,fadeIn:Yh,slideInLeft:Kh,slideInRight:Qh,slideInTop:Zh,slideInBottom:Jh,fadeOut:ef,slideOutLeft:tf,slideOutRight:nf,slideOutTop:of,slideOutBottom:rf,scaleSlide:af},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% + ${F.scalingValue(t.x,n)}), calc(-50% + ${F.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${F.scalingValue(t.x,n)}, calc(-50% + ${F.scalingValue(t.y,n)}))`:r==="center"?i.transform=`translate(calc(-50% + ${F.scalingValue(t.x,n)}), ${F.scalingValue(t.y,n)})`:i.transform=`translate(${F.scalingValue(t.x,n)}, ${F.scalingValue(t.y,n)})`,i};function ju(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 sf(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 Vu(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 lf(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 Gu(e,t,n,i,o){const{x:r,y:l}=sf(o);return{offsetX:r*(e-n),offsetY:l*(t-i)}}function cf(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"?lf:Vu,{renderedW:u,renderedH:p}=d(n,i,o,r),{offsetX:y,offsetY:v}=Gu(n,i,u,p,c),g=(y+u/2)/n*100,m=(v+p/2)/i*100;return`${g}% ${m}%`}function df(e){return cf(e)}function Sa(e){const t=e.getBoundingClientRect(),n=ju(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}=Vu(i,o,r,l),u=window.getComputedStyle(e).objectPosition,{offsetX:p,offsetY:y}=Gu(i,o,c,d,u),v=t.left+n.left,g=t.top+n.top;return{x:p+v,y:y+g,width:c,height:d}}function xc(e){const t=e.getBoundingClientRect(),n=ju(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function uf(e,t){const n=(()=>{if(e==="fade in")return at.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return at.slideInLeft;case"right":return at.slideInRight;case"top":return at.slideInTop;case"bottom":return at.slideInBottom;default:return at.slideInRight}return at.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return at.fadeIn;if(e==="slide in")switch(t){case"left":return at.slideInLeft;case"right":return at.slideInRight;case"top":return at.slideInTop;case"bottom":return at.slideInBottom;default:return at.slideInRight}return at.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return at.fadeOut;if(e==="slide in")switch(t){case"left":return at.slideOutLeft;case"right":return at.slideOutRight;case"top":return at.slideOutTop;case"bottom":return at.slideOutBottom;default:return at.slideOutRight}return at.fadeOut})(),r=(()=>{if(e==="fade in")return at.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return at.slideOutLeft;case"right":return at.slideOutRight;case"top":return at.slideOutTop;case"bottom":return at.slideOutBottom;default:return at.slideOutRight}return at.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:r}}const pf=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:r,isPreviewMode:l})=>{const[c,d]=s.useState(!1),{url: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:at.heroImage,onClick:()=>d(!0)}),a.jsx(gf,{isOpen:c,onClose:()=>d(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:r})]})},gf=({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:v,fontSizeLineHeight:g,textAppearance:m,color:x}=i.imageCaption??{},[b,R]=s.useState(0),[f,S]=s.useState(0),[W,q]=s.useState(!1),[z,P]=s.useState(!1),[_,G]=s.useState({}),$=s.useRef(null),L=s.useRef(null),D=s.useRef(null),E=s.useRef(!1),T=s.useRef(null),C=s.useRef(null),V=s.useRef(null),w=s.useRef(null),U=s.useRef(!1),M=s.useRef(null),[A,j]=s.useState(!1),{appear:ie,triggers:ae,slider:O,thumbnail:re,controls:N,area:le,caption:J,layout:be}=o.lightboxBlock,{appearClass:Pe,backdropAppearClass:ye,backdropDisappearClass:ce,disappearClass:K}=uf(ie.type,ie.direction),se=(c==null?void 0:c.itemId)??null;s.useEffect(()=>{const h=()=>{setTimeout(()=>{var Q,ne;(ne=(Q=$.current)==null?void 0:Q.splide)==null||ne.refresh()},16)},Y=()=>{S(Q=>Q+1)};return window.addEventListener("ArticleEditor.Layout:change",h),window.addEventListener("ArticleEditor.ComponentContent:change",Y),()=>{window.removeEventListener("ArticleEditor.Layout:change",h),window.removeEventListener("ArticleEditor.ComponentContent:change",Y)}},[]),s.useEffect(()=>{if(!e||!re.isActive){j(!1);return}const h=M.current;if(!h)return;const Y=()=>{O.direction==="horiz"?j(h.scrollWidth>h.clientWidth):j(h.scrollHeight>h.clientHeight)};Y();const Q=new ResizeObserver(Y);return Q.observe(h),()=>Q.disconnect()},[e,re.isActive,n.length,_,O.direction]);const pe=s.useCallback(()=>{const h=window.matchMedia("(max-width: 768px)").matches,Y=F.getColorAlpha(le.color);h&&!l&&Y>.9&&(document.body.style.backgroundColor=""),q(!0),E.current=!0;const Q=ne=>{ne.target===T.current&&ne.animationName&&(T.current&&C.current&&T.current.removeEventListener("animationend",C.current),C.current=null,E.current&&(E.current=!1,t()),q(!1))};T.current&&(C.current=Q,T.current.addEventListener("animationend",Q))},[t,le.color,l]),fe=(h,Y,Q)=>{var ne,ue;if(h){if(ae.type==="click"&&ae.switch==="image")ae.repeat==="close"&&b===n.length-1?pe():(ne=$.current)==null||ne.go("+1");else if(ae.type==="click"&&ae.switch==="50/50"){const B=h.getBoundingClientRect(),I=Y-B.left,ee=Q-B.top,te=B.width,ge=B.height;let X;O.direction==="horiz"?X=I<te/2?"-1":"+1":X=ee<ge/2?"-1":"+1",(ue=$.current)==null||ue.go(X)}}},we=h=>{if(U.current){U.current=!1;return}const Y=n[b],Q=(Y==null?void 0:Y.image.objectFit)==="cover";let ne,ue;if("changedTouches"in h&&h.changedTouches.length>0)ne=h.changedTouches[0].clientX,ue=h.changedTouches[0].clientY;else if("clientX"in h)ne=h.clientX,ue=h.clientY;else return;let B;if(Q&&D.current){const I=xc(D.current);B=ne>=I.left&&ne<=I.right&&ue>=I.top&&ue<=I.bottom}else{const I=D.current?Sa(D.current):null;if(!I){h.target===h.currentTarget&&pe();return}B=ne>=I.x&&ne<=I.x+I.width&&ue>=I.y&&ue<=I.y+I.height}B?fe(D.current,ne,ue):pe()},Ie=h=>{const Y=h.target;(Y.classList.contains(at.thumbsWrapper)||Y.classList.contains(at.thumbsContainer))&&we(h)};s.useEffect(()=>{if(!e)return;const h=Y=>{var Q,ne;if(Y.key==="Escape"){pe();return}if(Y.key==="ArrowRight"){R(ue=>(ue+1)%Math.max(n.length,1)),(Q=$.current)==null||Q.go("+1");return}Y.key==="ArrowLeft"&&(R(ue=>(ue-1+Math.max(n.length,1))%Math.max(n.length,1)),(ne=$.current)==null||ne.go("-1"))};return window.addEventListener("keydown",h),()=>{window.removeEventListener("keydown",h)}},[e,pe,n.length]),s.useEffect(()=>{if(e){if(R(0),S(Y=>Y+1),E.current=!1,q(!1),P(!1),G({}),!se)return;const h=new CustomEvent("page-overlay",{detail:{itemId:se}});window.dispatchEvent(h)}return()=>{T.current&&C.current&&(T.current.removeEventListener("animationend",C.current),C.current=null),P(!1)}},[e,se]),s.useEffect(()=>{L.current!==null&&L.current!==O.type&&S(h=>h+1),L.current=O.type},[O.type]),s.useEffect(()=>{if(!e)return;const h=document.body.style.overflow,Y=window.matchMedia("(max-width: 768px)").matches,Q=F.getColorAlpha(le.color);document.body.style.overflow="hidden",P(!1);const ne=B=>{B.target===T.current&&!E.current&&B.animationName&&(Y&&!l&&Q>.9&&(document.body.style.backgroundColor=le.color),P(!0),T.current&&V.current&&T.current.removeEventListener("animationend",V.current),V.current=null)};T.current&&(V.current=ne,T.current.addEventListener("animationend",ne));const ue=B=>{const I=B.target;I&&(I.closest(`.${at.thumbsWrapper}`)||I.closest(`.${at.thumbsContainer}`))||O.type!=="slide"&&B.preventDefault()};return document.addEventListener("touchmove",ue,{passive:!1}),()=>{document.body.style.overflow=h,document.removeEventListener("touchmove",ue),T.current&&V.current&&(T.current.removeEventListener("animationend",V.current),V.current=null),P(!1)}},[e,l,le.color,O.type]),s.useEffect(()=>{if(!e)return;const h=Y=>{var ne,ue;if(E.current){Y.stopPropagation();return}if(U.current){U.current=!1;return}const Q=Y.target;if(!(Q&&(Q.closest(`.${at.thumbsContainer}`)||Q.closest(`.${at.thumbItem}`)||Q.closest(`.${at.arrow}`)||Q.closest(`.${at.closeButton}`)||Q.closest(`.${at.caption}`)))){if(O.type==="slide"&&ae.type==="drag"&&((ue=(ne=$.current)==null?void 0:ne.splide)!=null&&ue.root)){const B=$.current.splide.root;if(Q&&(B.contains(Q)||B===Q))return}if(Y.touches.length===0&&Y.changedTouches.length>0){const B=n[b],I=(B==null?void 0:B.image.objectFit)==="cover",ee=Y.changedTouches[0];let te;if(I&&D.current){const ge=xc(D.current);te=ee.clientX>=ge.left&&ee.clientX<=ge.right&&ee.clientY>=ge.top&&ee.clientY<=ge.bottom}else{const ge=D.current?Sa(D.current):null;if(!ge)return;te=ee.clientX>=ge.x&&ee.clientX<=ge.x+ge.width&&ee.clientY>=ge.y&&ee.clientY<=ge.y+ge.height}if(!te){Y.stopPropagation(),E.current=!0;const ge=X=>{X.stopPropagation(),X.preventDefault(),document.removeEventListener("click",ge,!0)};document.addEventListener("click",ge,!0),pe()}}}};return document.addEventListener("touchend",h,{passive:!0}),()=>{document.removeEventListener("touchend",h)}},[e,pe,b,n]);const me=(O.type==="scale"||O.type==="fade")&&O.direction==="vert"&&ae.type==="drag";s.useEffect(()=>{var X,Me;if(!e||!me||!((Me=(X=$.current)==null?void 0:X.splide)!=null&&Me.root))return;const h=$.current.splide.root,Y=30,Q=(Se,Z)=>{if(w.current){const He=Math.abs(Se-w.current.x),We=Math.abs(Z-w.current.y);(He>0||We>0)&&(U.current=!0)}},ne=Se=>{w.current&&(Se.preventDefault(),Q(Se.clientX,Se.clientY))},ue=Se=>{w.current&&Se.touches.length>0&&(Se.preventDefault(),Q(Se.touches[0].clientX,Se.touches[0].clientY))},B=(Se,Z)=>{if(!w.current||!$.current){w.current=null;return}const He=Math.abs(Se-w.current.x),We=Math.abs(Z-w.current.y);We>Y&&We>He&&$.current.go(Z<w.current.y?"+1":"-1"),w.current=null},I=Se=>{w.current&&B(Se.clientX,Se.clientY),document.removeEventListener("pointerup",I),document.removeEventListener("pointercancel",I),document.removeEventListener("pointermove",ne)},ee=Se=>{if(w.current){if(Se.changedTouches.length>0){const Z=Se.changedTouches[0];B(Z.clientX,Z.clientY)}document.removeEventListener("touchend",ee),document.removeEventListener("touchcancel",ee),document.removeEventListener("touchmove",ue)}},te=Se=>{w.current={x:Se.clientX,y:Se.clientY},U.current=!1,document.addEventListener("pointermove",ne,{passive:!1}),document.addEventListener("pointerup",I),document.addEventListener("pointercancel",I)},ge=Se=>{Se.touches.length>0&&(w.current={x:Se.touches[0].clientX,y:Se.touches[0].clientY},U.current=!1,document.addEventListener("touchmove",ue,{passive:!1}),document.addEventListener("touchend",ee),document.addEventListener("touchcancel",ee))};return h.addEventListener("pointerdown",te),h.addEventListener("touchstart",ge),()=>{h.removeEventListener("pointerdown",te),h.removeEventListener("touchstart",ge),document.removeEventListener("pointermove",ne),document.removeEventListener("pointerup",I),document.removeEventListener("pointercancel",I),document.removeEventListener("touchmove",ue),document.removeEventListener("touchend",ee),document.removeEventListener("touchcancel",ee),w.current=null,U.current=!1}},[e,me,f]);const xe={backgroundColor:le.color,backdropFilter:`blur(${le.blur}px)`,animationDuration:`${parseInt(ie.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(r)?null:Xn.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:l?null:T,className:Ct(at.background,W?ce:ye,{[at.editor]:l},{[at.hidden]:!e}),style:{...xe,...z&&!l&&!W?{position:"absolute"}:{}}}),a.jsxs("div",{ref:l?T:null,className:Ct(at.contentStyle,W?K:Pe,{[at.editor]:l},{[at.hidden]:!e}),style:{animationDuration:`${parseInt(ie.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(El,{onMove:h=>R(h.index),ref:$,className:at.lightboxSplide,options:{arrows:!1,speed:O.duration?parseInt(O.duration):500,direction:O.direction==="horiz"||O.type==="fade"||O.type==="scale"?"ltr":"ttb",pagination:!1,drag:ae.type==="drag"&&!me,perPage:1,width:"100%",height:"100%",type:O.type==="fade"||O.type==="scale"?"fade":"loop",padding:0,rewind:ae.repeat!=="close",start:0},style:{"--splide-speed":O.duration},children:n.map((h,Y)=>{const Q=Wr(be.position,be.offset,l),ne=`${F.scalingValue(be.padding.top,l)} ${F.scalingValue(be.padding.right,l)} ${F.scalingValue(be.padding.bottom,l)} ${F.scalingValue(be.padding.left,l)}`,ue=O.type==="scale"?(()=>{const{transform:B,...I}=Q;return{...I,position:"absolute",padding:ne,boxSizing:"border-box","--position-transform":B||"none"}})():{...Q,position:"absolute",padding:ne,boxSizing:"border-box"};return a.jsx(kl,{children:a.jsx("div",{className:at.imgWrapper,onClick:we,children:a.jsx("img",{ref:Y===b?D:null,className:Ct(at.imageStyle,{[at.contain]:h.image.objectFit==="contain",[at.cover]:h.image.objectFit==="cover",[at.scaleSlide]:O.type==="scale"}),src:h.image.url,alt:h.image.name??"",style:{...ue,pointerEvents:h.image.objectFit==="contain"?"none":"auto"}})})},Y)})},f),N.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Ct(at.arrow,{[at.arrowVertical]:O.direction==="vert"}),style:{color:N.color,"--arrow-hover-color":N.hover},children:a.jsxs("button",{className:at.arrowInner,style:{transform:`translate(${F.scalingValue(N.offset.x,l)}, ${F.scalingValue(N.offset.y*(O.direction==="horiz"?1:-1),l)}) scale(${N.scale}) rotate(${O.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var h;return(h=$.current)==null?void 0:h.go("-1")},"aria-label":"Previous",children:[N.arrowsImgUrl&&a.jsx(gn,{url:N.arrowsImgUrl,fill:N.color,hoverFill:N.hover,className:Ct(at.arrowImg,at.mirror)}),!N.arrowsImgUrl&&a.jsx(bc,{color:N.color,className:Ct(at.arrowIcon,at.arrowImg,at.mirror)})]})}),a.jsx("div",{className:Ct(at.arrow,at.nextArrow,{[at.arrowVertical]:O.direction==="vert"}),style:{color:N.color,"--arrow-hover-color":N.hover},children:a.jsxs("button",{className:at.arrowInner,style:{transform:`translate(${F.scalingValue(N.offset.x*(O.direction==="horiz"?-1:1),l)}, ${F.scalingValue(N.offset.y,l)}) scale(${N.scale}) rotate(${O.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var h;return(h=$.current)==null?void 0:h.go("+1")},"aria-label":"Next",children:[N.arrowsImgUrl&&a.jsx(gn,{url:N.arrowsImgUrl,fill:N.color,hoverFill:N.hover,className:at.arrowImg}),!N.arrowsImgUrl&&a.jsx(bc,{color:N.color,className:Ct(at.arrowIcon,at.arrowImg)})]})})]}),le.closeIconUrl&&(()=>{const h=Wr(le.closeIconAlign,le.closeIconOffset,l),Y=`scale(${le.closeIconScale})`,Q=h.transform?`${h.transform} ${Y}`:Y;return a.jsx("button",{className:at.closeButton,style:{...h,transform:Q},onClick:pe,"aria-label":"Close lightbox",children:a.jsx(gn,{url:le.closeIconUrl,fill:le.closeIconColor??"#000000",hoverFill:le.closeIconHover??"#cccccc"})})})(),J&&J.isActive&&i.imageCaption&&((Ce=n[b])==null?void 0:Ce.imageCaption)&&a.jsx("div",{className:at.caption,style:{...Wr(J.alignment,J.offset,l),fontFamily:Do(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:d.sizing==="auto"?"max-content":F.scalingValue(d.width,l),letterSpacing:F.scalingValue(p,l),wordSpacing:F.scalingValue(v,l),textAlign:y,fontSize:F.scalingValue(g.fontSize,l),lineHeight:F.scalingValue(g.lineHeight,l),textTransform:m.textTransform??"none",textDecoration:m.textDecoration??"none",fontVariant:m.fontVariant??"normal",color:x},onClick:h=>h.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:at.captionTextInner,style:{"--link-color":J.linkColor,"--link-hover-color":J.linkHoverColor},children:a.jsx(Yi,{content:n[b].imageCaption})})}),re.isActive&&(()=>{const[h,Y]=re.position.split("-"),Q=O.direction==="horiz"?`${h}-left`:re.position,ne=Wr(Q,re.offset,l),ue=()=>{if(O.direction==="horiz"){if(Y==="left")return"flex-start";if(Y==="center")return"center";if(Y==="right")return"flex-end"}else{if(h==="top")return"flex-start";if(h==="middle")return"center";if(h==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:M,className:at.thumbsWrapper,onClick:B=>Ie(B),style:{position:l?"absolute":"fixed",...ne,...O.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:Ct(at.thumbsContainer,{[at.thumbsContainerVertical]:O.direction==="vert",[at.thumbsAlignStart]:re.align==="start",[at.thumbsAlignCenter]:re.align==="center",[at.thumbsAlignEnd]:re.align==="end"}),style:{gap:F.scalingValue(re.grid.gap,l),justifyContent:A?"flex-start":ue()},children:n.map((B,I)=>{const ee=I===b,te=_[I],X=re.grid.size*(ee?re.activeState.scale:1),Me=()=>{if(re.fit!=="fit")return{};if(!te)return O.direction==="horiz"?{height:F.scalingValue(X,l)}:{width:F.scalingValue(X,l)};const Se=te.width/te.height;if(O.direction==="horiz"){const Z=X,He=Z*Se;return{width:F.scalingValue(He,l),height:F.scalingValue(Z,l)}}else{const Z=X,He=Z/Se;return{width:F.scalingValue(Z,l),height:F.scalingValue(He,l)}}};return a.jsx("button",{className:at.thumbItem,style:{...O.direction==="horiz"&&re.fit!=="fit"?{height:F.scalingValue(X,l)}:{},...O.direction==="vert"&&re.fit!=="fit"?{width:F.scalingValue(X,l)}:{},...re.fit==="cover"?{width:F.scalingValue(X,l),height:F.scalingValue(X,l)}:{},...Me(),transition:ee?"all 0.25s ease-out":"none",opacity:ee?re.activeState.opacity/100:re.opacity/100,"--thumb-hover":re.activeState.opacity/100},onClick:Se=>{var Z;Se.stopPropagation(),R(I),(Z=$.current)==null||Z.go(I)},onMouseEnter:()=>{var Se;re.triggers==="hov"&&((Se=$.current)==null||Se.go(I))},children:a.jsx("img",{src:B.image.url,alt:B.image.name??"",onLoad:Se=>{const Z=Se.currentTarget;Z.naturalWidth&&Z.naturalHeight&&G(He=>({...He,[I]:{width:Z.naturalWidth,height:Z.naturalHeight}}))},style:{objectFit:re.fit==="cover"?"cover":"contain",...re.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...re.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${B.image.name}-${I}`)})})})})()]})]}),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 mf={element:pf,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"01M3QM74XF4M8H1ATJ56F5HPCH"},defaultSize:{d:{width:440,height:550},t:{width:235,height:293},m:{width:265,height:331}},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.url",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{url:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{url:"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:{url:"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:{url:"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:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",url:"01M3QM74XD4J8X0B8TTSQ8CV3P",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"01M3QM74XD0N6VQJ5J8J9YB32N",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"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 hf(e){return`
6
+ */const oh="RichTextRenderer-module__link___BWeZ2",rh={link:oh},ah=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))},Do=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>ah(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function un(e){const{color:t,...n}=e;return n}function en(e,t){var o,r,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:Do(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:F.scalingValue(e.letterSpacing,t),wordSpacing:F.scalingValue(e.wordSpacing,t),fontSize:F.scalingValue(n,t),lineHeight:i!==void 0?F.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 Bu(e){return e!=null&&e.length?e.some(t=>t.type==="link"?Bu(t.children):!!t.text):!1}const Yi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?a.jsx("a",{className:rh.link,href:i.value,target:i.target,children:t(i.children)},o):a.jsx("span",{style:sh(i),children:i.text},o));return a.jsx(a.Fragment,{children:e.map((n,i)=>{const o=n.children;return a.jsx("div",{children:Bu(o)?t(o):" "},i)})})};function sh(e){return{...e.fontFamily&&{fontFamily:Do(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 lh="SvgImage-module__svg___q3xE-",ch="SvgImage-module__img___VsTm-",fc={svg:lh,img:ch},Za=new Map;function yr(e){return e.startsWith("data:")||e.startsWith("blob:")}function zu(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 dh=e=>{const t=e.trim().toLowerCase();return!!(t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")||t.includes(".svg")||t.startsWith("blob:"))},uh=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,gn=({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(!dh(e)){d(null);return}if(yr(e)){d(e);return}let u=!1;return zu(e).then(p=>{u||d(p)}).catch(()=>{u||d(null)}),()=>{u=!0}},[e]),!c||!r?a.jsx("img",{src:e,alt:"",className:Ct(fc.img,i),style:o}):a.jsx("span",{"data-supports-mask":r,className:Ct(fc.svg,i),style:{"--svg":uh(c),"--fill":t,"--hover-fill":n,...o??{}}})},ph={"top-left":$t.topLeftAlignment,"top-center":$t.topCenterAlignment,"top-right":$t.topRightAlignment,"middle-left":$t.middleLeftAlignment,"middle-center":$t.middleCenterAlignment,"middle-right":$t.middleRightAlignment,"bottom-left":$t.bottomLeftAlignment,"bottom-center":$t.bottomCenterAlignment,"bottom-right":$t.bottomRightAlignment};function gh({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:v,color:g}=n.imageCaption??{},[m,x]=s.useState(void 0),[b,M]=s.useState(null),[f,S]=s.useState(0),[W,q]=s.useState(0),{direction:z,transition:P,controls:_,pagination:G,imageCaption:$,triggers:L}=e,D=s.useRef(P.type),{x:E,y:T}=e.controls.offset,C=V=>{o&&o.go(V)};return s.useEffect(()=>{if(!b)return;const V=new ResizeObserver(w=>{if(!o)return;const[U]=w;x({width:Math.round(U.contentRect.width),height:Math.round(U.contentRect.height)})});return V.observe(b),()=>V.unobserve(b)},[b]),s.useEffect(()=>{!o||D.current===P.type||(q(V=>V+1),D.current=P.type)},[P.type]),a.jsx("div",{className:Ct($t.wrapper,{[$t.editor]:i}),ref:M,children:a.jsxs("div",{className:$t.sliderInner,style:{width:m?m.width:"100%",height:m?m.height:"100%",backgroundColor:P.backgroundColor&&P.type==="fade in"?P.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:Ct($t.captionBlock),children:a.jsx("div",{className:$t.captionTextWrapper,children:t.map((V,w)=>a.jsx("div",{className:Ct($t.captionText,ph[$.alignment],{[$t.withPointerEvents]:w===f&&i,[$t.active]:w===f}),style:{fontFamily:Do(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:l.sizing==="auto"?"max-content":F.scalingValue(l.width,i),letterSpacing:F.scalingValue(d,i),wordSpacing:F.scalingValue(p,i),textAlign:u,fontSize:F.scalingValue(y.fontSize,i),lineHeight:F.scalingValue(y.lineHeight,i),textTransform:v.textTransform??"none",textDecoration:v.textDecoration??"none",fontVariant:v.fontVariant??"normal",color:g,transitionDuration:P.duration?`${Math.round(parseInt(P.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:$t.captionTextInner,style:{"--link-hover-color":$.linkHoverColor,"--link-color":$.linkColor,position:"relative",top:F.scalingValue($.offset.y,i),left:F.scalingValue($.offset.x,i)},children:a.jsx(Yi,{content:V.imageCaption})})},w))})}),a.jsx(El,{onMove:V=>{S(V.index)},ref:r,options:{arrows:!1,speed:P.duration?parseInt(P.duration):500,autoplay:L.autoPlay!==null,...L.autoPlay!==null&&{interval:parseInt(L.autoPlay)*1e3},direction:z==="horiz"||P.type==="fade in"?"ltr":"ttb",pagination:!1,drag:L.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:P.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((V,w)=>a.jsx(kl,{children:a.jsx("div",{className:$t.sliderItem,children:a.jsx("div",{className:$t.imgWrapper,children:a.jsx("img",{className:Ct($t.sliderImage,{[$t.contain]:V.image.objectFit==="contain",[$t.cover]:V.image.objectFit==="cover"}),src:V.image.url,alt:V.image.name??""})})})},w))},W),_.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Ct($t.arrow,{[$t.arrowVertical]:z==="vert",[$t.hoverArrow]:_.show==="on hover"}),style:{color:_.color,"--arrow-hover-color":_.hover},children:a.jsxs("button",{onClick:()=>{C("-1")},className:$t.arrowInner,style:{transform:`translate(${F.scalingValue(E,i)}, ${F.scalingValue(T*(z==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${z==="horiz"?"0deg":"90deg"})`},children:[_.arrowsImgUrl&&a.jsx(gn,{url:_.arrowsImgUrl,fill:_.color,hoverFill:_.hover,className:Ct($t.arrowImg,$t.mirror)}),!_.arrowsImgUrl&&a.jsx(yc,{color:_.color,className:Ct($t.arrowIcon,$t.arrowImg,$t.mirror)})]})}),a.jsx("div",{className:Ct($t.arrow,$t.nextArrow,{[$t.arrowVertical]:z==="vert",[$t.hoverArrow]:_.show==="on hover"}),style:{color:_.color,"--arrow-hover-color":_.hover},children:a.jsxs("button",{className:$t.arrowInner,onClick:()=>C("+1"),style:{transform:`translate(${F.scalingValue(E*(z==="horiz"?-1:1),i)}, ${F.scalingValue(T,i)}) scale(${e.controls.scale/100}) rotate(${z==="horiz"?"0deg":"90deg"})`},children:[_.arrowsImgUrl&&a.jsx(gn,{url:_.arrowsImgUrl,fill:_.color,hoverFill:_.hover,className:$t.arrowImg}),!_.arrowsImgUrl&&a.jsx(yc,{color:_.color,className:Ct($t.arrowIcon,$t.arrowImg)})]})})]}),L.triggersList.click&&a.jsx("div",{className:$t.clickOverlay,onClick:()=>{o&&o.go("+1")}}),G.isActive&&a.jsx("div",{className:Ct($t.pagination,{[$t.paginationInsideBottom]:G.position==="inside-1"&&z==="horiz",[$t.paginationInsideTop]:G.position==="inside-2"&&z==="horiz",[$t.paginationOutsideBottom]:G.position==="outside-1"&&z==="horiz",[$t.paginationOutsideTop]:G.position==="outside-2"&&z==="horiz",[$t.paginationInsideLeft]:G.position==="inside-1"&&z==="vert",[$t.paginationInsideRight]:G.position==="inside-2"&&z==="vert",[$t.paginationOutsideLeft]:G.position==="outside-1"&&z==="vert",[$t.paginationOutsideRight]:G.position==="outside-2"&&z==="vert",[$t.paginationVertical]:z==="vert"}),children:a.jsx("div",{className:$t.paginationInner,style:{backgroundColor:G.colors[2],transform:`scale(${G.scale/100}) translate(${F.scalingValue(G.offset.x,i)}, ${F.scalingValue(G.offset.y,i)}) rotate(${z==="horiz"?"0deg":"90deg"})`},children:t.map((V,w)=>a.jsx("button",{onClick:()=>{o&&o.go(w)},className:Ct($t.paginationItem),children:a.jsx("div",{className:Ct($t.dot,{[$t.activeDot]:w===f}),style:{backgroundColor:w===f?G.colors[0]:G.colors[1],"--pagination-hover-color":G.hover}})},w))})})]})})}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 mh={element:gh,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"inside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"01M3QM74XES6E7GVC0H3KJ2RH6",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"01M3QM74XEAZ8H1DTC5V1S554K",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"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"]}},hh="ImageRevealSlider-module__imageRevealSlider___UE5Ob",fh="ImageRevealSlider-module__image___Qjt-e",yh="ImageRevealSlider-module__link___N-iLG",vh="ImageRevealSlider-module__cursor___2U03d",no={imageRevealSlider:hh,image:fh,link:yh,cursor:vh};function vc(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const r=i.width?Number.parseFloat(i.width):o.naturalWidth,l=o.naturalHeight/o.naturalWidth*r,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 xh(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 bh({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}),[v,g]=s.useState(1),[m,x]=s.useState("none"),b=s.useRef({x:0,y:0}),[M,f]=s.useState(!1),{sizeType:S,imageWidth:W,randomRangeImageWidth:q}=e.imageSize,{revealPosition:z,visible:P}=e.position,{cursorType:_,target:G,defaultCursorScale:$,defaultCursor:L,hoverCursorScale:D,hoverCursor:E}=e.cursor;s.useEffect(()=>{if(!i)return;const V=(I,A)=>{const j=i.getBoundingClientRect(),ie=I-j.left,ae=A-j.top;if(y({x:ie,y:ae}),_==="system"){x("none"),g(1);return}const O=ie,re=ae,N=document.elementFromPoint(j.left+O,j.top+re);if(N&&N.closest("a")){x("none"),g(1);return}const le=vc(O,re,r)||G==="area"?{img:E??"none",scale:D}:{img:L??"none",scale:$};x(le.img),g(le.scale)},w=I=>{I.stopPropagation(),b.current={x:I.clientX,y:I.clientY},V(I.clientX,I.clientY)},U=()=>{M&&V(b.current.x,b.current.y)};return i.addEventListener("mousemove",w),window.addEventListener("scroll",U,!0),()=>{i.removeEventListener("mousemove",w),window.removeEventListener("scroll",U,!0)}},[i,M,p,_,G,E,L,D,$,r]),s.useEffect(()=>{M||(x("none"),g(0))},[M]);const T=async(V,w,U,I={})=>{const{width:A,height:j,finalWidth:ie}=await xh(V.image.url,S,W,q);let ae=0,O=0;z==="same"?(ae=w/2,O=U/2):(ae=I.x??Math.random()*w,O=I.y??Math.random()*U);const re=Math.min(Math.max(ae,A/2),w-A/2),N=Math.min(Math.max(O,j/2),U-j/2);return{id:u.current++,url:V.image.url,link:V.link,name:V.image.name,x:re,y:N,width:ie}};s.useEffect(()=>{if(!i||t.length===0)return;const V=i.getBoundingClientRect(),w=V.width,U=V.height,I=[];(async()=>{const j=t[0],ie=await T(j,w,U);I.push(ie),l(I),d(1)})()},[S,W,q,z,i]),s.useEffect(()=>{P==="last One"&&l(V=>V.length>0?[V[V.length-1]]:[])},[P]);const C=async V=>{if(!i)return;const w=i.getBoundingClientRect(),U=V.clientX-w.left,I=V.clientY-w.top;if(G==="image"&&!vc(U,I,r))return;let A=0,j=0;z==="on Click"?(A=U,j=I):z==="same"?(A=w.width/2,j=w.height/2):(A=Math.random()*w.width,j=Math.random()*w.height);const ie=t[c],ae=await T(ie,w.width,w.height,{x:A,y:j});l(O=>P==="all"?[...O,ae]:[ae]),d(O=>O>=t.length-1?0:O+1)};return a.jsxs("div",{ref:o,onClick:C,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),className:no.imageRevealSlider,style:{cursor:m==="none"?"default":"none"},children:[r.map(V=>a.jsx("div",{className:no.wrapper,style:{top:`${V.y}px`,left:`${V.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:V.width??"auto",height:"auto",cursor:m==="none"?"default":"none"},children:G==="area"&&V.link?a.jsx("a",{href:V.link,target:"_blank",className:no.link,children:a.jsx("img",{src:V.url,alt:V.name,className:no.image},V.id)}):a.jsx("img",{src:V.url,alt:V.name,className:no.image},V.id)},V.id)),M&&a.jsx("div",{className:no.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${v})`,backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Sh={element:bh,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"01M3QM74XGWBJY3AQQ71GC2Z6Q",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",url:"01M3QM74XGMXS1Z5ZY2RFGS3T4",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",url:"01M3QM74XGWG6VCHNEXKVKAJGT",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",url:"01M3QM74XGCVMTPNHFHMR98RPZ",name:"Slider-4.png"},link:""}]}}}},wh="LightBox-module__hidden___9s-9x",$h="LightBox-module__heroImage___sTxNF",Ch="LightBox-module__background___rm9ml",Th="LightBox-module__editor___4ACaY",Lh="LightBox-module__contentStyle___Bgnsq",Ph="LightBox-module__imageStyle___tLIlB",Ih="LightBox-module__imgWrapper___LuFUp",Rh="LightBox-module__contain___8-yaS",Mh="LightBox-module__cover___hNvOG",Eh="LightBox-module__caption___b6L2I",kh="LightBox-module__captionTextInner___rCGNH",Ah="LightBox-module__lightboxSplide___XFuWC",Fh="LightBox-module__arrow___iz38X",Nh="LightBox-module__arrowVertical___Zfz81",_h="LightBox-module__nextArrow___zkAQN",Hh="LightBox-module__arrowInner___p48sW",Wh="LightBox-module__arrowIcon___3VaFf",Oh="LightBox-module__arrowImg___pNV88",Dh="LightBox-module__mirror___pjeXc",Bh="LightBox-module__thumbsWrapper___GB-nU",zh="LightBox-module__thumbsContainerVertical___wttk5",jh="LightBox-module__thumbsContainer___osSma",Vh="LightBox-module__thumbsAlignStart___MO6tY",Gh="LightBox-module__thumbsAlignCenter___Q4sUx",Xh="LightBox-module__thumbsAlignEnd___p4y9R",Uh="LightBox-module__thumbItem___HvnF3",qh="LightBox-module__closeButton___g2khP",Yh="LightBox-module__fadeIn___0m5GW",Kh="LightBox-module__slideInLeft___gPYwC",Qh="LightBox-module__slideInRight___S-pPp",Zh="LightBox-module__slideInTop___DFdAj",Jh="LightBox-module__slideInBottom___m27kZ",ef="LightBox-module__fadeOut___55qBR",tf="LightBox-module__slideOutLeft___NvU7P",nf="LightBox-module__slideOutRight___SK7eC",of="LightBox-module__slideOutTop___Vgg0z",rf="LightBox-module__slideOutBottom___nJ0Ef",af="LightBox-module__scaleSlide___vZriG",at={hidden:wh,heroImage:$h,background:Ch,editor:Th,contentStyle:Lh,imageStyle:Ph,imgWrapper:Ih,contain:Rh,cover:Mh,caption:Eh,captionTextInner:kh,lightboxSplide:Ah,arrow:Fh,arrowVertical:Nh,nextArrow:_h,arrowInner:Hh,arrowIcon:Wh,arrowImg:Oh,mirror:Dh,thumbsWrapper:Bh,thumbsContainerVertical:zh,thumbsContainer:jh,thumbsAlignStart:Vh,thumbsAlignCenter:Gh,thumbsAlignEnd:Xh,thumbItem:Uh,closeButton:qh,fadeIn:Yh,slideInLeft:Kh,slideInRight:Qh,slideInTop:Zh,slideInBottom:Jh,fadeOut:ef,slideOutLeft:tf,slideOutRight:nf,slideOutTop:of,slideOutBottom:rf,scaleSlide:af},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% + ${F.scalingValue(t.x,n)}), calc(-50% + ${F.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${F.scalingValue(t.x,n)}, calc(-50% + ${F.scalingValue(t.y,n)}))`:r==="center"?i.transform=`translate(calc(-50% + ${F.scalingValue(t.x,n)}), ${F.scalingValue(t.y,n)})`:i.transform=`translate(${F.scalingValue(t.x,n)}, ${F.scalingValue(t.y,n)})`,i};function ju(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 sf(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 Vu(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 lf(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 Gu(e,t,n,i,o){const{x:r,y:l}=sf(o);return{offsetX:r*(e-n),offsetY:l*(t-i)}}function cf(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"?lf:Vu,{renderedW:u,renderedH:p}=d(n,i,o,r),{offsetX:y,offsetY:v}=Gu(n,i,u,p,c),g=(y+u/2)/n*100,m=(v+p/2)/i*100;return`${g}% ${m}%`}function df(e){return cf(e)}function Sa(e){const t=e.getBoundingClientRect(),n=ju(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}=Vu(i,o,r,l),u=window.getComputedStyle(e).objectPosition,{offsetX:p,offsetY:y}=Gu(i,o,c,d,u),v=t.left+n.left,g=t.top+n.top;return{x:p+v,y:y+g,width:c,height:d}}function xc(e){const t=e.getBoundingClientRect(),n=ju(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function uf(e,t){const n=(()=>{if(e==="fade in")return at.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return at.slideInLeft;case"right":return at.slideInRight;case"top":return at.slideInTop;case"bottom":return at.slideInBottom;default:return at.slideInRight}return at.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return at.fadeIn;if(e==="slide in")switch(t){case"left":return at.slideInLeft;case"right":return at.slideInRight;case"top":return at.slideInTop;case"bottom":return at.slideInBottom;default:return at.slideInRight}return at.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return at.fadeOut;if(e==="slide in")switch(t){case"left":return at.slideOutLeft;case"right":return at.slideOutRight;case"top":return at.slideOutTop;case"bottom":return at.slideOutBottom;default:return at.slideOutRight}return at.fadeOut})(),r=(()=>{if(e==="fade in")return at.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return at.slideOutLeft;case"right":return at.slideOutRight;case"top":return at.slideOutTop;case"bottom":return at.slideOutBottom;default:return at.slideOutRight}return at.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:r}}const pf=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:r,isPreviewMode:l})=>{const[c,d]=s.useState(!1),{url: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:at.heroImage,onClick:()=>d(!0)}),a.jsx(gf,{isOpen:c,onClose:()=>d(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:r})]})},gf=({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:v,fontSizeLineHeight:g,textAppearance:m,color:x}=i.imageCaption??{},[b,M]=s.useState(0),[f,S]=s.useState(0),[W,q]=s.useState(!1),[z,P]=s.useState(!1),[_,G]=s.useState({}),$=s.useRef(null),L=s.useRef(null),D=s.useRef(null),E=s.useRef(!1),T=s.useRef(null),C=s.useRef(null),V=s.useRef(null),w=s.useRef(null),U=s.useRef(!1),I=s.useRef(null),[A,j]=s.useState(!1),{appear:ie,triggers:ae,slider:O,thumbnail:re,controls:N,area:le,caption:J,layout:be}=o.lightboxBlock,{appearClass:Pe,backdropAppearClass:ye,backdropDisappearClass:ce,disappearClass:K}=uf(ie.type,ie.direction),se=(c==null?void 0:c.itemId)??null;s.useEffect(()=>{const h=()=>{setTimeout(()=>{var Q,ne;(ne=(Q=$.current)==null?void 0:Q.splide)==null||ne.refresh()},16)},Y=()=>{S(Q=>Q+1)};return window.addEventListener("ArticleEditor.Layout:change",h),window.addEventListener("ArticleEditor.ComponentContent:change",Y),()=>{window.removeEventListener("ArticleEditor.Layout:change",h),window.removeEventListener("ArticleEditor.ComponentContent:change",Y)}},[]),s.useEffect(()=>{if(!e||!re.isActive){j(!1);return}const h=I.current;if(!h)return;const Y=()=>{O.direction==="horiz"?j(h.scrollWidth>h.clientWidth):j(h.scrollHeight>h.clientHeight)};Y();const Q=new ResizeObserver(Y);return Q.observe(h),()=>Q.disconnect()},[e,re.isActive,n.length,_,O.direction]);const pe=s.useCallback(()=>{const h=window.matchMedia("(max-width: 768px)").matches,Y=F.getColorAlpha(le.color);h&&!l&&Y>.9&&(document.body.style.backgroundColor=""),q(!0),E.current=!0;const Q=ne=>{ne.target===T.current&&ne.animationName&&(T.current&&C.current&&T.current.removeEventListener("animationend",C.current),C.current=null,E.current&&(E.current=!1,t()),q(!1))};T.current&&(C.current=Q,T.current.addEventListener("animationend",Q))},[t,le.color,l]),fe=(h,Y,Q)=>{var ne,ue;if(h){if(ae.type==="click"&&ae.switch==="image")ae.repeat==="close"&&b===n.length-1?pe():(ne=$.current)==null||ne.go("+1");else if(ae.type==="click"&&ae.switch==="50/50"){const B=h.getBoundingClientRect(),R=Y-B.left,ee=Q-B.top,te=B.width,ge=B.height;let X;O.direction==="horiz"?X=R<te/2?"-1":"+1":X=ee<ge/2?"-1":"+1",(ue=$.current)==null||ue.go(X)}}},we=h=>{if(U.current){U.current=!1;return}const Y=n[b],Q=(Y==null?void 0:Y.image.objectFit)==="cover";let ne,ue;if("changedTouches"in h&&h.changedTouches.length>0)ne=h.changedTouches[0].clientX,ue=h.changedTouches[0].clientY;else if("clientX"in h)ne=h.clientX,ue=h.clientY;else return;let B;if(Q&&D.current){const R=xc(D.current);B=ne>=R.left&&ne<=R.right&&ue>=R.top&&ue<=R.bottom}else{const R=D.current?Sa(D.current):null;if(!R){h.target===h.currentTarget&&pe();return}B=ne>=R.x&&ne<=R.x+R.width&&ue>=R.y&&ue<=R.y+R.height}B?fe(D.current,ne,ue):pe()},Re=h=>{const Y=h.target;(Y.classList.contains(at.thumbsWrapper)||Y.classList.contains(at.thumbsContainer))&&we(h)};s.useEffect(()=>{if(!e)return;const h=Y=>{var Q,ne;if(Y.key==="Escape"){pe();return}if(Y.key==="ArrowRight"){M(ue=>(ue+1)%Math.max(n.length,1)),(Q=$.current)==null||Q.go("+1");return}Y.key==="ArrowLeft"&&(M(ue=>(ue-1+Math.max(n.length,1))%Math.max(n.length,1)),(ne=$.current)==null||ne.go("-1"))};return window.addEventListener("keydown",h),()=>{window.removeEventListener("keydown",h)}},[e,pe,n.length]),s.useEffect(()=>{if(e){if(M(0),S(Y=>Y+1),E.current=!1,q(!1),P(!1),G({}),!se)return;const h=new CustomEvent("page-overlay",{detail:{itemId:se}});window.dispatchEvent(h)}return()=>{T.current&&C.current&&(T.current.removeEventListener("animationend",C.current),C.current=null),P(!1)}},[e,se]),s.useEffect(()=>{L.current!==null&&L.current!==O.type&&S(h=>h+1),L.current=O.type},[O.type]),s.useEffect(()=>{if(!e)return;const h=document.body.style.overflow,Y=window.matchMedia("(max-width: 768px)").matches,Q=F.getColorAlpha(le.color);document.body.style.overflow="hidden",P(!1);const ne=B=>{B.target===T.current&&!E.current&&B.animationName&&(Y&&!l&&Q>.9&&(document.body.style.backgroundColor=le.color),P(!0),T.current&&V.current&&T.current.removeEventListener("animationend",V.current),V.current=null)};T.current&&(V.current=ne,T.current.addEventListener("animationend",ne));const ue=B=>{const R=B.target;R&&(R.closest(`.${at.thumbsWrapper}`)||R.closest(`.${at.thumbsContainer}`))||O.type!=="slide"&&B.preventDefault()};return document.addEventListener("touchmove",ue,{passive:!1}),()=>{document.body.style.overflow=h,document.removeEventListener("touchmove",ue),T.current&&V.current&&(T.current.removeEventListener("animationend",V.current),V.current=null),P(!1)}},[e,l,le.color,O.type]),s.useEffect(()=>{if(!e)return;const h=Y=>{var ne,ue;if(E.current){Y.stopPropagation();return}if(U.current){U.current=!1;return}const Q=Y.target;if(!(Q&&(Q.closest(`.${at.thumbsContainer}`)||Q.closest(`.${at.thumbItem}`)||Q.closest(`.${at.arrow}`)||Q.closest(`.${at.closeButton}`)||Q.closest(`.${at.caption}`)))){if(O.type==="slide"&&ae.type==="drag"&&((ue=(ne=$.current)==null?void 0:ne.splide)!=null&&ue.root)){const B=$.current.splide.root;if(Q&&(B.contains(Q)||B===Q))return}if(Y.touches.length===0&&Y.changedTouches.length>0){const B=n[b],R=(B==null?void 0:B.image.objectFit)==="cover",ee=Y.changedTouches[0];let te;if(R&&D.current){const ge=xc(D.current);te=ee.clientX>=ge.left&&ee.clientX<=ge.right&&ee.clientY>=ge.top&&ee.clientY<=ge.bottom}else{const ge=D.current?Sa(D.current):null;if(!ge)return;te=ee.clientX>=ge.x&&ee.clientX<=ge.x+ge.width&&ee.clientY>=ge.y&&ee.clientY<=ge.y+ge.height}if(!te){Y.stopPropagation(),E.current=!0;const ge=X=>{X.stopPropagation(),X.preventDefault(),document.removeEventListener("click",ge,!0)};document.addEventListener("click",ge,!0),pe()}}}};return document.addEventListener("touchend",h,{passive:!0}),()=>{document.removeEventListener("touchend",h)}},[e,pe,b,n]);const me=(O.type==="scale"||O.type==="fade")&&O.direction==="vert"&&ae.type==="drag";s.useEffect(()=>{var X,Ie;if(!e||!me||!((Ie=(X=$.current)==null?void 0:X.splide)!=null&&Ie.root))return;const h=$.current.splide.root,Y=30,Q=(Se,Z)=>{if(w.current){const He=Math.abs(Se-w.current.x),We=Math.abs(Z-w.current.y);(He>0||We>0)&&(U.current=!0)}},ne=Se=>{w.current&&(Se.preventDefault(),Q(Se.clientX,Se.clientY))},ue=Se=>{w.current&&Se.touches.length>0&&(Se.preventDefault(),Q(Se.touches[0].clientX,Se.touches[0].clientY))},B=(Se,Z)=>{if(!w.current||!$.current){w.current=null;return}const He=Math.abs(Se-w.current.x),We=Math.abs(Z-w.current.y);We>Y&&We>He&&$.current.go(Z<w.current.y?"+1":"-1"),w.current=null},R=Se=>{w.current&&B(Se.clientX,Se.clientY),document.removeEventListener("pointerup",R),document.removeEventListener("pointercancel",R),document.removeEventListener("pointermove",ne)},ee=Se=>{if(w.current){if(Se.changedTouches.length>0){const Z=Se.changedTouches[0];B(Z.clientX,Z.clientY)}document.removeEventListener("touchend",ee),document.removeEventListener("touchcancel",ee),document.removeEventListener("touchmove",ue)}},te=Se=>{w.current={x:Se.clientX,y:Se.clientY},U.current=!1,document.addEventListener("pointermove",ne,{passive:!1}),document.addEventListener("pointerup",R),document.addEventListener("pointercancel",R)},ge=Se=>{Se.touches.length>0&&(w.current={x:Se.touches[0].clientX,y:Se.touches[0].clientY},U.current=!1,document.addEventListener("touchmove",ue,{passive:!1}),document.addEventListener("touchend",ee),document.addEventListener("touchcancel",ee))};return h.addEventListener("pointerdown",te),h.addEventListener("touchstart",ge),()=>{h.removeEventListener("pointerdown",te),h.removeEventListener("touchstart",ge),document.removeEventListener("pointermove",ne),document.removeEventListener("pointerup",R),document.removeEventListener("pointercancel",R),document.removeEventListener("touchmove",ue),document.removeEventListener("touchend",ee),document.removeEventListener("touchcancel",ee),w.current=null,U.current=!1}},[e,me,f]);const xe={backgroundColor:le.color,backdropFilter:`blur(${le.blur}px)`,animationDuration:`${parseInt(ie.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(r)?null:Xn.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:l?null:T,className:Ct(at.background,W?ce:ye,{[at.editor]:l},{[at.hidden]:!e}),style:{...xe,...z&&!l&&!W?{position:"absolute"}:{}}}),a.jsxs("div",{ref:l?T:null,className:Ct(at.contentStyle,W?K:Pe,{[at.editor]:l},{[at.hidden]:!e}),style:{animationDuration:`${parseInt(ie.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(El,{onMove:h=>M(h.index),ref:$,className:at.lightboxSplide,options:{arrows:!1,speed:O.duration?parseInt(O.duration):500,direction:O.direction==="horiz"||O.type==="fade"||O.type==="scale"?"ltr":"ttb",pagination:!1,drag:ae.type==="drag"&&!me,perPage:1,width:"100%",height:"100%",type:O.type==="fade"||O.type==="scale"?"fade":"loop",padding:0,rewind:ae.repeat!=="close",start:0},style:{"--splide-speed":O.duration},children:n.map((h,Y)=>{const Q=Wr(be.position,be.offset,l),ne=`${F.scalingValue(be.padding.top,l)} ${F.scalingValue(be.padding.right,l)} ${F.scalingValue(be.padding.bottom,l)} ${F.scalingValue(be.padding.left,l)}`,ue=O.type==="scale"?(()=>{const{transform:B,...R}=Q;return{...R,position:"absolute",padding:ne,boxSizing:"border-box","--position-transform":B||"none"}})():{...Q,position:"absolute",padding:ne,boxSizing:"border-box"};return a.jsx(kl,{children:a.jsx("div",{className:at.imgWrapper,onClick:we,children:a.jsx("img",{ref:Y===b?D:null,className:Ct(at.imageStyle,{[at.contain]:h.image.objectFit==="contain",[at.cover]:h.image.objectFit==="cover",[at.scaleSlide]:O.type==="scale"}),src:h.image.url,alt:h.image.name??"",style:{...ue,pointerEvents:h.image.objectFit==="contain"?"none":"auto"}})})},Y)})},f),N.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Ct(at.arrow,{[at.arrowVertical]:O.direction==="vert"}),style:{color:N.color,"--arrow-hover-color":N.hover},children:a.jsxs("button",{className:at.arrowInner,style:{transform:`translate(${F.scalingValue(N.offset.x,l)}, ${F.scalingValue(N.offset.y*(O.direction==="horiz"?1:-1),l)}) scale(${N.scale}) rotate(${O.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var h;return(h=$.current)==null?void 0:h.go("-1")},"aria-label":"Previous",children:[N.arrowsImgUrl&&a.jsx(gn,{url:N.arrowsImgUrl,fill:N.color,hoverFill:N.hover,className:Ct(at.arrowImg,at.mirror)}),!N.arrowsImgUrl&&a.jsx(bc,{color:N.color,className:Ct(at.arrowIcon,at.arrowImg,at.mirror)})]})}),a.jsx("div",{className:Ct(at.arrow,at.nextArrow,{[at.arrowVertical]:O.direction==="vert"}),style:{color:N.color,"--arrow-hover-color":N.hover},children:a.jsxs("button",{className:at.arrowInner,style:{transform:`translate(${F.scalingValue(N.offset.x*(O.direction==="horiz"?-1:1),l)}, ${F.scalingValue(N.offset.y,l)}) scale(${N.scale}) rotate(${O.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var h;return(h=$.current)==null?void 0:h.go("+1")},"aria-label":"Next",children:[N.arrowsImgUrl&&a.jsx(gn,{url:N.arrowsImgUrl,fill:N.color,hoverFill:N.hover,className:at.arrowImg}),!N.arrowsImgUrl&&a.jsx(bc,{color:N.color,className:Ct(at.arrowIcon,at.arrowImg)})]})})]}),le.closeIconUrl&&(()=>{const h=Wr(le.closeIconAlign,le.closeIconOffset,l),Y=`scale(${le.closeIconScale})`,Q=h.transform?`${h.transform} ${Y}`:Y;return a.jsx("button",{className:at.closeButton,style:{...h,transform:Q},onClick:pe,"aria-label":"Close lightbox",children:a.jsx(gn,{url:le.closeIconUrl,fill:le.closeIconColor??"#000000",hoverFill:le.closeIconHover??"#cccccc"})})})(),J&&J.isActive&&i.imageCaption&&((Ce=n[b])==null?void 0:Ce.imageCaption)&&a.jsx("div",{className:at.caption,style:{...Wr(J.alignment,J.offset,l),fontFamily:Do(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:d.sizing==="auto"?"max-content":F.scalingValue(d.width,l),letterSpacing:F.scalingValue(p,l),wordSpacing:F.scalingValue(v,l),textAlign:y,fontSize:F.scalingValue(g.fontSize,l),lineHeight:F.scalingValue(g.lineHeight,l),textTransform:m.textTransform??"none",textDecoration:m.textDecoration??"none",fontVariant:m.fontVariant??"normal",color:x},onClick:h=>h.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:at.captionTextInner,style:{"--link-color":J.linkColor,"--link-hover-color":J.linkHoverColor},children:a.jsx(Yi,{content:n[b].imageCaption})})}),re.isActive&&(()=>{const[h,Y]=re.position.split("-"),Q=O.direction==="horiz"?`${h}-left`:re.position,ne=Wr(Q,re.offset,l),ue=()=>{if(O.direction==="horiz"){if(Y==="left")return"flex-start";if(Y==="center")return"center";if(Y==="right")return"flex-end"}else{if(h==="top")return"flex-start";if(h==="middle")return"center";if(h==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:I,className:at.thumbsWrapper,onClick:B=>Re(B),style:{position:l?"absolute":"fixed",...ne,...O.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:Ct(at.thumbsContainer,{[at.thumbsContainerVertical]:O.direction==="vert",[at.thumbsAlignStart]:re.align==="start",[at.thumbsAlignCenter]:re.align==="center",[at.thumbsAlignEnd]:re.align==="end"}),style:{gap:F.scalingValue(re.grid.gap,l),justifyContent:A?"flex-start":ue()},children:n.map((B,R)=>{const ee=R===b,te=_[R],X=re.grid.size*(ee?re.activeState.scale:1),Ie=()=>{if(re.fit!=="fit")return{};if(!te)return O.direction==="horiz"?{height:F.scalingValue(X,l)}:{width:F.scalingValue(X,l)};const Se=te.width/te.height;if(O.direction==="horiz"){const Z=X,He=Z*Se;return{width:F.scalingValue(He,l),height:F.scalingValue(Z,l)}}else{const Z=X,He=Z/Se;return{width:F.scalingValue(Z,l),height:F.scalingValue(He,l)}}};return a.jsx("button",{className:at.thumbItem,style:{...O.direction==="horiz"&&re.fit!=="fit"?{height:F.scalingValue(X,l)}:{},...O.direction==="vert"&&re.fit!=="fit"?{width:F.scalingValue(X,l)}:{},...re.fit==="cover"?{width:F.scalingValue(X,l),height:F.scalingValue(X,l)}:{},...Ie(),transition:ee?"all 0.25s ease-out":"none",opacity:ee?re.activeState.opacity/100:re.opacity/100,"--thumb-hover":re.activeState.opacity/100},onClick:Se=>{var Z;Se.stopPropagation(),M(R),(Z=$.current)==null||Z.go(R)},onMouseEnter:()=>{var Se;re.triggers==="hov"&&((Se=$.current)==null||Se.go(R))},children:a.jsx("img",{src:B.image.url,alt:B.image.name??"",onLoad:Se=>{const Z=Se.currentTarget;Z.naturalWidth&&Z.naturalHeight&&G(He=>({...He,[R]:{width:Z.naturalWidth,height:Z.naturalHeight}}))},style:{objectFit:re.fit==="cover"?"cover":"contain",...re.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...re.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${B.image.name}-${R}`)})})})})()]})]}),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 mf={element:pf,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Lightbox.png"},defaultSize:{d:{width:440,height:550},t:{width:235,height:293},m:{width:265,height:331}},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.url",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{url:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{url:"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:{url:"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:{url:"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:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",url:"01M3QM74XD4J8X0B8TTSQ8CV3P",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"01M3QM74XD0N6VQJ5J8J9YB32N",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"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 hf(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 ff({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:r}){const l=!!n,c=i&&t||!t,{prefix:d}=F.useScopedStyles(),{type:u="A",fieldsToShow:p=2,textareaRows:y=1,fields:v=[],buttonLabel:g,gap:m,fieldsGap:x,buttonCorners:b,buttonStroke:R,buttonPadding:f,isButtonFullWidth:S,inputCorners:W,inputStroke:q,inputPadding:z,inputColor:P,inputTextColor:_,inputBorderColor:G,placeholderColor:$,buttonColor:L,buttonTextColor:D,buttonBorderColor:E,labelTextColor:T,successColor:C,errorColor:V,fontFamily:w,inputFontSettings:U,inputFontSize:M,inputLineHeight:A,inputLetterSpacing:j,inputWordSpacing:ie,inputTextAppearance:ae,buttonFontSettings:O,buttonFontSize:re,buttonLineHeight:N,buttonLetterSpacing:le,buttonWordSpacing:J,buttonTextAppearance:be,labelFontSettings:Pe,labelFontSize:ye,labelLineHeight:ce,labelLetterSpacing:K,labelWordSpacing:se,labelTextAppearance:pe,statusFontSettings:fe,statusFontSize:we,statusLineHeight:Ie,statusLetterSpacing:me,statusWordSpacing:xe,statusTextAppearance:Ce,successMessage:h,errorMessage:Y,stateOverrides:Q}=e,ne=u==="B",ue=v.slice(0,Math.min(p,v.length)),B={fontSettings:{fontFamily:w,fontWeight:(U==null?void 0:U.fontWeight)??400,fontStyle:(U==null?void 0:U.fontStyle)??"normal"},fontSize:M??.01,lineHeight:A,letterSpacing:j??0,wordSpacing:ie??0,textAppearance:ae,color:_},I=un(en(B,t)),ee=F.scalingValue(q??0,t),te=Ue=>F.scalingValue((A??M??.01)*Ue+((z==null?void 0:z.top)??0)+((z==null?void 0:z.bottom)??0)+(u==="C"?q??0:(q??0)*2),t),ge=te(1),X=te(Math.max(1,y)),Me={...I,borderStyle:"solid",borderRadius:u==="C"?0:F.scalingValue(W??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ee,borderLeftWidth:0}:{borderWidth:ee},paddingTop:F.scalingValue((z==null?void 0:z.top)??0,t),paddingRight:F.scalingValue((z==null?void 0:z.right)??0,t),paddingBottom:F.scalingValue((z==null?void 0:z.bottom)??0,t),paddingLeft:F.scalingValue((z==null?void 0:z.left)??0,t),height:ge,minHeight:ge},Se={fontSettings:{fontFamily:w,fontWeight:(O==null?void 0:O.fontWeight)??400,fontStyle:(O==null?void 0:O.fontStyle)??"normal"},fontSize:re??.01,lineHeight:N,letterSpacing:le??0,wordSpacing:J??0,textAppearance:be,color:D},Z=un(en(Se,t)),He=F.scalingValue(R??0,t),We={fontSettings:{fontFamily:w,fontWeight:(Pe==null?void 0:Pe.fontWeight)??400,fontStyle:(Pe==null?void 0:Pe.fontStyle)??"normal"},fontSize:ye??.01,lineHeight:ce,letterSpacing:K??0,wordSpacing:se??0,textAppearance:pe,color:T},ot=en(We,t),qe={fontSettings:{fontFamily:w,fontWeight:(fe==null?void 0:fe.fontWeight)??400,fontStyle:(fe==null?void 0:fe.fontStyle)??"normal"},fontSize:we??.01,lineHeight:Ie,letterSpacing:me??0,wordSpacing:xe??0,textAppearance:Ce,color:C},tt=un(en(qe,t)),et=F.buildColorVars(d,{inputColor:P,inputTextColor:_,inputBorderColor:G,placeholderColor:$!=null&&$.trim()?$:"#cccccc",buttonColor:L,buttonTextColor:D,buttonBorderColor:E,labelTextColor:T,successColor:C,errorColor:V},yf,vf,Q),[Ge,ve]=s.useState(()=>Object.fromEntries(ue.map(Ue=>[Ue.name,""]))),[_e,ze]=s.useState("idle"),[Qe,$e]=s.useState(null),Ne=r==="success"?"success":r==="error"?"error":_e,Ye=r==="error"?Y:Qe,Ze=r==="filled",st=s.useMemo(()=>{if(!Ze)return Ge;let Ue=null;for(const ct of ue)(Ge[ct.name]??"").trim().length>0||(Ue=Ue??{...Ge},Ue[ct.name]="Filled");return Ue??Ge},[Ge,Ze,ue]),it=Ne==="error"?F.getFormFieldValidationError(ue,st):null,Ae=`${r&&r!=="default"?`${d}-state-${r}`:""}`.trim(),mt=o==null?void 0:o.submitUrl,Be=(Ue,ct)=>{ve(he=>({...he,[Ue]:ct}))},De=async Ue=>{if(Ue.preventDefault(),!c)return;const ct=Object.fromEntries(ue.map(Re=>{var nt;return[Re.name,((nt=Ge[Re.name])==null?void 0:nt.trim())??""]}).filter(([,Re])=>Re));if(!mt){ze("error"),$e("No integrations were found for this form.");return}if(Object.keys(ct).length===0)return;const he=F.getFormFieldValidationError(ue,Ge);if(he){ze("error"),$e(he);return}ze("submitting"),$e(null);try{const Re=await fetch(mt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ct)});if(!Re.ok){const nt=await Re.text();throw new Error(nt||`Request failed: ${Re.status}`)}ze("success"),ve(Object.fromEntries(ue.map(nt=>[nt.name,""])))}catch(Re){ze("error"),$e(Re instanceof Error?Re.message:"Something went wrong")}};return a.jsxs("div",{className:`${d}-wrapper ${d}-type-${u} ${Ae}`.trim(),style:et,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:hf(d)}}),a.jsxs("form",{onSubmit:De,className:`${d}-form`,children:[a.jsx("div",{className:`${d}-fields`,children:ue.map((Ue,ct)=>a.jsxs(s.Fragment,{children:[ct>0&&a.jsx("div",{"data-controls":l?"fieldsGap":void 0,className:l?`${d}-control`:void 0,style:{height:F.scalingValue(x??0,t)}}),a.jsxs("div",{className:`${d}-field-group${ne?` ${d}-labeled`:""}`,children:[ne&&a.jsx("span",{className:`${d}-field-label`,style:ot?{...ot,lineHeight:ot.fontSize}:void 0,children:Ue.label||Ue.name}),Ue.type==="textarea"?a.jsx("textarea",{name:Ue.name,autoComplete:"off",value:st[Ue.name]??"",onChange:he=>Be(Ue.name,he.target.value),placeholder:Ue.placeholder,className:`${d}-input`,style:{...Me,height:X,minHeight:X},rows:y,"data-filled":Ze||(st[Ue.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:Ue.type==="phone"?"tel":Ue.type==="email"?"email":"text",name:Ue.name,autoComplete:"off",value:st[Ue.name]??"",onChange:he=>Be(Ue.name,he.target.value),placeholder:Ue.placeholder,required:Ue.isRequired??Ue.type==="email",className:`${d}-input`,style:Me,"data-filled":Ze||(st[Ue.name]??"").trim().length>0})]})]},ct))}),a.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${d}-control`:void 0,style:{height:F.scalingValue(m??0,t)}}),a.jsx("div",{className:`${d}-overlay-anchor`,children:a.jsx("button",{type:c?"submit":"button",className:`${d}-button`,style:{borderStyle:"solid",borderRadius:F.scalingValue(b??0,t),borderWidth:He,paddingTop:F.scalingValue((f==null?void 0:f.top)??0,t),paddingRight:F.scalingValue((f==null?void 0:f.right)??0,t),paddingBottom:F.scalingValue((f==null?void 0:f.bottom)??0,t),paddingLeft:F.scalingValue((f==null?void 0:f.left)??0,t),pointerEvents:c?"auto":void 0,...Z,...S?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${d}-overlay-anchor`,style:S?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:_e==="submitting"?"...":g})})})]}),Ne==="success"&&a.jsx("p",{className:`${d}-success`,style:{...tt},children:h}),Ne==="error"&&a.jsx("p",{className:`${d}-error`,style:{...tt},role:"alert",children:it??Ye??Y})]})}const yf={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"},vf=["hover","focus","filled","success","error"],xf=`import React, { useMemo, useState } from 'react';
158
+ `}function ff({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:r}){const l=!!n,c=i&&t||!t,{prefix:d}=F.useScopedStyles(),{type:u="A",fieldsToShow:p=2,textareaRows:y=1,fields:v=[],buttonLabel:g,gap:m,fieldsGap:x,buttonCorners:b,buttonStroke:M,buttonPadding:f,isButtonFullWidth:S,inputCorners:W,inputStroke:q,inputPadding:z,inputColor:P,inputTextColor:_,inputBorderColor:G,placeholderColor:$,buttonColor:L,buttonTextColor:D,buttonBorderColor:E,labelTextColor:T,successColor:C,errorColor:V,fontFamily:w,inputFontSettings:U,inputFontSize:I,inputLineHeight:A,inputLetterSpacing:j,inputWordSpacing:ie,inputTextAppearance:ae,buttonFontSettings:O,buttonFontSize:re,buttonLineHeight:N,buttonLetterSpacing:le,buttonWordSpacing:J,buttonTextAppearance:be,labelFontSettings:Pe,labelFontSize:ye,labelLineHeight:ce,labelLetterSpacing:K,labelWordSpacing:se,labelTextAppearance:pe,statusFontSettings:fe,statusFontSize:we,statusLineHeight:Re,statusLetterSpacing:me,statusWordSpacing:xe,statusTextAppearance:Ce,successMessage:h,errorMessage:Y,stateOverrides:Q}=e,ne=u==="B",ue=v.slice(0,Math.min(p,v.length)),B={fontSettings:{fontFamily:w,fontWeight:(U==null?void 0:U.fontWeight)??400,fontStyle:(U==null?void 0:U.fontStyle)??"normal"},fontSize:I??.01,lineHeight:A,letterSpacing:j??0,wordSpacing:ie??0,textAppearance:ae,color:_},R=un(en(B,t)),ee=F.scalingValue(q??0,t),te=Ue=>F.scalingValue((A??I??.01)*Ue+((z==null?void 0:z.top)??0)+((z==null?void 0:z.bottom)??0)+(u==="C"?q??0:(q??0)*2),t),ge=te(1),X=te(Math.max(1,y)),Ie={...R,borderStyle:"solid",borderRadius:u==="C"?0:F.scalingValue(W??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ee,borderLeftWidth:0}:{borderWidth:ee},paddingTop:F.scalingValue((z==null?void 0:z.top)??0,t),paddingRight:F.scalingValue((z==null?void 0:z.right)??0,t),paddingBottom:F.scalingValue((z==null?void 0:z.bottom)??0,t),paddingLeft:F.scalingValue((z==null?void 0:z.left)??0,t),height:ge,minHeight:ge},Se={fontSettings:{fontFamily:w,fontWeight:(O==null?void 0:O.fontWeight)??400,fontStyle:(O==null?void 0:O.fontStyle)??"normal"},fontSize:re??.01,lineHeight:N,letterSpacing:le??0,wordSpacing:J??0,textAppearance:be,color:D},Z=un(en(Se,t)),He=F.scalingValue(M??0,t),We={fontSettings:{fontFamily:w,fontWeight:(Pe==null?void 0:Pe.fontWeight)??400,fontStyle:(Pe==null?void 0:Pe.fontStyle)??"normal"},fontSize:ye??.01,lineHeight:ce,letterSpacing:K??0,wordSpacing:se??0,textAppearance:pe,color:T},ot=en(We,t),qe={fontSettings:{fontFamily:w,fontWeight:(fe==null?void 0:fe.fontWeight)??400,fontStyle:(fe==null?void 0:fe.fontStyle)??"normal"},fontSize:we??.01,lineHeight:Re,letterSpacing:me??0,wordSpacing:xe??0,textAppearance:Ce,color:C},tt=un(en(qe,t)),et=F.buildColorVars(d,{inputColor:P,inputTextColor:_,inputBorderColor:G,placeholderColor:$!=null&&$.trim()?$:"#cccccc",buttonColor:L,buttonTextColor:D,buttonBorderColor:E,labelTextColor:T,successColor:C,errorColor:V},yf,vf,Q),[Ge,ve]=s.useState(()=>Object.fromEntries(ue.map(Ue=>[Ue.name,""]))),[_e,ze]=s.useState("idle"),[Qe,$e]=s.useState(null),Ne=r==="success"?"success":r==="error"?"error":_e,Ye=r==="error"?Y:Qe,Ze=r==="filled",st=s.useMemo(()=>{if(!Ze)return Ge;let Ue=null;for(const ct of ue)(Ge[ct.name]??"").trim().length>0||(Ue=Ue??{...Ge},Ue[ct.name]="Filled");return Ue??Ge},[Ge,Ze,ue]),it=Ne==="error"?F.getFormFieldValidationError(ue,st):null,Ae=`${r&&r!=="default"?`${d}-state-${r}`:""}`.trim(),mt=o==null?void 0:o.submitUrl,Be=(Ue,ct)=>{ve(he=>({...he,[Ue]:ct}))},De=async Ue=>{if(Ue.preventDefault(),!c)return;const ct=Object.fromEntries(ue.map(Me=>{var nt;return[Me.name,((nt=Ge[Me.name])==null?void 0:nt.trim())??""]}).filter(([,Me])=>Me));if(!mt){ze("error"),$e("No integrations were found for this form.");return}if(Object.keys(ct).length===0)return;const he=F.getFormFieldValidationError(ue,Ge);if(he){ze("error"),$e(he);return}ze("submitting"),$e(null);try{const Me=await fetch(mt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ct)});if(!Me.ok){const nt=await Me.text();throw new Error(nt||`Request failed: ${Me.status}`)}ze("success"),ve(Object.fromEntries(ue.map(nt=>[nt.name,""])))}catch(Me){ze("error"),$e(Me instanceof Error?Me.message:"Something went wrong")}};return a.jsxs("div",{className:`${d}-wrapper ${d}-type-${u} ${Ae}`.trim(),style:et,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:hf(d)}}),a.jsxs("form",{onSubmit:De,className:`${d}-form`,children:[a.jsx("div",{className:`${d}-fields`,children:ue.map((Ue,ct)=>a.jsxs(s.Fragment,{children:[ct>0&&a.jsx("div",{"data-controls":l?"fieldsGap":void 0,className:l?`${d}-control`:void 0,style:{height:F.scalingValue(x??0,t)}}),a.jsxs("div",{className:`${d}-field-group${ne?` ${d}-labeled`:""}`,children:[ne&&a.jsx("span",{className:`${d}-field-label`,style:ot?{...ot,lineHeight:ot.fontSize}:void 0,children:Ue.label||Ue.name}),Ue.type==="textarea"?a.jsx("textarea",{name:Ue.name,autoComplete:"off",value:st[Ue.name]??"",onChange:he=>Be(Ue.name,he.target.value),placeholder:Ue.placeholder,className:`${d}-input`,style:{...Ie,height:X,minHeight:X},rows:y,"data-filled":Ze||(st[Ue.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:Ue.type==="phone"?"tel":Ue.type==="email"?"email":"text",name:Ue.name,autoComplete:"off",value:st[Ue.name]??"",onChange:he=>Be(Ue.name,he.target.value),placeholder:Ue.placeholder,required:Ue.isRequired??Ue.type==="email",className:`${d}-input`,style:Ie,"data-filled":Ze||(st[Ue.name]??"").trim().length>0})]})]},ct))}),a.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${d}-control`:void 0,style:{height:F.scalingValue(m??0,t)}}),a.jsx("div",{className:`${d}-overlay-anchor`,children:a.jsx("button",{type:c?"submit":"button",className:`${d}-button`,style:{borderStyle:"solid",borderRadius:F.scalingValue(b??0,t),borderWidth:He,paddingTop:F.scalingValue((f==null?void 0:f.top)??0,t),paddingRight:F.scalingValue((f==null?void 0:f.right)??0,t),paddingBottom:F.scalingValue((f==null?void 0:f.bottom)??0,t),paddingLeft:F.scalingValue((f==null?void 0:f.left)??0,t),pointerEvents:c?"auto":void 0,...Z,...S?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${d}-overlay-anchor`,style:S?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:_e==="submitting"?"...":g})})})]}),Ne==="success"&&a.jsx("p",{className:`${d}-success`,style:{...tt},children:h}),Ne==="error"&&a.jsx("p",{className:`${d}-error`,style:{...tt},role:"alert",children:it??Ye??Y})]})}const yf={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"},vf=["hover","focus","filled","success","error"],xf=`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
- `,bf=[{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"}}}},Sf=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","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: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:bf,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:[...Sf],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"]},$f={element:ff,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"01M3QM74XGJ9E5C05JQTJCXFSJ"},defaultSize:{d:{width:300},t:{width:300},m:{width:340}},schema:wf,sourceCode:xf,fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",labelFontSettings:"fontFamily",statusFontSettings:"fontFamily"},assetsPaths:{content:[],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]}};function Br(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Cf(e){return`
796
+ `,bf=[{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"}}}},Sf=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","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: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:bf,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:[...Sf],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"]},$f={element:ff,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:wf,sourceCode:xf,fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",labelFontSettings:"fontFamily",statusFontSettings:"fontFamily"},assetsPaths:{content:[],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]}};function Br(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Cf(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: ${Br(14)};
987
987
  color: var(--${e}-error-error-color, var(--${e}-error-color));
988
988
  }
989
- `}const Tf=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:r}=F.useScopedStyles(),l=n&&t||!t,{fields:c=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:d,buttonLabel:u,fieldsToShow:p=1,fontFamily:y,inputFontSettings:v,inputFontSize:g,inputLineHeight:m,inputLetterSpacing:x,inputWordSpacing:b,inputTextAppearance:R,buttonFontSettings:f,buttonFontSize:S,buttonLineHeight:W,buttonLetterSpacing:q,buttonWordSpacing:z,buttonTextAppearance:P,statusFontSettings:_,statusFontSize:G,statusLineHeight:$,statusLetterSpacing:L,statusWordSpacing:D,statusTextAppearance:E,iconMaxWidth:T,minHeight:C,corners:V,stroke:w,stateOverrides:U,inputPadding:M,buttonPadding:A,successMessage:j="Thanks for subscribing!",errorMessage:ie="Please, fill all required fields."}=e,ae=c.slice(0,Math.min(p,c.length)),[O,re]=s.useState(()=>Object.fromEntries(ae.map(Se=>[Se.name,""]))),[N,le]=s.useState("idle"),[J,be]=s.useState(null),Pe=o==="success"?"success":o==="error"?"error":N,ye=o==="error"?ie:J,ce=o==="filled",K=s.useMemo(()=>{if(!ce)return O;let Se=null;for(const Z of ae)(O[Z.name]??"").trim().length>0||(Se=Se??{...O},Se[Z.name]="Filled");return Se??O},[ce,O,ae]),se=Pe==="error"?F.getFormFieldValidationError(ae,K):null,pe=o&&o!=="default"?`${r}-state-${o}`:"",fe=ae.some(Se=>(K[Se.name]??"").trim().length>0),we=pe!==`${r}-state-filled`&&fe?`${r}-state-filled`:"",Ie=`${pe} ${we}`.trim(),me=i==null?void 0:i.submitUrl,xe=u??"",Ce=(d==null?void 0:d.icon)??"",h=(d==null?void 0:d.mode)==="On",Y=xe||"Submit",Q={fontSettings:{fontFamily:y,fontWeight:(v==null?void 0:v.fontWeight)??400,fontStyle:(v==null?void 0:v.fontStyle)??"normal"},fontSize:g??.01,lineHeight:m,letterSpacing:x??0,wordSpacing:b??0,textAppearance:R,color:e.inputTextColor??"#111111"},ne={fontSettings:{fontFamily:y,fontWeight:(f==null?void 0:f.fontWeight)??400,fontStyle:(f==null?void 0:f.fontStyle)??"normal"},fontSize:S??.01,lineHeight:W,letterSpacing:q??0,wordSpacing:z??0,textAppearance:P,color:e.buttonTextColor??"#ffffff"},ue={fontSettings:{fontFamily:y,fontWeight:(_==null?void 0:_.fontWeight)??400,fontStyle:(_==null?void 0:_.fontStyle)??"normal"},fontSize:G??.01,lineHeight:$,letterSpacing:L??0,wordSpacing:D??0,textAppearance:E,color:e.successColor??"#22c55e"},B=un(en(Q,t)),I=un(en(ne,t)),ee=un(en(ue,t)),te=F.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(Q==null?void 0:Q.color)??"#111111",buttonTextColor:e.buttonTextColor??(ne==null?void 0:ne.color)??"#ffffff"},Lf,Pf,U),ge={borderRadius:F.scalingValue(V,t),borderWidth:F.scalingValue(w,t),borderStyle:"solid"},X={borderLeftWidth:F.scalingValue(w,t)},Me=async Se=>{if(Se.preventDefault(),!l)return;const Z=Object.fromEntries(ae.map(We=>{var ot;return[We.name,((ot=O[We.name])==null?void 0:ot.trim())??""]}).filter(([,We])=>We));if(!me){le("error"),be("No integrations were found for this form.");return}if(Object.keys(Z).length===0)return;const He=F.getFormFieldValidationError(ae,O);if(He){le("error"),be(He);return}le("submitting"),be(null);try{const We=await fetch(me,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Z)});if(!We.ok){const ot=await We.text();throw new Error(ot||`Request failed: ${We.status}`)}le("success"),re(Object.fromEntries(ae.map(ot=>[ot.name,""])))}catch(We){le("error"),be(We instanceof Error?We.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${Ie}`.trim(),style:te,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Cf(r)}}),a.jsxs("form",{onSubmit:Me,className:`${r}-form`,style:{...ge,height:F.scalingValue(C,t),minHeight:F.scalingValue(C,t)},children:[a.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:ae.map(Se=>a.jsx("input",{type:Se.type==="email"?"email":Se.type==="phone"?"tel":"text",name:Se.name,autoComplete:"off",value:K[Se.name]??"",onChange:Z=>re(He=>({...He,[Se.name]:Z.target.value})),placeholder:Se.placeholder,required:Se.isRequired??Se.type==="email",className:`${r}-input`,style:{...B,paddingRight:F.scalingValue(M.right,t),paddingLeft:F.scalingValue(M.left,t),paddingTop:F.scalingValue(M.top,t),paddingBottom:F.scalingValue(M.bottom,t)}},Se.name))}),a.jsx("div",{className:`${r}-overlayAnchor`,children:a.jsx("button",{type:l?"submit":"button",className:`${r}-submitBtn`,"aria-label":Y,style:{...I,...X,paddingRight:F.scalingValue(A.right,t),paddingLeft:F.scalingValue(A.left,t),paddingTop:F.scalingValue(A.top,t),paddingBottom:F.scalingValue(A.bottom,t),pointerEvents:l?"auto":void 0},children:N==="submitting"?"...":h?Ce&&a.jsx(gn,{url:Ce,className:`${r}-submitBtnIcon`,style:{maxWidth:F.scalingValue(T??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):xe})})]}),Pe==="success"&&a.jsx("p",{className:`${r}-success`,style:{...ee},children:j}),Pe==="error"&&a.jsx("p",{className:`${r}-error`,style:{...ee},role:"alert",children:se??ye??ie})]})},Lf={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"},Pf=["hover","focus","filled","success","error"],Mf=`import React, { useMemo, useState } from 'react';
989
+ `}const Tf=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:r}=F.useScopedStyles(),l=n&&t||!t,{fields:c=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:d,buttonLabel:u,fieldsToShow:p=1,fontFamily:y,inputFontSettings:v,inputFontSize:g,inputLineHeight:m,inputLetterSpacing:x,inputWordSpacing:b,inputTextAppearance:M,buttonFontSettings:f,buttonFontSize:S,buttonLineHeight:W,buttonLetterSpacing:q,buttonWordSpacing:z,buttonTextAppearance:P,statusFontSettings:_,statusFontSize:G,statusLineHeight:$,statusLetterSpacing:L,statusWordSpacing:D,statusTextAppearance:E,iconMaxWidth:T,minHeight:C,corners:V,stroke:w,stateOverrides:U,inputPadding:I,buttonPadding:A,successMessage:j="Thanks for subscribing!",errorMessage:ie="Please, fill all required fields."}=e,ae=c.slice(0,Math.min(p,c.length)),[O,re]=s.useState(()=>Object.fromEntries(ae.map(Se=>[Se.name,""]))),[N,le]=s.useState("idle"),[J,be]=s.useState(null),Pe=o==="success"?"success":o==="error"?"error":N,ye=o==="error"?ie:J,ce=o==="filled",K=s.useMemo(()=>{if(!ce)return O;let Se=null;for(const Z of ae)(O[Z.name]??"").trim().length>0||(Se=Se??{...O},Se[Z.name]="Filled");return Se??O},[ce,O,ae]),se=Pe==="error"?F.getFormFieldValidationError(ae,K):null,pe=o&&o!=="default"?`${r}-state-${o}`:"",fe=ae.some(Se=>(K[Se.name]??"").trim().length>0),we=pe!==`${r}-state-filled`&&fe?`${r}-state-filled`:"",Re=`${pe} ${we}`.trim(),me=i==null?void 0:i.submitUrl,xe=u??"",Ce=(d==null?void 0:d.icon)??"",h=(d==null?void 0:d.mode)==="On",Y=xe||"Submit",Q={fontSettings:{fontFamily:y,fontWeight:(v==null?void 0:v.fontWeight)??400,fontStyle:(v==null?void 0:v.fontStyle)??"normal"},fontSize:g??.01,lineHeight:m,letterSpacing:x??0,wordSpacing:b??0,textAppearance:M,color:e.inputTextColor??"#111111"},ne={fontSettings:{fontFamily:y,fontWeight:(f==null?void 0:f.fontWeight)??400,fontStyle:(f==null?void 0:f.fontStyle)??"normal"},fontSize:S??.01,lineHeight:W,letterSpacing:q??0,wordSpacing:z??0,textAppearance:P,color:e.buttonTextColor??"#ffffff"},ue={fontSettings:{fontFamily:y,fontWeight:(_==null?void 0:_.fontWeight)??400,fontStyle:(_==null?void 0:_.fontStyle)??"normal"},fontSize:G??.01,lineHeight:$,letterSpacing:L??0,wordSpacing:D??0,textAppearance:E,color:e.successColor??"#22c55e"},B=un(en(Q,t)),R=un(en(ne,t)),ee=un(en(ue,t)),te=F.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(Q==null?void 0:Q.color)??"#111111",buttonTextColor:e.buttonTextColor??(ne==null?void 0:ne.color)??"#ffffff"},Lf,Pf,U),ge={borderRadius:F.scalingValue(V,t),borderWidth:F.scalingValue(w,t),borderStyle:"solid"},X={borderLeftWidth:F.scalingValue(w,t)},Ie=async Se=>{if(Se.preventDefault(),!l)return;const Z=Object.fromEntries(ae.map(We=>{var ot;return[We.name,((ot=O[We.name])==null?void 0:ot.trim())??""]}).filter(([,We])=>We));if(!me){le("error"),be("No integrations were found for this form.");return}if(Object.keys(Z).length===0)return;const He=F.getFormFieldValidationError(ae,O);if(He){le("error"),be(He);return}le("submitting"),be(null);try{const We=await fetch(me,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Z)});if(!We.ok){const ot=await We.text();throw new Error(ot||`Request failed: ${We.status}`)}le("success"),re(Object.fromEntries(ae.map(ot=>[ot.name,""])))}catch(We){le("error"),be(We instanceof Error?We.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${Re}`.trim(),style:te,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Cf(r)}}),a.jsxs("form",{onSubmit:Ie,className:`${r}-form`,style:{...ge,height:F.scalingValue(C,t),minHeight:F.scalingValue(C,t)},children:[a.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:ae.map(Se=>a.jsx("input",{type:Se.type==="email"?"email":Se.type==="phone"?"tel":"text",name:Se.name,autoComplete:"off",value:K[Se.name]??"",onChange:Z=>re(He=>({...He,[Se.name]:Z.target.value})),placeholder:Se.placeholder,required:Se.isRequired??Se.type==="email",className:`${r}-input`,style:{...B,paddingRight:F.scalingValue(I.right,t),paddingLeft:F.scalingValue(I.left,t),paddingTop:F.scalingValue(I.top,t),paddingBottom:F.scalingValue(I.bottom,t)}},Se.name))}),a.jsx("div",{className:`${r}-overlayAnchor`,children:a.jsx("button",{type:l?"submit":"button",className:`${r}-submitBtn`,"aria-label":Y,style:{...R,...X,paddingRight:F.scalingValue(A.right,t),paddingLeft:F.scalingValue(A.left,t),paddingTop:F.scalingValue(A.top,t),paddingBottom:F.scalingValue(A.bottom,t),pointerEvents:l?"auto":void 0},children:N==="submitting"?"...":h?Ce&&a.jsx(gn,{url:Ce,className:`${r}-submitBtnIcon`,style:{maxWidth:F.scalingValue(T??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):xe})})]}),Pe==="success"&&a.jsx("p",{className:`${r}-success`,style:{...ee},children:j}),Pe==="error"&&a.jsx("p",{className:`${r}-error`,style:{...ee},role:"alert",children:se??ye??ie})]})},Lf={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"},Pf=["hover","focus","filled","success","error"],If=`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
- `,If="01M46GNEM2XB41HP5K8WY5BHD2",Rf=[{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"}}}},Ef=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],kf={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:Rf,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:If},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:[...Ef],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"]},Af={element:Tf,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"01M3QM74XGJAEF1BDS9GZQNX72"},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:kf,sourceCode:Mf};function Ff(e,t){const n=t>0?`${t}px`:"0px";return`
1568
+ `,Rf="01M46GNEM2XB41HP5K8WY5BHD2",Mf=[{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"}}}},Ef=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],kf={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:Mf,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Rf},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:[...Ef],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"]},Af={element:Tf,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:kf,sourceCode:If};function Ff(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 Nf=30,_f=20,ts=3,Hf=12,Wf=32,Of=3,Df=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")},Bf=(e,t)=>Array.from({length:t},()=>e).flat(),zf=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},Xu=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=Xu(c);return d<=0?0:d+r*Math.max(0,t-1)},jf=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=Xu(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},Vf=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},Gf=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Vf(i,e))},Xf=e=>{if(e.type==="video")return!0;if(e.type==="image")return!1;const t=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url??"")},Uf=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,qf=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:r,imageHoverClass:l,isFirstSet:c,scaled:d,onFirstSetImageDone:u})=>{var D,E,T,C;const p=s.useRef(null),y=!!((D=e.image)!=null&&D.url&&Xf(e.image));s.useLayoutEffect(()=>{c&&Uf(p.current)&&(u==null||u())},[c,(E=e.image)==null?void 0:E.url,u]);const v=n.display==="cover",g=n.ratioValue??"1:1",m=n.reversed??!1,[x,b]=g.split(":").map(Number),S=(m?b:x)/(m?x:b),W=i/S,q=W>o?o:W,z=W>o?o*S:i,P=d(z),_=d(q),G={borderRadius:d(r)},$=v?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...G}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:d(i),maxHeight:d(o),objectFit:"contain",...G},L=((T=e.image)==null?void 0:T.url)&&(y?a.jsx("video",{ref:V=>{p.current=V},src:e.image.url,style:$,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto",onLoadedData:c?u:void 0,onError:c?u:void 0}):a.jsx("img",{ref:V=>{p.current=V},src:e.image.url,alt:((C=e.image)==null?void 0:C.name)??"",style:$,onLoad:c?u:void 0,onError:c?u:void 0}));return a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...v?{width:P}:{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,...v?{width:P,height:_,overflow:"hidden",...G}:{width:"max-content",maxWidth:d(i),height:d(o)}},children:L&&e.link?a.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:Ct(`${t}-marquee-link`,!v&&`${t}-marquee-link-contain`),children:L}):L})})},Yf=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=F.useScopedStyles(),[l,c]=s.useState(0),d=l>0?Math.round(l):0,u=s.useMemo(()=>Ff(r,d),[r,d]),{speed:p,direction:y,pauseOnHover:v,gap:g,imageMaxWidth:m,imageMaxHeight:x,hoverEffect:b,cornerRadius:R=0}=e,f=s.useMemo(()=>zf(e.imageFit),[e.imageFit]),S=(t==null?void 0:t.length)??0,W=!!o,q=!n||!!i,z=q&&b!=="off"&&b!=="randomize"?`${r}-image-hover-${b}`:void 0,P=n?!!i:!0,G=((t==null?void 0:t.length)??0)>0&&(P||!!n),$=Math.max(0,p)*Nf,L=we=>F.scalingValue(we,n??!1),D=s.useRef(null),E=s.useRef(null),T=s.useRef(null),[C,V]=s.useState(0),w=P&&v==="on",[U,M]=s.useState(!1),[A,j]=s.useState({}),ie=s.useRef(A);ie.current=A;const ae=s.useRef(null),O=s.useRef(0),re=s.useRef(null),N=s.useMemo(()=>(t??[]).map(we=>{var Ie;return((Ie=we.image)==null?void 0:Ie.url)??""}).join("\0"),[t]),[le,J]=s.useState(ts),be=s.useMemo(()=>{const we=t??[];return we.length===0||!(P||!!n)?we:Bf(we,le)},[t,P,le,n]),Pe=s.useMemo(()=>(t??[]).filter(we=>{var Ie;return!!((Ie=we.image)!=null&&Ie.url)}).length,[t]),ye=G?Of:1;s.useLayoutEffect(()=>{O.current=0,j({}),ae.current=null,J(ts),c(0)},[N]),s.useEffect(()=>{if(!q||b!=="randomize")return;const we=D.current;if(!we)return;const Ie=h=>{j(Y=>{const Q=Array.from(h).filter(ue=>ue in Y&&!Gf(we,ue));if(Q.length===0)return Y;const ne={...Y};return Q.forEach(ue=>{delete ne[ue]}),ne})},me=new IntersectionObserver(h=>{const Y=new Set;for(const Q of h){const ne=Q.target.dataset.marqueeItemIndex,ue=ne!==void 0?Number(ne):NaN;Number.isNaN(ue)||Y.add(ue)}Y.size>0&&Ie(Y)},{root:we,threshold:0});Object.keys(A).forEach(h=>{const Y=Number(h);we.querySelectorAll(`[data-marquee-item-index="${Y}"]`).forEach(Q=>me.observe(Q))});const xe={current:0},Ce=()=>{const h=Object.keys(ie.current);h.length!==0&&(Ie(h.map(Number)),xe.current=requestAnimationFrame(Ce))};return Object.keys(ie.current).length>0&&(xe.current=requestAnimationFrame(Ce)),()=>{cancelAnimationFrame(xe.current),me.disconnect()}},[b,A,q]),s.useEffect(()=>{const we=D.current;if(!we||typeof IntersectionObserver>"u")return;const Ie=we.querySelectorAll("video");if(Ie.length===0)return;const me=new IntersectionObserver(xe=>{for(const Ce of xe){const h=Ce.target;Ce.isIntersecting?h.paused&&h.play().catch(()=>{}):h.paused||h.pause()}},{threshold:0});return Ie.forEach(xe=>me.observe(xe)),()=>me.disconnect()},[G,be,ye,A]),s.useLayoutEffect(()=>{if(!G)return;const we=D.current,Ie=T.current;if(!we||!Ie)return;const me={current:0},xe=()=>{const Y=we.getBoundingClientRect().width||we.offsetWidth,Q=jf(Ie),ne=ae.current,ue=typeof ne=="number"&&Math.abs(ne-Q)<=.25;ae.current=Q;let B=le,I=0;if((P||n)&&S>0&&Y>0){const ge=Sc(Ie,S);if(ge>=Wf){I=ge;const X=Math.min(Hf,Math.max(ts,Math.ceil(Y/ge)+1));B=X,X!==le&&J(X)}}const te=B!==le&&I>0?I*B:Q>0?Q:I>0?I*B:(()=>{const ge=Sc(Ie,S);return ge>0?ge*B:0})();te>0?c(ge=>ge<=0?te:!ue||Math.round(ge)===Math.round(te)?ge:te):!ue&&l<=0&&(cancelAnimationFrame(me.current),me.current=requestAnimationFrame(xe))},Ce=()=>{cancelAnimationFrame(me.current),me.current=requestAnimationFrame(xe)};re.current=Ce,Ce();const h=new ResizeObserver(Ce);return h.observe(we),h.observe(Ie),()=>{re.current=null,cancelAnimationFrame(me.current),h.disconnect()}},[P,G,l,N,le,S,n]),s.useLayoutEffect(()=>{if(!G||d<=0)return;const we=E.current;we&&Df(we)},[G,d,y,$]),s.useLayoutEffect(()=>{if(!G||l<=0){V(0);return}const we=E.current,Ie=T.current;if(!we||!Ie)return;const me=()=>{const Ce=we.offsetHeight||we.getBoundingClientRect().height,h=Array.from(Ie.children).reduce((Q,ne)=>Math.max(Q,ne.offsetHeight||ne.getBoundingClientRect().height),0),Y=Ce>0?Ce:h;V(Y>0?Y:0)};me();const xe=new ResizeObserver(me);return xe.observe(we),xe.observe(Ie),()=>xe.disconnect()},[G,ye,be,n,g,m,x,l,f,A]),s.useLayoutEffect(()=>{if(!n||!W||!G||typeof window>"u")return;const we=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(we)},[n,W,G,y,l,C,g,be]);const ce=()=>{w&&M(!0)},K=()=>{w&&M(!1)},se=s.useCallback(()=>{var we;O.current=Math.min(Pe,O.current+1),(we=re.current)==null||we.call(re)},[Pe]),pe=s.useCallback((we,Ie)=>{j(me=>{const xe=me[we]??Ie,Ce=(t??[]).filter(Y=>Y!==xe);if(Ce.length===0)return me;const h=Ce[Math.floor(Math.random()*Ce.length)];return{...me,[we]:h}})},[t]),fe=(we,Ie,me,xe)=>{const Ce=q&&b==="randomize"&&f.display==="cover"?A[me]??we:we,h=`max(${L(g)}, ${_f}px)`,Y=`calc(-0.5 * (${h} + ${L(g)}))`;return a.jsxs("div",{className:`${r}-marquee-card`,"data-marquee-item-index":me,onMouseEnter:q&&b==="randomize"&&f.display==="cover"?()=>pe(me,we):void 0,children:[a.jsx(qf,{item:Ce,prefix:r,imageFit:f,imageMaxWidth:m,imageMaxHeight:x,cornerRadius:R,imageHoverClass:z,isEditor:n,isFirstSet:xe,scaled:L,onFirstSetImageDone:se}),W&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${r}-gap-control`,style:{position:"absolute",top:0,right:Y,width:h,height:"100%"}})]},`${Ie}-${me}`)};if(G){const we=P?w&&U?"paused":"running":"paused",Ie=d>0&&$>0?d/$*1e3:0,me=`${Math.max(0,Ie)/1e3}s`;return a.jsxs("div",{ref:D,className:Ct(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Marquee",style:C>0?{height:C}:void 0,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{ref:E,className:`${r}-marquee-track`,"data-direction":y,onMouseEnter:ce,onMouseLeave:K,style:{WebkitAnimationDuration:me,animationDuration:me,WebkitAnimationPlayState:we,animationPlayState:we},children:Array.from({length:ye},(xe,Ce)=>a.jsx("div",{ref:Ce===0?T:void 0,className:Ct(`${r}-marquee-row`,`${r}-marquee-set`),style:{gap:L(g),paddingRight:L(g)},"aria-hidden":Ce>0,children:be.map((h,Y)=>fe(h,Ce,Y,Ce===0&&Y<S))},`set-${Ce}`))})]})}return a.jsxs("div",{ref:D,className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{className:Ct(`${r}-marquee-row`,`${r}-marquee-static`),style:{gap:L(g),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((we,Ie)=>fe(we,0,Ie))},"marquee-static")]})},Kf=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
1700
+ `}const Nf=30,_f=20,ts=3,Hf=12,Wf=32,Of=3,Df=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")},Bf=(e,t)=>Array.from({length:t},()=>e).flat(),zf=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},Xu=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=Xu(c);return d<=0?0:d+r*Math.max(0,t-1)},jf=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=Xu(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},Vf=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},Gf=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Vf(i,e))},Xf=e=>{if(e.type==="video")return!0;if(e.type==="image")return!1;const t=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url??"")},Uf=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,qf=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:r,imageHoverClass:l,isFirstSet:c,scaled:d,onFirstSetImageDone:u})=>{var D,E,T,C;const p=s.useRef(null),y=!!((D=e.image)!=null&&D.url&&Xf(e.image));s.useLayoutEffect(()=>{c&&Uf(p.current)&&(u==null||u())},[c,(E=e.image)==null?void 0:E.url,u]);const v=n.display==="cover",g=n.ratioValue??"1:1",m=n.reversed??!1,[x,b]=g.split(":").map(Number),S=(m?b:x)/(m?x:b),W=i/S,q=W>o?o:W,z=W>o?o*S:i,P=d(z),_=d(q),G={borderRadius:d(r)},$=v?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...G}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:d(i),maxHeight:d(o),objectFit:"contain",...G},L=((T=e.image)==null?void 0:T.url)&&(y?a.jsx("video",{ref:V=>{p.current=V},src:e.image.url,style:$,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto",onLoadedData:c?u:void 0,onError:c?u:void 0}):a.jsx("img",{ref:V=>{p.current=V},src:e.image.url,alt:((C=e.image)==null?void 0:C.name)??"",style:$,onLoad:c?u:void 0,onError:c?u:void 0}));return a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...v?{width:P}:{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,...v?{width:P,height:_,overflow:"hidden",...G}:{width:"max-content",maxWidth:d(i),height:d(o)}},children:L&&e.link?a.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:Ct(`${t}-marquee-link`,!v&&`${t}-marquee-link-contain`),children:L}):L})})},Yf=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=F.useScopedStyles(),[l,c]=s.useState(0),d=l>0?Math.round(l):0,u=s.useMemo(()=>Ff(r,d),[r,d]),{speed:p,direction:y,pauseOnHover:v,gap:g,imageMaxWidth:m,imageMaxHeight:x,hoverEffect:b,cornerRadius:M=0}=e,f=s.useMemo(()=>zf(e.imageFit),[e.imageFit]),S=(t==null?void 0:t.length)??0,W=!!o,q=!n||!!i,z=q&&b!=="off"&&b!=="randomize"?`${r}-image-hover-${b}`:void 0,P=n?!!i:!0,G=((t==null?void 0:t.length)??0)>0&&(P||!!n),$=Math.max(0,p)*Nf,L=we=>F.scalingValue(we,n??!1),D=s.useRef(null),E=s.useRef(null),T=s.useRef(null),[C,V]=s.useState(0),w=P&&v==="on",[U,I]=s.useState(!1),[A,j]=s.useState({}),ie=s.useRef(A);ie.current=A;const ae=s.useRef(null),O=s.useRef(0),re=s.useRef(null),N=s.useMemo(()=>(t??[]).map(we=>{var Re;return((Re=we.image)==null?void 0:Re.url)??""}).join("\0"),[t]),[le,J]=s.useState(ts),be=s.useMemo(()=>{const we=t??[];return we.length===0||!(P||!!n)?we:Bf(we,le)},[t,P,le,n]),Pe=s.useMemo(()=>(t??[]).filter(we=>{var Re;return!!((Re=we.image)!=null&&Re.url)}).length,[t]),ye=G?Of:1;s.useLayoutEffect(()=>{O.current=0,j({}),ae.current=null,J(ts),c(0)},[N]),s.useEffect(()=>{if(!q||b!=="randomize")return;const we=D.current;if(!we)return;const Re=h=>{j(Y=>{const Q=Array.from(h).filter(ue=>ue in Y&&!Gf(we,ue));if(Q.length===0)return Y;const ne={...Y};return Q.forEach(ue=>{delete ne[ue]}),ne})},me=new IntersectionObserver(h=>{const Y=new Set;for(const Q of h){const ne=Q.target.dataset.marqueeItemIndex,ue=ne!==void 0?Number(ne):NaN;Number.isNaN(ue)||Y.add(ue)}Y.size>0&&Re(Y)},{root:we,threshold:0});Object.keys(A).forEach(h=>{const Y=Number(h);we.querySelectorAll(`[data-marquee-item-index="${Y}"]`).forEach(Q=>me.observe(Q))});const xe={current:0},Ce=()=>{const h=Object.keys(ie.current);h.length!==0&&(Re(h.map(Number)),xe.current=requestAnimationFrame(Ce))};return Object.keys(ie.current).length>0&&(xe.current=requestAnimationFrame(Ce)),()=>{cancelAnimationFrame(xe.current),me.disconnect()}},[b,A,q]),s.useEffect(()=>{const we=D.current;if(!we||typeof IntersectionObserver>"u")return;const Re=we.querySelectorAll("video");if(Re.length===0)return;const me=new IntersectionObserver(xe=>{for(const Ce of xe){const h=Ce.target;Ce.isIntersecting?h.paused&&h.play().catch(()=>{}):h.paused||h.pause()}},{threshold:0});return Re.forEach(xe=>me.observe(xe)),()=>me.disconnect()},[G,be,ye,A]),s.useLayoutEffect(()=>{if(!G)return;const we=D.current,Re=T.current;if(!we||!Re)return;const me={current:0},xe=()=>{const Y=we.getBoundingClientRect().width||we.offsetWidth,Q=jf(Re),ne=ae.current,ue=typeof ne=="number"&&Math.abs(ne-Q)<=.25;ae.current=Q;let B=le,R=0;if((P||n)&&S>0&&Y>0){const ge=Sc(Re,S);if(ge>=Wf){R=ge;const X=Math.min(Hf,Math.max(ts,Math.ceil(Y/ge)+1));B=X,X!==le&&J(X)}}const te=B!==le&&R>0?R*B:Q>0?Q:R>0?R*B:(()=>{const ge=Sc(Re,S);return ge>0?ge*B:0})();te>0?c(ge=>ge<=0?te:!ue||Math.round(ge)===Math.round(te)?ge:te):!ue&&l<=0&&(cancelAnimationFrame(me.current),me.current=requestAnimationFrame(xe))},Ce=()=>{cancelAnimationFrame(me.current),me.current=requestAnimationFrame(xe)};re.current=Ce,Ce();const h=new ResizeObserver(Ce);return h.observe(we),h.observe(Re),()=>{re.current=null,cancelAnimationFrame(me.current),h.disconnect()}},[P,G,l,N,le,S,n]),s.useLayoutEffect(()=>{if(!G||d<=0)return;const we=E.current;we&&Df(we)},[G,d,y,$]),s.useLayoutEffect(()=>{if(!G||l<=0){V(0);return}const we=E.current,Re=T.current;if(!we||!Re)return;const me=()=>{const Ce=we.offsetHeight||we.getBoundingClientRect().height,h=Array.from(Re.children).reduce((Q,ne)=>Math.max(Q,ne.offsetHeight||ne.getBoundingClientRect().height),0),Y=Ce>0?Ce:h;V(Y>0?Y:0)};me();const xe=new ResizeObserver(me);return xe.observe(we),xe.observe(Re),()=>xe.disconnect()},[G,ye,be,n,g,m,x,l,f,A]),s.useLayoutEffect(()=>{if(!n||!W||!G||typeof window>"u")return;const we=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(we)},[n,W,G,y,l,C,g,be]);const ce=()=>{w&&I(!0)},K=()=>{w&&I(!1)},se=s.useCallback(()=>{var we;O.current=Math.min(Pe,O.current+1),(we=re.current)==null||we.call(re)},[Pe]),pe=s.useCallback((we,Re)=>{j(me=>{const xe=me[we]??Re,Ce=(t??[]).filter(Y=>Y!==xe);if(Ce.length===0)return me;const h=Ce[Math.floor(Math.random()*Ce.length)];return{...me,[we]:h}})},[t]),fe=(we,Re,me,xe)=>{const Ce=q&&b==="randomize"&&f.display==="cover"?A[me]??we:we,h=`max(${L(g)}, ${_f}px)`,Y=`calc(-0.5 * (${h} + ${L(g)}))`;return a.jsxs("div",{className:`${r}-marquee-card`,"data-marquee-item-index":me,onMouseEnter:q&&b==="randomize"&&f.display==="cover"?()=>pe(me,we):void 0,children:[a.jsx(qf,{item:Ce,prefix:r,imageFit:f,imageMaxWidth:m,imageMaxHeight:x,cornerRadius:M,imageHoverClass:z,isEditor:n,isFirstSet:xe,scaled:L,onFirstSetImageDone:se}),W&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${r}-gap-control`,style:{position:"absolute",top:0,right:Y,width:h,height:"100%"}})]},`${Re}-${me}`)};if(G){const we=P?w&&U?"paused":"running":"paused",Re=d>0&&$>0?d/$*1e3:0,me=`${Math.max(0,Re)/1e3}s`;return a.jsxs("div",{ref:D,className:Ct(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Marquee",style:C>0?{height:C}:void 0,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{ref:E,className:`${r}-marquee-track`,"data-direction":y,onMouseEnter:ce,onMouseLeave:K,style:{WebkitAnimationDuration:me,animationDuration:me,WebkitAnimationPlayState:we,animationPlayState:we},children:Array.from({length:ye},(xe,Ce)=>a.jsx("div",{ref:Ce===0?T:void 0,className:Ct(`${r}-marquee-row`,`${r}-marquee-set`),style:{gap:L(g),paddingRight:L(g)},"aria-hidden":Ce>0,children:be.map((h,Y)=>fe(h,Ce,Y,Ce===0&&Y<S))},`set-${Ce}`))})]})}return a.jsxs("div",{ref:D,className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{className:Ct(`${r}-marquee-row`,`${r}-marquee-static`),style:{gap:L(g),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((we,Re)=>fe(we,0,Re))},"marquee-static")]})},Kf=`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 { scalingValue } from '../utils/scalingValue';
@@ -2501,7 +2501,7 @@ type MarqueeProps = {
2501
2501
  isPreviewMode?: boolean;
2502
2502
  isEditMode?: boolean;
2503
2503
  } & CommonComponentProps;
2504
- `,Qf={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},hoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["off","brightness","grayscale"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,display:{type:"numeric-input"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,display:{type:"numeric-input"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,display:{type:"numeric-input"}},imageFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",min:0,display:{type:"numeric-input"}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.8,cornerRadius:0},t:{speed:1.64,gap:.02,imageMaxWidth:.5208,imageMaxHeight:.5208,cornerRadius:0},d:{speed:1.64,gap:.02,imageMaxWidth:.208,imageMaxHeight:.278,cornerRadius:0}},displayRules:[{if:{name:"imageFit.display",value:"cover"},then:{name:"properties.hoverEffect.display.enum",value:["off","brightness","grayscale","randomize"]}}],layout:["__componentName__","speed","direction","pauseOnHover","hoverEffect","gap","imageMaxWidth","imageMaxHeight","imageFit","cornerRadius"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{type:"row",items:["cornerRadius"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]}}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"01M3QM74XESYN1HRYH9VRTZ5CK",name:""},link:""},{image:{url:"01M3QM74XEVZ9F59FC7M9BA63Q",name:""},link:""},{image:{url:"01M3QM74XEE2101QD8PM6E4JSA",name:""},link:""},{image:{url:"01M3QM74XE20C38X4NND20C5R4",name:""},link:""},{image:{url:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:""},link:""},{image:{url:"01M3QM74XEBS5231QA4355P4VQ",name:""},link:""},{image:{url:"01M3QM74XEWT5YM43KF6PEYRCV",name:""},link:""}]}},Zf={element:Yf,id:"marquee",name:"Simple Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%"},t:{width:"100%"},m:{width:"100%"}},preview:{type:"image",url:"01M3QM74XGRE56JDF4164WNBND"},schema:Qf,sourceCode:Kf,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function Jf(e,t,n){const i=t>0?`${t}px`:"0px",o=n?`
2504
+ `,Qf={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},hoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["off","brightness","grayscale"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,display:{type:"numeric-input"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,display:{type:"numeric-input"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,display:{type:"numeric-input"}},imageFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",min:0,display:{type:"numeric-input"}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.8,cornerRadius:0},t:{speed:1.64,gap:.02,imageMaxWidth:.5208,imageMaxHeight:.5208,cornerRadius:0},d:{speed:1.64,gap:.02,imageMaxWidth:.208,imageMaxHeight:.278,cornerRadius:0}},displayRules:[{if:{name:"imageFit.display",value:"cover"},then:{name:"properties.hoverEffect.display.enum",value:["off","brightness","grayscale","randomize"]}}],layout:["__componentName__","speed","direction","pauseOnHover","hoverEffect","gap","imageMaxWidth","imageMaxHeight","imageFit","cornerRadius"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{type:"row",items:["cornerRadius"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]}}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"01M3QM74XESYN1HRYH9VRTZ5CK",name:""},link:""},{image:{url:"01M3QM74XEVZ9F59FC7M9BA63Q",name:""},link:""},{image:{url:"01M3QM74XEE2101QD8PM6E4JSA",name:""},link:""},{image:{url:"01M3QM74XE20C38X4NND20C5R4",name:""},link:""},{image:{url:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:""},link:""},{image:{url:"01M3QM74XEBS5231QA4355P4VQ",name:""},link:""},{image:{url:"01M3QM74XEWT5YM43KF6PEYRCV",name:""},link:""}]}},Zf={element:Yf,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:Qf,sourceCode:Kf,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function Jf(e,t,n){const i=t>0?`${t}px`:"0px",o=n?`
2505
2505
  .${e}-item-image-wrap {
2506
2506
  display: flex;
2507
2507
  flex: 0 0 auto;
@@ -2632,7 +2632,7 @@ ${o}
2632
2632
  left: -9999px;
2633
2633
  top: 0;
2634
2634
  }
2635
- `}const ey=30,ns=3,ty=12,ny=96,wc=3,ua=.72,iy=100,oy=10,ry=e=>e/iy,ay=e=>Math.max(0,e)/oy,sy=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")},ly=(e,t)=>Array.from({length:t*e.length},(n,i)=>e[i%e.length]),io={ctx:void 0},cy=()=>io.ctx!==void 0?io.ctx:typeof document>"u"?(io.ctx=null,io.ctx):(io.ctx=document.createElement("canvas").getContext("2d"),io.ctx),dy=(e,t,n,i)=>{e.style.transform=`translate3d(${t}px, ${n}px, 0) rotate(${i}deg)`},$c=e=>{e.style.transform=""},uy=e=>{if(!e||e==="none")return 0;try{return new DOMMatrixReadOnly(e).m41}catch{return 0}},py=(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)},Uu=96,qu=(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,v=y+d;o[p+1]=v,r[p+1]=r[p]+(c(y)+c(v))*.5*d}),{wavelength:i,periodArc:r[n],x:o,s:r}},gy=(e,t)=>{const n=qu(e,t,Uu);return!n||n.wavelength<=0?1:n.periodArc/n.wavelength},my=(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=(g,m)=>{if(m-g<=1)return[g,m];const x=g+m>>1;return l[x]<=r?d(x,m):d(g,x)},[u,p]=d(0,l.length-1),y=l[p]-l[u],v=y>0?(r-l[u])/y:0;return n*(o*e.wavelength+c[u]+(c[p]-c[u])*v)},hy=(e,t,n,i,o=0)=>{const r=Math.max(0,n),l=e>0?2*Math.PI*r/e:0,c=m=>i+t*Math.sin(l*m),d=m=>t*l*Math.cos(l*m),u=-o,y=e+o-u,v=Math.max(4,Math.ceil(r*4*(y/Math.max(e,1)))),g=Array.from({length:v},(m,x)=>{const b=u+x/v*y,R=u+(x+1)/v*y,f=R-b,S=c(b),W=c(R),q=b+f/3,z=S+d(b)*f/3,P=R-f/3,_=W-d(R)*f/3;return`C${q.toFixed(2)} ${z.toFixed(2)} ${P.toFixed(2)} ${_.toFixed(2)} ${R.toFixed(2)} ${W.toFixed(2)}`});return[`M${u.toFixed(2)} ${c(u).toFixed(2)}`,...g].join(" ")},fy=({item:e,prefix:t,textCss:n,capHeightPx:i,opticalOffsetY:o,imageGapPx:r,isCurve:l})=>{var g;const c=o!==0?{...n,transform:`translateY(${o}px)`}:n,d=i>0?{height:`${i}px`}:{fontSize:n.fontSize,height:`${ua}em`},u=((g=e.image)==null?void 0:g.url)&&a.jsx("img",{src:e.image.url,alt:e.image.name??"",className:`${t}-item-image`,style: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((m,x)=>a.jsx("span",{className:`${t}-glyph`,"data-marquee-wave-node":!0,children:a.jsx("span",{className:`${t}-glyph-inner`,children:m===" "?" ":m})},x))}):a.jsx("span",{className:`${t}-text`,style:c,children:e.text}),v=a.jsxs(a.Fragment,{children:[p,y]});return a.jsx("div",{className:`${t}-item`,"data-marquee-text-item":!0,style:{gap:r},children:e.link?a.jsx("a",{href:e.link,className:`${t}-item-link`,style:{gap:r},children:v}):v})},yy=({settings:e,content:t,isEditor:n,isPreviewMode:i})=>{const{prefix:o}=F.useScopedStyles(),[r,l]=s.useState(0),c=r>0?Math.round(r):0,{speed:d,direction:u,pauseOnHover:p,gap:y,layoutType:v,curveAmplitude:g,curveFrequency:m,textFontFamily:x,textFontSettings:b,textFontSize:R,textLetterSpacing:f,textWordSpacing:S,textTextAppearance:W,textColor:q,backgroundColor:z,ribbonWidth:P}=e,_=P??R,G=v==="curve",$=ry(g),L=ay(m),D=s.useMemo(()=>Jf(o,c,G),[o,c,G]),E=s.useMemo(()=>en({fontSettings:{fontFamily:x,fontWeight:b.fontWeight,fontStyle:b.fontStyle},letterSpacing:f,wordSpacing:S,fontSize:R,lineHeight:R,textAppearance:W,color:q},n),[x,b,f,S,R,W,q,n]),T=Oe=>F.scalingValue(Oe,n??!1),C=((t==null?void 0:t.length)??0)>0,V=n?!!i:!0,w=C&&(V||!!n),U=Math.max(0,d)*ey,M=V&&p==="on",[A,j]=s.useState(!1),ie=V?M&&A?"paused":"running":"paused",ae=ie==="running"&&U>0&&c>0,O=c>0&&U>0?c/U*1e3:0,re=s.useRef(null),N=s.useRef(null),le=s.useRef(null),J=s.useRef(null),be=s.useRef(null),Pe=s.useRef(null),ye=s.useRef(ae),ce=s.useRef(null),K=s.useRef(null),se=s.useRef($),pe=s.useRef(L);ye.current=ae,se.current=$,pe.current=L;const[fe,we]=s.useState(0),[Ie,me]=s.useState(0),[xe,Ce]=s.useState(0),[h,Y]=s.useState(0),[Q,ne]=s.useState(0),ue=s.useMemo(()=>(t??[]).map(Oe=>{var Ae;return`${Oe.text}\0${((Ae=Oe.image)==null?void 0:Ae.url)??""}\0${Oe.link??""}`}).join("\0"),[t]),[B,I]=s.useState(ns),ee=s.useMemo(()=>{const Oe=t??[];return Oe.length===0||!(V||n)?Oe:ly(Oe,B)},[t,V,B,n]),te=w?wc:1;s.useLayoutEffect(()=>{I(ns),l(0)},[ue]),s.useLayoutEffect(()=>{var De;const Oe=Pe.current;if(!Oe)return;const Ae=()=>{const Ue=getComputedStyle(Oe),ct=parseFloat(Ue.fontSize)||0;if(ct<=0)return;const he=cy();if(!he){we(ct*ua),me(0);return}he.font=`${Ue.fontStyle} ${Ue.fontWeight} ${ct}px ${Ue.fontFamily}`;const Re=he.measureText("H"),nt=Re.actualBoundingBoxAscent>0?Re.actualBoundingBoxAscent:ct*ua,pt=Math.max(0,Re.actualBoundingBoxDescent||0),Ve=Re.fontBoundingBoxAscent||0,vt=Re.fontBoundingBoxDescent||0;we(At=>Math.abs(At-nt)>.5?nt:At);const Mt=Ve>0||vt>0?(vt-pt-(Ve-nt))/2:0;me(At=>Math.abs(At-Mt)>.25?Mt:At)};Ae();const mt=typeof document<"u"?document.fonts:void 0;(De=mt==null?void 0:mt.ready)==null||De.then(Ae).catch(()=>{});const Be=new ResizeObserver(Ae);return Be.observe(Oe),()=>Be.disconnect()},[E.fontFamily,E.fontWeight,E.fontStyle,E.fontSize,E.lineHeight]),s.useLayoutEffect(()=>{if(!w)return;const Oe=re.current,Ae=J.current;if(!Oe||!Ae)return;const mt={id:0},Be=()=>{const he=Oe.offsetWidth||Oe.getBoundingClientRect().width,Re=Ae.offsetWidth||Ae.getBoundingClientRect().width;if(C&&he>0&&Re>0){const nt=Re/B;if(nt>0){let pt=he,Ve=ty;if(G){const Mt=he*se.current,At=pe.current,wt=At>0?2*Math.PI*At/he:0,Vt=gy(Mt,wt);pt=Math.max(he,Vt*he/(wc-1)),Ve=ny}const vt=Math.min(Ve,Math.max(ns,Math.ceil(pt/nt)+1));if(vt!==B){I(vt);return}}}Re>0&&l(Re)},De=()=>{cancelAnimationFrame(mt.id),mt.id=requestAnimationFrame(Be)};De();const Ue=new ResizeObserver(De);Ue.observe(Oe),Ue.observe(Ae);const ct=()=>{document.hidden||De()};return document.addEventListener("visibilitychange",ct),window.addEventListener("pageshow",ct),window.addEventListener("focus",ct),()=>{cancelAnimationFrame(mt.id),Ue.disconnect(),document.removeEventListener("visibilitychange",ct),window.removeEventListener("pageshow",ct),window.removeEventListener("focus",ct)}},[w,ue,B,C,fe,G,$,L]),s.useLayoutEffect(()=>{const Oe=be.current;if(!Oe)return;const Ae={id:0},mt=()=>{const De=Oe.offsetHeight;De>0&&ne(Ue=>Math.abs(Ue-De)>.5?De:Ue)};Ae.id=requestAnimationFrame(mt);const Be=new ResizeObserver(()=>{cancelAnimationFrame(Ae.id),Ae.id=requestAnimationFrame(mt)});return Be.observe(Oe),()=>{cancelAnimationFrame(Ae.id),Be.disconnect()}},[_,n]),s.useLayoutEffect(()=>{if(!G){Ce(0),Y(0);return}const Oe=re.current,Ae=J.current;if(!Oe||!Ae)return;const mt={id:0},Be=()=>{const Ue=Oe.offsetWidth,ct=Ae.offsetHeight;Ue>0&&Y(he=>Math.abs(he-Ue)>.5?Ue:he),ct>0&&Ce(he=>Math.abs(he-ct)>.5?ct:he)};mt.id=requestAnimationFrame(Be);const De=new ResizeObserver(()=>{cancelAnimationFrame(mt.id),mt.id=requestAnimationFrame(Be)});return De.observe(Oe),De.observe(Ae),()=>{cancelAnimationFrame(mt.id),De.disconnect()}},[G,ue,fe,R,w]),s.useLayoutEffect(()=>{if(!w||c<=0)return;const Oe=le.current;Oe&&sy(Oe)},[w,c,u,U]),s.useLayoutEffect(()=>{if(!G||!C)return;const Oe=re.current;if(!Oe)return;const Ae={raf:0,cancelled:!1,lut:null,lutKey:"",itemsCache:[],cacheDirty:!0},mt=()=>{for(const nt of Ae.itemsCache)for(const pt of nt.glyphs)$c(pt.inner)},Be=()=>{const nt=N.current??Oe;Ae.itemsCache=Array.from(Oe.querySelectorAll("[data-marquee-text-item]"),pt=>{const Ve=[];return pt.querySelectorAll("[data-marquee-wave-node]").forEach(vt=>{const Mt=vt.firstElementChild;Mt&&Ve.push({inner:Mt,layoutLocalX:py(vt,nt)})}),{item:pt,glyphs:Ve}}),Ae.cacheDirty=!1},De=()=>{Ae.cacheDirty&&Be();const pt=(N.current??Oe).offsetWidth||1,Ve=pt*se.current,vt=pe.current,Mt=2*Math.PI*vt/pt,At=`${pt}|${Ve}|${Mt}`;if(At!==Ae.lutKey&&(Ae.lutKey=At,Ae.lut=qu(Ve,Mt,Uu)),Math.abs(Ve)<=0||Mt<=0){mt();return}const wt=le.current,Vt=wt?uy(getComputedStyle(wt).transform):0,jt=Oe.getBoundingClientRect(),Yt=jt.left,Kt=jt.right,It=Ae.lut&&Ae.lut.wavelength>0?Math.max(0,(Ae.lut.periodArc/Ae.lut.wavelength-1)*pt):0;for(const{item:zt,glyphs:on}of Ae.itemsCache){const xt=zt.getBoundingClientRect();if(xt.right<Yt||xt.left>Kt+It){for(const yt of on)$c(yt.inner);continue}for(const yt of on){const ke=yt.layoutLocalX+Vt,Je=Ae.lut?my(Ae.lut,ke):ke,rt=Mt*Je,dt=Ve*Math.sin(rt),Pt=Ve*Mt*Math.cos(rt),St=Math.atan(Pt)*(180/Math.PI);dy(yt.inner,Je-ke,dt,St)}}},Ue=()=>{Ae.cancelled||(Ae.raf=0,De(),ye.current&&!document.hidden&&(Ae.raf=requestAnimationFrame(Ue)))},ct=()=>{Ae.cancelled||Ae.raf||(Ae.raf=requestAnimationFrame(Ue))},he=()=>{Ae.cacheDirty=!0,De(),ct()};ce.current=ct,K.current=he,De(),ct();const Re=()=>{if(document.hidden){cancelAnimationFrame(Ae.raf),Ae.raf=0;return}cancelAnimationFrame(Ae.raf),Ae.raf=0,he()};return document.addEventListener("visibilitychange",Re),window.addEventListener("pageshow",Re),window.addEventListener("focus",Re),()=>{Ae.cancelled=!0,ce.current=null,K.current=null,cancelAnimationFrame(Ae.raf),document.removeEventListener("visibilitychange",Re),window.removeEventListener("pageshow",Re),window.removeEventListener("focus",Re),mt()}},[G,C]),s.useLayoutEffect(()=>{var Oe;!G||!C||(Oe=K.current)==null||Oe.call(K)},[G,C,r,ue,B,fe,$,L,h]),s.useLayoutEffect(()=>{var Oe;(Oe=ce.current)==null||Oe.call(ce)},[ae,u]);const ge=Oe=>{M&&Oe.pointerType==="mouse"&&j(!0)},X=()=>{M&&j(!1)},Me=G?Math.abs($)*100:0,Se=T(_),Z={minHeight:Se,...G?{paddingTop:`${Me}%`,paddingBottom:`${Me}%`}:{}},He={height:Se,...G?{visibility:"hidden"}:{backgroundColor:z}},We={gap:T(y),minHeight:Se},ot=h*$,qe=Math.abs(ot),tt=Q>0?Q:xe,et=Math.max(xe,tt),Ge=qe+et/2,ve=Math.max(tt,1),_e=G&&h>0&&et>0?hy(h,ot,L,Ge,ve):"",ze=qe*2+et,Qe=_e?a.jsx("svg",{className:`${o}-curve-bg`,viewBox:`0 0 ${h} ${ze}`,preserveAspectRatio:"none","aria-hidden":!0,children:a.jsx("path",{d:_e,fill:"none",stroke:z,strokeWidth:tt,strokeLinecap:"butt",strokeLinejoin:"round"})}):null,$e=a.jsx("div",{ref:be,className:`${o}-ribbon`,style:He,"aria-hidden":!0}),Ne={...E,lineHeight:fe>0?`${fe}px`:`${ua}em`},Ye=(Oe,Ae,mt)=>a.jsx(fy,{item:Oe,prefix:o,textCss:Ne,capHeightPx:fe,opticalOffsetY:Ie,imageGapPx:T(y),isCurve:G},`${Ae}-${mt}`),Ze=a.jsx("span",{ref:Pe,"aria-hidden":!0,className:`${o}-cap-ref`,style:E,children:"H"}),st=`${Math.max(0,O)/1e3}s`,it=w?a.jsx("div",{ref:le,className:`${o}-marquee-track`,"data-direction":u,onPointerEnter:ge,onPointerLeave:X,style:{WebkitAnimationDuration:st,animationDuration:st,WebkitAnimationPlayState:ie,animationPlayState:ie},children:Array.from({length:te},(Oe,Ae)=>a.jsx("div",{ref:Ae===0?J:void 0,className:`${o}-marquee-set`,style:{...We,paddingRight:T(y)},"aria-hidden":Ae>0,children:ee.map((mt,Be)=>Ye(mt,Ae,Be))},`set-${Ae}`))}):a.jsx("div",{ref:J,className:Ct(`${o}-marquee-set`,`${o}-marquee-static`),style:We,children:t==null?void 0:t.map((Oe,Ae)=>Ye(Oe,0,Ae))});return a.jsxs("div",{ref:re,className:`${o}-wrapper`,"aria-label":"Marquee text",children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:D}}),Ze,a.jsxs("div",{ref:N,className:`${o}-marquee-wrapper`,style:Z,children:[$e,Qe,it]})]})},vy=`import { useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type PointerEvent as ReactPointerEvent } from 'react';
2635
+ `}const ey=30,ns=3,ty=12,ny=96,wc=3,ua=.72,iy=100,oy=10,ry=e=>e/iy,ay=e=>Math.max(0,e)/oy,sy=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")},ly=(e,t)=>Array.from({length:t*e.length},(n,i)=>e[i%e.length]),io={ctx:void 0},cy=()=>io.ctx!==void 0?io.ctx:typeof document>"u"?(io.ctx=null,io.ctx):(io.ctx=document.createElement("canvas").getContext("2d"),io.ctx),dy=(e,t,n,i)=>{e.style.transform=`translate3d(${t}px, ${n}px, 0) rotate(${i}deg)`},$c=e=>{e.style.transform=""},uy=e=>{if(!e||e==="none")return 0;try{return new DOMMatrixReadOnly(e).m41}catch{return 0}},py=(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)},Uu=96,qu=(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,v=y+d;o[p+1]=v,r[p+1]=r[p]+(c(y)+c(v))*.5*d}),{wavelength:i,periodArc:r[n],x:o,s:r}},gy=(e,t)=>{const n=qu(e,t,Uu);return!n||n.wavelength<=0?1:n.periodArc/n.wavelength},my=(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=(g,m)=>{if(m-g<=1)return[g,m];const x=g+m>>1;return l[x]<=r?d(x,m):d(g,x)},[u,p]=d(0,l.length-1),y=l[p]-l[u],v=y>0?(r-l[u])/y:0;return n*(o*e.wavelength+c[u]+(c[p]-c[u])*v)},hy=(e,t,n,i,o=0)=>{const r=Math.max(0,n),l=e>0?2*Math.PI*r/e:0,c=m=>i+t*Math.sin(l*m),d=m=>t*l*Math.cos(l*m),u=-o,y=e+o-u,v=Math.max(4,Math.ceil(r*4*(y/Math.max(e,1)))),g=Array.from({length:v},(m,x)=>{const b=u+x/v*y,M=u+(x+1)/v*y,f=M-b,S=c(b),W=c(M),q=b+f/3,z=S+d(b)*f/3,P=M-f/3,_=W-d(M)*f/3;return`C${q.toFixed(2)} ${z.toFixed(2)} ${P.toFixed(2)} ${_.toFixed(2)} ${M.toFixed(2)} ${W.toFixed(2)}`});return[`M${u.toFixed(2)} ${c(u).toFixed(2)}`,...g].join(" ")},fy=({item:e,prefix:t,textCss:n,capHeightPx:i,opticalOffsetY:o,imageGapPx:r,isCurve:l})=>{var g;const c=o!==0?{...n,transform:`translateY(${o}px)`}:n,d=i>0?{height:`${i}px`}:{fontSize:n.fontSize,height:`${ua}em`},u=((g=e.image)==null?void 0:g.url)&&a.jsx("img",{src:e.image.url,alt:e.image.name??"",className:`${t}-item-image`,style: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((m,x)=>a.jsx("span",{className:`${t}-glyph`,"data-marquee-wave-node":!0,children:a.jsx("span",{className:`${t}-glyph-inner`,children:m===" "?" ":m})},x))}):a.jsx("span",{className:`${t}-text`,style:c,children:e.text}),v=a.jsxs(a.Fragment,{children:[p,y]});return a.jsx("div",{className:`${t}-item`,"data-marquee-text-item":!0,style:{gap:r},children:e.link?a.jsx("a",{href:e.link,className:`${t}-item-link`,style:{gap:r},children:v}):v})},yy=({settings:e,content:t,isEditor:n,isPreviewMode:i})=>{const{prefix:o}=F.useScopedStyles(),[r,l]=s.useState(0),c=r>0?Math.round(r):0,{speed:d,direction:u,pauseOnHover:p,gap:y,layoutType:v,curveAmplitude:g,curveFrequency:m,textFontFamily:x,textFontSettings:b,textFontSize:M,textLetterSpacing:f,textWordSpacing:S,textTextAppearance:W,textColor:q,backgroundColor:z,ribbonWidth:P}=e,_=P??M,G=v==="curve",$=ry(g),L=ay(m),D=s.useMemo(()=>Jf(o,c,G),[o,c,G]),E=s.useMemo(()=>en({fontSettings:{fontFamily:x,fontWeight:b.fontWeight,fontStyle:b.fontStyle},letterSpacing:f,wordSpacing:S,fontSize:M,lineHeight:M,textAppearance:W,color:q},n),[x,b,f,S,M,W,q,n]),T=Oe=>F.scalingValue(Oe,n??!1),C=((t==null?void 0:t.length)??0)>0,V=n?!!i:!0,w=C&&(V||!!n),U=Math.max(0,d)*ey,I=V&&p==="on",[A,j]=s.useState(!1),ie=V?I&&A?"paused":"running":"paused",ae=ie==="running"&&U>0&&c>0,O=c>0&&U>0?c/U*1e3:0,re=s.useRef(null),N=s.useRef(null),le=s.useRef(null),J=s.useRef(null),be=s.useRef(null),Pe=s.useRef(null),ye=s.useRef(ae),ce=s.useRef(null),K=s.useRef(null),se=s.useRef($),pe=s.useRef(L);ye.current=ae,se.current=$,pe.current=L;const[fe,we]=s.useState(0),[Re,me]=s.useState(0),[xe,Ce]=s.useState(0),[h,Y]=s.useState(0),[Q,ne]=s.useState(0),ue=s.useMemo(()=>(t??[]).map(Oe=>{var Ae;return`${Oe.text}\0${((Ae=Oe.image)==null?void 0:Ae.url)??""}\0${Oe.link??""}`}).join("\0"),[t]),[B,R]=s.useState(ns),ee=s.useMemo(()=>{const Oe=t??[];return Oe.length===0||!(V||n)?Oe:ly(Oe,B)},[t,V,B,n]),te=w?wc:1;s.useLayoutEffect(()=>{R(ns),l(0)},[ue]),s.useLayoutEffect(()=>{var De;const Oe=Pe.current;if(!Oe)return;const Ae=()=>{const Ue=getComputedStyle(Oe),ct=parseFloat(Ue.fontSize)||0;if(ct<=0)return;const he=cy();if(!he){we(ct*ua),me(0);return}he.font=`${Ue.fontStyle} ${Ue.fontWeight} ${ct}px ${Ue.fontFamily}`;const Me=he.measureText("H"),nt=Me.actualBoundingBoxAscent>0?Me.actualBoundingBoxAscent:ct*ua,pt=Math.max(0,Me.actualBoundingBoxDescent||0),Ve=Me.fontBoundingBoxAscent||0,vt=Me.fontBoundingBoxDescent||0;we(At=>Math.abs(At-nt)>.5?nt:At);const It=Ve>0||vt>0?(vt-pt-(Ve-nt))/2:0;me(At=>Math.abs(At-It)>.25?It:At)};Ae();const mt=typeof document<"u"?document.fonts:void 0;(De=mt==null?void 0:mt.ready)==null||De.then(Ae).catch(()=>{});const Be=new ResizeObserver(Ae);return Be.observe(Oe),()=>Be.disconnect()},[E.fontFamily,E.fontWeight,E.fontStyle,E.fontSize,E.lineHeight]),s.useLayoutEffect(()=>{if(!w)return;const Oe=re.current,Ae=J.current;if(!Oe||!Ae)return;const mt={id:0},Be=()=>{const he=Oe.offsetWidth||Oe.getBoundingClientRect().width,Me=Ae.offsetWidth||Ae.getBoundingClientRect().width;if(C&&he>0&&Me>0){const nt=Me/B;if(nt>0){let pt=he,Ve=ty;if(G){const It=he*se.current,At=pe.current,wt=At>0?2*Math.PI*At/he:0,Vt=gy(It,wt);pt=Math.max(he,Vt*he/(wc-1)),Ve=ny}const vt=Math.min(Ve,Math.max(ns,Math.ceil(pt/nt)+1));if(vt!==B){R(vt);return}}}Me>0&&l(Me)},De=()=>{cancelAnimationFrame(mt.id),mt.id=requestAnimationFrame(Be)};De();const Ue=new ResizeObserver(De);Ue.observe(Oe),Ue.observe(Ae);const ct=()=>{document.hidden||De()};return document.addEventListener("visibilitychange",ct),window.addEventListener("pageshow",ct),window.addEventListener("focus",ct),()=>{cancelAnimationFrame(mt.id),Ue.disconnect(),document.removeEventListener("visibilitychange",ct),window.removeEventListener("pageshow",ct),window.removeEventListener("focus",ct)}},[w,ue,B,C,fe,G,$,L]),s.useLayoutEffect(()=>{const Oe=be.current;if(!Oe)return;const Ae={id:0},mt=()=>{const De=Oe.offsetHeight;De>0&&ne(Ue=>Math.abs(Ue-De)>.5?De:Ue)};Ae.id=requestAnimationFrame(mt);const Be=new ResizeObserver(()=>{cancelAnimationFrame(Ae.id),Ae.id=requestAnimationFrame(mt)});return Be.observe(Oe),()=>{cancelAnimationFrame(Ae.id),Be.disconnect()}},[_,n]),s.useLayoutEffect(()=>{if(!G){Ce(0),Y(0);return}const Oe=re.current,Ae=J.current;if(!Oe||!Ae)return;const mt={id:0},Be=()=>{const Ue=Oe.offsetWidth,ct=Ae.offsetHeight;Ue>0&&Y(he=>Math.abs(he-Ue)>.5?Ue:he),ct>0&&Ce(he=>Math.abs(he-ct)>.5?ct:he)};mt.id=requestAnimationFrame(Be);const De=new ResizeObserver(()=>{cancelAnimationFrame(mt.id),mt.id=requestAnimationFrame(Be)});return De.observe(Oe),De.observe(Ae),()=>{cancelAnimationFrame(mt.id),De.disconnect()}},[G,ue,fe,M,w]),s.useLayoutEffect(()=>{if(!w||c<=0)return;const Oe=le.current;Oe&&sy(Oe)},[w,c,u,U]),s.useLayoutEffect(()=>{if(!G||!C)return;const Oe=re.current;if(!Oe)return;const Ae={raf:0,cancelled:!1,lut:null,lutKey:"",itemsCache:[],cacheDirty:!0},mt=()=>{for(const nt of Ae.itemsCache)for(const pt of nt.glyphs)$c(pt.inner)},Be=()=>{const nt=N.current??Oe;Ae.itemsCache=Array.from(Oe.querySelectorAll("[data-marquee-text-item]"),pt=>{const Ve=[];return pt.querySelectorAll("[data-marquee-wave-node]").forEach(vt=>{const It=vt.firstElementChild;It&&Ve.push({inner:It,layoutLocalX:py(vt,nt)})}),{item:pt,glyphs:Ve}}),Ae.cacheDirty=!1},De=()=>{Ae.cacheDirty&&Be();const pt=(N.current??Oe).offsetWidth||1,Ve=pt*se.current,vt=pe.current,It=2*Math.PI*vt/pt,At=`${pt}|${Ve}|${It}`;if(At!==Ae.lutKey&&(Ae.lutKey=At,Ae.lut=qu(Ve,It,Uu)),Math.abs(Ve)<=0||It<=0){mt();return}const wt=le.current,Vt=wt?uy(getComputedStyle(wt).transform):0,jt=Oe.getBoundingClientRect(),Yt=jt.left,Kt=jt.right,Rt=Ae.lut&&Ae.lut.wavelength>0?Math.max(0,(Ae.lut.periodArc/Ae.lut.wavelength-1)*pt):0;for(const{item:zt,glyphs:on}of Ae.itemsCache){const xt=zt.getBoundingClientRect();if(xt.right<Yt||xt.left>Kt+Rt){for(const yt of on)$c(yt.inner);continue}for(const yt of on){const ke=yt.layoutLocalX+Vt,Je=Ae.lut?my(Ae.lut,ke):ke,rt=It*Je,dt=Ve*Math.sin(rt),Pt=Ve*It*Math.cos(rt),St=Math.atan(Pt)*(180/Math.PI);dy(yt.inner,Je-ke,dt,St)}}},Ue=()=>{Ae.cancelled||(Ae.raf=0,De(),ye.current&&!document.hidden&&(Ae.raf=requestAnimationFrame(Ue)))},ct=()=>{Ae.cancelled||Ae.raf||(Ae.raf=requestAnimationFrame(Ue))},he=()=>{Ae.cacheDirty=!0,De(),ct()};ce.current=ct,K.current=he,De(),ct();const Me=()=>{if(document.hidden){cancelAnimationFrame(Ae.raf),Ae.raf=0;return}cancelAnimationFrame(Ae.raf),Ae.raf=0,he()};return document.addEventListener("visibilitychange",Me),window.addEventListener("pageshow",Me),window.addEventListener("focus",Me),()=>{Ae.cancelled=!0,ce.current=null,K.current=null,cancelAnimationFrame(Ae.raf),document.removeEventListener("visibilitychange",Me),window.removeEventListener("pageshow",Me),window.removeEventListener("focus",Me),mt()}},[G,C]),s.useLayoutEffect(()=>{var Oe;!G||!C||(Oe=K.current)==null||Oe.call(K)},[G,C,r,ue,B,fe,$,L,h]),s.useLayoutEffect(()=>{var Oe;(Oe=ce.current)==null||Oe.call(ce)},[ae,u]);const ge=Oe=>{I&&Oe.pointerType==="mouse"&&j(!0)},X=()=>{I&&j(!1)},Ie=G?Math.abs($)*100:0,Se=T(_),Z={minHeight:Se,...G?{paddingTop:`${Ie}%`,paddingBottom:`${Ie}%`}:{}},He={height:Se,...G?{visibility:"hidden"}:{backgroundColor:z}},We={gap:T(y),minHeight:Se},ot=h*$,qe=Math.abs(ot),tt=Q>0?Q:xe,et=Math.max(xe,tt),Ge=qe+et/2,ve=Math.max(tt,1),_e=G&&h>0&&et>0?hy(h,ot,L,Ge,ve):"",ze=qe*2+et,Qe=_e?a.jsx("svg",{className:`${o}-curve-bg`,viewBox:`0 0 ${h} ${ze}`,preserveAspectRatio:"none","aria-hidden":!0,children:a.jsx("path",{d:_e,fill:"none",stroke:z,strokeWidth:tt,strokeLinecap:"butt",strokeLinejoin:"round"})}):null,$e=a.jsx("div",{ref:be,className:`${o}-ribbon`,style:He,"aria-hidden":!0}),Ne={...E,lineHeight:fe>0?`${fe}px`:`${ua}em`},Ye=(Oe,Ae,mt)=>a.jsx(fy,{item:Oe,prefix:o,textCss:Ne,capHeightPx:fe,opticalOffsetY:Re,imageGapPx:T(y),isCurve:G},`${Ae}-${mt}`),Ze=a.jsx("span",{ref:Pe,"aria-hidden":!0,className:`${o}-cap-ref`,style:E,children:"H"}),st=`${Math.max(0,O)/1e3}s`,it=w?a.jsx("div",{ref:le,className:`${o}-marquee-track`,"data-direction":u,onPointerEnter:ge,onPointerLeave:X,style:{WebkitAnimationDuration:st,animationDuration:st,WebkitAnimationPlayState:ie,animationPlayState:ie},children:Array.from({length:te},(Oe,Ae)=>a.jsx("div",{ref:Ae===0?J:void 0,className:`${o}-marquee-set`,style:{...We,paddingRight:T(y)},"aria-hidden":Ae>0,children:ee.map((mt,Be)=>Ye(mt,Ae,Be))},`set-${Ae}`))}):a.jsx("div",{ref:J,className:Ct(`${o}-marquee-set`,`${o}-marquee-static`),style:We,children:t==null?void 0:t.map((Oe,Ae)=>Ye(Oe,0,Ae))});return a.jsxs("div",{ref:re,className:`${o}-wrapper`,"aria-label":"Marquee text",children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:D}}),Ze,a.jsxs("div",{ref:N,className:`${o}-marquee-wrapper`,style:Z,children:[$e,Qe,it]})]})},vy=`import { useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type PointerEvent as ReactPointerEvent } from 'react';
2636
2636
  import cn from 'classnames';
2637
2637
  import { CommonComponentProps } from '../props';
2638
2638
  import { scalingValue } from '../utils/scalingValue';
@@ -3567,7 +3567,7 @@ type MarqueeTextProps = {
3567
3567
  isPreviewMode?: boolean;
3568
3568
  isEditMode?: boolean;
3569
3569
  } & CommonComponentProps;
3570
- `,xy={fontSettings:{type:"object",scope:"common",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},by={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:{...xy.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:{addItemFromFileExplorer:!1},items:{type:"object",properties:{text:{placeholder:"Add text...",label:"Text",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-input"}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}}},default:[{text:"NEW WORK",image:{url:"01M3QM74XF10Z2N5P1Y0J0XDQQ",name:""},link:""}]}},Sy={element:yy,id:"marquee-text",name:"Marquee Text",category:"typography",version:1,defaultSize:{d:{width:"100%"},t:{width:"100%"},m:{width:"100%"}},preview:{type:"image",url:"01M3QM74XG0WTJ97K104N36MNS"},schema:by,sourceCode:vy,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}};function wy(e,t){const n=t>0?`${t}px`:"0px";return`
3570
+ `,xy={fontSettings:{type:"object",scope:"common",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},by={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:{...xy.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:{addItemFromFileExplorer:!1},items:{type:"object",properties:{text:{placeholder:"Add text...",label:"Text",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-input"}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}}},default:[{text:"NEW WORK",image:{url:"01M3QM74XF10Z2N5P1Y0J0XDQQ",name:""},link:""}]}},Sy={element:yy,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:by,sourceCode:vy,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}};function wy(e,t){const n=t>0?`${t}px`:"0px";return`
3571
3571
  .${e}-marquee-wrapper {
3572
3572
  overflow: hidden;
3573
3573
  width: 100%;
@@ -3656,7 +3656,7 @@ type MarqueeTextProps = {
3656
3656
  pointer-events: auto;
3657
3657
  z-index: 10;
3658
3658
  }
3659
- `}const $y=30,Cc=2,Cy=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")},Ty=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=F.useScopedStyles(),{align:l,speed:c,direction:d,pauseOnHover:u,gap:p,cardWidth:y,corners:v,stroke:g,strokeColor:m,bgColor:x,padding:b,logoMarginTop:R,logoWidth:f,logoHeight:S,captionMarginTop:W}=e,q=!!o,z=((t==null?void 0:t.length)??0)>0,P=c>0&&(!n||i),_=z&&(P||n),G=Math.max(0,c)*$y,$=I=>F.scalingValue(I,n??!1),L=s.useRef(null),D=s.useRef(null),E=s.useRef(null),[T,C]=s.useState(0),[V,w]=s.useState(0),U=V>0?V:0,M=s.useMemo(()=>wy(r,U),[r,U]),[A,j]=s.useState(0),ie=P&&u==="on",[ae,O]=s.useState(!1),re=s.useRef(null),[N,le]=s.useState(0),[J,be]=s.useState(0),Pe=s.useRef(null),ye=I=>{var te,ge,X,Me,Se;return{fontSettings:{fontFamily:(e==null?void 0:e[`${I}FontFamily`])??"Arial",fontWeight:((te=e==null?void 0:e[`${I}FontSettings`])==null?void 0:te.fontWeight)??400,fontStyle:((ge=e==null?void 0:e[`${I}FontSettings`])==null?void 0:ge.fontStyle)??"normal"},textAppearance:{textTransform:((X=e==null?void 0:e[`${I}TextAppearance`])==null?void 0:X.textTransform)??"none",textDecoration:((Me=e==null?void 0:e[`${I}TextAppearance`])==null?void 0:Me.textDecoration)??"none",fontVariant:((Se=e==null?void 0:e[`${I}TextAppearance`])==null?void 0:Se.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${I}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${I}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${I}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${I}LineHeight`])??.01,color:(e==null?void 0:e[`${I}Color`])??"#000000"}},ce=ye("text"),K=ye("caption"),se=s.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(I=>{var ee,te;return(((ee=I.text)==null?void 0:ee.length)??0)>0||(((te=I.caption)==null?void 0:te.length)??0)>0}),[t]),pe=s.useMemo(()=>!_||(t==null?void 0:t.length)===0?1:V<=0||T<=0?Cc:Math.max(Cc,Math.ceil(T/V)+1),[_,t==null?void 0:t.length,V,T]);s.useLayoutEffect(()=>{if(!_)return;const I=L.current,ee=E.current;if(!I||!ee)return;let te=0;const ge=()=>{const Se=I.getBoundingClientRect().width,Z=ee.getBoundingClientRect().width,He=Pe.current,We=typeof He=="number"&&Math.abs(He-Z)<=.25;if(Pe.current=Z,C(Se),typeof Z=="number"&&Z>0&&V<=0){w(Z);return}We&&Z!==V?w(Z):!We&&V<=0&&(cancelAnimationFrame(te),te=requestAnimationFrame(ge))},X=()=>{cancelAnimationFrame(te),te=requestAnimationFrame(ge)};X();const Me=new ResizeObserver(X);return Me.observe(I),Me.observe(ee),()=>{cancelAnimationFrame(te),Me.disconnect()}},[P,_,V]);const fe=U>0&&G>0?U/G*1e3:0,we=`${Math.max(0,fe)/1e3}s`;s.useLayoutEffect(()=>{if(!_||U<=0)return;const I=D.current;I&&Cy(I)},[_,U,d]),s.useLayoutEffect(()=>{if(!_){j(0);return}const I=E.current,ee=D.current;if(!I||!ee)return;const te=()=>{let X=0;for(let Me=0;Me<I.children.length;Me++){const Z=I.children[Me].firstElementChild;Z&&(X=Math.max(X,Z.offsetHeight))}X<=0&&(X=ee.offsetHeight),j(X>0?X:0)};te();const ge=new ResizeObserver(te);return ge.observe(I),ge.observe(ee),()=>{ge.disconnect()}},[_,pe,t,n,p,y,b,g,v,f,S,N,J]);const Ie=()=>{ie&&O(!0)},me=()=>{ie&&O(!1)},xe=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]),h=s.useCallback((I,ee,te,ge)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:xe,width:"100%"},children:[a.jsx("div",{"data-controls":q?ge==null?void 0:ge.controlsName:void 0,"data-controls-axis":q?"y":void 0,className:q?`${r}-control`:void 0,style:{height:$((ge==null?void 0:ge.marginTop)??0)}}),a.jsx("div",{...ge!=null&&ge.dataMeasureKind?{"data-testimonial-measure":ge.dataMeasureKind}:{},style:{...en(I,n),textAlign:Ce,pointerEvents:"auto",...typeof(ge==null?void 0:ge.minHeightPx)=="number"&&ge.minHeightPx>0?{minHeight:ge.minHeightPx}:{}},children:a.jsx(Yi,{content:ee})})]},te),[xe,Ce,n,q,r,$]),Y=s.useCallback((I,ee,te)=>{var ge,X,Me;return a.jsxs("div",{style:{padding:`${$(b.top)} ${$(b.right)} ${$(b.bottom)} ${$(b.left)}`,width:$(y+g*2),height:"100%",borderRadius:$(v),border:`${$(g)} solid ${m}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${r}-cover`,style:{background:x}}),a.jsxs("div",{className:`${r}-elements-overlay`,style:{alignItems:xe,textAlign:Ce},children:[I.text&&h(ce,I.text,"text",te!=null&&te.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(te==null?void 0:te.textMinHeightPx)=="number"&&te.textMinHeightPx>0?{minHeightPx:te.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:xe,width:"100%"},children:[a.jsx("div",{"data-controls":q&&!(te!=null&&te.dataMeasureAttrs)?"logoMarginTop":void 0,className:q&&!(te!=null&&te.dataMeasureAttrs)?`${r}-control`:void 0,style:{height:$(R)}}),a.jsx("div",{style:{width:$(f),height:$(S)},children:((ge=I.logo)==null?void 0:ge.url)&&a.jsx("img",{src:I.logo.url,alt:((X=I.logo)==null?void 0:X.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Me=I.logo)==null?void 0:Me.objectFit)||"contain"}})})]}),I.caption&&h(K,I.caption,"caption",{...te!=null&&te.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:W,...te!=null&&te.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(te==null?void 0:te.captionMinHeightPx)=="number"&&te.captionMinHeightPx>0?{minHeightPx:te.captionMinHeightPx}:{}})]})]},ee)},[x,W,K,y,v,S,R,f,xe,Ce,b.bottom,b.left,b.right,b.top,h,g,m,ce,n,q,r]),Q=s.useCallback(I=>{le(I.maxTextPx),be(I.maxCaptionPx)},[]);s.useLayoutEffect(()=>{if(!se){Q({maxTextPx:0,maxCaptionPx:0});return}const I=re.current;if(!I)return;const ee=()=>{F.readTestimonialTextMeasure(I,Q)};ee();const te=new ResizeObserver(ee);return te.observe(I),()=>{te.disconnect()}},[se,Q,t,Y]);const ne=se?{textMinHeightPx:N,captionMinHeightPx:J}:void 0,ue=se?a.jsx("div",{ref:re,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((I,ee)=>Y(I,`measure-${ee}`,{dataMeasureAttrs:!0}))}):null,B=(I,ee)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Y(I,`card-${ee}`,ne),q&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${$(p)})`,width:$(p),height:"100%",pointerEvents:"auto",zIndex:2}})]},ee);if(_){const I=P?ie&&ae?"paused":"running":"paused";return a.jsxs("div",{ref:L,className:Ct(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...A>0?{height:A}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:M}}),ue,a.jsx("div",{ref:D,className:`${r}-marquee-track`,"data-direction":d,onMouseEnter:Ie,onMouseLeave:me,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px",animationDuration:we,WebkitAnimationDuration:we,animationPlayState:I,WebkitAnimationPlayState:I},children:Array.from({length:pe},(ee,te)=>a.jsx("div",{ref:te===0?E:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:$(p),paddingRight:$(p)},"aria-hidden":te>0,children:t==null?void 0:t.map((ge,X)=>B(ge,`${te}-${X}`))},`set-${te}`))})]})}return a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:M}}),ue,a.jsx("div",{style:{gap:$(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((I,ee)=>B(I,ee))})]})},Ly=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
3659
+ `}const $y=30,Cc=2,Cy=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")},Ty=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=F.useScopedStyles(),{align:l,speed:c,direction:d,pauseOnHover:u,gap:p,cardWidth:y,corners:v,stroke:g,strokeColor:m,bgColor:x,padding:b,logoMarginTop:M,logoWidth:f,logoHeight:S,captionMarginTop:W}=e,q=!!o,z=((t==null?void 0:t.length)??0)>0,P=c>0&&(!n||i),_=z&&(P||n),G=Math.max(0,c)*$y,$=R=>F.scalingValue(R,n??!1),L=s.useRef(null),D=s.useRef(null),E=s.useRef(null),[T,C]=s.useState(0),[V,w]=s.useState(0),U=V>0?V:0,I=s.useMemo(()=>wy(r,U),[r,U]),[A,j]=s.useState(0),ie=P&&u==="on",[ae,O]=s.useState(!1),re=s.useRef(null),[N,le]=s.useState(0),[J,be]=s.useState(0),Pe=s.useRef(null),ye=R=>{var te,ge,X,Ie,Se;return{fontSettings:{fontFamily:(e==null?void 0:e[`${R}FontFamily`])??"Arial",fontWeight:((te=e==null?void 0:e[`${R}FontSettings`])==null?void 0:te.fontWeight)??400,fontStyle:((ge=e==null?void 0:e[`${R}FontSettings`])==null?void 0:ge.fontStyle)??"normal"},textAppearance:{textTransform:((X=e==null?void 0:e[`${R}TextAppearance`])==null?void 0:X.textTransform)??"none",textDecoration:((Ie=e==null?void 0:e[`${R}TextAppearance`])==null?void 0:Ie.textDecoration)??"none",fontVariant:((Se=e==null?void 0:e[`${R}TextAppearance`])==null?void 0:Se.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${R}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${R}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${R}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${R}LineHeight`])??.01,color:(e==null?void 0:e[`${R}Color`])??"#000000"}},ce=ye("text"),K=ye("caption"),se=s.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(R=>{var ee,te;return(((ee=R.text)==null?void 0:ee.length)??0)>0||(((te=R.caption)==null?void 0:te.length)??0)>0}),[t]),pe=s.useMemo(()=>!_||(t==null?void 0:t.length)===0?1:V<=0||T<=0?Cc:Math.max(Cc,Math.ceil(T/V)+1),[_,t==null?void 0:t.length,V,T]);s.useLayoutEffect(()=>{if(!_)return;const R=L.current,ee=E.current;if(!R||!ee)return;let te=0;const ge=()=>{const Se=R.getBoundingClientRect().width,Z=ee.getBoundingClientRect().width,He=Pe.current,We=typeof He=="number"&&Math.abs(He-Z)<=.25;if(Pe.current=Z,C(Se),typeof Z=="number"&&Z>0&&V<=0){w(Z);return}We&&Z!==V?w(Z):!We&&V<=0&&(cancelAnimationFrame(te),te=requestAnimationFrame(ge))},X=()=>{cancelAnimationFrame(te),te=requestAnimationFrame(ge)};X();const Ie=new ResizeObserver(X);return Ie.observe(R),Ie.observe(ee),()=>{cancelAnimationFrame(te),Ie.disconnect()}},[P,_,V]);const fe=U>0&&G>0?U/G*1e3:0,we=`${Math.max(0,fe)/1e3}s`;s.useLayoutEffect(()=>{if(!_||U<=0)return;const R=D.current;R&&Cy(R)},[_,U,d]),s.useLayoutEffect(()=>{if(!_){j(0);return}const R=E.current,ee=D.current;if(!R||!ee)return;const te=()=>{let X=0;for(let Ie=0;Ie<R.children.length;Ie++){const Z=R.children[Ie].firstElementChild;Z&&(X=Math.max(X,Z.offsetHeight))}X<=0&&(X=ee.offsetHeight),j(X>0?X:0)};te();const ge=new ResizeObserver(te);return ge.observe(R),ge.observe(ee),()=>{ge.disconnect()}},[_,pe,t,n,p,y,b,g,v,f,S,N,J]);const Re=()=>{ie&&O(!0)},me=()=>{ie&&O(!1)},xe=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]),h=s.useCallback((R,ee,te,ge)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:xe,width:"100%"},children:[a.jsx("div",{"data-controls":q?ge==null?void 0:ge.controlsName:void 0,"data-controls-axis":q?"y":void 0,className:q?`${r}-control`:void 0,style:{height:$((ge==null?void 0:ge.marginTop)??0)}}),a.jsx("div",{...ge!=null&&ge.dataMeasureKind?{"data-testimonial-measure":ge.dataMeasureKind}:{},style:{...en(R,n),textAlign:Ce,pointerEvents:"auto",...typeof(ge==null?void 0:ge.minHeightPx)=="number"&&ge.minHeightPx>0?{minHeight:ge.minHeightPx}:{}},children:a.jsx(Yi,{content:ee})})]},te),[xe,Ce,n,q,r,$]),Y=s.useCallback((R,ee,te)=>{var ge,X,Ie;return a.jsxs("div",{style:{padding:`${$(b.top)} ${$(b.right)} ${$(b.bottom)} ${$(b.left)}`,width:$(y+g*2),height:"100%",borderRadius:$(v),border:`${$(g)} solid ${m}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${r}-cover`,style:{background:x}}),a.jsxs("div",{className:`${r}-elements-overlay`,style:{alignItems:xe,textAlign:Ce},children:[R.text&&h(ce,R.text,"text",te!=null&&te.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(te==null?void 0:te.textMinHeightPx)=="number"&&te.textMinHeightPx>0?{minHeightPx:te.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:xe,width:"100%"},children:[a.jsx("div",{"data-controls":q&&!(te!=null&&te.dataMeasureAttrs)?"logoMarginTop":void 0,className:q&&!(te!=null&&te.dataMeasureAttrs)?`${r}-control`:void 0,style:{height:$(M)}}),a.jsx("div",{style:{width:$(f),height:$(S)},children:((ge=R.logo)==null?void 0:ge.url)&&a.jsx("img",{src:R.logo.url,alt:((X=R.logo)==null?void 0:X.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Ie=R.logo)==null?void 0:Ie.objectFit)||"contain"}})})]}),R.caption&&h(K,R.caption,"caption",{...te!=null&&te.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:W,...te!=null&&te.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(te==null?void 0:te.captionMinHeightPx)=="number"&&te.captionMinHeightPx>0?{minHeightPx:te.captionMinHeightPx}:{}})]})]},ee)},[x,W,K,y,v,S,M,f,xe,Ce,b.bottom,b.left,b.right,b.top,h,g,m,ce,n,q,r]),Q=s.useCallback(R=>{le(R.maxTextPx),be(R.maxCaptionPx)},[]);s.useLayoutEffect(()=>{if(!se){Q({maxTextPx:0,maxCaptionPx:0});return}const R=re.current;if(!R)return;const ee=()=>{F.readTestimonialTextMeasure(R,Q)};ee();const te=new ResizeObserver(ee);return te.observe(R),()=>{te.disconnect()}},[se,Q,t,Y]);const ne=se?{textMinHeightPx:N,captionMinHeightPx:J}:void 0,ue=se?a.jsx("div",{ref:re,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((R,ee)=>Y(R,`measure-${ee}`,{dataMeasureAttrs:!0}))}):null,B=(R,ee)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Y(R,`card-${ee}`,ne),q&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${$(p)})`,width:$(p),height:"100%",pointerEvents:"auto",zIndex:2}})]},ee);if(_){const R=P?ie&&ae?"paused":"running":"paused";return a.jsxs("div",{ref:L,className:Ct(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...A>0?{height:A}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:I}}),ue,a.jsx("div",{ref:D,className:`${r}-marquee-track`,"data-direction":d,onMouseEnter:Re,onMouseLeave:me,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px",animationDuration:we,WebkitAnimationDuration:we,animationPlayState:R,WebkitAnimationPlayState:R},children:Array.from({length:pe},(ee,te)=>a.jsx("div",{ref:te===0?E:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:$(p),paddingRight:$(p)},"aria-hidden":te>0,children:t==null?void 0:t.map((ge,X)=>B(ge,`${te}-${X}`))},`set-${te}`))})]})}return a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:I}}),ue,a.jsx("div",{style:{gap:$(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((R,ee)=>B(R,ee))})]})},Ly=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
3660
3660
  import cn from 'classnames';
3661
3661
  import { CommonComponentProps } from '../props';
3662
3662
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -4287,7 +4287,7 @@ type TestimonialsSettings = {
4287
4287
  logoHeight: number;
4288
4288
  captionMarginTop: number;
4289
4289
  };
4290
- `,Tc={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Py={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",url:"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",url:"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",url:"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"}]}]}]}},My={element:Ty,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"01M3QM74XGQM3BE2A9MHTSEC02"},defaultSize:{d:{width:"100%",height:320}},schema:Py,sourceCode:Ly,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function Iy(e){return`
4290
+ `,Tc={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Py={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",url:"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",url:"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",url:"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"}]}]}]}},Iy={element:Ty,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:Py,sourceCode:Ly,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function Ry(e){return`
4291
4291
  .${e}-container {
4292
4292
  position: relative;
4293
4293
  overflow-x: clip;
@@ -4411,7 +4411,7 @@ type TestimonialsSettings = {
4411
4411
  width: 100%;
4412
4412
  height: 100%;
4413
4413
  }
4414
- `}const Ry=3e3,Ey=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=F.useScopedStyles(),l=t||[],{speed:c,align:d,width:u,imageMarginTop:p,textMarginTop:y,captionMarginTop:v,imageWidth:g,imageHeight:m,controlsWidth:x,controlsColor:b,controlsHoverColor:R}=e,f=c>0&&(!n||!!i),[S,W]=s.useState(0),[q,z]=s.useState(null),[P,_]=s.useState(!1),G=s.useRef(null),$=s.useMemo(()=>{switch(d){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[d]),L=s.useMemo(()=>{switch(d){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[d]);s.useEffect(()=>{W(0),z(null),_(!1)},[l.length]);const D=l[S],E=q===null?null:l[q],T=ye=>{var K,se,pe,fe,we;return{fontSettings:{fontFamily:(e==null?void 0:e[`${ye}FontFamily`])??"Arial",fontWeight:((K=e==null?void 0:e[`${ye}FontSettings`])==null?void 0:K.fontWeight)??400,fontStyle:((se=e==null?void 0:e[`${ye}FontSettings`])==null?void 0:se.fontStyle)??"normal"},textAppearance:{textTransform:((pe=e==null?void 0:e[`${ye}TextAppearance`])==null?void 0:pe.textTransform)??"none",textDecoration:((fe=e==null?void 0:e[`${ye}TextAppearance`])==null?void 0:fe.textDecoration)??"none",fontVariant:((we=e==null?void 0:e[`${ye}TextAppearance`])==null?void 0:we.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${ye}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${ye}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${ye}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${ye}WordSpacing`])??0,color:(e==null?void 0:e[`${ye}Color`])??"#000000"}},C=T("text"),V=T("caption"),w=l.length>1&&l.some(ye=>{var ce,K;return(((ce=ye.text)==null?void 0:ce.length)??0)>0||(((K=ye.caption)==null?void 0:K.length)??0)>0}),U=s.useRef(null),[M,A]=s.useState(0),[j,ie]=s.useState(0),ae=e.controls??{mode:"Off",icon:null},O=l.length>1,re=s.useCallback((ye,ce)=>!O||ce===ye?ye:(G.current&&window.clearTimeout(G.current),z(ye),_(!0),G.current=window.setTimeout(()=>{z(null),_(!1),G.current=null},300),ce),[O]),N=s.useCallback(()=>{O&&W(ye=>re(ye,(ye-1+l.length)%l.length))},[O,re,l.length]),le=s.useCallback(()=>{O&&W(ye=>re(ye,(ye+1)%l.length))},[O,re,l.length]);s.useEffect(()=>{if(!f||!O)return;const ye=Math.max(300,Ry/c),ce=window.setInterval(()=>{W(K=>re(K,(K+1)%l.length))},ye);return()=>{window.clearInterval(ce)}},[f,O,re,l.length,c]),s.useEffect(()=>()=>{G.current&&window.clearTimeout(G.current)},[]);const J=(ye,ce)=>{var we,Ie,me,xe;const K=ce==null?void 0:ce.textMinHeightPx,se=ce==null?void 0:ce.captionMinHeightPx,pe=ce==null?void 0:ce.dataMeasureAttrs,fe=o&&!(ce!=null&&ce.dataMeasureAttrs)&&!(ce!=null&&ce.hideControls);return a.jsxs(a.Fragment,{children:[ye.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":fe?"textMarginTop":void 0,className:fe?`${r}-control`:void 0,style:{height:F.scalingValue(y??0,n??!1)}}),a.jsx("div",{...pe&&{"data-testimonial-measure":"text"},style:{...en(C,n),...K&&K>0?{minHeight:K}:{},textAlign:L,pointerEvents:"auto"},children:a.jsx(Yi,{content:ye.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":fe?"imageMarginTop":void 0,className:fe?`${r}-control`:void 0,style:{height:F.scalingValue(p??0,n??!1)}}),a.jsx("div",{style:{width:F.scalingValue(g??0,n??!1),height:F.scalingValue(m??0,n??!1)},children:((we=ye.image)==null?void 0:we.url)&&a.jsx("img",{src:(Ie=ye.image)==null?void 0:Ie.url,alt:((me=ye.image)==null?void 0:me.name)??"",className:`${r}-icon`,style:{objectFit:((xe=ye.image)==null?void 0:xe.objectFit)||"contain"}})})]}),ye.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":fe?"captionMarginTop":void 0,className:fe?`${r}-control`:void 0,style:{height:F.scalingValue(v??0,n??!1)}}),a.jsx("div",{...pe?{"data-testimonial-measure":"caption"}:{},style:{...en(V,n),...se&&se>0?{minHeight:se}:{},textAlign:L,pointerEvents:"auto"},children:a.jsx(Yi,{content:ye.caption})})]})]})},be=s.useCallback(ye=>{A(ye.maxTextPx),ie(ye.maxCaptionPx)},[]);if(s.useLayoutEffect(()=>{if(!w){be({maxTextPx:0,maxCaptionPx:0});return}const ye=U.current;if(!ye)return;const ce=()=>{F.readTestimonialTextMeasure(ye,be)};ce();const K=new ResizeObserver(ce);return K.observe(ye),()=>{K.disconnect()}},[w,be,t]),!D)return a.jsx(a.Fragment,{});const Pe=w?{textMinHeightPx:M,captionMinHeightPx:j}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${r}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Iy(r)}}),a.jsxs("div",{className:`${r}-wrapper`,style:{width:F.scalingValue(u??0,n??!1),alignItems:$},children:[w&&a.jsx("div",{ref:U,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((ye,ce)=>a.jsx("div",{style:{width:"100%"},children:J(ye,{dataMeasureAttrs:!0})},ce))}),a.jsxs("div",{className:`${r}-fade-stack`,children:[E&&P&&a.jsx("div",{className:Ct(`${r}-fade-item-prev`,`${r}-fade-out`),children:J(E,{...Pe,hideControls:!0})}),a.jsx("div",{className:Ct(`${r}-fade-item-current`,P?`${r}-fade-in`:void 0),children:J(D,Pe)})]})]}),ae.mode==="On"&&a.jsxs("div",{className:`${r}-controls`,children:[a.jsx("div",{className:`${r}-arrow`,style:{width:F.scalingValue(x??.02,n??!1),height:F.scalingValue(x??.02,n??!1),"--arrow-hover-color":R},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:N,disabled:!O,"aria-label":"Previous testimonial",children:ae.icon&&a.jsx(gn,{url:ae.icon,fill:b,hoverFill:R,className:Ct(`${r}-arrow-img`,`${r}-mirror`)})})}),a.jsx("div",{className:Ct(`${r}-arrow`,`${r}-next-arrow`),style:{width:F.scalingValue(x??.02,n??!1),height:F.scalingValue(x??.02,n??!1),"--arrow-hover-color":R},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:le,disabled:!O,"aria-label":"Next testimonial",children:ae.icon&&a.jsx(gn,{url:ae.icon,fill:b,hoverFill:R,className:`${r}-arrow-img`})})})]})]})})},ky=`import cn from 'classnames';
4414
+ `}const My=3e3,Ey=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=F.useScopedStyles(),l=t||[],{speed:c,align:d,width:u,imageMarginTop:p,textMarginTop:y,captionMarginTop:v,imageWidth:g,imageHeight:m,controlsWidth:x,controlsColor:b,controlsHoverColor:M}=e,f=c>0&&(!n||!!i),[S,W]=s.useState(0),[q,z]=s.useState(null),[P,_]=s.useState(!1),G=s.useRef(null),$=s.useMemo(()=>{switch(d){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[d]),L=s.useMemo(()=>{switch(d){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[d]);s.useEffect(()=>{W(0),z(null),_(!1)},[l.length]);const D=l[S],E=q===null?null:l[q],T=ye=>{var K,se,pe,fe,we;return{fontSettings:{fontFamily:(e==null?void 0:e[`${ye}FontFamily`])??"Arial",fontWeight:((K=e==null?void 0:e[`${ye}FontSettings`])==null?void 0:K.fontWeight)??400,fontStyle:((se=e==null?void 0:e[`${ye}FontSettings`])==null?void 0:se.fontStyle)??"normal"},textAppearance:{textTransform:((pe=e==null?void 0:e[`${ye}TextAppearance`])==null?void 0:pe.textTransform)??"none",textDecoration:((fe=e==null?void 0:e[`${ye}TextAppearance`])==null?void 0:fe.textDecoration)??"none",fontVariant:((we=e==null?void 0:e[`${ye}TextAppearance`])==null?void 0:we.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${ye}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${ye}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${ye}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${ye}WordSpacing`])??0,color:(e==null?void 0:e[`${ye}Color`])??"#000000"}},C=T("text"),V=T("caption"),w=l.length>1&&l.some(ye=>{var ce,K;return(((ce=ye.text)==null?void 0:ce.length)??0)>0||(((K=ye.caption)==null?void 0:K.length)??0)>0}),U=s.useRef(null),[I,A]=s.useState(0),[j,ie]=s.useState(0),ae=e.controls??{mode:"Off",icon:null},O=l.length>1,re=s.useCallback((ye,ce)=>!O||ce===ye?ye:(G.current&&window.clearTimeout(G.current),z(ye),_(!0),G.current=window.setTimeout(()=>{z(null),_(!1),G.current=null},300),ce),[O]),N=s.useCallback(()=>{O&&W(ye=>re(ye,(ye-1+l.length)%l.length))},[O,re,l.length]),le=s.useCallback(()=>{O&&W(ye=>re(ye,(ye+1)%l.length))},[O,re,l.length]);s.useEffect(()=>{if(!f||!O)return;const ye=Math.max(300,My/c),ce=window.setInterval(()=>{W(K=>re(K,(K+1)%l.length))},ye);return()=>{window.clearInterval(ce)}},[f,O,re,l.length,c]),s.useEffect(()=>()=>{G.current&&window.clearTimeout(G.current)},[]);const J=(ye,ce)=>{var we,Re,me,xe;const K=ce==null?void 0:ce.textMinHeightPx,se=ce==null?void 0:ce.captionMinHeightPx,pe=ce==null?void 0:ce.dataMeasureAttrs,fe=o&&!(ce!=null&&ce.dataMeasureAttrs)&&!(ce!=null&&ce.hideControls);return a.jsxs(a.Fragment,{children:[ye.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":fe?"textMarginTop":void 0,className:fe?`${r}-control`:void 0,style:{height:F.scalingValue(y??0,n??!1)}}),a.jsx("div",{...pe&&{"data-testimonial-measure":"text"},style:{...en(C,n),...K&&K>0?{minHeight:K}:{},textAlign:L,pointerEvents:"auto"},children:a.jsx(Yi,{content:ye.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":fe?"imageMarginTop":void 0,className:fe?`${r}-control`:void 0,style:{height:F.scalingValue(p??0,n??!1)}}),a.jsx("div",{style:{width:F.scalingValue(g??0,n??!1),height:F.scalingValue(m??0,n??!1)},children:((we=ye.image)==null?void 0:we.url)&&a.jsx("img",{src:(Re=ye.image)==null?void 0:Re.url,alt:((me=ye.image)==null?void 0:me.name)??"",className:`${r}-icon`,style:{objectFit:((xe=ye.image)==null?void 0:xe.objectFit)||"contain"}})})]}),ye.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":fe?"captionMarginTop":void 0,className:fe?`${r}-control`:void 0,style:{height:F.scalingValue(v??0,n??!1)}}),a.jsx("div",{...pe?{"data-testimonial-measure":"caption"}:{},style:{...en(V,n),...se&&se>0?{minHeight:se}:{},textAlign:L,pointerEvents:"auto"},children:a.jsx(Yi,{content:ye.caption})})]})]})},be=s.useCallback(ye=>{A(ye.maxTextPx),ie(ye.maxCaptionPx)},[]);if(s.useLayoutEffect(()=>{if(!w){be({maxTextPx:0,maxCaptionPx:0});return}const ye=U.current;if(!ye)return;const ce=()=>{F.readTestimonialTextMeasure(ye,be)};ce();const K=new ResizeObserver(ce);return K.observe(ye),()=>{K.disconnect()}},[w,be,t]),!D)return a.jsx(a.Fragment,{});const Pe=w?{textMinHeightPx:I,captionMinHeightPx:j}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${r}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Ry(r)}}),a.jsxs("div",{className:`${r}-wrapper`,style:{width:F.scalingValue(u??0,n??!1),alignItems:$},children:[w&&a.jsx("div",{ref:U,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((ye,ce)=>a.jsx("div",{style:{width:"100%"},children:J(ye,{dataMeasureAttrs:!0})},ce))}),a.jsxs("div",{className:`${r}-fade-stack`,children:[E&&P&&a.jsx("div",{className:Ct(`${r}-fade-item-prev`,`${r}-fade-out`),children:J(E,{...Pe,hideControls:!0})}),a.jsx("div",{className:Ct(`${r}-fade-item-current`,P?`${r}-fade-in`:void 0),children:J(D,Pe)})]})]}),ae.mode==="On"&&a.jsxs("div",{className:`${r}-controls`,children:[a.jsx("div",{className:`${r}-arrow`,style:{width:F.scalingValue(x??.02,n??!1),height:F.scalingValue(x??.02,n??!1),"--arrow-hover-color":M},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:N,disabled:!O,"aria-label":"Previous testimonial",children:ae.icon&&a.jsx(gn,{url:ae.icon,fill:b,hoverFill:M,className:Ct(`${r}-arrow-img`,`${r}-mirror`)})})}),a.jsx("div",{className:Ct(`${r}-arrow`,`${r}-next-arrow`),style:{width:F.scalingValue(x??.02,n??!1),height:F.scalingValue(x??.02,n??!1),"--arrow-hover-color":M},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:le,disabled:!O,"aria-label":"Next testimonial",children:ae.icon&&a.jsx(gn,{url:ae.icon,fill:b,hoverFill:M,className:`${r}-arrow-img`})})})]})]})})},ky=`import cn from 'classnames';
4415
4415
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
4416
4416
  import { CommonComponentProps } from '../props';
4417
4417
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -4907,7 +4907,7 @@ type TestimonialsSettings = {
4907
4907
  icon?: string | null;
4908
4908
  };
4909
4909
  };
4910
- `,Ay="01M46GNEM3GEJ4HQSNJYYTA45T",Lc={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},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:Ay},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{speed:1,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},t:{speed:1,width:.65,imageMarginTop:.026,captionMarginTop:.01,textMarginTop:0,textFontSize:.035,captionFontSize:.023,textLineHeight:.04,captionLineHeight:.029,imageWidth:.05,imageHeight:.05,controlsWidth:.026},d:{speed:1,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},layout:["__componentName__","speed","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","speed"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"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",url:"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",url:"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:Ey,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"01M3QM74XG6GKXCQ6S7HSC99TF"},defaultSize:{d:{width:700},t:{width:700},m:{width:334}},schema:Fy,sourceCode:ky,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function _y(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Pc(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`]:F.scalingValue((o-t)/2,i)}}function Hy(e){return`
4910
+ `,Ay="01M46GNEM3GEJ4HQSNJYYTA45T",Lc={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},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:Ay},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{speed:1,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},t:{speed:1,width:.65,imageMarginTop:.026,captionMarginTop:.01,textMarginTop:0,textFontSize:.035,captionFontSize:.023,textLineHeight:.04,captionLineHeight:.029,imageWidth:.05,imageHeight:.05,controlsWidth:.026},d:{speed:1,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},layout:["__componentName__","speed","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","speed"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"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",url:"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",url:"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:Ey,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:Fy,sourceCode:ky,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function _y(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Pc(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`]:F.scalingValue((o-t)/2,i)}}function Hy(e){return`
4911
4911
  .${e}-wrapper {
4912
4912
  display: grid;
4913
4913
  align-items: start;
@@ -5254,7 +5254,7 @@ type TestimonialsSettings = {
5254
5254
  z-index: 2;
5255
5255
  width: 100%;
5256
5256
  }
5257
- `}function Wy(){return Math.random()<.5?"ltr":"ttb"}function Oy(e){const t=e.Components.Autoplay;t&&(t.pause(!1),t.play())}function Dy(e){const t=Wy();e.options.direction!==t&&(e.options={...e.options,direction:t}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Oy(e)})})}const An=500,By=750,pi="cubic-bezier(0.22, 1, 0.36, 1)",zy=72,jy=50;function Vy(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 Gy(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Xy(e){const[t]=e.media;return t!=null&&t.url?t:null}function Yu(e){return!Array.isArray(e)||e.length===0?[]:Vy(e)?e.flatMap(t=>{const n=Gy(t);if(!n)return[];const i=Xy(t);return[{displayMedia:n,lightboxMedia:i!=null&&i.url?i:null}]}):e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Xi(e){return e.type==="video"}function Uy(e){const t=new Set,n=[];for(const i of e){const o=Yu(i.gallery);for(const r of o){const l=r.lightboxMedia;l!=null&&l.url&&!t.has(l.url)&&(t.add(l.url),n.push(l))}}return n}function qy({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Xi(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function Yy(e){e.pause(),e.removeAttribute("src"),e.load()}function Mc({media:e,className:t,style:n,onMediaClick:i}){return Xi(e)?a.jsx("video",{src:e.url,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):a.jsx("img",{src:e.url,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function Ic(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Ky(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 Qy({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l}){return s.useEffect(()=>{const c=n.current;if(c)return()=>{Yy(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})}function Zy({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:c,counterClassName:d,counterStyle:u}){const p=i==="cover",y=s.useRef(null),v=s.useRef(null),g=s.useRef(null),m=s.useRef(null),x=s.useRef(0),b=s.useRef(0),R=s.useRef("none"),f=s.useRef(!1),S=s.useRef(!1),W=s.useRef(null),q=s.useRef(0),z=s.useRef(null),P=s.useRef(!1),_=s.useRef(null),G=s.useRef(null),$=s.useRef(null),L=s.useRef(()=>{}),[D,E]=s.useState(null),[T,C]=s.useState(null),[V,w]=s.useState("opening"),[U,M]=s.useState(0),[A,j]=s.useState(0),[ie,ae]=s.useState(null),[O,re]=s.useState(!1),[N,le]=s.useState(!1),[J,be]=s.useState(!1),[Pe,ye]=s.useState(null),ce=s.useRef(n),K=s.useRef(void 0),se=t[n],pe=se?Xi(se):!1,fe=A!==0||O,we=ie!==null,Ie=s.useCallback($e=>{const Ne=$e.currentTarget,Ye=Ne instanceof HTMLVideoElement?{width:Ne.videoWidth,height:Ne.videoHeight}:{width:Ne.naturalWidth,height:Ne.naturalHeight};!Ye.width||!Ye.height||ye(Ye)},[]);s.useEffect(()=>{W.current=T},[T]),s.useEffect(()=>{const $e=y.current;if(!$e)return;const Ne=()=>C(Ic($e));Ne();const Ye=new ResizeObserver(Ne);return Ye.observe($e),()=>Ye.disconnect()},[]);const me=s.useCallback(()=>{_.current!==null&&(window.clearTimeout(_.current),_.current=null)},[]),xe=s.useCallback(()=>{const $e=G.current;G.current=null,me(),z.current=null,P.current=!1,ae(null),re(!1),j(0),q.current=0,le(!1),f.current=!1,b.current=0,R.current="none",$e===1?c():$e===-1&&l()},[me,c,l]),Ce=s.useCallback(()=>{me(),G.current=null,z.current=null,P.current=!1,ae(null),re(!1),j(0),q.current=0},[me]),h=s.useCallback(()=>{me(),_.current=window.setTimeout(()=>{G.current!==null&&xe()},An+32)},[me,xe]),Y=s.useCallback(($e,Ne)=>{var Ze;const Ye=((Ze=W.current)==null?void 0:Ze.width)??0;if(me(),z.current=$e,ae($e),P.current=!0,re(!0),Ne){G.current=$e;const st=-$e*Ye;q.current=st,j(st),h();return}q.current=0,j(0),_.current=window.setTimeout(()=>{_.current=null,Ce()},An+32)},[me,Ce,h]),Q=s.useCallback($e=>{if(!(t.length<=1)){if(P.current){if(G.current===$e){$.current=$e,xe();return}Ce()}me(),z.current=$e,ae($e),P.current=!1,re(!1),q.current=0,j(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Y($e,!0)})})}},[t.length,Y,xe,Ce,me]);L.current=Q;const ne=s.useCallback($e=>{$e.propertyName!=="transform"||!P.current||G.current!==null&&xe()},[xe]),ue=s.useCallback(()=>{const $e=v.current;if(!$e)return;const Ne=Ic($e);!Ne.width||!Ne.height||E(Ne)},[]);s.useEffect(()=>{ue();const $e=v.current;if(!$e)return;const Ne=new ResizeObserver(()=>ue());return Ne.observe($e),()=>Ne.disconnect()},[ue]),s.useEffect(()=>{V==="opening"&&D&&w("open")},[V,D]),s.useEffect(()=>{if(V!=="closing")return;const $e=setTimeout(()=>r(),An);return()=>clearTimeout($e)},[V,r]),s.useEffect(()=>()=>{me()},[me]),s.useLayoutEffect(()=>{ce.current===n&&K.current===(se==null?void 0:se.url)||(me(),G.current=null,ae(null),M(0),j(0),re(!1),be(!1),le(!1),ye(null),x.current=0,b.current=0,R.current="none",f.current=!1,P.current=!1,q.current=0,z.current=null,m.current=null,S.current=!1,ce.current=n,K.current=se==null?void 0:se.url)},[n,se==null?void 0:se.url,me]),s.useLayoutEffect(()=>{const $e=$.current;$e!==null&&($.current=null,requestAnimationFrame(()=>{L.current($e)}))},[n,se==null?void 0:se.url]),s.useEffect(()=>{if(V!=="open")return;let $e=null;const Ne=()=>{$e&&(document.removeEventListener("click",$e,!0),$e=null)},Ye=()=>{Ne(),$e=Ae=>{Ae.stopPropagation(),Ae.preventDefault(),Ne()},document.addEventListener("click",$e,!0)},Ze=Ae=>{const mt=Ae<0?1:-1;if(Math.abs(Ae)>jy&&t.length>1){Y(mt,!0);return}Y(mt,!1)},st=Ae=>{if(Ae.touches.length!==1||P.current)return;const mt=Ae.touches[0];S.current=!0,m.current={x:mt.clientX,y:mt.clientY},R.current="none",b.current=0,f.current=!1},it=Ae=>{if(!m.current||Ae.touches.length!==1||P.current)return;const mt=Ae.touches[0],Be=mt.clientX-m.current.x,De=mt.clientY-m.current.y;if(R.current==="none"){if(Math.abs(Be)<10&&Math.abs(De)<10)return;if(Math.abs(Be)>Math.abs(De)){if(t.length<=1)return;R.current="horizontal"}else if(De>0)R.current="vertical";else return}if(R.current==="horizontal"){f.current=!0,le(!0),b.current=Be;const Ue=Be<0?1:-1;z.current!==Ue&&(z.current=Ue,ae(Ue)),q.current=Be,j(Be),Ae.preventDefault();return}R.current==="vertical"&&(f.current=!0,le(!0),x.current=De,M(De),Ae.preventDefault())},Oe=()=>{if(!m.current)return;const Ae=R.current,mt=f.current;if(mt&&Ae==="horizontal")Ze(b.current),Ye();else if(mt&&Ae==="vertical")if(x.current>zy){const De=window.innerHeight;x.current=De,be(!0),M(De),w("closing")}else x.current=0,M(0),Ye();else Ae==="horizontal"&&Math.abs(b.current)>0&&(Ze(b.current),Ye());m.current=null,R.current="none",b.current=0,f.current=!1,le(!1)};return document.addEventListener("touchstart",st,{passive:!0}),document.addEventListener("touchmove",it,{passive:!1}),document.addEventListener("touchend",Oe),document.addEventListener("touchcancel",Oe),()=>{document.removeEventListener("touchstart",st),document.removeEventListener("touchmove",it),document.removeEventListener("touchend",Oe),document.removeEventListener("touchcancel",Oe),Ne()}},[V,t.length,Y]),s.useEffect(()=>{const $e=Ne=>{Ne.key==="Escape"&&(Ne.preventDefault(),Ne.stopPropagation(),V!=="closing"&&w("closing"))};return window.addEventListener("keydown",$e,!0),()=>window.removeEventListener("keydown",$e,!0)},[V]);const B=()=>{V!=="closing"&&w("closing")},I=V==="open",ee=V==="closing",te=U>0?Math.max(0,1-U/500):1,ge=U>0?Math.max(.35,1-U/500):1,X=D?p?D:Ky(D,Pe):null,Me=$e=>{if($e.stopPropagation(),S.current){S.current=!1;return}if(t.length<=1)return;const Ne=X??$e.currentTarget.getBoundingClientRect(),Ye=$e.clientY-Ne.top,Ze=Math.min(52,Ne.height*.2);if(!(Ye>Ne.height-Ze)){if($e.clientX-Ne.left<Ne.width/2){Q(-1);return}Q(1)}},Se=$e=>{if(t.length<=1)return;const Ne=X??$e.currentTarget.getBoundingClientRect(),Ye=$e.clientX-Ne.left,Ze=$e.clientY-Ne.top,st=Math.min(52,Ne.height*.2);if(Ze>Ne.height-st){$e.currentTarget.style.cursor="default";return}$e.currentTarget.style.cursor=Ye<Ne.width/2?"w-resize":"e-resize"},Z={position:"fixed",top:T==null?void 0:T.top,left:T==null?void 0:T.left,width:T==null?void 0:T.width,height:T==null?void 0:T.height,zIndex:9998},He=p?"cover":"contain",We=A!==0||U>0?`translate(${A}px, ${U}px)`:void 0,ot=N&&!O?"none":O?`transform ${An}ms ${pi}`:J?`transform ${An}ms ${pi}, opacity ${An}ms ${pi}`:V==="opening"||ee?`opacity ${An}ms ${pi}`:"none",qe={...Z,transform:We,opacity:U>0?ge:V==="opening"||ee?0:1,transition:ot,pointerEvents:"none"},tt={position:"absolute",top:((X==null?void 0:X.top)??0)-((T==null?void 0:T.top)??0),left:((X==null?void 0:X.left)??0)-((T==null?void 0:T.left)??0),width:X==null?void 0:X.width,height:X==null?void 0:X.height,objectFit:He,pointerEvents:pe&&I&&!fe?"auto":"none",touchAction:pe&&I?"none":void 0},et=(T==null?void 0:T.width)??0,Ge=we?(n+ie+t.length)%t.length:null,ve=Ge!==null?t[Ge]:null,_e={...Z,transform:we?`translateX(${ie*et+A}px)`:void 0,opacity:1,transition:O?`transform ${An}ms ${pi}`:"none",pointerEvents:"none"},ze={position:"absolute",top:((D==null?void 0:D.top)??0)-((T==null?void 0:T.top)??0),left:((D==null?void 0:D.left)??0)-((T==null?void 0:T.left)??0),width:D==null?void 0:D.width,height:D==null?void 0:D.height,objectFit:He,pointerEvents:"none"},Qe=X?{position:"fixed",top:X.top,height:X.height,width:X.width/2,zIndex:9999}:null;return a.jsxs("div",{ref:y,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:V==="open"?"none":void 0},onClick:B,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:I?te:0,transition:N?"none":`opacity ${An}ms ${pi}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:p?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:v,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:I?1:0,transition:`opacity ${An}ms ${pi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:v,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:I?1:0,transition:`opacity ${An}ms ${pi}`},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]})}),D&&T&&ve&&a.jsx("div",{style:_e,onTransitionEnd:ne,children:Xi(ve)?a.jsx("video",{src:ve.url,muted:!0,playsInline:!0,preload:"auto",style:ze},`neighbor-${Ge}-${ve.url}`):a.jsx("img",{src:ve.url,alt:ve.name,style:ze},`neighbor-${Ge}-${ve.url}`)}),D&&T&&se&&a.jsx("div",{style:qe,onTransitionEnd:ne,children:pe?a.jsx(Qy,{src:se.url,phase:V,mediaRef:g,mediaStyle:tt,onLoadedMetadata:Ie,onClick:Me,onMouseMove:Se},`${n}-${se.url}`):a.jsx("img",{ref:g,src:se.url,alt:se.name,onLoad:Ie,style:tt},`${n}-${se.url}`)}),I&&Qe&&t.length>1&&!pe&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Qe,left:X.left,cursor:"w-resize",pointerEvents:N?"none":"auto"},onClick:$e=>{if(S.current){S.current=!1;return}$e.stopPropagation(),Q(-1)}}),a.jsx("div",{style:{...Qe,left:X.left+X.width/2,cursor:"e-resize",pointerEvents:N?"none":"auto"},onClick:$e=>{if(S.current){S.current=!1;return}$e.stopPropagation(),Q(1)}})]})]})}function Jy(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function ev({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:r,activeEvent:l,layoutId:c,portalId:d}){const{prefix:u}=F.useScopedStyles(),{type:p="a",gridLayout:y,textBoxWidth:v=100,verticalGap:g,entriesCount:m,lightbox:x,imageDisplay:b,imageCorners:R,lightboxImageDisplay:f,slider:S,sliderTiming:W,direction:q,transition:z,titleMarginTop:P,subtitleMarginTop:_,titleColor:G,subtitleColor:$,lightboxCounterColor:L,titleFontFamily:D,titleFontSettings:E,titleFontSize:T,titleLineHeight:C,titleLetterSpacing:V,titleWordSpacing:w,titleTextAppearance:U,subtitleFontFamily:M,subtitleFontSettings:A,subtitleFontSize:j,subtitleLineHeight:ie,subtitleLetterSpacing:ae,subtitleWordSpacing:O,subtitleTextAppearance:re,lightboxCounterFontFamily:N,lightboxCounterFontSettings:le,lightboxCounterFontSize:J,lightboxCounterLineHeight:be,lightboxCounterLetterSpacing:Pe,lightboxCounterWordSpacing:ye,lightboxCounterTextAppearance:ce,showText:K="always",alignEntries:se="off",align:pe="top"}=e,fe={fontSettings:{fontFamily:D,fontWeight:(E==null?void 0:E.fontWeight)??400,fontStyle:(E==null?void 0:E.fontStyle)??"normal"},fontSize:T??.01,lineHeight:C,letterSpacing:V??0,wordSpacing:w??0,textAppearance:U,color:G},Ie={...un(en(fe,n))},me={fontSettings:{fontFamily:M,fontWeight:(A==null?void 0:A.fontWeight)??400,fontStyle:(A==null?void 0:A.fontStyle)??"normal"},fontSize:j??.01,lineHeight:ie,letterSpacing:ae??0,wordSpacing:O??0,textAppearance:re,color:$},Ce={...un(en(me,n))},h={fontSettings:{fontFamily:N,fontWeight:(le==null?void 0:le.fontWeight)??400,fontStyle:(le==null?void 0:le.fontStyle)??"normal"},fontSize:J??.01,lineHeight:be,letterSpacing:Pe??0,wordSpacing:ye??0,textAppearance:ce,color:L},Q={...un(en(h,n)),...os(J,be,u,n)},ne=is(T,C,`${u}-item-title`,`${u}-text-tight-leading`),ue=is(j,ie,`${u}-item-subtitle`,`${u}-text-tight-leading`),B=os(T,C,u,n),I=os(j,ie,u,n),ee=is(J,be,`${u}-lightbox-counter`,`${u}-text-tight-leading`),te=F.buildColorVars(u,{titleColor:G,subtitleColor:$,lightboxCounterColor:L},tv,nv),Me=`${l&&l!=="default"?`${u}-state-${l}`:""}${K==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),Se=m===0?1/0:m,Z=(t??[]).slice(0,Se),He=s.useMemo(()=>x==="on"?Uy(Z):[],[Z,x]),We=y.entryWidth??.2,ot=(b==null?void 0:b.display)==="cover",qe=(b==null?void 0:b.ratioValue)??"1:1",tt=(b==null?void 0:b.reversed)??!1,[et,Ge]=qe.split(":").map(Number),ze=`${tt?Ge:et} / ${tt?et:Ge}`,Qe=y.columnsCount,$e=F.scalingValue(We??0,n),Ne=$e,Ye=!ot&&S!=="off",Ze=Z.length%Qe||Qe,st=Ze<Qe&&Z.length>0,it=Z.length-Ze,Oe=st?Math.floor((Qe-Ze)/2)+1:1,Ae=R?F.scalingValue(R,n):void 0,mt={width:Ne,...ot?{aspectRatio:ze,height:"auto",overflow:"hidden"}:{height:"auto"},...Ae?{borderRadius:Ae,overflow:"hidden"}:{}},Be=`${u}-item-image-wrapper${Ye?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),De=p==="d"||p==="e"||p==="f",Ue=se==="on",ct=`calc(${F.scalingValue(We??0,n)} * (${v} / 100))`,he=F.scalingValue(We*v/100,n),Re=ot?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...Ae?{borderRadius:Ae}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...Ae?{borderRadius:Ae}:{}},[nt,pt]=s.useState(0),Ve=s.useRef(null),vt=z==="fade"||q==="horizontal"?"ltr":q==="vertical"?"ttb":"ltr";s.useEffect(()=>{const xt=Ve.current;if(!xt)return;const yt=new ResizeObserver(ke=>{pt(Math.round(ke[0].contentRect.width))});return yt.observe(xt),()=>yt.disconnect()},[]);const Mt=(()=>{const xt={...te},yt=Ve.current?getComputedStyle(Ve.current).getPropertyValue("--cntrl-article-width").trim():"";return yt&&(xt["--cntrl-article-width"]=yt),xt})(),[At,wt]=s.useState(!1),[Vt,jt]=s.useState([]),[Yt,Kt]=s.useState(0),It=x==="on"&&(!n||i),zt=(xt,yt)=>{n&&!i||x!=="off"&&(jt(xt),Kt(yt),wt(!0))};s.useEffect(()=>{if(!At||x!=="on"||typeof document>"u")return;const xt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=xt}},[At,x]),s.useEffect(()=>{!n||i||wt(!1)},[n,i]);const on=s.useMemo(()=>Hy(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:on}}),x==="on"&&a.jsx(qy,{mediaList:He}),a.jsx("div",{style:te,children:a.jsx("div",{ref:Ve,className:`${u}-wrapper ${u}-type-${p}${Ue?` ${u}-align-entries`:""} ${u}-image-align-${pe} ${Me}`.trim(),style:{gridTemplateColumns:`repeat(${Qe}, ${$e})`,rowGap:Ue?0:F.scalingValue(g??0,n),columnGap:F.scalingValue(y.horizontalGap??0,n),width:F.scalingValue(y.wrapperWidth??0,n),...Ue?{[`--${u}-align-entries-row-gap`]:F.scalingValue(g??0,n)}:{}},children:Z.map((xt,yt)=>{var Ft;const ke=Pc(xt.title),Je=Pc(xt.subtitle),rt=(((Ft=xt.link)==null?void 0:Ft.length)??0)>0&&x==="off"?xt.link:void 0,dt=Math.floor(yt/Qe)===Math.ceil(Z.length/Qe)-1,Pt=st&&yt>=it?`${Oe+(yt-it)}`:void 0,St=De?a.jsxs("div",{className:`${u}-item-text-block`,children:[ke&&a.jsx("p",{className:ne,style:{width:ct,...Ie,...B},children:xt.title}),ke&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:F.scalingValue(P??0,n),width:he}}),Je&&a.jsx("p",{className:ue,style:{width:ct,...Ce,...I},children:xt.subtitle}),Je&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:F.scalingValue(_??0,n),width:he}})]}):null,ht=Ue?a.jsxs("div",{className:`${u}-item-title-row`,children:[!De&&a.jsx("div",{"data-controls":o&&ke?"titleMarginTop":void 0,className:o&&ke?`${u}-control`:void 0,style:{height:ke?F.scalingValue(P??0,n):0,width:he}}),ke&&a.jsx("p",{className:ne,style:{width:ct,...Ie,...B},children:xt.title}),De&&ke&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:F.scalingValue(P??0,n),width:he}})]}):null,Wt=Ue?a.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!De&&a.jsx("div",{"data-controls":o&&Je?"subtitleMarginTop":void 0,className:o&&Je?`${u}-control`:void 0,style:{height:Je?F.scalingValue(_??0,n):0,width:he}}),Je&&a.jsx("p",{className:ue,style:{width:ct,...Ce,...I},children:xt.subtitle}),De&&Je&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:F.scalingValue(_??0,n),width:he}})]}):null,Tt=rt?a.jsxs("a",{href:rt,target:"_blank",className:`${u}-item-text-link`,children:[ht,Wt]}):a.jsxs(a.Fragment,{children:[ht,Wt]}),Ot=Yu(xt.gallery),Gt=Ot.filter(ut=>ut.lightboxMedia).map(ut=>ut.lightboxMedia),kt=a.jsx("div",{className:Be,style:mt,children:Ot.length===0?null:S==="off"?(()=>{const{displayMedia:ut,lightboxMedia:H}=Ot[0],Le=H?Gt.findIndex(je=>je.url===H.url):-1;return a.jsx(Mc,{media:ut,className:`${u}-item-${Xi(ut)?"video":"image"}`.trim(),style:Re,onMediaClick:It&&Le>=0?()=>zt(Gt,Le):void 0})})():a.jsxs(a.Fragment,{children:[Ye&&a.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Ot.map(({displayMedia:ut})=>Xi(ut)?a.jsx("video",{src:ut.url,muted:!0,playsInline:!0},`sizer-${ut.url}`):a.jsx("img",{src:ut.url,alt:""},`sizer-${ut.url}`))}),a.jsx(El,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:W*1e3,width:"100%",height:"100%",speed:By,type:z==="fade"?"fade":"loop",rewind:z==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:vt},onMoved:ut=>{q!=="random"||z==="fade"||Dy(ut)},children:Ot.map(({displayMedia:ut,lightboxMedia:H},Le)=>{const je=H?Gt.findIndex(Fe=>Fe.url===H.url):-1;return a.jsx(kl,{children:a.jsx(Mc,{media:ut,className:`${u}-item-${Xi(ut)?"video":"image"}`.trim(),style:Re,onMediaClick:It&&je>=0?()=>zt(Gt,je):void 0})},Le)})},`${z}-${We}-${q}-${W}-${nt}-${c}`)]})}),_t=De?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":o&&ke?"titleMarginTop":void 0,className:o&&ke?`${u}-control`:void 0,style:{height:ke?F.scalingValue(P??0,n):0,width:he}}),a.jsx("p",{className:ne,style:{width:ct,...Ie,...B},children:xt.title}),a.jsx("div",{"data-controls":o&&Je?"subtitleMarginTop":void 0,className:o&&Je?`${u}-control`:void 0,style:{height:Je?F.scalingValue(_??0,n):0,width:he}}),a.jsx("p",{className:ue,style:{width:ct,...Ce,...I},children:xt.subtitle})]});return a.jsx("div",{className:`${u}-item`.trim(),style:Pt&&!Ue?{gridColumn:Pt}:void 0,children:a.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${Ue&&dt?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(v??0)>100?`calc(${$e} * (${v} / 100))`:$e,...Pt&&Ue?{gridColumn:Pt}:{}},children:Ue?a.jsx(a.Fragment,{children:De?a.jsxs(a.Fragment,{children:[Tt,a.jsx("a",{href:rt,target:"_blank",className:`${u}-item-image-link`,children:kt})]}):a.jsxs(a.Fragment,{children:[a.jsx("a",{href:rt,target:"_blank",className:`${u}-item-image-link`,children:kt}),Tt]})}):rt?a.jsxs(a.Fragment,{children:[a.jsxs("a",{href:rt,target:"_blank",className:`${u}-item-image-link`,children:[St,kt]}),!De&&a.jsx("a",{href:rt,target:"_blank",className:`${u}-item-text-link`,children:_t})]}):a.jsxs(a.Fragment,{children:[St,kt,_t]})})},yt)})})}),(!n||i)&&At&&typeof document<"u"&&x==="on"&&(()=>{const xt=(d?document.getElementById(d):null)??document.body;return Xn.createPortal(a.jsx("div",{style:Mt,"data-selection":"none",children:a.jsx(Zy,{prefix:u,items:Vt,index:Yt,imageDisplay:Jy(f),isEditor:n,onClose:()=>wt(!1),onPrev:()=>Kt(yt=>(yt-1+Vt.length)%Vt.length),onNext:()=>Kt(yt=>(yt+1)%Vt.length),counterClassName:ee,counterStyle:Q})}),xt)})()]})}const tv={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},nv=["hover","focus","filled","success","error"],iv=`import { Splide, SplideSlide } from '@splidejs/react-splide';
5257
+ `}function Wy(){return Math.random()<.5?"ltr":"ttb"}function Oy(e){const t=e.Components.Autoplay;t&&(t.pause(!1),t.play())}function Dy(e){const t=Wy();e.options.direction!==t&&(e.options={...e.options,direction:t}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Oy(e)})})}const An=500,By=750,pi="cubic-bezier(0.22, 1, 0.36, 1)",zy=72,jy=50;function Vy(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 Gy(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Xy(e){const[t]=e.media;return t!=null&&t.url?t:null}function Yu(e){return!Array.isArray(e)||e.length===0?[]:Vy(e)?e.flatMap(t=>{const n=Gy(t);if(!n)return[];const i=Xy(t);return[{displayMedia:n,lightboxMedia:i!=null&&i.url?i:null}]}):e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Xi(e){return e.type==="video"}function Uy(e){const t=new Set,n=[];for(const i of e){const o=Yu(i.gallery);for(const r of o){const l=r.lightboxMedia;l!=null&&l.url&&!t.has(l.url)&&(t.add(l.url),n.push(l))}}return n}function qy({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Xi(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function Yy(e){e.pause(),e.removeAttribute("src"),e.load()}function Ic({media:e,className:t,style:n,onMediaClick:i}){return Xi(e)?a.jsx("video",{src:e.url,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):a.jsx("img",{src:e.url,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function Rc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Ky(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 Qy({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l}){return s.useEffect(()=>{const c=n.current;if(c)return()=>{Yy(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})}function Zy({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:c,counterClassName:d,counterStyle:u}){const p=i==="cover",y=s.useRef(null),v=s.useRef(null),g=s.useRef(null),m=s.useRef(null),x=s.useRef(0),b=s.useRef(0),M=s.useRef("none"),f=s.useRef(!1),S=s.useRef(!1),W=s.useRef(null),q=s.useRef(0),z=s.useRef(null),P=s.useRef(!1),_=s.useRef(null),G=s.useRef(null),$=s.useRef(null),L=s.useRef(()=>{}),[D,E]=s.useState(null),[T,C]=s.useState(null),[V,w]=s.useState("opening"),[U,I]=s.useState(0),[A,j]=s.useState(0),[ie,ae]=s.useState(null),[O,re]=s.useState(!1),[N,le]=s.useState(!1),[J,be]=s.useState(!1),[Pe,ye]=s.useState(null),ce=s.useRef(n),K=s.useRef(void 0),se=t[n],pe=se?Xi(se):!1,fe=A!==0||O,we=ie!==null,Re=s.useCallback($e=>{const Ne=$e.currentTarget,Ye=Ne instanceof HTMLVideoElement?{width:Ne.videoWidth,height:Ne.videoHeight}:{width:Ne.naturalWidth,height:Ne.naturalHeight};!Ye.width||!Ye.height||ye(Ye)},[]);s.useEffect(()=>{W.current=T},[T]),s.useEffect(()=>{const $e=y.current;if(!$e)return;const Ne=()=>C(Rc($e));Ne();const Ye=new ResizeObserver(Ne);return Ye.observe($e),()=>Ye.disconnect()},[]);const me=s.useCallback(()=>{_.current!==null&&(window.clearTimeout(_.current),_.current=null)},[]),xe=s.useCallback(()=>{const $e=G.current;G.current=null,me(),z.current=null,P.current=!1,ae(null),re(!1),j(0),q.current=0,le(!1),f.current=!1,b.current=0,M.current="none",$e===1?c():$e===-1&&l()},[me,c,l]),Ce=s.useCallback(()=>{me(),G.current=null,z.current=null,P.current=!1,ae(null),re(!1),j(0),q.current=0},[me]),h=s.useCallback(()=>{me(),_.current=window.setTimeout(()=>{G.current!==null&&xe()},An+32)},[me,xe]),Y=s.useCallback(($e,Ne)=>{var Ze;const Ye=((Ze=W.current)==null?void 0:Ze.width)??0;if(me(),z.current=$e,ae($e),P.current=!0,re(!0),Ne){G.current=$e;const st=-$e*Ye;q.current=st,j(st),h();return}q.current=0,j(0),_.current=window.setTimeout(()=>{_.current=null,Ce()},An+32)},[me,Ce,h]),Q=s.useCallback($e=>{if(!(t.length<=1)){if(P.current){if(G.current===$e){$.current=$e,xe();return}Ce()}me(),z.current=$e,ae($e),P.current=!1,re(!1),q.current=0,j(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Y($e,!0)})})}},[t.length,Y,xe,Ce,me]);L.current=Q;const ne=s.useCallback($e=>{$e.propertyName!=="transform"||!P.current||G.current!==null&&xe()},[xe]),ue=s.useCallback(()=>{const $e=v.current;if(!$e)return;const Ne=Rc($e);!Ne.width||!Ne.height||E(Ne)},[]);s.useEffect(()=>{ue();const $e=v.current;if(!$e)return;const Ne=new ResizeObserver(()=>ue());return Ne.observe($e),()=>Ne.disconnect()},[ue]),s.useEffect(()=>{V==="opening"&&D&&w("open")},[V,D]),s.useEffect(()=>{if(V!=="closing")return;const $e=setTimeout(()=>r(),An);return()=>clearTimeout($e)},[V,r]),s.useEffect(()=>()=>{me()},[me]),s.useLayoutEffect(()=>{ce.current===n&&K.current===(se==null?void 0:se.url)||(me(),G.current=null,ae(null),I(0),j(0),re(!1),be(!1),le(!1),ye(null),x.current=0,b.current=0,M.current="none",f.current=!1,P.current=!1,q.current=0,z.current=null,m.current=null,S.current=!1,ce.current=n,K.current=se==null?void 0:se.url)},[n,se==null?void 0:se.url,me]),s.useLayoutEffect(()=>{const $e=$.current;$e!==null&&($.current=null,requestAnimationFrame(()=>{L.current($e)}))},[n,se==null?void 0:se.url]),s.useEffect(()=>{if(V!=="open")return;let $e=null;const Ne=()=>{$e&&(document.removeEventListener("click",$e,!0),$e=null)},Ye=()=>{Ne(),$e=Ae=>{Ae.stopPropagation(),Ae.preventDefault(),Ne()},document.addEventListener("click",$e,!0)},Ze=Ae=>{const mt=Ae<0?1:-1;if(Math.abs(Ae)>jy&&t.length>1){Y(mt,!0);return}Y(mt,!1)},st=Ae=>{if(Ae.touches.length!==1||P.current)return;const mt=Ae.touches[0];S.current=!0,m.current={x:mt.clientX,y:mt.clientY},M.current="none",b.current=0,f.current=!1},it=Ae=>{if(!m.current||Ae.touches.length!==1||P.current)return;const mt=Ae.touches[0],Be=mt.clientX-m.current.x,De=mt.clientY-m.current.y;if(M.current==="none"){if(Math.abs(Be)<10&&Math.abs(De)<10)return;if(Math.abs(Be)>Math.abs(De)){if(t.length<=1)return;M.current="horizontal"}else if(De>0)M.current="vertical";else return}if(M.current==="horizontal"){f.current=!0,le(!0),b.current=Be;const Ue=Be<0?1:-1;z.current!==Ue&&(z.current=Ue,ae(Ue)),q.current=Be,j(Be),Ae.preventDefault();return}M.current==="vertical"&&(f.current=!0,le(!0),x.current=De,I(De),Ae.preventDefault())},Oe=()=>{if(!m.current)return;const Ae=M.current,mt=f.current;if(mt&&Ae==="horizontal")Ze(b.current),Ye();else if(mt&&Ae==="vertical")if(x.current>zy){const De=window.innerHeight;x.current=De,be(!0),I(De),w("closing")}else x.current=0,I(0),Ye();else Ae==="horizontal"&&Math.abs(b.current)>0&&(Ze(b.current),Ye());m.current=null,M.current="none",b.current=0,f.current=!1,le(!1)};return document.addEventListener("touchstart",st,{passive:!0}),document.addEventListener("touchmove",it,{passive:!1}),document.addEventListener("touchend",Oe),document.addEventListener("touchcancel",Oe),()=>{document.removeEventListener("touchstart",st),document.removeEventListener("touchmove",it),document.removeEventListener("touchend",Oe),document.removeEventListener("touchcancel",Oe),Ne()}},[V,t.length,Y]),s.useEffect(()=>{const $e=Ne=>{Ne.key==="Escape"&&(Ne.preventDefault(),Ne.stopPropagation(),V!=="closing"&&w("closing"))};return window.addEventListener("keydown",$e,!0),()=>window.removeEventListener("keydown",$e,!0)},[V]);const B=()=>{V!=="closing"&&w("closing")},R=V==="open",ee=V==="closing",te=U>0?Math.max(0,1-U/500):1,ge=U>0?Math.max(.35,1-U/500):1,X=D?p?D:Ky(D,Pe):null,Ie=$e=>{if($e.stopPropagation(),S.current){S.current=!1;return}if(t.length<=1)return;const Ne=X??$e.currentTarget.getBoundingClientRect(),Ye=$e.clientY-Ne.top,Ze=Math.min(52,Ne.height*.2);if(!(Ye>Ne.height-Ze)){if($e.clientX-Ne.left<Ne.width/2){Q(-1);return}Q(1)}},Se=$e=>{if(t.length<=1)return;const Ne=X??$e.currentTarget.getBoundingClientRect(),Ye=$e.clientX-Ne.left,Ze=$e.clientY-Ne.top,st=Math.min(52,Ne.height*.2);if(Ze>Ne.height-st){$e.currentTarget.style.cursor="default";return}$e.currentTarget.style.cursor=Ye<Ne.width/2?"w-resize":"e-resize"},Z={position:"fixed",top:T==null?void 0:T.top,left:T==null?void 0:T.left,width:T==null?void 0:T.width,height:T==null?void 0:T.height,zIndex:9998},He=p?"cover":"contain",We=A!==0||U>0?`translate(${A}px, ${U}px)`:void 0,ot=N&&!O?"none":O?`transform ${An}ms ${pi}`:J?`transform ${An}ms ${pi}, opacity ${An}ms ${pi}`:V==="opening"||ee?`opacity ${An}ms ${pi}`:"none",qe={...Z,transform:We,opacity:U>0?ge:V==="opening"||ee?0:1,transition:ot,pointerEvents:"none"},tt={position:"absolute",top:((X==null?void 0:X.top)??0)-((T==null?void 0:T.top)??0),left:((X==null?void 0:X.left)??0)-((T==null?void 0:T.left)??0),width:X==null?void 0:X.width,height:X==null?void 0:X.height,objectFit:He,pointerEvents:pe&&R&&!fe?"auto":"none",touchAction:pe&&R?"none":void 0},et=(T==null?void 0:T.width)??0,Ge=we?(n+ie+t.length)%t.length:null,ve=Ge!==null?t[Ge]:null,_e={...Z,transform:we?`translateX(${ie*et+A}px)`:void 0,opacity:1,transition:O?`transform ${An}ms ${pi}`:"none",pointerEvents:"none"},ze={position:"absolute",top:((D==null?void 0:D.top)??0)-((T==null?void 0:T.top)??0),left:((D==null?void 0:D.left)??0)-((T==null?void 0:T.left)??0),width:D==null?void 0:D.width,height:D==null?void 0:D.height,objectFit:He,pointerEvents:"none"},Qe=X?{position:"fixed",top:X.top,height:X.height,width:X.width/2,zIndex:9999}:null;return a.jsxs("div",{ref:y,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:V==="open"?"none":void 0},onClick:B,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:R?te:0,transition:N?"none":`opacity ${An}ms ${pi}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:p?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:v,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:R?1:0,transition:`opacity ${An}ms ${pi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:v,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:R?1:0,transition:`opacity ${An}ms ${pi}`},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]})}),D&&T&&ve&&a.jsx("div",{style:_e,onTransitionEnd:ne,children:Xi(ve)?a.jsx("video",{src:ve.url,muted:!0,playsInline:!0,preload:"auto",style:ze},`neighbor-${Ge}-${ve.url}`):a.jsx("img",{src:ve.url,alt:ve.name,style:ze},`neighbor-${Ge}-${ve.url}`)}),D&&T&&se&&a.jsx("div",{style:qe,onTransitionEnd:ne,children:pe?a.jsx(Qy,{src:se.url,phase:V,mediaRef:g,mediaStyle:tt,onLoadedMetadata:Re,onClick:Ie,onMouseMove:Se},`${n}-${se.url}`):a.jsx("img",{ref:g,src:se.url,alt:se.name,onLoad:Re,style:tt},`${n}-${se.url}`)}),R&&Qe&&t.length>1&&!pe&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Qe,left:X.left,cursor:"w-resize",pointerEvents:N?"none":"auto"},onClick:$e=>{if(S.current){S.current=!1;return}$e.stopPropagation(),Q(-1)}}),a.jsx("div",{style:{...Qe,left:X.left+X.width/2,cursor:"e-resize",pointerEvents:N?"none":"auto"},onClick:$e=>{if(S.current){S.current=!1;return}$e.stopPropagation(),Q(1)}})]})]})}function Jy(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function ev({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:r,activeEvent:l,layoutId:c,portalId:d}){const{prefix:u}=F.useScopedStyles(),{type:p="a",gridLayout:y,textBoxWidth:v=100,verticalGap:g,entriesCount:m,lightbox:x,imageDisplay:b,imageCorners:M,lightboxImageDisplay:f,slider:S,sliderTiming:W,direction:q,transition:z,titleMarginTop:P,subtitleMarginTop:_,titleColor:G,subtitleColor:$,lightboxCounterColor:L,titleFontFamily:D,titleFontSettings:E,titleFontSize:T,titleLineHeight:C,titleLetterSpacing:V,titleWordSpacing:w,titleTextAppearance:U,subtitleFontFamily:I,subtitleFontSettings:A,subtitleFontSize:j,subtitleLineHeight:ie,subtitleLetterSpacing:ae,subtitleWordSpacing:O,subtitleTextAppearance:re,lightboxCounterFontFamily:N,lightboxCounterFontSettings:le,lightboxCounterFontSize:J,lightboxCounterLineHeight:be,lightboxCounterLetterSpacing:Pe,lightboxCounterWordSpacing:ye,lightboxCounterTextAppearance:ce,showText:K="always",alignEntries:se="off",align:pe="top"}=e,fe={fontSettings:{fontFamily:D,fontWeight:(E==null?void 0:E.fontWeight)??400,fontStyle:(E==null?void 0:E.fontStyle)??"normal"},fontSize:T??.01,lineHeight:C,letterSpacing:V??0,wordSpacing:w??0,textAppearance:U,color:G},Re={...un(en(fe,n))},me={fontSettings:{fontFamily:I,fontWeight:(A==null?void 0:A.fontWeight)??400,fontStyle:(A==null?void 0:A.fontStyle)??"normal"},fontSize:j??.01,lineHeight:ie,letterSpacing:ae??0,wordSpacing:O??0,textAppearance:re,color:$},Ce={...un(en(me,n))},h={fontSettings:{fontFamily:N,fontWeight:(le==null?void 0:le.fontWeight)??400,fontStyle:(le==null?void 0:le.fontStyle)??"normal"},fontSize:J??.01,lineHeight:be,letterSpacing:Pe??0,wordSpacing:ye??0,textAppearance:ce,color:L},Q={...un(en(h,n)),...os(J,be,u,n)},ne=is(T,C,`${u}-item-title`,`${u}-text-tight-leading`),ue=is(j,ie,`${u}-item-subtitle`,`${u}-text-tight-leading`),B=os(T,C,u,n),R=os(j,ie,u,n),ee=is(J,be,`${u}-lightbox-counter`,`${u}-text-tight-leading`),te=F.buildColorVars(u,{titleColor:G,subtitleColor:$,lightboxCounterColor:L},tv,nv),Ie=`${l&&l!=="default"?`${u}-state-${l}`:""}${K==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),Se=m===0?1/0:m,Z=(t??[]).slice(0,Se),He=s.useMemo(()=>x==="on"?Uy(Z):[],[Z,x]),We=y.entryWidth??.2,ot=(b==null?void 0:b.display)==="cover",qe=(b==null?void 0:b.ratioValue)??"1:1",tt=(b==null?void 0:b.reversed)??!1,[et,Ge]=qe.split(":").map(Number),ze=`${tt?Ge:et} / ${tt?et:Ge}`,Qe=y.columnsCount,$e=F.scalingValue(We??0,n),Ne=$e,Ye=!ot&&S!=="off",Ze=Z.length%Qe||Qe,st=Ze<Qe&&Z.length>0,it=Z.length-Ze,Oe=st?Math.floor((Qe-Ze)/2)+1:1,Ae=M?F.scalingValue(M,n):void 0,mt={width:Ne,...ot?{aspectRatio:ze,height:"auto",overflow:"hidden"}:{height:"auto"},...Ae?{borderRadius:Ae,overflow:"hidden"}:{}},Be=`${u}-item-image-wrapper${Ye?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),De=p==="d"||p==="e"||p==="f",Ue=se==="on",ct=`calc(${F.scalingValue(We??0,n)} * (${v} / 100))`,he=F.scalingValue(We*v/100,n),Me=ot?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...Ae?{borderRadius:Ae}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...Ae?{borderRadius:Ae}:{}},[nt,pt]=s.useState(0),Ve=s.useRef(null),vt=z==="fade"||q==="horizontal"?"ltr":q==="vertical"?"ttb":"ltr";s.useEffect(()=>{const xt=Ve.current;if(!xt)return;const yt=new ResizeObserver(ke=>{pt(Math.round(ke[0].contentRect.width))});return yt.observe(xt),()=>yt.disconnect()},[]);const It=(()=>{const xt={...te},yt=Ve.current?getComputedStyle(Ve.current).getPropertyValue("--cntrl-article-width").trim():"";return yt&&(xt["--cntrl-article-width"]=yt),xt})(),[At,wt]=s.useState(!1),[Vt,jt]=s.useState([]),[Yt,Kt]=s.useState(0),Rt=x==="on"&&(!n||i),zt=(xt,yt)=>{n&&!i||x!=="off"&&(jt(xt),Kt(yt),wt(!0))};s.useEffect(()=>{if(!At||x!=="on"||typeof document>"u")return;const xt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=xt}},[At,x]),s.useEffect(()=>{!n||i||wt(!1)},[n,i]);const on=s.useMemo(()=>Hy(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:on}}),x==="on"&&a.jsx(qy,{mediaList:He}),a.jsx("div",{style:te,children:a.jsx("div",{ref:Ve,className:`${u}-wrapper ${u}-type-${p}${Ue?` ${u}-align-entries`:""} ${u}-image-align-${pe} ${Ie}`.trim(),style:{gridTemplateColumns:`repeat(${Qe}, ${$e})`,rowGap:Ue?0:F.scalingValue(g??0,n),columnGap:F.scalingValue(y.horizontalGap??0,n),width:F.scalingValue(y.wrapperWidth??0,n),...Ue?{[`--${u}-align-entries-row-gap`]:F.scalingValue(g??0,n)}:{}},children:Z.map((xt,yt)=>{var Ft;const ke=Pc(xt.title),Je=Pc(xt.subtitle),rt=(((Ft=xt.link)==null?void 0:Ft.length)??0)>0&&x==="off"?xt.link:void 0,dt=Math.floor(yt/Qe)===Math.ceil(Z.length/Qe)-1,Pt=st&&yt>=it?`${Oe+(yt-it)}`:void 0,St=De?a.jsxs("div",{className:`${u}-item-text-block`,children:[ke&&a.jsx("p",{className:ne,style:{width:ct,...Re,...B},children:xt.title}),ke&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:F.scalingValue(P??0,n),width:he}}),Je&&a.jsx("p",{className:ue,style:{width:ct,...Ce,...R},children:xt.subtitle}),Je&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:F.scalingValue(_??0,n),width:he}})]}):null,ht=Ue?a.jsxs("div",{className:`${u}-item-title-row`,children:[!De&&a.jsx("div",{"data-controls":o&&ke?"titleMarginTop":void 0,className:o&&ke?`${u}-control`:void 0,style:{height:ke?F.scalingValue(P??0,n):0,width:he}}),ke&&a.jsx("p",{className:ne,style:{width:ct,...Re,...B},children:xt.title}),De&&ke&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:F.scalingValue(P??0,n),width:he}})]}):null,Wt=Ue?a.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!De&&a.jsx("div",{"data-controls":o&&Je?"subtitleMarginTop":void 0,className:o&&Je?`${u}-control`:void 0,style:{height:Je?F.scalingValue(_??0,n):0,width:he}}),Je&&a.jsx("p",{className:ue,style:{width:ct,...Ce,...R},children:xt.subtitle}),De&&Je&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:F.scalingValue(_??0,n),width:he}})]}):null,Tt=rt?a.jsxs("a",{href:rt,target:"_blank",className:`${u}-item-text-link`,children:[ht,Wt]}):a.jsxs(a.Fragment,{children:[ht,Wt]}),Ot=Yu(xt.gallery),Gt=Ot.filter(ut=>ut.lightboxMedia).map(ut=>ut.lightboxMedia),kt=a.jsx("div",{className:Be,style:mt,children:Ot.length===0?null:S==="off"?(()=>{const{displayMedia:ut,lightboxMedia:H}=Ot[0],Le=H?Gt.findIndex(je=>je.url===H.url):-1;return a.jsx(Ic,{media:ut,className:`${u}-item-${Xi(ut)?"video":"image"}`.trim(),style:Me,onMediaClick:Rt&&Le>=0?()=>zt(Gt,Le):void 0})})():a.jsxs(a.Fragment,{children:[Ye&&a.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Ot.map(({displayMedia:ut})=>Xi(ut)?a.jsx("video",{src:ut.url,muted:!0,playsInline:!0},`sizer-${ut.url}`):a.jsx("img",{src:ut.url,alt:""},`sizer-${ut.url}`))}),a.jsx(El,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:W*1e3,width:"100%",height:"100%",speed:By,type:z==="fade"?"fade":"loop",rewind:z==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:vt},onMoved:ut=>{q!=="random"||z==="fade"||Dy(ut)},children:Ot.map(({displayMedia:ut,lightboxMedia:H},Le)=>{const je=H?Gt.findIndex(Fe=>Fe.url===H.url):-1;return a.jsx(kl,{children:a.jsx(Ic,{media:ut,className:`${u}-item-${Xi(ut)?"video":"image"}`.trim(),style:Me,onMediaClick:Rt&&je>=0?()=>zt(Gt,je):void 0})},Le)})},`${z}-${We}-${q}-${W}-${nt}-${c}`)]})}),_t=De?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":o&&ke?"titleMarginTop":void 0,className:o&&ke?`${u}-control`:void 0,style:{height:ke?F.scalingValue(P??0,n):0,width:he}}),a.jsx("p",{className:ne,style:{width:ct,...Re,...B},children:xt.title}),a.jsx("div",{"data-controls":o&&Je?"subtitleMarginTop":void 0,className:o&&Je?`${u}-control`:void 0,style:{height:Je?F.scalingValue(_??0,n):0,width:he}}),a.jsx("p",{className:ue,style:{width:ct,...Ce,...R},children:xt.subtitle})]});return a.jsx("div",{className:`${u}-item`.trim(),style:Pt&&!Ue?{gridColumn:Pt}:void 0,children:a.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${Ue&&dt?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(v??0)>100?`calc(${$e} * (${v} / 100))`:$e,...Pt&&Ue?{gridColumn:Pt}:{}},children:Ue?a.jsx(a.Fragment,{children:De?a.jsxs(a.Fragment,{children:[Tt,a.jsx("a",{href:rt,target:"_blank",className:`${u}-item-image-link`,children:kt})]}):a.jsxs(a.Fragment,{children:[a.jsx("a",{href:rt,target:"_blank",className:`${u}-item-image-link`,children:kt}),Tt]})}):rt?a.jsxs(a.Fragment,{children:[a.jsxs("a",{href:rt,target:"_blank",className:`${u}-item-image-link`,children:[St,kt]}),!De&&a.jsx("a",{href:rt,target:"_blank",className:`${u}-item-text-link`,children:_t})]}):a.jsxs(a.Fragment,{children:[St,kt,_t]})})},yt)})})}),(!n||i)&&At&&typeof document<"u"&&x==="on"&&(()=>{const xt=(d?document.getElementById(d):null)??document.body;return Xn.createPortal(a.jsx("div",{style:It,"data-selection":"none",children:a.jsx(Zy,{prefix:u,items:Vt,index:Yt,imageDisplay:Jy(f),isEditor:n,onClose:()=>wt(!1),onPrev:()=>Kt(yt=>(yt-1+Vt.length)%Vt.length),onNext:()=>Kt(yt=>(yt+1)%Vt.length),counterClassName:ee,counterStyle:Q})}),xt)})()]})}const tv={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},nv=["hover","focus","filled","success","error"],iv=`import { Splide, SplideSlide } from '@splidejs/react-splide';
5258
5258
  import '@splidejs/react-splide/css/core';
5259
5259
  import { CommonComponentProps } from '../props';
5260
5260
  import {
@@ -7307,7 +7307,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
7307
7307
  };
7308
7308
 
7309
7309
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
7310
- `,rs={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},ov=["titleColor","subtitleColor","lightboxCounterColor"],rv={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["gallery"]},default:[{title:"Earth-orbital mission",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"01M3QM74XESYN1HRYH9VRTZ5CK",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Salton Sea from Above",subtitle:"Hasselblad 500 EL / Zeiss Sonnar 250 mm / SO-368 Ektachrome",gallery:[{media:[{url:"01M3QM74XERA3G7J0J00XVKEXX",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module Pilot",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module 3 porch",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Command Module",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XEZCK8SJPAFXCKG8QN",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"CSM and Lunar Module LM",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"David R. Scott during EVA",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Fourth day of the mission",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"01M3QM74XES6MX14JTT1CF24BB",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Landing of the Spider1",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"01M3QM74XEMGJWCYNPZ3ETQTKM",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c","d","e","f"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},imageCorners:{type:"number",scope:"layout",title:"Round corners",min:0,display:{type:"numeric-input"}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...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",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"off",align:"top",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"b",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,imageCorners:0,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.064,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},t:{type:"b",gridLayout:{entryWidth:.1041,horizontalGap:.26041,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:250,verticalGap:.09722,entriesCount:0,titleMarginTop:.01953125,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.03255,titleLineHeight:.03255,titleLetterSpacing:-.00118,subtitleFontSize:.01822,subtitleLineHeight:.02083,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},d:{type:"b",gridLayout:{entryWidth:.0833,horizontalGap:.25,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","align","entriesCount","lightbox","imageDisplay","imageCorners","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","verticalGap"]},{type:"row",title:"",items:["entriesCount","showText"]},{type:"row",title:"",items:["alignEntries","align"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay","imageCorners"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","direction"]},{type:"group",title:"",items:["sliderTiming","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...ov],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},av={element:ev,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"01M3QM74XGB9A72KYAEG4WM9XK"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"subtitleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",subtitleFontSettings:"subtitleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"},schema:rv,sourceCode:iv},sv=50,Rc=10,Al="cntrl-lightbox-journal",Da=Al,Gs=`${Al}-`,Ba=e=>`${Al}-${e}`,Fl=e=>e===Da||e.startsWith(Gs),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(Ba(e)));if(i)return i}const n=Ec(t.get(Da));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},Ac=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Ku=(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(Ba(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)},lv=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===Ba(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)}},Qu=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(Ba(e)):[...t.keys()].some(n=>Fl(n))},cv=(e,t)=>{if(Qu(t)){if(e){window.history.back();return}lv(t)}},dv=20,uv=2,as=e=>`max(${e}, ${dv}px)`,Lo=e=>((e==null?void 0:e.image)??[]).slice(0,uv),Zu=e=>e.reduce((t,n)=>t+Lo(n).length,0),pv=(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}},gv=(e,t)=>{const n=Zu(e),{start:i,end:o}=pv(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)})),mv=(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 gv(i,o)},Fc=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",hv=(e,t,n)=>e==="B"?t.length>1:Zu(n)>1,Pn=.004,ni=.004,bo={title1Width:.13,title2Width:.13,title3Width:.14},wi=(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},Po=(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)=>Po(e,t),yn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},$i=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Po(e.length,n),effective:vr(e.length,n)}},Ju=(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),ep=(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),Pi=["title1","title2","title3","count"],bt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Nl={title1:"1",title2:"2",title3:"3",count:"Count"},_l=e=>[bt(e,"fontFamily"),bt(e,"fontSettings"),{type:"row",items:[bt(e,"fontSize"),bt(e,"lineHeight"),bt(e,"letterSpacing"),bt(e,"wordSpacing")]},bt(e,"textAlign"),bt(e,"textAppearance")],fv=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Pi.map(e=>[Nl[e],_l(e)]))}),yv={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},vv={title1:.02,title2:.02,title3:.02,count:.017},Bi=(e,t)=>{const n=i=>{const o=bt(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[yv[t]]}},zi=(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??vv[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return en(i,n)};function tp({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:v=0,titleRowMarginBottom:g=0,titleHeaderLayout:m="desktop",contentMarginTop:x=0,iconMarginRight:b=0,closeIcon:R=null,closeIconMaxWidth:f=0,closeIconColor:S="#000000",closeIconHoverColor:W="#cccccc"}=n,q=F.scalingValue(x,i),z=F.scalingValue(Math.max(x,ni),i),P=F.scalingValue(b,i),_=F.scalingValue(g,i),G=m==="mobile",$=zi("title1",Bi(n,"title1"),i),L=zi("title2",Bi(n,"title2"),i),D=zi("title3",Bi(n,"title3"),i),E=s.useMemo(()=>({title1Width:c??bo.title1Width,title2Width:d??bo.title2Width,title3Width:u??bo.title3Width}),[c,d,u]),T=s.useMemo(()=>({title2MarginLeft:y,title3MarginLeft:v}),[y,v]),C=s.useMemo(()=>wi(e,t,$,L,D),[e,t,$,L,D]),V=s.useMemo(()=>C.map(X=>E[X.widthKey]),[C,E]),w=s.useMemo(()=>Po(C.length,V),[C.length,V]),U=s.useMemo(()=>vr(C.length,V),[C.length,V]),M=s.useMemo(()=>C.filter(X=>X.prefix==="title1"),[C]),A=s.useMemo(()=>C.filter(X=>X.prefix==="title2"||X.prefix==="title3"),[C]),j=s.useMemo(()=>$i(M,E),[M,E]),ie=s.useMemo(()=>$i(A,E),[A,E]),ae=!!(t.title1||t.title2||t.title3),O=R!==null;if(!(ae||O))return null;const N=(p??0)>0||o,le=(X,Me)=>{const Se=C.findIndex(He=>He.prefix===X.prefix);if(!G||Me==="single-row")return{effectiveWidth:U[Se]??0,resolvedWidth:w[Se]??0,maxWidth:yn(Se,w)};if(Me==="two-row-top"){const He=M.findIndex(We=>We.prefix===X.prefix);return{effectiveWidth:j.effective[He]??0,resolvedWidth:j.resolved[He]??0,maxWidth:yn(He,j.resolved)}}const Z=A.findIndex(He=>He.prefix===X.prefix);return{effectiveWidth:ie.effective[Z]??0,resolvedWidth:ie.resolved[Z]??0,maxWidth:yn(Z,ie.resolved)}},J=(X,Me,Se)=>{if(!G||Se==="single-row"){const qe=X.findIndex(ve=>ve.prefix===Me.prefix),tt=X.map(ve=>E[ve.widthKey]),et=Po(X.length,tt);return{effectiveWidth:vr(X.length,tt)[qe]??0,resolvedWidth:et[qe]??0,maxWidth:yn(qe,et)}}if(Se==="two-row-top"){const qe=X.filter(ve=>ve.prefix==="title1"),tt=qe.findIndex(ve=>ve.prefix===Me.prefix),{resolved:et,effective:Ge}=$i(qe,E);return{effectiveWidth:Ge[tt]??0,resolvedWidth:et[tt]??0,maxWidth:yn(tt,et)}}const Z=X.filter(qe=>qe.prefix==="title2"||qe.prefix==="title3"),He=Z.findIndex(qe=>qe.prefix===Me.prefix),{resolved:We,effective:ot}=$i(Z,E);return{effectiveWidth:ot[He]??0,resolvedWidth:We[He]??0,maxWidth:yn(He,We)}},be=X=>ep(C,w,T,X)+(G?0:p??0),Pe=()=>G?0:p??0,ye=X=>A.slice(0,X).reduce((Me,Se,Z)=>Me+(Se.marginLeftKey?T[Se.marginLeftKey]??0:0)+(ie.resolved[Z]??0),0),ce=X=>{const Me=A[X];return ye(X)+(Me.marginLeftKey?T[Me.marginLeftKey]??0:0)+(ie.resolved[X]??0)},K=(X,Me,Se)=>{const Z=X.marginLeftKey?T[X.marginLeftKey]??0:0,{effectiveWidth:He,resolvedWidth:We,maxWidth:ot}=Se??le(X,Me),qe=Math.max(Z,ni),tt=o&&Me==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":X.prefix,style:{width:F.scalingValue(He,i),...Z>0?{marginLeft:F.scalingValue(Z,i)}:{}},children:[a.jsx("p",{className:X.className,style:X.style,children:X.text}),tt&&X.marginLeftKey?a.jsx("div",{"data-controls":X.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(We),style:{position:"absolute",top:0,left:F.scalingValue(-Z,i),width:F.scalingValue(qe,i),height:"100%",pointerEvents:"auto"}}):null,tt?a.jsx("div",{"data-controls":X.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ot),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:F.scalingValue(-Pn/2,i),width:F.scalingValue(Pn,i),height:"100%",pointerEvents:"auto"}}):null]},X.className)},se=(X="two-row")=>{const Me=C.findIndex(He=>He.prefix==="title1"),Se=Me>=0?w[Me]:E.title1Width,Z=X==="two-row"&&o;return a.jsx("div",{...Z?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Se)}:{},style:{width:F.scalingValue(p??0,i),flexShrink:0,alignSelf:"stretch",...Z?{pointerEvents:"auto"}:{}}})},pe=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:$,"aria-hidden":"true",children:" "}),fe=X=>{const Me=wi(e,X,$,L,D);return a.jsx(a.Fragment,{children:Me.map(Se=>K(Se,"single-row",J(Me,Se,"single-row")))})},we=X=>{const Me=wi(e,X,$,L,D),Se=Me.find(Z=>Z.prefix==="title1");return Se?K(Se,"two-row-top",J(Me,Se,"two-row-top")):null},Ie=(X,Me=!1)=>{const Se=wi(e,X,$,L,D),Z=Se.filter(ot=>ot.prefix==="title2"||ot.prefix==="title3"),He=o&&Me;return Z.length>0||He||(g??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[Z.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[a.jsx("div",{className:`${e}-titles-stack`,children:Z.map(ot=>K(ot,"two-row-bottom",J(Se,ot,"two-row-bottom")))}),Me&&o?a.jsxs(a.Fragment,{children:[ue(),B()]}):null]}):null,(g??0)>0||He?a.jsx("div",{"data-controls":He?"titleRowMarginBottom":void 0,"data-controls-axis":He?"y":void 0,"data-controls-reverse":He?"":void 0,className:He?`${e}-control`:void 0,style:{height:_,width:"100%",flexShrink:0,pointerEvents:He?"auto":"none"}}):null]}):null},me=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:F.scalingValue(f??0,i),height:F.scalingValue(f??0,i),marginRight:P,"--close-icon-hover-color":W},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:X=>{X.stopPropagation(),l==null||l()},"aria-label":"Close",children:a.jsx(gn,{url:R??"",fill:S,hoverFill:i&&!r?S:W,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:P,height:"100%",pointerEvents:"auto"}})]}),xe=()=>O?a.jsx("div",{className:`${e}-titles-row-header-controls`,children:me()}):null,Ce=X=>a.jsx("div",{className:`${e}-titles-row-titles`,children:a.jsx("div",{className:`${e}-titles-stack`,children:X})}),h=X=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[O||ae?pe():null,N?se("two-row"):null,Ce(X),xe()]}),Y=(X,Me=!1)=>a.jsxs(a.Fragment,{children:[h(we(X)),Ie(X,Me)]}),Q=()=>{const X=G?-1:C.findIndex(Z=>Z.prefix==="title1"),Me=!G&&(o||(p??0)>0)?(()=>{const Z=p??0,He=X>=0?w[X]:E.title1Width,We=Math.max(Z,ni);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(He),style:{position:"absolute",top:0,left:0,width:F.scalingValue(We,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Se=C.flatMap((Z,He)=>{if(!Z.marginLeftKey)return[];const We=T[Z.marginLeftKey]??0,ot=Ju(C,w,T,He)+Pe(),qe=Math.max(We,ni);return a.jsx("div",{"data-controls":Z.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(w[He]),style:{position:"absolute",top:0,left:F.scalingValue(ot,i),width:F.scalingValue(qe,i),height:"100%",pointerEvents:"auto"}},Z.marginLeftKey)});return Me?[Me,...Se]:Se},ne=()=>C.map((X,Me)=>{const Se=yn(Me,w),He=be(Me)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":X.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Se),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:F.scalingValue(He,i),width:F.scalingValue(Pn,i),height:"100%",pointerEvents:"auto"}})},`${X.widthKey}-junction`)}),ue=()=>A.flatMap((X,Me)=>{if(!X.marginLeftKey)return[];const Se=T[X.marginLeftKey]??0,Z=ye(Me),He=Math.max(Se,ni),{resolvedWidth:We}=le(X,"two-row-bottom");return a.jsx("div",{"data-controls":X.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(We),style:{position:"absolute",top:0,left:F.scalingValue(Z,i),width:F.scalingValue(He,i),height:"100%",pointerEvents:"auto"}},X.marginLeftKey)}),B=()=>A.map((X,Me)=>{const{maxWidth:Se}=le(X,"two-row-bottom"),He=ce(Me)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":X.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Se),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:F.scalingValue(He,i),width:F.scalingValue(Pn,i),height:"100%",pointerEvents:"auto"}})},`${X.widthKey}-junction`)}),I=()=>!o||G?null:a.jsxs(a.Fragment,{children:[Q(),ne()]}),ee=!!(t.title2||t.title3||(g??0)>0||o),te=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[O||ae?pe():null,N?se("single-row"):null,ae?Ce(fe(t)):a.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),xe(),I()]}),ge=()=>a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...ee?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:ee?void 0:{flex:"0 0 auto",height:"auto"},children:Y(t,!0)}),I()]});return a.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:q,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:z,pointerEvents:"auto"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...G?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${G?` ${e}-lightbox-content-area-stacked`:""}`,children:a.jsx("div",{className:`${e}-text-bar-cell${G?` ${e}-text-bar-cell-stacked`:""}`,style:G?void 0:{flex:1,minWidth:0,width:"100%"},children:G?ge():te()})})})]})}function xv(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function bv(e){return`
7310
+ `,rs={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},ov=["titleColor","subtitleColor","lightboxCounterColor"],rv={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["gallery"]},default:[{title:"Earth-orbital mission",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"01M3QM74XESYN1HRYH9VRTZ5CK",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Salton Sea from Above",subtitle:"Hasselblad 500 EL / Zeiss Sonnar 250 mm / SO-368 Ektachrome",gallery:[{media:[{url:"01M3QM74XERA3G7J0J00XVKEXX",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module Pilot",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module 3 porch",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Command Module",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XEZCK8SJPAFXCKG8QN",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"CSM and Lunar Module LM",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"David R. Scott during EVA",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Fourth day of the mission",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"01M3QM74XES6MX14JTT1CF24BB",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Landing of the Spider1",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"01M3QM74XEMGJWCYNPZ3ETQTKM",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c","d","e","f"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},imageCorners:{type:"number",scope:"layout",title:"Round corners",min:0,display:{type:"numeric-input"}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...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",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"off",align:"top",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"b",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,imageCorners:0,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.064,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},t:{type:"b",gridLayout:{entryWidth:.1041,horizontalGap:.26041,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:250,verticalGap:.09722,entriesCount:0,titleMarginTop:.01953125,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.03255,titleLineHeight:.03255,titleLetterSpacing:-.00118,subtitleFontSize:.01822,subtitleLineHeight:.02083,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},d:{type:"b",gridLayout:{entryWidth:.0833,horizontalGap:.25,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","align","entriesCount","lightbox","imageDisplay","imageCorners","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","verticalGap"]},{type:"row",title:"",items:["entriesCount","showText"]},{type:"row",title:"",items:["alignEntries","align"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay","imageCorners"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","direction"]},{type:"group",title:"",items:["sliderTiming","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...ov],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},av={element:ev,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"subtitleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",subtitleFontSettings:"subtitleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"},schema:rv,sourceCode:iv},sv=50,Mc=10,Al="cntrl-lightbox-journal",Da=Al,Gs=`${Al}-`,Ba=e=>`${Al}-${e}`,Fl=e=>e===Da||e.startsWith(Gs),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(Ba(e)));if(i)return i}const n=Ec(t.get(Da));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},Ac=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Ku=(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(Ba(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)},lv=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===Ba(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)}},Qu=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(Ba(e)):[...t.keys()].some(n=>Fl(n))},cv=(e,t)=>{if(Qu(t)){if(e){window.history.back();return}lv(t)}},dv=20,uv=2,as=e=>`max(${e}, ${dv}px)`,Lo=e=>((e==null?void 0:e.image)??[]).slice(0,uv),Zu=e=>e.reduce((t,n)=>t+Lo(n).length,0),pv=(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}},gv=(e,t)=>{const n=Zu(e),{start:i,end:o}=pv(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)})),mv=(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 gv(i,o)},Fc=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",hv=(e,t,n)=>e==="B"?t.length>1:Zu(n)>1,Pn=.004,ni=.004,bo={title1Width:.13,title2Width:.13,title3Width:.14},wi=(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},Po=(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)=>Po(e,t),yn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},$i=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Po(e.length,n),effective:vr(e.length,n)}},Ju=(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),ep=(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),Pi=["title1","title2","title3","count"],bt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Nl={title1:"1",title2:"2",title3:"3",count:"Count"},_l=e=>[bt(e,"fontFamily"),bt(e,"fontSettings"),{type:"row",items:[bt(e,"fontSize"),bt(e,"lineHeight"),bt(e,"letterSpacing"),bt(e,"wordSpacing")]},bt(e,"textAlign"),bt(e,"textAppearance")],fv=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Pi.map(e=>[Nl[e],_l(e)]))}),yv={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},vv={title1:.02,title2:.02,title3:.02,count:.017},Bi=(e,t)=>{const n=i=>{const o=bt(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[yv[t]]}},zi=(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??vv[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return en(i,n)};function tp({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:v=0,titleRowMarginBottom:g=0,titleHeaderLayout:m="desktop",contentMarginTop:x=0,iconMarginRight:b=0,closeIcon:M=null,closeIconMaxWidth:f=0,closeIconColor:S="#000000",closeIconHoverColor:W="#cccccc"}=n,q=F.scalingValue(x,i),z=F.scalingValue(Math.max(x,ni),i),P=F.scalingValue(b,i),_=F.scalingValue(g,i),G=m==="mobile",$=zi("title1",Bi(n,"title1"),i),L=zi("title2",Bi(n,"title2"),i),D=zi("title3",Bi(n,"title3"),i),E=s.useMemo(()=>({title1Width:c??bo.title1Width,title2Width:d??bo.title2Width,title3Width:u??bo.title3Width}),[c,d,u]),T=s.useMemo(()=>({title2MarginLeft:y,title3MarginLeft:v}),[y,v]),C=s.useMemo(()=>wi(e,t,$,L,D),[e,t,$,L,D]),V=s.useMemo(()=>C.map(X=>E[X.widthKey]),[C,E]),w=s.useMemo(()=>Po(C.length,V),[C.length,V]),U=s.useMemo(()=>vr(C.length,V),[C.length,V]),I=s.useMemo(()=>C.filter(X=>X.prefix==="title1"),[C]),A=s.useMemo(()=>C.filter(X=>X.prefix==="title2"||X.prefix==="title3"),[C]),j=s.useMemo(()=>$i(I,E),[I,E]),ie=s.useMemo(()=>$i(A,E),[A,E]),ae=!!(t.title1||t.title2||t.title3),O=M!==null;if(!(ae||O))return null;const N=(p??0)>0||o,le=(X,Ie)=>{const Se=C.findIndex(He=>He.prefix===X.prefix);if(!G||Ie==="single-row")return{effectiveWidth:U[Se]??0,resolvedWidth:w[Se]??0,maxWidth:yn(Se,w)};if(Ie==="two-row-top"){const He=I.findIndex(We=>We.prefix===X.prefix);return{effectiveWidth:j.effective[He]??0,resolvedWidth:j.resolved[He]??0,maxWidth:yn(He,j.resolved)}}const Z=A.findIndex(He=>He.prefix===X.prefix);return{effectiveWidth:ie.effective[Z]??0,resolvedWidth:ie.resolved[Z]??0,maxWidth:yn(Z,ie.resolved)}},J=(X,Ie,Se)=>{if(!G||Se==="single-row"){const qe=X.findIndex(ve=>ve.prefix===Ie.prefix),tt=X.map(ve=>E[ve.widthKey]),et=Po(X.length,tt);return{effectiveWidth:vr(X.length,tt)[qe]??0,resolvedWidth:et[qe]??0,maxWidth:yn(qe,et)}}if(Se==="two-row-top"){const qe=X.filter(ve=>ve.prefix==="title1"),tt=qe.findIndex(ve=>ve.prefix===Ie.prefix),{resolved:et,effective:Ge}=$i(qe,E);return{effectiveWidth:Ge[tt]??0,resolvedWidth:et[tt]??0,maxWidth:yn(tt,et)}}const Z=X.filter(qe=>qe.prefix==="title2"||qe.prefix==="title3"),He=Z.findIndex(qe=>qe.prefix===Ie.prefix),{resolved:We,effective:ot}=$i(Z,E);return{effectiveWidth:ot[He]??0,resolvedWidth:We[He]??0,maxWidth:yn(He,We)}},be=X=>ep(C,w,T,X)+(G?0:p??0),Pe=()=>G?0:p??0,ye=X=>A.slice(0,X).reduce((Ie,Se,Z)=>Ie+(Se.marginLeftKey?T[Se.marginLeftKey]??0:0)+(ie.resolved[Z]??0),0),ce=X=>{const Ie=A[X];return ye(X)+(Ie.marginLeftKey?T[Ie.marginLeftKey]??0:0)+(ie.resolved[X]??0)},K=(X,Ie,Se)=>{const Z=X.marginLeftKey?T[X.marginLeftKey]??0:0,{effectiveWidth:He,resolvedWidth:We,maxWidth:ot}=Se??le(X,Ie),qe=Math.max(Z,ni),tt=o&&Ie==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":X.prefix,style:{width:F.scalingValue(He,i),...Z>0?{marginLeft:F.scalingValue(Z,i)}:{}},children:[a.jsx("p",{className:X.className,style:X.style,children:X.text}),tt&&X.marginLeftKey?a.jsx("div",{"data-controls":X.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(We),style:{position:"absolute",top:0,left:F.scalingValue(-Z,i),width:F.scalingValue(qe,i),height:"100%",pointerEvents:"auto"}}):null,tt?a.jsx("div",{"data-controls":X.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ot),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:F.scalingValue(-Pn/2,i),width:F.scalingValue(Pn,i),height:"100%",pointerEvents:"auto"}}):null]},X.className)},se=(X="two-row")=>{const Ie=C.findIndex(He=>He.prefix==="title1"),Se=Ie>=0?w[Ie]:E.title1Width,Z=X==="two-row"&&o;return a.jsx("div",{...Z?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Se)}:{},style:{width:F.scalingValue(p??0,i),flexShrink:0,alignSelf:"stretch",...Z?{pointerEvents:"auto"}:{}}})},pe=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:$,"aria-hidden":"true",children:" "}),fe=X=>{const Ie=wi(e,X,$,L,D);return a.jsx(a.Fragment,{children:Ie.map(Se=>K(Se,"single-row",J(Ie,Se,"single-row")))})},we=X=>{const Ie=wi(e,X,$,L,D),Se=Ie.find(Z=>Z.prefix==="title1");return Se?K(Se,"two-row-top",J(Ie,Se,"two-row-top")):null},Re=(X,Ie=!1)=>{const Se=wi(e,X,$,L,D),Z=Se.filter(ot=>ot.prefix==="title2"||ot.prefix==="title3"),He=o&&Ie;return Z.length>0||He||(g??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[Z.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[a.jsx("div",{className:`${e}-titles-stack`,children:Z.map(ot=>K(ot,"two-row-bottom",J(Se,ot,"two-row-bottom")))}),Ie&&o?a.jsxs(a.Fragment,{children:[ue(),B()]}):null]}):null,(g??0)>0||He?a.jsx("div",{"data-controls":He?"titleRowMarginBottom":void 0,"data-controls-axis":He?"y":void 0,"data-controls-reverse":He?"":void 0,className:He?`${e}-control`:void 0,style:{height:_,width:"100%",flexShrink:0,pointerEvents:He?"auto":"none"}}):null]}):null},me=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:F.scalingValue(f??0,i),height:F.scalingValue(f??0,i),marginRight:P,"--close-icon-hover-color":W},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:X=>{X.stopPropagation(),l==null||l()},"aria-label":"Close",children:a.jsx(gn,{url:M??"",fill:S,hoverFill:i&&!r?S:W,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:P,height:"100%",pointerEvents:"auto"}})]}),xe=()=>O?a.jsx("div",{className:`${e}-titles-row-header-controls`,children:me()}):null,Ce=X=>a.jsx("div",{className:`${e}-titles-row-titles`,children:a.jsx("div",{className:`${e}-titles-stack`,children:X})}),h=X=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[O||ae?pe():null,N?se("two-row"):null,Ce(X),xe()]}),Y=(X,Ie=!1)=>a.jsxs(a.Fragment,{children:[h(we(X)),Re(X,Ie)]}),Q=()=>{const X=G?-1:C.findIndex(Z=>Z.prefix==="title1"),Ie=!G&&(o||(p??0)>0)?(()=>{const Z=p??0,He=X>=0?w[X]:E.title1Width,We=Math.max(Z,ni);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(He),style:{position:"absolute",top:0,left:0,width:F.scalingValue(We,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Se=C.flatMap((Z,He)=>{if(!Z.marginLeftKey)return[];const We=T[Z.marginLeftKey]??0,ot=Ju(C,w,T,He)+Pe(),qe=Math.max(We,ni);return a.jsx("div",{"data-controls":Z.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(w[He]),style:{position:"absolute",top:0,left:F.scalingValue(ot,i),width:F.scalingValue(qe,i),height:"100%",pointerEvents:"auto"}},Z.marginLeftKey)});return Ie?[Ie,...Se]:Se},ne=()=>C.map((X,Ie)=>{const Se=yn(Ie,w),He=be(Ie)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":X.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Se),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:F.scalingValue(He,i),width:F.scalingValue(Pn,i),height:"100%",pointerEvents:"auto"}})},`${X.widthKey}-junction`)}),ue=()=>A.flatMap((X,Ie)=>{if(!X.marginLeftKey)return[];const Se=T[X.marginLeftKey]??0,Z=ye(Ie),He=Math.max(Se,ni),{resolvedWidth:We}=le(X,"two-row-bottom");return a.jsx("div",{"data-controls":X.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(We),style:{position:"absolute",top:0,left:F.scalingValue(Z,i),width:F.scalingValue(He,i),height:"100%",pointerEvents:"auto"}},X.marginLeftKey)}),B=()=>A.map((X,Ie)=>{const{maxWidth:Se}=le(X,"two-row-bottom"),He=ce(Ie)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":X.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Se),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:F.scalingValue(He,i),width:F.scalingValue(Pn,i),height:"100%",pointerEvents:"auto"}})},`${X.widthKey}-junction`)}),R=()=>!o||G?null:a.jsxs(a.Fragment,{children:[Q(),ne()]}),ee=!!(t.title2||t.title3||(g??0)>0||o),te=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[O||ae?pe():null,N?se("single-row"):null,ae?Ce(fe(t)):a.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),xe(),R()]}),ge=()=>a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...ee?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:ee?void 0:{flex:"0 0 auto",height:"auto"},children:Y(t,!0)}),R()]});return a.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:q,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:z,pointerEvents:"auto"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...G?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${G?` ${e}-lightbox-content-area-stacked`:""}`,children:a.jsx("div",{className:`${e}-text-bar-cell${G?` ${e}-text-bar-cell-stacked`:""}`,style:G?void 0:{flex:1,minWidth:0,width:"100%"},children:G?ge():te()})})})]})}function xv(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function bv(e){return`
7311
7311
  .${e}-wrapper {
7312
7312
  display: grid;
7313
7313
  align-items: start;
@@ -7627,7 +7627,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
7627
7627
  pointer-events: auto;
7628
7628
  flex-shrink: 0;
7629
7629
  }
7630
- `}const Nc={url:"",name:"",objectFit:"cover"},Hn=500,qo=650,wn="cubic-bezier(0.22, 1, 0.36, 1)",Sv=72,wv=50,$v=1e4,Cv=650,Tv=500;function Lv(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 np(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 Pv(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?np(i,n):null}function Mv(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 Iv=.03;function ip(e){return e.width*Iv}const ss={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function zr(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 Rv(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 Ev(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Xs(e,t.width,t.height)}function kv(e,t){if(Bo(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function Av(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.url&&!t.has(c.url)&&(t.add(c.url),n.push(c))}return n}function Fv({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Bo(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function Mo(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 wa(e,t,n){const i=Mo(e,t,n);return{...i,left:2*i.left-e.left}}function Nv(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 op(e,t,n,i){const o=Mo(e,"left",i),r=Mo(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 _v(e,t,n,i){const{start:o,end:r}=op(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function Hv(e,t,n){const i=Mo(e,t,n),o=wa(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function rp(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(rp(e))return e;if(!Array.isArray(e))return;const[t,n]=e,i=t!=null&&t.url?t:void 0,o=n!=null&&n.url?n:void 0;if(!(!i&&!o))return[{media:[o??i??Nc,i??o??Nc]}]}function Wv(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Ov(e){const[t]=e.media;return t!=null&&t.url?t:null}function Wl(e){if(!Array.isArray(e)||e.length===0)return[];if(rp(e)){const t=[];for(const n of e){const i=Wv(n);if(!i)continue;const o=Ov(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.url?o:null})}return t}return e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Bo(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function Dv({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return Bo(e)?a.jsx("video",{src:e.url,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onClick:o}):a.jsx("img",{src:e.url,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function Bv({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 Bo(e)?a.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.url,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.url,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function 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:v,resolveCloseSourceRect:g,onClose:m,onPrev:x,onNext:b}){const R=s.useRef(null),f=s.useRef(null),S=s.useRef(null),W=s.useRef(new Map),[q,z]=s.useState(0),P=s.useRef(null),_=s.useRef(0),G=s.useRef(0),$=s.useRef("none"),L=s.useRef(!1),D=s.useRef(!1),E=s.useRef(!1),T=s.useRef(null),C=s.useRef(null),V=s.useRef(null),w=s.useRef(()=>{}),U=s.useRef(null),M=s.useRef(null),A=s.useRef(null),j=s.useRef(!1),[ie,ae]=s.useState(null),[O,re]=s.useState(ss),[N,le]=s.useState(0),[J,be]=s.useState("opening"),[Pe,ye]=s.useState(0),[ce,K]=s.useState(0),[se,pe]=s.useState(!1),[fe,we]=s.useState(null),[Ie,me]=s.useState(null),[xe,Ce]=s.useState(null),[h,Y]=s.useState(!1),[Q,ne]=s.useState(null),[ue,B]=s.useState(!1),I=s.useRef(!1),[ee,te]=s.useState(!1),[ge,X]=s.useState(!1),Me=s.useRef(n),Se=s.useRef(void 0),Z=t[n],He=Z?Bo(Z):!1,We=ce!==0||se,ot=!l&&(!r||!!c),qe=d&&!l,tt=u.length>1,et=s.useCallback((H,Le)=>t.length<=1?null:t[(H+Le+t.length)%t.length]??null,[t]),Ge=tt?ir(u,p,-1):et(n,-1),ve=tt?ir(u,p,1):et(n,1),_e=fe===-1&&We?tt&&Ie!==null?ir(u,Ie,-1):xe!==null?et(xe,-1):null:null,ze=fe===1&&We?tt&&Ie!==null?ir(u,Ie,1):xe!==null?et(xe,1):null:null,Qe=_e&&_e.url!==(Ge==null?void 0:Ge.url)?_e:null,$e=ze&&ze.url!==(ve==null?void 0:ve.url)?ze:null,Ne=Ge&&qe?(()=>{const H=tt?_c(u,p,-1):t.length>2?et((n-1+t.length)%t.length,-1):null;return H&&H.url!==Ge.url?H:null})():null,Ye=ve&&qe?(()=>{const H=tt?_c(u,p,1):t.length>2?et((n+1)%t.length,1):null;return H&&H.url!==ve.url?H:null})():null,Ze=Qe??Ne,st=$e??Ye,it=s.useCallback((H,Le,je)=>{if(!H||!Le||!je)return;const Fe=W.current,ft=Fe.get(H);(ft==null?void 0:ft.width)===Le&&(ft==null?void 0:ft.height)===je||(Fe.set(H,{width:Le,height:je}),z(Ht=>Ht+1))},[]),Oe=s.useCallback(H=>{if(!(H!=null&&H.url))return null;const Le=W.current.get(H.url);return Ev(f.current,Le)},[q,N]),Ae=s.useCallback(()=>{if(!Z)return;const H=Oe(Z);if(H){ae(H);return}const Le=f.current;Le&&ae(Hc(Le))},[Z,Oe]),mt=s.useCallback(H=>{if(tt){const Le=u.length;me((p+H+Le)%Le),Ce(null);return}t.length>1&&(Ce((n+H+t.length)%t.length),me(null))},[tt,u.length,p,t.length,n]),Be=s.useCallback(H=>{E.current=H,pe(H)},[]),De=s.useCallback(()=>{T.current!==null&&(window.clearTimeout(T.current),T.current=null)},[]),Ue=s.useCallback(()=>{De(),T.current=window.setTimeout(()=>{De(),Be(!1)},qo+32)},[De,Be]),ct=s.useCallback(()=>{const H=R.current;if(!H){re({left:0,top:0,width:typeof window<"u"?window.innerWidth:ss.width,height:typeof window<"u"?window.innerHeight:ss.height});return}const Le=H.getBoundingClientRect();re({left:Le.left,top:Le.top,width:Le.width,height:Le.height})},[]),he=s.useCallback((H,Le)=>{if(We){if(ee&&!se)return`translate(${ce}px, 0px)`;if(se&&fe!==null){const je=Oe(H);if(!je)return;const{x:Fe,y:ft}=_v(je,Le,fe,O);return`translate(${Fe}px, ${ft}px)`}if(se)return"translate(0px, 0px)"}},[We,ee,se,ce,fe,O,Oe]),Re=s.useCallback(()=>{const H=C.current;C.current=null,De(),Be(!1),we(null),me(null),Ce(null),K(0),te(!1),L.current=!1,G.current=0,$.current="none",H===-1?x():H===1&&b()},[De,Be,x,b]),nt=s.useCallback(()=>{De(),T.current=window.setTimeout(()=>{C.current!==null&&Re()},qo+32)},[De,Re]),pt=s.useCallback(()=>{De(),C.current=null,Be(!1),we(null),me(null),Ce(null),K(0),te(!1),L.current=!1,G.current=0,$.current="none"},[De,Be]),Ve=s.useCallback(H=>{if(!(!qe||!ie)){if(E.current){if(C.current===H){V.current=H,Re();return}pt()}De(),mt(H),C.current=H,we(H),Be(!0),nt()}},[qe,ie,Re,pt,De,mt,Be,nt]);w.current=Ve;const vt=s.useCallback(()=>{U.current=null,j.current=!1,M.current!==null&&(window.clearInterval(M.current),M.current=null),A.current!==null&&(window.clearTimeout(A.current),A.current=null)},[]),Mt=s.useCallback(H=>{M.current!==null&&window.clearInterval(M.current);const Le=j.current?Tv:Cv;M.current=window.setInterval(()=>{w.current(H)},Le)},[]),At=s.useCallback(H=>{U.current!==H&&(vt(),U.current=H,j.current=!1,w.current(H),Mt(H),A.current=window.setTimeout(()=>{A.current=null,U.current===H&&(j.current=!0,Mt(H))},$v))},[vt,Mt]),wt=s.useCallback(()=>{const H=f.current;if(!H)return;const Le=Z==null?void 0:Z.url,je=Le?W.current.get(Le):void 0;if(je!=null&&je.width&&(je!=null&&je.height)){ae(Xs(H,je.width,je.height));return}const Fe=S.current;if(Fe&&Le&&(Fe.src===Le||Fe.currentSrc===Le)){const{width:Ht,height:gt}=Rv(Fe);if(Ht&&gt){it(Le,Ht,gt),ae(Xs(H,Ht,gt));return}}const ft=Hc(H);!ft.width||!ft.height||ae(ft)},[Z==null?void 0:Z.url,it]),Vt=s.useCallback(H=>{if(S.current=H,!!H){if(H instanceof HTMLVideoElement){H.readyState>=1&&H.videoWidth>0&&wt();return}H.complete&&H.naturalWidth>0&&wt()}},[wt]),jt=s.useCallback(()=>{ct(),wt(),le(H=>H+1)},[ct,wt]);s.useEffect(()=>{jt();const H=f.current,Le=R.current,je=new ResizeObserver(()=>jt());return H&&je.observe(H),Le&&je.observe(Le),window.addEventListener("resize",jt),()=>{je.disconnect(),window.removeEventListener("resize",jt)}},[jt,n,y]),s.useLayoutEffect(()=>{if(!Z)return;const H=S.current;if(H){if(H instanceof HTMLImageElement&&H.complete&&H.naturalWidth>0){wt();return}H instanceof HTMLVideoElement&&H.readyState>=1&&H.videoWidth>0&&wt()}},[Z==null?void 0:Z.url,n,wt]),s.useEffect(()=>{Ae()},[Ae,q]),s.useEffect(()=>{const H=new Set,Le=[],je=Fe=>{!(Fe!=null&&Fe.url)||H.has(Fe.url)||(H.add(Fe.url),Le.push(Fe))};t.forEach(je),u.forEach(Fe=>Fe.items.forEach(je)),Le.forEach(Fe=>{W.current.has(Fe.url)||kv(Fe,it)})},[t,u,it]),s.useEffect(()=>{if(J!=="opening"||!ie)return;if(!v){be("open");return}Y(!1);const H=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Y(!0),be("open")})});return()=>cancelAnimationFrame(H)},[J,ie,v]),s.useEffect(()=>{if(J!=="closing")return;const H=setTimeout(()=>m(),Hn);return()=>clearTimeout(H)},[J,m]),s.useEffect(()=>()=>{De()},[De]),s.useLayoutEffect(()=>{Me.current===n&&Se.current===(Z==null?void 0:Z.url)||(De(),C.current=null,we(null),me(null),Ce(null),ye(0),K(0),Be(!1),X(!1),te(!1),_.current=0,G.current=0,$.current="none",L.current=!1,P.current=null,D.current=!1,S.current=null,Ae(),Me.current=n,Se.current=Z==null?void 0:Z.url)},[n,Z==null?void 0:Z.url,Be,De,Ae]),s.useLayoutEffect(()=>{const H=V.current;H!==null&&(V.current=null,requestAnimationFrame(()=>{w.current(H)}))},[n,p,Z==null?void 0:Z.url]),s.useLayoutEffect(()=>{if(J==="opening"){I.current=!1,B(!1);return}if(J!=="open"||I.current)return;if(!Ge&&!ve){I.current=!0;return}B(!1);const H=requestAnimationFrame(()=>{requestAnimationFrame(()=>{B(!0),I.current=!0})});return()=>cancelAnimationFrame(H)},[J,Ge==null?void 0:Ge.url,ve==null?void 0:ve.url]),s.useEffect(()=>{if(J!=="open")return;const H=()=>{const gt=Lt=>{Lt.stopPropagation(),Lt.preventDefault(),document.removeEventListener("click",gt,!0)};document.addEventListener("click",gt,!0)},Le=gt=>{const Lt=gt<0?1:-1;De(),mt(Lt),C.current=Lt,we(Lt),Be(!0),nt()},je=gt=>{if(Math.abs(gt)>wv&&qe){Le(gt);return}C.current=null,we(null),me(null),Ce(null),Be(!0),K(0),Ue()},Fe=gt=>{if(gt.touches.length!==1||E.current)return;const Lt=gt.touches[0];D.current=!0,P.current={x:Lt.clientX,y:Lt.clientY},$.current="none",G.current=0,L.current=!1},ft=gt=>{if(!P.current||gt.touches.length!==1||E.current)return;const Lt=gt.touches[0],qt=Lt.clientX-P.current.x,Dt=Lt.clientY-P.current.y;if($.current==="none"){if(Math.abs(qt)<10&&Math.abs(Dt)<10)return;if(Math.abs(qt)>Math.abs(Dt)){if(!qe)return;$.current="horizontal"}else if(Dt>0){if(!ot)return;$.current="vertical"}else return}if($.current==="horizontal"){L.current=!0,te(!0),G.current=qt,K(qt),gt.preventDefault();return}$.current==="vertical"&&(L.current=!0,te(!0),_.current=Dt,ye(Dt),gt.preventDefault())},Ht=()=>{if(!P.current)return;const gt=$.current,Lt=L.current;if(Lt&&gt==="horizontal")je(G.current),H();else if(Lt&&gt==="vertical"){const qt=_.current;if(ot&&qt>Sv){const Dt=window.innerHeight;_.current=Dt,X(!0),ye(Dt),be("closing")}else _.current=0,ye(0);H()}else gt==="horizontal"&&Math.abs(G.current)>0&&(je(G.current),H());P.current=null,$.current="none",G.current=0,L.current=!1,te(!1)};return document.addEventListener("touchstart",Fe,{passive:!0}),document.addEventListener("touchmove",ft,{passive:!1}),document.addEventListener("touchend",Ht),document.addEventListener("touchcancel",Ht),()=>{document.removeEventListener("touchstart",Fe),document.removeEventListener("touchmove",ft),document.removeEventListener("touchend",Ht),document.removeEventListener("touchcancel",Ht)}},[J,qe,Be,Ue,De,ot,nt,mt]);const Yt=s.useCallback(()=>{const H=(g==null?void 0:g())??v??null;H&&ie&&(ne(H),Y(!0)),be("closing")},[g,v,ie]);s.useEffect(()=>{const H=Fe=>{if(Fe.key==="Escape"){if(r&&c||J==="closing")return;vt(),Yt();return}if(Fe.key!=="ArrowLeft"&&Fe.key!=="ArrowRight"||J!=="open"||!qe)return;Fe.preventDefault();const ft=Fe.key==="ArrowLeft"?-1:1;Fe.repeat&&U.current===ft||At(ft)},Le=Fe=>{if(Fe.key!=="ArrowLeft"&&Fe.key!=="ArrowRight")return;const ft=Fe.key==="ArrowLeft"?-1:1;U.current===ft&&vt()},je=()=>{vt()};return window.addEventListener("keydown",H),window.addEventListener("keyup",Le),window.addEventListener("blur",je),()=>{window.removeEventListener("keydown",H),window.removeEventListener("keyup",Le),window.removeEventListener("blur",je),vt()}},[J,r,c,Yt,qe,At,vt]),s.useEffect(()=>{J!=="open"&&vt()},[J,vt]);const Kt=()=>{J==="closing"||l||Yt()},It=J==="open",zt=J==="closing",on=Pe>0?Math.max(0,1-Pe/500):1,xt=Pe>0?Math.max(.35,1-Pe/500):1,yt=s.useCallback(H=>{if(!(H.propertyName!=="transform"||!E.current)){if(C.current!==null){Re();return}De(),Be(!1)}},[De,Be,Re]),ke=J==="closing"?Q??v:v,Je=ke&&ie&&(J==="opening"||zt)?Lv(ke,ie):void 0,rt=We&&Z?he(Z,"center"):Pe>0?`translateY(${Pe}px)`:Je,dt=ie?zr(ie,O):null,Pt=!!(ke&&ie),St=Pt&&(J==="closing"||J==="open"&&h),ht={position:"absolute",top:dt==null?void 0:dt.top,left:dt==null?void 0:dt.left,width:dt==null?void 0:dt.width,height:dt==null?void 0:dt.height,objectFit:"contain",transformOrigin:"top left",transform:rt,opacity:Pe>0?xt:Pt?1:J==="opening"||zt?0:1,transition:ee&&!se?"none":se?`transform ${qo}ms ${wn}`:ge?`transform ${Hn}ms ${wn}, opacity ${Hn}ms ${wn}`:St?`transform ${Hn}ms ${wn}`:J==="opening"||zt?`opacity ${Hn}ms ${wn}`:"none",pointerEvents:He&&It&&!We?"auto":"none",touchAction:He&&It?"none":void 0,zIndex:1,overflow:He?"hidden":void 0},Wt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:It&&!We?"auto":"none"},Tt=(H,Le,je="adjacent")=>{const Fe=Oe(H);if(!Fe)return{display:"none"};const ft=je==="far"?Le==="left"?"far-left":"far-right":Le==="left"?"left-adjacent":"right-adjacent",{start:Ht}=fe!==null?op(Fe,ft,fe,O):{start:je==="far"?wa(Fe,Le,O):Mo(Fe,Le,O)},gt=zr(Ht,O),Lt=he(H,ft),qt=!We&&je==="adjacent"&&It&&!ue?Hv(Fe,Le,O):null,Dt=je==="far"&&We&&fe===(Le==="left"?-1:1),an=ee&&!se?!1:se,cn=je==="adjacent"&&It&&ue&&!We;return{position:"absolute",top:gt.top,left:gt.left,width:gt.width,height:gt.height,objectFit:"contain",transform:Lt??(qt?`translate(${qt.x}px, ${qt.y}px)`:void 0),opacity:je==="far"?It&&Dt?1:0:It?1:0,transition:an?je==="far"?`transform ${qo}ms ${wn}`:`transform ${qo}ms ${wn}, opacity ${Hn}ms ${wn}`:cn?`transform ${Hn}ms ${wn}`:J==="opening"||zt?`opacity ${Hn}ms ${wn}`:"none",pointerEvents:"none",zIndex:1}},Ot=(H,Le)=>{const je=Oe(H);return je?Nv(Mo(je,Le,O),Le,O):null},Gt=H=>Le=>{if(!l){if(D.current){D.current=!1;return}Le.stopPropagation(),Ve(H)}},kt=Ge?Ot(Ge,"left"):null,_t=ve?Ot(ve,"right"):null,Ft=kt?zr(kt,O):null,ut=_t?zr(_t,O):null;return a.jsxs("div",{ref:R,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:J==="open"?"none":void 0},onClick:Kt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:It?on:0,transition:ee?"none":`opacity ${Hn}ms ${wn}`,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:f,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:It?1:0,transition:ee?"none":`opacity ${Hn}ms ${wn}`,pointerEvents:"none"},children:a.jsx(tp,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,onClose:Kt})})]}),It&&Ze&&a.jsx(jr,{media:Ze,style:Tt(Ze,"left","far"),onMeasure:it,onTransitionEnd:yt},`far-prev-${Ze.url}`),It&&Ge&&a.jsxs(a.Fragment,{children:[a.jsx(jr,{media:Ge,style:Tt(Ge,"left"),onMeasure:it,onTransitionEnd:yt},`prev-${Ge.url}`),Ft&&a.jsx("div",{style:{position:"absolute",top:Ft.top,left:Ft.left,width:Ft.width,height:Ft.height,cursor:l||ee?"default":"pointer",pointerEvents:l||ee?"none":"auto",zIndex:3},onClick:Gt(-1)})]}),It&&ve&&a.jsxs(a.Fragment,{children:[a.jsx(jr,{media:ve,style:Tt(ve,"right"),onMeasure:it,onTransitionEnd:yt},`next-${ve.url}`),ut&&a.jsx("div",{style:{position:"absolute",top:ut.top,left:ut.left,width:ut.width,height:ut.height,cursor:l||ee?"default":"pointer",pointerEvents:l||ee?"none":"auto",zIndex:3},onClick:Gt(1)})]}),It&&st&&a.jsx(jr,{media:st,style:Tt(st,"right","far"),onMeasure:it,onTransitionEnd:yt},`far-next-${st.url}`),ie&&Z&&(He?a.jsx(Bv,{src:Z.url,phase:J,onMediaElement:Vt,wrapperStyle:ht,videoStyle:Wt,onLoadedMetadata:wt,onTransitionEnd:yt},`${n}-${Z.url}`):a.jsx("img",{ref:Vt,src:Z.url,alt:Z.name,onLoad:wt,onTransitionEnd:yt,style:ht},`${n}-${Z.url}`))]})}function jv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:c}=F.useScopedStyles(),{gridLayout:d,verticalGap:u,align:p="top",imageDisplay:y}=e,v=(y==null?void 0:y.display)==="cover",g=(y==null?void 0:y.ratioValue)??"1:1",m=(y==null?void 0:y.reversed)??!1,[x,b]=g.split(":").map(Number),S=`${m?b:x} / ${m?x:b}`,W=d.entryWidth??.2,q=d.columnsCount,z=F.scalingValue(W,n),P=F.scalingValue(d.horizontalGap??0,n),_=z,G=z,$={width:_,...v?{aspectRatio:S,height:"auto",overflow:"hidden"}:{height:"auto"}},L=v?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},D=s.useRef(null),[E,T]=s.useState(!1),[C,V]=s.useState([]),[w,U]=s.useState(0),[M,A]=s.useState(0),[j,ie]=s.useState(null),[ae,O]=s.useState({title1:"",title2:"",title3:""}),re=(()=>{const xe={},Ce=D.current?getComputedStyle(D.current).getPropertyValue("--cntrl-article-width").trim():"";return Ce&&(xe["--cntrl-article-width"]=Ce),xe})(),N=!n||i||o,le=s.useMemo(()=>bv(c),[c]),J=t??[],be=J.length%q||q,Pe=be<q&&J.length>0,ye=J.length-be,ce=Pe?Math.floor((q-be)/2)+1:1,K=s.useMemo(()=>Mv(J),[J]),se=s.useMemo(()=>Av(J),[J]),pe=(xe,Ce,h)=>{if(n&&!o&&!i)return;const Y=K.findIndex(ne=>ne.gridIndex===xe);if(Y<0)return;const Q=K[Y];A(Y),V(Q.items),U(Ce),O(Q.entry),ie(h??null),T(!0)},fe=s.useCallback(()=>{T(!1),ie(null)},[]),we=s.useCallback(()=>{const xe=K[M];return!xe||!D.current?j:Pv(D.current,xe.gridIndex,v?"cover":"contain")??j},[K,M,j,v]),Ie=s.useCallback(xe=>{if(K.length>1){const Ce=K.length,h=(M+xe+Ce)%Ce,Y=K[h],Q=Math.min(w,Y.items.length-1);A(h),V(Y.items),U(Q),O(Y.entry);return}U(Ce=>(Ce+xe+C.length)%C.length)},[K,M,w,C.length]),me=K.length>1||C.length>1;return s.useEffect(()=>{if(!E||typeof document>"u")return;const xe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=xe}},[E]),s.useEffect(()=>{!n||o||i||T(!1)},[n,o,i]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:le}}),a.jsx(Fv,{mediaList:se}),a.jsx("div",{ref:D,className:`${c}-wrapper ${c}-align-entries ${c}-image-align-${p}`.trim(),style:{gridTemplateColumns:`repeat(${q}, ${z})`,rowGap:0,columnGap:P,width:F.scalingValue(d.wrapperWidth??0,n),[`--${c}-align-entries-row-gap`]:F.scalingValue(u??0,n)},children:J.map((xe,Ce)=>{const h=Hl(xe.gallery),Y=Wl(h),Q=Y.filter(te=>te.lightboxMedia).map(te=>te.lightboxMedia),ne=Math.floor(Ce/q)===Math.ceil(J.length/q)-1,ue=Pe&&Ce>=ye?`${ce+(Ce-ye)}`:void 0,B=Y[0],I=B!=null&&B.lightboxMedia?Q.findIndex(te=>te.url===B.lightboxMedia.url):-1,ee=a.jsx("div",{className:`${c}-item-image-wrapper`,style:$,children:Y.length>0&&a.jsx(Dv,{media:B.displayMedia,gridIndex:Ce,className:`${c}-item-${Bo(B.displayMedia)?"video":"image"}`.trim(),style:L,onMediaClick:N&&I>=0?te=>pe(Ce,I,np(te.currentTarget,v?"cover":"contain")):void 0})});return a.jsx("div",{className:`${c}-item`,children:a.jsxs("div",{className:[o?`${c}-item-inner`:`${c}-item-inner-hidden`,ne?`${c}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:z,...ue?{gridColumn:ue}:{}},children:[a.jsx("div",{className:`${c}-item-title-row`,children:a.jsx("div",{style:{height:0,width:G}})}),a.jsx("a",{className:`${c}-item-image-link`,children:ee}),a.jsx("div",{className:`${c}-item-subtitle-row`,children:a.jsx("div",{style:{height:0,width:G}})})]})},Ce)})}),E&&typeof document<"u"&&(()=>{const xe=(l?document.getElementById(l):null)??document.body;return Xn.createPortal(a.jsx("div",{style:re,"data-selection":"none",children:a.jsx(zv,{prefix:c,items:C,index:w,entry:ae,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:me,lightboxEntries:K,entryIdx:M,layoutId:r,sourceRect:j,resolveCloseSourceRect:we,onClose:fe,onPrev:()=>Ie(-1),onNext:()=>Ie(1)})}),xe)})()]})}const Vv=`import { CommonComponentProps } from '../props';
7630
+ `}const Nc={url:"",name:"",objectFit:"cover"},Hn=500,qo=650,wn="cubic-bezier(0.22, 1, 0.36, 1)",Sv=72,wv=50,$v=1e4,Cv=650,Tv=500;function Lv(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 np(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 Pv(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?np(i,n):null}function Iv(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 Rv=.03;function ip(e){return e.width*Rv}const ss={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function zr(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 Mv(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 Ev(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Xs(e,t.width,t.height)}function kv(e,t){if(Bo(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function Av(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.url&&!t.has(c.url)&&(t.add(c.url),n.push(c))}return n}function Fv({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Bo(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function Io(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 wa(e,t,n){const i=Io(e,t,n);return{...i,left:2*i.left-e.left}}function Nv(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 op(e,t,n,i){const o=Io(e,"left",i),r=Io(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 _v(e,t,n,i){const{start:o,end:r}=op(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function Hv(e,t,n){const i=Io(e,t,n),o=wa(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function rp(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(rp(e))return e;if(!Array.isArray(e))return;const[t,n]=e,i=t!=null&&t.url?t:void 0,o=n!=null&&n.url?n:void 0;if(!(!i&&!o))return[{media:[o??i??Nc,i??o??Nc]}]}function Wv(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Ov(e){const[t]=e.media;return t!=null&&t.url?t:null}function Wl(e){if(!Array.isArray(e)||e.length===0)return[];if(rp(e)){const t=[];for(const n of e){const i=Wv(n);if(!i)continue;const o=Ov(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.url?o:null})}return t}return e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Bo(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function Dv({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return Bo(e)?a.jsx("video",{src:e.url,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onClick:o}):a.jsx("img",{src:e.url,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function Bv({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 Bo(e)?a.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.url,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.url,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function 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:v,resolveCloseSourceRect:g,onClose:m,onPrev:x,onNext:b}){const M=s.useRef(null),f=s.useRef(null),S=s.useRef(null),W=s.useRef(new Map),[q,z]=s.useState(0),P=s.useRef(null),_=s.useRef(0),G=s.useRef(0),$=s.useRef("none"),L=s.useRef(!1),D=s.useRef(!1),E=s.useRef(!1),T=s.useRef(null),C=s.useRef(null),V=s.useRef(null),w=s.useRef(()=>{}),U=s.useRef(null),I=s.useRef(null),A=s.useRef(null),j=s.useRef(!1),[ie,ae]=s.useState(null),[O,re]=s.useState(ss),[N,le]=s.useState(0),[J,be]=s.useState("opening"),[Pe,ye]=s.useState(0),[ce,K]=s.useState(0),[se,pe]=s.useState(!1),[fe,we]=s.useState(null),[Re,me]=s.useState(null),[xe,Ce]=s.useState(null),[h,Y]=s.useState(!1),[Q,ne]=s.useState(null),[ue,B]=s.useState(!1),R=s.useRef(!1),[ee,te]=s.useState(!1),[ge,X]=s.useState(!1),Ie=s.useRef(n),Se=s.useRef(void 0),Z=t[n],He=Z?Bo(Z):!1,We=ce!==0||se,ot=!l&&(!r||!!c),qe=d&&!l,tt=u.length>1,et=s.useCallback((H,Le)=>t.length<=1?null:t[(H+Le+t.length)%t.length]??null,[t]),Ge=tt?ir(u,p,-1):et(n,-1),ve=tt?ir(u,p,1):et(n,1),_e=fe===-1&&We?tt&&Re!==null?ir(u,Re,-1):xe!==null?et(xe,-1):null:null,ze=fe===1&&We?tt&&Re!==null?ir(u,Re,1):xe!==null?et(xe,1):null:null,Qe=_e&&_e.url!==(Ge==null?void 0:Ge.url)?_e:null,$e=ze&&ze.url!==(ve==null?void 0:ve.url)?ze:null,Ne=Ge&&qe?(()=>{const H=tt?_c(u,p,-1):t.length>2?et((n-1+t.length)%t.length,-1):null;return H&&H.url!==Ge.url?H:null})():null,Ye=ve&&qe?(()=>{const H=tt?_c(u,p,1):t.length>2?et((n+1)%t.length,1):null;return H&&H.url!==ve.url?H:null})():null,Ze=Qe??Ne,st=$e??Ye,it=s.useCallback((H,Le,je)=>{if(!H||!Le||!je)return;const Fe=W.current,ft=Fe.get(H);(ft==null?void 0:ft.width)===Le&&(ft==null?void 0:ft.height)===je||(Fe.set(H,{width:Le,height:je}),z(Ht=>Ht+1))},[]),Oe=s.useCallback(H=>{if(!(H!=null&&H.url))return null;const Le=W.current.get(H.url);return Ev(f.current,Le)},[q,N]),Ae=s.useCallback(()=>{if(!Z)return;const H=Oe(Z);if(H){ae(H);return}const Le=f.current;Le&&ae(Hc(Le))},[Z,Oe]),mt=s.useCallback(H=>{if(tt){const Le=u.length;me((p+H+Le)%Le),Ce(null);return}t.length>1&&(Ce((n+H+t.length)%t.length),me(null))},[tt,u.length,p,t.length,n]),Be=s.useCallback(H=>{E.current=H,pe(H)},[]),De=s.useCallback(()=>{T.current!==null&&(window.clearTimeout(T.current),T.current=null)},[]),Ue=s.useCallback(()=>{De(),T.current=window.setTimeout(()=>{De(),Be(!1)},qo+32)},[De,Be]),ct=s.useCallback(()=>{const H=M.current;if(!H){re({left:0,top:0,width:typeof window<"u"?window.innerWidth:ss.width,height:typeof window<"u"?window.innerHeight:ss.height});return}const Le=H.getBoundingClientRect();re({left:Le.left,top:Le.top,width:Le.width,height:Le.height})},[]),he=s.useCallback((H,Le)=>{if(We){if(ee&&!se)return`translate(${ce}px, 0px)`;if(se&&fe!==null){const je=Oe(H);if(!je)return;const{x:Fe,y:ft}=_v(je,Le,fe,O);return`translate(${Fe}px, ${ft}px)`}if(se)return"translate(0px, 0px)"}},[We,ee,se,ce,fe,O,Oe]),Me=s.useCallback(()=>{const H=C.current;C.current=null,De(),Be(!1),we(null),me(null),Ce(null),K(0),te(!1),L.current=!1,G.current=0,$.current="none",H===-1?x():H===1&&b()},[De,Be,x,b]),nt=s.useCallback(()=>{De(),T.current=window.setTimeout(()=>{C.current!==null&&Me()},qo+32)},[De,Me]),pt=s.useCallback(()=>{De(),C.current=null,Be(!1),we(null),me(null),Ce(null),K(0),te(!1),L.current=!1,G.current=0,$.current="none"},[De,Be]),Ve=s.useCallback(H=>{if(!(!qe||!ie)){if(E.current){if(C.current===H){V.current=H,Me();return}pt()}De(),mt(H),C.current=H,we(H),Be(!0),nt()}},[qe,ie,Me,pt,De,mt,Be,nt]);w.current=Ve;const vt=s.useCallback(()=>{U.current=null,j.current=!1,I.current!==null&&(window.clearInterval(I.current),I.current=null),A.current!==null&&(window.clearTimeout(A.current),A.current=null)},[]),It=s.useCallback(H=>{I.current!==null&&window.clearInterval(I.current);const Le=j.current?Tv:Cv;I.current=window.setInterval(()=>{w.current(H)},Le)},[]),At=s.useCallback(H=>{U.current!==H&&(vt(),U.current=H,j.current=!1,w.current(H),It(H),A.current=window.setTimeout(()=>{A.current=null,U.current===H&&(j.current=!0,It(H))},$v))},[vt,It]),wt=s.useCallback(()=>{const H=f.current;if(!H)return;const Le=Z==null?void 0:Z.url,je=Le?W.current.get(Le):void 0;if(je!=null&&je.width&&(je!=null&&je.height)){ae(Xs(H,je.width,je.height));return}const Fe=S.current;if(Fe&&Le&&(Fe.src===Le||Fe.currentSrc===Le)){const{width:Ht,height:gt}=Mv(Fe);if(Ht&&gt){it(Le,Ht,gt),ae(Xs(H,Ht,gt));return}}const ft=Hc(H);!ft.width||!ft.height||ae(ft)},[Z==null?void 0:Z.url,it]),Vt=s.useCallback(H=>{if(S.current=H,!!H){if(H instanceof HTMLVideoElement){H.readyState>=1&&H.videoWidth>0&&wt();return}H.complete&&H.naturalWidth>0&&wt()}},[wt]),jt=s.useCallback(()=>{ct(),wt(),le(H=>H+1)},[ct,wt]);s.useEffect(()=>{jt();const H=f.current,Le=M.current,je=new ResizeObserver(()=>jt());return H&&je.observe(H),Le&&je.observe(Le),window.addEventListener("resize",jt),()=>{je.disconnect(),window.removeEventListener("resize",jt)}},[jt,n,y]),s.useLayoutEffect(()=>{if(!Z)return;const H=S.current;if(H){if(H instanceof HTMLImageElement&&H.complete&&H.naturalWidth>0){wt();return}H instanceof HTMLVideoElement&&H.readyState>=1&&H.videoWidth>0&&wt()}},[Z==null?void 0:Z.url,n,wt]),s.useEffect(()=>{Ae()},[Ae,q]),s.useEffect(()=>{const H=new Set,Le=[],je=Fe=>{!(Fe!=null&&Fe.url)||H.has(Fe.url)||(H.add(Fe.url),Le.push(Fe))};t.forEach(je),u.forEach(Fe=>Fe.items.forEach(je)),Le.forEach(Fe=>{W.current.has(Fe.url)||kv(Fe,it)})},[t,u,it]),s.useEffect(()=>{if(J!=="opening"||!ie)return;if(!v){be("open");return}Y(!1);const H=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Y(!0),be("open")})});return()=>cancelAnimationFrame(H)},[J,ie,v]),s.useEffect(()=>{if(J!=="closing")return;const H=setTimeout(()=>m(),Hn);return()=>clearTimeout(H)},[J,m]),s.useEffect(()=>()=>{De()},[De]),s.useLayoutEffect(()=>{Ie.current===n&&Se.current===(Z==null?void 0:Z.url)||(De(),C.current=null,we(null),me(null),Ce(null),ye(0),K(0),Be(!1),X(!1),te(!1),_.current=0,G.current=0,$.current="none",L.current=!1,P.current=null,D.current=!1,S.current=null,Ae(),Ie.current=n,Se.current=Z==null?void 0:Z.url)},[n,Z==null?void 0:Z.url,Be,De,Ae]),s.useLayoutEffect(()=>{const H=V.current;H!==null&&(V.current=null,requestAnimationFrame(()=>{w.current(H)}))},[n,p,Z==null?void 0:Z.url]),s.useLayoutEffect(()=>{if(J==="opening"){R.current=!1,B(!1);return}if(J!=="open"||R.current)return;if(!Ge&&!ve){R.current=!0;return}B(!1);const H=requestAnimationFrame(()=>{requestAnimationFrame(()=>{B(!0),R.current=!0})});return()=>cancelAnimationFrame(H)},[J,Ge==null?void 0:Ge.url,ve==null?void 0:ve.url]),s.useEffect(()=>{if(J!=="open")return;const H=()=>{const gt=Lt=>{Lt.stopPropagation(),Lt.preventDefault(),document.removeEventListener("click",gt,!0)};document.addEventListener("click",gt,!0)},Le=gt=>{const Lt=gt<0?1:-1;De(),mt(Lt),C.current=Lt,we(Lt),Be(!0),nt()},je=gt=>{if(Math.abs(gt)>wv&&qe){Le(gt);return}C.current=null,we(null),me(null),Ce(null),Be(!0),K(0),Ue()},Fe=gt=>{if(gt.touches.length!==1||E.current)return;const Lt=gt.touches[0];D.current=!0,P.current={x:Lt.clientX,y:Lt.clientY},$.current="none",G.current=0,L.current=!1},ft=gt=>{if(!P.current||gt.touches.length!==1||E.current)return;const Lt=gt.touches[0],qt=Lt.clientX-P.current.x,Dt=Lt.clientY-P.current.y;if($.current==="none"){if(Math.abs(qt)<10&&Math.abs(Dt)<10)return;if(Math.abs(qt)>Math.abs(Dt)){if(!qe)return;$.current="horizontal"}else if(Dt>0){if(!ot)return;$.current="vertical"}else return}if($.current==="horizontal"){L.current=!0,te(!0),G.current=qt,K(qt),gt.preventDefault();return}$.current==="vertical"&&(L.current=!0,te(!0),_.current=Dt,ye(Dt),gt.preventDefault())},Ht=()=>{if(!P.current)return;const gt=$.current,Lt=L.current;if(Lt&&gt==="horizontal")je(G.current),H();else if(Lt&&gt==="vertical"){const qt=_.current;if(ot&&qt>Sv){const Dt=window.innerHeight;_.current=Dt,X(!0),ye(Dt),be("closing")}else _.current=0,ye(0);H()}else gt==="horizontal"&&Math.abs(G.current)>0&&(je(G.current),H());P.current=null,$.current="none",G.current=0,L.current=!1,te(!1)};return document.addEventListener("touchstart",Fe,{passive:!0}),document.addEventListener("touchmove",ft,{passive:!1}),document.addEventListener("touchend",Ht),document.addEventListener("touchcancel",Ht),()=>{document.removeEventListener("touchstart",Fe),document.removeEventListener("touchmove",ft),document.removeEventListener("touchend",Ht),document.removeEventListener("touchcancel",Ht)}},[J,qe,Be,Ue,De,ot,nt,mt]);const Yt=s.useCallback(()=>{const H=(g==null?void 0:g())??v??null;H&&ie&&(ne(H),Y(!0)),be("closing")},[g,v,ie]);s.useEffect(()=>{const H=Fe=>{if(Fe.key==="Escape"){if(r&&c||J==="closing")return;vt(),Yt();return}if(Fe.key!=="ArrowLeft"&&Fe.key!=="ArrowRight"||J!=="open"||!qe)return;Fe.preventDefault();const ft=Fe.key==="ArrowLeft"?-1:1;Fe.repeat&&U.current===ft||At(ft)},Le=Fe=>{if(Fe.key!=="ArrowLeft"&&Fe.key!=="ArrowRight")return;const ft=Fe.key==="ArrowLeft"?-1:1;U.current===ft&&vt()},je=()=>{vt()};return window.addEventListener("keydown",H),window.addEventListener("keyup",Le),window.addEventListener("blur",je),()=>{window.removeEventListener("keydown",H),window.removeEventListener("keyup",Le),window.removeEventListener("blur",je),vt()}},[J,r,c,Yt,qe,At,vt]),s.useEffect(()=>{J!=="open"&&vt()},[J,vt]);const Kt=()=>{J==="closing"||l||Yt()},Rt=J==="open",zt=J==="closing",on=Pe>0?Math.max(0,1-Pe/500):1,xt=Pe>0?Math.max(.35,1-Pe/500):1,yt=s.useCallback(H=>{if(!(H.propertyName!=="transform"||!E.current)){if(C.current!==null){Me();return}De(),Be(!1)}},[De,Be,Me]),ke=J==="closing"?Q??v:v,Je=ke&&ie&&(J==="opening"||zt)?Lv(ke,ie):void 0,rt=We&&Z?he(Z,"center"):Pe>0?`translateY(${Pe}px)`:Je,dt=ie?zr(ie,O):null,Pt=!!(ke&&ie),St=Pt&&(J==="closing"||J==="open"&&h),ht={position:"absolute",top:dt==null?void 0:dt.top,left:dt==null?void 0:dt.left,width:dt==null?void 0:dt.width,height:dt==null?void 0:dt.height,objectFit:"contain",transformOrigin:"top left",transform:rt,opacity:Pe>0?xt:Pt?1:J==="opening"||zt?0:1,transition:ee&&!se?"none":se?`transform ${qo}ms ${wn}`:ge?`transform ${Hn}ms ${wn}, opacity ${Hn}ms ${wn}`:St?`transform ${Hn}ms ${wn}`:J==="opening"||zt?`opacity ${Hn}ms ${wn}`:"none",pointerEvents:He&&Rt&&!We?"auto":"none",touchAction:He&&Rt?"none":void 0,zIndex:1,overflow:He?"hidden":void 0},Wt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Rt&&!We?"auto":"none"},Tt=(H,Le,je="adjacent")=>{const Fe=Oe(H);if(!Fe)return{display:"none"};const ft=je==="far"?Le==="left"?"far-left":"far-right":Le==="left"?"left-adjacent":"right-adjacent",{start:Ht}=fe!==null?op(Fe,ft,fe,O):{start:je==="far"?wa(Fe,Le,O):Io(Fe,Le,O)},gt=zr(Ht,O),Lt=he(H,ft),qt=!We&&je==="adjacent"&&Rt&&!ue?Hv(Fe,Le,O):null,Dt=je==="far"&&We&&fe===(Le==="left"?-1:1),an=ee&&!se?!1:se,cn=je==="adjacent"&&Rt&&ue&&!We;return{position:"absolute",top:gt.top,left:gt.left,width:gt.width,height:gt.height,objectFit:"contain",transform:Lt??(qt?`translate(${qt.x}px, ${qt.y}px)`:void 0),opacity:je==="far"?Rt&&Dt?1:0:Rt?1:0,transition:an?je==="far"?`transform ${qo}ms ${wn}`:`transform ${qo}ms ${wn}, opacity ${Hn}ms ${wn}`:cn?`transform ${Hn}ms ${wn}`:J==="opening"||zt?`opacity ${Hn}ms ${wn}`:"none",pointerEvents:"none",zIndex:1}},Ot=(H,Le)=>{const je=Oe(H);return je?Nv(Io(je,Le,O),Le,O):null},Gt=H=>Le=>{if(!l){if(D.current){D.current=!1;return}Le.stopPropagation(),Ve(H)}},kt=Ge?Ot(Ge,"left"):null,_t=ve?Ot(ve,"right"):null,Ft=kt?zr(kt,O):null,ut=_t?zr(_t,O):null;return a.jsxs("div",{ref:M,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:J==="open"?"none":void 0},onClick:Kt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Rt?on:0,transition:ee?"none":`opacity ${Hn}ms ${wn}`,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:f,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:Rt?1:0,transition:ee?"none":`opacity ${Hn}ms ${wn}`,pointerEvents:"none"},children:a.jsx(tp,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,onClose:Kt})})]}),Rt&&Ze&&a.jsx(jr,{media:Ze,style:Tt(Ze,"left","far"),onMeasure:it,onTransitionEnd:yt},`far-prev-${Ze.url}`),Rt&&Ge&&a.jsxs(a.Fragment,{children:[a.jsx(jr,{media:Ge,style:Tt(Ge,"left"),onMeasure:it,onTransitionEnd:yt},`prev-${Ge.url}`),Ft&&a.jsx("div",{style:{position:"absolute",top:Ft.top,left:Ft.left,width:Ft.width,height:Ft.height,cursor:l||ee?"default":"pointer",pointerEvents:l||ee?"none":"auto",zIndex:3},onClick:Gt(-1)})]}),Rt&&ve&&a.jsxs(a.Fragment,{children:[a.jsx(jr,{media:ve,style:Tt(ve,"right"),onMeasure:it,onTransitionEnd:yt},`next-${ve.url}`),ut&&a.jsx("div",{style:{position:"absolute",top:ut.top,left:ut.left,width:ut.width,height:ut.height,cursor:l||ee?"default":"pointer",pointerEvents:l||ee?"none":"auto",zIndex:3},onClick:Gt(1)})]}),Rt&&st&&a.jsx(jr,{media:st,style:Tt(st,"right","far"),onMeasure:it,onTransitionEnd:yt},`far-next-${st.url}`),ie&&Z&&(He?a.jsx(Bv,{src:Z.url,phase:J,onMediaElement:Vt,wrapperStyle:ht,videoStyle:Wt,onLoadedMetadata:wt,onTransitionEnd:yt},`${n}-${Z.url}`):a.jsx("img",{ref:Vt,src:Z.url,alt:Z.name,onLoad:wt,onTransitionEnd:yt,style:ht},`${n}-${Z.url}`))]})}function jv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:c}=F.useScopedStyles(),{gridLayout:d,verticalGap:u,align:p="top",imageDisplay:y}=e,v=(y==null?void 0:y.display)==="cover",g=(y==null?void 0:y.ratioValue)??"1:1",m=(y==null?void 0:y.reversed)??!1,[x,b]=g.split(":").map(Number),S=`${m?b:x} / ${m?x:b}`,W=d.entryWidth??.2,q=d.columnsCount,z=F.scalingValue(W,n),P=F.scalingValue(d.horizontalGap??0,n),_=z,G=z,$={width:_,...v?{aspectRatio:S,height:"auto",overflow:"hidden"}:{height:"auto"}},L=v?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},D=s.useRef(null),[E,T]=s.useState(!1),[C,V]=s.useState([]),[w,U]=s.useState(0),[I,A]=s.useState(0),[j,ie]=s.useState(null),[ae,O]=s.useState({title1:"",title2:"",title3:""}),re=(()=>{const xe={},Ce=D.current?getComputedStyle(D.current).getPropertyValue("--cntrl-article-width").trim():"";return Ce&&(xe["--cntrl-article-width"]=Ce),xe})(),N=!n||i||o,le=s.useMemo(()=>bv(c),[c]),J=t??[],be=J.length%q||q,Pe=be<q&&J.length>0,ye=J.length-be,ce=Pe?Math.floor((q-be)/2)+1:1,K=s.useMemo(()=>Iv(J),[J]),se=s.useMemo(()=>Av(J),[J]),pe=(xe,Ce,h)=>{if(n&&!o&&!i)return;const Y=K.findIndex(ne=>ne.gridIndex===xe);if(Y<0)return;const Q=K[Y];A(Y),V(Q.items),U(Ce),O(Q.entry),ie(h??null),T(!0)},fe=s.useCallback(()=>{T(!1),ie(null)},[]),we=s.useCallback(()=>{const xe=K[I];return!xe||!D.current?j:Pv(D.current,xe.gridIndex,v?"cover":"contain")??j},[K,I,j,v]),Re=s.useCallback(xe=>{if(K.length>1){const Ce=K.length,h=(I+xe+Ce)%Ce,Y=K[h],Q=Math.min(w,Y.items.length-1);A(h),V(Y.items),U(Q),O(Y.entry);return}U(Ce=>(Ce+xe+C.length)%C.length)},[K,I,w,C.length]),me=K.length>1||C.length>1;return s.useEffect(()=>{if(!E||typeof document>"u")return;const xe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=xe}},[E]),s.useEffect(()=>{!n||o||i||T(!1)},[n,o,i]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:le}}),a.jsx(Fv,{mediaList:se}),a.jsx("div",{ref:D,className:`${c}-wrapper ${c}-align-entries ${c}-image-align-${p}`.trim(),style:{gridTemplateColumns:`repeat(${q}, ${z})`,rowGap:0,columnGap:P,width:F.scalingValue(d.wrapperWidth??0,n),[`--${c}-align-entries-row-gap`]:F.scalingValue(u??0,n)},children:J.map((xe,Ce)=>{const h=Hl(xe.gallery),Y=Wl(h),Q=Y.filter(te=>te.lightboxMedia).map(te=>te.lightboxMedia),ne=Math.floor(Ce/q)===Math.ceil(J.length/q)-1,ue=Pe&&Ce>=ye?`${ce+(Ce-ye)}`:void 0,B=Y[0],R=B!=null&&B.lightboxMedia?Q.findIndex(te=>te.url===B.lightboxMedia.url):-1,ee=a.jsx("div",{className:`${c}-item-image-wrapper`,style:$,children:Y.length>0&&a.jsx(Dv,{media:B.displayMedia,gridIndex:Ce,className:`${c}-item-${Bo(B.displayMedia)?"video":"image"}`.trim(),style:L,onMediaClick:N&&R>=0?te=>pe(Ce,R,np(te.currentTarget,v?"cover":"contain")):void 0})});return a.jsx("div",{className:`${c}-item`,children:a.jsxs("div",{className:[o?`${c}-item-inner`:`${c}-item-inner-hidden`,ne?`${c}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:z,...ue?{gridColumn:ue}:{}},children:[a.jsx("div",{className:`${c}-item-title-row`,children:a.jsx("div",{style:{height:0,width:G}})}),a.jsx("a",{className:`${c}-item-image-link`,children:ee}),a.jsx("div",{className:`${c}-item-subtitle-row`,children:a.jsx("div",{style:{height:0,width:G}})})]})},Ce)})}),E&&typeof document<"u"&&(()=>{const xe=(l?document.getElementById(l):null)??document.body;return Xn.createPortal(a.jsx("div",{style:re,"data-selection":"none",children:a.jsx(zv,{prefix:c,items:C,index:w,entry:ae,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:me,lightboxEntries:K,entryIdx:I,layoutId:r,sourceRect:j,resolveCloseSourceRect:we,onClose:fe,onPrev:()=>Re(-1),onNext:()=>Re(1)})}),xe)})()]})}const Vv=`import { CommonComponentProps } from '../props';
7631
7631
  import { scalingValue, useScopedStyles } from '../utils/index';
7632
7632
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
7633
7633
  import { createPortal } from 'react-dom';
@@ -9970,7 +9970,7 @@ export function Hive({
9970
9970
  </>
9971
9971
  );
9972
9972
  }
9973
- `,Gv="01M3SBP3P8CMVMM1ZZ0QVD2PPF",Fi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Xv(e){const t={};return t[bt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSettings")]={...Fi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSize")]={...Fi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[bt(e,"lineHeight")]={...Fi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[bt(e,"letterSpacing")]={...Fi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[bt(e,"wordSpacing")]={...Fi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[bt(e,"textAlign")]={...Fi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[bt(e,"textAppearance")]={...Fi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Io=Pi.filter(e=>e!=="count"),Uv=Io.reduce((e,t)=>({...e,...Xv(t)}),{}),qv=Io.reduce((e,t)=>({...e,[bt(t,"fontFamily")]:"Arial",[bt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[bt(t,"letterSpacing")]:0,[bt(t,"wordSpacing")]:0,[bt(t,"textAlign")]:"left",[bt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ls(e){return Io.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[bt(n,"fontSize")]=i),o!==void 0&&(t[bt(n,"lineHeight")]=o),t},{})}const Yv={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Io.map(e=>[Nl[e],_l(e)]))},Kv={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},Qv=["01M3QM74XEQE7FN1WYJN6H984H","01M3QM74XFXCSMJJ8TNR0RXSWV","01M3QM74XFQ6K4CJ0QYC7BT7VP","01M3QM74XFK2K9T3SPCZD8M7RT","01M3QM74XFV4J15XRFB85877RE","01M3QM74XFB8Q39K12G4G6CZDM","01M3QM74XFWVH9HND47HYNCBZB","01M3QM74XF3MFEKEA4E0W9F9ZQ","01M3QM74XFEQY4XMN22Q9ERGKX","01M3QM74XFWP1RY8ND8QX88J2V","01M3QM74XFD41TXQ5BQ2KFJBGQ","01M3QM74XFV8973P7WXXWJP3QK","01M3QM74XF67PD2N10JYF9409X","01M3QM74XFA5B75WMTTKRN9TM7","01M3QM74XFFQRBHCQGKWPGSAGE","01M3QM74XF1HQBTRANGVX0QVGK","01M3QM74XF8ZWGSVCX3KS5YXSC","01M3QM74XFPHGV2XFZ23ADCVFC","01M3QM74XFECQG799S95G63BDJ","01M3QM74XFW1XS568WAHG3BGN1","01M3QM74XFT1RRJ3N1JJKPK5EA","01M3QM74XFB2JQ62RPFSM145GN","01M3QM74XFH61QR5PACJS04Z5K","01M3QM74XFKD44BXHRA7SSMD7N"],Zv=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...Kv,gallery:[{media:[{url:Qv[t-1],name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]});return e})(),Jv={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",max:1,display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:Zv},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"}},...Uv},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:Gv,closeIconColor:"#000000",closeIconHoverColor:"#999999",...qv},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:[Yv]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},e0={element:jv,id:"hive",name:"Catalogue",category:"grids",layoutMode:"structured",preview:{type:"image",url:"01M3QM74XFD9RBV73Y4XTYYSM6"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[...Io.map(e=>({path:`${bt(e,"fontFamily")}`}))]},fontRelations:{...Io.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${bt(t,"fontFamily")}`}),{})},schema:Jv,sourceCode:Vv};function t0(e){if(e.type==="video")return!0;if(e.type==="image")return!1;const t=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function n0({media:e,className:t,style:n}){const i=s.useRef(null);return s.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const r=o.play();r&&r.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?a.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:t,src:e.url,alt:"",style:n})}function cs(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function i0(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=F.scalingValue(r,l),d=F.scalingValue(0,l),u=e===0,p=e===t-1&&!o;return{borderTopWidth:u&&n?c:d,borderBottomWidth:!p||i?c:d}}function o0(e,t,n){const i=F.scalingValue(t,n),o=F.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Bc=10,zc=10,Yo={positionEase:.14,rotationEase:.09,rotationFactor:2.5,maxRotation:20};function r0(e,t,n){return Math.max(t,Math.min(n,e))}function ds(e,t,n){return e+(t-e)*n}function a0(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+zc+i/2,y:r};case"center":return{x:o.left+o.width/2,y:r};case"right":return{x:o.right-zc-i/2,y:r};default:return{x:o.left+o.width/2,y:r}}}function s0(e,t){const n=s.useRef(null),i=s.useRef({x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1}),o=s.useRef(null),r=s.useCallback(()=>{const g=n.current,m=i.current;g&&(g.style.transform=`translate3d(${m.x}px, ${m.y}px, 0) translate(-50%, -50%) rotate(${m.rotation.toFixed(3)}deg)`)},[]),l=s.useCallback(()=>{o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)},[]),c=s.useCallback(()=>{const g=i.current;t?(g.x=ds(g.x,g.targetX,Yo.positionEase),g.y=ds(g.y,g.targetY,Yo.positionEase),g.rotation=ds(g.rotation,g.targetRotation,Yo.rotationEase)):(g.x=g.targetX,g.y=g.targetY,g.rotation=g.targetRotation),r();const m=Math.abs(g.x-g.targetX)<.4&&Math.abs(g.y-g.targetY)<.4,x=Math.abs(g.rotation-g.targetRotation)<.08;!m||!x?o.current=requestAnimationFrame(c):o.current=null},[r,t]),d=s.useCallback(()=>{o.current===null&&(o.current=requestAnimationFrame(c))},[c]),u=s.useCallback((g,m)=>{const x=i.current;x.targetX=g,x.targetY=m,x.targetRotation=0,x.x=g,x.y=m,x.rotation=0,x.lastX=g,x.hasLastX=!0,r(),t&&d()},[r,t,d]),p=s.useCallback((g,m)=>{if(!e)return;const x=i.current;if(t&&x.hasLastX){const b=g-x.lastX;x.targetRotation=r0(b*Yo.rotationFactor,-20,Yo.maxRotation)}else x.targetRotation=0;if(x.lastX=g,x.hasLastX=!0,x.targetX=g,x.targetY=m,t){d();return}x.x=g,x.y=m,x.rotation=x.targetRotation,r()},[e,r,t,d]),y=s.useCallback(g=>{l(),i.current.hasLastX=!1,g==null||g()},[l]),v=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||v(),l),[e,v,l]),{anchorRef:n,onShow:u,onCursorMove:p,exit:y,reset:v}}function l0(e){return`
9973
+ `,Gv="01M3SBP3P8CMVMM1ZZ0QVD2PPF",Fi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Xv(e){const t={};return t[bt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSettings")]={...Fi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSize")]={...Fi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[bt(e,"lineHeight")]={...Fi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[bt(e,"letterSpacing")]={...Fi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[bt(e,"wordSpacing")]={...Fi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[bt(e,"textAlign")]={...Fi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[bt(e,"textAppearance")]={...Fi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Ro=Pi.filter(e=>e!=="count"),Uv=Ro.reduce((e,t)=>({...e,...Xv(t)}),{}),qv=Ro.reduce((e,t)=>({...e,[bt(t,"fontFamily")]:"Arial",[bt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[bt(t,"letterSpacing")]:0,[bt(t,"wordSpacing")]:0,[bt(t,"textAlign")]:"left",[bt(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[bt(n,"fontSize")]=i),o!==void 0&&(t[bt(n,"lineHeight")]=o),t},{})}const Yv={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Ro.map(e=>[Nl[e],_l(e)]))},Kv={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},Qv=["01M3QM74XEQE7FN1WYJN6H984H","01M3QM74XFXCSMJJ8TNR0RXSWV","01M3QM74XFQ6K4CJ0QYC7BT7VP","01M3QM74XFK2K9T3SPCZD8M7RT","01M3QM74XFV4J15XRFB85877RE","01M3QM74XFB8Q39K12G4G6CZDM","01M3QM74XFWVH9HND47HYNCBZB","01M3QM74XF3MFEKEA4E0W9F9ZQ","01M3QM74XFEQY4XMN22Q9ERGKX","01M3QM74XFWP1RY8ND8QX88J2V","01M3QM74XFD41TXQ5BQ2KFJBGQ","01M3QM74XFV8973P7WXXWJP3QK","01M3QM74XF67PD2N10JYF9409X","01M3QM74XFA5B75WMTTKRN9TM7","01M3QM74XFFQRBHCQGKWPGSAGE","01M3QM74XF1HQBTRANGVX0QVGK","01M3QM74XF8ZWGSVCX3KS5YXSC","01M3QM74XFPHGV2XFZ23ADCVFC","01M3QM74XFECQG799S95G63BDJ","01M3QM74XFW1XS568WAHG3BGN1","01M3QM74XFT1RRJ3N1JJKPK5EA","01M3QM74XFB2JQ62RPFSM145GN","01M3QM74XFH61QR5PACJS04Z5K","01M3QM74XFKD44BXHRA7SSMD7N"],Zv=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...Kv,gallery:[{media:[{url:Qv[t-1],name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]});return e})(),Jv={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",max:1,display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:Zv},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"}},...Uv},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:Gv,closeIconColor:"#000000",closeIconHoverColor:"#999999",...qv},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:[Yv]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},e0={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.url",placeholderEnabled:!0}],parameters:[{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[...Ro.map(e=>({path:`${bt(e,"fontFamily")}`}))]},fontRelations:{...Ro.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${bt(t,"fontFamily")}`}),{})},schema:Jv,sourceCode:Vv};function t0(e){if(e.type==="video")return!0;if(e.type==="image")return!1;const t=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function n0({media:e,className:t,style:n}){const i=s.useRef(null);return s.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const r=o.play();r&&r.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?a.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:t,src:e.url,alt:"",style:n})}function cs(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function i0(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=F.scalingValue(r,l),d=F.scalingValue(0,l),u=e===0,p=e===t-1&&!o;return{borderTopWidth:u&&n?c:d,borderBottomWidth:!p||i?c:d}}function o0(e,t,n){const i=F.scalingValue(t,n),o=F.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Bc=10,zc=10,Yo={positionEase:.14,rotationEase:.09,rotationFactor:2.5,maxRotation:20};function r0(e,t,n){return Math.max(t,Math.min(n,e))}function ds(e,t,n){return e+(t-e)*n}function a0(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+zc+i/2,y:r};case"center":return{x:o.left+o.width/2,y:r};case"right":return{x:o.right-zc-i/2,y:r};default:return{x:o.left+o.width/2,y:r}}}function s0(e,t){const n=s.useRef(null),i=s.useRef({x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1}),o=s.useRef(null),r=s.useCallback(()=>{const g=n.current,m=i.current;g&&(g.style.transform=`translate3d(${m.x}px, ${m.y}px, 0) translate(-50%, -50%) rotate(${m.rotation.toFixed(3)}deg)`)},[]),l=s.useCallback(()=>{o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)},[]),c=s.useCallback(()=>{const g=i.current;t?(g.x=ds(g.x,g.targetX,Yo.positionEase),g.y=ds(g.y,g.targetY,Yo.positionEase),g.rotation=ds(g.rotation,g.targetRotation,Yo.rotationEase)):(g.x=g.targetX,g.y=g.targetY,g.rotation=g.targetRotation),r();const m=Math.abs(g.x-g.targetX)<.4&&Math.abs(g.y-g.targetY)<.4,x=Math.abs(g.rotation-g.targetRotation)<.08;!m||!x?o.current=requestAnimationFrame(c):o.current=null},[r,t]),d=s.useCallback(()=>{o.current===null&&(o.current=requestAnimationFrame(c))},[c]),u=s.useCallback((g,m)=>{const x=i.current;x.targetX=g,x.targetY=m,x.targetRotation=0,x.x=g,x.y=m,x.rotation=0,x.lastX=g,x.hasLastX=!0,r(),t&&d()},[r,t,d]),p=s.useCallback((g,m)=>{if(!e)return;const x=i.current;if(t&&x.hasLastX){const b=g-x.lastX;x.targetRotation=r0(b*Yo.rotationFactor,-20,Yo.maxRotation)}else x.targetRotation=0;if(x.lastX=g,x.hasLastX=!0,x.targetX=g,x.targetY=m,t){d();return}x.x=g,x.y=m,x.rotation=x.targetRotation,r()},[e,r,t,d]),y=s.useCallback(g=>{l(),i.current.hasLastX=!1,g==null||g()},[l]),v=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||v(),l),[e,v,l]),{anchorRef:n,onShow:u,onCursorMove:p,exit:y,reset:v}}function l0(e){return`
9974
9974
  .${e}-wrapper {
9975
9975
  display: grid;
9976
9976
  align-items: start;
@@ -10346,7 +10346,7 @@ a.${e}-list-item {
10346
10346
  overflow-wrap: anywhere;
10347
10347
  word-break: break-word;
10348
10348
  }
10349
- `}const Mi=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Ol=["AColumn","BColumn","CColumn","DColumn","EColumn"],ai="cutLabel",xr=[...Ol,ai],za=["A","B","C","D","E"];function ap(e){return`${e}ColumnVerticalAlign`}const Us=["Top","Center","Bottom"];function Dl(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return za.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function c0(e){const t=Dl(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function d0(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return za.includes(n)?n:null}function sp(e,t,n){const i=d0(e);return i?i===t?!1:c0(n[ap(i)]):!0}function br(e){const t=Dl(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return za.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function u0(e,t,n){if(lp(e,t,n))return br(e);const i=br(e);return i.kind==="baseline"?{kind:"top"}:i}function p0(e){const t=br(e);return t.kind==="baseline"?{kind:"top"}:t}function lp(e,t,n){return sp(e,n,t)?br(e).kind==="baseline":!1}function g0(e){const t={};let n=!1;for(const i of za){const o=ap(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}sp(r,i,e)||(t[o]="Top",n=!0)}return n?t:null}function m0(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function h0(e){const t=br(e).kind;return t==="baseline"?"center":t}function f0(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 y0(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=y0(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 v0(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 x0(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const b0={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Ut(e,t){return`${e}${t.replace(/^text/,"Text")}`}const S0={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function w0(e){return[Ut(e,"textFontFamily"),Ut(e,"textFontSettings"),{type:"row",items:[Ut(e,"textFontSize"),Ut(e,"textLineHeight"),Ut(e,"textLetterSpacing"),Ut(e,"textWordSpacing")]},Ut(e,"textTextAlign"),Ut(e,"textTextAppearance"),`${e}VerticalAlign`]}function $0(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(xr.map(e=>[S0[e],w0(e)]))}}function $a(e,t){const n=i=>{const o=Ut(t,i);return e[o]};return{textFontFamily:n("textFontFamily")??"Arial",textFontSettings:n("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:n("textFontSize"),textLineHeight:n("textLineHeight"),textLetterSpacing:n("textLetterSpacing")??0,textWordSpacing:n("textWordSpacing")??0,textTextAlign:n("textTextAlign")??(t===ai?"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 un(en(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`]:F.scalingValue((r-l)/2,i)}}const In=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Ro=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],Eo=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],ko=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],C0={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},T0=["hover","focus","filled","success","error"],Uc=.004,uo=.004,ps=uo,Bl=50,Sr=1440,wr=Bl/Sr;function cp(e){const t=typeof e=="number"&&e>0?e:Sr;return Bl/t}function L0(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 dp={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 P0(e,t=1){const n=t/e;return Object.fromEntries(In.map(i=>[i,n]))}function M0(){return Object.fromEntries([...Ro.map(e=>[e,0]),...Eo.map(e=>[e,0])])}function I0(){return Object.fromEntries(ko.map(e=>[e,0]))}function Vr(e){return Object.fromEntries(In.map(t=>[t,typeof e[t]=="number"?e[t]:dp[t]]))}function up(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=zl(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 R0(e,t,n){const i={};for(let o=0;o<e;o+=1){const r=Ro[o],l=Eo[o],c=typeof n[r]=="number"?n[r]:0,d=typeof n[l]=="number"?n[l]:0,u=up(t[o]??0,c,d);u.paddingLeft!==c&&(i[r]=u.paddingLeft),u.paddingRight!==d&&(i[l]=u.paddingRight)}return i}function zl(e,t,n){if(e<=0)return[];const i=In.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 E0(e,t,n){if(e<=1)return{};const i=zl(e,t,n),o={};for(let r=0;r<e-1;r+=1){const l=In[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:[...Mi]}function k0(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function A0(e,t,n,i){const o=Math.min(i,e.length,In.length),r={};for(let l=0;l<o;l+=1){const c=e[l],d=t.indexOf(c);if(d===-1)continue;const u=In[d],p=Ro[d],y=Eo[d],v=ko[d],g=In[l],m=Ro[l],x=Eo[l],b=ko[l],R=n[u],f=n[p],S=n[y],W=n[v];typeof R=="number"&&(r[g]=R),typeof f=="number"&&(r[m]=f),typeof S=="number"&&(r[x]=S),typeof W=="number"&&(r[b]=W)}return r}function pp(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 F0(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,...P0(n,o),...M0()};if(r)for(const c of ko)typeof t[c]=="number"&&(l[c]=t[c]);else Object.assign(l,I0());return pp(e,l)?l:e}function N0(e,t,n){const i=g0(e);i&&(e={...e,...i});const o=cp(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:Mi.length,y=S=>{if(u)return S;const W=Vr({...t,...S}),q=lr(S),z=ga(p,q,W),P=R0(p,z,{...t,...S});return Object.keys(P).length===0?S:{...S,...P}};if(typeof r=="number"&&r!==l)return e;const v=qc(e),g=qc(t);if(!k0(v,g))return y({...e,...A0(v,g,t,p)});if(c<d&&typeof p=="number"&&!u){const S=Vr({...t,...e});return y({...e,...E0(p,c,S)})}if(u){const S=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,W=Math.max(0,(c-o)/2);return S>W?{...e,textPaddingLR:W}:e}const m=Vr({...t,...e}),x=ga(p,d,Vr(t)),R=ga(p,c,m).some((S,W)=>S<(x[W]??S)),f=In.some(S=>{const W=e[S],q=t[S];return typeof W=="number"&&typeof q=="number"&&W!==q});return R||f?y(e):e}function _0(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 H0(e,t){return Math.random()*(t-e)+e}function W0(e){return Object.fromEntries(In.map(t=>[t,typeof e[t]=="number"?e[t]:dp[t]]))}function gs(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function O0(e,t,n,i,o,r){return e.slice(0,t).map((l,c)=>{const d=Ro[c],u=Eo[c],p=ko[c];return{key:l,textPrefix:b0[l],widthKey:In[c],width:n[In[c]],paddingLeftKey:d,paddingRightKey:u,paddingBottomKey:p,paddingLeft:i[d],paddingRight:o[u],paddingBottom:r[p]}})}function D0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r,layoutId:l,portalId:c,onUpdateSettings:d}){const{prefix:u}=F.useScopedStyles(),p=!!o,{columns:y,type:v,wrapperWidth:g,entriesCount:m,cellMinHeight:x,dividerWidth:b,showVisibility:R,cut:f,showCut:S,cutCellMinHeight:W,cutLabel:q,imageSize:z,imageOnHover:P,imagePosition:_="cursor",imageInterpolation:G="on",entryHoverEffect:$,entryHoverShowOption:L,rowPaddingTop:D,rowPaddingBottom:E,rowPaddingTopB:T,columnsOrder:C,textPaddingLR:V,textColor:w,backgroundColor:U,dividerColor:M,textHoverColor:A,backgroundHoverColor:j,dividerHoverColor:ie}=e,[ae,O]=s.useState(void 0),[re,N]=s.useState(null),le=s.useRef(null),J=P==="on"&&(!n||i),be=_==="cursor",Pe=be&&G==="on",{anchorRef:ye,onShow:ce,onCursorMove:K,exit:se}=s0(!!(J&&re!==null),Pe),pe=(f??0)>0,fe=v==="b",we=s.useRef(null),Ie=s.useRef(null),[me,xe]=s.useState(null),[Ce,h]=s.useState(Sr),Y=cp(Ce),Q=Math.max(0,((g??0)-Y)/2),ne=Math.min(V??0,Q),ue=Math.max(ne,uo),B=((g??0)+Y)/2;s.useLayoutEffect(()=>{if(!n){h(Sr);return}const ke=()=>{h(L0(we.current))};ke();const Je=we.current;if(!Je)return;const rt=new ResizeObserver(ke);rt.observe(Je);let dt=Je;for(;dt&&!dt.style.getPropertyValue("--cntrl-article-width");)dt=dt.parentElement;return dt&&rt.observe(dt),()=>rt.disconnect()},[n,l]),s.useEffect(()=>{O(void 0)},[f,S,t,m]),s.useEffect(()=>{n&&!i&&O(void 0)},[n,i]);const I=F.buildColorVars(u,{textColor:w,backgroundColor:U,dividerColor:M,textHoverColor:A,backgroundHoverColor:j,dividerHoverColor:ie},C0,T0),ee=r&&r!=="default"?`${u}-state-${r}`:"",ge=`${!n||i?$==="default"?`${u}-entry-hover-default`:$==="blinds"?`${u}-entry-hover-blinds`:$==="reveal"?`${u}-entry-hover-reveal`:"":""} ${ee}`.trim(),X=$==="reveal"&&(!n||i),Me=(R==null?void 0:R[0])??!1,Se=(R==null?void 0:R[1])??!1,Z=s.useRef(e),He=s.useRef(l);s.useEffect(()=>{if(!d||!n){Z.current=e,He.current=l;return}if(He.current!==l){Z.current=e,He.current=l;return}const ke=Z.current;if(!(ke!==e))return;if(typeof ke.columns=="number"&&typeof e.columns=="number"&&ke.columns!==e.columns){Z.current=e;return}const rt=N0(e,ke,{designWidth:Ce});Z.current=e,pp(e,rt)&&d(rt)},[e,d,n,l,Ce]);const We=s.useMemo(()=>W0(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ot=s.useMemo(()=>gs(e,Ro),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),qe=s.useMemo(()=>gs(e,Eo),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),tt=s.useMemo(()=>gs(e,ko),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),et=s.useMemo(()=>Array.isArray(C)&&C.length>0?C:[...Mi],[C]),Ge=s.useMemo(()=>O0(et,y,We,ot,qe,tt),[et,y,We,ot,qe,tt]),ve=lr(e),_e=s.useMemo(()=>In.slice(0,y).map(ke=>We[ke]),[y,We]),ze=s.useMemo(()=>zl(y,ve,We),[y,ve,We]),Qe=s.useMemo(()=>ga(y,ve,We),[y,ve,We]),$e=s.useMemo(()=>Ge.map((ke,Je)=>up(Qe[Je]??0,ke.paddingLeft,ke.paddingRight)),[Ge,Qe]),Ne=s.useMemo(()=>{const ke=m===0?1/0:m;return(t??[]).slice(0,ke).map((rt,dt)=>({id:dt,cells:Object.fromEntries(Mi.map(Pt=>[Pt,rt[Pt]??""])),image:rt.image,link:rt.link}))},[t,m]),Ye=pe?ae??f:Ne.length,Ze=s.useMemo(()=>pe?Ne.slice(0,Ye):Ne,[Ne,pe,Ye]),st=pe&&Ye<Ne.length,it=Ze.length>1||st,Oe=[Me?`${u}-divider-top`:"",Se||it?`${u}-divider-bottom`:""].filter(Boolean).join(" "),Ae=!n||i,mt=()=>{if(!Ae)return;const ke=ae??f;if(!S){O(Ne.length);return}O(Math.min(ke+S,Ne.length))},Be=ke=>F.scalingValue(ke,n??!1),De=fe?T??0:D??0,Ue=E??0,ct=x??0,he=Math.max(Ue,ps),Re=Dc(0,Ze.length,Me,Se,st,b??0,n??!1).borderTopWidth,nt=fe?"rowPaddingTopB":"rowPaddingTop",pt=Ge[0],Ve=Ge[Ge.length-1],vt=$e[0],Mt=$e[$e.length-1],At=pt&&vt?Math.max(vt.paddingLeft,uo):0,wt=Ve&&Mt?Math.max(Mt.paddingRight,uo):0,Vt=ve,jt=(ke,Je)=>a0(_,we.current,be?ke:null,Je),Yt=(ke,Je)=>{if(!J)return;const rt=ke.image;if(!(rt!=null&&rt.url)){se(()=>N(null));return}const dt=(z==null?void 0:z.min)??80,Pt=(z==null?void 0:z.max)??320,St=(re==null?void 0:re.rowId)===ke.id,ht=St?re.widthPx:H0(dt,Pt),{x:Wt,y:Tt}=jt(Je,ht);if(St&&be){K(Wt,Tt);return}N({rowId:ke.id,url:rt.url,objectFit:"contain",isVideo:t0(rt),widthPx:ht}),le.current={x:Wt,y:Tt}},Kt=ke=>{if(!J||!re||!be)return;const{x:Je,y:rt}=jt(ke,re.widthPx);K(Je,rt)},It=()=>{re&&se(()=>N(null))},zt=ke=>{X&&Wc(ke,u),!(!J||!re)&&se(()=>N(null))},on=ke=>{X&&Oc(ke,u)};s.useLayoutEffect(()=>{if(!re||!le.current)return;const{x:ke,y:Je}=le.current;le.current=null,ce(ke,Je)},[re==null?void 0:re.rowId,re==null?void 0:re.url,ce]),s.useLayoutEffect(()=>{if(!p||fe){xe(null);return}const ke=Ie.current,Je=ke==null?void 0:ke.parentElement;if(!ke||!Je){xe(null);return}const rt=()=>{const Pt=ke.querySelector("[data-list-row]");if(!Pt){xe(null);return}const St=Je.getBoundingClientRect(),ht=Pt.getBoundingClientRect();xe(ht.top-St.top+ht.height/2)};rt();const dt=new ResizeObserver(rt);return dt.observe(ke),dt.observe(Je),()=>dt.disconnect()},[p,fe,Ze,De,Ue,ct,t,e,Ge,Qe,Ce,b,Me,Se,st]);const xt=s.useMemo(()=>!fe&&Ol.some(ke=>{const Je=ke.charAt(0),rt=e[`${ke}VerticalAlign`];return lp(rt,e,Je)}),[fe,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);s.useLayoutEffect(()=>{var Wt;const ke=we.current;if(!ke)return;const Je=()=>{ke.querySelectorAll("[data-list-col]").forEach(Tt=>{Tt.style.transform="";const Ot=Tt.querySelector(`.${u}-list-col`);Ot&&(Ot.style.minHeight="",Ot.style.height="");const Gt=Tt.querySelector(`.${u}-list-col-title`);Gt&&(Gt.style.transform="")})};if(fe||!xt){Je();return}const rt=()=>{const Tt=Array.from(ke.querySelectorAll("[data-list-row]")),Ot=`${u}-list-col`,Gt=`${u}-baseline-probe`;Tt.forEach(kt=>{kt.querySelectorAll("[data-list-col]").forEach(_t=>{_t.style.transform="";const Ft=_t.querySelector(`.${Ot}`);Ft&&(Ft.style.minHeight="",Ft.style.height="");const ut=_t.querySelector(`.${u}-list-col-title`);ut&&(ut.style.transform="")})}),Tt.forEach(kt=>{const _t=Array.from(kt.querySelectorAll("[data-list-col]"));v0(kt,_t,Ot)}),ke.offsetHeight,Tt.forEach(kt=>{const _t=Array.from(kt.querySelectorAll("[data-list-col]")),Ft=kt.getBoundingClientRect().top,ut=new Map,H=_t.map(Fe=>{const ft=Fe.querySelector(`.${u}-list-col-title`),Ht={el:Fe,titleEl:ft,letter:Fe.getAttribute("data-col-letter")??"",kind:Fe.getAttribute("data-valign")??"top",anchor:Fe.getAttribute("data-valign-anchor")};return ut.set(Ht.letter,Ht),Ht}),Le=new Map,je=(Fe,ft)=>{const Ht=Le.get(Fe.letter);if(Ht!==void 0)return Ht;const gt=Fe.anchor?ut.get(Fe.anchor):void 0;if(Fe.kind!=="baseline"||!gt||ft.has(Fe.letter)){const cn=us(Fe,Ft,Ot,Gt);return Le.set(Fe.letter,cn),cn}ft.add(Fe.letter);const Lt=je(gt,ft);ft.delete(Fe.letter);const qt=us(Fe,Ft,Ot,Gt),Dt=Lt-qt;x0(Fe.titleEl,Dt);const an=us(Fe,Ft,Ot,Gt);return Le.set(Fe.letter,an),an};H.forEach(Fe=>je(Fe,new Set))})};let dt=null;const Pt=()=>{dt===null&&(dt=requestAnimationFrame(()=>{dt=null,rt()}))};rt();const St=new ResizeObserver(()=>Pt());St.observe(ke);let ht=!1;return typeof document<"u"&&((Wt=document.fonts)!=null&&Wt.ready)&&document.fonts.ready.then(()=>{ht||Pt()}),()=>{ht=!0,dt!==null&&(cancelAnimationFrame(dt),dt=null),St.disconnect(),Je()}},[xt,fe,e,t,Ce,Ze,Qe]);const yt=s.useMemo(()=>l0(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:yt}}),a.jsx("div",{style:I,children:a.jsxs("div",{ref:we,className:`${u}-wrapper ${ge}${Oe?` ${Oe}`:""}${fe?` ${u}-type-b`:""}`.trim(),style:{width:F.scalingValue(g??0,n)},onMouseMove:J?Kt:void 0,onMouseLeave:J?It:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[Ze.map((ke,Je)=>{var St;const rt=(((St=ke.link)==null?void 0:St.length)??0)>0,dt=rt&&(!n||i)?"a":"div",Pt=Dc(Je,Ze.length,Me,Se,st,b??0,n??!1);return a.jsxs(dt,{ref:Je===0?ht=>{Ie.current=ht}:void 0,className:`${u}-list-item${rt||L==="always"?` ${u}-list-item-has-link`:""}${st&&Je===Ze.length-1?` ${u}-list-item-before-cut`:""}`,...rt?{href:ke.link,target:"_blank"}:{},style:Pt,onMouseEnter:ht=>{X&&(rt||L==="always")&&Wc(ht,u),J&&Yt(ke,ht)},onMouseLeave:ht=>{X&&(rt||L==="always")&&Oc(ht,u)},children:[De>0&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:Be(De)}}),a.jsxs("div",{className:`${u}-list-cols-row${fe?"":` ${u}-list-cols-row-h`}${p&&Je===0&&fe?` ${u}-list-cols-row-controls`:""}`,...fe?{}:{"data-list-row":""},style:fe?void 0:{minHeight:Be(ct)},children:[Ge.map((ht,Wt)=>{const Tt=Wt===Ge.length-1,Ot=$e[Wt],Gt=ht.paddingBottom,kt=i0(ke.cells[ht.key]),_t=fe&&kt&&Gt>0,Ft=fe?{minHeight:Be(ct)}:{width:Be(Qe[Wt])},ut=fe?{paddingLeft:Be(ne),paddingRight:Be(ne)}:{paddingLeft:Be(Ot.paddingLeft),paddingRight:Be(Ot.paddingRight)},H=ht.textPrefix.charAt(0),Le=fe?p0(e[`${ht.textPrefix}VerticalAlign`]):u0(e[`${ht.textPrefix}VerticalAlign`],e,H),je=fe&&kt&&p&&Je===0;return fe&&!kt?null:a.jsxs("div",{className:fe?`${u}-list-col-wrap`:void 0,...fe?{}:{"data-list-col":"","data-col-letter":H,"data-valign":Le.kind,...Le.kind==="baseline"?{"data-valign-anchor":Le.anchorLetter}:{}},children:[a.jsx("div",{className:`${u}-list-col${Tt?` ${u}-list-col-last`:""}`,style:{...ut,...Ft,...fe?{justifyContent:jc(Le.kind)}:{}},"data-test":ht.width,children:a.jsx("span",{className:Gc(e,ht.textPrefix,`${u}-list-col-title`,`${u}-text-tight-leading`),style:{...Vc($a(e,ht.textPrefix),n),...Xc(e,ht.textPrefix,u,n),...fe?{}:m0(Le.kind)},children:ke.cells[ht.key]??null})}),_t&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:Be(Gt)}}),je&&a.jsx("div",{"data-controls":ht.paddingBottomKey,"data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Be(Math.max(Gt,ps))}})]},ht.key)}),p&&Je===0&&fe&&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(B),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{top:0,left:0,width:Be(ue),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(B),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{top:0,left:Be(Math.max(ue,ve-ue)),width:Be(ue),height:"100%"}})]})]}),!fe&&Ue>0&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:Be(Ue)}}),p&&Je===0&&!fe&&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:Be(he)}})]},ke.id)}),p&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":nt,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":fe?"center":"left-y",className:`${u}-control-anchor`,style:{top:Re,left:0,width:"100%",height:Be(Math.max(De,ps))}})},"row-padding-handles"),p&&!fe&&pt&&Ve&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":pt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Qe[0]-((vt==null?void 0:vt.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":me??void 0,className:`${u}-control-anchor`,style:{top:0,left:0,width:Be(At),height:"100%"}}),a.jsx("div",{"data-controls":Ve.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Qe[Ge.length-1]-((Mt==null?void 0:Mt.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":me??void 0,className:`${u}-control-anchor`,style:{top:0,left:Be(Vt-wt),width:Be(wt),height:"100%"}})]},"column-edge-padding-handles"),p&&!fe&&Ge.slice(0,-1).map((ke,Je)=>{const rt=Ge[Je+1],dt=ze.slice(0,Je+1).reduce((Tt,Ot)=>Tt+Ot,0),Pt=$e[Je],St=$e[Je+1],ht=Math.max(Pt.paddingRight,uo),Wt=Math.max(St.paddingLeft,uo);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":ke.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Qe[Je]-Pt.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":me??void 0,className:`${u}-control-anchor`,style:{top:0,left:Be(dt-ht),width:Be(ht),height:"100%"}}),a.jsx("div",{"data-controls":rt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Qe[Je+1]-St.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":me??void 0,className:`${u}-control-anchor`,style:{top:0,left:Be(dt),width:Be(Wt),height:"100%"}})]},`${ke.paddingRightKey}-padding`)}),p&&!fe&&Ge.slice(0,-1).map((ke,Je)=>{const rt=_0(Je,ze,_e,ve),Pt=ze.slice(0,Je+1).reduce((St,ht)=>St+ht,0)-Uc/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":ke.widthKey,"data-controls-axis":"x","data-controls-min":String(Bl),"data-controls-max-fraction":String(rt),"data-controls-variant":"column-width",className:`${u}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Be(Pt),width:Be(Uc),height:"calc(100%)",pointerEvents:"auto"}})},`${ke.widthKey}-junction`)})]}),st&&(()=>{const ke=$a(e,ai),Je=h0(e.cutLabelVerticalAlign),rt=ke.textTextAlign==="justify"||fe;return a.jsx("button",{type:"button",className:`${u}-cut-item`,style:{minHeight:Be(W??0),cursor:Ae?"pointer":"default",...o0(Se,b??0,n??!1)},onClick:Ae?mt:void 0,onMouseEnter:X||J?zt:void 0,onMouseLeave:X?on:void 0,children:a.jsx("div",{className:`${u}-list-cols-row`,style:{...fe?{paddingLeft:Be(ne),paddingRight:Be(ne)}:{},justifyContent:f0(ke.textTextAlign),alignItems:jc(Je)},children:a.jsx("span",{className:Gc(e,ai,`${u}-cut-label`,`${u}-text-tight-leading`),style:{...Vc(ke,n),...Xc(e,ai,u,n),...rt?{width:"100%"}:{}},children:q})})})})(),J&&re&&typeof document<"u"&&(()=>{const ke=`${re.widthPx}px`,Je={width:ke,height:"auto",maxHeight:ke,objectFit:"contain"},rt=(c?document.getElementById(c):null)??document.body;return Xn.createPortal(a.jsx("div",{ref:ye,className:`${u}-hover-media-anchor`,"data-selection":"none",children:a.jsx(n0,{media:re,className:re.isVideo?`${u}-hover-video`:`${u}-hover-image`,style:Je},`${re.rowId}-${re.url}`)}),rt)})()]})})]})}const B0=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
10349
+ `}const Ii=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Ol=["AColumn","BColumn","CColumn","DColumn","EColumn"],ai="cutLabel",xr=[...Ol,ai],za=["A","B","C","D","E"];function ap(e){return`${e}ColumnVerticalAlign`}const Us=["Top","Center","Bottom"];function Dl(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return za.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function c0(e){const t=Dl(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function d0(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return za.includes(n)?n:null}function sp(e,t,n){const i=d0(e);return i?i===t?!1:c0(n[ap(i)]):!0}function br(e){const t=Dl(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return za.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function u0(e,t,n){if(lp(e,t,n))return br(e);const i=br(e);return i.kind==="baseline"?{kind:"top"}:i}function p0(e){const t=br(e);return t.kind==="baseline"?{kind:"top"}:t}function lp(e,t,n){return sp(e,n,t)?br(e).kind==="baseline":!1}function g0(e){const t={};let n=!1;for(const i of za){const o=ap(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}sp(r,i,e)||(t[o]="Top",n=!0)}return n?t:null}function m0(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function h0(e){const t=br(e).kind;return t==="baseline"?"center":t}function f0(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 y0(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=y0(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 v0(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 x0(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const b0={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Ut(e,t){return`${e}${t.replace(/^text/,"Text")}`}const S0={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function w0(e){return[Ut(e,"textFontFamily"),Ut(e,"textFontSettings"),{type:"row",items:[Ut(e,"textFontSize"),Ut(e,"textLineHeight"),Ut(e,"textLetterSpacing"),Ut(e,"textWordSpacing")]},Ut(e,"textTextAlign"),Ut(e,"textTextAppearance"),`${e}VerticalAlign`]}function $0(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(xr.map(e=>[S0[e],w0(e)]))}}function $a(e,t){const n=i=>{const o=Ut(t,i);return e[o]};return{textFontFamily:n("textFontFamily")??"Arial",textFontSettings:n("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:n("textFontSize"),textLineHeight:n("textLineHeight"),textLetterSpacing:n("textLetterSpacing")??0,textWordSpacing:n("textWordSpacing")??0,textTextAlign:n("textTextAlign")??(t===ai?"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 un(en(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`]:F.scalingValue((r-l)/2,i)}}const Rn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Mo=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],Eo=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],ko=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],C0={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},T0=["hover","focus","filled","success","error"],Uc=.004,uo=.004,ps=uo,Bl=50,Sr=1440,wr=Bl/Sr;function cp(e){const t=typeof e=="number"&&e>0?e:Sr;return Bl/t}function L0(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 dp={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 P0(e,t=1){const n=t/e;return Object.fromEntries(Rn.map(i=>[i,n]))}function I0(){return Object.fromEntries([...Mo.map(e=>[e,0]),...Eo.map(e=>[e,0])])}function R0(){return Object.fromEntries(ko.map(e=>[e,0]))}function Vr(e){return Object.fromEntries(Rn.map(t=>[t,typeof e[t]=="number"?e[t]:dp[t]]))}function up(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=zl(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 M0(e,t,n){const i={};for(let o=0;o<e;o+=1){const r=Mo[o],l=Eo[o],c=typeof n[r]=="number"?n[r]:0,d=typeof n[l]=="number"?n[l]:0,u=up(t[o]??0,c,d);u.paddingLeft!==c&&(i[r]=u.paddingLeft),u.paddingRight!==d&&(i[l]=u.paddingRight)}return i}function zl(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 E0(e,t,n){if(e<=1)return{};const i=zl(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 qc(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Ii]}function k0(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function A0(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=Mo[d],y=Eo[d],v=ko[d],g=Rn[l],m=Mo[l],x=Eo[l],b=ko[l],M=n[u],f=n[p],S=n[y],W=n[v];typeof M=="number"&&(r[g]=M),typeof f=="number"&&(r[m]=f),typeof S=="number"&&(r[x]=S),typeof W=="number"&&(r[b]=W)}return r}function pp(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 F0(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,...P0(n,o),...I0()};if(r)for(const c of ko)typeof t[c]=="number"&&(l[c]=t[c]);else Object.assign(l,R0());return pp(e,l)?l:e}function N0(e,t,n){const i=g0(e);i&&(e={...e,...i});const o=cp(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:Ii.length,y=S=>{if(u)return S;const W=Vr({...t,...S}),q=lr(S),z=ga(p,q,W),P=M0(p,z,{...t,...S});return Object.keys(P).length===0?S:{...S,...P}};if(typeof r=="number"&&r!==l)return e;const v=qc(e),g=qc(t);if(!k0(v,g))return y({...e,...A0(v,g,t,p)});if(c<d&&typeof p=="number"&&!u){const S=Vr({...t,...e});return y({...e,...E0(p,c,S)})}if(u){const S=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,W=Math.max(0,(c-o)/2);return S>W?{...e,textPaddingLR:W}:e}const m=Vr({...t,...e}),x=ga(p,d,Vr(t)),M=ga(p,c,m).some((S,W)=>S<(x[W]??S)),f=Rn.some(S=>{const W=e[S],q=t[S];return typeof W=="number"&&typeof q=="number"&&W!==q});return M||f?y(e):e}function _0(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 H0(e,t){return Math.random()*(t-e)+e}function W0(e){return Object.fromEntries(Rn.map(t=>[t,typeof e[t]=="number"?e[t]:dp[t]]))}function gs(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function O0(e,t,n,i,o,r){return e.slice(0,t).map((l,c)=>{const d=Mo[c],u=Eo[c],p=ko[c];return{key:l,textPrefix:b0[l],widthKey:Rn[c],width:n[Rn[c]],paddingLeftKey:d,paddingRightKey:u,paddingBottomKey:p,paddingLeft:i[d],paddingRight:o[u],paddingBottom:r[p]}})}function D0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r,layoutId:l,portalId:c,onUpdateSettings:d}){const{prefix:u}=F.useScopedStyles(),p=!!o,{columns:y,type:v,wrapperWidth:g,entriesCount:m,cellMinHeight:x,dividerWidth:b,showVisibility:M,cut:f,showCut:S,cutCellMinHeight:W,cutLabel:q,imageSize:z,imageOnHover:P,imagePosition:_="cursor",imageInterpolation:G="on",entryHoverEffect:$,entryHoverShowOption:L,rowPaddingTop:D,rowPaddingBottom:E,rowPaddingTopB:T,columnsOrder:C,textPaddingLR:V,textColor:w,backgroundColor:U,dividerColor:I,textHoverColor:A,backgroundHoverColor:j,dividerHoverColor:ie}=e,[ae,O]=s.useState(void 0),[re,N]=s.useState(null),le=s.useRef(null),J=P==="on"&&(!n||i),be=_==="cursor",Pe=be&&G==="on",{anchorRef:ye,onShow:ce,onCursorMove:K,exit:se}=s0(!!(J&&re!==null),Pe),pe=(f??0)>0,fe=v==="b",we=s.useRef(null),Re=s.useRef(null),[me,xe]=s.useState(null),[Ce,h]=s.useState(Sr),Y=cp(Ce),Q=Math.max(0,((g??0)-Y)/2),ne=Math.min(V??0,Q),ue=Math.max(ne,uo),B=((g??0)+Y)/2;s.useLayoutEffect(()=>{if(!n){h(Sr);return}const ke=()=>{h(L0(we.current))};ke();const Je=we.current;if(!Je)return;const rt=new ResizeObserver(ke);rt.observe(Je);let dt=Je;for(;dt&&!dt.style.getPropertyValue("--cntrl-article-width");)dt=dt.parentElement;return dt&&rt.observe(dt),()=>rt.disconnect()},[n,l]),s.useEffect(()=>{O(void 0)},[f,S,t,m]),s.useEffect(()=>{n&&!i&&O(void 0)},[n,i]);const R=F.buildColorVars(u,{textColor:w,backgroundColor:U,dividerColor:I,textHoverColor:A,backgroundHoverColor:j,dividerHoverColor:ie},C0,T0),ee=r&&r!=="default"?`${u}-state-${r}`:"",ge=`${!n||i?$==="default"?`${u}-entry-hover-default`:$==="blinds"?`${u}-entry-hover-blinds`:$==="reveal"?`${u}-entry-hover-reveal`:"":""} ${ee}`.trim(),X=$==="reveal"&&(!n||i),Ie=(M==null?void 0:M[0])??!1,Se=(M==null?void 0:M[1])??!1,Z=s.useRef(e),He=s.useRef(l);s.useEffect(()=>{if(!d||!n){Z.current=e,He.current=l;return}if(He.current!==l){Z.current=e,He.current=l;return}const ke=Z.current;if(!(ke!==e))return;if(typeof ke.columns=="number"&&typeof e.columns=="number"&&ke.columns!==e.columns){Z.current=e;return}const rt=N0(e,ke,{designWidth:Ce});Z.current=e,pp(e,rt)&&d(rt)},[e,d,n,l,Ce]);const We=s.useMemo(()=>W0(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ot=s.useMemo(()=>gs(e,Mo),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),qe=s.useMemo(()=>gs(e,Eo),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),tt=s.useMemo(()=>gs(e,ko),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),et=s.useMemo(()=>Array.isArray(C)&&C.length>0?C:[...Ii],[C]),Ge=s.useMemo(()=>O0(et,y,We,ot,qe,tt),[et,y,We,ot,qe,tt]),ve=lr(e),_e=s.useMemo(()=>Rn.slice(0,y).map(ke=>We[ke]),[y,We]),ze=s.useMemo(()=>zl(y,ve,We),[y,ve,We]),Qe=s.useMemo(()=>ga(y,ve,We),[y,ve,We]),$e=s.useMemo(()=>Ge.map((ke,Je)=>up(Qe[Je]??0,ke.paddingLeft,ke.paddingRight)),[Ge,Qe]),Ne=s.useMemo(()=>{const ke=m===0?1/0:m;return(t??[]).slice(0,ke).map((rt,dt)=>({id:dt,cells:Object.fromEntries(Ii.map(Pt=>[Pt,rt[Pt]??""])),image:rt.image,link:rt.link}))},[t,m]),Ye=pe?ae??f:Ne.length,Ze=s.useMemo(()=>pe?Ne.slice(0,Ye):Ne,[Ne,pe,Ye]),st=pe&&Ye<Ne.length,it=Ze.length>1||st,Oe=[Ie?`${u}-divider-top`:"",Se||it?`${u}-divider-bottom`:""].filter(Boolean).join(" "),Ae=!n||i,mt=()=>{if(!Ae)return;const ke=ae??f;if(!S){O(Ne.length);return}O(Math.min(ke+S,Ne.length))},Be=ke=>F.scalingValue(ke,n??!1),De=fe?T??0:D??0,Ue=E??0,ct=x??0,he=Math.max(Ue,ps),Me=Dc(0,Ze.length,Ie,Se,st,b??0,n??!1).borderTopWidth,nt=fe?"rowPaddingTopB":"rowPaddingTop",pt=Ge[0],Ve=Ge[Ge.length-1],vt=$e[0],It=$e[$e.length-1],At=pt&&vt?Math.max(vt.paddingLeft,uo):0,wt=Ve&&It?Math.max(It.paddingRight,uo):0,Vt=ve,jt=(ke,Je)=>a0(_,we.current,be?ke:null,Je),Yt=(ke,Je)=>{if(!J)return;const rt=ke.image;if(!(rt!=null&&rt.url)){se(()=>N(null));return}const dt=(z==null?void 0:z.min)??80,Pt=(z==null?void 0:z.max)??320,St=(re==null?void 0:re.rowId)===ke.id,ht=St?re.widthPx:H0(dt,Pt),{x:Wt,y:Tt}=jt(Je,ht);if(St&&be){K(Wt,Tt);return}N({rowId:ke.id,url:rt.url,objectFit:"contain",isVideo:t0(rt),widthPx:ht}),le.current={x:Wt,y:Tt}},Kt=ke=>{if(!J||!re||!be)return;const{x:Je,y:rt}=jt(ke,re.widthPx);K(Je,rt)},Rt=()=>{re&&se(()=>N(null))},zt=ke=>{X&&Wc(ke,u),!(!J||!re)&&se(()=>N(null))},on=ke=>{X&&Oc(ke,u)};s.useLayoutEffect(()=>{if(!re||!le.current)return;const{x:ke,y:Je}=le.current;le.current=null,ce(ke,Je)},[re==null?void 0:re.rowId,re==null?void 0:re.url,ce]),s.useLayoutEffect(()=>{if(!p||fe){xe(null);return}const ke=Re.current,Je=ke==null?void 0:ke.parentElement;if(!ke||!Je){xe(null);return}const rt=()=>{const Pt=ke.querySelector("[data-list-row]");if(!Pt){xe(null);return}const St=Je.getBoundingClientRect(),ht=Pt.getBoundingClientRect();xe(ht.top-St.top+ht.height/2)};rt();const dt=new ResizeObserver(rt);return dt.observe(ke),dt.observe(Je),()=>dt.disconnect()},[p,fe,Ze,De,Ue,ct,t,e,Ge,Qe,Ce,b,Ie,Se,st]);const xt=s.useMemo(()=>!fe&&Ol.some(ke=>{const Je=ke.charAt(0),rt=e[`${ke}VerticalAlign`];return lp(rt,e,Je)}),[fe,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);s.useLayoutEffect(()=>{var Wt;const ke=we.current;if(!ke)return;const Je=()=>{ke.querySelectorAll("[data-list-col]").forEach(Tt=>{Tt.style.transform="";const Ot=Tt.querySelector(`.${u}-list-col`);Ot&&(Ot.style.minHeight="",Ot.style.height="");const Gt=Tt.querySelector(`.${u}-list-col-title`);Gt&&(Gt.style.transform="")})};if(fe||!xt){Je();return}const rt=()=>{const Tt=Array.from(ke.querySelectorAll("[data-list-row]")),Ot=`${u}-list-col`,Gt=`${u}-baseline-probe`;Tt.forEach(kt=>{kt.querySelectorAll("[data-list-col]").forEach(_t=>{_t.style.transform="";const Ft=_t.querySelector(`.${Ot}`);Ft&&(Ft.style.minHeight="",Ft.style.height="");const ut=_t.querySelector(`.${u}-list-col-title`);ut&&(ut.style.transform="")})}),Tt.forEach(kt=>{const _t=Array.from(kt.querySelectorAll("[data-list-col]"));v0(kt,_t,Ot)}),ke.offsetHeight,Tt.forEach(kt=>{const _t=Array.from(kt.querySelectorAll("[data-list-col]")),Ft=kt.getBoundingClientRect().top,ut=new Map,H=_t.map(Fe=>{const ft=Fe.querySelector(`.${u}-list-col-title`),Ht={el:Fe,titleEl:ft,letter:Fe.getAttribute("data-col-letter")??"",kind:Fe.getAttribute("data-valign")??"top",anchor:Fe.getAttribute("data-valign-anchor")};return ut.set(Ht.letter,Ht),Ht}),Le=new Map,je=(Fe,ft)=>{const Ht=Le.get(Fe.letter);if(Ht!==void 0)return Ht;const gt=Fe.anchor?ut.get(Fe.anchor):void 0;if(Fe.kind!=="baseline"||!gt||ft.has(Fe.letter)){const cn=us(Fe,Ft,Ot,Gt);return Le.set(Fe.letter,cn),cn}ft.add(Fe.letter);const Lt=je(gt,ft);ft.delete(Fe.letter);const qt=us(Fe,Ft,Ot,Gt),Dt=Lt-qt;x0(Fe.titleEl,Dt);const an=us(Fe,Ft,Ot,Gt);return Le.set(Fe.letter,an),an};H.forEach(Fe=>je(Fe,new Set))})};let dt=null;const Pt=()=>{dt===null&&(dt=requestAnimationFrame(()=>{dt=null,rt()}))};rt();const St=new ResizeObserver(()=>Pt());St.observe(ke);let ht=!1;return typeof document<"u"&&((Wt=document.fonts)!=null&&Wt.ready)&&document.fonts.ready.then(()=>{ht||Pt()}),()=>{ht=!0,dt!==null&&(cancelAnimationFrame(dt),dt=null),St.disconnect(),Je()}},[xt,fe,e,t,Ce,Ze,Qe]);const yt=s.useMemo(()=>l0(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:yt}}),a.jsx("div",{style:R,children:a.jsxs("div",{ref:we,className:`${u}-wrapper ${ge}${Oe?` ${Oe}`:""}${fe?` ${u}-type-b`:""}`.trim(),style:{width:F.scalingValue(g??0,n)},onMouseMove:J?Kt:void 0,onMouseLeave:J?Rt:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[Ze.map((ke,Je)=>{var St;const rt=(((St=ke.link)==null?void 0:St.length)??0)>0,dt=rt&&(!n||i)?"a":"div",Pt=Dc(Je,Ze.length,Ie,Se,st,b??0,n??!1);return a.jsxs(dt,{ref:Je===0?ht=>{Re.current=ht}:void 0,className:`${u}-list-item${rt||L==="always"?` ${u}-list-item-has-link`:""}${st&&Je===Ze.length-1?` ${u}-list-item-before-cut`:""}`,...rt?{href:ke.link,target:"_blank"}:{},style:Pt,onMouseEnter:ht=>{X&&(rt||L==="always")&&Wc(ht,u),J&&Yt(ke,ht)},onMouseLeave:ht=>{X&&(rt||L==="always")&&Oc(ht,u)},children:[De>0&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:Be(De)}}),a.jsxs("div",{className:`${u}-list-cols-row${fe?"":` ${u}-list-cols-row-h`}${p&&Je===0&&fe?` ${u}-list-cols-row-controls`:""}`,...fe?{}:{"data-list-row":""},style:fe?void 0:{minHeight:Be(ct)},children:[Ge.map((ht,Wt)=>{const Tt=Wt===Ge.length-1,Ot=$e[Wt],Gt=ht.paddingBottom,kt=i0(ke.cells[ht.key]),_t=fe&&kt&&Gt>0,Ft=fe?{minHeight:Be(ct)}:{width:Be(Qe[Wt])},ut=fe?{paddingLeft:Be(ne),paddingRight:Be(ne)}:{paddingLeft:Be(Ot.paddingLeft),paddingRight:Be(Ot.paddingRight)},H=ht.textPrefix.charAt(0),Le=fe?p0(e[`${ht.textPrefix}VerticalAlign`]):u0(e[`${ht.textPrefix}VerticalAlign`],e,H),je=fe&&kt&&p&&Je===0;return fe&&!kt?null:a.jsxs("div",{className:fe?`${u}-list-col-wrap`:void 0,...fe?{}:{"data-list-col":"","data-col-letter":H,"data-valign":Le.kind,...Le.kind==="baseline"?{"data-valign-anchor":Le.anchorLetter}:{}},children:[a.jsx("div",{className:`${u}-list-col${Tt?` ${u}-list-col-last`:""}`,style:{...ut,...Ft,...fe?{justifyContent:jc(Le.kind)}:{}},"data-test":ht.width,children:a.jsx("span",{className:Gc(e,ht.textPrefix,`${u}-list-col-title`,`${u}-text-tight-leading`),style:{...Vc($a(e,ht.textPrefix),n),...Xc(e,ht.textPrefix,u,n),...fe?{}:m0(Le.kind)},children:ke.cells[ht.key]??null})}),_t&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:Be(Gt)}}),je&&a.jsx("div",{"data-controls":ht.paddingBottomKey,"data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Be(Math.max(Gt,ps))}})]},ht.key)}),p&&Je===0&&fe&&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(B),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{top:0,left:0,width:Be(ue),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(B),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{top:0,left:Be(Math.max(ue,ve-ue)),width:Be(ue),height:"100%"}})]})]}),!fe&&Ue>0&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:Be(Ue)}}),p&&Je===0&&!fe&&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:Be(he)}})]},ke.id)}),p&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":nt,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":fe?"center":"left-y",className:`${u}-control-anchor`,style:{top:Me,left:0,width:"100%",height:Be(Math.max(De,ps))}})},"row-padding-handles"),p&&!fe&&pt&&Ve&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":pt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Qe[0]-((vt==null?void 0:vt.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":me??void 0,className:`${u}-control-anchor`,style:{top:0,left:0,width:Be(At),height:"100%"}}),a.jsx("div",{"data-controls":Ve.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Qe[Ge.length-1]-((It==null?void 0:It.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":me??void 0,className:`${u}-control-anchor`,style:{top:0,left:Be(Vt-wt),width:Be(wt),height:"100%"}})]},"column-edge-padding-handles"),p&&!fe&&Ge.slice(0,-1).map((ke,Je)=>{const rt=Ge[Je+1],dt=ze.slice(0,Je+1).reduce((Tt,Ot)=>Tt+Ot,0),Pt=$e[Je],St=$e[Je+1],ht=Math.max(Pt.paddingRight,uo),Wt=Math.max(St.paddingLeft,uo);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":ke.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Qe[Je]-Pt.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":me??void 0,className:`${u}-control-anchor`,style:{top:0,left:Be(dt-ht),width:Be(ht),height:"100%"}}),a.jsx("div",{"data-controls":rt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Qe[Je+1]-St.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":me??void 0,className:`${u}-control-anchor`,style:{top:0,left:Be(dt),width:Be(Wt),height:"100%"}})]},`${ke.paddingRightKey}-padding`)}),p&&!fe&&Ge.slice(0,-1).map((ke,Je)=>{const rt=_0(Je,ze,_e,ve),Pt=ze.slice(0,Je+1).reduce((St,ht)=>St+ht,0)-Uc/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":ke.widthKey,"data-controls-axis":"x","data-controls-min":String(Bl),"data-controls-max-fraction":String(rt),"data-controls-variant":"column-width",className:`${u}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Be(Pt),width:Be(Uc),height:"calc(100%)",pointerEvents:"auto"}})},`${ke.widthKey}-junction`)})]}),st&&(()=>{const ke=$a(e,ai),Je=h0(e.cutLabelVerticalAlign),rt=ke.textTextAlign==="justify"||fe;return a.jsx("button",{type:"button",className:`${u}-cut-item`,style:{minHeight:Be(W??0),cursor:Ae?"pointer":"default",...o0(Se,b??0,n??!1)},onClick:Ae?mt:void 0,onMouseEnter:X||J?zt:void 0,onMouseLeave:X?on:void 0,children:a.jsx("div",{className:`${u}-list-cols-row`,style:{...fe?{paddingLeft:Be(ne),paddingRight:Be(ne)}:{},justifyContent:f0(ke.textTextAlign),alignItems:jc(Je)},children:a.jsx("span",{className:Gc(e,ai,`${u}-cut-label`,`${u}-text-tight-leading`),style:{...Vc(ke,n),...Xc(e,ai,u,n),...rt?{width:"100%"}:{}},children:q})})})})(),J&&re&&typeof document<"u"&&(()=>{const ke=`${re.widthPx}px`,Je={width:ke,height:"auto",maxHeight:ke,objectFit:"contain"},rt=(c?document.getElementById(c):null)??document.body;return Xn.createPortal(a.jsx("div",{ref:ye,className:`${u}-hover-media-anchor`,"data-selection":"none",children:a.jsx(n0,{media:re,className:re.isVideo?`${u}-hover-video`:`${u}-hover-image`,style:Je},`${re.rowId}-${re.url}`)}),rt)})()]})})]})}const B0=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
10350
10350
  import { createPortal } from 'react-dom';
10351
10351
  import { CommonComponentProps } from '../props';
10352
10352
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
@@ -13436,7 +13436,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13436
13436
  </>
13437
13437
  );
13438
13438
  }
13439
- `,zo=["A","B","C","D","E"],Yc=[...Us,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Ni={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance"},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){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function Gr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function j0(){return Object.fromEntries(zo.map((e,t)=>{const n=Mi[t],i=`${e} column`;return[n,z0(i)]}))}function V0(){const e={};for(const t of zo)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 Kc(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Mi]};for(const r of zo)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 G0(e){const t={};if(e===ai)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[Ut(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Ut(e,"textFontSettings")]={...Ni.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Ut(e,"textFontSize")]={...Ni.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ut(e,"textLineHeight")]={...Ni.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ut(e,"textLetterSpacing")]={...Ni.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ut(e,"textWordSpacing")]={...Ni.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ut(e,"textTextAlign")]={...Ni.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ut(e,"textTextAppearance")]={...Ni.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const X0=xr.reduce((e,t)=>({...e,...G0(t)}),{});function U0(e){return{verticalAlign:e===ai?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===ai?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function q0(e,t={}){var n;return{...U0(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Qc=new Set(["textFontFamily","textFontSettings"]);function Y0(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[Ut(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Ut(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Ut(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Ut(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Ut(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Ut(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Ut(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Ut(e,"textTextAppearance")]=t.textTextAppearance),o}function ma(e={},t){return xr.reduce((n,i)=>({...n,...Y0(i,q0(i,e),t)}),{})}const K0=ma(),Q0=$0();function gp(e){return[Ut(e,"textFontFamily"),Ut(e,"textFontSettings"),Ut(e,"textFontSize"),Ut(e,"textLineHeight"),Ut(e,"textLetterSpacing"),Ut(e,"textWordSpacing"),Ut(e,"textTextAlign"),Ut(e,"textTextAppearance"),`${e}VerticalAlign`]}function Z0(){const e=[];return Ol.forEach((t,n)=>{const i=Mi[n],o=gp(t);for(let r=1;r<Mi.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 J0=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];gp(ai);const ex=[...zo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],_i=[{objectFit:"contain",url:"01M3QM74XESYN1HRYH9VRTZ5CK"},{objectFit:"contain",url:"01M3QM74XEVZ9F59FC7M9BA63Q"},{objectFit:"contain",url:"01M3QM74XEE2101QD8PM6E4JSA"},{objectFit:"contain",url:"01M3QM74XE20C38X4NND20C5R4"},{objectFit:"contain",url:"01M3QM74XEGBJMJ7Q63KMZY6NA"},{objectFit:"contain",url:"01M3QM74XEBS5231QA4355P4VQ"},{objectFit:"contain",url:"01M3QM74XEWT5YM43KF6PEYRCV"}],tx=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:_i[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:_i[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:_i[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:_i[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:_i[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:_i[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:_i[6],link:""}],nx=[...zo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],ix={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...j0(),image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:tx},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"}},...V0(),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"}},...X0,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",...K0,...ma({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Kc({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},...ma({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Kc({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},...ma({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...Z0(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...ex.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}},...zo.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",...nx]},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__",Q0]}],paletteBookmark:{items:[...J0],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},ox={element:D0,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>F0(e,t),preview:{type:"image",url:"01M3QM74XGZ2M0FA7122EKXDJM"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...xr.map(e=>({path:`${Ut(e,"textFontFamily")}`}))]},fontRelations:{...xr.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${Ut(t,"textFontFamily")}`}),{})},schema:ix,sourceCode:B0},Zc=300,gi=.004,rx={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"},ax=["hover","focus","filled","success","error"];function sx(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`]:F.scalingValue((o-t)/2,i)}}function lx(e){return`
13439
+ `,zo=["A","B","C","D","E"],Yc=[...Us,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Ni={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance"},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){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function Gr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function j0(){return Object.fromEntries(zo.map((e,t)=>{const n=Ii[t],i=`${e} column`;return[n,z0(i)]}))}function V0(){const e={};for(const t of zo)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 Kc(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Ii]};for(const r of zo)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 G0(e){const t={};if(e===ai)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[Ut(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Ut(e,"textFontSettings")]={...Ni.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Ut(e,"textFontSize")]={...Ni.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ut(e,"textLineHeight")]={...Ni.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ut(e,"textLetterSpacing")]={...Ni.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ut(e,"textWordSpacing")]={...Ni.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ut(e,"textTextAlign")]={...Ni.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ut(e,"textTextAppearance")]={...Ni.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const X0=xr.reduce((e,t)=>({...e,...G0(t)}),{});function U0(e){return{verticalAlign:e===ai?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===ai?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function q0(e,t={}){var n;return{...U0(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Qc=new Set(["textFontFamily","textFontSettings"]);function Y0(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[Ut(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Ut(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Ut(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Ut(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Ut(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Ut(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Ut(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Ut(e,"textTextAppearance")]=t.textTextAppearance),o}function ma(e={},t){return xr.reduce((n,i)=>({...n,...Y0(i,q0(i,e),t)}),{})}const K0=ma(),Q0=$0();function gp(e){return[Ut(e,"textFontFamily"),Ut(e,"textFontSettings"),Ut(e,"textFontSize"),Ut(e,"textLineHeight"),Ut(e,"textLetterSpacing"),Ut(e,"textWordSpacing"),Ut(e,"textTextAlign"),Ut(e,"textTextAppearance"),`${e}VerticalAlign`]}function Z0(){const e=[];return Ol.forEach((t,n)=>{const i=Ii[n],o=gp(t);for(let r=1;r<Ii.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 J0=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];gp(ai);const ex=[...zo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],_i=[{objectFit:"contain",url:"01M3QM74XESYN1HRYH9VRTZ5CK"},{objectFit:"contain",url:"01M3QM74XEVZ9F59FC7M9BA63Q"},{objectFit:"contain",url:"01M3QM74XEE2101QD8PM6E4JSA"},{objectFit:"contain",url:"01M3QM74XE20C38X4NND20C5R4"},{objectFit:"contain",url:"01M3QM74XEGBJMJ7Q63KMZY6NA"},{objectFit:"contain",url:"01M3QM74XEBS5231QA4355P4VQ"},{objectFit:"contain",url:"01M3QM74XEWT5YM43KF6PEYRCV"}],tx=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:_i[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:_i[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:_i[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:_i[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:_i[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:_i[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:_i[6],link:""}],nx=[...zo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],ix={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...j0(),image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:tx},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"}},...V0(),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"}},...X0,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",...K0,...ma({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Kc({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},...ma({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Kc({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},...ma({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...Z0(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...ex.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}},...zo.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",...nx]},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__",Q0]}],paletteBookmark:{items:[...J0],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},ox={element:D0,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>F0(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme-list-default.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...xr.map(e=>({path:`${Ut(e,"textFontFamily")}`}))]},fontRelations:{...xr.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${Ut(t,"textFontFamily")}`}),{})},schema:ix,sourceCode:B0},Zc=300,gi=.004,rx={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"},ax=["hover","focus","filled","success","error"];function sx(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`]:F.scalingValue((o-t)/2,i)}}function lx(e){return`
13440
13440
  .${e}-wrapper {
13441
13441
  box-sizing: border-box;
13442
13442
  display: flex;
@@ -13601,7 +13601,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13601
13601
  pointer-events: none;
13602
13602
  z-index: 2;
13603
13603
  }
13604
- `}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 cx({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r}){const{prefix:l}=F.useScopedStyles(),c=o??!1,{wrapperWidth:d=1,cellMinHeight:u=0,dividerWidth:p=694e-6,dividerStyle:y="solid",entryHoverEffect:v="default",autoclose:g="off",icon:m,iconMaxWidth:x=.00833,iconPaddingRight:b=0,iconAnimation:R="rotate 45",questionColor:f="#000000",answerColor:S="#000000",dividerColor:W="#0000001F",iconColor:q="#000000",questionHoverColor:z="#666666",iconHoverColor:P="#666666",iconActiveColor:_="#000000",dividerHoverColor:G="#000000",questionFontFamily:$,questionFontSettings:L,questionFontSize:D,questionLineHeight:E,questionLetterSpacing:T,questionWordSpacing:C,questionTextAppearance:V,answerFontFamily:w,answerFontSettings:U,answerFontSize:M,answerLineHeight:A,answerLetterSpacing:j,answerWordSpacing:ie,answerTextAppearance:ae,questionPaddingLeft:O=0,questionPaddingTop:re=0,questionPaddingBottom:N=0,answerPaddingLeft:le=0,answerPaddingRight:J=0,answerPaddingTop:be=0,answerPaddingBottom:Pe=0}=e,ye=t??[],[ce,K]=s.useState(()=>new Set),se=!n||i;s.useEffect(()=>{K(new Set)},[g]),s.useEffect(()=>{n&&!o&&!i&&K(new Set)},[n,o,i]);const pe=Qe=>F.scalingValue(Qe,n??!1),fe=Math.max(O,gi),we=Math.max(re,gi),Ie=Math.max(N,gi),me=Math.max(le,gi),xe=Math.max(J,gi),Ce=Math.max(be,gi),h=Math.max(Pe,gi),Y=Math.max(0,(d??1)-b-x),Q=Math.max(0,(d??1)-J),ne=Math.max(0,(d??1)-le),ue=Math.max(b,gi),B=Math.max(0,(d??1)-O-x),I=s.useMemo(()=>ce.size===0?0:Math.min(...ce),[ce]),ee=s.useCallback(Qe=>ce.has(Qe),[ce]),te=se&&v==="default"?`${l}-entry-hover-default`:"",ge=m??"",X=ge!=="",Me=R.replace(/^rotate /,""),Se=`${l}-icon-anim-${Me}`,Z=un(en(td($,L,D,E,T,C,V,f),n)),He=un(en(td(w,U,M,A,j,ie,ae,S),n)),We=Jc(D,E,`${l}-question`,`${l}-text-tight-leading`),ot=Jc(M,A,`${l}-answer-text`,`${l}-text-tight-leading`),qe=ed(D,E,l,n),tt=ed(M,A,l,n),et=F.buildColorVars(l,{questionColor:f,answerColor:S,dividerColor:W,iconColor:q,questionHoverColor:z,iconHoverColor:P,iconActiveColor:_,dividerHoverColor:G},rx,ax),Ge=r&&r!=="default"?`${l}-state-${r}`:"",ve=s.useCallback(Qe=>{se&&K($e=>{if($e.has(Qe)){const Ye=new Set($e);return Ye.delete(Qe),Ye}if(g==="on")return new Set([Qe]);const Ne=new Set($e);return Ne.add(Qe),Ne})},[se,g]),_e=s.useMemo(()=>lx(l),[l]),ze={[`--${l}-divider-width`]:F.scalingValue(p,n??!1),[`--${l}-divider-style`]:y,[`--${l}-icon-max-width`]:F.scalingValue(x,n??!1),...u>0?{[`--${l}-question-min-height`]:F.scalingValue(u,n??!1)}:{}};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:_e}}),a.jsx("div",{style:et,children:a.jsx("div",{className:Ct(`${l}-wrapper`,n&&!i&&`${l}-editor`,te,Ge),style:{width:F.scalingValue(d,n??!1),maxWidth:"100%",...ze},children:ye.map((Qe,$e)=>{var Oe;const Ne=ee($e),Ye=((Oe=Qe.question)==null?void 0:Oe.trim())??"",Ze=Qe.answer,st=((Ze==null?void 0:Ze.length)??0)>0,it=c&&$e===I;return a.jsxs("div",{className:Ct(`${l}-item`,Ne&&`${l}-item-open`),"data-faq-item":"",children:[a.jsxs("div",{className:`${l}-question-controls`,children:[it&&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:pe(we)}}),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:pe(fe),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(B),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:pe(ue),height:"100%"}})]}),a.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":Ne,style:{...Z,...qe,paddingLeft:pe(O),paddingRight:pe(b)},onClick:()=>ve($e),children:[re>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:pe(re)},"aria-hidden":"true"}),a.jsxs("span",{className:`${l}-question-row`,children:[a.jsx("span",{className:We,children:Ye}),st&&(X?a.jsx("span",{className:`${l}-icon ${l}-icon-custom ${Se}`,"aria-hidden":"true",children:a.jsx(gn,{url:ge,fill:`var(--${l}-icon-color)`,hoverFill:`var(--${l}-icon-hover-color, var(--${l}-icon-color))`,className:`${l}-icon-image`})}):a.jsx("span",{className:`${l}-icon ${l}-icon-default ${Se}`,"aria-hidden":"true"}))]}),N>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:pe(N)},"aria-hidden":"true"})]}),it&&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:pe(Ie)}})]}),st&&Ze&&a.jsx("div",{className:`${l}-panel`,"aria-hidden":!Ne,children:a.jsx("div",{className:`${l}-panel-inner`,children:a.jsxs("div",{className:`${l}-answer-controls`,children:[it&&Ne&&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:pe(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(Q),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:pe(me),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(ne),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:pe(xe),height:"100%"}})]}),be>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:pe(be)}}),a.jsx("div",{className:`${l}-answer`,style:{...He,...tt,paddingLeft:pe(le),paddingRight:pe(J)},children:a.jsx("div",{className:ot,children:a.jsx(Yi,{content:Ze})})}),Pe>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:pe(Pe)}}),it&&Ne&&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:pe(h)}})]})})})]},$e)})})})]})}const dx=`import { useCallback, useEffect, useMemo, useState } from 'react';
13604
+ `}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 cx({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r}){const{prefix:l}=F.useScopedStyles(),c=o??!1,{wrapperWidth:d=1,cellMinHeight:u=0,dividerWidth:p=694e-6,dividerStyle:y="solid",entryHoverEffect:v="default",autoclose:g="off",icon:m,iconMaxWidth:x=.00833,iconPaddingRight:b=0,iconAnimation:M="rotate 45",questionColor:f="#000000",answerColor:S="#000000",dividerColor:W="#0000001F",iconColor:q="#000000",questionHoverColor:z="#666666",iconHoverColor:P="#666666",iconActiveColor:_="#000000",dividerHoverColor:G="#000000",questionFontFamily:$,questionFontSettings:L,questionFontSize:D,questionLineHeight:E,questionLetterSpacing:T,questionWordSpacing:C,questionTextAppearance:V,answerFontFamily:w,answerFontSettings:U,answerFontSize:I,answerLineHeight:A,answerLetterSpacing:j,answerWordSpacing:ie,answerTextAppearance:ae,questionPaddingLeft:O=0,questionPaddingTop:re=0,questionPaddingBottom:N=0,answerPaddingLeft:le=0,answerPaddingRight:J=0,answerPaddingTop:be=0,answerPaddingBottom:Pe=0}=e,ye=t??[],[ce,K]=s.useState(()=>new Set),se=!n||i;s.useEffect(()=>{K(new Set)},[g]),s.useEffect(()=>{n&&!o&&!i&&K(new Set)},[n,o,i]);const pe=Qe=>F.scalingValue(Qe,n??!1),fe=Math.max(O,gi),we=Math.max(re,gi),Re=Math.max(N,gi),me=Math.max(le,gi),xe=Math.max(J,gi),Ce=Math.max(be,gi),h=Math.max(Pe,gi),Y=Math.max(0,(d??1)-b-x),Q=Math.max(0,(d??1)-J),ne=Math.max(0,(d??1)-le),ue=Math.max(b,gi),B=Math.max(0,(d??1)-O-x),R=s.useMemo(()=>ce.size===0?0:Math.min(...ce),[ce]),ee=s.useCallback(Qe=>ce.has(Qe),[ce]),te=se&&v==="default"?`${l}-entry-hover-default`:"",ge=m??"",X=ge!=="",Ie=M.replace(/^rotate /,""),Se=`${l}-icon-anim-${Ie}`,Z=un(en(td($,L,D,E,T,C,V,f),n)),He=un(en(td(w,U,I,A,j,ie,ae,S),n)),We=Jc(D,E,`${l}-question`,`${l}-text-tight-leading`),ot=Jc(I,A,`${l}-answer-text`,`${l}-text-tight-leading`),qe=ed(D,E,l,n),tt=ed(I,A,l,n),et=F.buildColorVars(l,{questionColor:f,answerColor:S,dividerColor:W,iconColor:q,questionHoverColor:z,iconHoverColor:P,iconActiveColor:_,dividerHoverColor:G},rx,ax),Ge=r&&r!=="default"?`${l}-state-${r}`:"",ve=s.useCallback(Qe=>{se&&K($e=>{if($e.has(Qe)){const Ye=new Set($e);return Ye.delete(Qe),Ye}if(g==="on")return new Set([Qe]);const Ne=new Set($e);return Ne.add(Qe),Ne})},[se,g]),_e=s.useMemo(()=>lx(l),[l]),ze={[`--${l}-divider-width`]:F.scalingValue(p,n??!1),[`--${l}-divider-style`]:y,[`--${l}-icon-max-width`]:F.scalingValue(x,n??!1),...u>0?{[`--${l}-question-min-height`]:F.scalingValue(u,n??!1)}:{}};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:_e}}),a.jsx("div",{style:et,children:a.jsx("div",{className:Ct(`${l}-wrapper`,n&&!i&&`${l}-editor`,te,Ge),style:{width:F.scalingValue(d,n??!1),maxWidth:"100%",...ze},children:ye.map((Qe,$e)=>{var Oe;const Ne=ee($e),Ye=((Oe=Qe.question)==null?void 0:Oe.trim())??"",Ze=Qe.answer,st=((Ze==null?void 0:Ze.length)??0)>0,it=c&&$e===R;return a.jsxs("div",{className:Ct(`${l}-item`,Ne&&`${l}-item-open`),"data-faq-item":"",children:[a.jsxs("div",{className:`${l}-question-controls`,children:[it&&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:pe(we)}}),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:pe(fe),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(B),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:pe(ue),height:"100%"}})]}),a.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":Ne,style:{...Z,...qe,paddingLeft:pe(O),paddingRight:pe(b)},onClick:()=>ve($e),children:[re>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:pe(re)},"aria-hidden":"true"}),a.jsxs("span",{className:`${l}-question-row`,children:[a.jsx("span",{className:We,children:Ye}),st&&(X?a.jsx("span",{className:`${l}-icon ${l}-icon-custom ${Se}`,"aria-hidden":"true",children:a.jsx(gn,{url:ge,fill:`var(--${l}-icon-color)`,hoverFill:`var(--${l}-icon-hover-color, var(--${l}-icon-color))`,className:`${l}-icon-image`})}):a.jsx("span",{className:`${l}-icon ${l}-icon-default ${Se}`,"aria-hidden":"true"}))]}),N>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:pe(N)},"aria-hidden":"true"})]}),it&&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:pe(Re)}})]}),st&&Ze&&a.jsx("div",{className:`${l}-panel`,"aria-hidden":!Ne,children:a.jsx("div",{className:`${l}-panel-inner`,children:a.jsxs("div",{className:`${l}-answer-controls`,children:[it&&Ne&&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:pe(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(Q),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:pe(me),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(ne),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:pe(xe),height:"100%"}})]}),be>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:pe(be)}}),a.jsx("div",{className:`${l}-answer`,style:{...He,...tt,paddingLeft:pe(le),paddingRight:pe(J)},children:a.jsx("div",{className:ot,children:a.jsx(Yi,{content:Ze})})}),Pe>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:pe(Pe)}}),it&&Ne&&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:pe(h)}})]})})})]},$e)})})})]})}const dx=`import { useCallback, useEffect, useMemo, useState } from 'react';
13605
13605
  import cn from 'classnames';
13606
13606
  import { CommonComponentProps } from '../props';
13607
13607
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
@@ -14349,7 +14349,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
14349
14349
  </>
14350
14350
  );
14351
14351
  }
14352
- `;function mi(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"}}}},ux=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],px={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:mi("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:mi("Question Padding Left"),questionPaddingTop:mi("Question Padding Top"),questionPaddingBottom:mi("Question Padding Bottom"),answerPaddingLeft:mi("Answer Padding Left"),answerPaddingRight:mi("Answer Padding Right"),answerPaddingTop:mi("Answer Padding Top"),answerPaddingBottom:mi("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:[...ux],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},gx={element:cx,id:"faq",name:"FAQ",category:"lists",layoutMode:"structured",preview:{type:"image",url:"01M3QM74XEQ12SP6P9KHBXZBZM"},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:px,sourceCode:dx},si=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,mx=.2,od=8,mp=({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*mx),[]),y=s.useCallback($=>Math.max(0,1-$/(p*1.5)),[p]),v=s.useCallback($=>Math.max(0,1-$/(p*.45)),[p]),g=s.useCallback($=>{const L=typeof window<"u"?window.innerHeight:800,D=Math.max(.88,1-$/L*.12);return`translateY(${$}px) scale(${D})`},[]),m=s.useCallback(()=>{d.current=null},[]),x=s.useCallback(()=>{c(!0),r(0),window.setTimeout(()=>c(!1),n),m()},[n,m]),b=s.useCallback(()=>{const $=typeof window<"u"?window.innerHeight:800;c(!0),r($),window.setTimeout(()=>{t(),m(),c(!1)},Math.min(n,200))},[n,t,m]),R=s.useCallback($=>{!e||l||$.pointerType==="touch"&&(i!=null&&i($.target)||(d.current={startX:$.clientX,startY:$.clientY,isLocked:null,pointerId:$.pointerId}))},[e,l,i]),f=s.useCallback($=>{const L=d.current;if(!e||!L||$.pointerType!=="touch"||L.pointerId!==$.pointerId)return;const D=$.clientX-L.startX,E=$.clientY-L.startY;if(L.isLocked===null){if(Math.abs(D)<od&&Math.abs(E)<od)return;if(E>0&&E>Math.abs(D))L.isLocked=!0,$.currentTarget.setPointerCapture($.pointerId);else{L.isLocked=!1,m();return}}if(!L.isLocked)return;$.preventDefault();const T=Math.max(0,E);u.current=T,r(T)},[e,m]),S=s.useCallback($=>{const L=d.current;if(!e||!L||$.pointerType!=="touch"||L.pointerId!==$.pointerId)return;const D=L.isLocked===!0;if($.currentTarget.hasPointerCapture($.pointerId)&&$.currentTarget.releasePointerCapture($.pointerId),!D){m();return}$.clientY-L.startY>=p?b():x()},[p,b,e,m,x]),W=s.useCallback($=>{S($)},[S]),q=s.useCallback($=>{S($)},[S]),z=o>0,P=l?`transform ${n}ms ease`:"none",_=l?`opacity ${n}ms ease`:"none",G=o>0||l;return{isSwipeDragging:z,backdropStyle:{opacity:y(o),transition:_},mediaAreaStyle:{transform:g(o),transition:P,touchAction:z?"none":void 0,willChange:z?"transform":void 0},overlayContentStyle:G?{opacity:v(o),transition:_}:void 0,swipeHandlers:e?{onPointerDown:R,onPointerMove:f,onPointerUp:W,onPointerCancel:q}:{},dismissAreaStyle:e?{touchAction:z?"none":"pan-x"}:void 0}},hx="[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(hx)||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])},fx=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},yx=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},vx=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},xx=(e,t,n,{duration:i,easing:o,onComplete:r})=>{const l=e.scrollLeft,c=n-l,d=l-n,u=(m,x)=>{yx(t),e.scrollLeft=m,x&&(r==null||r())};if(Math.abs(c)<.5)return u(n,!0),()=>{};let p=!1,y=0;const v=()=>{t.removeEventListener("transitionend",g),clearTimeout(y)},g=m=>{m.target!==t||m.propertyName!=="transform"||p||(p=!0,v(),u(n,!0))};return t.addEventListener("transitionend",g),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${d}px, 0, 0)`,y=window.setTimeout(()=>{p||(p=!0,v(),u(n,!0))},i+64),()=>{p||(p=!0,v(),u(l-vx(t),!1))}},cr=300,bx=900,Sx=1500,wx="cubic-bezier(0.16, 1, 0.3, 1)",$x=3e3,Cx=2,Tx=16,Lx=.05,Px=1,Xr=.3,Mx=50,Ix=20,oo=.004,Ao=["title1","title2","title3"],Rx={title1:"1",title2:"2",title3:"3"},Ex={title1:"title1Color",title2:"title2Color",title3:"title3Color"},kx={title1:.02,title2:.02,title3:.02},Ur=e=>`max(${e}, ${Ix}px)`,Ax=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]}},Fx=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=Ax(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Qt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Nx=e=>[Qt(e,"fontFamily"),Qt(e,"fontSettings"),{type:"row",items:[Qt(e,"fontSize"),Qt(e,"lineHeight"),Qt(e,"letterSpacing"),Qt(e,"wordSpacing")]},Qt(e,"textAlign"),Qt(e,"textAppearance")],_x=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Ao.map(e=>[Rx[e],Nx(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},hp=(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:hp(e.length,n)}},Hx=(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},ms=(e,t)=>{const n=i=>{const o=Qt(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[Ex[t]]}},Wx=(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??kx[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return en(i,n)},Ox=({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:v,closeIconMaxWidth:g,closeIconColor:m,closeIconHoverColor:x,thumbnailTrigger:b,thumbnailVisibility:R,thumbnailObjectFit:f,thumbnailActive:S,thumbnailActiveColor:W,title1Width:q,title2Width:z,title3Width:P,title1MarginLeft:_=0,title2MarginLeft:G=0,title3MarginLeft:$=0,titleRowMarginBottom:L=0,titleHeaderLayout:D="desktop",contentMarginTop:E,iconMarginLeft:T}=n,C=k=>F.scalingValue(k,i??!1),V=d??n.thumnailSize??.03,w=C(V),U=C(u),M=C(p??.02),A=C(y??0),j=C(E??0),ie=Ur(j),ae=C(T??0),[O,re]=s.useState(0),N=s.useRef(O);N.current=O;const le=t[O],{title1:J,title2:be,title3:Pe}=Fx(le),ye=hs("title1",ms(n,"title1"),i),ce=hs("title2",ms(n,"title2"),i),K=hs("title3",ms(n,"title3"),i),se=D==="mobile",pe=!o&&(!i||r),fe=pe,we=pe,Ie=pe,me=si(f),xe=me?{"--image-aspect-ratio":ja(f)}:void 0,Ce=!!(J||be||Pe),h=s.useMemo(()=>Hx(e,J,be,Pe,ye,ce,K),[e,O,J,be,Pe,ye,ce,K]),Y=s.useMemo(()=>({title1Width:q,title2Width:z,title3Width:P}),[q,z,P]),Q=s.useMemo(()=>h.map(k=>Y[k.widthKey]),[h,Y]),ne=s.useMemo(()=>Vl(h.length,Q),[h.length,Q]),ue=s.useMemo(()=>hp(h.length,Q),[h.length,Q]),B=s.useMemo(()=>h.filter(k=>k.prefix==="title1"),[h]),I=s.useMemo(()=>h.filter(k=>k.prefix==="title2"||k.prefix==="title3"),[h]),ee=s.useMemo(()=>rd(B,Y),[B,Y]),te=s.useMemo(()=>rd(I,Y),[I,Y]),ge=s.useCallback((k,oe)=>{const de=h.indexOf(k);if(!se||oe==="single-row")return{effectiveWidth:ue[de]??0,resolvedWidth:ne[de]??0,maxWidth:qr(de,ne)};if(oe==="two-row-top"){const Xe=B.indexOf(k);return{effectiveWidth:ee.effective[Xe]??0,resolvedWidth:ee.resolved[Xe]??0,maxWidth:qr(Xe,ee.resolved)}}const Ee=I.indexOf(k);return{effectiveWidth:te.effective[Ee]??0,resolvedWidth:te.resolved[Ee]??0,maxWidth:qr(Ee,te.resolved)}},[I,te,ue,ne,h,B,ee,se]),X=s.useCallback(k=>F.scalingValue(k,i??!1),[i]),Me=X(L??0),Se=s.useMemo(()=>({title1MarginLeft:_,title2MarginLeft:G,title3MarginLeft:$}),[_,G,$]),Z=s.useCallback(k=>h.slice(0,k+1).reduce((oe,de,Ee)=>oe+(de!=null&&de.marginLeftKey?Se[de.marginLeftKey]??0:0)+(ne[Ee]??0),0)+(se?0:_??0),[h,Se,ne,se,_]),He=s.useCallback(()=>se?0:_??0,[se,_]),We=s.useCallback(k=>I.slice(0,k).reduce((oe,de,Ee)=>oe+(de.marginLeftKey?Se[de.marginLeftKey]??0:0)+(te.resolved[Ee]??0),0),[I,te.resolved,Se]),ot=s.useCallback(k=>{const oe=I[k];return We(k)+(oe.marginLeftKey?Se[oe.marginLeftKey]??0:0)+(te.resolved[k]??0)},[I,te.resolved,We,Se]),qe=(k,oe)=>{const de=k.marginLeftKey?Se[k.marginLeftKey]??0:0,{effectiveWidth:Ee,resolvedWidth:Xe,maxWidth:lt}=ge(k,oe),Et=o&&oe==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":k.prefix,style:{...oe==="single-row"?{gridArea:k.prefix}:{},width:X(Ee),...de>0?{marginLeft:X(de)}:{}},children:[a.jsx("p",{className:k.className,style:k.style,children:k.text}),Et&&k.marginLeftKey&&a.jsx("div",{"data-controls":k.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Xe),style:{position:"absolute",top:0,left:X(-de),width:`max(${X(de)}, 10px)`,height:"100%",pointerEvents:"auto"}}),Et&&a.jsx("div",{"data-controls":k.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(lt),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:X(-oo/2),width:X(oo),height:"100%",pointerEvents:"auto"}})]},k.className)},tt=()=>{const k=se?-1:h.findIndex(Ee=>Ee.prefix==="title1"),oe=!se&&(o||(_??0)>0)?(()=>{const Ee=_??0,Xe=k>=0?ne[k]:q??0;return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Xe),style:{position:"absolute",top:0,left:0,width:`max(${X(Ee)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,de=h.flatMap((Ee,Xe)=>{if(!Ee.marginLeftKey)return[];const lt=Se[Ee.marginLeftKey]??0,Et=Wx(h,ne,Se,Xe)+He();return a.jsx("div",{"data-controls":Ee.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ne[Xe]),style:{position:"absolute",top:0,left:X(Et),width:`max(${X(lt)}, 10px)`,height:"100%",pointerEvents:"auto"}},Ee.marginLeftKey)});return oe?[oe,...de]:de},et=()=>h.map((k,oe)=>{const de=qr(oe,ne),Xe=Z(oe)-oo/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":k.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(de),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:X(Xe),width:X(oo),height:"100%",pointerEvents:"auto"}})},`${k.widthKey}-junction`)}),Ge=()=>I.flatMap((k,oe)=>{if(!k.marginLeftKey)return[];const de=Se[k.marginLeftKey]??0,Ee=We(oe),{resolvedWidth:Xe}=ge(k,"two-row-bottom");return a.jsx("div",{"data-controls":k.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Xe),style:{position:"absolute",top:0,left:X(Ee),width:`max(${X(de)}, 10px)`,height:"100%",pointerEvents:"auto"}},k.marginLeftKey)}),ve=()=>I.map((k,oe)=>{const{maxWidth:de}=ge(k,"two-row-bottom"),Xe=ot(oe)-oo/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":k.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(de),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:X(Xe),width:X(oo),height:"100%",pointerEvents:"auto"}})},`${k.widthKey}-junction`)}),_e=s.useRef(null),ze=s.useRef(null),Qe=s.useRef(null),$e=s.useRef(null),Ne=s.useRef([]),Ye=s.useRef([]),Ze=s.useRef(0),st=s.useRef(null),it=s.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),Oe=s.useRef(null),Ae=s.useRef(null),mt=s.useRef(0),Be=s.useRef("forward"),De=s.useRef(0),Ue=s.useRef(null),ct=s.useRef(!1),he=t.length>1&&(!o||!!r),Re=he?3:1,nt=s.useMemo(()=>Array.from({length:Re},()=>t).flat(),[t,Re]),[pt,Ve]=s.useState(!1),[vt,Mt]=s.useState(!1),[At,wt]=s.useState(!0),Vt=s.useRef(null),jt=s.useRef(null),Yt=s.useRef(!1),Kt=s.useRef(!1),It=s.useRef(null),zt=s.useRef(null),on=fe&&!At,xt=s.useCallback(()=>{fe&&(wt(!0),zt.current&&clearTimeout(zt.current),zt.current=setTimeout(()=>{it.current.isActive||wt(!1)},$x))},[fe]),yt=s.useCallback(()=>{o||Kt.current||(Kt.current=!0,Mt(!1),It.current=setTimeout(()=>{l()},cr))},[o,l]),ke=()=>a.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":on?"true":"false",style:{width:F.scalingValue(g??0,i),height:F.scalingValue(g??0,i),marginRight:ae,"--close-icon-hover-color":x},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:yt,"aria-label":"Close",children:a.jsx(gn,{url:v,fill:m,hoverFill:i&&!r?m:x,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:ae,height:"100%",pointerEvents:"auto"}})]}),Je=(k="two-row")=>a.jsx("div",{...k==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:X(_??0),flexShrink:0,...k==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...k==="two-row"&&o?{pointerEvents:"auto"}:{}}}),rt=()=>{const k=h.find(Ee=>Ee.prefix==="title1"),oe=h.filter(Ee=>Ee.prefix==="title2"||Ee.prefix==="title3"),de=oe.length>0||o||(L??0)>0;return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`${e}-header-row-top`,children:[(_??0)>0||o?Je():null,k&&qe(k,"two-row-top"),v&&ke()]}),de?a.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[oe.length>0?a.jsxs("div",{className:`${e}-header-row-bottom`,children:[oe.map(Ee=>qe(Ee,"two-row-bottom")),o&&a.jsxs(a.Fragment,{children:[Ge(),ve()]})]}):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:Me,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},dt=()=>a.jsxs(a.Fragment,{children:[(_??0)>0||o?Je("single-row"):null,h.map(k=>qe(k,"single-row")),o?a.jsxs(a.Fragment,{children:[tt(),et()]}):null,v?ke():null]}),Pt=s.useCallback(k=>!!(k.closest("[data-controls]")||k.closest(`.${e}-thumbnails`)||k.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:St,backdropStyle:ht,mediaAreaStyle:Wt,overlayContentStyle:Tt,swipeHandlers:Ot,dismissAreaStyle:Gt}=mp({enabled:pe??!1,onClose:yt,animMs:cr,isBlockedTarget:Pt}),kt=()=>{if(!he||t.length===0)return Ze.current=0,0;const k=Ye.current[0],oe=Ye.current[t.length];if(!k||!oe)return Ze.current;const de=oe.offsetLeft-k.offsetLeft;return de>0&&(Ze.current=de),Ze.current},_t=(k=!1)=>{if(!he)return;const oe=ze.current,de=kt();!oe||de<=0||de<oe.clientWidth*.25||(oe.scrollLeft<=0?(oe.scrollLeft+=de,k&&(it.current.scrollLeft+=de),ct.current&&(De.current+=de)):oe.scrollLeft>=de*2&&(oe.scrollLeft-=de,k&&(it.current.scrollLeft-=de),ct.current&&(De.current-=de)))},Ft=(k,oe=(de=>(de=ze.current)==null?void 0:de.scrollLeft)()??0)=>{if(!he)return k;let Ee=t.length+k,Xe=1/0;for(let lt=0;lt<Re;lt++){const Et=lt*t.length+k,Bt=Ye.current[Et];if(!Bt)continue;const rn=Math.abs(Bt.offsetLeft-oe);rn<Xe&&(Xe=rn,Ee=Et)}return Ee},ut=k=>{const oe=ze.current;return!k||!oe?!1:k.offsetWidth>oe.clientWidth+1},H=k=>{const oe=ze.current;if(!k||!oe||!ut(k))return!1;const de=k.offsetLeft,Ee=de+k.offsetWidth;return oe.scrollLeft>=de-1&&oe.scrollLeft+oe.clientWidth<=Ee+1},Le=(k=(oe=>(oe=ze.current)==null?void 0:oe.scrollLeft)()??0)=>{for(let Ee=0;Ee<Ye.current.length;Ee+=1){const Xe=Ye.current[Ee];if(Xe&&H(Xe))return Ee}let de={flatIndex:0,distance:1/0};return Ye.current.forEach((Ee,Xe)=>{if(!Ee)return;const lt=Math.abs(Ee.offsetLeft-k);lt<de.distance&&(de={flatIndex:Xe,distance:lt})}),de.flatIndex},je=k=>{ze.current&&Ye.current.forEach(oe=>{oe&&(oe.style.scrollSnapAlign=ut(oe)&&k==="backward"?"end":"start")})},Fe=(k,oe,de)=>{const Ee=k-oe,Xe=Le(oe),lt=Ye.current[Xe];if(H(lt))return Le(k)%t.length;const Et=Ye.current[Xe+1],Bt=lt?Et?Et.offsetLeft-lt.offsetLeft:lt.offsetWidth:0,rn=Bt>0?Ee>Bt*Xr?1:Ee<-Bt*Xr?-1:0:0;return rn===0?de:he?(de+rn+t.length)%t.length:Math.max(0,Math.min(t.length-1,de+rn))},ft=s.useCallback((k=!1)=>{if(R!=="on"||o)return;const oe=$e.current,de=N.current,Ee=Ne.current[de];if(!oe||!Ee||oe.scrollWidth<=oe.clientWidth)return;const Xe=oe.scrollLeft,lt=Xe+oe.clientWidth,Et=Ee.offsetLeft,Bt=Et+Ee.offsetWidth;if(Et>=Xe&&Bt<=lt)return;const rn=oe.scrollWidth-oe.clientWidth;let Zt=Xe;if(!k&&Vt.current===null){const ui=Ne.current[de-1],En=Ne.current[de+1],Qn=ui?Ee.offsetLeft-ui.offsetLeft:En?En.offsetLeft-Ee.offsetLeft:Ee.offsetWidth;Bt>lt?Zt+=Qn:Et<Xe&&(Zt-=Qn)}else Bt>lt?Zt=Bt-oe.clientWidth:Zt=Et;oe.scrollLeft=Math.max(0,Math.min(rn,Zt))},[o,R]),Ht=s.useCallback((k=!1)=>{k&&(Yt.current=!0),jt.current===null&&(jt.current=requestAnimationFrame(()=>{jt.current=null;const oe=Yt.current;Yt.current=!1,ft(oe)}))},[ft]),gt=s.useCallback(k=>{if(k===N.current)return;const oe=N.current;N.current=k;const de=Math.abs(k-oe)>1,Ee=he&&t.length>1&&(oe===t.length-1&&k===0||oe===0&&k===t.length-1);re(k),Ht(de||Ee)},[t.length,he,Ht]),Lt=()=>{if(!ze.current||t.length===0||Vt.current!==null||it.current.isActive&&it.current.hasMoved)return;const k=ze.current.scrollLeft,oe=Le(k)%t.length;oe!==N.current&&gt(oe)},qt=()=>{Vt.current=null},Dt=k=>{const oe=ze.current;oe&&(oe.style.scrollSnapType=k?"":"none")},an=()=>{var k;(k=Ae.current)==null||k.call(Ae),Ae.current=null},cn=()=>{Ue.current!==null&&(cancelAnimationFrame(Ue.current),Ue.current=null),ct.current=!1},qn=()=>{const k=ze.current;if(!k){Ue.current=null,ct.current=!1;return}const oe=De.current-k.scrollLeft;if(Math.abs(oe)<.5){k.scrollLeft=De.current,_t(),Lt(),Ue.current=null,ct.current=!1;return}k.scrollLeft+=oe*Lx,_t(),Lt(),xt(),Ue.current=requestAnimationFrame(qn)},Yn=()=>{const k=Qe.current;k&&(k.style.transition="",k.style.transform="",k.style.willChange="")},Qi=(k,oe,de,Ee)=>{Yn(),k.scrollLeft=oe,mt.current=k.scrollLeft,_t(),de!==void 0?(N.current=de,re(de)):Lt(),Dt(!0),Ee==null||Ee()},hn=(k,{behavior:oe="smooth",activeIndex:de,onComplete:Ee}={})=>{const Xe=ze.current,lt=Qe.current;if(!Xe||!lt)return;if(cn(),an(),Dt(!1),oe==="auto"){Qi(Xe,k,de,Ee);return}const Et=Math.abs(k-Xe.scrollLeft),Bt=fx(Et,bx,Sx,Xe.clientWidth*.55);Ae.current=xx(Xe,lt,k,{duration:Bt,easing:wx,onComplete:()=>{Ae.current=null,Qi(Xe,k,de,Ee)}})},Vo=(k="smooth")=>{const oe=ze.current;if(!oe||t.length===0)return;const de=Le()%t.length,Ee=Ft(de,oe.scrollLeft),Xe=Ye.current[Ee];Xe&&hn(Xe.offsetLeft,{behavior:k,activeIndex:de})},Go=(k,oe="smooth",de,Ee)=>{const Xe=ze.current;if(!Xe||t.length===0)return;const lt=(Ee??Xe.scrollLeft)-k,Et=Le(k),Bt=Ye.current[Et];if(H(Bt)){Dt(!0),Lt();return}const rn=Ye.current[Et+1],Zt=Bt?rn?rn.offsetLeft-Bt.offsetLeft:Bt.offsetWidth:0;if((Zt>0?lt>Zt*Xr?1:lt<-Zt*Xr?-1:0:0)!==0){const Kl=de??Et%t.length,Xo=Fe(Ee??Xe.scrollLeft,k,Kl);xn(Xo,oe);return}const En=Ee??Xe.scrollLeft,Qn=Le(En),kr=Ye.current[Qn];if(kr&&Math.abs(kr.offsetLeft-En)<1){Dt(!0),Lt();return}Vo("auto")},xn=(k,oe="smooth")=>{const de=ze.current;if(!de||t.length===0)return;const Ee=Ft(k,de.scrollLeft),Xe=Ye.current[Ee];Xe&&(oe==="smooth"?Vt.current=k:Vt.current=null,N.current=k,re(k),Ht(!0),hn(Xe.offsetLeft,{behavior:oe,activeIndex:k,onComplete:oe==="smooth"?qt:void 0}))},di=()=>{Oe.current&&(window.removeEventListener("pointerup",Oe.current),window.removeEventListener("pointercancel",Oe.current),Oe.current=null)},Zi=(k,oe,de,Ee,Xe)=>{const lt=de-k,Et=Ee-oe,Bt=Math.abs(lt),rn=Math.abs(Et);if(Bt<Mx||Bt<=rn)return!1;const Zt=lt<0?1:-1,ui=he?(Xe+Zt+t.length)%t.length:Math.max(0,Math.min(t.length-1,Xe+Zt));return ui===Xe?!1:(xn(ui),!0)},bn=k=>{if(!it.current.isActive)return;di();const oe=ze.current;if(!oe)return;const{scrollLeft:de,startActiveIndex:Ee,hasMoved:Xe}=it.current,lt=oe.scrollLeft;_t(!0),it.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},Ve(!1),k!==void 0&&oe.hasPointerCapture(k)&&oe.releasePointerCapture(k),Xe?Go(de,"smooth",Ee,lt):(Dt(!0),Lt()),xt()},Kn=(k,oe)=>{const de=st.current;st.current=null,de&&(Zi(de.startX,de.startY,k,oe,de.startActiveIndex),xt())},Ji=k=>{if(!we)return;if(k.pointerType==="touch"){if(cn(),Dt(!0),Pt(k.target))return;st.current={startX:k.clientX,startY:k.clientY,startActiveIndex:N.current};return}if(k.pointerType!=="mouse"||k.button!==0||Pt(k.target))return;const oe=ze.current;if(!oe)return;cn(),an(),Yn(),Vt.current=null,it.current={isActive:!0,startX:k.clientX,scrollLeft:oe.scrollLeft,startActiveIndex:N.current,hasMoved:!1},Dt(!1),xt(),oe.setPointerCapture(k.pointerId),di();const de=Ee=>{Ee.pointerType==="mouse"&&bn(Ee.pointerId)};Oe.current=de,window.addEventListener("pointerup",de),window.addEventListener("pointercancel",de)},eo=k=>{if(!we||k.pointerType!=="mouse")return;const oe=ze.current;if(!oe||!it.current.isActive)return;if(k.buttons===0){bn(k.pointerId);return}const de=k.clientX-it.current.startX;Math.abs(de)>Px&&(it.current.hasMoved=!0,Ve(!0)),it.current.hasMoved&&(k.preventDefault(),oe.scrollLeft=it.current.scrollLeft-de,_t(!0),Lt(),xt())},Te=k=>{if(we){if(k.pointerType==="touch"){k.type==="pointerup"?Kn(k.clientX,k.clientY):st.current=null;return}k.pointerType==="mouse"&&bn(k.pointerId)}},Ke=k=>{!we||k.pointerType!=="mouse"||bn(k.pointerId)};return jl(),s.useEffect(()=>{const k=requestAnimationFrame(()=>Mt(!0));return()=>{cancelAnimationFrame(k),an(),di(),jt.current!==null&&(cancelAnimationFrame(jt.current),jt.current=null),It.current&&clearTimeout(It.current),zt.current&&clearTimeout(zt.current)}},[]),s.useEffect(()=>{if(!fe){wt(!0);return}xt();const k=()=>xt();return document.addEventListener("pointermove",k,{passive:!0}),document.addEventListener("pointerdown",k,{passive:!0}),()=>{document.removeEventListener("pointermove",k),document.removeEventListener("pointerdown",k),zt.current&&clearTimeout(zt.current)}},[fe,xt]),s.useEffect(()=>{const k=oe=>{oe.key==="Escape"&&yt()};return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[yt]),s.useLayoutEffect(()=>{kt()},[A,t.length,he]),s.useLayoutEffect(()=>{o||xn(N.current,"auto")},[A,o]),s.useLayoutEffect(()=>{xn(0,"auto")},[t.length,he]),s.useEffect(()=>{const k=ze.current;if(!k||o||!pe)return;const oe=de=>{if(de.preventDefault(),Math.abs(de.deltaY)<=Math.abs(de.deltaX))return;const Ee=de.deltaMode===1?Tx:de.deltaMode===2?k.clientHeight:1,Xe=de.deltaY*Ee*Cx;if(Xe!==0){if(an(),ct.current||(ct.current=!0,De.current=k.scrollLeft,Vt.current=null,Dt(!1)),De.current+=Xe,!he){const lt=k.scrollWidth-k.clientWidth;De.current=Math.max(0,Math.min(lt,De.current))}xt(),Ue.current===null&&(Ue.current=requestAnimationFrame(qn))}};return k.addEventListener("wheel",oe,{passive:!1}),()=>{k.removeEventListener("wheel",oe),cn()}},[o,pe,he]),s.useEffect(()=>{const k=ze.current;if(!k)return;const oe=()=>{_t(it.current.isActive);const Ee=k.scrollLeft,Xe=Ee-mt.current;mt.current=Ee;const lt=Ze.current>0?Ze.current*.5:1/0;if(Xe!==0&&Math.abs(Xe)<lt){const Et=Xe>0?"forward":"backward";Et!==Be.current&&(Be.current=Et,je(Et))}it.current.isActive&&it.current.hasMoved||Lt()};k.addEventListener("scroll",oe,{passive:!0});const de=new ResizeObserver(()=>{kt(),_t(it.current.isActive),je(Be.current),Lt()});return de.observe(k),()=>{an(),k.removeEventListener("scroll",oe),de.disconnect()}},[t.length,he]),a.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{St||yt()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:vt?1:0,transition:`opacity ${cr}ms ease`,pointerEvents:vt?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:c,...ht}}),a.jsxs("div",{ref:_e,className:`${e}-lightbox-dismiss-area`,style:Gt,...Ot,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:Wt,onClick:k=>k.stopPropagation(),children:a.jsx("div",{ref:ze,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":we&&t.length>0?"true":"false","data-mouse-dragging":pt?"true":"false",onPointerDown:Ji,onPointerMove:eo,onPointerUp:Te,onPointerCancel:Te,onLostPointerCapture:Ke,children:a.jsx("div",{ref:Qe,className:`${e}-lightbox-strip-track`,style:{gap:A},children:nt.map((k,oe)=>{const de=k.image.objectFit??"contain",Ee=oe%t.length,Xe=Math.floor(oe/t.length),lt=Ur(A),Et=`calc(-0.5 * (${lt} + ${A}))`;return a.jsxs("div",{ref:Bt=>Ye.current[oe]=Bt,className:`${e}-strip-item`,style:{height:D==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[a.jsx("img",{src:k.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:de}}),o&&Ee<t.length-1&&Xe===0&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Et,width:lt,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Xe}-${k.image.url}-${Ee}`)})})})}),a.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":on?"true":"false",style:Tt,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:ie,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${se?` ${e}-lightbox-content-area-stacked`:""}`,children:(Ce||v)&&a.jsx("div",{className:`${e}-header ${se?`${e}-header-two-row`:`${e}-header-single-row`}`,children:se?rt():Ce||v?dt():null})})})]}),t.length>1&&R==="on"&&(()=>{const k=Ur(M),oe=`calc(-0.5 * (${M} + ${k}))`;return a.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:M},children:a.jsx("div",{ref:$e,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:de=>de.stopPropagation(),children:a.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":S,style:{gap:U,"--thumbnail-active-color":W},children:[t.map((de,Ee)=>{const Xe=Ur(U),lt=`calc(-0.5 * (${Xe} + ${U}))`;return a.jsxs("div",{ref:Et=>{Ne.current[Ee]=Et},style:{position:"relative",flex:"0 0 auto"},children:[a.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":O===Ee?"true":"false",onClick:()=>pe&&b==="click"&&xn(Ee),onMouseEnter:()=>Ie&&b==="hover"&&xn(Ee),"aria-label":de.image.name?`View ${de.image.name}`:`View image ${Ee+1}`,"aria-current":O===Ee?"true":void 0,children:a.jsx("img",{className:`${e}-thumb-image${me?` ${e}-thumb-image-cover`:""}`,src:de.image.url,alt:"",draggable:!1,style:{...xe,maxWidth:w,maxHeight:w,width:f.display==="cover"?"auto":"100%",height:"auto",objectFit:f.display==="cover"?"cover":"contain"}})}),o&&Ee<t.length-1&&a.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:lt,width:Xe,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${de.image.url}-${Ee}`)}),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:oe,height:k,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function Dx(e){return`
14352
+ `;function mi(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"}}}},ux=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],px={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:mi("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:mi("Question Padding Left"),questionPaddingTop:mi("Question Padding Top"),questionPaddingBottom:mi("Question Padding Bottom"),answerPaddingLeft:mi("Answer Padding Left"),answerPaddingRight:mi("Answer Padding Right"),answerPaddingTop:mi("Answer Padding Top"),answerPaddingBottom:mi("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:[...ux],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},gx={element:cx,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:px,sourceCode:dx},si=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,mx=.2,od=8,mp=({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*mx),[]),y=s.useCallback($=>Math.max(0,1-$/(p*1.5)),[p]),v=s.useCallback($=>Math.max(0,1-$/(p*.45)),[p]),g=s.useCallback($=>{const L=typeof window<"u"?window.innerHeight:800,D=Math.max(.88,1-$/L*.12);return`translateY(${$}px) scale(${D})`},[]),m=s.useCallback(()=>{d.current=null},[]),x=s.useCallback(()=>{c(!0),r(0),window.setTimeout(()=>c(!1),n),m()},[n,m]),b=s.useCallback(()=>{const $=typeof window<"u"?window.innerHeight:800;c(!0),r($),window.setTimeout(()=>{t(),m(),c(!1)},Math.min(n,200))},[n,t,m]),M=s.useCallback($=>{!e||l||$.pointerType==="touch"&&(i!=null&&i($.target)||(d.current={startX:$.clientX,startY:$.clientY,isLocked:null,pointerId:$.pointerId}))},[e,l,i]),f=s.useCallback($=>{const L=d.current;if(!e||!L||$.pointerType!=="touch"||L.pointerId!==$.pointerId)return;const D=$.clientX-L.startX,E=$.clientY-L.startY;if(L.isLocked===null){if(Math.abs(D)<od&&Math.abs(E)<od)return;if(E>0&&E>Math.abs(D))L.isLocked=!0,$.currentTarget.setPointerCapture($.pointerId);else{L.isLocked=!1,m();return}}if(!L.isLocked)return;$.preventDefault();const T=Math.max(0,E);u.current=T,r(T)},[e,m]),S=s.useCallback($=>{const L=d.current;if(!e||!L||$.pointerType!=="touch"||L.pointerId!==$.pointerId)return;const D=L.isLocked===!0;if($.currentTarget.hasPointerCapture($.pointerId)&&$.currentTarget.releasePointerCapture($.pointerId),!D){m();return}$.clientY-L.startY>=p?b():x()},[p,b,e,m,x]),W=s.useCallback($=>{S($)},[S]),q=s.useCallback($=>{S($)},[S]),z=o>0,P=l?`transform ${n}ms ease`:"none",_=l?`opacity ${n}ms ease`:"none",G=o>0||l;return{isSwipeDragging:z,backdropStyle:{opacity:y(o),transition:_},mediaAreaStyle:{transform:g(o),transition:P,touchAction:z?"none":void 0,willChange:z?"transform":void 0},overlayContentStyle:G?{opacity:v(o),transition:_}:void 0,swipeHandlers:e?{onPointerDown:M,onPointerMove:f,onPointerUp:W,onPointerCancel:q}:{},dismissAreaStyle:e?{touchAction:z?"none":"pan-x"}:void 0}},hx="[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(hx)||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])},fx=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},yx=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},vx=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},xx=(e,t,n,{duration:i,easing:o,onComplete:r})=>{const l=e.scrollLeft,c=n-l,d=l-n,u=(m,x)=>{yx(t),e.scrollLeft=m,x&&(r==null||r())};if(Math.abs(c)<.5)return u(n,!0),()=>{};let p=!1,y=0;const v=()=>{t.removeEventListener("transitionend",g),clearTimeout(y)},g=m=>{m.target!==t||m.propertyName!=="transform"||p||(p=!0,v(),u(n,!0))};return t.addEventListener("transitionend",g),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${d}px, 0, 0)`,y=window.setTimeout(()=>{p||(p=!0,v(),u(n,!0))},i+64),()=>{p||(p=!0,v(),u(l-vx(t),!1))}},cr=300,bx=900,Sx=1500,wx="cubic-bezier(0.16, 1, 0.3, 1)",$x=3e3,Cx=2,Tx=16,Lx=.05,Px=1,Xr=.3,Ix=50,Rx=20,oo=.004,Ao=["title1","title2","title3"],Mx={title1:"1",title2:"2",title3:"3"},Ex={title1:"title1Color",title2:"title2Color",title3:"title3Color"},kx={title1:.02,title2:.02,title3:.02},Ur=e=>`max(${e}, ${Rx}px)`,Ax=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]}},Fx=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=Ax(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Qt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Nx=e=>[Qt(e,"fontFamily"),Qt(e,"fontSettings"),{type:"row",items:[Qt(e,"fontSize"),Qt(e,"lineHeight"),Qt(e,"letterSpacing"),Qt(e,"wordSpacing")]},Qt(e,"textAlign"),Qt(e,"textAppearance")],_x=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Ao.map(e=>[Mx[e],Nx(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},hp=(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:hp(e.length,n)}},Hx=(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},ms=(e,t)=>{const n=i=>{const o=Qt(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[Ex[t]]}},Wx=(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??kx[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return en(i,n)},Ox=({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:v,closeIconMaxWidth:g,closeIconColor:m,closeIconHoverColor:x,thumbnailTrigger:b,thumbnailVisibility:M,thumbnailObjectFit:f,thumbnailActive:S,thumbnailActiveColor:W,title1Width:q,title2Width:z,title3Width:P,title1MarginLeft:_=0,title2MarginLeft:G=0,title3MarginLeft:$=0,titleRowMarginBottom:L=0,titleHeaderLayout:D="desktop",contentMarginTop:E,iconMarginLeft:T}=n,C=k=>F.scalingValue(k,i??!1),V=d??n.thumnailSize??.03,w=C(V),U=C(u),I=C(p??.02),A=C(y??0),j=C(E??0),ie=Ur(j),ae=C(T??0),[O,re]=s.useState(0),N=s.useRef(O);N.current=O;const le=t[O],{title1:J,title2:be,title3:Pe}=Fx(le),ye=hs("title1",ms(n,"title1"),i),ce=hs("title2",ms(n,"title2"),i),K=hs("title3",ms(n,"title3"),i),se=D==="mobile",pe=!o&&(!i||r),fe=pe,we=pe,Re=pe,me=si(f),xe=me?{"--image-aspect-ratio":ja(f)}:void 0,Ce=!!(J||be||Pe),h=s.useMemo(()=>Hx(e,J,be,Pe,ye,ce,K),[e,O,J,be,Pe,ye,ce,K]),Y=s.useMemo(()=>({title1Width:q,title2Width:z,title3Width:P}),[q,z,P]),Q=s.useMemo(()=>h.map(k=>Y[k.widthKey]),[h,Y]),ne=s.useMemo(()=>Vl(h.length,Q),[h.length,Q]),ue=s.useMemo(()=>hp(h.length,Q),[h.length,Q]),B=s.useMemo(()=>h.filter(k=>k.prefix==="title1"),[h]),R=s.useMemo(()=>h.filter(k=>k.prefix==="title2"||k.prefix==="title3"),[h]),ee=s.useMemo(()=>rd(B,Y),[B,Y]),te=s.useMemo(()=>rd(R,Y),[R,Y]),ge=s.useCallback((k,oe)=>{const de=h.indexOf(k);if(!se||oe==="single-row")return{effectiveWidth:ue[de]??0,resolvedWidth:ne[de]??0,maxWidth:qr(de,ne)};if(oe==="two-row-top"){const Xe=B.indexOf(k);return{effectiveWidth:ee.effective[Xe]??0,resolvedWidth:ee.resolved[Xe]??0,maxWidth:qr(Xe,ee.resolved)}}const Ee=R.indexOf(k);return{effectiveWidth:te.effective[Ee]??0,resolvedWidth:te.resolved[Ee]??0,maxWidth:qr(Ee,te.resolved)}},[R,te,ue,ne,h,B,ee,se]),X=s.useCallback(k=>F.scalingValue(k,i??!1),[i]),Ie=X(L??0),Se=s.useMemo(()=>({title1MarginLeft:_,title2MarginLeft:G,title3MarginLeft:$}),[_,G,$]),Z=s.useCallback(k=>h.slice(0,k+1).reduce((oe,de,Ee)=>oe+(de!=null&&de.marginLeftKey?Se[de.marginLeftKey]??0:0)+(ne[Ee]??0),0)+(se?0:_??0),[h,Se,ne,se,_]),He=s.useCallback(()=>se?0:_??0,[se,_]),We=s.useCallback(k=>R.slice(0,k).reduce((oe,de,Ee)=>oe+(de.marginLeftKey?Se[de.marginLeftKey]??0:0)+(te.resolved[Ee]??0),0),[R,te.resolved,Se]),ot=s.useCallback(k=>{const oe=R[k];return We(k)+(oe.marginLeftKey?Se[oe.marginLeftKey]??0:0)+(te.resolved[k]??0)},[R,te.resolved,We,Se]),qe=(k,oe)=>{const de=k.marginLeftKey?Se[k.marginLeftKey]??0:0,{effectiveWidth:Ee,resolvedWidth:Xe,maxWidth:lt}=ge(k,oe),Et=o&&oe==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":k.prefix,style:{...oe==="single-row"?{gridArea:k.prefix}:{},width:X(Ee),...de>0?{marginLeft:X(de)}:{}},children:[a.jsx("p",{className:k.className,style:k.style,children:k.text}),Et&&k.marginLeftKey&&a.jsx("div",{"data-controls":k.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Xe),style:{position:"absolute",top:0,left:X(-de),width:`max(${X(de)}, 10px)`,height:"100%",pointerEvents:"auto"}}),Et&&a.jsx("div",{"data-controls":k.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(lt),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:X(-oo/2),width:X(oo),height:"100%",pointerEvents:"auto"}})]},k.className)},tt=()=>{const k=se?-1:h.findIndex(Ee=>Ee.prefix==="title1"),oe=!se&&(o||(_??0)>0)?(()=>{const Ee=_??0,Xe=k>=0?ne[k]:q??0;return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Xe),style:{position:"absolute",top:0,left:0,width:`max(${X(Ee)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,de=h.flatMap((Ee,Xe)=>{if(!Ee.marginLeftKey)return[];const lt=Se[Ee.marginLeftKey]??0,Et=Wx(h,ne,Se,Xe)+He();return a.jsx("div",{"data-controls":Ee.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ne[Xe]),style:{position:"absolute",top:0,left:X(Et),width:`max(${X(lt)}, 10px)`,height:"100%",pointerEvents:"auto"}},Ee.marginLeftKey)});return oe?[oe,...de]:de},et=()=>h.map((k,oe)=>{const de=qr(oe,ne),Xe=Z(oe)-oo/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":k.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(de),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:X(Xe),width:X(oo),height:"100%",pointerEvents:"auto"}})},`${k.widthKey}-junction`)}),Ge=()=>R.flatMap((k,oe)=>{if(!k.marginLeftKey)return[];const de=Se[k.marginLeftKey]??0,Ee=We(oe),{resolvedWidth:Xe}=ge(k,"two-row-bottom");return a.jsx("div",{"data-controls":k.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Xe),style:{position:"absolute",top:0,left:X(Ee),width:`max(${X(de)}, 10px)`,height:"100%",pointerEvents:"auto"}},k.marginLeftKey)}),ve=()=>R.map((k,oe)=>{const{maxWidth:de}=ge(k,"two-row-bottom"),Xe=ot(oe)-oo/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":k.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(de),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:X(Xe),width:X(oo),height:"100%",pointerEvents:"auto"}})},`${k.widthKey}-junction`)}),_e=s.useRef(null),ze=s.useRef(null),Qe=s.useRef(null),$e=s.useRef(null),Ne=s.useRef([]),Ye=s.useRef([]),Ze=s.useRef(0),st=s.useRef(null),it=s.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),Oe=s.useRef(null),Ae=s.useRef(null),mt=s.useRef(0),Be=s.useRef("forward"),De=s.useRef(0),Ue=s.useRef(null),ct=s.useRef(!1),he=t.length>1&&(!o||!!r),Me=he?3:1,nt=s.useMemo(()=>Array.from({length:Me},()=>t).flat(),[t,Me]),[pt,Ve]=s.useState(!1),[vt,It]=s.useState(!1),[At,wt]=s.useState(!0),Vt=s.useRef(null),jt=s.useRef(null),Yt=s.useRef(!1),Kt=s.useRef(!1),Rt=s.useRef(null),zt=s.useRef(null),on=fe&&!At,xt=s.useCallback(()=>{fe&&(wt(!0),zt.current&&clearTimeout(zt.current),zt.current=setTimeout(()=>{it.current.isActive||wt(!1)},$x))},[fe]),yt=s.useCallback(()=>{o||Kt.current||(Kt.current=!0,It(!1),Rt.current=setTimeout(()=>{l()},cr))},[o,l]),ke=()=>a.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":on?"true":"false",style:{width:F.scalingValue(g??0,i),height:F.scalingValue(g??0,i),marginRight:ae,"--close-icon-hover-color":x},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:yt,"aria-label":"Close",children:a.jsx(gn,{url:v,fill:m,hoverFill:i&&!r?m:x,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:ae,height:"100%",pointerEvents:"auto"}})]}),Je=(k="two-row")=>a.jsx("div",{...k==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:X(_??0),flexShrink:0,...k==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...k==="two-row"&&o?{pointerEvents:"auto"}:{}}}),rt=()=>{const k=h.find(Ee=>Ee.prefix==="title1"),oe=h.filter(Ee=>Ee.prefix==="title2"||Ee.prefix==="title3"),de=oe.length>0||o||(L??0)>0;return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`${e}-header-row-top`,children:[(_??0)>0||o?Je():null,k&&qe(k,"two-row-top"),v&&ke()]}),de?a.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[oe.length>0?a.jsxs("div",{className:`${e}-header-row-bottom`,children:[oe.map(Ee=>qe(Ee,"two-row-bottom")),o&&a.jsxs(a.Fragment,{children:[Ge(),ve()]})]}):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:Ie,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},dt=()=>a.jsxs(a.Fragment,{children:[(_??0)>0||o?Je("single-row"):null,h.map(k=>qe(k,"single-row")),o?a.jsxs(a.Fragment,{children:[tt(),et()]}):null,v?ke():null]}),Pt=s.useCallback(k=>!!(k.closest("[data-controls]")||k.closest(`.${e}-thumbnails`)||k.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:St,backdropStyle:ht,mediaAreaStyle:Wt,overlayContentStyle:Tt,swipeHandlers:Ot,dismissAreaStyle:Gt}=mp({enabled:pe??!1,onClose:yt,animMs:cr,isBlockedTarget:Pt}),kt=()=>{if(!he||t.length===0)return Ze.current=0,0;const k=Ye.current[0],oe=Ye.current[t.length];if(!k||!oe)return Ze.current;const de=oe.offsetLeft-k.offsetLeft;return de>0&&(Ze.current=de),Ze.current},_t=(k=!1)=>{if(!he)return;const oe=ze.current,de=kt();!oe||de<=0||de<oe.clientWidth*.25||(oe.scrollLeft<=0?(oe.scrollLeft+=de,k&&(it.current.scrollLeft+=de),ct.current&&(De.current+=de)):oe.scrollLeft>=de*2&&(oe.scrollLeft-=de,k&&(it.current.scrollLeft-=de),ct.current&&(De.current-=de)))},Ft=(k,oe=(de=>(de=ze.current)==null?void 0:de.scrollLeft)()??0)=>{if(!he)return k;let Ee=t.length+k,Xe=1/0;for(let lt=0;lt<Me;lt++){const Et=lt*t.length+k,Bt=Ye.current[Et];if(!Bt)continue;const rn=Math.abs(Bt.offsetLeft-oe);rn<Xe&&(Xe=rn,Ee=Et)}return Ee},ut=k=>{const oe=ze.current;return!k||!oe?!1:k.offsetWidth>oe.clientWidth+1},H=k=>{const oe=ze.current;if(!k||!oe||!ut(k))return!1;const de=k.offsetLeft,Ee=de+k.offsetWidth;return oe.scrollLeft>=de-1&&oe.scrollLeft+oe.clientWidth<=Ee+1},Le=(k=(oe=>(oe=ze.current)==null?void 0:oe.scrollLeft)()??0)=>{for(let Ee=0;Ee<Ye.current.length;Ee+=1){const Xe=Ye.current[Ee];if(Xe&&H(Xe))return Ee}let de={flatIndex:0,distance:1/0};return Ye.current.forEach((Ee,Xe)=>{if(!Ee)return;const lt=Math.abs(Ee.offsetLeft-k);lt<de.distance&&(de={flatIndex:Xe,distance:lt})}),de.flatIndex},je=k=>{ze.current&&Ye.current.forEach(oe=>{oe&&(oe.style.scrollSnapAlign=ut(oe)&&k==="backward"?"end":"start")})},Fe=(k,oe,de)=>{const Ee=k-oe,Xe=Le(oe),lt=Ye.current[Xe];if(H(lt))return Le(k)%t.length;const Et=Ye.current[Xe+1],Bt=lt?Et?Et.offsetLeft-lt.offsetLeft:lt.offsetWidth:0,rn=Bt>0?Ee>Bt*Xr?1:Ee<-Bt*Xr?-1:0:0;return rn===0?de:he?(de+rn+t.length)%t.length:Math.max(0,Math.min(t.length-1,de+rn))},ft=s.useCallback((k=!1)=>{if(M!=="on"||o)return;const oe=$e.current,de=N.current,Ee=Ne.current[de];if(!oe||!Ee||oe.scrollWidth<=oe.clientWidth)return;const Xe=oe.scrollLeft,lt=Xe+oe.clientWidth,Et=Ee.offsetLeft,Bt=Et+Ee.offsetWidth;if(Et>=Xe&&Bt<=lt)return;const rn=oe.scrollWidth-oe.clientWidth;let Zt=Xe;if(!k&&Vt.current===null){const ui=Ne.current[de-1],En=Ne.current[de+1],Qn=ui?Ee.offsetLeft-ui.offsetLeft:En?En.offsetLeft-Ee.offsetLeft:Ee.offsetWidth;Bt>lt?Zt+=Qn:Et<Xe&&(Zt-=Qn)}else Bt>lt?Zt=Bt-oe.clientWidth:Zt=Et;oe.scrollLeft=Math.max(0,Math.min(rn,Zt))},[o,M]),Ht=s.useCallback((k=!1)=>{k&&(Yt.current=!0),jt.current===null&&(jt.current=requestAnimationFrame(()=>{jt.current=null;const oe=Yt.current;Yt.current=!1,ft(oe)}))},[ft]),gt=s.useCallback(k=>{if(k===N.current)return;const oe=N.current;N.current=k;const de=Math.abs(k-oe)>1,Ee=he&&t.length>1&&(oe===t.length-1&&k===0||oe===0&&k===t.length-1);re(k),Ht(de||Ee)},[t.length,he,Ht]),Lt=()=>{if(!ze.current||t.length===0||Vt.current!==null||it.current.isActive&&it.current.hasMoved)return;const k=ze.current.scrollLeft,oe=Le(k)%t.length;oe!==N.current&&gt(oe)},qt=()=>{Vt.current=null},Dt=k=>{const oe=ze.current;oe&&(oe.style.scrollSnapType=k?"":"none")},an=()=>{var k;(k=Ae.current)==null||k.call(Ae),Ae.current=null},cn=()=>{Ue.current!==null&&(cancelAnimationFrame(Ue.current),Ue.current=null),ct.current=!1},qn=()=>{const k=ze.current;if(!k){Ue.current=null,ct.current=!1;return}const oe=De.current-k.scrollLeft;if(Math.abs(oe)<.5){k.scrollLeft=De.current,_t(),Lt(),Ue.current=null,ct.current=!1;return}k.scrollLeft+=oe*Lx,_t(),Lt(),xt(),Ue.current=requestAnimationFrame(qn)},Yn=()=>{const k=Qe.current;k&&(k.style.transition="",k.style.transform="",k.style.willChange="")},Qi=(k,oe,de,Ee)=>{Yn(),k.scrollLeft=oe,mt.current=k.scrollLeft,_t(),de!==void 0?(N.current=de,re(de)):Lt(),Dt(!0),Ee==null||Ee()},hn=(k,{behavior:oe="smooth",activeIndex:de,onComplete:Ee}={})=>{const Xe=ze.current,lt=Qe.current;if(!Xe||!lt)return;if(cn(),an(),Dt(!1),oe==="auto"){Qi(Xe,k,de,Ee);return}const Et=Math.abs(k-Xe.scrollLeft),Bt=fx(Et,bx,Sx,Xe.clientWidth*.55);Ae.current=xx(Xe,lt,k,{duration:Bt,easing:wx,onComplete:()=>{Ae.current=null,Qi(Xe,k,de,Ee)}})},Vo=(k="smooth")=>{const oe=ze.current;if(!oe||t.length===0)return;const de=Le()%t.length,Ee=Ft(de,oe.scrollLeft),Xe=Ye.current[Ee];Xe&&hn(Xe.offsetLeft,{behavior:k,activeIndex:de})},Go=(k,oe="smooth",de,Ee)=>{const Xe=ze.current;if(!Xe||t.length===0)return;const lt=(Ee??Xe.scrollLeft)-k,Et=Le(k),Bt=Ye.current[Et];if(H(Bt)){Dt(!0),Lt();return}const rn=Ye.current[Et+1],Zt=Bt?rn?rn.offsetLeft-Bt.offsetLeft:Bt.offsetWidth:0;if((Zt>0?lt>Zt*Xr?1:lt<-Zt*Xr?-1:0:0)!==0){const Kl=de??Et%t.length,Xo=Fe(Ee??Xe.scrollLeft,k,Kl);xn(Xo,oe);return}const En=Ee??Xe.scrollLeft,Qn=Le(En),kr=Ye.current[Qn];if(kr&&Math.abs(kr.offsetLeft-En)<1){Dt(!0),Lt();return}Vo("auto")},xn=(k,oe="smooth")=>{const de=ze.current;if(!de||t.length===0)return;const Ee=Ft(k,de.scrollLeft),Xe=Ye.current[Ee];Xe&&(oe==="smooth"?Vt.current=k:Vt.current=null,N.current=k,re(k),Ht(!0),hn(Xe.offsetLeft,{behavior:oe,activeIndex:k,onComplete:oe==="smooth"?qt:void 0}))},di=()=>{Oe.current&&(window.removeEventListener("pointerup",Oe.current),window.removeEventListener("pointercancel",Oe.current),Oe.current=null)},Zi=(k,oe,de,Ee,Xe)=>{const lt=de-k,Et=Ee-oe,Bt=Math.abs(lt),rn=Math.abs(Et);if(Bt<Ix||Bt<=rn)return!1;const Zt=lt<0?1:-1,ui=he?(Xe+Zt+t.length)%t.length:Math.max(0,Math.min(t.length-1,Xe+Zt));return ui===Xe?!1:(xn(ui),!0)},bn=k=>{if(!it.current.isActive)return;di();const oe=ze.current;if(!oe)return;const{scrollLeft:de,startActiveIndex:Ee,hasMoved:Xe}=it.current,lt=oe.scrollLeft;_t(!0),it.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},Ve(!1),k!==void 0&&oe.hasPointerCapture(k)&&oe.releasePointerCapture(k),Xe?Go(de,"smooth",Ee,lt):(Dt(!0),Lt()),xt()},Kn=(k,oe)=>{const de=st.current;st.current=null,de&&(Zi(de.startX,de.startY,k,oe,de.startActiveIndex),xt())},Ji=k=>{if(!we)return;if(k.pointerType==="touch"){if(cn(),Dt(!0),Pt(k.target))return;st.current={startX:k.clientX,startY:k.clientY,startActiveIndex:N.current};return}if(k.pointerType!=="mouse"||k.button!==0||Pt(k.target))return;const oe=ze.current;if(!oe)return;cn(),an(),Yn(),Vt.current=null,it.current={isActive:!0,startX:k.clientX,scrollLeft:oe.scrollLeft,startActiveIndex:N.current,hasMoved:!1},Dt(!1),xt(),oe.setPointerCapture(k.pointerId),di();const de=Ee=>{Ee.pointerType==="mouse"&&bn(Ee.pointerId)};Oe.current=de,window.addEventListener("pointerup",de),window.addEventListener("pointercancel",de)},eo=k=>{if(!we||k.pointerType!=="mouse")return;const oe=ze.current;if(!oe||!it.current.isActive)return;if(k.buttons===0){bn(k.pointerId);return}const de=k.clientX-it.current.startX;Math.abs(de)>Px&&(it.current.hasMoved=!0,Ve(!0)),it.current.hasMoved&&(k.preventDefault(),oe.scrollLeft=it.current.scrollLeft-de,_t(!0),Lt(),xt())},Te=k=>{if(we){if(k.pointerType==="touch"){k.type==="pointerup"?Kn(k.clientX,k.clientY):st.current=null;return}k.pointerType==="mouse"&&bn(k.pointerId)}},Ke=k=>{!we||k.pointerType!=="mouse"||bn(k.pointerId)};return jl(),s.useEffect(()=>{const k=requestAnimationFrame(()=>It(!0));return()=>{cancelAnimationFrame(k),an(),di(),jt.current!==null&&(cancelAnimationFrame(jt.current),jt.current=null),Rt.current&&clearTimeout(Rt.current),zt.current&&clearTimeout(zt.current)}},[]),s.useEffect(()=>{if(!fe){wt(!0);return}xt();const k=()=>xt();return document.addEventListener("pointermove",k,{passive:!0}),document.addEventListener("pointerdown",k,{passive:!0}),()=>{document.removeEventListener("pointermove",k),document.removeEventListener("pointerdown",k),zt.current&&clearTimeout(zt.current)}},[fe,xt]),s.useEffect(()=>{const k=oe=>{oe.key==="Escape"&&yt()};return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[yt]),s.useLayoutEffect(()=>{kt()},[A,t.length,he]),s.useLayoutEffect(()=>{o||xn(N.current,"auto")},[A,o]),s.useLayoutEffect(()=>{xn(0,"auto")},[t.length,he]),s.useEffect(()=>{const k=ze.current;if(!k||o||!pe)return;const oe=de=>{if(de.preventDefault(),Math.abs(de.deltaY)<=Math.abs(de.deltaX))return;const Ee=de.deltaMode===1?Tx:de.deltaMode===2?k.clientHeight:1,Xe=de.deltaY*Ee*Cx;if(Xe!==0){if(an(),ct.current||(ct.current=!0,De.current=k.scrollLeft,Vt.current=null,Dt(!1)),De.current+=Xe,!he){const lt=k.scrollWidth-k.clientWidth;De.current=Math.max(0,Math.min(lt,De.current))}xt(),Ue.current===null&&(Ue.current=requestAnimationFrame(qn))}};return k.addEventListener("wheel",oe,{passive:!1}),()=>{k.removeEventListener("wheel",oe),cn()}},[o,pe,he]),s.useEffect(()=>{const k=ze.current;if(!k)return;const oe=()=>{_t(it.current.isActive);const Ee=k.scrollLeft,Xe=Ee-mt.current;mt.current=Ee;const lt=Ze.current>0?Ze.current*.5:1/0;if(Xe!==0&&Math.abs(Xe)<lt){const Et=Xe>0?"forward":"backward";Et!==Be.current&&(Be.current=Et,je(Et))}it.current.isActive&&it.current.hasMoved||Lt()};k.addEventListener("scroll",oe,{passive:!0});const de=new ResizeObserver(()=>{kt(),_t(it.current.isActive),je(Be.current),Lt()});return de.observe(k),()=>{an(),k.removeEventListener("scroll",oe),de.disconnect()}},[t.length,he]),a.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{St||yt()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:vt?1:0,transition:`opacity ${cr}ms ease`,pointerEvents:vt?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:c,...ht}}),a.jsxs("div",{ref:_e,className:`${e}-lightbox-dismiss-area`,style:Gt,...Ot,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:Wt,onClick:k=>k.stopPropagation(),children:a.jsx("div",{ref:ze,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":we&&t.length>0?"true":"false","data-mouse-dragging":pt?"true":"false",onPointerDown:Ji,onPointerMove:eo,onPointerUp:Te,onPointerCancel:Te,onLostPointerCapture:Ke,children:a.jsx("div",{ref:Qe,className:`${e}-lightbox-strip-track`,style:{gap:A},children:nt.map((k,oe)=>{const de=k.image.objectFit??"contain",Ee=oe%t.length,Xe=Math.floor(oe/t.length),lt=Ur(A),Et=`calc(-0.5 * (${lt} + ${A}))`;return a.jsxs("div",{ref:Bt=>Ye.current[oe]=Bt,className:`${e}-strip-item`,style:{height:D==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[a.jsx("img",{src:k.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:de}}),o&&Ee<t.length-1&&Xe===0&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Et,width:lt,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Xe}-${k.image.url}-${Ee}`)})})})}),a.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":on?"true":"false",style:Tt,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:ie,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${se?` ${e}-lightbox-content-area-stacked`:""}`,children:(Ce||v)&&a.jsx("div",{className:`${e}-header ${se?`${e}-header-two-row`:`${e}-header-single-row`}`,children:se?rt():Ce||v?dt():null})})})]}),t.length>1&&M==="on"&&(()=>{const k=Ur(I),oe=`calc(-0.5 * (${I} + ${k}))`;return a.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:I},children:a.jsx("div",{ref:$e,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:de=>de.stopPropagation(),children:a.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":S,style:{gap:U,"--thumbnail-active-color":W},children:[t.map((de,Ee)=>{const Xe=Ur(U),lt=`calc(-0.5 * (${Xe} + ${U}))`;return a.jsxs("div",{ref:Et=>{Ne.current[Ee]=Et},style:{position:"relative",flex:"0 0 auto"},children:[a.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":O===Ee?"true":"false",onClick:()=>pe&&b==="click"&&xn(Ee),onMouseEnter:()=>Re&&b==="hover"&&xn(Ee),"aria-label":de.image.name?`View ${de.image.name}`:`View image ${Ee+1}`,"aria-current":O===Ee?"true":void 0,children:a.jsx("img",{className:`${e}-thumb-image${me?` ${e}-thumb-image-cover`:""}`,src:de.image.url,alt:"",draggable:!1,style:{...xe,maxWidth:w,maxHeight:w,width:f.display==="cover"?"auto":"100%",height:"auto",objectFit:f.display==="cover"?"cover":"contain"}})}),o&&Ee<t.length-1&&a.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:lt,width:Xe,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${de.image.url}-${Ee}`)}),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:oe,height:k,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function Dx(e){return`
14353
14353
  .${e}-wrapper {
14354
14354
  position: relative;
14355
14355
  width: 100%;
@@ -15280,7 +15280,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
15280
15280
  </>
15281
15281
  );
15282
15282
  };
15283
- `,jx="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 Vx(e){const t={};return t[Qt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Qt(e,"fontSettings")]={...Hi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Qt(e,"fontSize")]={...Hi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Qt(e,"lineHeight")]={...Hi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Qt(e,"letterSpacing")]={...Hi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Qt(e,"wordSpacing")]={...Hi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Qt(e,"textAlign")]={...Hi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Qt(e,"textAppearance")]={...Hi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Gx=Ao.reduce((e,t)=>({...e,...Vx(t)}),{}),Xx=Ao.reduce((e,t)=>({...e,[Qt(t,"fontFamily")]:"Goudy Bookletter 1911",[Qt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Qt(t,"letterSpacing")]:0,[Qt(t,"wordSpacing")]:0,[Qt(t,"textAlign")]:"left",[Qt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function fs(e){return Ao.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Qt(n,"fontSize")]=i),o!==void 0&&(t[Qt(n,"lineHeight")]=o),t},{})}const Ux=_x(),qx={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"}},...Gx,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:jx,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...Xx},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:[Ux]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"}},title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}}}},default:[{image:{url:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"}]}},Yx={element:Bx,id:"lightbox-strip",name:"Strip",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"01M3QM74XG47J2PVBJ6XSNMZN6"},schema:qx,sourceCode:zx,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0},{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[...Ao.map(e=>({path:`${Qt(e,"fontFamily")}`}))]},fontRelations:{...Ao.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Qt(t,"fontFamily")}`}),{})}},Kx=({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:v,backgroundColor:g,imageGap:m,maxWidth:x,maxHeight:b,textTransition:R,title1Width:f,title2Width:S,title3Width:W,title1MarginLeft:q=0,title2MarginLeft:z=0,title3MarginLeft:P=0,titleRowMarginBottom:_=0,titleHeaderLayout:G="single-row",countCloseGap:$=0,closeIcon:L,closeIconMaxWidth:D,closeIconColor:E,closeIconHoverColor:T,contentMarginTop:C=0,iconMarginRight:V=0}=n,w=s.useCallback(Te=>F.scalingValue(Te,i??!1),[i]),U=w(m??0),M=`${x}%`,A=`${b}%`,j=w($),ie=w(C),ae=w(V),O=zi("title1",Bi(n,"title1"),i),re=zi("title2",Bi(n,"title2"),i),N=zi("title3",Bi(n,"title3"),i),le=zi("count",Bi(n,"count"),i),J=G==="mobile",be=!i||!!r,Pe=!o&&(!i||!!r),ye=s.useMemo(()=>pa(t,y),[t,y]),[ce,K]=s.useState(l),se=ye[ce],pe=se==null?void 0:se.entry,[fe,we]=s.useState(!1),[Ie,me]=s.useState(null),[xe,Ce]=s.useState(!1),[h,Y]=s.useState(null),[Q,ne]=s.useState(!1),[ue,B]=s.useState(0),[I,ee]=s.useState(),[te,ge]=s.useState(),[X,Me]=s.useState(null),Se=s.useRef(null),Z=s.useRef(0),He=s.useRef(0),We=s.useRef(0),ot=s.useRef(!1),qe=s.useRef(null),tt=s.useRef(null),et=s.useRef(null),Ge=s.useRef(null),ve=s.useRef(null),_e=s.useRef(null),ze=s.useRef(null),Qe=s.useCallback(()=>{const Te=tt.current;if(!Te)return;const Ke=Te.closest(`.${e}-lightbox-content-area`);if(!Ke)return Te.getBoundingClientRect().width;const k=Array.from(Ke.children).reduce((oe,de)=>!(de instanceof HTMLElement)||de.contains(Te)?oe:oe+de.getBoundingClientRect().width,0);return Ke.getBoundingClientRect().width-k},[e]),$e=s.useCallback(()=>{Se.current&&(clearTimeout(Se.current),Se.current=null)},[]),Ne=s.useCallback(Te=>{Te===Z.current&&(Y(null),ne(!1))},[]),Ye=s.useCallback(()=>{o||ot.current||(ot.current=!0,u==null||u(),we(!1),qe.current=setTimeout(()=>{p()},300))},[o,u,p]),Ze=s.useCallback(Te=>!!(Te.closest("[data-controls]")||Te.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:st,backdropStyle:it,mediaAreaStyle:Oe,overlayContentStyle:Ae,swipeHandlers:mt,dismissAreaStyle:Be}=mp({enabled:Pe,onClose:Ye,animMs:300,isBlockedTarget:Ze}),De=s.useCallback(Te=>{c&&Ku(Te+1,d,!0)},[c,d]),Ue=s.useCallback(Te=>{if(Te)return Te.getBoundingClientRect().height},[]),ct=s.useCallback(Te=>{if(ye.length===0)return;const Ke=(Te%ye.length+ye.length)%ye.length;if(Ke===ce)return;const k=ye[ce],oe=ye[Ke];Z.current+=1;const de=Z.current,Ee=R==="fade"&&Fc(k==null?void 0:k.entry)!==Fc(oe==null?void 0:oe.entry),Xe=Ue(et.current),lt=Ee?(()=>{const Bt=Qe();Xn.flushSync(()=>{Me(oe.entry)}),et.current&&Bt&&(et.current.style.width=`${Bt}px`);const rn=Ue(et.current);return et.current&&(et.current.style.width=""),{measuredIncomingTitlesHeight:rn,incomingTitlesMeasureWidth:Bt}})():void 0,Et=Math.max(Xe??0,(lt==null?void 0:lt.measuredIncomingTitlesHeight)??0)||void 0;B(de),Y(ce),ne(!0),K(Ke),De(Ke),We.current=Ke,Ee?($e(),Et&&ee(Et),lt!=null&&lt.incomingTitlesMeasureWidth&&ge(lt.incomingTitlesMeasureWidth),me((k==null?void 0:k.entryIndex)??null),Ce(!0),He.current=oe.entryIndex,Se.current=setTimeout(()=>{me(null),Ce(!1),ee(void 0),ge(void 0),Me(null),Se.current=null},400)):($e(),me(null),Ce(!1),ee(void 0),ge(void 0),Me(null),He.current=oe.entryIndex)},[ce,$e,Qe,Ue,ye,De,R]),he=s.useCallback(()=>{ze.current=null},[]),Re=s.useCallback(Te=>{!be||ye.length<=1||Te.pointerType==="mouse"&&Te.button!==0||Te.target.closest("[data-controls]")||(ze.current={startX:Te.clientX,startY:Te.clientY,pointerId:Te.pointerId})},[be,ye.length]),nt=s.useCallback(Te=>{var Bt;if(!be||ye.length<=1||Te.pointerType==="mouse"&&Te.button!==0)return;if(st){he();return}const Ke=ze.current;if(!Ke||Ke.pointerId!==Te.pointerId||(he(),Te.target.closest("[data-controls]")))return;const oe=Te.clientX-Ke.startX,de=Te.clientY-Ke.startY,Ee=Math.abs(oe),Xe=Math.abs(de);if(Ee>=sv&&Ee>Xe){ct(oe>0?ce-1:ce+1);return}if(Ee>Rc||Xe>Rc)return;const lt=(Bt=Ge.current)==null?void 0:Bt.getBoundingClientRect(),Et=lt?lt.left+lt.width/2:window.innerWidth/2;ct(Te.clientX<Et?ce-1:ce+1)},[ce,be,ct,st,he,ye.length]),pt=s.useCallback(Te=>{const Ke=ze.current;(Ke==null?void 0:Ke.pointerId)===Te.pointerId&&he()},[he]);jl(),s.useEffect(()=>{_e.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const Te=requestAnimationFrame(()=>{we(!0),requestAnimationFrame(()=>{ve.current?ve.current.focus():Ge.current&&Ge.current.focus()})});return()=>{cancelAnimationFrame(Te),qe.current&&clearTimeout(qe.current),Se.current&&clearTimeout(Se.current);const Ke=_e.current;Ke&&document.contains(Ke)&&Ke.focus({preventScroll:!0})}},[]),s.useEffect(()=>{var Te;R!=="fade"&&(He.current=((Te=ye[ce])==null?void 0:Te.entryIndex)??0,$e(),me(null),Ce(!1),ee(void 0),ge(void 0))},[ce,$e,ye,R]),s.useEffect(()=>{const Te=Ke=>{if(Ke.key==="Escape"){Ye();return}if(Ke.key==="ArrowLeft"&&ye.length>1){ct(ce-1);return}if(Ke.key==="ArrowRight"&&ye.length>1){ct(ce+1);return}if(Ke.key==="Tab"&&Ge.current){const k=Ge.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),oe=Array.from(k).filter(lt=>!lt.closest('[aria-hidden="true"]'));if(oe.length===0)return;const de=oe[0],Ee=oe[oe.length-1],Xe=document.activeElement;Ke.shiftKey?(Xe===de||!Ge.current.contains(Xe))&&(Ke.preventDefault(),Ee.focus()):(Xe===Ee||!Ge.current.contains(Xe))&&(Ke.preventDefault(),de.focus())}};return window.addEventListener("keydown",Te),()=>window.removeEventListener("keydown",Te)},[ct,Ye,ce,ye.length]),s.useLayoutEffect(()=>{$e(),Z.current=0,B(0),Y(null),ne(!1),me(null),Ce(!1),ee(void 0),ge(void 0),Me(null),K(Te=>{const Ke=Math.max(0,ye.length-1);return Math.min(Te,Ke)})},[$e,t.length,y,ye.length]),s.useLayoutEffect(()=>{var k;const Te=Math.max(0,ye.length-1),Ke=Math.min(Math.max(0,l),Te);We.current=Ke,He.current=((k=ye[Ke])==null?void 0:k.entryIndex)??0,K(Ke)},[l]);const Ve=Ie!==null?t[Ie]:null,vt=h!==null?ye[h]:null,Mt=(pe==null?void 0:pe.title1)||(pe==null?void 0:pe.title2)||(pe==null?void 0:pe.title3)||(Ve==null?void 0:Ve.title1)||(Ve==null?void 0:Ve.title2)||(Ve==null?void 0:Ve.title3),At=hv(y,ye,t),wt=L!==null,Vt=Mt||At||wt,jt=At&&wt?{gap:j}:void 0,Yt=`${e}-titles-stack${J?` ${e}-titles-stack-stacked`:""}`,Kt=`${e}-titles-layer-out${J?` ${e}-titles-layer-out-stacked`:""}`,It=`${e}-titles-layer-out`,zt=(q??0)>0||o,on=w(_),xt=s.useMemo(()=>({title1Width:f??bo.title1Width,title2Width:S??bo.title2Width,title3Width:W??bo.title3Width}),[f,S,W]),yt=s.useMemo(()=>({title2MarginLeft:z,title3MarginLeft:P}),[z,P]),ke=s.useMemo(()=>pe?wi(e,pe,O,re,N):[],[e,pe,O,re,N]),Je=s.useMemo(()=>ke.map(Te=>xt[Te.widthKey]),[ke,xt]),rt=s.useMemo(()=>Po(ke.length,Je),[ke.length,Je]),dt=s.useMemo(()=>vr(ke.length,Je),[ke.length,Je]),Pt=s.useMemo(()=>ke.filter(Te=>Te.prefix==="title1"),[ke]),St=s.useMemo(()=>ke.filter(Te=>Te.prefix==="title2"||Te.prefix==="title3"),[ke]),ht=s.useMemo(()=>$i(Pt,xt),[Pt,xt]),Wt=s.useMemo(()=>$i(St,xt),[St,xt]),Tt=s.useCallback((Te,Ke)=>{const k=ke.findIndex(de=>de.prefix===Te.prefix);if(!J||Ke==="single-row")return{effectiveWidth:dt[k]??0,resolvedWidth:rt[k]??0,maxWidth:yn(k,rt)};if(Ke==="two-row-top"){const de=Pt.findIndex(Ee=>Ee.prefix===Te.prefix);return{effectiveWidth:ht.effective[de]??0,resolvedWidth:ht.resolved[de]??0,maxWidth:yn(de,ht.resolved)}}const oe=St.findIndex(de=>de.prefix===Te.prefix);return{effectiveWidth:Wt.effective[oe]??0,resolvedWidth:Wt.resolved[oe]??0,maxWidth:yn(oe,Wt.resolved)}},[ke,St,Wt,dt,rt,Pt,ht,J]),Ot=s.useCallback(Te=>ep(ke,rt,yt,Te)+(J?0:q??0),[ke,rt,yt,J,q]),Gt=s.useCallback(()=>J?0:q??0,[J,q]),kt=s.useCallback(Te=>St.slice(0,Te).reduce((Ke,k,oe)=>Ke+(k.marginLeftKey?yt[k.marginLeftKey]??0:0)+(Wt.resolved[oe]??0),0),[St,Wt.resolved,yt]),_t=s.useCallback(Te=>{const Ke=St[Te];return kt(Te)+(Ke.marginLeftKey?yt[Ke.marginLeftKey]??0:0)+(Wt.resolved[Te]??0)},[St,Wt.resolved,kt,yt]),Ft=s.useCallback((Te,Ke,k)=>{if(!J||k==="single-row"){const lt=Te.findIndex(Zt=>Zt.prefix===Ke.prefix),Et=Te.map(Zt=>xt[Zt.widthKey]),Bt=Po(Te.length,Et);return{effectiveWidth:vr(Te.length,Et)[lt]??0,resolvedWidth:Bt[lt]??0,maxWidth:yn(lt,Bt)}}if(k==="two-row-top"){const lt=Te.filter(Zt=>Zt.prefix==="title1"),Et=lt.findIndex(Zt=>Zt.prefix===Ke.prefix),{resolved:Bt,effective:rn}=$i(lt,xt);return{effectiveWidth:rn[Et]??0,resolvedWidth:Bt[Et]??0,maxWidth:yn(Et,Bt)}}const oe=Te.filter(lt=>lt.prefix==="title2"||lt.prefix==="title3"),de=oe.findIndex(lt=>lt.prefix===Ke.prefix),{resolved:Ee,effective:Xe}=$i(oe,xt);return{effectiveWidth:Xe[de]??0,resolvedWidth:Ee[de]??0,maxWidth:yn(de,Ee)}},[xt,J]),ut=(Te,Ke,k)=>{const oe=Te.marginLeftKey?yt[Te.marginLeftKey]??0:0,{effectiveWidth:de,resolvedWidth:Ee,maxWidth:Xe}=k??Tt(Te,Ke),lt=Math.max(oe,ni),Et=o&&Ke==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":Te.prefix,style:{width:w(de),...oe>0?{marginLeft:w(oe)}:{}},children:[a.jsx("p",{className:Te.className,style:Te.style,children:Te.text}),Et&&Te.marginLeftKey?a.jsx("div",{"data-controls":Te.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ee),style:{position:"absolute",top:0,left:w(-oe),width:w(lt),height:"100%",pointerEvents:"auto"}}):null,Et?a.jsx("div",{"data-controls":Te.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Xe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:w(-Pn/2),width:w(Pn),height:"100%",pointerEvents:"auto"}}):null]},Te.className)},H=(Te="two-row")=>{const Ke=ke.findIndex(de=>de.prefix==="title1"),k=Ke>=0?rt[Ke]:xt.title1Width,oe=Te==="two-row"&&o;return a.jsx("div",{...oe?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(k)}:{},style:{width:w(q??0),flexShrink:0,alignSelf:"stretch",...oe?{pointerEvents:"auto"}:{}}})},Le=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:O,"aria-hidden":"true",children:" "}),je=()=>a.jsx("span",{className:`${e}-entry-counter`,style:le,"aria-live":"polite","aria-atomic":"true",children:mv(ye,ce,y,t)}),Fe=()=>At?o&&wt?a.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[je(),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}})]}):je():null,ft=()=>!At&&!wt?null:a.jsxs("div",{className:`${e}-titles-row-header-controls`,style:jt,children:[Fe(),wt?Lt():null]}),Ht=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[At||Mt?Le():null,zt?H("single-row"):null,Dt(pe),a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),ft(),xn()]}),gt=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[At||Mt?Le():null,zt?H("single-row"):null,a.jsxs("div",{className:`${e}-titles-row-titles`,style:xe&&I?{minHeight:I}:void 0,children:[a.jsx("div",{ref:et,className:Yt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Yn(X||pe)}),a.jsxs("div",{ref:tt,className:Yt,style:{position:xe?"absolute":"relative",inset:xe?0:void 0,width:"100%",...xe&&te?{width:te,maxWidth:"100%"}:void 0},children:[Ve&&xe?a.jsx("div",{className:`${Kt} ${e}-titles-fade-out`,children:Yn(Ve)}):null,a.jsx("div",{className:`${e}-titles-layer-in${xe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Yn(pe)})]})]}),ft(),xn()]}),Lt=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:F.scalingValue(D??0,i),height:F.scalingValue(D??0,i),marginRight:ae,"--close-icon-hover-color":T},children:[a.jsx("button",{ref:ve,type:"button",className:`${e}-close-icon-inner`,onClick:Ye,"aria-label":"Close",children:a.jsx(gn,{url:L??"",fill:E,hoverFill:i&&!r?E:T,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:ae,height:"100%",pointerEvents:"auto"}})]}),qt=(Te,Ke)=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[At||Mt?Le():null,zt?H("two-row"):null,Ke!==void 0?a.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:Ke},children:Te}):a.jsxs(a.Fragment,{children:[Te,a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),ft()]}),Dt=Te=>{if(!Te)return null;const Ke=wi(e,Te,O,re,N);return a.jsx(a.Fragment,{children:Ke.map(k=>ut(k,"single-row",Ft(Ke,k,"single-row")))})},an=Te=>{if(!Te)return null;const Ke=wi(e,Te,O,re,N),k=Ke.find(oe=>oe.prefix==="title1");return k?ut(k,"two-row-top",Ft(Ke,k,"two-row-top")):null},cn=(Te,Ke=!1)=>{const k=Te?wi(e,Te,O,re,N):[],oe=k.filter(Xe=>Xe.prefix==="title2"||Xe.prefix==="title3"),de=o&&Ke;return oe.length>0||de||(_??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[oe.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[oe.map(Xe=>ut(Xe,"two-row-bottom",Ft(k,Xe,"two-row-bottom"))),Ke&&o?a.jsxs(a.Fragment,{children:[Vo(),Go()]}):null]}):null,(_??0)>0||de?a.jsx("div",{"data-controls":de?"titleRowMarginBottom":void 0,"data-controls-axis":de?"y":void 0,"data-controls-reverse":de?"":void 0,className:de?`${e}-control`:void 0,style:{height:on,width:"100%",flexShrink:0,pointerEvents:de?"auto":"none"}}):null]}):null},qn=(Te,Ke=!1)=>a.jsxs(a.Fragment,{children:[qt(an(Te)),cn(Te,Ke)]}),Yn=Te=>J?a.jsx("div",{className:`${e}-titles-row-two-row`,children:qn(Te)}):Te?a.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Dt(Te)}):null,Qi=()=>{const Te=J?-1:ke.findIndex(oe=>oe.prefix==="title1"),Ke=!J&&(o||(q??0)>0)?(()=>{const oe=q??0,de=Te>=0?rt[Te]:xt.title1Width,Ee=Math.max(oe,ni);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(de),style:{position:"absolute",top:0,left:0,width:w(Ee),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,k=ke.flatMap((oe,de)=>{if(!oe.marginLeftKey)return[];const Ee=yt[oe.marginLeftKey]??0,Xe=Ju(ke,rt,yt,de)+Gt(),lt=Math.max(Ee,ni);return a.jsx("div",{"data-controls":oe.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(rt[de]),style:{position:"absolute",top:0,left:w(Xe),width:w(lt),height:"100%",pointerEvents:"auto"}},oe.marginLeftKey)});return Ke?[Ke,...k]:k},hn=()=>ke.map((Te,Ke)=>{const k=yn(Ke,rt),de=Ot(Ke)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Te.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(k),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:w(de),width:w(Pn),height:"100%",pointerEvents:"auto"}})},`${Te.widthKey}-junction`)}),Vo=()=>St.flatMap((Te,Ke)=>{if(!Te.marginLeftKey)return[];const k=yt[Te.marginLeftKey]??0,oe=kt(Ke),de=Math.max(k,ni),{resolvedWidth:Ee}=Tt(Te,"two-row-bottom");return a.jsx("div",{"data-controls":Te.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ee),style:{position:"absolute",top:0,left:w(oe),width:w(de),height:"100%",pointerEvents:"auto"}},Te.marginLeftKey)}),Go=()=>St.map((Te,Ke)=>{const{maxWidth:k}=Tt(Te,"two-row-bottom"),de=_t(Ke)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Te.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(k),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:w(de),width:w(Pn),height:"100%",pointerEvents:"auto"}})},`${Te.widthKey}-junction`)}),xn=()=>!o||J?null:a.jsxs(a.Fragment,{children:[Qi(),hn()]}),di=Te=>{const Ke=!Te.objectFit&&si(v);return{className:`${e}-slide-image-cell${Ke?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:M,maxHeight:A,...Ke?{"--image-aspect-ratio":ja(v)}:{}}}},Zi=Te=>Te.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":Te.objectFit}}:si(v)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},bn=Te=>{if(Te.length===0)return null;const Ke=Te.length>1,k=as(U),oe=`calc(-0.5 * (${k} + ${U}))`;if(Te.length===1){const de=Te[0];return a.jsx("div",{...di(de),children:a.jsx("img",{...Zi(de),src:de.url,alt:de.name??"",draggable:!1})})}return a.jsx("div",{className:`${e}-slide-inner`,style:Ke?{gap:U}:void 0,children:Te.map((de,Ee)=>a.jsxs("div",{...di(de),children:[a.jsx("img",{...Zi(de),src:de.url,alt:de.name??"",draggable:!1}),o&&Ke&&Ee<Te.length-1&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:oe,width:k,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${de.url}-${Ee}`))})},Kn=!!(pe!=null&&pe.title2||pe!=null&&pe.title3||Ve!=null&&Ve.title2||Ve!=null&&Ve.title3||(_??0)>0||o),Ji=()=>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:et,className:Yt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:qn(X||pe)}),a.jsxs("div",{ref:tt,className:`${e}-titles-row-two-row`,style:{...xe&&I?{minHeight:I}:void 0,...xe&&te?{width:te,maxWidth:"100%"}:void 0},children:[qt(a.jsxs("div",{className:Yt,style:{position:xe?"absolute":"relative",inset:xe?0:void 0,width:"100%"},children:[Ve&&xe?a.jsx("div",{className:`${It} ${e}-titles-fade-out`,children:an(Ve)}):null,a.jsx("div",{className:`${e}-titles-layer-in${xe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:an(pe)})]}),xe&&I?I:void 0),Kn?a.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[Ve&&xe?a.jsx("div",{className:`${Kt} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:cn(Ve)}):null,a.jsx("div",{className:`${e}-titles-layer-in${xe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${J?` ${e}-titles-layer-in-stacked`:""}`,children:cn(pe,!0)})]}):null]})]}),eo=()=>{const Te=Kn;return a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...Te?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:Te?void 0:{flex:"0 0 auto",height:"auto"},children:qn(pe,!0)}),xn()]})};return a.jsxs("div",{ref:Ge,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{st||Ye()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:wt?void 0:-1,style:{opacity:fe?1:0,transition:"opacity 300ms ease",pointerEvents:fe?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:g,...it}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:Be,...mt,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:Oe,onClick:Te=>Te.stopPropagation(),children:a.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":be&&ye.length>1?"true":"false",onPointerDown:be?Re:void 0,onPointerUp:be?nt:void 0,onPointerCancel:be?pt:void 0,children:a.jsxs("div",{className:`${e}-slide-stack`,children:[vt&&Q?a.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:Te=>{Te.target===Te.currentTarget&&Ne(ue)},children:a.jsx("div",{className:`${e}-slide-area`,children:bn(vt.images)})},`slide-out-${ue}`):null,a.jsx("div",{className:`${e}-slide-layer-in${Q?` ${e}-slide-fade-in`:""}`,children:a.jsx("div",{className:`${e}-slide-area`,children:se?bn(se.images):null})},`slide-in-${ue}-${ce}`)]})})}),a.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:Ae,children:[a.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:ie,width:"100%"}}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...J?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${J?` ${e}-lightbox-content-area-stacked`:""}`,children:Vt&&a.jsx("div",{className:`${e}-text-bar-cell${J?` ${e}-text-bar-cell-stacked`:""}`,style:J?void 0:{flex:1,minWidth:0,width:"100%"},children:J?R==="fade"?Ji():eo():R==="fade"?gt():Ht()})})})]})]})]})};function Qx(e){return`
15283
+ `,jx="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 Vx(e){const t={};return t[Qt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Qt(e,"fontSettings")]={...Hi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Qt(e,"fontSize")]={...Hi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Qt(e,"lineHeight")]={...Hi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Qt(e,"letterSpacing")]={...Hi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Qt(e,"wordSpacing")]={...Hi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Qt(e,"textAlign")]={...Hi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Qt(e,"textAppearance")]={...Hi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Gx=Ao.reduce((e,t)=>({...e,...Vx(t)}),{}),Xx=Ao.reduce((e,t)=>({...e,[Qt(t,"fontFamily")]:"Goudy Bookletter 1911",[Qt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Qt(t,"letterSpacing")]:0,[Qt(t,"wordSpacing")]:0,[Qt(t,"textAlign")]:"left",[Qt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function fs(e){return Ao.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Qt(n,"fontSize")]=i),o!==void 0&&(t[Qt(n,"lineHeight")]=o),t},{})}const Ux=_x(),qx={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"}},...Gx,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:jx,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...Xx},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:[Ux]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"}},title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}}}},default:[{image:{url:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"}]}},Yx={element:Bx,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:qx,sourceCode:zx,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0},{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[...Ao.map(e=>({path:`${Qt(e,"fontFamily")}`}))]},fontRelations:{...Ao.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Qt(t,"fontFamily")}`}),{})}},Kx=({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:v,backgroundColor:g,imageGap:m,maxWidth:x,maxHeight:b,textTransition:M,title1Width:f,title2Width:S,title3Width:W,title1MarginLeft:q=0,title2MarginLeft:z=0,title3MarginLeft:P=0,titleRowMarginBottom:_=0,titleHeaderLayout:G="single-row",countCloseGap:$=0,closeIcon:L,closeIconMaxWidth:D,closeIconColor:E,closeIconHoverColor:T,contentMarginTop:C=0,iconMarginRight:V=0}=n,w=s.useCallback(Te=>F.scalingValue(Te,i??!1),[i]),U=w(m??0),I=`${x}%`,A=`${b}%`,j=w($),ie=w(C),ae=w(V),O=zi("title1",Bi(n,"title1"),i),re=zi("title2",Bi(n,"title2"),i),N=zi("title3",Bi(n,"title3"),i),le=zi("count",Bi(n,"count"),i),J=G==="mobile",be=!i||!!r,Pe=!o&&(!i||!!r),ye=s.useMemo(()=>pa(t,y),[t,y]),[ce,K]=s.useState(l),se=ye[ce],pe=se==null?void 0:se.entry,[fe,we]=s.useState(!1),[Re,me]=s.useState(null),[xe,Ce]=s.useState(!1),[h,Y]=s.useState(null),[Q,ne]=s.useState(!1),[ue,B]=s.useState(0),[R,ee]=s.useState(),[te,ge]=s.useState(),[X,Ie]=s.useState(null),Se=s.useRef(null),Z=s.useRef(0),He=s.useRef(0),We=s.useRef(0),ot=s.useRef(!1),qe=s.useRef(null),tt=s.useRef(null),et=s.useRef(null),Ge=s.useRef(null),ve=s.useRef(null),_e=s.useRef(null),ze=s.useRef(null),Qe=s.useCallback(()=>{const Te=tt.current;if(!Te)return;const Ke=Te.closest(`.${e}-lightbox-content-area`);if(!Ke)return Te.getBoundingClientRect().width;const k=Array.from(Ke.children).reduce((oe,de)=>!(de instanceof HTMLElement)||de.contains(Te)?oe:oe+de.getBoundingClientRect().width,0);return Ke.getBoundingClientRect().width-k},[e]),$e=s.useCallback(()=>{Se.current&&(clearTimeout(Se.current),Se.current=null)},[]),Ne=s.useCallback(Te=>{Te===Z.current&&(Y(null),ne(!1))},[]),Ye=s.useCallback(()=>{o||ot.current||(ot.current=!0,u==null||u(),we(!1),qe.current=setTimeout(()=>{p()},300))},[o,u,p]),Ze=s.useCallback(Te=>!!(Te.closest("[data-controls]")||Te.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:st,backdropStyle:it,mediaAreaStyle:Oe,overlayContentStyle:Ae,swipeHandlers:mt,dismissAreaStyle:Be}=mp({enabled:Pe,onClose:Ye,animMs:300,isBlockedTarget:Ze}),De=s.useCallback(Te=>{c&&Ku(Te+1,d,!0)},[c,d]),Ue=s.useCallback(Te=>{if(Te)return Te.getBoundingClientRect().height},[]),ct=s.useCallback(Te=>{if(ye.length===0)return;const Ke=(Te%ye.length+ye.length)%ye.length;if(Ke===ce)return;const k=ye[ce],oe=ye[Ke];Z.current+=1;const de=Z.current,Ee=M==="fade"&&Fc(k==null?void 0:k.entry)!==Fc(oe==null?void 0:oe.entry),Xe=Ue(et.current),lt=Ee?(()=>{const Bt=Qe();Xn.flushSync(()=>{Ie(oe.entry)}),et.current&&Bt&&(et.current.style.width=`${Bt}px`);const rn=Ue(et.current);return et.current&&(et.current.style.width=""),{measuredIncomingTitlesHeight:rn,incomingTitlesMeasureWidth:Bt}})():void 0,Et=Math.max(Xe??0,(lt==null?void 0:lt.measuredIncomingTitlesHeight)??0)||void 0;B(de),Y(ce),ne(!0),K(Ke),De(Ke),We.current=Ke,Ee?($e(),Et&&ee(Et),lt!=null&&lt.incomingTitlesMeasureWidth&&ge(lt.incomingTitlesMeasureWidth),me((k==null?void 0:k.entryIndex)??null),Ce(!0),He.current=oe.entryIndex,Se.current=setTimeout(()=>{me(null),Ce(!1),ee(void 0),ge(void 0),Ie(null),Se.current=null},400)):($e(),me(null),Ce(!1),ee(void 0),ge(void 0),Ie(null),He.current=oe.entryIndex)},[ce,$e,Qe,Ue,ye,De,M]),he=s.useCallback(()=>{ze.current=null},[]),Me=s.useCallback(Te=>{!be||ye.length<=1||Te.pointerType==="mouse"&&Te.button!==0||Te.target.closest("[data-controls]")||(ze.current={startX:Te.clientX,startY:Te.clientY,pointerId:Te.pointerId})},[be,ye.length]),nt=s.useCallback(Te=>{var Bt;if(!be||ye.length<=1||Te.pointerType==="mouse"&&Te.button!==0)return;if(st){he();return}const Ke=ze.current;if(!Ke||Ke.pointerId!==Te.pointerId||(he(),Te.target.closest("[data-controls]")))return;const oe=Te.clientX-Ke.startX,de=Te.clientY-Ke.startY,Ee=Math.abs(oe),Xe=Math.abs(de);if(Ee>=sv&&Ee>Xe){ct(oe>0?ce-1:ce+1);return}if(Ee>Mc||Xe>Mc)return;const lt=(Bt=Ge.current)==null?void 0:Bt.getBoundingClientRect(),Et=lt?lt.left+lt.width/2:window.innerWidth/2;ct(Te.clientX<Et?ce-1:ce+1)},[ce,be,ct,st,he,ye.length]),pt=s.useCallback(Te=>{const Ke=ze.current;(Ke==null?void 0:Ke.pointerId)===Te.pointerId&&he()},[he]);jl(),s.useEffect(()=>{_e.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const Te=requestAnimationFrame(()=>{we(!0),requestAnimationFrame(()=>{ve.current?ve.current.focus():Ge.current&&Ge.current.focus()})});return()=>{cancelAnimationFrame(Te),qe.current&&clearTimeout(qe.current),Se.current&&clearTimeout(Se.current);const Ke=_e.current;Ke&&document.contains(Ke)&&Ke.focus({preventScroll:!0})}},[]),s.useEffect(()=>{var Te;M!=="fade"&&(He.current=((Te=ye[ce])==null?void 0:Te.entryIndex)??0,$e(),me(null),Ce(!1),ee(void 0),ge(void 0))},[ce,$e,ye,M]),s.useEffect(()=>{const Te=Ke=>{if(Ke.key==="Escape"){Ye();return}if(Ke.key==="ArrowLeft"&&ye.length>1){ct(ce-1);return}if(Ke.key==="ArrowRight"&&ye.length>1){ct(ce+1);return}if(Ke.key==="Tab"&&Ge.current){const k=Ge.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),oe=Array.from(k).filter(lt=>!lt.closest('[aria-hidden="true"]'));if(oe.length===0)return;const de=oe[0],Ee=oe[oe.length-1],Xe=document.activeElement;Ke.shiftKey?(Xe===de||!Ge.current.contains(Xe))&&(Ke.preventDefault(),Ee.focus()):(Xe===Ee||!Ge.current.contains(Xe))&&(Ke.preventDefault(),de.focus())}};return window.addEventListener("keydown",Te),()=>window.removeEventListener("keydown",Te)},[ct,Ye,ce,ye.length]),s.useLayoutEffect(()=>{$e(),Z.current=0,B(0),Y(null),ne(!1),me(null),Ce(!1),ee(void 0),ge(void 0),Ie(null),K(Te=>{const Ke=Math.max(0,ye.length-1);return Math.min(Te,Ke)})},[$e,t.length,y,ye.length]),s.useLayoutEffect(()=>{var k;const Te=Math.max(0,ye.length-1),Ke=Math.min(Math.max(0,l),Te);We.current=Ke,He.current=((k=ye[Ke])==null?void 0:k.entryIndex)??0,K(Ke)},[l]);const Ve=Re!==null?t[Re]:null,vt=h!==null?ye[h]:null,It=(pe==null?void 0:pe.title1)||(pe==null?void 0:pe.title2)||(pe==null?void 0:pe.title3)||(Ve==null?void 0:Ve.title1)||(Ve==null?void 0:Ve.title2)||(Ve==null?void 0:Ve.title3),At=hv(y,ye,t),wt=L!==null,Vt=It||At||wt,jt=At&&wt?{gap:j}:void 0,Yt=`${e}-titles-stack${J?` ${e}-titles-stack-stacked`:""}`,Kt=`${e}-titles-layer-out${J?` ${e}-titles-layer-out-stacked`:""}`,Rt=`${e}-titles-layer-out`,zt=(q??0)>0||o,on=w(_),xt=s.useMemo(()=>({title1Width:f??bo.title1Width,title2Width:S??bo.title2Width,title3Width:W??bo.title3Width}),[f,S,W]),yt=s.useMemo(()=>({title2MarginLeft:z,title3MarginLeft:P}),[z,P]),ke=s.useMemo(()=>pe?wi(e,pe,O,re,N):[],[e,pe,O,re,N]),Je=s.useMemo(()=>ke.map(Te=>xt[Te.widthKey]),[ke,xt]),rt=s.useMemo(()=>Po(ke.length,Je),[ke.length,Je]),dt=s.useMemo(()=>vr(ke.length,Je),[ke.length,Je]),Pt=s.useMemo(()=>ke.filter(Te=>Te.prefix==="title1"),[ke]),St=s.useMemo(()=>ke.filter(Te=>Te.prefix==="title2"||Te.prefix==="title3"),[ke]),ht=s.useMemo(()=>$i(Pt,xt),[Pt,xt]),Wt=s.useMemo(()=>$i(St,xt),[St,xt]),Tt=s.useCallback((Te,Ke)=>{const k=ke.findIndex(de=>de.prefix===Te.prefix);if(!J||Ke==="single-row")return{effectiveWidth:dt[k]??0,resolvedWidth:rt[k]??0,maxWidth:yn(k,rt)};if(Ke==="two-row-top"){const de=Pt.findIndex(Ee=>Ee.prefix===Te.prefix);return{effectiveWidth:ht.effective[de]??0,resolvedWidth:ht.resolved[de]??0,maxWidth:yn(de,ht.resolved)}}const oe=St.findIndex(de=>de.prefix===Te.prefix);return{effectiveWidth:Wt.effective[oe]??0,resolvedWidth:Wt.resolved[oe]??0,maxWidth:yn(oe,Wt.resolved)}},[ke,St,Wt,dt,rt,Pt,ht,J]),Ot=s.useCallback(Te=>ep(ke,rt,yt,Te)+(J?0:q??0),[ke,rt,yt,J,q]),Gt=s.useCallback(()=>J?0:q??0,[J,q]),kt=s.useCallback(Te=>St.slice(0,Te).reduce((Ke,k,oe)=>Ke+(k.marginLeftKey?yt[k.marginLeftKey]??0:0)+(Wt.resolved[oe]??0),0),[St,Wt.resolved,yt]),_t=s.useCallback(Te=>{const Ke=St[Te];return kt(Te)+(Ke.marginLeftKey?yt[Ke.marginLeftKey]??0:0)+(Wt.resolved[Te]??0)},[St,Wt.resolved,kt,yt]),Ft=s.useCallback((Te,Ke,k)=>{if(!J||k==="single-row"){const lt=Te.findIndex(Zt=>Zt.prefix===Ke.prefix),Et=Te.map(Zt=>xt[Zt.widthKey]),Bt=Po(Te.length,Et);return{effectiveWidth:vr(Te.length,Et)[lt]??0,resolvedWidth:Bt[lt]??0,maxWidth:yn(lt,Bt)}}if(k==="two-row-top"){const lt=Te.filter(Zt=>Zt.prefix==="title1"),Et=lt.findIndex(Zt=>Zt.prefix===Ke.prefix),{resolved:Bt,effective:rn}=$i(lt,xt);return{effectiveWidth:rn[Et]??0,resolvedWidth:Bt[Et]??0,maxWidth:yn(Et,Bt)}}const oe=Te.filter(lt=>lt.prefix==="title2"||lt.prefix==="title3"),de=oe.findIndex(lt=>lt.prefix===Ke.prefix),{resolved:Ee,effective:Xe}=$i(oe,xt);return{effectiveWidth:Xe[de]??0,resolvedWidth:Ee[de]??0,maxWidth:yn(de,Ee)}},[xt,J]),ut=(Te,Ke,k)=>{const oe=Te.marginLeftKey?yt[Te.marginLeftKey]??0:0,{effectiveWidth:de,resolvedWidth:Ee,maxWidth:Xe}=k??Tt(Te,Ke),lt=Math.max(oe,ni),Et=o&&Ke==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":Te.prefix,style:{width:w(de),...oe>0?{marginLeft:w(oe)}:{}},children:[a.jsx("p",{className:Te.className,style:Te.style,children:Te.text}),Et&&Te.marginLeftKey?a.jsx("div",{"data-controls":Te.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ee),style:{position:"absolute",top:0,left:w(-oe),width:w(lt),height:"100%",pointerEvents:"auto"}}):null,Et?a.jsx("div",{"data-controls":Te.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Xe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:w(-Pn/2),width:w(Pn),height:"100%",pointerEvents:"auto"}}):null]},Te.className)},H=(Te="two-row")=>{const Ke=ke.findIndex(de=>de.prefix==="title1"),k=Ke>=0?rt[Ke]:xt.title1Width,oe=Te==="two-row"&&o;return a.jsx("div",{...oe?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(k)}:{},style:{width:w(q??0),flexShrink:0,alignSelf:"stretch",...oe?{pointerEvents:"auto"}:{}}})},Le=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:O,"aria-hidden":"true",children:" "}),je=()=>a.jsx("span",{className:`${e}-entry-counter`,style:le,"aria-live":"polite","aria-atomic":"true",children:mv(ye,ce,y,t)}),Fe=()=>At?o&&wt?a.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[je(),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}})]}):je():null,ft=()=>!At&&!wt?null:a.jsxs("div",{className:`${e}-titles-row-header-controls`,style:jt,children:[Fe(),wt?Lt():null]}),Ht=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[At||It?Le():null,zt?H("single-row"):null,Dt(pe),a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),ft(),xn()]}),gt=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[At||It?Le():null,zt?H("single-row"):null,a.jsxs("div",{className:`${e}-titles-row-titles`,style:xe&&R?{minHeight:R}:void 0,children:[a.jsx("div",{ref:et,className:Yt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Yn(X||pe)}),a.jsxs("div",{ref:tt,className:Yt,style:{position:xe?"absolute":"relative",inset:xe?0:void 0,width:"100%",...xe&&te?{width:te,maxWidth:"100%"}:void 0},children:[Ve&&xe?a.jsx("div",{className:`${Kt} ${e}-titles-fade-out`,children:Yn(Ve)}):null,a.jsx("div",{className:`${e}-titles-layer-in${xe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Yn(pe)})]})]}),ft(),xn()]}),Lt=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:F.scalingValue(D??0,i),height:F.scalingValue(D??0,i),marginRight:ae,"--close-icon-hover-color":T},children:[a.jsx("button",{ref:ve,type:"button",className:`${e}-close-icon-inner`,onClick:Ye,"aria-label":"Close",children:a.jsx(gn,{url:L??"",fill:E,hoverFill:i&&!r?E:T,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:ae,height:"100%",pointerEvents:"auto"}})]}),qt=(Te,Ke)=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[At||It?Le():null,zt?H("two-row"):null,Ke!==void 0?a.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:Ke},children:Te}):a.jsxs(a.Fragment,{children:[Te,a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),ft()]}),Dt=Te=>{if(!Te)return null;const Ke=wi(e,Te,O,re,N);return a.jsx(a.Fragment,{children:Ke.map(k=>ut(k,"single-row",Ft(Ke,k,"single-row")))})},an=Te=>{if(!Te)return null;const Ke=wi(e,Te,O,re,N),k=Ke.find(oe=>oe.prefix==="title1");return k?ut(k,"two-row-top",Ft(Ke,k,"two-row-top")):null},cn=(Te,Ke=!1)=>{const k=Te?wi(e,Te,O,re,N):[],oe=k.filter(Xe=>Xe.prefix==="title2"||Xe.prefix==="title3"),de=o&&Ke;return oe.length>0||de||(_??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[oe.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[oe.map(Xe=>ut(Xe,"two-row-bottom",Ft(k,Xe,"two-row-bottom"))),Ke&&o?a.jsxs(a.Fragment,{children:[Vo(),Go()]}):null]}):null,(_??0)>0||de?a.jsx("div",{"data-controls":de?"titleRowMarginBottom":void 0,"data-controls-axis":de?"y":void 0,"data-controls-reverse":de?"":void 0,className:de?`${e}-control`:void 0,style:{height:on,width:"100%",flexShrink:0,pointerEvents:de?"auto":"none"}}):null]}):null},qn=(Te,Ke=!1)=>a.jsxs(a.Fragment,{children:[qt(an(Te)),cn(Te,Ke)]}),Yn=Te=>J?a.jsx("div",{className:`${e}-titles-row-two-row`,children:qn(Te)}):Te?a.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Dt(Te)}):null,Qi=()=>{const Te=J?-1:ke.findIndex(oe=>oe.prefix==="title1"),Ke=!J&&(o||(q??0)>0)?(()=>{const oe=q??0,de=Te>=0?rt[Te]:xt.title1Width,Ee=Math.max(oe,ni);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(de),style:{position:"absolute",top:0,left:0,width:w(Ee),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,k=ke.flatMap((oe,de)=>{if(!oe.marginLeftKey)return[];const Ee=yt[oe.marginLeftKey]??0,Xe=Ju(ke,rt,yt,de)+Gt(),lt=Math.max(Ee,ni);return a.jsx("div",{"data-controls":oe.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(rt[de]),style:{position:"absolute",top:0,left:w(Xe),width:w(lt),height:"100%",pointerEvents:"auto"}},oe.marginLeftKey)});return Ke?[Ke,...k]:k},hn=()=>ke.map((Te,Ke)=>{const k=yn(Ke,rt),de=Ot(Ke)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Te.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(k),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:w(de),width:w(Pn),height:"100%",pointerEvents:"auto"}})},`${Te.widthKey}-junction`)}),Vo=()=>St.flatMap((Te,Ke)=>{if(!Te.marginLeftKey)return[];const k=yt[Te.marginLeftKey]??0,oe=kt(Ke),de=Math.max(k,ni),{resolvedWidth:Ee}=Tt(Te,"two-row-bottom");return a.jsx("div",{"data-controls":Te.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ee),style:{position:"absolute",top:0,left:w(oe),width:w(de),height:"100%",pointerEvents:"auto"}},Te.marginLeftKey)}),Go=()=>St.map((Te,Ke)=>{const{maxWidth:k}=Tt(Te,"two-row-bottom"),de=_t(Ke)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Te.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(k),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:w(de),width:w(Pn),height:"100%",pointerEvents:"auto"}})},`${Te.widthKey}-junction`)}),xn=()=>!o||J?null:a.jsxs(a.Fragment,{children:[Qi(),hn()]}),di=Te=>{const Ke=!Te.objectFit&&si(v);return{className:`${e}-slide-image-cell${Ke?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:I,maxHeight:A,...Ke?{"--image-aspect-ratio":ja(v)}:{}}}},Zi=Te=>Te.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":Te.objectFit}}:si(v)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},bn=Te=>{if(Te.length===0)return null;const Ke=Te.length>1,k=as(U),oe=`calc(-0.5 * (${k} + ${U}))`;if(Te.length===1){const de=Te[0];return a.jsx("div",{...di(de),children:a.jsx("img",{...Zi(de),src:de.url,alt:de.name??"",draggable:!1})})}return a.jsx("div",{className:`${e}-slide-inner`,style:Ke?{gap:U}:void 0,children:Te.map((de,Ee)=>a.jsxs("div",{...di(de),children:[a.jsx("img",{...Zi(de),src:de.url,alt:de.name??"",draggable:!1}),o&&Ke&&Ee<Te.length-1&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:oe,width:k,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${de.url}-${Ee}`))})},Kn=!!(pe!=null&&pe.title2||pe!=null&&pe.title3||Ve!=null&&Ve.title2||Ve!=null&&Ve.title3||(_??0)>0||o),Ji=()=>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:et,className:Yt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:qn(X||pe)}),a.jsxs("div",{ref:tt,className:`${e}-titles-row-two-row`,style:{...xe&&R?{minHeight:R}:void 0,...xe&&te?{width:te,maxWidth:"100%"}:void 0},children:[qt(a.jsxs("div",{className:Yt,style:{position:xe?"absolute":"relative",inset:xe?0:void 0,width:"100%"},children:[Ve&&xe?a.jsx("div",{className:`${Rt} ${e}-titles-fade-out`,children:an(Ve)}):null,a.jsx("div",{className:`${e}-titles-layer-in${xe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:an(pe)})]}),xe&&R?R:void 0),Kn?a.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[Ve&&xe?a.jsx("div",{className:`${Kt} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:cn(Ve)}):null,a.jsx("div",{className:`${e}-titles-layer-in${xe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${J?` ${e}-titles-layer-in-stacked`:""}`,children:cn(pe,!0)})]}):null]})]}),eo=()=>{const Te=Kn;return a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...Te?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:Te?void 0:{flex:"0 0 auto",height:"auto"},children:qn(pe,!0)}),xn()]})};return a.jsxs("div",{ref:Ge,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{st||Ye()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:wt?void 0:-1,style:{opacity:fe?1:0,transition:"opacity 300ms ease",pointerEvents:fe?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:g,...it}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:Be,...mt,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:Oe,onClick:Te=>Te.stopPropagation(),children:a.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":be&&ye.length>1?"true":"false",onPointerDown:be?Me:void 0,onPointerUp:be?nt:void 0,onPointerCancel:be?pt:void 0,children:a.jsxs("div",{className:`${e}-slide-stack`,children:[vt&&Q?a.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:Te=>{Te.target===Te.currentTarget&&Ne(ue)},children:a.jsx("div",{className:`${e}-slide-area`,children:bn(vt.images)})},`slide-out-${ue}`):null,a.jsx("div",{className:`${e}-slide-layer-in${Q?` ${e}-slide-fade-in`:""}`,children:a.jsx("div",{className:`${e}-slide-area`,children:se?bn(se.images):null})},`slide-in-${ue}-${ce}`)]})})}),a.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:Ae,children:[a.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:ie,width:"100%"}}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...J?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${J?` ${e}-lightbox-content-area-stacked`:""}`,children:Vt&&a.jsx("div",{className:`${e}-text-bar-cell${J?` ${e}-text-bar-cell-stacked`:""}`,style:J?void 0:{flex:1,minWidth:0,width:"100%"},children:J?M==="fade"?Ji():eo():M==="fade"?gt():Ht()})})})]})]})]})};function Qx(e){return`
15284
15284
  .${e}-wrapper {
15285
15285
  position: relative;
15286
15286
  width: 100%;
@@ -15802,7 +15802,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
15802
15802
  pointer-events: auto;
15803
15803
  z-index: 10;
15804
15804
  }
15805
- `}const Zx=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r,metadata:l})=>{const{prefix:c}=F.useScopedStyles(),d=(l==null?void 0:l.itemId)??null,{cover:u,coverFit:p,type:y}=e,v=s.useRef(null),[g,m]=s.useState(!1),[x,b]=s.useState(0),R=s.useRef(!1),f=s.useRef(!1),S=s.useRef(!1),W=s.useMemo(()=>(t??[]).filter($=>Lo($).length>0),[t]),q=g&&W.length>0,z=!n,P=s.useCallback(()=>{z&&(S.current=!0,cv(f.current,d),f.current=!1)},[z,d]),_=($=0)=>{if(W.length===0||n&&!i&&!o)return;const L=pa(W,y),D=Math.max(0,Math.min($,L.length-1));if(b(D),z){const E=Qu();Ku(D+1,d,E),f.current=!E}m(!0)},G=s.useCallback(()=>{m(!1),S.current=!1},[]);return s.useEffect(()=>{!n||i||o||m(!1)},[n,i,o]),s.useEffect(()=>{if(!z||typeof window>"u")return;const $=window.history.scrollRestoration;return window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration=$}},[z]),s.useEffect(()=>{if(!z||R.current)return;R.current=!0;const $=kc(d);if(!$)return;const L=Ac($,pa(W,y).length);L<0||(b(L),m(!0))},[W,d,z,y]),s.useEffect(()=>{if(!z)return;const $=()=>{if(S.current){S.current=!1,m(!1);return}const L=kc(d);if(!L){m(!1);return}const D=Ac(L,pa(W,y).length);if(D<0){m(!1);return}f.current=!1,b(D),m(!0)};return window.addEventListener("popstate",$),()=>window.removeEventListener("popstate",$)},[W,d,z,y]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:v,className:`${c}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Qx(c)}}),u?a.jsx("button",{type:"button",className:`${c}-cover ${si(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,...si(p)?{"--image-aspect-ratio":ja(p)}:{}},"aria-label":"Open journal gallery",children:a.jsx("img",{className:`${c}-cover-image ${si(p)?`${c}-cover-image-cover`:`${c}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),q&&typeof document<"u"&&(()=>{const $=(r?document.getElementById(r):null)??document.body;return Xn.createPortal(a.jsx(Kx,{prefix:c,entries:W,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:x,enableUrlSync:z,journalItemId:d,onBeforeClose:P,onClose:G}),$)})()]})},Jx=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
15805
+ `}const Zx=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r,metadata:l})=>{const{prefix:c}=F.useScopedStyles(),d=(l==null?void 0:l.itemId)??null,{cover:u,coverFit:p,type:y}=e,v=s.useRef(null),[g,m]=s.useState(!1),[x,b]=s.useState(0),M=s.useRef(!1),f=s.useRef(!1),S=s.useRef(!1),W=s.useMemo(()=>(t??[]).filter($=>Lo($).length>0),[t]),q=g&&W.length>0,z=!n,P=s.useCallback(()=>{z&&(S.current=!0,cv(f.current,d),f.current=!1)},[z,d]),_=($=0)=>{if(W.length===0||n&&!i&&!o)return;const L=pa(W,y),D=Math.max(0,Math.min($,L.length-1));if(b(D),z){const E=Qu();Ku(D+1,d,E),f.current=!E}m(!0)},G=s.useCallback(()=>{m(!1),S.current=!1},[]);return s.useEffect(()=>{!n||i||o||m(!1)},[n,i,o]),s.useEffect(()=>{if(!z||typeof window>"u")return;const $=window.history.scrollRestoration;return window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration=$}},[z]),s.useEffect(()=>{if(!z||M.current)return;M.current=!0;const $=kc(d);if(!$)return;const L=Ac($,pa(W,y).length);L<0||(b(L),m(!0))},[W,d,z,y]),s.useEffect(()=>{if(!z)return;const $=()=>{if(S.current){S.current=!1,m(!1);return}const L=kc(d);if(!L){m(!1);return}const D=Ac(L,pa(W,y).length);if(D<0){m(!1);return}f.current=!1,b(D),m(!0)};return window.addEventListener("popstate",$),()=>window.removeEventListener("popstate",$)},[W,d,z,y]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:v,className:`${c}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Qx(c)}}),u?a.jsx("button",{type:"button",className:`${c}-cover ${si(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,...si(p)?{"--image-aspect-ratio":ja(p)}:{}},"aria-label":"Open journal gallery",children:a.jsx("img",{className:`${c}-cover-image ${si(p)?`${c}-cover-image-cover`:`${c}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),q&&typeof document<"u"&&(()=>{const $=(r?document.getElementById(r):null)??document.body;return Xn.createPortal(a.jsx(Kx,{prefix:c,entries:W,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:x,enableUrlSync:z,journalItemId:d,onBeforeClose:P,onClose:G}),$)})()]})},Jx=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
15806
15806
  import { createPortal } from 'react-dom';
15807
15807
  import { CommonComponentProps } from '../props';
15808
15808
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -16567,7 +16567,7 @@ export type LightboxJournalSettings = {
16567
16567
  closeIconColor: string;
16568
16568
  closeIconHoverColor: string;
16569
16569
  };
16570
- `,eb="01M3SBP3P8CMVMM1ZZ0QVD2PPF",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",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[bt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSettings")]={...Wi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSize")]={...Wi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[bt(e,"lineHeight")]={...Wi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[bt(e,"letterSpacing")]={...Wi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[bt(e,"wordSpacing")]={...Wi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[bt(e,"textAlign")]={...Wi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[bt(e,"textAppearance")]={...Wi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const nb=Pi.reduce((e,t)=>({...e,...tb(t)}),{}),ib=Pi.reduce((e,t)=>({...e,[bt(t,"fontFamily")]:"Goudy Bookletter 1911",[bt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[bt(t,"letterSpacing")]:0,[bt(t,"wordSpacing")]:0,[bt(t,"textAlign")]:"left",[bt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ys(e){return Pi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[bt(n,"fontSize")]=i),o!==void 0&&(t[bt(n,"lineHeight")]=o),t},{})}const ob=fv(),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"}}},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"}},...nb,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:eb,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...ib,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:[ob]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","countColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemWithoutImage:!0},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",max:2,display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}}},default:[{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"contain"},{url:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"contain"},{url:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"contain"}]}]}},ab={element:Zx,id:"lightbox-journal",name:"Journal",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"01M3QM74XFFQ85SY5E1KBMNE0F"},schema:rb,sourceCode:Jx,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0},{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[...Pi.map(e=>({path:`${bt(e,"fontFamily")}`}))]},fontRelations:{...Pi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${bt(t,"fontFamily")}`}),{})}},sb={sizeType:"custom",value:700,min:400,max:700};function Ca(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 ad(e,t,n,i){const{heightPx:o}=Ca(n,i);return qs(e/2,t/2,e,t,n,o)}function fp(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 lb(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":fp(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 cb(e){return`
16570
+ `,eb="01M3SBP3P8CMVMM1ZZ0QVD2PPF",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",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[bt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSettings")]={...Wi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSize")]={...Wi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[bt(e,"lineHeight")]={...Wi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[bt(e,"letterSpacing")]={...Wi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[bt(e,"wordSpacing")]={...Wi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[bt(e,"textAlign")]={...Wi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[bt(e,"textAppearance")]={...Wi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const nb=Pi.reduce((e,t)=>({...e,...tb(t)}),{}),ib=Pi.reduce((e,t)=>({...e,[bt(t,"fontFamily")]:"Goudy Bookletter 1911",[bt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[bt(t,"letterSpacing")]:0,[bt(t,"wordSpacing")]:0,[bt(t,"textAlign")]:"left",[bt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ys(e){return Pi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[bt(n,"fontSize")]=i),o!==void 0&&(t[bt(n,"lineHeight")]=o),t},{})}const ob=fv(),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"}}},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"}},...nb,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:eb,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...ib,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:[ob]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","countColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemWithoutImage:!0},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",max:2,display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}}},default:[{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"contain"},{url:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"contain"},{url:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"contain"}]}]}},ab={element:Zx,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:rb,sourceCode:Jx,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0},{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[...Pi.map(e=>({path:`${bt(e,"fontFamily")}`}))]},fontRelations:{...Pi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${bt(t,"fontFamily")}`}),{})}},sb={sizeType:"custom",value:700,min:400,max:700};function Ca(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 ad(e,t,n,i){const{heightPx:o}=Ca(n,i);return qs(e/2,t/2,e,t,n,o)}function fp(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 lb(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":fp(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 cb(e){return`
16571
16571
  .${e}-root {
16572
16572
  position: absolute;
16573
16573
  top: 0;
@@ -16602,7 +16602,7 @@ export type LightboxJournalSettings = {
16602
16602
  width: 32px;
16603
16603
  height: 32px;
16604
16604
  }
16605
- `}function db(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 ub(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await db(i)]));return new Map(n)}function pb({settings:e,content:t=[],isEditor:n}){const{prefix:i}=F.useScopedStyles(),[o,r]=s.useState(null),[l,c]=s.useState([]),[d,u]=s.useState(0),p=s.useRef(0),[y,v]=s.useState({x:0,y:0}),[g,m]=s.useState("none"),x=s.useRef({x:0,y:0}),[b,R]=s.useState(!1),[f,S]=s.useState(!1),W=s.useRef(new Map),{imageSize:q=sb,cursor:z="system",target:P="area",position:_="random",visible:G="all",defaultCursor:$=null,hoverCursor:L=null}=e,D=t.filter(M=>{var A;return!!((A=M==null?void 0:M.image)!=null&&A.url)}),E=s.useMemo(()=>cb(i),[i]),T=s.useCallback((M,A,j=l)=>{if(!o)return;const ie=o.getBoundingClientRect(),ae=M-ie.left,O=A-ie.top;v({x:ae,y:O}),m(lb(ae,O,j,o,z,P,L,$))},[o,l,z,P,L,$]);s.useEffect(()=>{const M=[...D.map(j=>j.image.url),$,L].filter(j=>!!j);if(M.length===0){W.current=new Map,S(!0);return}let A=!1;return S(!1),ub(M).then(j=>{A||(W.current=j,S(!0))}),()=>{A=!0}},[t,$,L]),s.useEffect(()=>{if(!o)return;const M=j=>{j.stopPropagation(),x.current={x:j.clientX,y:j.clientY},T(j.clientX,j.clientY)},A=()=>{b&&T(x.current.x,x.current.y)};return o.addEventListener("mousemove",M),window.addEventListener("scroll",A,!0),()=>{o.removeEventListener("mousemove",M),window.removeEventListener("scroll",A,!0)}},[o,b,T]),s.useEffect(()=>{!o||!b||T(x.current.x,x.current.y)},[l,o,b,T]),s.useEffect(()=>{b||m("none")},[b]);const C=(M,A,j,ie={})=>{var J,be;if(!((J=M==null?void 0:M.image)!=null&&J.url))return null;const ae=((be=W.current.get(M.image.url))==null?void 0:be.aspectRatio)??1,O=sd(M.image.url,q,W.current),{heightPx:re}=Ca(O,ae);let N=0,le=0;return _==="same"?{x:N,y:le}=ad(A,j,O,ae):(N=ie.x??Math.random()*A,le=ie.y??Math.random()*j,{x:N,y:le}=qs(N,le,A,j,O,re)),{id:p.current++,url:M.image.url,link:M.link,name:M.image.name,x:N,y:le,xRatio:N/A,yRatio:le/j,aspectRatio:ae,widthPx:O}},V=()=>{if(!o)return;const M=o.getBoundingClientRect(),A=M.width,j=M.height;A===0||j===0||c(ie=>ie.length===0?ie:ie.map(ae=>{const O=q.sizeType==="random"?ae.widthPx:sd(ae.url,q,W.current),{heightPx:re}=Ca(O,ae.aspectRatio);if(_==="same"){const{x:J,y:be}=ad(A,j,O,ae.aspectRatio);return{...ae,x:J,y:be,widthPx:O}}const{x:N,y:le}=qs(ae.xRatio*A,ae.yRatio*j,A,j,O,re);return{...ae,x:N,y:le,widthPx:O}}))};s.useEffect(()=>{if(!o||D.length===0||!f)return;const M=o.getBoundingClientRect(),A=M.width,j=M.height,ie=C(D[0],A,j);ie&&(c([ie]),u(D.length>1?1:0))},[q,_,o,t,f]),s.useEffect(()=>{if(!o)return;V();const M=new ResizeObserver(V);return M.observe(o),window.addEventListener("resize",V),()=>{M.disconnect(),window.removeEventListener("resize",V)}},[o,_,q,l.length]),s.useEffect(()=>{G==="last One"&&c(M=>M.length>0?[M[M.length-1]]:[])},[G]);const w=M=>{if(!o||D.length===0||!f)return;const A=o.getBoundingClientRect(),j=M.clientX-A.left,ie=M.clientY-A.top;if(P==="image"&&!fp(j,ie,l))return;let ae=0,O=0;_==="on Click"?(ae=j,O=ie):_==="same"?(ae=A.width/2,O=A.height/2):(ae=Math.random()*A.width,O=Math.random()*A.height);const re=D[d%D.length],N=C(re,A.width,A.height,{x:ae,y:O});if(!N)return;const le=G==="all"?[...l,N]:[N];c(le),u(J=>(J+1)%D.length),T(M.clientX,M.clientY,le)},U=z==="custom"&&g!=="none";return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:E}}),a.jsxs("div",{ref:r,onClick:w,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),className:`${i}-root`,style:{cursor:U?"none":"default"},children:[l.map(M=>a.jsx("div",{className:`${i}-wrapper`,style:{top:`${M.y}px`,left:`${M.x}px`,width:`${M.widthPx}px`,cursor:U?"none":"default"},children:P==="area"&&M.link?a.jsx("a",{href:M.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:a.jsx("img",{src:M.url,alt:M.name,className:`${i}-image`})}):a.jsx("img",{src:M.url,alt:M.name,className:`${i}-image`})},M.id)),b&&U&&a.jsx("div",{className:`${i}-cursor`,style:{left:`${y.x}px`,top:`${y.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${g}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const gb=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
16605
+ `}function db(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 ub(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await db(i)]));return new Map(n)}function pb({settings:e,content:t=[],isEditor:n}){const{prefix:i}=F.useScopedStyles(),[o,r]=s.useState(null),[l,c]=s.useState([]),[d,u]=s.useState(0),p=s.useRef(0),[y,v]=s.useState({x:0,y:0}),[g,m]=s.useState("none"),x=s.useRef({x:0,y:0}),[b,M]=s.useState(!1),[f,S]=s.useState(!1),W=s.useRef(new Map),{imageSize:q=sb,cursor:z="system",target:P="area",position:_="random",visible:G="all",defaultCursor:$=null,hoverCursor:L=null}=e,D=t.filter(I=>{var A;return!!((A=I==null?void 0:I.image)!=null&&A.url)}),E=s.useMemo(()=>cb(i),[i]),T=s.useCallback((I,A,j=l)=>{if(!o)return;const ie=o.getBoundingClientRect(),ae=I-ie.left,O=A-ie.top;v({x:ae,y:O}),m(lb(ae,O,j,o,z,P,L,$))},[o,l,z,P,L,$]);s.useEffect(()=>{const I=[...D.map(j=>j.image.url),$,L].filter(j=>!!j);if(I.length===0){W.current=new Map,S(!0);return}let A=!1;return S(!1),ub(I).then(j=>{A||(W.current=j,S(!0))}),()=>{A=!0}},[t,$,L]),s.useEffect(()=>{if(!o)return;const I=j=>{j.stopPropagation(),x.current={x:j.clientX,y:j.clientY},T(j.clientX,j.clientY)},A=()=>{b&&T(x.current.x,x.current.y)};return o.addEventListener("mousemove",I),window.addEventListener("scroll",A,!0),()=>{o.removeEventListener("mousemove",I),window.removeEventListener("scroll",A,!0)}},[o,b,T]),s.useEffect(()=>{!o||!b||T(x.current.x,x.current.y)},[l,o,b,T]),s.useEffect(()=>{b||m("none")},[b]);const C=(I,A,j,ie={})=>{var J,be;if(!((J=I==null?void 0:I.image)!=null&&J.url))return null;const ae=((be=W.current.get(I.image.url))==null?void 0:be.aspectRatio)??1,O=sd(I.image.url,q,W.current),{heightPx:re}=Ca(O,ae);let N=0,le=0;return _==="same"?{x:N,y:le}=ad(A,j,O,ae):(N=ie.x??Math.random()*A,le=ie.y??Math.random()*j,{x:N,y:le}=qs(N,le,A,j,O,re)),{id:p.current++,url:I.image.url,link:I.link,name:I.image.name,x:N,y:le,xRatio:N/A,yRatio:le/j,aspectRatio:ae,widthPx:O}},V=()=>{if(!o)return;const I=o.getBoundingClientRect(),A=I.width,j=I.height;A===0||j===0||c(ie=>ie.length===0?ie:ie.map(ae=>{const O=q.sizeType==="random"?ae.widthPx:sd(ae.url,q,W.current),{heightPx:re}=Ca(O,ae.aspectRatio);if(_==="same"){const{x:J,y:be}=ad(A,j,O,ae.aspectRatio);return{...ae,x:J,y:be,widthPx:O}}const{x:N,y:le}=qs(ae.xRatio*A,ae.yRatio*j,A,j,O,re);return{...ae,x:N,y:le,widthPx:O}}))};s.useEffect(()=>{if(!o||D.length===0||!f)return;const I=o.getBoundingClientRect(),A=I.width,j=I.height,ie=C(D[0],A,j);ie&&(c([ie]),u(D.length>1?1:0))},[q,_,o,t,f]),s.useEffect(()=>{if(!o)return;V();const I=new ResizeObserver(V);return I.observe(o),window.addEventListener("resize",V),()=>{I.disconnect(),window.removeEventListener("resize",V)}},[o,_,q,l.length]),s.useEffect(()=>{G==="last One"&&c(I=>I.length>0?[I[I.length-1]]:[])},[G]);const w=I=>{if(!o||D.length===0||!f)return;const A=o.getBoundingClientRect(),j=I.clientX-A.left,ie=I.clientY-A.top;if(P==="image"&&!fp(j,ie,l))return;let ae=0,O=0;_==="on Click"?(ae=j,O=ie):_==="same"?(ae=A.width/2,O=A.height/2):(ae=Math.random()*A.width,O=Math.random()*A.height);const re=D[d%D.length],N=C(re,A.width,A.height,{x:ae,y:O});if(!N)return;const le=G==="all"?[...l,N]:[N];c(le),u(J=>(J+1)%D.length),T(I.clientX,I.clientY,le)},U=z==="custom"&&g!=="none";return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:E}}),a.jsxs("div",{ref:r,onClick:w,onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),className:`${i}-root`,style:{cursor:U?"none":"default"},children:[l.map(I=>a.jsx("div",{className:`${i}-wrapper`,style:{top:`${I.y}px`,left:`${I.x}px`,width:`${I.widthPx}px`,cursor:U?"none":"default"},children:P==="area"&&I.link?a.jsx("a",{href:I.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:a.jsx("img",{src:I.url,alt:I.name,className:`${i}-image`})}):a.jsx("img",{src:I.url,alt:I.name,className:`${i}-image`})},I.id)),b&&U&&a.jsx("div",{className:`${i}-cursor`,style:{left:`${y.x}px`,top:`${y.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${g}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const gb=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
16606
16606
  import { CommonComponentProps } from '../props';
16607
16607
  import { useScopedStyles } from '../utils/index';
16608
16608
 
@@ -17132,7 +17132,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
17132
17132
  </>
17133
17133
  );
17134
17134
  }
17135
- `,mb={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{url:"01M3QM74XESYN1HRYH9VRTZ5CK",name:"Slider-1.png"},link:""},{image:{url:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"Slider-2.png"},link:""},{image:{url:"01M3QM74XEE2101QD8PM6E4JSA",name:"Slider-3.png"},link:""},{image:{url:"01M3QM74XE20C38X4NND20C5R4",name:"Slider-4.png"},link:""},{image:{url:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"Slider-5.png"},link:""},{image:{url:"01M3QM74XEBS5231QA4355P4VQ",name:"Slider-6.png"},link:""},{image:{url:"01M3QM74XEWT5YM43KF6PEYRCV",name:"Slider-7.png"},link:""}]},settings:{sizing:"manual",properties:{imageSize:{type:"object",scope:"layout",title:"Img Size",display:{type:"toggle-cycle-numeric-input",enum:["custom","as is","random"],inputs:{custom:"single","as is":"none",random:"range"},defaultValue:700,defaultMin:400,defaultMax:700},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},cursor:{type:"string",scope:"common",title:"Cursor",display:{type:"toggle-cycle",enum:["system","custom"]}},target:{type:"string",scope:"common",title:"Target",display:{type:"toggle-cycle",enum:["area","image"]}},position:{type:"string",scope:"common",title:"Position",display:{type:"toggle-cycle",enum:["random","same","on Click"]}},visible:{type:"string",scope:"common",title:"Visible",display:{type:"toggle-cycle",enum:["all","last One"]}},defaultCursor:{type:["string","null"],scope:"common",title:"Default",display:{type:"settings-image-input",visible:!1}},hoverCursor:{type:["string","null"],scope:"common",title:"Hover",display:{type:"settings-image-input",visible:!1}}},defaults:{imageSize:{sizeType:"custom",value:700,min:400,max:700},cursor:"system",target:"area",position:"random",visible:"all",defaultCursor:null,hoverCursor:null},layoutDefaults:{m:{imageSize:{sizeType:"custom",value:500,min:400,max:700}},t:{imageSize:{sizeType:"custom",value:600,min:400,max:700}},d:{imageSize:{sizeType:"custom",value:700,min:400,max:700}}},displayRules:[{if:{name:"cursor",value:"custom"},then:{name:"properties.defaultCursor.display.visible",value:!0}},{if:{name:"cursor",value:"custom"},then:{name:"properties.hoverCursor.display.visible",value:!0}}],layout:["__componentName__","imageSize","cursor","target","position","visible","defaultCursor","hoverCursor"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["imageSize"]},{type:"row",title:"",items:["cursor","target"]},{type:"row",title:"",items:["position","visible"]},{type:"row",title:"Custom Cursor",items:["defaultCursor","hoverCursor"]}]}]},hb={element:pb,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:"01M3QM74XEPYV09AFGKHG6H1ZQ"},schema:mb,sourceCode:gb,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"defaultCursor"},{path:"hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]}},fb=100,yb=70,hi="cubic-bezier(0.86, 0, 0.07, 1)";function vb(e){return`
17135
+ `,mb={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{url:"01M3QM74XESYN1HRYH9VRTZ5CK",name:"Slider-1.png"},link:""},{image:{url:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"Slider-2.png"},link:""},{image:{url:"01M3QM74XEE2101QD8PM6E4JSA",name:"Slider-3.png"},link:""},{image:{url:"01M3QM74XE20C38X4NND20C5R4",name:"Slider-4.png"},link:""},{image:{url:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"Slider-5.png"},link:""},{image:{url:"01M3QM74XEBS5231QA4355P4VQ",name:"Slider-6.png"},link:""},{image:{url:"01M3QM74XEWT5YM43KF6PEYRCV",name:"Slider-7.png"},link:""}]},settings:{sizing:"manual",properties:{imageSize:{type:"object",scope:"layout",title:"Img Size",display:{type:"toggle-cycle-numeric-input",enum:["custom","as is","random"],inputs:{custom:"single","as is":"none",random:"range"},defaultValue:700,defaultMin:400,defaultMax:700},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},cursor:{type:"string",scope:"common",title:"Cursor",display:{type:"toggle-cycle",enum:["system","custom"]}},target:{type:"string",scope:"common",title:"Target",display:{type:"toggle-cycle",enum:["area","image"]}},position:{type:"string",scope:"common",title:"Position",display:{type:"toggle-cycle",enum:["random","same","on Click"]}},visible:{type:"string",scope:"common",title:"Visible",display:{type:"toggle-cycle",enum:["all","last One"]}},defaultCursor:{type:["string","null"],scope:"common",title:"Default",display:{type:"settings-image-input",visible:!1}},hoverCursor:{type:["string","null"],scope:"common",title:"Hover",display:{type:"settings-image-input",visible:!1}}},defaults:{imageSize:{sizeType:"custom",value:700,min:400,max:700},cursor:"system",target:"area",position:"random",visible:"all",defaultCursor:null,hoverCursor:null},layoutDefaults:{m:{imageSize:{sizeType:"custom",value:500,min:400,max:700}},t:{imageSize:{sizeType:"custom",value:600,min:400,max:700}},d:{imageSize:{sizeType:"custom",value:700,min:400,max:700}}},displayRules:[{if:{name:"cursor",value:"custom"},then:{name:"properties.defaultCursor.display.visible",value:!0}},{if:{name:"cursor",value:"custom"},then:{name:"properties.hoverCursor.display.visible",value:!0}}],layout:["__componentName__","imageSize","cursor","target","position","visible","defaultCursor","hoverCursor"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["imageSize"]},{type:"row",title:"",items:["cursor","target"]},{type:"row",title:"",items:["position","visible"]},{type:"row",title:"Custom Cursor",items:["defaultCursor","hoverCursor"]}]}]},hb={element:pb,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:mb,sourceCode:gb,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"defaultCursor"},{path:"hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]}},fb=100,yb=70,hi="cubic-bezier(0.86, 0, 0.07, 1)";function vb(e){return`
17136
17136
  .${e}-wrapper {
17137
17137
  position: relative;
17138
17138
  width: 100%;
@@ -17242,7 +17242,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
17242
17242
  display: block;
17243
17243
  pointer-events: none;
17244
17244
  }
17245
- `}function xb(e){return e==="blur"?yb:e==="greyscale"?fb:0}function Ko(e,t=1,n=1){const i=xb(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 bb(e,t){return t<=1?0:(e-1+t)%t}function Sb(e,t=1){return!e||e.height===0?t:e.width/e.height}function wb(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 yp(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function dd(e,t,n){return{...yp(e),[`--${n}-stage-scale`]:t}}function $b(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 Cb({settings:e,content:t,isEditor:n,isPreviewMode:i}){var Ce,h,Y,Q,ne,ue,B;const{prefix:o}=F.useScopedStyles(),r=s.useMemo(()=>vb(o),[o]),{imageSize:l,maxWidth:c,maxHeight:d,transition:u=1e3,bgImage:p="greyscale"}=e,y=t??[],v=ld(y.length),[g,m]=s.useState(v.activeIndex),[x,b]=s.useState(v.backgroundIndex),[R,f]=s.useState(!1),[S,W]=s.useState(!1),[q,z]=s.useState(null),[P,_]=s.useState(null),[G,$]=s.useState(0),[L,D]=s.useState(1),[E,T]=s.useState("none"),[C,V]=s.useState("next"),[w,U]=s.useState({}),[M,A]=s.useState({width:0,height:0}),j=s.useRef(null),ie=s.useRef(null),ae=!n||!!i,O=l??60,re=Math.max(10,Math.min(100,c??O)),N=Math.max(10,Math.min(100,d??O)),le=Math.max(100,u),J=Ko(p),be=s.useCallback(I=>{const ee=Sb(I?w[I]:void 0);return wb(M.width,M.height,ee,re,N)},[M.height,M.width,w,N,re]);s.useEffect(()=>{const I=ie.current;if(!I)return;const ee=new ResizeObserver(([te])=>{const{width:ge,height:X}=te.contentRect;A({width:ge,height:X})});return ee.observe(I),()=>ee.disconnect()},[]),s.useEffect(()=>{const I=(t??[]).map(ee=>{var te;return(te=ee.image)==null?void 0:te.url}).filter(ee=>!!ee);$b(I,(ee,te)=>{U(ge=>{var X,Me;return((X=ge[ee])==null?void 0:X.width)===te.width&&((Me=ge[ee])==null?void 0:Me.height)===te.height?ge:{...ge,[ee]:te}})})},[t]),s.useEffect(()=>{const{backgroundIndex:I,activeIndex:ee}=ld(y.length);m(ee),b(I),f(!1),W(!1),z(null),_(null),$(0),D(1),T("none"),V("next")},[y.length,t]),s.useEffect(()=>()=>{j.current&&clearTimeout(j.current)},[]);const Pe=s.useCallback(I=>{var Se,Z,He,We;if(!ae||R||y.length<=1)return;const ee=I==="next"?(g+1)%y.length:(g-1+y.length)%y.length,te=be((Z=(Se=y[g])==null?void 0:Se.image)==null?void 0:Z.url),ge=be((We=(He=y[ee])==null?void 0:He.image)==null?void 0:We.url),X=cd(M.width,M.height,te),Me=cd(M.width,M.height,ge);j.current&&clearTimeout(j.current),V(I),W(!0),f(!0),I==="next"?(z(g),_(ee),$(0),D(1),T(Ko(p,0,1))):(b(bb(ee,y.length)),z(ee),_(g),$(1),D(Me),T(Ko(p,1,Me))),requestAnimationFrame(()=>{W(!1),requestAnimationFrame(()=>{I==="next"?($(1),D(X),T(Ko(p,1,X))):($(0),D(1),T(Ko(p,0,1)))})}),j.current=setTimeout(()=>{I==="next"&&b(g),m(ee),z(null),_(null),f(!1)},le)},[g,p,M.height,M.width,be,R,ae,y,le]),ye=y[g],ce=x!==null?y[x]:null,K=q!==null?y[q]:null,se=P!==null?y[P]:null,pe=y.length<=1?0:(g-1+y.length)%y.length,fe=y.length<=1?0:(g+1)%y.length,we=be((Ce=ye==null?void 0:ye.image)==null?void 0:Ce.url),Ie=be((h=K==null?void 0:K.image)==null?void 0:h.url),me=be((Y=se==null?void 0:se.image)==null?void 0:Y.url),xe={[`--${o}-transition-ms`]:`${le}ms`};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:r}}),a.jsxs("div",{ref:ie,className:Ct(`${o}-wrapper`,S&&`${o}-snap`,n&&!i&&`${o}-editor`),style:xe,"aria-label":"Zoom gallery",children:[((Q=ce==null?void 0:ce.image)==null?void 0:Q.url)&&a.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:ce.image.url,alt:"",style:{filter:J}})}),R&&((ne=K==null?void 0:K.image)==null?void 0:ne.url)&&a.jsx("div",{className:Ct(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${C}`),style:dd(Ie,L,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:K.image.url,alt:"",style:{filter:E}})}),R&&((ue=se==null?void 0:se.image)==null?void 0:ue.url)&&a.jsx("div",{className:Ct(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${C}`),style:dd(me,G,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-image`,src:se.image.url,alt:""})}),!R&&((B=ye==null?void 0:ye.image)==null?void 0:B.url)&&a.jsx("div",{className:Ct(`${o}-stage`,`${o}-foreground`),style:yp(we),children:a.jsx("img",{className:`${o}-image`,src:ye.image.url,alt:ye.image.name??""})}),ae&&y.length>1&&!R&&a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:Ct(`${o}-nav`,`${o}-nav-prev`),onClick:()=>Pe("prev"),"aria-label":`Show previous image (${pe+1} of ${y.length})`}),a.jsx("button",{type:"button",className:Ct(`${o}-nav`,`${o}-nav-next`),onClick:()=>Pe("next"),"aria-label":`Show next image (${fe+1} of ${y.length})`})]})]})]})}const Tb=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17245
+ `}function xb(e){return e==="blur"?yb:e==="greyscale"?fb:0}function Ko(e,t=1,n=1){const i=xb(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 bb(e,t){return t<=1?0:(e-1+t)%t}function Sb(e,t=1){return!e||e.height===0?t:e.width/e.height}function wb(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 yp(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function dd(e,t,n){return{...yp(e),[`--${n}-stage-scale`]:t}}function $b(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 Cb({settings:e,content:t,isEditor:n,isPreviewMode:i}){var Ce,h,Y,Q,ne,ue,B;const{prefix:o}=F.useScopedStyles(),r=s.useMemo(()=>vb(o),[o]),{imageSize:l,maxWidth:c,maxHeight:d,transition:u=1e3,bgImage:p="greyscale"}=e,y=t??[],v=ld(y.length),[g,m]=s.useState(v.activeIndex),[x,b]=s.useState(v.backgroundIndex),[M,f]=s.useState(!1),[S,W]=s.useState(!1),[q,z]=s.useState(null),[P,_]=s.useState(null),[G,$]=s.useState(0),[L,D]=s.useState(1),[E,T]=s.useState("none"),[C,V]=s.useState("next"),[w,U]=s.useState({}),[I,A]=s.useState({width:0,height:0}),j=s.useRef(null),ie=s.useRef(null),ae=!n||!!i,O=l??60,re=Math.max(10,Math.min(100,c??O)),N=Math.max(10,Math.min(100,d??O)),le=Math.max(100,u),J=Ko(p),be=s.useCallback(R=>{const ee=Sb(R?w[R]:void 0);return wb(I.width,I.height,ee,re,N)},[I.height,I.width,w,N,re]);s.useEffect(()=>{const R=ie.current;if(!R)return;const ee=new ResizeObserver(([te])=>{const{width:ge,height:X}=te.contentRect;A({width:ge,height:X})});return ee.observe(R),()=>ee.disconnect()},[]),s.useEffect(()=>{const R=(t??[]).map(ee=>{var te;return(te=ee.image)==null?void 0:te.url}).filter(ee=>!!ee);$b(R,(ee,te)=>{U(ge=>{var X,Ie;return((X=ge[ee])==null?void 0:X.width)===te.width&&((Ie=ge[ee])==null?void 0:Ie.height)===te.height?ge:{...ge,[ee]:te}})})},[t]),s.useEffect(()=>{const{backgroundIndex:R,activeIndex:ee}=ld(y.length);m(ee),b(R),f(!1),W(!1),z(null),_(null),$(0),D(1),T("none"),V("next")},[y.length,t]),s.useEffect(()=>()=>{j.current&&clearTimeout(j.current)},[]);const Pe=s.useCallback(R=>{var Se,Z,He,We;if(!ae||M||y.length<=1)return;const ee=R==="next"?(g+1)%y.length:(g-1+y.length)%y.length,te=be((Z=(Se=y[g])==null?void 0:Se.image)==null?void 0:Z.url),ge=be((We=(He=y[ee])==null?void 0:He.image)==null?void 0:We.url),X=cd(I.width,I.height,te),Ie=cd(I.width,I.height,ge);j.current&&clearTimeout(j.current),V(R),W(!0),f(!0),R==="next"?(z(g),_(ee),$(0),D(1),T(Ko(p,0,1))):(b(bb(ee,y.length)),z(ee),_(g),$(1),D(Ie),T(Ko(p,1,Ie))),requestAnimationFrame(()=>{W(!1),requestAnimationFrame(()=>{R==="next"?($(1),D(X),T(Ko(p,1,X))):($(0),D(1),T(Ko(p,0,1)))})}),j.current=setTimeout(()=>{R==="next"&&b(g),m(ee),z(null),_(null),f(!1)},le)},[g,p,I.height,I.width,be,M,ae,y,le]),ye=y[g],ce=x!==null?y[x]:null,K=q!==null?y[q]:null,se=P!==null?y[P]:null,pe=y.length<=1?0:(g-1+y.length)%y.length,fe=y.length<=1?0:(g+1)%y.length,we=be((Ce=ye==null?void 0:ye.image)==null?void 0:Ce.url),Re=be((h=K==null?void 0:K.image)==null?void 0:h.url),me=be((Y=se==null?void 0:se.image)==null?void 0:Y.url),xe={[`--${o}-transition-ms`]:`${le}ms`};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:r}}),a.jsxs("div",{ref:ie,className:Ct(`${o}-wrapper`,S&&`${o}-snap`,n&&!i&&`${o}-editor`),style:xe,"aria-label":"Zoom gallery",children:[((Q=ce==null?void 0:ce.image)==null?void 0:Q.url)&&a.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:ce.image.url,alt:"",style:{filter:J}})}),M&&((ne=K==null?void 0:K.image)==null?void 0:ne.url)&&a.jsx("div",{className:Ct(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${C}`),style:dd(Re,L,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:K.image.url,alt:"",style:{filter:E}})}),M&&((ue=se==null?void 0:se.image)==null?void 0:ue.url)&&a.jsx("div",{className:Ct(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${C}`),style:dd(me,G,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-image`,src:se.image.url,alt:""})}),!M&&((B=ye==null?void 0:ye.image)==null?void 0:B.url)&&a.jsx("div",{className:Ct(`${o}-stage`,`${o}-foreground`),style:yp(we),children:a.jsx("img",{className:`${o}-image`,src:ye.image.url,alt:ye.image.name??""})}),ae&&y.length>1&&!M&&a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:Ct(`${o}-nav`,`${o}-nav-prev`),onClick:()=>Pe("prev"),"aria-label":`Show previous image (${pe+1} of ${y.length})`}),a.jsx("button",{type:"button",className:Ct(`${o}-nav`,`${o}-nav-next`),onClick:()=>Pe("next"),"aria-label":`Show next image (${fe+1} of ${y.length})`})]})]})]})}const Tb=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17246
17246
  import cn from 'classnames';
17247
17247
  import { CommonComponentProps } from '../props';
17248
17248
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -17761,7 +17761,7 @@ export function Scale({ settings, content, isEditor, isPreviewMode }: ScaleProps
17761
17761
  </>
17762
17762
  );
17763
17763
  }
17764
- `,Lb={type:"object",version:1,settings:{sizing:"manual",properties:{maxWidth:{type:"number",scope:"common",title:"Max width (%)",display:{type:"percentage-input"},min:10,max:100},maxHeight:{type:"number",scope:"common",title:"Max height (%)",display:{type:"percentage-input"},min:10,max:100},transition:{type:"number",scope:"common",title:"Transition (ms)",display:{type:"common-numeric-input"},min:100,max:9999},bgImage:{type:"string",scope:"common",title:"BG image",display:{type:"toggle-cycle",enum:["greyscale","blur","as is"]}}},defaults:{maxWidth:60,maxHeight:60,transition:700,bgImage:"greyscale"},layout:["__componentName__","maxWidth","maxHeight","transition","bgImage"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["maxWidth","maxHeight"]},{type:"row",title:"",items:["transition","bgImage"]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input",isObjectFitEditable:!1}}}},default:[{image:{url:"01M3QM74XESYN1HRYH9VRTZ5CK",name:""}},{image:{url:"01M3QM74XEVZ9F59FC7M9BA63Q",name:""}},{image:{url:"01M3QM74XEE2101QD8PM6E4JSA",name:""}},{image:{url:"01M3QM74XE20C38X4NND20C5R4",name:""}},{image:{url:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:""}},{image:{url:"01M3QM74XEBS5231QA4355P4VQ",name:""}},{image:{url:"01M3QM74XEWT5YM43KF6PEYRCV",name:""}}]}},Pb={element:Cb,id:"scale",name:"Scale",category:"galleries",version:1,defaultSize:{d:{width:920,height:540},m:{width:"100%",height:300}},preview:{type:"image",url:"01M3QM74XG650XSVXMDJM47DEE"},schema:Lb,sourceCode:Tb,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Mb={backgroundColor:"background-color",textColor:"text-color",borderColor:"border-color",iconColor:"icon-color",boxShadowColor:"box-shadow-color",innerBoxShadowColor:"inner-box-shadow-color"},Ib=["hover","active"],vs={left:"flex-start",center:"center",right:"flex-end"};function Rb(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 Eb(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 kb(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`,v=`.${e}-button:hover, ${y}`,g=m=>`.${e}-hover-effect-${m}:hover, .${e}-hover-effect-${m}:focus-visible, a:focus-visible .${e}-hover-effect-${m}`;return`
17764
+ `,Lb={type:"object",version:1,settings:{sizing:"manual",properties:{maxWidth:{type:"number",scope:"common",title:"Max width (%)",display:{type:"percentage-input"},min:10,max:100},maxHeight:{type:"number",scope:"common",title:"Max height (%)",display:{type:"percentage-input"},min:10,max:100},transition:{type:"number",scope:"common",title:"Transition (ms)",display:{type:"common-numeric-input"},min:100,max:9999},bgImage:{type:"string",scope:"common",title:"BG image",display:{type:"toggle-cycle",enum:["greyscale","blur","as is"]}}},defaults:{maxWidth:60,maxHeight:60,transition:700,bgImage:"greyscale"},layout:["__componentName__","maxWidth","maxHeight","transition","bgImage"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["maxWidth","maxHeight"]},{type:"row",title:"",items:["transition","bgImage"]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input",isObjectFitEditable:!1}}}},default:[{image:{url:"01M3QM74XESYN1HRYH9VRTZ5CK",name:""}},{image:{url:"01M3QM74XEVZ9F59FC7M9BA63Q",name:""}},{image:{url:"01M3QM74XEE2101QD8PM6E4JSA",name:""}},{image:{url:"01M3QM74XE20C38X4NND20C5R4",name:""}},{image:{url:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:""}},{image:{url:"01M3QM74XEBS5231QA4355P4VQ",name:""}},{image:{url:"01M3QM74XEWT5YM43KF6PEYRCV",name:""}}]}},Pb={element:Cb,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:Lb,sourceCode:Tb,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Ib={backgroundColor:"background-color",textColor:"text-color",borderColor:"border-color",iconColor:"icon-color",boxShadowColor:"box-shadow-color",innerBoxShadowColor:"inner-box-shadow-color"},Rb=["hover","active"],vs={left:"flex-start",center:"center",right:"flex-end"};function Mb(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 Eb(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 kb(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`,v=`.${e}-button:hover, ${y}`,g=m=>`.${e}-hover-effect-${m}:hover, .${e}-hover-effect-${m}:focus-visible, a:focus-visible .${e}-hover-effect-${m}`;return`
17765
17765
  .${e}-root {
17766
17766
  line-height: 0;
17767
17767
  }
@@ -18003,7 +18003,7 @@ a:active .${e}-button .${e}-icon-image,
18003
18003
  height: calc(1em * var(--${e}-icon-scale, 1));
18004
18004
  width: calc(1em * var(--${e}-icon-scale, 1));
18005
18005
  }
18006
- `}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(gn,{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=F.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 Ab({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:r}=F.useScopedStyles(),l=s.useMemo(()=>kb(r),[r]),{type:c="a",label:d="Button",icon:u,alignment:p="center",alignA:y,order:v="text-icon",gap:g=0,iconSize:m=0,iconWidthC:x=0,dimensions:b=!1,padding:R={top:0,right:0,bottom:0,left:0},cornerRadius:f=0,boxShadow:S={top:0,left:0,right:0,bottom:0},boxShadowColor:W="rgba(0, 0, 0, 0)",innerBoxShadow:q={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:z="rgba(0, 0, 0, 0)",stroke:P=0,blur:_=0,backgroundColor:G="#000000",textColor:$="#ffffff",borderColor:L="#ffffff",iconColor:D="#ffffff",hoverEffect:E="none",fontFamily:T,fontSettings:C,fontSize:V,lineHeight:w,letterSpacing:U=0,wordSpacing:M=0,textAppearance:A,stateOverrides:j,minWidth:ie=0,minHeight:ae=0,width:O=0,height:re=0}=e,N=F.buildColorVars(r,{backgroundColor:G,textColor:$,borderColor:L,iconColor:D,boxShadowColor:W,innerBoxShadowColor:z},Mb,Ib,j),le=i&&i!=="default"?`${r}-state-${i}`:"",J=t&&!n?`${r}-editing`:"",be=E!=="none"&&(!t||n||i==="hover")?`${r}-hover-effect-${E}`:"",Pe=E==="reveal"||E==="swipe",ye=E==="content-roll",ce=E==="reveal"&&(!t||n),K=b===!0,pe=c==="a"?y??p:p,fe=c==="c",we=c!=="b",Ie={fontSettings:{fontFamily:T,fontWeight:(C==null?void 0:C.fontWeight)??400,fontStyle:(C==null?void 0:C.fontStyle)??"normal"},fontSize:V??.01,lineHeight:w,letterSpacing:U,wordSpacing:M,textAppearance:A,color:$},xe={...we?un(en(Ie,t)):{},[`--${r}-box-shadow-x`]:F.scalingValue(S.left,t),[`--${r}-box-shadow-y`]:F.scalingValue(S.top,t),[`--${r}-box-shadow-blur`]:F.scalingValue(S.right,t),[`--${r}-box-shadow-spread`]:F.scalingValue(S.bottom,t),[`--${r}-inner-box-shadow-x`]:F.scalingValue(q.left,t),[`--${r}-inner-box-shadow-y`]:F.scalingValue(q.top,t),[`--${r}-inner-box-shadow-blur`]:F.scalingValue(q.right,t),[`--${r}-inner-box-shadow-spread`]:F.scalingValue(q.bottom,t),[`--${r}-backdrop-blur`]:_>0?`blur(${F.scalingValue(_,t)})`:void 0,paddingTop:F.scalingValue(R.top,t),paddingRight:F.scalingValue(R.right,t),paddingBottom:F.scalingValue(R.bottom,t),paddingLeft:F.scalingValue(R.left,t),borderRadius:F.scalingValue(f,t),borderWidth:F.scalingValue(P,t),...fe?{}:{justifyContent:vs[pe],textAlign:pe},...fe&&!ye?{gap:F.scalingValue(g,t)}:{},...K?{width:F.scalingValue(O,t),height:F.scalingValue(re,t)}:{minWidth:F.scalingValue(ie,t),minHeight:F.scalingValue(ae,t),...fe?{width:"100%"}:{}}};let Ce;const h={display:"inline-flex",alignItems:"center",justifyContent:fe?vs[pe]:vs[c==="a"?pe:"center"],gap:fe?F.scalingValue(g,t):void 0,width:"100%",height:"100%",...c==="a"?{textAlign:pe}:{}};if(c==="b"){const ne=()=>ud(r,u,m>0?"fixed":"fill",100,m,t);Ce=ye?xs(r,ne,`${r}-icon-roll`,void 0,h):ne()}else if(c==="c"){const ne=()=>{const ue=a.jsx("span",{className:`${r}-text`,style:{textAlign:pe},children:d}),B=ud(r,u,x>0?"fixed":"fill",100,x,t);return v==="icon-text"?a.jsxs(a.Fragment,{children:[B,ue]}):a.jsxs(a.Fragment,{children:[ue,B]})};Ce=ye?xs(r,ne,`${r}-icon-text-roll`,void 0,h):ne()}else Ce=ye?xs(r,()=>d,`${r}-label-roll`,void 0,h):Pe?a.jsx("span",{className:`${r}-button-inner`,children:d}):d;const Y=ce?ne=>Rb(ne,r):void 0,Q=ce?ne=>Eb(ne,r):void 0;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),a.jsx("div",{className:`${r}-root`,style:N,children:a.jsx("div",{className:`${r}-wrapper ${le} ${J}`.trim(),children:a.jsx("div",{className:`${r}-button ${be}`.trim(),style:xe,onMouseEnter:Y,onMouseLeave:Q,role:"button",tabIndex:o||t&&!n?void 0:0,children:Ce})})})]})}const Fb=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
18006
+ `}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(gn,{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=F.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 Ab({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:r}=F.useScopedStyles(),l=s.useMemo(()=>kb(r),[r]),{type:c="a",label:d="Button",icon:u,alignment:p="center",alignA:y,order:v="text-icon",gap:g=0,iconSize:m=0,iconWidthC:x=0,dimensions:b=!1,padding:M={top:0,right:0,bottom:0,left:0},cornerRadius:f=0,boxShadow:S={top:0,left:0,right:0,bottom:0},boxShadowColor:W="rgba(0, 0, 0, 0)",innerBoxShadow:q={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:z="rgba(0, 0, 0, 0)",stroke:P=0,blur:_=0,backgroundColor:G="#000000",textColor:$="#ffffff",borderColor:L="#ffffff",iconColor:D="#ffffff",hoverEffect:E="none",fontFamily:T,fontSettings:C,fontSize:V,lineHeight:w,letterSpacing:U=0,wordSpacing:I=0,textAppearance:A,stateOverrides:j,minWidth:ie=0,minHeight:ae=0,width:O=0,height:re=0}=e,N=F.buildColorVars(r,{backgroundColor:G,textColor:$,borderColor:L,iconColor:D,boxShadowColor:W,innerBoxShadowColor:z},Ib,Rb,j),le=i&&i!=="default"?`${r}-state-${i}`:"",J=t&&!n?`${r}-editing`:"",be=E!=="none"&&(!t||n||i==="hover")?`${r}-hover-effect-${E}`:"",Pe=E==="reveal"||E==="swipe",ye=E==="content-roll",ce=E==="reveal"&&(!t||n),K=b===!0,pe=c==="a"?y??p:p,fe=c==="c",we=c!=="b",Re={fontSettings:{fontFamily:T,fontWeight:(C==null?void 0:C.fontWeight)??400,fontStyle:(C==null?void 0:C.fontStyle)??"normal"},fontSize:V??.01,lineHeight:w,letterSpacing:U,wordSpacing:I,textAppearance:A,color:$},xe={...we?un(en(Re,t)):{},[`--${r}-box-shadow-x`]:F.scalingValue(S.left,t),[`--${r}-box-shadow-y`]:F.scalingValue(S.top,t),[`--${r}-box-shadow-blur`]:F.scalingValue(S.right,t),[`--${r}-box-shadow-spread`]:F.scalingValue(S.bottom,t),[`--${r}-inner-box-shadow-x`]:F.scalingValue(q.left,t),[`--${r}-inner-box-shadow-y`]:F.scalingValue(q.top,t),[`--${r}-inner-box-shadow-blur`]:F.scalingValue(q.right,t),[`--${r}-inner-box-shadow-spread`]:F.scalingValue(q.bottom,t),[`--${r}-backdrop-blur`]:_>0?`blur(${F.scalingValue(_,t)})`:void 0,paddingTop:F.scalingValue(M.top,t),paddingRight:F.scalingValue(M.right,t),paddingBottom:F.scalingValue(M.bottom,t),paddingLeft:F.scalingValue(M.left,t),borderRadius:F.scalingValue(f,t),borderWidth:F.scalingValue(P,t),...fe?{}:{justifyContent:vs[pe],textAlign:pe},...fe&&!ye?{gap:F.scalingValue(g,t)}:{},...K?{width:F.scalingValue(O,t),height:F.scalingValue(re,t)}:{minWidth:F.scalingValue(ie,t),minHeight:F.scalingValue(ae,t),...fe?{width:"100%"}:{}}};let Ce;const h={display:"inline-flex",alignItems:"center",justifyContent:fe?vs[pe]:vs[c==="a"?pe:"center"],gap:fe?F.scalingValue(g,t):void 0,width:"100%",height:"100%",...c==="a"?{textAlign:pe}:{}};if(c==="b"){const ne=()=>ud(r,u,m>0?"fixed":"fill",100,m,t);Ce=ye?xs(r,ne,`${r}-icon-roll`,void 0,h):ne()}else if(c==="c"){const ne=()=>{const ue=a.jsx("span",{className:`${r}-text`,style:{textAlign:pe},children:d}),B=ud(r,u,x>0?"fixed":"fill",100,x,t);return v==="icon-text"?a.jsxs(a.Fragment,{children:[B,ue]}):a.jsxs(a.Fragment,{children:[ue,B]})};Ce=ye?xs(r,ne,`${r}-icon-text-roll`,void 0,h):ne()}else Ce=ye?xs(r,()=>d,`${r}-label-roll`,void 0,h):Pe?a.jsx("span",{className:`${r}-button-inner`,children:d}):d;const Y=ce?ne=>Mb(ne,r):void 0,Q=ce?ne=>Eb(ne,r):void 0;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),a.jsx("div",{className:`${r}-root`,style:N,children:a.jsx("div",{className:`${r}-wrapper ${le} ${J}`.trim(),children:a.jsx("div",{className:`${r}-button ${be}`.trim(),style:xe,onMouseEnter:Y,onMouseLeave:Q,role:"button",tabIndex:o||t&&!n?void 0:0,children:Ce})})})]})}const Fb=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
18007
18007
  import { SvgImage } from '../helpers/SvgImage/SvgImage';
18008
18008
  import { CommonComponentProps } from '../props';
18009
18009
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
@@ -18635,7 +18635,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
18635
18635
  </>
18636
18636
  );
18637
18637
  }
18638
- `,Nb={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},_b=["backgroundColor","textColor","borderColor","iconColor","boxShadowColor","innerBoxShadowColor"],Hb={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:{...Nb.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:[..._b],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"]},Wb={element:Ab,id:"simple-button",name:"Simple Button",category:"ui-elements",version:1,preview:{type:"image",url:"01M3QM74XE56V3FGD7SN9GY8NG"},schema:Hb,sourceCode:Fb,assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{fontSettings:"fontFamily"}};function Ob(e){return`
18638
+ `,Nb={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},_b=["backgroundColor","textColor","borderColor","iconColor","boxShadowColor","innerBoxShadowColor"],Hb={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:{...Nb.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:[..._b],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"]},Wb={element:Ab,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:Hb,sourceCode:Fb,assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{fontSettings:"fontFamily"}};function Ob(e){return`
18639
18639
  .${e}-titles-row {
18640
18640
  position: relative;
18641
18641
  flex: 0 1 auto;
@@ -18833,7 +18833,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
18833
18833
  pointer-events: auto;
18834
18834
  flex-shrink: 0;
18835
18835
  }
18836
- `}const Wn=500,Qo=650,$n="cubic-bezier(0.22, 1, 0.36, 1)",Db=72,Bb=50,zb=1e4,jb=650,Vb=500;function Gb(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 vp(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 Xb(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?vp(i,n):null}function Ub(e){return e.reduce((t,n,i)=>{var o;return(o=n.image)!=null&&o.url&&t.push({gridIndex:i,items:[n.image],entry:{title1:n.title??"",title2:n.subtitle??"",title3:n.caption??""}}),t},[])}function 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 qb=.03;function xp(e){return e.width*qb}const bs={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Yr(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function gd(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Yb(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Ys(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 Kb(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Ys(e,t.width,t.height)}function Qb(e,t){if(Va(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function Zb(e){const t=new Set,n=[];for(const i of e){const o=i.image;!(o!=null&&o.url)||t.has(o.url)||(t.add(o.url),n.push(o))}return n}function Jb({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Va(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function Fo(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:c}=n,d=xp(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=Fo(e,t,n);return{...i,left:2*i.left-e.left}}function eS(e,t,n){const{left:i,width:o}=n,r=xp(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 bp(e,t,n,i){const o=Fo(e,"left",i),r=Fo(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 tS(e,t,n,i){const{start:o,end:r}=bp(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function nS(e,t,n){const i=Fo(e,t,n),o=Ta(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Va(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function iS({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 Kr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Va(e)?a.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.url,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.url,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function oS({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:v,resolveCloseSourceRect:g,onClose:m,onPrev:x,onNext:b}){const R=s.useRef(null),f=s.useRef(null),S=s.useRef(null),W=s.useRef(new Map),[q,z]=s.useState(0),P=s.useRef(null),_=s.useRef(0),G=s.useRef(0),$=s.useRef("none"),L=s.useRef(!1),D=s.useRef(!1),E=s.useRef(!1),T=s.useRef(null),C=s.useRef(null),V=s.useRef(null),w=s.useRef(()=>{}),U=s.useRef(null),M=s.useRef(null),A=s.useRef(null),j=s.useRef(!1),[ie,ae]=s.useState(null),[O,re]=s.useState(bs),[N,le]=s.useState(0),[J,be]=s.useState("opening"),[Pe,ye]=s.useState(0),[ce,K]=s.useState(0),[se,pe]=s.useState(!1),[fe,we]=s.useState(null),[Ie,me]=s.useState(null),[xe,Ce]=s.useState(null),[h,Y]=s.useState(!1),[Q,ne]=s.useState(null),[ue,B]=s.useState(!1),I=s.useRef(!1),[ee,te]=s.useState(!1),[ge,X]=s.useState(!1),Me=s.useRef(n),Se=s.useRef(void 0),Z=t[n],He=Z?Va(Z):!1,We=ce!==0||se,ot=!l&&(!r||!!c),qe=d&&!l,tt=u.length>1,et=s.useCallback((H,Le)=>t.length<=1?null:t[(H+Le+t.length)%t.length]??null,[t]),Ge=tt?or(u,p,-1):et(n,-1),ve=tt?or(u,p,1):et(n,1),_e=fe===-1&&We?tt&&Ie!==null?or(u,Ie,-1):xe!==null?et(xe,-1):null:null,ze=fe===1&&We?tt&&Ie!==null?or(u,Ie,1):xe!==null?et(xe,1):null:null,Qe=_e&&_e.url!==(Ge==null?void 0:Ge.url)?_e:null,$e=ze&&ze.url!==(ve==null?void 0:ve.url)?ze:null,Ne=Ge&&qe?(()=>{const H=tt?pd(u,p,-1):t.length>2?et((n-1+t.length)%t.length,-1):null;return H&&H.url!==Ge.url?H:null})():null,Ye=ve&&qe?(()=>{const H=tt?pd(u,p,1):t.length>2?et((n+1)%t.length,1):null;return H&&H.url!==ve.url?H:null})():null,Ze=Qe??Ne,st=$e??Ye,it=s.useCallback((H,Le,je)=>{if(!H||!Le||!je)return;const Fe=W.current,ft=Fe.get(H);(ft==null?void 0:ft.width)===Le&&(ft==null?void 0:ft.height)===je||(Fe.set(H,{width:Le,height:je}),z(Ht=>Ht+1))},[]),Oe=s.useCallback(H=>{if(!(H!=null&&H.url))return null;const Le=W.current.get(H.url);return Kb(f.current,Le)},[q,N]),Ae=s.useCallback(()=>{if(!Z)return;const H=Oe(Z);if(H){ae(H);return}const Le=f.current;Le&&ae(gd(Le))},[Z,Oe]),mt=s.useCallback(H=>{if(tt){const Le=u.length;me((p+H+Le)%Le),Ce(null);return}t.length>1&&(Ce((n+H+t.length)%t.length),me(null))},[tt,u.length,p,t.length,n]),Be=s.useCallback(H=>{E.current=H,pe(H)},[]),De=s.useCallback(()=>{T.current!==null&&(window.clearTimeout(T.current),T.current=null)},[]),Ue=s.useCallback(()=>{De(),T.current=window.setTimeout(()=>{De(),Be(!1)},Qo+32)},[De,Be]),ct=s.useCallback(()=>{const H=R.current;if(!H){re({left:0,top:0,width:typeof window<"u"?window.innerWidth:bs.width,height:typeof window<"u"?window.innerHeight:bs.height});return}const Le=H.getBoundingClientRect();re({left:Le.left,top:Le.top,width:Le.width,height:Le.height})},[]),he=s.useCallback((H,Le)=>{if(We){if(ee&&!se)return`translate(${ce}px, 0px)`;if(se&&fe!==null){const je=Oe(H);if(!je)return;const{x:Fe,y:ft}=tS(je,Le,fe,O);return`translate(${Fe}px, ${ft}px)`}if(se)return"translate(0px, 0px)"}},[We,ee,se,ce,fe,O,Oe]),Re=s.useCallback(()=>{const H=C.current;C.current=null,De(),Be(!1),we(null),me(null),Ce(null),K(0),te(!1),L.current=!1,G.current=0,$.current="none",H===-1?x():H===1&&b()},[De,Be,x,b]),nt=s.useCallback(()=>{De(),T.current=window.setTimeout(()=>{C.current!==null&&Re()},Qo+32)},[De,Re]),pt=s.useCallback(()=>{De(),C.current=null,Be(!1),we(null),me(null),Ce(null),K(0),te(!1),L.current=!1,G.current=0,$.current="none"},[De,Be]),Ve=s.useCallback(H=>{if(!(!qe||!ie)){if(E.current){if(C.current===H){V.current=H,Re();return}pt()}De(),mt(H),C.current=H,we(H),Be(!0),nt()}},[qe,ie,Re,pt,De,mt,Be,nt]);w.current=Ve;const vt=s.useCallback(()=>{U.current=null,j.current=!1,M.current!==null&&(window.clearInterval(M.current),M.current=null),A.current!==null&&(window.clearTimeout(A.current),A.current=null)},[]),Mt=s.useCallback(H=>{M.current!==null&&window.clearInterval(M.current);const Le=j.current?Vb:jb;M.current=window.setInterval(()=>{w.current(H)},Le)},[]),At=s.useCallback(H=>{U.current!==H&&(vt(),U.current=H,j.current=!1,w.current(H),Mt(H),A.current=window.setTimeout(()=>{A.current=null,U.current===H&&(j.current=!0,Mt(H))},zb))},[vt,Mt]),wt=s.useCallback(()=>{const H=f.current;if(!H)return;const Le=Z==null?void 0:Z.url,je=Le?W.current.get(Le):void 0;if(je!=null&&je.width&&(je!=null&&je.height)){ae(Ys(H,je.width,je.height));return}const Fe=S.current;if(Fe&&Le&&(Fe.src===Le||Fe.currentSrc===Le)){const{width:Ht,height:gt}=Yb(Fe);if(Ht&&gt){it(Le,Ht,gt),ae(Ys(H,Ht,gt));return}}const ft=gd(H);!ft.width||!ft.height||ae(ft)},[Z==null?void 0:Z.url,it]),Vt=s.useCallback(H=>{if(S.current=H,!!H){if(H instanceof HTMLVideoElement){H.readyState>=1&&H.videoWidth>0&&wt();return}H.complete&&H.naturalWidth>0&&wt()}},[wt]),jt=s.useCallback(()=>{ct(),wt(),le(H=>H+1)},[ct,wt]);s.useEffect(()=>{jt();const H=f.current,Le=R.current,je=new ResizeObserver(()=>jt());return H&&je.observe(H),Le&&je.observe(Le),window.addEventListener("resize",jt),()=>{je.disconnect(),window.removeEventListener("resize",jt)}},[jt,n,y]),s.useLayoutEffect(()=>{if(!Z)return;const H=S.current;if(H){if(H instanceof HTMLImageElement&&H.complete&&H.naturalWidth>0){wt();return}H instanceof HTMLVideoElement&&H.readyState>=1&&H.videoWidth>0&&wt()}},[Z==null?void 0:Z.url,n,wt]),s.useEffect(()=>{Ae()},[Ae,q]),s.useEffect(()=>{const H=new Set,Le=[],je=Fe=>{!(Fe!=null&&Fe.url)||H.has(Fe.url)||(H.add(Fe.url),Le.push(Fe))};t.forEach(je),u.forEach(Fe=>Fe.items.forEach(je)),Le.forEach(Fe=>{W.current.has(Fe.url)||Qb(Fe,it)})},[t,u,it]),s.useEffect(()=>{if(J!=="opening"||!ie)return;if(!v){be("open");return}Y(!1);const H=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Y(!0),be("open")})});return()=>cancelAnimationFrame(H)},[J,ie,v]),s.useEffect(()=>{if(J!=="closing")return;const H=setTimeout(()=>m(),Wn);return()=>clearTimeout(H)},[J,m]),s.useEffect(()=>()=>{De()},[De]),s.useLayoutEffect(()=>{Me.current===n&&Se.current===(Z==null?void 0:Z.url)||(De(),C.current=null,we(null),me(null),Ce(null),ye(0),K(0),Be(!1),X(!1),te(!1),_.current=0,G.current=0,$.current="none",L.current=!1,P.current=null,D.current=!1,S.current=null,Ae(),Me.current=n,Se.current=Z==null?void 0:Z.url)},[n,Z==null?void 0:Z.url,Be,De,Ae]),s.useLayoutEffect(()=>{const H=V.current;H!==null&&(V.current=null,requestAnimationFrame(()=>{w.current(H)}))},[n,p,Z==null?void 0:Z.url]),s.useLayoutEffect(()=>{if(J==="opening"){I.current=!1,B(!1);return}if(J!=="open"||I.current)return;if(!Ge&&!ve){I.current=!0;return}B(!1);const H=requestAnimationFrame(()=>{requestAnimationFrame(()=>{B(!0),I.current=!0})});return()=>cancelAnimationFrame(H)},[J,Ge==null?void 0:Ge.url,ve==null?void 0:ve.url]),s.useEffect(()=>{if(J!=="open")return;const H=()=>{const gt=Lt=>{Lt.stopPropagation(),Lt.preventDefault(),document.removeEventListener("click",gt,!0)};document.addEventListener("click",gt,!0)},Le=gt=>{const Lt=gt<0?1:-1;De(),mt(Lt),C.current=Lt,we(Lt),Be(!0),nt()},je=gt=>{if(Math.abs(gt)>Bb&&qe){Le(gt);return}C.current=null,we(null),me(null),Ce(null),Be(!0),K(0),Ue()},Fe=gt=>{if(gt.touches.length!==1||E.current)return;const Lt=gt.touches[0];D.current=!0,P.current={x:Lt.clientX,y:Lt.clientY},$.current="none",G.current=0,L.current=!1},ft=gt=>{if(!P.current||gt.touches.length!==1||E.current)return;const Lt=gt.touches[0],qt=Lt.clientX-P.current.x,Dt=Lt.clientY-P.current.y;if($.current==="none"){if(Math.abs(qt)<10&&Math.abs(Dt)<10)return;if(Math.abs(qt)>Math.abs(Dt)){if(!qe)return;$.current="horizontal"}else if(Dt>0){if(!ot)return;$.current="vertical"}else return}if($.current==="horizontal"){L.current=!0,te(!0),G.current=qt,K(qt),gt.preventDefault();return}$.current==="vertical"&&(L.current=!0,te(!0),_.current=Dt,ye(Dt),gt.preventDefault())},Ht=()=>{if(!P.current)return;const gt=$.current,Lt=L.current;if(Lt&&gt==="horizontal")je(G.current),H();else if(Lt&&gt==="vertical"){const qt=_.current;if(ot&&qt>Db){const Dt=window.innerHeight;_.current=Dt,X(!0),ye(Dt),be("closing")}else _.current=0,ye(0);H()}else gt==="horizontal"&&Math.abs(G.current)>0&&(je(G.current),H());P.current=null,$.current="none",G.current=0,L.current=!1,te(!1)};return document.addEventListener("touchstart",Fe,{passive:!0}),document.addEventListener("touchmove",ft,{passive:!1}),document.addEventListener("touchend",Ht),document.addEventListener("touchcancel",Ht),()=>{document.removeEventListener("touchstart",Fe),document.removeEventListener("touchmove",ft),document.removeEventListener("touchend",Ht),document.removeEventListener("touchcancel",Ht)}},[J,qe,Be,Ue,De,ot,nt,mt]);const Yt=s.useCallback(()=>{const H=(g==null?void 0:g())??v??null;H&&ie&&(ne(H),Y(!0)),be("closing")},[g,v,ie]);s.useEffect(()=>{const H=Fe=>{if(Fe.key==="Escape"){if(r&&c||J==="closing")return;vt(),Yt();return}if(Fe.key!=="ArrowLeft"&&Fe.key!=="ArrowRight"||J!=="open"||!qe)return;Fe.preventDefault();const ft=Fe.key==="ArrowLeft"?-1:1;Fe.repeat&&U.current===ft||At(ft)},Le=Fe=>{if(Fe.key!=="ArrowLeft"&&Fe.key!=="ArrowRight")return;const ft=Fe.key==="ArrowLeft"?-1:1;U.current===ft&&vt()},je=()=>{vt()};return window.addEventListener("keydown",H),window.addEventListener("keyup",Le),window.addEventListener("blur",je),()=>{window.removeEventListener("keydown",H),window.removeEventListener("keyup",Le),window.removeEventListener("blur",je),vt()}},[J,r,c,Yt,qe,At,vt]),s.useEffect(()=>{J!=="open"&&vt()},[J,vt]);const Kt=()=>{J==="closing"||l||Yt()},It=J==="open",zt=J==="closing",on=Pe>0?Math.max(0,1-Pe/500):1,xt=Pe>0?Math.max(.35,1-Pe/500):1,yt=s.useCallback(H=>{if(!(H.propertyName!=="transform"||!E.current)){if(C.current!==null){Re();return}De(),Be(!1)}},[De,Be,Re]),ke=J==="closing"?Q??v:v,Je=ke&&ie&&(J==="opening"||zt)?Gb(ke,ie):void 0,rt=We&&Z?he(Z,"center"):Pe>0?`translateY(${Pe}px)`:Je,dt=ie?Yr(ie,O):null,Pt=!!(ke&&ie),St=Pt&&(J==="closing"||J==="open"&&h),ht={position:"absolute",top:dt==null?void 0:dt.top,left:dt==null?void 0:dt.left,width:dt==null?void 0:dt.width,height:dt==null?void 0:dt.height,objectFit:"contain",transformOrigin:"top left",transform:rt,opacity:Pe>0?xt:Pt?1:J==="opening"||zt?0:1,transition:ee&&!se?"none":se?`transform ${Qo}ms ${$n}`:ge?`transform ${Wn}ms ${$n}, opacity ${Wn}ms ${$n}`:St?`transform ${Wn}ms ${$n}`:J==="opening"||zt?`opacity ${Wn}ms ${$n}`:"none",pointerEvents:He&&It&&!We?"auto":"none",touchAction:He&&It?"none":void 0,zIndex:1,overflow:He?"hidden":void 0},Wt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:It&&!We?"auto":"none"},Tt=(H,Le,je="adjacent")=>{const Fe=Oe(H);if(!Fe)return{display:"none"};const ft=je==="far"?Le==="left"?"far-left":"far-right":Le==="left"?"left-adjacent":"right-adjacent",{start:Ht}=fe!==null?bp(Fe,ft,fe,O):{start:je==="far"?Ta(Fe,Le,O):Fo(Fe,Le,O)},gt=Yr(Ht,O),Lt=he(H,ft),qt=!We&&je==="adjacent"&&It&&!ue?nS(Fe,Le,O):null,Dt=je==="far"&&We&&fe===(Le==="left"?-1:1),an=ee&&!se?!1:se,cn=je==="adjacent"&&It&&ue&&!We;return{position:"absolute",top:gt.top,left:gt.left,width:gt.width,height:gt.height,objectFit:"contain",transform:Lt??(qt?`translate(${qt.x}px, ${qt.y}px)`:void 0),opacity:je==="far"?It&&Dt?1:0:It?1:0,transition:an?je==="far"?`transform ${Qo}ms ${$n}`:`transform ${Qo}ms ${$n}, opacity ${Wn}ms ${$n}`:cn?`transform ${Wn}ms ${$n}`:J==="opening"||zt?`opacity ${Wn}ms ${$n}`:"none",pointerEvents:"none",zIndex:1}},Ot=(H,Le)=>{const je=Oe(H);return je?eS(Fo(je,Le,O),Le,O):null},Gt=H=>Le=>{if(!l){if(D.current){D.current=!1;return}Le.stopPropagation(),Ve(H)}},kt=Ge?Ot(Ge,"left"):null,_t=ve?Ot(ve,"right"):null,Ft=kt?Yr(kt,O):null,ut=_t?Yr(_t,O):null;return a.jsxs("div",{ref:R,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:J==="open"?"none":void 0},onClick:Kt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:It?on:0,transition:ee?"none":`opacity ${Wn}ms ${$n}`,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:f,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:It?1:0,transition:ee?"none":`opacity ${Wn}ms ${$n}`,pointerEvents:"none"},children:a.jsx(tp,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,onClose:Kt})})]}),It&&Ze&&a.jsx(Kr,{media:Ze,style:Tt(Ze,"left","far"),onMeasure:it,onTransitionEnd:yt},`far-prev-${Ze.url}`),It&&Ge&&a.jsxs(a.Fragment,{children:[a.jsx(Kr,{media:Ge,style:Tt(Ge,"left"),onMeasure:it,onTransitionEnd:yt},`prev-${Ge.url}`),Ft&&a.jsx("div",{style:{position:"absolute",top:Ft.top,left:Ft.left,width:Ft.width,height:Ft.height,cursor:l||ee?"default":"pointer",pointerEvents:l||ee?"none":"auto",zIndex:3},onClick:Gt(-1)})]}),It&&ve&&a.jsxs(a.Fragment,{children:[a.jsx(Kr,{media:ve,style:Tt(ve,"right"),onMeasure:it,onTransitionEnd:yt},`next-${ve.url}`),ut&&a.jsx("div",{style:{position:"absolute",top:ut.top,left:ut.left,width:ut.width,height:ut.height,cursor:l||ee?"default":"pointer",pointerEvents:l||ee?"none":"auto",zIndex:3},onClick:Gt(1)})]}),It&&st&&a.jsx(Kr,{media:st,style:Tt(st,"right","far"),onMeasure:it,onTransitionEnd:yt},`far-next-${st.url}`),ie&&Z&&(He?a.jsx(iS,{src:Z.url,phase:J,onMediaElement:Vt,wrapperStyle:ht,videoStyle:Wt,onLoadedMetadata:wt,onTransitionEnd:yt},`${n}-${Z.url}`):a.jsx("img",{ref:Vt,src:Z.url,alt:Z.name,onLoad:wt,onTransitionEnd:yt,style:ht},`${n}-${Z.url}`))]})}const rS=20,aS=.18;function sS(e){return`
18836
+ `}const Wn=500,Qo=650,$n="cubic-bezier(0.22, 1, 0.36, 1)",Db=72,Bb=50,zb=1e4,jb=650,Vb=500;function Gb(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 vp(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 Xb(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?vp(i,n):null}function Ub(e){return e.reduce((t,n,i)=>{var o;return(o=n.image)!=null&&o.url&&t.push({gridIndex:i,items:[n.image],entry:{title1:n.title??"",title2:n.subtitle??"",title3:n.caption??""}}),t},[])}function 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 qb=.03;function xp(e){return e.width*qb}const bs={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Yr(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function gd(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Yb(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Ys(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 Kb(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Ys(e,t.width,t.height)}function Qb(e,t){if(Va(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function Zb(e){const t=new Set,n=[];for(const i of e){const o=i.image;!(o!=null&&o.url)||t.has(o.url)||(t.add(o.url),n.push(o))}return n}function Jb({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Va(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function Fo(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:c}=n,d=xp(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=Fo(e,t,n);return{...i,left:2*i.left-e.left}}function eS(e,t,n){const{left:i,width:o}=n,r=xp(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 bp(e,t,n,i){const o=Fo(e,"left",i),r=Fo(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 tS(e,t,n,i){const{start:o,end:r}=bp(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function nS(e,t,n){const i=Fo(e,t,n),o=Ta(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Va(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function iS({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 Kr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Va(e)?a.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.url,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.url,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function oS({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:v,resolveCloseSourceRect:g,onClose:m,onPrev:x,onNext:b}){const M=s.useRef(null),f=s.useRef(null),S=s.useRef(null),W=s.useRef(new Map),[q,z]=s.useState(0),P=s.useRef(null),_=s.useRef(0),G=s.useRef(0),$=s.useRef("none"),L=s.useRef(!1),D=s.useRef(!1),E=s.useRef(!1),T=s.useRef(null),C=s.useRef(null),V=s.useRef(null),w=s.useRef(()=>{}),U=s.useRef(null),I=s.useRef(null),A=s.useRef(null),j=s.useRef(!1),[ie,ae]=s.useState(null),[O,re]=s.useState(bs),[N,le]=s.useState(0),[J,be]=s.useState("opening"),[Pe,ye]=s.useState(0),[ce,K]=s.useState(0),[se,pe]=s.useState(!1),[fe,we]=s.useState(null),[Re,me]=s.useState(null),[xe,Ce]=s.useState(null),[h,Y]=s.useState(!1),[Q,ne]=s.useState(null),[ue,B]=s.useState(!1),R=s.useRef(!1),[ee,te]=s.useState(!1),[ge,X]=s.useState(!1),Ie=s.useRef(n),Se=s.useRef(void 0),Z=t[n],He=Z?Va(Z):!1,We=ce!==0||se,ot=!l&&(!r||!!c),qe=d&&!l,tt=u.length>1,et=s.useCallback((H,Le)=>t.length<=1?null:t[(H+Le+t.length)%t.length]??null,[t]),Ge=tt?or(u,p,-1):et(n,-1),ve=tt?or(u,p,1):et(n,1),_e=fe===-1&&We?tt&&Re!==null?or(u,Re,-1):xe!==null?et(xe,-1):null:null,ze=fe===1&&We?tt&&Re!==null?or(u,Re,1):xe!==null?et(xe,1):null:null,Qe=_e&&_e.url!==(Ge==null?void 0:Ge.url)?_e:null,$e=ze&&ze.url!==(ve==null?void 0:ve.url)?ze:null,Ne=Ge&&qe?(()=>{const H=tt?pd(u,p,-1):t.length>2?et((n-1+t.length)%t.length,-1):null;return H&&H.url!==Ge.url?H:null})():null,Ye=ve&&qe?(()=>{const H=tt?pd(u,p,1):t.length>2?et((n+1)%t.length,1):null;return H&&H.url!==ve.url?H:null})():null,Ze=Qe??Ne,st=$e??Ye,it=s.useCallback((H,Le,je)=>{if(!H||!Le||!je)return;const Fe=W.current,ft=Fe.get(H);(ft==null?void 0:ft.width)===Le&&(ft==null?void 0:ft.height)===je||(Fe.set(H,{width:Le,height:je}),z(Ht=>Ht+1))},[]),Oe=s.useCallback(H=>{if(!(H!=null&&H.url))return null;const Le=W.current.get(H.url);return Kb(f.current,Le)},[q,N]),Ae=s.useCallback(()=>{if(!Z)return;const H=Oe(Z);if(H){ae(H);return}const Le=f.current;Le&&ae(gd(Le))},[Z,Oe]),mt=s.useCallback(H=>{if(tt){const Le=u.length;me((p+H+Le)%Le),Ce(null);return}t.length>1&&(Ce((n+H+t.length)%t.length),me(null))},[tt,u.length,p,t.length,n]),Be=s.useCallback(H=>{E.current=H,pe(H)},[]),De=s.useCallback(()=>{T.current!==null&&(window.clearTimeout(T.current),T.current=null)},[]),Ue=s.useCallback(()=>{De(),T.current=window.setTimeout(()=>{De(),Be(!1)},Qo+32)},[De,Be]),ct=s.useCallback(()=>{const H=M.current;if(!H){re({left:0,top:0,width:typeof window<"u"?window.innerWidth:bs.width,height:typeof window<"u"?window.innerHeight:bs.height});return}const Le=H.getBoundingClientRect();re({left:Le.left,top:Le.top,width:Le.width,height:Le.height})},[]),he=s.useCallback((H,Le)=>{if(We){if(ee&&!se)return`translate(${ce}px, 0px)`;if(se&&fe!==null){const je=Oe(H);if(!je)return;const{x:Fe,y:ft}=tS(je,Le,fe,O);return`translate(${Fe}px, ${ft}px)`}if(se)return"translate(0px, 0px)"}},[We,ee,se,ce,fe,O,Oe]),Me=s.useCallback(()=>{const H=C.current;C.current=null,De(),Be(!1),we(null),me(null),Ce(null),K(0),te(!1),L.current=!1,G.current=0,$.current="none",H===-1?x():H===1&&b()},[De,Be,x,b]),nt=s.useCallback(()=>{De(),T.current=window.setTimeout(()=>{C.current!==null&&Me()},Qo+32)},[De,Me]),pt=s.useCallback(()=>{De(),C.current=null,Be(!1),we(null),me(null),Ce(null),K(0),te(!1),L.current=!1,G.current=0,$.current="none"},[De,Be]),Ve=s.useCallback(H=>{if(!(!qe||!ie)){if(E.current){if(C.current===H){V.current=H,Me();return}pt()}De(),mt(H),C.current=H,we(H),Be(!0),nt()}},[qe,ie,Me,pt,De,mt,Be,nt]);w.current=Ve;const vt=s.useCallback(()=>{U.current=null,j.current=!1,I.current!==null&&(window.clearInterval(I.current),I.current=null),A.current!==null&&(window.clearTimeout(A.current),A.current=null)},[]),It=s.useCallback(H=>{I.current!==null&&window.clearInterval(I.current);const Le=j.current?Vb:jb;I.current=window.setInterval(()=>{w.current(H)},Le)},[]),At=s.useCallback(H=>{U.current!==H&&(vt(),U.current=H,j.current=!1,w.current(H),It(H),A.current=window.setTimeout(()=>{A.current=null,U.current===H&&(j.current=!0,It(H))},zb))},[vt,It]),wt=s.useCallback(()=>{const H=f.current;if(!H)return;const Le=Z==null?void 0:Z.url,je=Le?W.current.get(Le):void 0;if(je!=null&&je.width&&(je!=null&&je.height)){ae(Ys(H,je.width,je.height));return}const Fe=S.current;if(Fe&&Le&&(Fe.src===Le||Fe.currentSrc===Le)){const{width:Ht,height:gt}=Yb(Fe);if(Ht&&gt){it(Le,Ht,gt),ae(Ys(H,Ht,gt));return}}const ft=gd(H);!ft.width||!ft.height||ae(ft)},[Z==null?void 0:Z.url,it]),Vt=s.useCallback(H=>{if(S.current=H,!!H){if(H instanceof HTMLVideoElement){H.readyState>=1&&H.videoWidth>0&&wt();return}H.complete&&H.naturalWidth>0&&wt()}},[wt]),jt=s.useCallback(()=>{ct(),wt(),le(H=>H+1)},[ct,wt]);s.useEffect(()=>{jt();const H=f.current,Le=M.current,je=new ResizeObserver(()=>jt());return H&&je.observe(H),Le&&je.observe(Le),window.addEventListener("resize",jt),()=>{je.disconnect(),window.removeEventListener("resize",jt)}},[jt,n,y]),s.useLayoutEffect(()=>{if(!Z)return;const H=S.current;if(H){if(H instanceof HTMLImageElement&&H.complete&&H.naturalWidth>0){wt();return}H instanceof HTMLVideoElement&&H.readyState>=1&&H.videoWidth>0&&wt()}},[Z==null?void 0:Z.url,n,wt]),s.useEffect(()=>{Ae()},[Ae,q]),s.useEffect(()=>{const H=new Set,Le=[],je=Fe=>{!(Fe!=null&&Fe.url)||H.has(Fe.url)||(H.add(Fe.url),Le.push(Fe))};t.forEach(je),u.forEach(Fe=>Fe.items.forEach(je)),Le.forEach(Fe=>{W.current.has(Fe.url)||Qb(Fe,it)})},[t,u,it]),s.useEffect(()=>{if(J!=="opening"||!ie)return;if(!v){be("open");return}Y(!1);const H=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Y(!0),be("open")})});return()=>cancelAnimationFrame(H)},[J,ie,v]),s.useEffect(()=>{if(J!=="closing")return;const H=setTimeout(()=>m(),Wn);return()=>clearTimeout(H)},[J,m]),s.useEffect(()=>()=>{De()},[De]),s.useLayoutEffect(()=>{Ie.current===n&&Se.current===(Z==null?void 0:Z.url)||(De(),C.current=null,we(null),me(null),Ce(null),ye(0),K(0),Be(!1),X(!1),te(!1),_.current=0,G.current=0,$.current="none",L.current=!1,P.current=null,D.current=!1,S.current=null,Ae(),Ie.current=n,Se.current=Z==null?void 0:Z.url)},[n,Z==null?void 0:Z.url,Be,De,Ae]),s.useLayoutEffect(()=>{const H=V.current;H!==null&&(V.current=null,requestAnimationFrame(()=>{w.current(H)}))},[n,p,Z==null?void 0:Z.url]),s.useLayoutEffect(()=>{if(J==="opening"){R.current=!1,B(!1);return}if(J!=="open"||R.current)return;if(!Ge&&!ve){R.current=!0;return}B(!1);const H=requestAnimationFrame(()=>{requestAnimationFrame(()=>{B(!0),R.current=!0})});return()=>cancelAnimationFrame(H)},[J,Ge==null?void 0:Ge.url,ve==null?void 0:ve.url]),s.useEffect(()=>{if(J!=="open")return;const H=()=>{const gt=Lt=>{Lt.stopPropagation(),Lt.preventDefault(),document.removeEventListener("click",gt,!0)};document.addEventListener("click",gt,!0)},Le=gt=>{const Lt=gt<0?1:-1;De(),mt(Lt),C.current=Lt,we(Lt),Be(!0),nt()},je=gt=>{if(Math.abs(gt)>Bb&&qe){Le(gt);return}C.current=null,we(null),me(null),Ce(null),Be(!0),K(0),Ue()},Fe=gt=>{if(gt.touches.length!==1||E.current)return;const Lt=gt.touches[0];D.current=!0,P.current={x:Lt.clientX,y:Lt.clientY},$.current="none",G.current=0,L.current=!1},ft=gt=>{if(!P.current||gt.touches.length!==1||E.current)return;const Lt=gt.touches[0],qt=Lt.clientX-P.current.x,Dt=Lt.clientY-P.current.y;if($.current==="none"){if(Math.abs(qt)<10&&Math.abs(Dt)<10)return;if(Math.abs(qt)>Math.abs(Dt)){if(!qe)return;$.current="horizontal"}else if(Dt>0){if(!ot)return;$.current="vertical"}else return}if($.current==="horizontal"){L.current=!0,te(!0),G.current=qt,K(qt),gt.preventDefault();return}$.current==="vertical"&&(L.current=!0,te(!0),_.current=Dt,ye(Dt),gt.preventDefault())},Ht=()=>{if(!P.current)return;const gt=$.current,Lt=L.current;if(Lt&&gt==="horizontal")je(G.current),H();else if(Lt&&gt==="vertical"){const qt=_.current;if(ot&&qt>Db){const Dt=window.innerHeight;_.current=Dt,X(!0),ye(Dt),be("closing")}else _.current=0,ye(0);H()}else gt==="horizontal"&&Math.abs(G.current)>0&&(je(G.current),H());P.current=null,$.current="none",G.current=0,L.current=!1,te(!1)};return document.addEventListener("touchstart",Fe,{passive:!0}),document.addEventListener("touchmove",ft,{passive:!1}),document.addEventListener("touchend",Ht),document.addEventListener("touchcancel",Ht),()=>{document.removeEventListener("touchstart",Fe),document.removeEventListener("touchmove",ft),document.removeEventListener("touchend",Ht),document.removeEventListener("touchcancel",Ht)}},[J,qe,Be,Ue,De,ot,nt,mt]);const Yt=s.useCallback(()=>{const H=(g==null?void 0:g())??v??null;H&&ie&&(ne(H),Y(!0)),be("closing")},[g,v,ie]);s.useEffect(()=>{const H=Fe=>{if(Fe.key==="Escape"){if(r&&c||J==="closing")return;vt(),Yt();return}if(Fe.key!=="ArrowLeft"&&Fe.key!=="ArrowRight"||J!=="open"||!qe)return;Fe.preventDefault();const ft=Fe.key==="ArrowLeft"?-1:1;Fe.repeat&&U.current===ft||At(ft)},Le=Fe=>{if(Fe.key!=="ArrowLeft"&&Fe.key!=="ArrowRight")return;const ft=Fe.key==="ArrowLeft"?-1:1;U.current===ft&&vt()},je=()=>{vt()};return window.addEventListener("keydown",H),window.addEventListener("keyup",Le),window.addEventListener("blur",je),()=>{window.removeEventListener("keydown",H),window.removeEventListener("keyup",Le),window.removeEventListener("blur",je),vt()}},[J,r,c,Yt,qe,At,vt]),s.useEffect(()=>{J!=="open"&&vt()},[J,vt]);const Kt=()=>{J==="closing"||l||Yt()},Rt=J==="open",zt=J==="closing",on=Pe>0?Math.max(0,1-Pe/500):1,xt=Pe>0?Math.max(.35,1-Pe/500):1,yt=s.useCallback(H=>{if(!(H.propertyName!=="transform"||!E.current)){if(C.current!==null){Me();return}De(),Be(!1)}},[De,Be,Me]),ke=J==="closing"?Q??v:v,Je=ke&&ie&&(J==="opening"||zt)?Gb(ke,ie):void 0,rt=We&&Z?he(Z,"center"):Pe>0?`translateY(${Pe}px)`:Je,dt=ie?Yr(ie,O):null,Pt=!!(ke&&ie),St=Pt&&(J==="closing"||J==="open"&&h),ht={position:"absolute",top:dt==null?void 0:dt.top,left:dt==null?void 0:dt.left,width:dt==null?void 0:dt.width,height:dt==null?void 0:dt.height,objectFit:"contain",transformOrigin:"top left",transform:rt,opacity:Pe>0?xt:Pt?1:J==="opening"||zt?0:1,transition:ee&&!se?"none":se?`transform ${Qo}ms ${$n}`:ge?`transform ${Wn}ms ${$n}, opacity ${Wn}ms ${$n}`:St?`transform ${Wn}ms ${$n}`:J==="opening"||zt?`opacity ${Wn}ms ${$n}`:"none",pointerEvents:He&&Rt&&!We?"auto":"none",touchAction:He&&Rt?"none":void 0,zIndex:1,overflow:He?"hidden":void 0},Wt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Rt&&!We?"auto":"none"},Tt=(H,Le,je="adjacent")=>{const Fe=Oe(H);if(!Fe)return{display:"none"};const ft=je==="far"?Le==="left"?"far-left":"far-right":Le==="left"?"left-adjacent":"right-adjacent",{start:Ht}=fe!==null?bp(Fe,ft,fe,O):{start:je==="far"?Ta(Fe,Le,O):Fo(Fe,Le,O)},gt=Yr(Ht,O),Lt=he(H,ft),qt=!We&&je==="adjacent"&&Rt&&!ue?nS(Fe,Le,O):null,Dt=je==="far"&&We&&fe===(Le==="left"?-1:1),an=ee&&!se?!1:se,cn=je==="adjacent"&&Rt&&ue&&!We;return{position:"absolute",top:gt.top,left:gt.left,width:gt.width,height:gt.height,objectFit:"contain",transform:Lt??(qt?`translate(${qt.x}px, ${qt.y}px)`:void 0),opacity:je==="far"?Rt&&Dt?1:0:Rt?1:0,transition:an?je==="far"?`transform ${Qo}ms ${$n}`:`transform ${Qo}ms ${$n}, opacity ${Wn}ms ${$n}`:cn?`transform ${Wn}ms ${$n}`:J==="opening"||zt?`opacity ${Wn}ms ${$n}`:"none",pointerEvents:"none",zIndex:1}},Ot=(H,Le)=>{const je=Oe(H);return je?eS(Fo(je,Le,O),Le,O):null},Gt=H=>Le=>{if(!l){if(D.current){D.current=!1;return}Le.stopPropagation(),Ve(H)}},kt=Ge?Ot(Ge,"left"):null,_t=ve?Ot(ve,"right"):null,Ft=kt?Yr(kt,O):null,ut=_t?Yr(_t,O):null;return a.jsxs("div",{ref:M,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:J==="open"?"none":void 0},onClick:Kt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Rt?on:0,transition:ee?"none":`opacity ${Wn}ms ${$n}`,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:f,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:Rt?1:0,transition:ee?"none":`opacity ${Wn}ms ${$n}`,pointerEvents:"none"},children:a.jsx(tp,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,onClose:Kt})})]}),Rt&&Ze&&a.jsx(Kr,{media:Ze,style:Tt(Ze,"left","far"),onMeasure:it,onTransitionEnd:yt},`far-prev-${Ze.url}`),Rt&&Ge&&a.jsxs(a.Fragment,{children:[a.jsx(Kr,{media:Ge,style:Tt(Ge,"left"),onMeasure:it,onTransitionEnd:yt},`prev-${Ge.url}`),Ft&&a.jsx("div",{style:{position:"absolute",top:Ft.top,left:Ft.left,width:Ft.width,height:Ft.height,cursor:l||ee?"default":"pointer",pointerEvents:l||ee?"none":"auto",zIndex:3},onClick:Gt(-1)})]}),Rt&&ve&&a.jsxs(a.Fragment,{children:[a.jsx(Kr,{media:ve,style:Tt(ve,"right"),onMeasure:it,onTransitionEnd:yt},`next-${ve.url}`),ut&&a.jsx("div",{style:{position:"absolute",top:ut.top,left:ut.left,width:ut.width,height:ut.height,cursor:l||ee?"default":"pointer",pointerEvents:l||ee?"none":"auto",zIndex:3},onClick:Gt(1)})]}),Rt&&st&&a.jsx(Kr,{media:st,style:Tt(st,"right","far"),onMeasure:it,onTransitionEnd:yt},`far-next-${st.url}`),ie&&Z&&(He?a.jsx(iS,{src:Z.url,phase:J,onMediaElement:Vt,wrapperStyle:ht,videoStyle:Wt,onLoadedMetadata:wt,onTransitionEnd:yt},`${n}-${Z.url}`):a.jsx("img",{ref:Vt,src:Z.url,alt:Z.name,onLoad:wt,onTransitionEnd:yt,style:ht},`${n}-${Z.url}`))]})}const rS=20,aS=.18;function sS(e){return`
18837
18837
  .${e}-wrapper {
18838
18838
  box-sizing: border-box;
18839
18839
  max-width: 100%;
@@ -18921,7 +18921,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
18921
18921
  pointer-events: auto;
18922
18922
  }
18923
18923
  ${Ob(e)}
18924
- `}function lS(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 cS(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 dS(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:F.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:F.scalingValue(i*aS,n??!1),[`--${t}-image-aspect`]:lS(e)}}function uS(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 en(n,t)}function pS(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 gS(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?vp(c,o):void 0)}}function mS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:c}=F.useScopedStyles(),d=s.useMemo(()=>sS(c),[c]),u=t??[],p=(e==null?void 0:e.type)??"a",y=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,v=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,g=F.scalingValue(v,n??!1),m=`max(${g}, ${rS}px)`,{objectFitMode:x,imageStyle:b}=pS(e),R=uS(e,n),f=s.useRef(null),[S,W]=s.useState(!1),[q,z]=s.useState([]),[P,_]=s.useState(0),[G,$]=s.useState(0),[L,D]=s.useState(null),[E,T]=s.useState({title1:"",title2:"",title3:""}),C=(!n||i)&&!S,V=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},w=V.sizeType??"none",U=C&&w!=="none"?`${c}-item-image-hover-${w}`:void 0,M=(V.value??120)/100,A=s.useCallback(ce=>{!ce||w!=="scale"||(ce.style.transformOrigin=df(ce))},[w]),j=s.useCallback(ce=>{if(ce){if(x==="contain"){const K=cS(ce);if(K){const se=ce.closest(`.${c}-item-image`);se instanceof HTMLElement&&se.style.setProperty(`--${c}-item-media-aspect`,String(K))}}A(ce)}},[c,A,x]),ie={width:F.scalingValue(y,n??!1),...R,...dS(e,c,n),[`--${c}-image-hover-scale`]:String(M)},ae=(()=>{const ce={},K=f.current?getComputedStyle(f.current).getPropertyValue("--cntrl-article-width").trim():"";return K&&(ce["--cntrl-article-width"]=K),ce})(),O=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),re=s.useMemo(()=>Ub(u),[u]),N=s.useMemo(()=>Zb(u),[u]),le=(ce,K)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const se=re.findIndex(fe=>fe.gridIndex===ce);if(se<0)return;const pe=re[se];$(se),z(pe.items),_(0),T(pe.entry),D(K??null),W(!0)},J=s.useCallback(()=>{W(!1),D(null)},[]),be=s.useCallback(()=>{const ce=re[G];return!ce||!f.current?L:Xb(f.current,ce.gridIndex,x)??L},[re,G,L,x]),Pe=s.useCallback(ce=>{if(re.length>1){const K=re.length,se=(G+ce+K)%K,pe=re[se];$(se),z(pe.items),_(0),T(pe.entry);return}_(K=>(K+ce+q.length)%q.length)},[re,G,q.length]),ye=re.length>1||q.length>1;return s.useEffect(()=>{if(!S||typeof document>"u")return;const ce=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ce}},[S]),s.useEffect(()=>{!n||o||i||W(!1)},[n,o,i]),s.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&W(!1)},[e==null?void 0:e.lightbox]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),a.jsx(Jb,{mediaList:N}),a.jsx("div",{ref:f,className:`${c}-wrapper ${c}-type-${p}`,style:ie,children:u.map((ce,K)=>{var fe,we;const se=!!((fe=ce.image)!=null&&fe.url),pe=gS(!!O,se,K,c,x,le);return a.jsxs("div",{className:`${c}-item`,children:[ce.title?a.jsx("span",{className:`${c}-item-title`,onClick:pe,style:pe?{cursor:"pointer"}:void 0,children:ce.title}):null,(we=ce.image)!=null&&we.url?a.jsx("span",{className:[`${c}-item-image`,x==="contain"?`${c}-item-image-fit`:void 0,U].filter(Boolean).join(" "),children:ce.image.type==="video"?a.jsx("video",{ref:j,src:ce.image.url,"data-waterfall-index":K,style:b,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:pe,onLoadedData:Ie=>j(Ie.currentTarget)}):a.jsx("img",{ref:j,src:ce.image.url,alt:ce.image.name??"","data-waterfall-index":K,style:b,onClick:pe,onLoad:Ie=>j(Ie.currentTarget)})}):null,K<u.length-1&&a.jsx("div",{className:`${c}-item-gap-host`,style:{width:g},children:o&&!S&&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:m,height:"100%"}})})]},K)})}),S&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const ce=(l?document.getElementById(l):null)??document.body;return Xn.createPortal(a.jsx("div",{style:ae,"data-selection":"none",children:a.jsx(oS,{prefix:c,items:q,index:P,entry:E,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:ye,lightboxEntries:re,entryIdx:G,layoutId:r,sourceRect:L,resolveCloseSourceRect:be,onClose:J,onPrev:()=>Pe(-1),onNext:()=>Pe(1)})}),ce)})()]})}const hS=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
18924
+ `}function lS(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 cS(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 dS(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:F.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:F.scalingValue(i*aS,n??!1),[`--${t}-image-aspect`]:lS(e)}}function uS(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 en(n,t)}function pS(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 gS(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?vp(c,o):void 0)}}function mS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:c}=F.useScopedStyles(),d=s.useMemo(()=>sS(c),[c]),u=t??[],p=(e==null?void 0:e.type)??"a",y=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,v=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,g=F.scalingValue(v,n??!1),m=`max(${g}, ${rS}px)`,{objectFitMode:x,imageStyle:b}=pS(e),M=uS(e,n),f=s.useRef(null),[S,W]=s.useState(!1),[q,z]=s.useState([]),[P,_]=s.useState(0),[G,$]=s.useState(0),[L,D]=s.useState(null),[E,T]=s.useState({title1:"",title2:"",title3:""}),C=(!n||i)&&!S,V=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},w=V.sizeType??"none",U=C&&w!=="none"?`${c}-item-image-hover-${w}`:void 0,I=(V.value??120)/100,A=s.useCallback(ce=>{!ce||w!=="scale"||(ce.style.transformOrigin=df(ce))},[w]),j=s.useCallback(ce=>{if(ce){if(x==="contain"){const K=cS(ce);if(K){const se=ce.closest(`.${c}-item-image`);se instanceof HTMLElement&&se.style.setProperty(`--${c}-item-media-aspect`,String(K))}}A(ce)}},[c,A,x]),ie={width:F.scalingValue(y,n??!1),...M,...dS(e,c,n),[`--${c}-image-hover-scale`]:String(I)},ae=(()=>{const ce={},K=f.current?getComputedStyle(f.current).getPropertyValue("--cntrl-article-width").trim():"";return K&&(ce["--cntrl-article-width"]=K),ce})(),O=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),re=s.useMemo(()=>Ub(u),[u]),N=s.useMemo(()=>Zb(u),[u]),le=(ce,K)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const se=re.findIndex(fe=>fe.gridIndex===ce);if(se<0)return;const pe=re[se];$(se),z(pe.items),_(0),T(pe.entry),D(K??null),W(!0)},J=s.useCallback(()=>{W(!1),D(null)},[]),be=s.useCallback(()=>{const ce=re[G];return!ce||!f.current?L:Xb(f.current,ce.gridIndex,x)??L},[re,G,L,x]),Pe=s.useCallback(ce=>{if(re.length>1){const K=re.length,se=(G+ce+K)%K,pe=re[se];$(se),z(pe.items),_(0),T(pe.entry);return}_(K=>(K+ce+q.length)%q.length)},[re,G,q.length]),ye=re.length>1||q.length>1;return s.useEffect(()=>{if(!S||typeof document>"u")return;const ce=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ce}},[S]),s.useEffect(()=>{!n||o||i||W(!1)},[n,o,i]),s.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&W(!1)},[e==null?void 0:e.lightbox]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),a.jsx(Jb,{mediaList:N}),a.jsx("div",{ref:f,className:`${c}-wrapper ${c}-type-${p}`,style:ie,children:u.map((ce,K)=>{var fe,we;const se=!!((fe=ce.image)!=null&&fe.url),pe=gS(!!O,se,K,c,x,le);return a.jsxs("div",{className:`${c}-item`,children:[ce.title?a.jsx("span",{className:`${c}-item-title`,onClick:pe,style:pe?{cursor:"pointer"}:void 0,children:ce.title}):null,(we=ce.image)!=null&&we.url?a.jsx("span",{className:[`${c}-item-image`,x==="contain"?`${c}-item-image-fit`:void 0,U].filter(Boolean).join(" "),children:ce.image.type==="video"?a.jsx("video",{ref:j,src:ce.image.url,"data-waterfall-index":K,style:b,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:pe,onLoadedData:Re=>j(Re.currentTarget)}):a.jsx("img",{ref:j,src:ce.image.url,alt:ce.image.name??"","data-waterfall-index":K,style:b,onClick:pe,onLoad:Re=>j(Re.currentTarget)})}):null,K<u.length-1&&a.jsx("div",{className:`${c}-item-gap-host`,style:{width:g},children:o&&!S&&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:m,height:"100%"}})})]},K)})}),S&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const ce=(l?document.getElementById(l):null)??document.body;return Xn.createPortal(a.jsx("div",{style:ae,"data-selection":"none",children:a.jsx(oS,{prefix:c,items:q,index:P,entry:E,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:ye,lightboxEntries:re,entryIdx:G,layoutId:r,sourceRect:L,resolveCloseSourceRect:be,onClose:J,onPrev:()=>Pe(-1),onNext:()=>Pe(1)})}),ce)})()]})}const hS=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
18925
18925
  import type React from 'react';
18926
18926
  import { createPortal } from 'react-dom';
18927
18927
  import { CommonComponentProps } from '../props';
@@ -19435,7 +19435,7 @@ export function Waterfall({
19435
19435
  </>
19436
19436
  );
19437
19437
  }
19438
- `,fS="01M3SBP3P8CMVMM1ZZ0QVD2PPF",vi={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 yS(e){const t={};return t[bt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSettings")]={...vi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSize")]={...vi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[bt(e,"lineHeight")]={...vi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[bt(e,"letterSpacing")]={...vi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[bt(e,"wordSpacing")]={...vi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[bt(e,"textAlign")]={...vi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[bt(e,"textAppearance")]={...vi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const No=Pi.filter(e=>e!=="count"),vS=No.reduce((e,t)=>({...e,...yS(t)}),{}),xS=No.reduce((e,t)=>({...e,[bt(t,"fontFamily")]:"Arial",[bt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[bt(t,"letterSpacing")]:0,[bt(t,"wordSpacing")]:0,[bt(t,"textAlign")]:"left",[bt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Ss(e){return No.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[bt(n,"fontSize")]=i),o!==void 0&&(t[bt(n,"lineHeight")]=o),t},{})}const bS={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(No.map(e=>[Nl[e],_l(e)]))},Qr={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},SS=[{title:"Salton Sea from Above",...Qr,image:{url:"01M3QM74XERA3G7J0J00XVKEXX",objectFit:"cover"}},{title:"Lunar Module Pilot",...Qr,image:{url:"01M3QM74XEE2101QD8PM6E4JSA",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...Qr,image:{url:"01M3QM74XEBS5231QA4355P4VQ",objectFit:"cover"}},{title:"David R. Scott During EVA",...Qr,image:{url:"01M3QM74XEWT5YM43KF6PEYRCV",objectFit:"cover"}}],wS={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},caption:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"cover",type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}},required:["image"]},default:SS},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:{...vi.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"]}}},...vS},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:fS,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...xS},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:[bS]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},$S={element:mS,id:"waterfall",name:"Waterfall",category:"lists",layoutMode:"structured",preview:{type:"image",url:"01M3QM74XGADNQDV6HV7DCP59K"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},...No.map(e=>({path:`${bt(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",...No.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${bt(t,"fontFamily")}`}),{})},schema:wS,sourceCode:hS},So=500,Sp="cubic-bezier(0.25, 1, 0.5, 1)",CS=300,TS=5,LS=.15,PS=.4,MS=100,ro=100,md={color:"#000000",hover:"#cccccc"},Zo={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},IS={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},RS="left";function ES(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:RS,color:(e==null?void 0:e.titleColor)??"#000000"};return en(n,t)}function ao(e,t,n){return`${e}: ${F.scalingValue(t/1440,n)};`}function rr(e,t){return t<=0?0:(e%t+t)%t}function kS(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 AS(e,t){const n=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);return t?n.m41:n.m42}function FS(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 v=n.getBoundingClientRect();return{x:v.left,y:v.top}},o=i(0,0),r=i(ro,0),l=i(0,ro);e.removeChild(n);const c={x:(r.x-o.x)/ro,y:(r.y-o.y)/ro},d={x:(l.x-o.x)/ro,y:(l.y-o.y)/ro},u=c.x*d.y-d.x*c.y;return{ex:c,ey:d,det:u}}function NS(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 _S(e,t){return`
19438
+ `,fS="01M3SBP3P8CMVMM1ZZ0QVD2PPF",vi={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 yS(e){const t={};return t[bt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSettings")]={...vi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSize")]={...vi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[bt(e,"lineHeight")]={...vi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[bt(e,"letterSpacing")]={...vi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[bt(e,"wordSpacing")]={...vi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[bt(e,"textAlign")]={...vi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[bt(e,"textAppearance")]={...vi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const No=Pi.filter(e=>e!=="count"),vS=No.reduce((e,t)=>({...e,...yS(t)}),{}),xS=No.reduce((e,t)=>({...e,[bt(t,"fontFamily")]:"Arial",[bt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[bt(t,"letterSpacing")]:0,[bt(t,"wordSpacing")]:0,[bt(t,"textAlign")]:"left",[bt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Ss(e){return No.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[bt(n,"fontSize")]=i),o!==void 0&&(t[bt(n,"lineHeight")]=o),t},{})}const bS={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(No.map(e=>[Nl[e],_l(e)]))},Qr={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},SS=[{title:"Salton Sea from Above",...Qr,image:{url:"01M3QM74XERA3G7J0J00XVKEXX",objectFit:"cover"}},{title:"Lunar Module Pilot",...Qr,image:{url:"01M3QM74XEE2101QD8PM6E4JSA",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...Qr,image:{url:"01M3QM74XEBS5231QA4355P4VQ",objectFit:"cover"}},{title:"David R. Scott During EVA",...Qr,image:{url:"01M3QM74XEWT5YM43KF6PEYRCV",objectFit:"cover"}}],wS={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},caption:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"cover",type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}},required:["image"]},default:SS},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:{...vi.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"]}}},...vS},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:fS,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...xS},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:[bS]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},$S={element:mS,id:"waterfall",name:"Waterfall",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/waterfall.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},...No.map(e=>({path:`${bt(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",...No.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${bt(t,"fontFamily")}`}),{})},schema:wS,sourceCode:hS},So=500,Sp="cubic-bezier(0.25, 1, 0.5, 1)",CS=300,TS=5,LS=.15,PS=.4,IS=100,ro=100,md={color:"#000000",hover:"#cccccc"},Zo={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},RS={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},MS="left";function ES(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:MS,color:(e==null?void 0:e.titleColor)??"#000000"};return en(n,t)}function ao(e,t,n){return`${e}: ${F.scalingValue(t/1440,n)};`}function rr(e,t){return t<=0?0:(e%t+t)%t}function kS(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 AS(e,t){const n=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);return t?n.m41:n.m42}function FS(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 v=n.getBoundingClientRect();return{x:v.left,y:v.top}},o=i(0,0),r=i(ro,0),l=i(0,ro);e.removeChild(n);const c={x:(r.x-o.x)/ro,y:(r.y-o.y)/ro},d={x:(l.x-o.x)/ro,y:(l.y-o.y)/ro},u=c.x*d.y-d.x*c.y;return{ex:c,ey:d,det:u}}function NS(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 _S(e,t){return`
19439
19439
  .${e}-wrapper {
19440
19440
  position: relative;
19441
19441
  width: 100%;
@@ -19705,7 +19705,7 @@ export function Waterfall({
19705
19705
  from { clip-path: inset(100% 0 0 0); }
19706
19706
  to { clip-path: inset(0 0 0 0); }
19707
19707
  }
19708
- `}function HS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o}){const{prefix:r}=F.useScopedStyles(),l=ES(e,n),c=t??[],d=c.length,u=(e==null?void 0:e.trigger)??hd,p=u.sizeType??"drag",y=u.value??hd.value,v=(e==null?void 0:e.direction)??"horizontal",g=(e==null?void 0:e.transition)??"slide",m=(e==null?void 0:e.nav)??"classic",x=(e==null?void 0:e.navSize)??"m",b=IS[x],R=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,f=ve=>F.scalingValue(ve*R,n),S=(e==null?void 0:e.show)??"always",W=(e==null?void 0:e.controls)??null,q=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,z=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,P=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,_=(e==null?void 0:e.controlsColor)??md.color,G=(e==null?void 0:e.controlsHoverColor)??md.hover,$=(e==null?void 0:e.navColor)??Zo.colors.inactive,L=(e==null?void 0:e.navPaginationColor)??Zo.colors.pagination,D=(e==null?void 0:e.navBackgroundColor)??Zo.colors.background,E=(e==null?void 0:e.linkColor)??ws.linkColor,T=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,C=v==="horizontal",V=p==="click",w=p==="drag",U=p==="auto"&&(!n||!!i),M=!n,A=g==="slide",j=m==="classic",ie=S!=="never"&&q>0,ae=S==="on hover",O=F.scalingValue(q,n),re={width:O,height:O,maxWidth:O},N=A&&d>1,[le,J]=s.useState(0),[be,Pe]=s.useState(N?1:0),[ye,ce]=s.useState(!1),[K,se]=s.useState(!1),[pe,fe]=s.useState(!1),[we,Ie]=s.useState(0),[me,xe]=s.useState(!1),[Ce,h]=s.useState(!1),Y=s.useRef(!1),Q=s.useRef(be);Q.current=be;const ne=s.useRef(null),ue=s.useRef(0),B=s.useRef(null),I=s.useRef(null),ee=s.useRef(null),te=s.useRef(null),ge=s.useCallback(ve=>{Y.current=ve,ce(ve)},[]),X=s.useCallback(ve=>{if(d<2||ve===0)return;const _e=ve>0?1:-1,ze=Math.abs(ve);if(xe(!0),ge(!0),!A){J(st=>rr(st+ve,d));return}let Qe=Q.current;const $e=N&&(Qe===0||Qe===d+1),Ne=$e?le+1:null;$e&&(Qe=le+1);let Ye=ze;for(;Ye>0;){const st=kS(Qe,_e,d,N);if(Qe=st.position,Ye-=1,st.hitBoundary){ue.current=Ye*_e;break}}const Ze=ze-Ye;if(Ze>0&&J(st=>rr(st+Ze*_e,d)),Q.current=Qe,Ne!==null){if(Q.current=Ne,Qe===Ne){se(!0),Pe(Qe);return}ne.current=Qe,se(!0),Pe(Ne);return}se(!1),Pe(Qe)},[le,d,N,A,ge]),Me=s.useCallback(ve=>{X(ve)},[X]),Se=s.useCallback(ve=>{if(d<2)return;const _e=rr(ve,d);if(!(_e===le&&!Y.current)&&(xe(!0),ge(!0),J(_e),A)){const ze=_e+(N?1:0);ne.current=null,ue.current=0,Q.current=ze,se(!1),Pe(ze)}},[le,d,N,A,ge]);s.useEffect(()=>{if(!ye)return;const ve=window.setTimeout(()=>{if(N&&(be===0||be===d+1)){ne.current=null,se(!0),Pe(le+1);return}ge(!1)},So);return()=>window.clearTimeout(ve)},[le,d,N,ye,ge,be]),s.useEffect(()=>{if(!K)return;let ve=0;const _e=requestAnimationFrame(()=>{ve=requestAnimationFrame(()=>{const ze=ne.current;ne.current=null;const Qe=ue.current;if(ue.current=0,se(!1),ze!==null){Q.current=ze,Pe(ze);return}if(Qe!==0){X(Qe);return}ge(!1)})});return()=>{cancelAnimationFrame(_e),cancelAnimationFrame(ve)}},[X,ge,K]);const Z=`${N}:${d}`,He=s.useRef(Z);s.useEffect(()=>{if(He.current===Z)return;He.current=Z;const ve=d>0?Math.min(le,d-1):0;ee.current=null,te.current=null,fe(!1),Ie(0),J(ve),se(!0),Pe(ve+(N?1:0))},[le,d,N,Z]),s.useEffect(()=>{if(!me)return;const ve=window.setTimeout(()=>xe(!1),CS);return()=>window.clearTimeout(ve)},[me,le]),s.useEffect(()=>{if(!U||d<2)return;const ve=Math.max(y,.1)*1e3,_e=window.setInterval(()=>{M&&Ce||Me(1)},ve);return()=>window.clearInterval(_e)},[y,d,Me,U,Ce,M]);const We=s.useCallback(ve=>{const _e=ee.current;if(!_e||_e.pointerId!==ve.pointerId)return;ee.current=null,te.current=null;const ze=B.current;if(ze!=null&&ze.hasPointerCapture(ve.pointerId)&&ze.releasePointerCapture(ve.pointerId),!_e.isActive){A&&Ie(0);return}const $e=!(ve.timeStamp-_e.lastTime>MS)&&Math.abs(_e.velocity)>PS,Ne=_e.size>0&&Math.abs(_e.offset-_e.baseOffset)>_e.size*LS;if(fe(!1),!$e&&!Ne){Ie(0);return}const Ye=Ne?_e.offset-_e.baseOffset:_e.velocity;let Ze=1;Ne&&_e.size>0&&(Ze=Math.max(1,Math.round(Math.abs(Ye)/_e.size))),Ie(0),X(Ye<0?Ze:-Ze)},[X,A]);s.useEffect(()=>{const ve=_e=>{te.current===null||_e.pointerId!==te.current||We(_e)};return window.addEventListener("pointerup",ve),window.addEventListener("pointercancel",ve),()=>{window.removeEventListener("pointerup",ve),window.removeEventListener("pointercancel",ve)}},[We]);const ot=ve=>{const _e=B.current;if(!w||d<2||!_e||ve.pointerType==="mouse"&&ve.button!==0)return;ne.current=null,ue.current=0,Y.current&&ge(!1);let ze=0;const Qe=I.current;if(A&&Qe){const $e=C?Qe.offsetWidth:Qe.offsetHeight;if($e>0){const Ne=AS(Qe,C);let Ye=Q.current;N&&(Ye===0||Ye===d+1)?(Ye=le+1,Q.current=Ye,se(!0),Pe(Ye),ze=0):ze=Ne+Ye*$e,Ie(ze)}}_e.setPointerCapture(ve.pointerId),te.current=ve.pointerId,ee.current={pointerId:ve.pointerId,startClientX:ve.clientX,startClientY:ve.clientY,axes:FS(_e,`${r}-axis-probe`),size:C?_e.offsetWidth:_e.offsetHeight,isActive:!1,baseOffset:ze,offset:ze,lastTime:ve.timeStamp,velocity:0}},qe=ve=>{const _e=ee.current;if(!_e||_e.pointerId!==ve.pointerId)return;if(ve.pointerType==="mouse"&&ve.buttons===0){We(ve);return}const ze=ve.clientX-_e.startClientX,Qe=ve.clientY-_e.startClientY,$e=_e.axes?NS(_e.axes,ze,Qe):{x:ze,y:Qe},Ne=C?$e.x:$e.y,Ye=C?$e.y:$e.x,Ze=_e.baseOffset+Ne;if(!_e.isActive){if(Math.max(Math.abs(Ne),Math.abs(Ye))<TS)return;if(Math.abs(Ye)>Math.abs(Ne)){const it=B.current;it!=null&&it.hasPointerCapture(_e.pointerId)&&it.releasePointerCapture(_e.pointerId),ee.current=null,te.current=null,A&&Ie(0);return}_e.isActive=!0,fe(!0)}const st=ve.timeStamp-_e.lastTime;st>0&&(_e.velocity=(Ze-_e.offset)/st,_e.lastTime=ve.timeStamp),_e.offset=Ze,A&&Ie(Ze)},tt=ve=>{We(ve)},et=C?`translate3d(calc(${-be*100}% + ${we}px), 0, 0)`:`translate3d(0, calc(${-be*100}% + ${we}px), 0)`,Ge=N?[c[d-1],...c,c[0]]:c;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:_S(r,n)}}),a.jsxs("div",{className:Ct(`${r}-wrapper`,{[`${r}-transition-reveal`]:g==="reveal",[`${r}-transition-reveal-vertical`]:g==="reveal"&&!C}),onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),children:[a.jsxs("div",{className:`${r}-slider-inner`,style:{backgroundColor:"transparent"},children:[a.jsx("div",{ref:B,className:Ct(`${r}-track`,{[`${r}-track-draggable`]:w,[`${r}-track-draggable-vertical`]:w&&!C}),onPointerDown:ot,onPointerMove:qe,onPointerUp:tt,onPointerCancel:tt,onLostPointerCapture:ve=>{te.current===ve.pointerId&&We(ve)},children:a.jsx("div",{ref:I,className:Ct(`${r}-list`,{[`${r}-list-slide`]:A,[`${r}-list-slide-vertical`]:A&&!C,[`${r}-list-fade`]:!A}),style:A?{transform:et,transition:pe||K?"none":`transform ${So}ms ${Sp}`}:void 0,children:Ge.map((ve,_e)=>{const ze=N?rr(_e-1,d):_e,$e=N&&(_e===0||_e===d+1)?`clone-${_e===0?"start":"end"}`:`slide-${ze}`;return a.jsx("div",{className:Ct(`${r}-slide`,{[`${r}-is-active`]:!A&&ze===le}),children:a.jsx("div",{className:`${r}-slider-item`,children:a.jsx("div",{className:`${r}-img-wrapper`,children:a.jsx("img",{className:Ct(`${r}-slider-image`,{[`${r}-contain`]:ve.image.objectFit==="contain",[`${r}-cover`]:ve.image.objectFit==="cover"}),src:ve.image.url,alt:ve.image.name??"",draggable:!1})})})},$e)})})}),ie&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Ct(`${r}-arrow`,{[`${r}-arrow-prev`]:C,[`${r}-arrow-prev-vertical`]:!C,[`${r}-hover-arrow`]:ae}),style:{color:_,"--arrow-hover-color":G,...re},children:a.jsxs("button",{onClick:ve=>{ve.stopPropagation(),Me(-1)},className:`${r}-arrow-inner`,style:{transform:`translate(${F.scalingValue(z,n)}, ${F.scalingValue(P*(C?1:-1),n)}) rotate(${C?"0deg":"90deg"})`},children:[W&&a.jsx(gn,{url:W,fill:_,hoverFill:G,className:Ct(`${r}-arrow-img`,`${r}-mirror`),style:re}),!W&&a.jsx(fd,{color:_,className:Ct(`${r}-arrow-icon`,`${r}-arrow-img`,`${r}-mirror`)})]})}),a.jsx("div",{className:Ct(`${r}-arrow`,{[`${r}-arrow-next`]:C,[`${r}-arrow-next-vertical`]:!C,[`${r}-hover-arrow`]:ae}),style:{color:_,"--arrow-hover-color":G,...re},children:a.jsxs("button",{className:`${r}-arrow-inner`,onClick:ve=>{ve.stopPropagation(),Me(1)},style:{transform:`translate(${F.scalingValue(z*(C?-1:1),n)}, ${F.scalingValue(P,n)}) rotate(${C?"0deg":"90deg"})`},children:[W&&a.jsx(gn,{url:W,fill:_,hoverFill:G,className:`${r}-arrow-img`,style:re}),!W&&a.jsx(fd,{color:_,className:Ct(`${r}-arrow-icon`,`${r}-arrow-img`)})]})})]}),V&&a.jsx("div",{className:`${r}-click-overlay`,onClick:()=>Me(1)}),j&&a.jsx("div",{className:Ct(`${r}-pagination`,{[`${r}-pagination-inside-bottom`]:C,[`${r}-pagination-inside-left`]:!C}),style:C?{bottom:f(b.inset)}:{left:f(b.inset)},children:a.jsx("div",{className:Ct(`${r}-pagination-inner`,{[`${r}-pagination-vertical`]:!C,[`${r}-animate-dots`]:me}),style:{backgroundColor:D,gap:f(b.gapInactive-b.activeDot+b.dot),...C?{height:f(b.activeDot+b.paddingY*2),paddingTop:f(b.paddingY),paddingBottom:f(b.paddingY),paddingLeft:f(b.paddingActive),paddingRight:f(b.paddingActive)}:{width:f(b.activeDot+b.paddingY*2),paddingLeft:f(b.paddingY),paddingRight:f(b.paddingY),paddingTop:f(b.paddingActive),paddingBottom:f(b.paddingActive)},borderRadius:f(b.borderRadius),transform:`translate(${F.scalingValue(Zo.offset.x,n)}, ${F.scalingValue(Zo.offset.y,n)})`},children:c.map((ve,_e)=>{const ze=_e===le,Qe=ze?b.activeDot:b.dot;return a.jsx("button",{onClick:()=>Se(_e),className:`${r}-pagination-item`,style:{width:f(b.activeDot)},children:a.jsx("div",{className:`${r}-dot`,style:{backgroundColor:ze?L:$,width:f(Qe)}})},_e)})},`${x}-${v}`)})]}),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:F.scalingValue(T,n)}}),a.jsx("div",{className:`${r}-caption-text-wrapper`,children:c.map((ve,_e)=>a.jsx("div",{className:Ct(`${r}-caption-text`,{[`${r}-with-pointer-events`]:_e===le&&n,[`${r}-active`]:_e===le}),style:{...l,width:"max-content",transitionDuration:`${Math.round(So/2)}ms`},children:a.jsx("div",{className:`${r}-caption-text-inner`,style:{"--link-color":E,"--link-hover-color":E,position:"relative",top:F.scalingValue(ws.offset.y,n),left:F.scalingValue(ws.offset.x,n)},children:a.jsx(Yi,{content:ve.imageCaption})})},_e))})]})]})]})}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 WS=`import React, { useCallback, useEffect, useRef, useState } from 'react';
19708
+ `}function HS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o}){const{prefix:r}=F.useScopedStyles(),l=ES(e,n),c=t??[],d=c.length,u=(e==null?void 0:e.trigger)??hd,p=u.sizeType??"drag",y=u.value??hd.value,v=(e==null?void 0:e.direction)??"horizontal",g=(e==null?void 0:e.transition)??"slide",m=(e==null?void 0:e.nav)??"classic",x=(e==null?void 0:e.navSize)??"m",b=RS[x],M=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,f=ve=>F.scalingValue(ve*M,n),S=(e==null?void 0:e.show)??"always",W=(e==null?void 0:e.controls)??null,q=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,z=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,P=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,_=(e==null?void 0:e.controlsColor)??md.color,G=(e==null?void 0:e.controlsHoverColor)??md.hover,$=(e==null?void 0:e.navColor)??Zo.colors.inactive,L=(e==null?void 0:e.navPaginationColor)??Zo.colors.pagination,D=(e==null?void 0:e.navBackgroundColor)??Zo.colors.background,E=(e==null?void 0:e.linkColor)??ws.linkColor,T=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,C=v==="horizontal",V=p==="click",w=p==="drag",U=p==="auto"&&(!n||!!i),I=!n,A=g==="slide",j=m==="classic",ie=S!=="never"&&q>0,ae=S==="on hover",O=F.scalingValue(q,n),re={width:O,height:O,maxWidth:O},N=A&&d>1,[le,J]=s.useState(0),[be,Pe]=s.useState(N?1:0),[ye,ce]=s.useState(!1),[K,se]=s.useState(!1),[pe,fe]=s.useState(!1),[we,Re]=s.useState(0),[me,xe]=s.useState(!1),[Ce,h]=s.useState(!1),Y=s.useRef(!1),Q=s.useRef(be);Q.current=be;const ne=s.useRef(null),ue=s.useRef(0),B=s.useRef(null),R=s.useRef(null),ee=s.useRef(null),te=s.useRef(null),ge=s.useCallback(ve=>{Y.current=ve,ce(ve)},[]),X=s.useCallback(ve=>{if(d<2||ve===0)return;const _e=ve>0?1:-1,ze=Math.abs(ve);if(xe(!0),ge(!0),!A){J(st=>rr(st+ve,d));return}let Qe=Q.current;const $e=N&&(Qe===0||Qe===d+1),Ne=$e?le+1:null;$e&&(Qe=le+1);let Ye=ze;for(;Ye>0;){const st=kS(Qe,_e,d,N);if(Qe=st.position,Ye-=1,st.hitBoundary){ue.current=Ye*_e;break}}const Ze=ze-Ye;if(Ze>0&&J(st=>rr(st+Ze*_e,d)),Q.current=Qe,Ne!==null){if(Q.current=Ne,Qe===Ne){se(!0),Pe(Qe);return}ne.current=Qe,se(!0),Pe(Ne);return}se(!1),Pe(Qe)},[le,d,N,A,ge]),Ie=s.useCallback(ve=>{X(ve)},[X]),Se=s.useCallback(ve=>{if(d<2)return;const _e=rr(ve,d);if(!(_e===le&&!Y.current)&&(xe(!0),ge(!0),J(_e),A)){const ze=_e+(N?1:0);ne.current=null,ue.current=0,Q.current=ze,se(!1),Pe(ze)}},[le,d,N,A,ge]);s.useEffect(()=>{if(!ye)return;const ve=window.setTimeout(()=>{if(N&&(be===0||be===d+1)){ne.current=null,se(!0),Pe(le+1);return}ge(!1)},So);return()=>window.clearTimeout(ve)},[le,d,N,ye,ge,be]),s.useEffect(()=>{if(!K)return;let ve=0;const _e=requestAnimationFrame(()=>{ve=requestAnimationFrame(()=>{const ze=ne.current;ne.current=null;const Qe=ue.current;if(ue.current=0,se(!1),ze!==null){Q.current=ze,Pe(ze);return}if(Qe!==0){X(Qe);return}ge(!1)})});return()=>{cancelAnimationFrame(_e),cancelAnimationFrame(ve)}},[X,ge,K]);const Z=`${N}:${d}`,He=s.useRef(Z);s.useEffect(()=>{if(He.current===Z)return;He.current=Z;const ve=d>0?Math.min(le,d-1):0;ee.current=null,te.current=null,fe(!1),Re(0),J(ve),se(!0),Pe(ve+(N?1:0))},[le,d,N,Z]),s.useEffect(()=>{if(!me)return;const ve=window.setTimeout(()=>xe(!1),CS);return()=>window.clearTimeout(ve)},[me,le]),s.useEffect(()=>{if(!U||d<2)return;const ve=Math.max(y,.1)*1e3,_e=window.setInterval(()=>{I&&Ce||Ie(1)},ve);return()=>window.clearInterval(_e)},[y,d,Ie,U,Ce,I]);const We=s.useCallback(ve=>{const _e=ee.current;if(!_e||_e.pointerId!==ve.pointerId)return;ee.current=null,te.current=null;const ze=B.current;if(ze!=null&&ze.hasPointerCapture(ve.pointerId)&&ze.releasePointerCapture(ve.pointerId),!_e.isActive){A&&Re(0);return}const $e=!(ve.timeStamp-_e.lastTime>IS)&&Math.abs(_e.velocity)>PS,Ne=_e.size>0&&Math.abs(_e.offset-_e.baseOffset)>_e.size*LS;if(fe(!1),!$e&&!Ne){Re(0);return}const Ye=Ne?_e.offset-_e.baseOffset:_e.velocity;let Ze=1;Ne&&_e.size>0&&(Ze=Math.max(1,Math.round(Math.abs(Ye)/_e.size))),Re(0),X(Ye<0?Ze:-Ze)},[X,A]);s.useEffect(()=>{const ve=_e=>{te.current===null||_e.pointerId!==te.current||We(_e)};return window.addEventListener("pointerup",ve),window.addEventListener("pointercancel",ve),()=>{window.removeEventListener("pointerup",ve),window.removeEventListener("pointercancel",ve)}},[We]);const ot=ve=>{const _e=B.current;if(!w||d<2||!_e||ve.pointerType==="mouse"&&ve.button!==0)return;ne.current=null,ue.current=0,Y.current&&ge(!1);let ze=0;const Qe=R.current;if(A&&Qe){const $e=C?Qe.offsetWidth:Qe.offsetHeight;if($e>0){const Ne=AS(Qe,C);let Ye=Q.current;N&&(Ye===0||Ye===d+1)?(Ye=le+1,Q.current=Ye,se(!0),Pe(Ye),ze=0):ze=Ne+Ye*$e,Re(ze)}}_e.setPointerCapture(ve.pointerId),te.current=ve.pointerId,ee.current={pointerId:ve.pointerId,startClientX:ve.clientX,startClientY:ve.clientY,axes:FS(_e,`${r}-axis-probe`),size:C?_e.offsetWidth:_e.offsetHeight,isActive:!1,baseOffset:ze,offset:ze,lastTime:ve.timeStamp,velocity:0}},qe=ve=>{const _e=ee.current;if(!_e||_e.pointerId!==ve.pointerId)return;if(ve.pointerType==="mouse"&&ve.buttons===0){We(ve);return}const ze=ve.clientX-_e.startClientX,Qe=ve.clientY-_e.startClientY,$e=_e.axes?NS(_e.axes,ze,Qe):{x:ze,y:Qe},Ne=C?$e.x:$e.y,Ye=C?$e.y:$e.x,Ze=_e.baseOffset+Ne;if(!_e.isActive){if(Math.max(Math.abs(Ne),Math.abs(Ye))<TS)return;if(Math.abs(Ye)>Math.abs(Ne)){const it=B.current;it!=null&&it.hasPointerCapture(_e.pointerId)&&it.releasePointerCapture(_e.pointerId),ee.current=null,te.current=null,A&&Re(0);return}_e.isActive=!0,fe(!0)}const st=ve.timeStamp-_e.lastTime;st>0&&(_e.velocity=(Ze-_e.offset)/st,_e.lastTime=ve.timeStamp),_e.offset=Ze,A&&Re(Ze)},tt=ve=>{We(ve)},et=C?`translate3d(calc(${-be*100}% + ${we}px), 0, 0)`:`translate3d(0, calc(${-be*100}% + ${we}px), 0)`,Ge=N?[c[d-1],...c,c[0]]:c;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:_S(r,n)}}),a.jsxs("div",{className:Ct(`${r}-wrapper`,{[`${r}-transition-reveal`]:g==="reveal",[`${r}-transition-reveal-vertical`]:g==="reveal"&&!C}),onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),children:[a.jsxs("div",{className:`${r}-slider-inner`,style:{backgroundColor:"transparent"},children:[a.jsx("div",{ref:B,className:Ct(`${r}-track`,{[`${r}-track-draggable`]:w,[`${r}-track-draggable-vertical`]:w&&!C}),onPointerDown:ot,onPointerMove:qe,onPointerUp:tt,onPointerCancel:tt,onLostPointerCapture:ve=>{te.current===ve.pointerId&&We(ve)},children:a.jsx("div",{ref:R,className:Ct(`${r}-list`,{[`${r}-list-slide`]:A,[`${r}-list-slide-vertical`]:A&&!C,[`${r}-list-fade`]:!A}),style:A?{transform:et,transition:pe||K?"none":`transform ${So}ms ${Sp}`}:void 0,children:Ge.map((ve,_e)=>{const ze=N?rr(_e-1,d):_e,$e=N&&(_e===0||_e===d+1)?`clone-${_e===0?"start":"end"}`:`slide-${ze}`;return a.jsx("div",{className:Ct(`${r}-slide`,{[`${r}-is-active`]:!A&&ze===le}),children:a.jsx("div",{className:`${r}-slider-item`,children:a.jsx("div",{className:`${r}-img-wrapper`,children:a.jsx("img",{className:Ct(`${r}-slider-image`,{[`${r}-contain`]:ve.image.objectFit==="contain",[`${r}-cover`]:ve.image.objectFit==="cover"}),src:ve.image.url,alt:ve.image.name??"",draggable:!1})})})},$e)})})}),ie&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Ct(`${r}-arrow`,{[`${r}-arrow-prev`]:C,[`${r}-arrow-prev-vertical`]:!C,[`${r}-hover-arrow`]:ae}),style:{color:_,"--arrow-hover-color":G,...re},children:a.jsxs("button",{onClick:ve=>{ve.stopPropagation(),Ie(-1)},className:`${r}-arrow-inner`,style:{transform:`translate(${F.scalingValue(z,n)}, ${F.scalingValue(P*(C?1:-1),n)}) rotate(${C?"0deg":"90deg"})`},children:[W&&a.jsx(gn,{url:W,fill:_,hoverFill:G,className:Ct(`${r}-arrow-img`,`${r}-mirror`),style:re}),!W&&a.jsx(fd,{color:_,className:Ct(`${r}-arrow-icon`,`${r}-arrow-img`,`${r}-mirror`)})]})}),a.jsx("div",{className:Ct(`${r}-arrow`,{[`${r}-arrow-next`]:C,[`${r}-arrow-next-vertical`]:!C,[`${r}-hover-arrow`]:ae}),style:{color:_,"--arrow-hover-color":G,...re},children:a.jsxs("button",{className:`${r}-arrow-inner`,onClick:ve=>{ve.stopPropagation(),Ie(1)},style:{transform:`translate(${F.scalingValue(z*(C?-1:1),n)}, ${F.scalingValue(P,n)}) rotate(${C?"0deg":"90deg"})`},children:[W&&a.jsx(gn,{url:W,fill:_,hoverFill:G,className:`${r}-arrow-img`,style:re}),!W&&a.jsx(fd,{color:_,className:Ct(`${r}-arrow-icon`,`${r}-arrow-img`)})]})})]}),V&&a.jsx("div",{className:`${r}-click-overlay`,onClick:()=>Ie(1)}),j&&a.jsx("div",{className:Ct(`${r}-pagination`,{[`${r}-pagination-inside-bottom`]:C,[`${r}-pagination-inside-left`]:!C}),style:C?{bottom:f(b.inset)}:{left:f(b.inset)},children:a.jsx("div",{className:Ct(`${r}-pagination-inner`,{[`${r}-pagination-vertical`]:!C,[`${r}-animate-dots`]:me}),style:{backgroundColor:D,gap:f(b.gapInactive-b.activeDot+b.dot),...C?{height:f(b.activeDot+b.paddingY*2),paddingTop:f(b.paddingY),paddingBottom:f(b.paddingY),paddingLeft:f(b.paddingActive),paddingRight:f(b.paddingActive)}:{width:f(b.activeDot+b.paddingY*2),paddingLeft:f(b.paddingY),paddingRight:f(b.paddingY),paddingTop:f(b.paddingActive),paddingBottom:f(b.paddingActive)},borderRadius:f(b.borderRadius),transform:`translate(${F.scalingValue(Zo.offset.x,n)}, ${F.scalingValue(Zo.offset.y,n)})`},children:c.map((ve,_e)=>{const ze=_e===le,Qe=ze?b.activeDot:b.dot;return a.jsx("button",{onClick:()=>Se(_e),className:`${r}-pagination-item`,style:{width:f(b.activeDot)},children:a.jsx("div",{className:`${r}-dot`,style:{backgroundColor:ze?L:$,width:f(Qe)}})},_e)})},`${x}-${v}`)})]}),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:F.scalingValue(T,n)}}),a.jsx("div",{className:`${r}-caption-text-wrapper`,children:c.map((ve,_e)=>a.jsx("div",{className:Ct(`${r}-caption-text`,{[`${r}-with-pointer-events`]:_e===le&&n,[`${r}-active`]:_e===le}),style:{...l,width:"max-content",transitionDuration:`${Math.round(So/2)}ms`},children:a.jsx("div",{className:`${r}-caption-text-inner`,style:{"--link-color":E,"--link-hover-color":E,position:"relative",top:F.scalingValue(ws.offset.y,n),left:F.scalingValue(ws.offset.x,n)},children:a.jsx(Yi,{content:ve.imageCaption})})},_e))})]})]})]})}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 WS=`import React, { useCallback, useEffect, useRef, useState } from 'react';
19709
19709
  import cn from 'classnames';
19710
19710
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
19711
19711
  import { scalingValue } from '../utils/scalingValue';
@@ -20886,7 +20886,7 @@ function ArrowIcon({ color, className }: { color: string, className: string }) {
20886
20886
  </svg>
20887
20887
  );
20888
20888
  }
20889
- `,OS={type:"object",version:1,settings:{sizing:"manual",properties:{trigger:{type:"object",scope:"common",title:"Trigger",display:{type:"toggle-cycle-numeric-input",enum:["click","drag","auto"],inputs:{click:"none",drag:"none",auto:"single"},defaultValue:3,showDash:!1},min:1,max:5,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical"]}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["slide","fade in","reveal"]}},nav:{type:"string",scope:"common",title:"Nav",display:{type:"toggle-cycle",enum:["classic","no"]}},navSize:{type:"string",scope:"layout",title:"Nav Size",display:{type:"toggle-cycle",enum:["s","m","l"]}},navUnit:{type:"number",scope:"layout",title:"",display:{type:"numeric-input",visible:!1},min:0,max:1},controls:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},controlsMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},show:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","on hover","never"]}},paddingX:{type:"number",scope:"layout",title:"Padding X",display:{type:"numeric-input"},min:-9999,max:9999},paddingY:{type:"number",scope:"layout",title:"Padding Y",display:{type:"numeric-input"},min:-9999,max:9999},controlsColor:{type:"string",scope:"common",title:"Controls Default",display:{type:"palette-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"palette-color-picker"}},navColor:{type:"string",scope:"common",title:"Dot Nav",display:{type:"palette-color-picker"}},navPaginationColor:{type:"string",scope:"common",title:"Active Nav",display:{type:"palette-color-picker"}},navBackgroundColor:{type:"string",scope:"common",title:"BG Nav",display:{type:"palette-color-picker"}},linkColor:{type:"string",scope:"common",title:"Link Default",display:{type:"palette-color-picker"}},titleColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{type:"object",scope:"common",title:"",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}}},defaults:{trigger:{sizeType:"drag",value:3,min:1,max:5},direction:"horizontal",transition:"slide",nav:"classic",controls:null,show:"always",controlsColor:"#000000",controlsHoverColor:"#3F3F3F",navColor:"#A4A4A4",navPaginationColor:"#FFFFFF",navBackgroundColor:"#000000",linkColor:"#2E12F0",titleColor:"#000000",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{controlsMaxWidth:30/1440,paddingX:0,paddingY:0,captionMarginTop:10/1440,titleFontSize:16/1440,titleLineHeight:16/1440,navSize:"m",navUnit:1/1440},t:{controlsMaxWidth:30/768,paddingX:-10/768,paddingY:0,captionMarginTop:10/768,titleFontSize:16/768,titleLineHeight:16/768,navSize:"m",navUnit:1/768},m:{controlsMaxWidth:30/375,paddingX:-14/375,paddingY:0,captionMarginTop:10/375,titleFontSize:16/375,titleLineHeight:16/375,navSize:"m",navUnit:1/375}},displayRules:[{if:{name:"show",value:"never"},then:{name:"properties.controlsColor.display.visible",value:!1}},{if:{name:"show",value:"never"},then:{name:"properties.controlsHoverColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navPaginationColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navBackgroundColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navSize.display.visible",value:!1}}],layout:["__componentName__","trigger","direction","transition","nav","navSize","controls","controlsMaxWidth","show","paddingX","paddingY","captionMarginTop","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["trigger","direction"]},{type:"row",title:"",items:["transition","nav"]},{type:"row",title:"",items:["navSize"]},{type:"group",title:"Controls",items:[{type:"row",title:"",items:["controls","controlsMaxWidth"]},{type:"row",title:"",items:["paddingX","paddingY"]},{type:"row",title:"",items:["show"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]}]}],paletteBookmark:{items:["controlsColor","controlsHoverColor","navPaginationColor","navColor","navBackgroundColor","titleColor","linkColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"01M3QM74XESYN1HRYH9VRTZ5CK"},imageCaption:[{type:"paragraph",children:[{text:"Earth-orbital mission"}]}]},{image:{objectFit:"cover",url:"01M3QM74XERA3G7J0J00XVKEXX"},imageCaption:[{type:"paragraph",children:[{text:"Salton Sea from Above"}]}]},{image:{objectFit:"cover",url:"01M3QM74XEE2101QD8PM6E4JSA"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module Pilot"}]}]},{image:{objectFit:"cover",url:"01M3QM74XEVZ9F59FC7M9BA63Q"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module 3 porch"}]}]},{image:{objectFit:"cover",url:"01M3QM74XEGBJMJ7Q63KMZY6NA"},imageCaption:[{type:"paragraph",children:[{text:"Command Module"}]}]}]}},DS={element:HS,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:"01M3QM74XGDEQTW8Y71W6D7ANX"},schema:OS,sourceCode:WS,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily"}},po=300/1440,BS=8/1440,ei=.004;function zS(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}`]:F.scalingValue((r-t)/2,i)}}function jS(e){return`
20889
+ `,OS={type:"object",version:1,settings:{sizing:"manual",properties:{trigger:{type:"object",scope:"common",title:"Trigger",display:{type:"toggle-cycle-numeric-input",enum:["click","drag","auto"],inputs:{click:"none",drag:"none",auto:"single"},defaultValue:3,showDash:!1},min:1,max:5,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical"]}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["slide","fade in","reveal"]}},nav:{type:"string",scope:"common",title:"Nav",display:{type:"toggle-cycle",enum:["classic","no"]}},navSize:{type:"string",scope:"layout",title:"Nav Size",display:{type:"toggle-cycle",enum:["s","m","l"]}},navUnit:{type:"number",scope:"layout",title:"",display:{type:"numeric-input",visible:!1},min:0,max:1},controls:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},controlsMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},show:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","on hover","never"]}},paddingX:{type:"number",scope:"layout",title:"Padding X",display:{type:"numeric-input"},min:-9999,max:9999},paddingY:{type:"number",scope:"layout",title:"Padding Y",display:{type:"numeric-input"},min:-9999,max:9999},controlsColor:{type:"string",scope:"common",title:"Controls Default",display:{type:"palette-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"palette-color-picker"}},navColor:{type:"string",scope:"common",title:"Dot Nav",display:{type:"palette-color-picker"}},navPaginationColor:{type:"string",scope:"common",title:"Active Nav",display:{type:"palette-color-picker"}},navBackgroundColor:{type:"string",scope:"common",title:"BG Nav",display:{type:"palette-color-picker"}},linkColor:{type:"string",scope:"common",title:"Link Default",display:{type:"palette-color-picker"}},titleColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{type:"object",scope:"common",title:"",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}}},defaults:{trigger:{sizeType:"drag",value:3,min:1,max:5},direction:"horizontal",transition:"slide",nav:"classic",controls:null,show:"always",controlsColor:"#000000",controlsHoverColor:"#3F3F3F",navColor:"#A4A4A4",navPaginationColor:"#FFFFFF",navBackgroundColor:"#000000",linkColor:"#2E12F0",titleColor:"#000000",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{controlsMaxWidth:30/1440,paddingX:0,paddingY:0,captionMarginTop:10/1440,titleFontSize:16/1440,titleLineHeight:16/1440,navSize:"m",navUnit:1/1440},t:{controlsMaxWidth:30/768,paddingX:-10/768,paddingY:0,captionMarginTop:10/768,titleFontSize:16/768,titleLineHeight:16/768,navSize:"m",navUnit:1/768},m:{controlsMaxWidth:30/375,paddingX:-14/375,paddingY:0,captionMarginTop:10/375,titleFontSize:16/375,titleLineHeight:16/375,navSize:"m",navUnit:1/375}},displayRules:[{if:{name:"show",value:"never"},then:{name:"properties.controlsColor.display.visible",value:!1}},{if:{name:"show",value:"never"},then:{name:"properties.controlsHoverColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navPaginationColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navBackgroundColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navSize.display.visible",value:!1}}],layout:["__componentName__","trigger","direction","transition","nav","navSize","controls","controlsMaxWidth","show","paddingX","paddingY","captionMarginTop","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["trigger","direction"]},{type:"row",title:"",items:["transition","nav"]},{type:"row",title:"",items:["navSize"]},{type:"group",title:"Controls",items:[{type:"row",title:"",items:["controls","controlsMaxWidth"]},{type:"row",title:"",items:["paddingX","paddingY"]},{type:"row",title:"",items:["show"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]}]}],paletteBookmark:{items:["controlsColor","controlsHoverColor","navPaginationColor","navColor","navBackgroundColor","titleColor","linkColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"01M3QM74XESYN1HRYH9VRTZ5CK"},imageCaption:[{type:"paragraph",children:[{text:"Earth-orbital mission"}]}]},{image:{objectFit:"cover",url:"01M3QM74XERA3G7J0J00XVKEXX"},imageCaption:[{type:"paragraph",children:[{text:"Salton Sea from Above"}]}]},{image:{objectFit:"cover",url:"01M3QM74XEE2101QD8PM6E4JSA"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module Pilot"}]}]},{image:{objectFit:"cover",url:"01M3QM74XEVZ9F59FC7M9BA63Q"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module 3 porch"}]}]},{image:{objectFit:"cover",url:"01M3QM74XEGBJMJ7Q63KMZY6NA"},imageCaption:[{type:"paragraph",children:[{text:"Command Module"}]}]}]}},DS={element:HS,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:OS,sourceCode:WS,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily"}},po=300/1440,BS=8/1440,ei=.004;function zS(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}`]:F.scalingValue((r-t)/2,i)}}function jS(e){return`
20890
20890
  .${e}-wrapper {
20891
20891
  box-sizing: border-box;
20892
20892
  display: flex;
@@ -21126,7 +21126,7 @@ function ArrowIcon({ color, className }: { color: string, className: string }) {
21126
21126
  width: var(--cntrl-article-width, 100vw) !important;
21127
21127
  height: var(--cntrl-viewport-height, 100vh) !important;
21128
21128
  }
21129
- `}const wp={"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 VS(e){return e in wp}function GS(e){if(e&&VS(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 wp[e]}const XS="rgba(28,31,34,0.9)",Zn=500,Oi="cubic-bezier(0.22, 1, 0.36, 1)",US=72,qS=50,YS={titleColor:"title-color",descriptionColor:"description-color",lightboxCounterColor:"lightbox-counter-color"},KS=[];function QS(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function ZS(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function JS(e){const[t]=e.media;return t!=null&&t.url?t:null}function ew(e){if(!Array.isArray(e)||e.length===0)return[];if(QS(e)){const t=[];for(const n of e){const i=ZS(n);if(!i)continue;const o=JS(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.url?o:null})}return t}return e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Ks(e){return e.type==="video"}function tw(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 nw(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}const iw=1140/1440;function ow(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 rw(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 aw(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function sw({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()=>{tw(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})}function lw({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:c,counterClassName:d,counterStyle:u,backgroundColor:p}){const y=i==="cover",v=s.useRef(null),g=s.useRef(null),m=s.useRef(null),x=s.useRef(0),b=s.useRef(0),R=s.useRef("none"),f=s.useRef(!1),S=s.useRef(!1),W=s.useRef(!1),q=s.useRef(null),[z,P]=s.useState(null),[_,G]=s.useState("opening"),[$,L]=s.useState(0),[D,E]=s.useState(0),[T,C]=s.useState(!1),[V,w]=s.useState(!1),[U,M]=s.useState(!1),A=s.useRef(n),j=t[n],ie=j?Ks(j):!1,ae=D!==0||T,O=s.useCallback(me=>{W.current=me,C(me)},[]),re=s.useCallback(()=>{q.current!==null&&(window.clearTimeout(q.current),q.current=null)},[]),N=s.useCallback(()=>{re(),q.current=window.setTimeout(()=>{re(),O(!1)},Zn+32)},[re,O]),le=s.useCallback(()=>{const me=v.current,xe=g.current;if(!me)return;const Ce=me.getBoundingClientRect(),h=Ce.width,Y=Ce.height;if(!h||!Y)return;if(i==="cover"){P({width:h,height:Y,left:Ce.left,top:Ce.top});return}if(!xe){P(Zr(me));return}const{width:Q,height:ne}=nw(xe);if(!Q||!ne){P(Zr(me));return}const ue=Q/ne,B=h/Y;if(ue>B){const I=h/ue;P({width:h,height:I,left:Ce.left,top:Ce.top+(Y-I)/2})}else{const I=Y*ue;P({width:I,height:Y,left:Ce.left+(h-I)/2,top:Ce.top})}},[i]);s.useEffect(()=>{le();const me=v.current;if(!me)return;const xe=new ResizeObserver(()=>le());return xe.observe(me),()=>xe.disconnect()},[le,n]),s.useEffect(()=>{_==="opening"&&z&&G("open")},[_,z]),s.useEffect(()=>{if(_!=="closing")return;const me=setTimeout(()=>r(),Zn);return()=>clearTimeout(me)},[_,r]),s.useEffect(()=>()=>{re()},[re]),s.useLayoutEffect(()=>{if(A.current===n)return;re(),L(0),E(0),O(!1),M(!1),w(!1),x.current=0,b.current=0,R.current="none",f.current=!1,m.current=null,S.current=!1;const me=v.current;me&&P(Zr(me)),A.current=n},[n,O,re]),s.useEffect(()=>{if(_!=="open")return;let me=null;const xe=()=>{me&&(document.removeEventListener("click",me,!0),me=null)},Ce=()=>{xe(),me=B=>{B.stopPropagation(),B.preventDefault(),xe()},document.addEventListener("click",me,!0)},h=B=>{re(),W.current=!1,C(!1),E(0),w(!1),f.current=!1,b.current=0,R.current="none";const I=v.current;I&&P(Zr(I)),B<0?c():l()},Y=B=>{if(Math.abs(B)>qS&&t.length>1){h(B);return}O(!0),E(0),N()},Q=B=>{if(B.touches.length!==1||W.current)return;const I=B.touches[0];S.current=!0,m.current={x:I.clientX,y:I.clientY},R.current="none",b.current=0,f.current=!1},ne=B=>{if(!m.current||B.touches.length!==1||W.current)return;const I=B.touches[0],ee=I.clientX-m.current.x,te=I.clientY-m.current.y;if(R.current==="none"){if(Math.abs(ee)<10&&Math.abs(te)<10)return;if(Math.abs(ee)>Math.abs(te)){if(t.length<=1)return;R.current="horizontal"}else if(te>0)R.current="vertical";else return}if(R.current==="horizontal"){f.current=!0,w(!0),b.current=ee,E(ee),B.preventDefault();return}R.current==="vertical"&&(f.current=!0,w(!0),x.current=te,L(te),B.preventDefault())},ue=()=>{if(!m.current)return;const B=R.current,I=f.current;if(I&&B==="horizontal")Y(b.current),Ce();else if(I&&B==="vertical")if(x.current>US){const te=window.innerHeight;x.current=te,M(!0),L(te),G("closing")}else x.current=0,L(0),Ce();else B==="horizontal"&&Math.abs(b.current)>0&&(Y(b.current),Ce());m.current=null,R.current="none",b.current=0,f.current=!1,w(!1)};return document.addEventListener("touchstart",Q,{passive:!0}),document.addEventListener("touchmove",ne,{passive:!1}),document.addEventListener("touchend",ue),document.addEventListener("touchcancel",ue),()=>{document.removeEventListener("touchstart",Q),document.removeEventListener("touchmove",ne),document.removeEventListener("touchend",ue),document.removeEventListener("touchcancel",ue),xe()}},[_,t.length,c,l,O,N,re]),s.useEffect(()=>{const me=xe=>{xe.key==="Escape"&&(xe.preventDefault(),xe.stopPropagation(),_!=="closing"&&G("closing"))};return window.addEventListener("keydown",me,!0),()=>window.removeEventListener("keydown",me,!0)},[_]);const J=()=>{_!=="closing"&&G("closing")},be=_==="open",Pe=_==="closing",ye=$>0?Math.max(0,1-$/500):1,ce=$>0?Math.max(.35,1-$/500):1,K=me=>{if(me.stopPropagation(),S.current){S.current=!1;return}if(t.length<=1)return;const xe=me.currentTarget.getBoundingClientRect(),Ce=me.clientY-xe.top,h=Math.min(52,xe.height*.2);if(!(Ce>xe.height-h)){if(me.clientX-xe.left<xe.width/2){l();return}c()}},se=me=>{if(t.length<=1)return;const xe=me.currentTarget.getBoundingClientRect(),Ce=me.clientX-xe.left,h=me.clientY-xe.top,Y=Math.min(52,xe.height*.2);if(h>xe.height-Y){me.currentTarget.style.cursor="default";return}me.currentTarget.style.cursor=Ce<xe.width/2?"w-resize":"e-resize"},pe=s.useCallback(me=>{me.propertyName!=="transform"||!W.current||(re(),O(!1))},[re,O]),fe=ae?`translateX(${D}px)`:$>0?`translateY(${$}px)`:void 0,we={position:"fixed",top:z==null?void 0:z.top,left:z==null?void 0:z.left,width:z==null?void 0:z.width,height:z==null?void 0:z.height,objectFit:i==="cover"?"cover":"contain",transform:fe,opacity:$>0?ce:_==="opening"||Pe?0:1,transition:V&&!T?"none":T?`transform ${Zn}ms ${Oi}`:U?`transform ${Zn}ms ${Oi}, opacity ${Zn}ms ${Oi}`:_==="opening"||Pe?`opacity ${Zn}ms ${Oi}`:"none",pointerEvents:ie&&be&&!ae?"auto":"none",touchAction:ie&&be?"none":void 0,zIndex:9998},Ie=z?{position:"fixed",top:z.top,height:z.height,width:z.width/2,zIndex:9999}:null;return a.jsxs("div",{className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:_==="open"?"none":void 0},onClick:J,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:p,opacity:be?ye:0,transition:V?"none":`opacity ${Zn}ms ${Oi}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:y?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:v,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:be?1:0,transition:`opacity ${Zn}ms ${Oi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:v,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:be?1:0,transition:`opacity ${Zn}ms ${Oi}`},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]})}),z&&j&&(ie?a.jsx(sw,{src:j.url,phase:_,mediaRef:g,mediaStyle:we,onLoadedMetadata:le,onClick:K,onMouseMove:se,onTransitionEnd:pe},`${n}-${j.url}`):a.jsx("img",{ref:g,src:j.url,alt:j.name,onLoad:le,onTransitionEnd:pe,style:we},`${n}-${j.url}`)),be&&Ie&&t.length>1&&!ie&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Ie,left:z.left,cursor:"w-resize",pointerEvents:ae?"none":"auto"},onClick:me=>{if(S.current){S.current=!1;return}me.stopPropagation(),l()}}),a.jsx("div",{style:{...Ie,left:z.left+z.width/2,cursor:"e-resize",pointerEvents:ae?"none":"auto"},onClick:me=>{if(S.current){S.current=!1;return}me.stopPropagation(),c()}})]})]})}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"}`,v=r.display==="cover",g=rw(r),m=_=>F.scalingValue(_,l??!1),x=n??po,b=o?{width:"100%",maxWidth:"100%"}:{width:m(x),maxWidth:"100%"},R=i?{borderRadius:m(i)}:{},f={...b,...v?{aspectRatio:g,height:"auto",overflow:"hidden"}:{},...R},S={...v?{display:"block",width:"100%",height:"100%",objectFit:"cover",maxWidth:"100%"}:{display:"block",maxWidth:"100%",height:"auto",width:o?"100%":m(x)},...p?{cursor:"pointer",pointerEvents:"auto"}:{},...v?{}:R},q={className:y,style:S,onClick:p?_=>{_.stopPropagation(),p()}:void 0},z=Math.max(c,ei),P=Ks(t)?a.jsx("video",{...q,src:t.url,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):a.jsx("img",{...q,src:t.url,alt:t.name??""});return a.jsxs("div",{className:`${e}-gallery-item`,children:[v?a.jsx("div",{style:f,children:P}):P,d&&c>0&&a.jsx("div",{className:`${e}-padding-handle`,style:{height:m(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:m(z)}})]})}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,v=y>0||d;return a.jsxs("div",{className:`${e}-gallery-controls`,children:[t==="c"&&v&&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"&&v&&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 dw(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:v=!1,showDescriptionPaddingControl:g=!1,descriptionPaddingPaired:m=!1,topPaddingControl:x,bottomPaddingControl:b}){const R=s.useRef(null),[f,S]=s.useState(0),W=t??"",q=n??"",z=q.length>0,{horizontal:P,vertical:_}=Gl(i),G=_==="center"||_==="bottom",$=_==="bottom";s.useLayoutEffect(()=>{if(!G)return;const T=R.current;if(!T||typeof ResizeObserver>"u")return;const C=()=>S(T.offsetHeight);C();const V=new ResizeObserver(C);return V.observe(T),()=>V.disconnect()},[W,q,G]);const L=a.jsx("span",{className:`${e}-title-text`,style:d,children:W}),D=z?a.jsx("span",{className:u,style:p,children:q}):null,E=z?a.jsx("div",{className:`${e}-title-texts-gap`,style:{height:y},children:g&&a.jsx("div",{"data-controls":"titleDescriptionPadding",...m?{"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:T=>{R.current=T,o(T)},className:[r,`${e}-title-h-${P}`,`${e}-title-v-${_}`].join(" "),style:{...G?{[`--${e}-title-height`]:`${f}px`}:{},...l},children:a.jsxs("div",{className:`${e}-title-text-stack`,style:c,children:[x,a.jsx("div",{className:v?`${e}-title-text-inner`:`${e}-title-text-inner-hidden`,style:{width:"100%"},children:a.jsx("div",{className:`${e}-title-texts`,children:$?a.jsxs(a.Fragment,{children:[D,E,L]}):a.jsxs(a.Fragment,{children:[L,E,D]})})}),b]})})}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 uw(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 pw(e,t,n){const{vertical:i}=Gl(t),{top:o,height:r,centerY:l}=uw(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 gw(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=pw(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(gw(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 hw({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,portalId:r}){var dt,Pt;const{prefix:l}=F.useScopedStyles(),c=s.useMemo(()=>jS(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)??po,v=(e==null?void 0:e.titleWidth)??iw,g=ow(e==null?void 0:e.imageDisplay),m=(e==null?void 0:e.cornerRadius)??BS,x=GS(e==null?void 0:e.position),{horizontal:b,vertical:R}=Gl(x),f=(e==null?void 0:e.titleTopPadding)??0,S=(e==null?void 0:e.titleBottomPadding)??0,W=(e==null?void 0:e.titleLeftPadding)??0,q=(e==null?void 0:e.titleRightPadding)??0,z=(e==null?void 0:e.titleDescriptionPadding)??0,P=dw(e==null?void 0:e.transition),_=(e==null?void 0:e.lightbox)??"on",G=p==="b",$=P==="fade"||P==="retype",{setTitleRef:L,dominantIndex:D}=mw(d.length,$,x),E=((dt=d[D])==null?void 0:dt.title)??"",T=((Pt=d[D])==null?void 0:Pt.description)??"",C=Sd(E,P==="retype"),V=Sd(T,P==="retype"),w=P==="fade"||P==="retype",U=P==="retype"?C:E,M=P==="retype"?V:T,A=G?void 0:{width:F.scalingValue(y,n??!1)},j=_==="on"&&(!n||i||o),ie=o??!1,ae=(e==null?void 0:e.galleryPaddingRight)??0,O=(e==null?void 0:e.galleryPaddingLeft)??0,re=(e==null?void 0:e.galleryPaddingBetween)??0,N=St=>F.scalingValue(St,n??!1),J={width:N(v)},be=p==="a"?ae:O,Pe=G?{width:"100%"}:{width:`calc(100% - ${N(y)} - ${N(be)})`,...p==="c"?{marginLeft:"auto"}:{}},ye=Math.max(ae,ei),ce=Math.max(O,ei),K=Math.max(re,ei),se=Math.max(f,ei),pe=Math.max(S,ei),fe=Math.max(W,ei),we=Math.max(q,ei),Ie=Math.max(z,ei),me=Math.max(0,(u??1)-(y??po)),xe=p==="a"?Math.max(0,(u??1)-(y??po)-ae):p==="c"?Math.max(0,(u??1)-(y??po)-O):p==="b"?u??1:1,Ce=ie&&R==="top",h=ie&&R==="bottom",Y=ie&&b==="left",Q=ie&&b==="right",ne=d.length>1,ue=G?void 0:N((p==="c"?O:ae)+(y??po)),B=p==="c"&&ue?{left:ue}:void 0,I=p==="a"&&ue?{right:ue}:void 0,ee=G?{left:0,width:"100%"}:p==="a"?{right:N(ae),width:N(y)}:{left:N(O),width:N(y)},{titleColor:te,titleFontFamily:ge,titleFontSettings:X,titleFontSize:Me,titleLineHeight:Se,titleLetterSpacing:Z,titleWordSpacing:He,titleAlign:We,titleTextAppearance:ot,descriptionColor:qe,descriptionFontFamily:tt,descriptionFontSettings:et,descriptionFontSize:Ge,descriptionLineHeight:ve,descriptionLetterSpacing:_e,descriptionWordSpacing:ze,descriptionAlign:Qe,descriptionTextAppearance:$e,lightboxCounterColor:Ne,lightboxCounterFontFamily:Ye,lightboxCounterFontSettings:Ze,lightboxCounterFontSize:st,lightboxCounterLineHeight:it,lightboxCounterLetterSpacing:Oe,lightboxCounterWordSpacing:Ae,lightboxCounterTextAppearance:mt}=e??{},Be={fontSettings:{fontFamily:ge,fontWeight:(X==null?void 0:X.fontWeight)??400,fontStyle:(X==null?void 0:X.fontStyle)??"normal"},fontSize:Me??.01,lineHeight:Se,letterSpacing:Z??0,wordSpacing:He??0,textAlign:We??"left",textAppearance:ot,color:te??"#000000"},Ue=un(en(Be,n)),ct=J,he={...Cs(Me,Se,l,n),...Cs(Ge,ve,l,n,"description-leading-gap")},Re=$s(Me,Se,`${l}-title`,`${l}-text-tight-leading`),nt={fontSettings:{fontFamily:tt,fontWeight:(et==null?void 0:et.fontWeight)??400,fontStyle:(et==null?void 0:et.fontStyle)??"normal"},fontSize:Ge??.01,lineHeight:ve,letterSpacing:_e??0,wordSpacing:ze??0,textAlign:Qe??"left",textAppearance:$e,color:qe??"#000000"},pt=un(en(nt,n)),Ve=$s(Ge,ve,`${l}-description-text`,`${l}-description-tight-leading`),vt=N(ie?Ie:z),Mt={fontSettings:{fontFamily:Ye,fontWeight:(Ze==null?void 0:Ze.fontWeight)??400,fontStyle:(Ze==null?void 0:Ze.fontStyle)??"normal"},fontSize:st??.01,lineHeight:it,letterSpacing:Oe??0,wordSpacing:Ae??0,textAppearance:mt,color:Ne??"#DEDDDD"},wt={...un(en(Mt,n)),...Cs(st,it,l,n)},Vt=$s(st,it,`${l}-lightbox-counter`,`${l}-text-tight-leading`),jt=F.buildColorVars(l,{titleColor:te??"#000000",descriptionColor:qe??"#000000",lightboxCounterColor:Ne??"#DEDDDD"},YS,KS),Yt=s.useRef(null),[Kt,It]=s.useState(!1),[zt,on]=s.useState([]),[xt,yt]=s.useState(0),ke=s.useCallback((St,ht)=>{j&&(on(St),yt(ht),It(!0))},[j]),Je=s.useCallback(()=>{It(!1)},[]),rt=s.useMemo(()=>{const St={...jt},ht=Yt.current?getComputedStyle(Yt.current).getPropertyValue("--cntrl-article-width").trim():"";return ht&&(St["--cntrl-article-width"]=ht),St},[jt,Kt]);return s.useEffect(()=>{if(!Kt||_!=="on"||typeof document>"u")return;const St=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=St}},[Kt,_]),s.useEffect(()=>{!n||o||i||It(!1)},[n,o,i]),s.useEffect(()=>{_==="off"&&It(!1)},[_]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),a.jsx("div",{style:jt,children:a.jsxs("div",{ref:Yt,className:`${l}-wrapper`,style:{width:F.scalingValue(u,n??!1),[`--${l}-title-top-padding`]:R==="top"?N(f):void 0,[`--${l}-title-bottom-padding`]:R==="bottom"?N(S):void 0,[`--${l}-title-left-padding`]:b==="left"?N(W):void 0,[`--${l}-title-right-padding`]:b==="right"?N(q):void 0},children:[w&&a.jsx("div",{className:`${l}-single-title-layer`,children:a.jsx(Ts,{P:l,title:U,description:M,position:x,titleRef:()=>{},titleClassName:`${Re} ${l}-single-title`,titleContainerStyle:{...he,...Pe},titleTextBoxStyle:ct,titleStyle:Ue,descriptionClassName:Ve,descriptionStyle:pt,descriptionPadding:vt,showTextBoxOutline:ie,showDescriptionPaddingControl:ie,topPaddingControl:Ce?Jr({P:l,controlKey:"titleTopPadding",scaled:N,height:se,paired:!1,side:"top"}):void 0,bottomPaddingControl:h?Jr({P:l,controlKey:"titleBottomPadding",scaled:N,height:pe,paired:!1,side:"bottom"}):void 0})}),d.map((St,ht)=>{const Wt=ew(St.gallery),Tt=ht<d.length-1,Ot=Wt.filter(kt=>kt.lightboxMedia).map(kt=>kt.lightboxMedia),Gt={P:l,position:x,titleRef:L(ht),titleClassName:Re,titleContainerStyle:he,titleTextBoxStyle:w?{maxWidth:"100%"}:ct,titleStyle:Ue,descriptionClassName:Ve,descriptionStyle:pt,descriptionPadding:vt,showTextBoxOutline:ie&&!w,showDescriptionPaddingControl:ie&&!w,descriptionPaddingPaired:ne,topPaddingControl:Ce&&!w?Jr({P:l,controlKey:"titleTopPadding",scaled:N,height:se,paired:ne,side:"top"}):void 0,bottomPaddingControl:h&&!w?Jr({P:l,controlKey:"titleBottomPadding",scaled:N,height:pe,paired:ne,side:"bottom"}):void 0};return a.jsxs("div",{"data-item-index":ht,className:`${l}-item ${l}-item-${p}`,style:{paddingBottom:Tt?N(re):void 0},children:[Y&&vd({P:l,controlKey:"titleLeftPadding",scaled:N,width:fe,maxFraction:xe,side:"left",paired:ne,anchorStyle:B}),Q&&vd({P:l,controlKey:"titleRightPadding",scaled:N,width:we,maxFraction:xe,side:"right",paired:ne,anchorStyle:I}),ie&&Tt&&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:N(K),...ee}}),G?a.jsxs("div",{className:`${l}-gallery`,children:[a.jsx("div",{className:`${l}-gallery-media`,children:Wt.map(({displayMedia:kt,lightboxMedia:_t},Ft)=>{const ut=_t?Ot.findIndex(H=>H.url===_t.url):-1;return a.jsx(yd,{P:l,media:kt,imgWidth:y||void 0,cornerRadius:m||void 0,imageDisplay:g,isEditor:n,galleryPaddingBetween:re,showPaddingAfter:Ft<Wt.length-1,showControls:ie,onMediaClick:j&&ut>=0?()=>ke(Ot,ut):void 0},`${kt.url}-${Ft}`)})}),a.jsx("div",{className:`${l}-title-layer`,children:a.jsx(Ts,{...Gt,title:w?"":St.title,description:w?"":St.description})})]}):a.jsxs(a.Fragment,{children:[a.jsx(Ts,{...Gt,title:w?"":St.title,description:w?"":St.description}),Wt.length>0&&a.jsx(cw,{P:l,layoutType:p,galleryWidthStyle:A,galleryPaddingRight:ae,galleryPaddingLeft:O,galleryPaddingRightWidth:ye,galleryPaddingLeftWidth:ce,galleryPaddingMaxFraction:me,showControls:ie,scaled:N,children:Wt.map(({displayMedia:kt,lightboxMedia:_t},Ft)=>{const ut=_t?Ot.findIndex(H=>H.url===_t.url):-1;return a.jsx(yd,{P:l,media:kt,cornerRadius:m||void 0,fillGalleryWidth:!0,imageDisplay:g,isEditor:n,galleryPaddingBetween:re,showPaddingAfter:Ft<Wt.length-1,showControls:ie,onMediaClick:j&&ut>=0?()=>ke(Ot,ut):void 0},`${kt.url}-${Ft}`)})})]})]},ht)})]})}),Kt&&_==="on"&&typeof document<"u"&&e&&(()=>{const St=(r?document.getElementById(r):null)??document.body;return Xn.createPortal(a.jsx("div",{style:rt,"data-selection":"none",children:a.jsx(lw,{prefix:l,items:zt,index:xt,imageDisplay:aw(e.lightboxImageDisplay),isEditor:n,onClose:Je,onPrev:()=>yt(ht=>(ht-1+zt.length)%zt.length),onNext:()=>yt(ht=>(ht+1)%zt.length),counterClassName:Vt,counterStyle:wt,backgroundColor:e.backgroundColor??XS})}),St)})()]})}const fw=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
21129
+ `}const wp={"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 VS(e){return e in wp}function GS(e){if(e&&VS(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 wp[e]}const XS="rgba(28,31,34,0.9)",Zn=500,Oi="cubic-bezier(0.22, 1, 0.36, 1)",US=72,qS=50,YS={titleColor:"title-color",descriptionColor:"description-color",lightboxCounterColor:"lightbox-counter-color"},KS=[];function QS(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function ZS(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function JS(e){const[t]=e.media;return t!=null&&t.url?t:null}function ew(e){if(!Array.isArray(e)||e.length===0)return[];if(QS(e)){const t=[];for(const n of e){const i=ZS(n);if(!i)continue;const o=JS(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.url?o:null})}return t}return e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Ks(e){return e.type==="video"}function tw(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 nw(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}const iw=1140/1440;function ow(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 rw(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 aw(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function sw({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()=>{tw(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})}function lw({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:c,counterClassName:d,counterStyle:u,backgroundColor:p}){const y=i==="cover",v=s.useRef(null),g=s.useRef(null),m=s.useRef(null),x=s.useRef(0),b=s.useRef(0),M=s.useRef("none"),f=s.useRef(!1),S=s.useRef(!1),W=s.useRef(!1),q=s.useRef(null),[z,P]=s.useState(null),[_,G]=s.useState("opening"),[$,L]=s.useState(0),[D,E]=s.useState(0),[T,C]=s.useState(!1),[V,w]=s.useState(!1),[U,I]=s.useState(!1),A=s.useRef(n),j=t[n],ie=j?Ks(j):!1,ae=D!==0||T,O=s.useCallback(me=>{W.current=me,C(me)},[]),re=s.useCallback(()=>{q.current!==null&&(window.clearTimeout(q.current),q.current=null)},[]),N=s.useCallback(()=>{re(),q.current=window.setTimeout(()=>{re(),O(!1)},Zn+32)},[re,O]),le=s.useCallback(()=>{const me=v.current,xe=g.current;if(!me)return;const Ce=me.getBoundingClientRect(),h=Ce.width,Y=Ce.height;if(!h||!Y)return;if(i==="cover"){P({width:h,height:Y,left:Ce.left,top:Ce.top});return}if(!xe){P(Zr(me));return}const{width:Q,height:ne}=nw(xe);if(!Q||!ne){P(Zr(me));return}const ue=Q/ne,B=h/Y;if(ue>B){const R=h/ue;P({width:h,height:R,left:Ce.left,top:Ce.top+(Y-R)/2})}else{const R=Y*ue;P({width:R,height:Y,left:Ce.left+(h-R)/2,top:Ce.top})}},[i]);s.useEffect(()=>{le();const me=v.current;if(!me)return;const xe=new ResizeObserver(()=>le());return xe.observe(me),()=>xe.disconnect()},[le,n]),s.useEffect(()=>{_==="opening"&&z&&G("open")},[_,z]),s.useEffect(()=>{if(_!=="closing")return;const me=setTimeout(()=>r(),Zn);return()=>clearTimeout(me)},[_,r]),s.useEffect(()=>()=>{re()},[re]),s.useLayoutEffect(()=>{if(A.current===n)return;re(),L(0),E(0),O(!1),I(!1),w(!1),x.current=0,b.current=0,M.current="none",f.current=!1,m.current=null,S.current=!1;const me=v.current;me&&P(Zr(me)),A.current=n},[n,O,re]),s.useEffect(()=>{if(_!=="open")return;let me=null;const xe=()=>{me&&(document.removeEventListener("click",me,!0),me=null)},Ce=()=>{xe(),me=B=>{B.stopPropagation(),B.preventDefault(),xe()},document.addEventListener("click",me,!0)},h=B=>{re(),W.current=!1,C(!1),E(0),w(!1),f.current=!1,b.current=0,M.current="none";const R=v.current;R&&P(Zr(R)),B<0?c():l()},Y=B=>{if(Math.abs(B)>qS&&t.length>1){h(B);return}O(!0),E(0),N()},Q=B=>{if(B.touches.length!==1||W.current)return;const R=B.touches[0];S.current=!0,m.current={x:R.clientX,y:R.clientY},M.current="none",b.current=0,f.current=!1},ne=B=>{if(!m.current||B.touches.length!==1||W.current)return;const R=B.touches[0],ee=R.clientX-m.current.x,te=R.clientY-m.current.y;if(M.current==="none"){if(Math.abs(ee)<10&&Math.abs(te)<10)return;if(Math.abs(ee)>Math.abs(te)){if(t.length<=1)return;M.current="horizontal"}else if(te>0)M.current="vertical";else return}if(M.current==="horizontal"){f.current=!0,w(!0),b.current=ee,E(ee),B.preventDefault();return}M.current==="vertical"&&(f.current=!0,w(!0),x.current=te,L(te),B.preventDefault())},ue=()=>{if(!m.current)return;const B=M.current,R=f.current;if(R&&B==="horizontal")Y(b.current),Ce();else if(R&&B==="vertical")if(x.current>US){const te=window.innerHeight;x.current=te,I(!0),L(te),G("closing")}else x.current=0,L(0),Ce();else B==="horizontal"&&Math.abs(b.current)>0&&(Y(b.current),Ce());m.current=null,M.current="none",b.current=0,f.current=!1,w(!1)};return document.addEventListener("touchstart",Q,{passive:!0}),document.addEventListener("touchmove",ne,{passive:!1}),document.addEventListener("touchend",ue),document.addEventListener("touchcancel",ue),()=>{document.removeEventListener("touchstart",Q),document.removeEventListener("touchmove",ne),document.removeEventListener("touchend",ue),document.removeEventListener("touchcancel",ue),xe()}},[_,t.length,c,l,O,N,re]),s.useEffect(()=>{const me=xe=>{xe.key==="Escape"&&(xe.preventDefault(),xe.stopPropagation(),_!=="closing"&&G("closing"))};return window.addEventListener("keydown",me,!0),()=>window.removeEventListener("keydown",me,!0)},[_]);const J=()=>{_!=="closing"&&G("closing")},be=_==="open",Pe=_==="closing",ye=$>0?Math.max(0,1-$/500):1,ce=$>0?Math.max(.35,1-$/500):1,K=me=>{if(me.stopPropagation(),S.current){S.current=!1;return}if(t.length<=1)return;const xe=me.currentTarget.getBoundingClientRect(),Ce=me.clientY-xe.top,h=Math.min(52,xe.height*.2);if(!(Ce>xe.height-h)){if(me.clientX-xe.left<xe.width/2){l();return}c()}},se=me=>{if(t.length<=1)return;const xe=me.currentTarget.getBoundingClientRect(),Ce=me.clientX-xe.left,h=me.clientY-xe.top,Y=Math.min(52,xe.height*.2);if(h>xe.height-Y){me.currentTarget.style.cursor="default";return}me.currentTarget.style.cursor=Ce<xe.width/2?"w-resize":"e-resize"},pe=s.useCallback(me=>{me.propertyName!=="transform"||!W.current||(re(),O(!1))},[re,O]),fe=ae?`translateX(${D}px)`:$>0?`translateY(${$}px)`:void 0,we={position:"fixed",top:z==null?void 0:z.top,left:z==null?void 0:z.left,width:z==null?void 0:z.width,height:z==null?void 0:z.height,objectFit:i==="cover"?"cover":"contain",transform:fe,opacity:$>0?ce:_==="opening"||Pe?0:1,transition:V&&!T?"none":T?`transform ${Zn}ms ${Oi}`:U?`transform ${Zn}ms ${Oi}, opacity ${Zn}ms ${Oi}`:_==="opening"||Pe?`opacity ${Zn}ms ${Oi}`:"none",pointerEvents:ie&&be&&!ae?"auto":"none",touchAction:ie&&be?"none":void 0,zIndex:9998},Re=z?{position:"fixed",top:z.top,height:z.height,width:z.width/2,zIndex:9999}:null;return a.jsxs("div",{className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:_==="open"?"none":void 0},onClick:J,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:p,opacity:be?ye:0,transition:V?"none":`opacity ${Zn}ms ${Oi}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:y?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:v,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:be?1:0,transition:`opacity ${Zn}ms ${Oi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:v,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:be?1:0,transition:`opacity ${Zn}ms ${Oi}`},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]})}),z&&j&&(ie?a.jsx(sw,{src:j.url,phase:_,mediaRef:g,mediaStyle:we,onLoadedMetadata:le,onClick:K,onMouseMove:se,onTransitionEnd:pe},`${n}-${j.url}`):a.jsx("img",{ref:g,src:j.url,alt:j.name,onLoad:le,onTransitionEnd:pe,style:we},`${n}-${j.url}`)),be&&Re&&t.length>1&&!ie&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Re,left:z.left,cursor:"w-resize",pointerEvents:ae?"none":"auto"},onClick:me=>{if(S.current){S.current=!1;return}me.stopPropagation(),l()}}),a.jsx("div",{style:{...Re,left:z.left+z.width/2,cursor:"e-resize",pointerEvents:ae?"none":"auto"},onClick:me=>{if(S.current){S.current=!1;return}me.stopPropagation(),c()}})]})]})}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"}`,v=r.display==="cover",g=rw(r),m=_=>F.scalingValue(_,l??!1),x=n??po,b=o?{width:"100%",maxWidth:"100%"}:{width:m(x),maxWidth:"100%"},M=i?{borderRadius:m(i)}:{},f={...b,...v?{aspectRatio:g,height:"auto",overflow:"hidden"}:{},...M},S={...v?{display:"block",width:"100%",height:"100%",objectFit:"cover",maxWidth:"100%"}:{display:"block",maxWidth:"100%",height:"auto",width:o?"100%":m(x)},...p?{cursor:"pointer",pointerEvents:"auto"}:{},...v?{}:M},q={className:y,style:S,onClick:p?_=>{_.stopPropagation(),p()}:void 0},z=Math.max(c,ei),P=Ks(t)?a.jsx("video",{...q,src:t.url,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):a.jsx("img",{...q,src:t.url,alt:t.name??""});return a.jsxs("div",{className:`${e}-gallery-item`,children:[v?a.jsx("div",{style:f,children:P}):P,d&&c>0&&a.jsx("div",{className:`${e}-padding-handle`,style:{height:m(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:m(z)}})]})}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,v=y>0||d;return a.jsxs("div",{className:`${e}-gallery-controls`,children:[t==="c"&&v&&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"&&v&&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 dw(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:v=!1,showDescriptionPaddingControl:g=!1,descriptionPaddingPaired:m=!1,topPaddingControl:x,bottomPaddingControl:b}){const M=s.useRef(null),[f,S]=s.useState(0),W=t??"",q=n??"",z=q.length>0,{horizontal:P,vertical:_}=Gl(i),G=_==="center"||_==="bottom",$=_==="bottom";s.useLayoutEffect(()=>{if(!G)return;const T=M.current;if(!T||typeof ResizeObserver>"u")return;const C=()=>S(T.offsetHeight);C();const V=new ResizeObserver(C);return V.observe(T),()=>V.disconnect()},[W,q,G]);const L=a.jsx("span",{className:`${e}-title-text`,style:d,children:W}),D=z?a.jsx("span",{className:u,style:p,children:q}):null,E=z?a.jsx("div",{className:`${e}-title-texts-gap`,style:{height:y},children:g&&a.jsx("div",{"data-controls":"titleDescriptionPadding",...m?{"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:T=>{M.current=T,o(T)},className:[r,`${e}-title-h-${P}`,`${e}-title-v-${_}`].join(" "),style:{...G?{[`--${e}-title-height`]:`${f}px`}:{},...l},children:a.jsxs("div",{className:`${e}-title-text-stack`,style:c,children:[x,a.jsx("div",{className:v?`${e}-title-text-inner`:`${e}-title-text-inner-hidden`,style:{width:"100%"},children:a.jsx("div",{className:`${e}-title-texts`,children:$?a.jsxs(a.Fragment,{children:[D,E,L]}):a.jsxs(a.Fragment,{children:[L,E,D]})})}),b]})})}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 uw(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 pw(e,t,n){const{vertical:i}=Gl(t),{top:o,height:r,centerY:l}=uw(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 gw(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=pw(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(gw(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 hw({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,portalId:r}){var dt,Pt;const{prefix:l}=F.useScopedStyles(),c=s.useMemo(()=>jS(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)??po,v=(e==null?void 0:e.titleWidth)??iw,g=ow(e==null?void 0:e.imageDisplay),m=(e==null?void 0:e.cornerRadius)??BS,x=GS(e==null?void 0:e.position),{horizontal:b,vertical:M}=Gl(x),f=(e==null?void 0:e.titleTopPadding)??0,S=(e==null?void 0:e.titleBottomPadding)??0,W=(e==null?void 0:e.titleLeftPadding)??0,q=(e==null?void 0:e.titleRightPadding)??0,z=(e==null?void 0:e.titleDescriptionPadding)??0,P=dw(e==null?void 0:e.transition),_=(e==null?void 0:e.lightbox)??"on",G=p==="b",$=P==="fade"||P==="retype",{setTitleRef:L,dominantIndex:D}=mw(d.length,$,x),E=((dt=d[D])==null?void 0:dt.title)??"",T=((Pt=d[D])==null?void 0:Pt.description)??"",C=Sd(E,P==="retype"),V=Sd(T,P==="retype"),w=P==="fade"||P==="retype",U=P==="retype"?C:E,I=P==="retype"?V:T,A=G?void 0:{width:F.scalingValue(y,n??!1)},j=_==="on"&&(!n||i||o),ie=o??!1,ae=(e==null?void 0:e.galleryPaddingRight)??0,O=(e==null?void 0:e.galleryPaddingLeft)??0,re=(e==null?void 0:e.galleryPaddingBetween)??0,N=St=>F.scalingValue(St,n??!1),J={width:N(v)},be=p==="a"?ae:O,Pe=G?{width:"100%"}:{width:`calc(100% - ${N(y)} - ${N(be)})`,...p==="c"?{marginLeft:"auto"}:{}},ye=Math.max(ae,ei),ce=Math.max(O,ei),K=Math.max(re,ei),se=Math.max(f,ei),pe=Math.max(S,ei),fe=Math.max(W,ei),we=Math.max(q,ei),Re=Math.max(z,ei),me=Math.max(0,(u??1)-(y??po)),xe=p==="a"?Math.max(0,(u??1)-(y??po)-ae):p==="c"?Math.max(0,(u??1)-(y??po)-O):p==="b"?u??1:1,Ce=ie&&M==="top",h=ie&&M==="bottom",Y=ie&&b==="left",Q=ie&&b==="right",ne=d.length>1,ue=G?void 0:N((p==="c"?O:ae)+(y??po)),B=p==="c"&&ue?{left:ue}:void 0,R=p==="a"&&ue?{right:ue}:void 0,ee=G?{left:0,width:"100%"}:p==="a"?{right:N(ae),width:N(y)}:{left:N(O),width:N(y)},{titleColor:te,titleFontFamily:ge,titleFontSettings:X,titleFontSize:Ie,titleLineHeight:Se,titleLetterSpacing:Z,titleWordSpacing:He,titleAlign:We,titleTextAppearance:ot,descriptionColor:qe,descriptionFontFamily:tt,descriptionFontSettings:et,descriptionFontSize:Ge,descriptionLineHeight:ve,descriptionLetterSpacing:_e,descriptionWordSpacing:ze,descriptionAlign:Qe,descriptionTextAppearance:$e,lightboxCounterColor:Ne,lightboxCounterFontFamily:Ye,lightboxCounterFontSettings:Ze,lightboxCounterFontSize:st,lightboxCounterLineHeight:it,lightboxCounterLetterSpacing:Oe,lightboxCounterWordSpacing:Ae,lightboxCounterTextAppearance:mt}=e??{},Be={fontSettings:{fontFamily:ge,fontWeight:(X==null?void 0:X.fontWeight)??400,fontStyle:(X==null?void 0:X.fontStyle)??"normal"},fontSize:Ie??.01,lineHeight:Se,letterSpacing:Z??0,wordSpacing:He??0,textAlign:We??"left",textAppearance:ot,color:te??"#000000"},Ue=un(en(Be,n)),ct=J,he={...Cs(Ie,Se,l,n),...Cs(Ge,ve,l,n,"description-leading-gap")},Me=$s(Ie,Se,`${l}-title`,`${l}-text-tight-leading`),nt={fontSettings:{fontFamily:tt,fontWeight:(et==null?void 0:et.fontWeight)??400,fontStyle:(et==null?void 0:et.fontStyle)??"normal"},fontSize:Ge??.01,lineHeight:ve,letterSpacing:_e??0,wordSpacing:ze??0,textAlign:Qe??"left",textAppearance:$e,color:qe??"#000000"},pt=un(en(nt,n)),Ve=$s(Ge,ve,`${l}-description-text`,`${l}-description-tight-leading`),vt=N(ie?Re:z),It={fontSettings:{fontFamily:Ye,fontWeight:(Ze==null?void 0:Ze.fontWeight)??400,fontStyle:(Ze==null?void 0:Ze.fontStyle)??"normal"},fontSize:st??.01,lineHeight:it,letterSpacing:Oe??0,wordSpacing:Ae??0,textAppearance:mt,color:Ne??"#DEDDDD"},wt={...un(en(It,n)),...Cs(st,it,l,n)},Vt=$s(st,it,`${l}-lightbox-counter`,`${l}-text-tight-leading`),jt=F.buildColorVars(l,{titleColor:te??"#000000",descriptionColor:qe??"#000000",lightboxCounterColor:Ne??"#DEDDDD"},YS,KS),Yt=s.useRef(null),[Kt,Rt]=s.useState(!1),[zt,on]=s.useState([]),[xt,yt]=s.useState(0),ke=s.useCallback((St,ht)=>{j&&(on(St),yt(ht),Rt(!0))},[j]),Je=s.useCallback(()=>{Rt(!1)},[]),rt=s.useMemo(()=>{const St={...jt},ht=Yt.current?getComputedStyle(Yt.current).getPropertyValue("--cntrl-article-width").trim():"";return ht&&(St["--cntrl-article-width"]=ht),St},[jt,Kt]);return s.useEffect(()=>{if(!Kt||_!=="on"||typeof document>"u")return;const St=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=St}},[Kt,_]),s.useEffect(()=>{!n||o||i||Rt(!1)},[n,o,i]),s.useEffect(()=>{_==="off"&&Rt(!1)},[_]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),a.jsx("div",{style:jt,children:a.jsxs("div",{ref:Yt,className:`${l}-wrapper`,style:{width:F.scalingValue(u,n??!1),[`--${l}-title-top-padding`]:M==="top"?N(f):void 0,[`--${l}-title-bottom-padding`]:M==="bottom"?N(S):void 0,[`--${l}-title-left-padding`]:b==="left"?N(W):void 0,[`--${l}-title-right-padding`]:b==="right"?N(q):void 0},children:[w&&a.jsx("div",{className:`${l}-single-title-layer`,children:a.jsx(Ts,{P:l,title:U,description:I,position:x,titleRef:()=>{},titleClassName:`${Me} ${l}-single-title`,titleContainerStyle:{...he,...Pe},titleTextBoxStyle:ct,titleStyle:Ue,descriptionClassName:Ve,descriptionStyle:pt,descriptionPadding:vt,showTextBoxOutline:ie,showDescriptionPaddingControl:ie,topPaddingControl:Ce?Jr({P:l,controlKey:"titleTopPadding",scaled:N,height:se,paired:!1,side:"top"}):void 0,bottomPaddingControl:h?Jr({P:l,controlKey:"titleBottomPadding",scaled:N,height:pe,paired:!1,side:"bottom"}):void 0})}),d.map((St,ht)=>{const Wt=ew(St.gallery),Tt=ht<d.length-1,Ot=Wt.filter(kt=>kt.lightboxMedia).map(kt=>kt.lightboxMedia),Gt={P:l,position:x,titleRef:L(ht),titleClassName:Me,titleContainerStyle:he,titleTextBoxStyle:w?{maxWidth:"100%"}:ct,titleStyle:Ue,descriptionClassName:Ve,descriptionStyle:pt,descriptionPadding:vt,showTextBoxOutline:ie&&!w,showDescriptionPaddingControl:ie&&!w,descriptionPaddingPaired:ne,topPaddingControl:Ce&&!w?Jr({P:l,controlKey:"titleTopPadding",scaled:N,height:se,paired:ne,side:"top"}):void 0,bottomPaddingControl:h&&!w?Jr({P:l,controlKey:"titleBottomPadding",scaled:N,height:pe,paired:ne,side:"bottom"}):void 0};return a.jsxs("div",{"data-item-index":ht,className:`${l}-item ${l}-item-${p}`,style:{paddingBottom:Tt?N(re):void 0},children:[Y&&vd({P:l,controlKey:"titleLeftPadding",scaled:N,width:fe,maxFraction:xe,side:"left",paired:ne,anchorStyle:B}),Q&&vd({P:l,controlKey:"titleRightPadding",scaled:N,width:we,maxFraction:xe,side:"right",paired:ne,anchorStyle:R}),ie&&Tt&&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:N(K),...ee}}),G?a.jsxs("div",{className:`${l}-gallery`,children:[a.jsx("div",{className:`${l}-gallery-media`,children:Wt.map(({displayMedia:kt,lightboxMedia:_t},Ft)=>{const ut=_t?Ot.findIndex(H=>H.url===_t.url):-1;return a.jsx(yd,{P:l,media:kt,imgWidth:y||void 0,cornerRadius:m||void 0,imageDisplay:g,isEditor:n,galleryPaddingBetween:re,showPaddingAfter:Ft<Wt.length-1,showControls:ie,onMediaClick:j&&ut>=0?()=>ke(Ot,ut):void 0},`${kt.url}-${Ft}`)})}),a.jsx("div",{className:`${l}-title-layer`,children:a.jsx(Ts,{...Gt,title:w?"":St.title,description:w?"":St.description})})]}):a.jsxs(a.Fragment,{children:[a.jsx(Ts,{...Gt,title:w?"":St.title,description:w?"":St.description}),Wt.length>0&&a.jsx(cw,{P:l,layoutType:p,galleryWidthStyle:A,galleryPaddingRight:ae,galleryPaddingLeft:O,galleryPaddingRightWidth:ye,galleryPaddingLeftWidth:ce,galleryPaddingMaxFraction:me,showControls:ie,scaled:N,children:Wt.map(({displayMedia:kt,lightboxMedia:_t},Ft)=>{const ut=_t?Ot.findIndex(H=>H.url===_t.url):-1;return a.jsx(yd,{P:l,media:kt,cornerRadius:m||void 0,fillGalleryWidth:!0,imageDisplay:g,isEditor:n,galleryPaddingBetween:re,showPaddingAfter:Ft<Wt.length-1,showControls:ie,onMediaClick:j&&ut>=0?()=>ke(Ot,ut):void 0},`${kt.url}-${Ft}`)})})]})]},ht)})]})}),Kt&&_==="on"&&typeof document<"u"&&e&&(()=>{const St=(r?document.getElementById(r):null)??document.body;return Xn.createPortal(a.jsx("div",{style:rt,"data-selection":"none",children:a.jsx(lw,{prefix:l,items:zt,index:xt,imageDisplay:aw(e.lightboxImageDisplay),isEditor:n,onClose:Je,onPrev:()=>yt(ht=>(ht-1+zt.length)%zt.length),onNext:()=>yt(ht=>(ht+1)%zt.length),counterClassName:Vt,counterStyle:wt,backgroundColor:e.backgroundColor??XS})}),St)})()]})}const fw=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
21130
21130
  import { createPortal } from 'react-dom';
21131
21131
  import type React from 'react';
21132
21132
  import { CommonComponentProps } from '../props';
@@ -23424,7 +23424,7 @@ export function Mercury({
23424
23424
  </>
23425
23425
  );
23426
23426
  }
23427
- `;function fi(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"}}},yw={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},description:{type:"string",label:"Description",placeholder:"Add Description...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:[{title:"AX-2 Space Suit",description:"Pressure garment and life support",gallery:[{media:[{url:"01M3QM74XFEM0SKERMGHMJ3Q2W",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XG5SKREDC1KS41Y9E7",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XGZAMX3BJWP2GWPG2V",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XGWVQPRZ334BZBJ0MN",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XG89JTWMZ3JE9DMV05",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XGTT2Q8FRDTYX62W0H",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]},{title:"Earth-orbital mission",description:"Hasselblad documentation series",gallery:[{media:[{url:"01M3QM74XESYN1HRYH9VRTZ5CK",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]},{title:"Salton Sea from Above",description:"Aerial survey, California",gallery:[{media:[{url:"01M3QM74XERA3G7J0J00XVKEXX",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XGK74ANMH9PH0YAYCY",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XGSP2F13EM5TFRQZGJ",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XGJPAGBPVYJSM3TV07",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XF9TBBQMH8393VK14S",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XG5BANHQ2F7FV8KXSG",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XGTS00H47RCAKVNGE3",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]}]},settings:{sizing:"auto auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},imgWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},titleWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},galleryPaddingRight:fi("Gallery Padding Right"),galleryPaddingLeft:fi("Gallery Padding Left"),galleryPaddingBetween:fi("Gallery Padding Between"),cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},position:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left-top","top-center","top-right","left-center","center","right-center","left-bottom","bottom-center","right-bottom"]}},titleTopPadding:fi("Title Top Padding"),titleBottomPadding:fi("Title Bottom Padding"),titleLeftPadding:fi("Title Left Padding"),titleRightPadding:fi("Title Right Padding"),titleDescriptionPadding:fi("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"]}},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",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},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},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}},displayRules:[{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}}],layout:["__componentName__","type","wrapperWidth","imgWidth","titleWidth","imageDisplay","cornerRadius","position","transition","lightbox","lightboxImageDisplay"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",items:["wrapperWidth","imgWidth"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",title:"Title",items:["position","transition"]},"titleWidth",{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",items:["backgroundColor"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleAlign","titleTextAppearance"]},{type:"group",title:"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"],panelIds:["general","typeStyle"]}},vw={element:hw,id:"mercury",name:"Mercury",category:"lists",layoutMode:"structured",version:1,defaultSize:{d:{width:720,height:540}},preview:{type:"image",url:"01M3QM74XGMQ91TP81WB81ZP6V"},schema:yw,sourceCode:fw,assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"descriptionFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",descriptionFontSettings:"descriptionFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"}},xw=10,bw=400,Sw=1,ww=1120/1440,$w=140/1440,Cw=550/1440,Tw=13,Lw=4,Pw=38/100,Mw=28/100,$p=2.8,Iw=.9,Cp=.22,Rw=.5,Ew=1,kw=1.5,Aw=0,Fw=.85;function Nw(e){return`
23427
+ `;function fi(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"}}},yw={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},description:{type:"string",label:"Description",placeholder:"Add Description...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:[{title:"AX-2 Space Suit",description:"Pressure garment and life support",gallery:[{media:[{url:"01M3QM74XFEM0SKERMGHMJ3Q2W",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XG5SKREDC1KS41Y9E7",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XGZAMX3BJWP2GWPG2V",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XGWVQPRZ334BZBJ0MN",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XG89JTWMZ3JE9DMV05",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XGTT2Q8FRDTYX62W0H",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]},{title:"Earth-orbital mission",description:"Hasselblad documentation series",gallery:[{media:[{url:"01M3QM74XESYN1HRYH9VRTZ5CK",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]},{title:"Salton Sea from Above",description:"Aerial survey, California",gallery:[{media:[{url:"01M3QM74XERA3G7J0J00XVKEXX",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XGK74ANMH9PH0YAYCY",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XGSP2F13EM5TFRQZGJ",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XGJPAGBPVYJSM3TV07",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XF9TBBQMH8393VK14S",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XG5BANHQ2F7FV8KXSG",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"01M3QM74XGTS00H47RCAKVNGE3",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]}]},settings:{sizing:"auto auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},imgWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},titleWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},galleryPaddingRight:fi("Gallery Padding Right"),galleryPaddingLeft:fi("Gallery Padding Left"),galleryPaddingBetween:fi("Gallery Padding Between"),cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},position:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left-top","top-center","top-right","left-center","center","right-center","left-bottom","bottom-center","right-bottom"]}},titleTopPadding:fi("Title Top Padding"),titleBottomPadding:fi("Title Bottom Padding"),titleLeftPadding:fi("Title Left Padding"),titleRightPadding:fi("Title Right Padding"),titleDescriptionPadding:fi("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"]}},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",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},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},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}},displayRules:[{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}}],layout:["__componentName__","type","wrapperWidth","imgWidth","titleWidth","imageDisplay","cornerRadius","position","transition","lightbox","lightboxImageDisplay"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",items:["wrapperWidth","imgWidth"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",title:"Title",items:["position","transition"]},"titleWidth",{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",items:["backgroundColor"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleAlign","titleTextAppearance"]},{type:"group",title:"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"],panelIds:["general","typeStyle"]}},vw={element:hw,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:yw,sourceCode:fw,assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"descriptionFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",descriptionFontSettings:"descriptionFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"}},xw=10,bw=400,Sw=1,ww=1120/1440,$w=140/1440,Cw=550/1440,Tw=13,Lw=4,Pw=38/100,Iw=28/100,$p=2.8,Rw=.9,Cp=.22,Mw=.5,Ew=1,kw=1.5,Aw=0,Fw=.85;function Nw(e){return`
23428
23428
  .${e}-wrapper {
23429
23429
  position: relative;
23430
23430
  box-sizing: border-box;
@@ -23466,7 +23466,7 @@ export function Mercury({
23466
23466
  object-fit: cover;
23467
23467
  object-position: center;
23468
23468
  }
23469
- `}function Tp(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 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 _w(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 Hw(e){const[t,n]=e.ratioValue.split(":").map(Number),i=e.reversed?n:t;return(e.reversed?t:n)/i}function Ww(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.name??"")||/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url??"")}function Lp(e,t){return(1-e)/(1-e*Math.cos(t))}function Ow(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)*Lp(e,i)))}return t||1}function Dw(e,t){return e?1:1+Cp*(.35+t)}function Bw(e,t,n,i){const o=t*Dw(n,i);return Math.max(0,(e-o)/2)}function zw(e,t,n){const i=Lp(e,n);return{offset:Math.sin(n)*i/t,scale:i}}function jw(e,t,n){return e/2+t*n}function Vw(e,t,n){return`translate(calc(${e(t)} - var(--helix-base-w) / 2), -50%) scale(${Tp(n)})`}function Gw(e){return Math.round(e*1e3)}function Pp(e,t,n){const i=Math.cos(e),o=Math.cos(Fw*Math.PI/2);if(i>=o)return n;const r=(i+1)/(o+1);return Tp(t+(n-t)*r)}function Xw(e){return Pp(e,Rw,Ew)}function Uw(e){return Pp(e,kw,Aw)}function qw(e,t){if(!t)return"none";const n=Uw(e);return n<=0?"none":`blur(${n}px)`}function $d(e,t){const n=t*Math.PI*2,{offset:i,scale:o}=zw(e.depthFactor,e.spreadFactor,n),r=jw(e.width,e.orbitRadius,i);return{transform:Vw(e.scaled,r,o),zIndex:Gw(o),opacity:Xw(n),filter:qw(n,e.blurEnabled)}}function Mp(e,t){return(e%t+t)%t}function Yw(e,t){return Xl(e,t)/t}function Xl(e,t){return Mp(e,t)}function Kw(e,t){return Math.floor(e/t)}function Qw(e,t,n,i){return Kw(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 Zw(e,t,n){const i=t/$p,o=n==="left"?-e*i:e*i;return ha(o)}function Jw({settings:e,content:t,isEditor:n,isPreviewMode:i}){const{prefix:o}=F.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,$w),d=Ls(e==null?void 0:e.turnHeight,Cw),u=wd(e==null?void 0:e.itemsPerTurn,Tw,3,40),p=wd(e==null?void 0:e.turns,Lw,1,30),y=Math.min(Iw,Math.max(0,Pw)),v=Math.min(1,Math.max(0,Mw)),g=Math.max(0,(e==null?void 0:e.speed)??$p),m=(e==null?void 0:e.direction)==="left"?"left":"right",x=(e==null?void 0:e.playback)==="scroll"?"scroll":"autoplay",b=(e==null?void 0:e.cornerRadius)??0,R=(e==null?void 0:e.blur)!=="off",f=s.useMemo(()=>_w(e==null?void 0:e.imageDisplay),[e==null?void 0:e.imageDisplay]),S=f.display==="cover",W=N=>F.scalingValue(N,n??!1),q=s.useMemo(()=>Ow(y),[y]),z=s.useMemo(()=>Bw(l,c,S,v),[l,c,S,v]),P=s.useMemo(()=>Nw(o),[o]),_=s.useMemo(()=>({scaled:N=>F.scalingValue(N,n??!1),width:l,orbitRadius:z,depthFactor:y,spreadFactor:q,blurEnabled:R}),[n,l,z,y,q,R]),G=s.useRef([]),$=s.useRef(0),L=s.useMemo(()=>(t??[]).filter(N=>{var le;return!!((le=N.image)!=null&&le.url)}),[t]),D=d/u,E=c*Hw(f),T=Math.min(bw,p*u),C=Sw*u,V=T+C*2,U=Math.max(0,p-1)*d+(u-1)*D,M=g>0,A=x==="scroll"&&M,j=x==="autoplay"&&M&&(n?!!i:!0),ie=j?360/(g*xw):0,ae=L.length===0?0:V,O=s.useMemo(()=>Array.from({length:ae},(N,le)=>Yw(le-C,u)),[ae,C,u]);s.useEffect(()=>{if(!j&&!A)return;const N=r.current;if(!N)return;const le=pe=>{$.current=pe,O.forEach((fe,we)=>{const Ie=G.current[we];if(!Ie)return;const me=$d(_,ha(fe+pe));Ie.style.transform=me.transform,Ie.style.zIndex=String(me.zIndex),Ie.style.opacity=String(me.opacity),Ie.style.filter=me.filter})};if(A){const pe=N.ownerDocument.defaultView??window,fe=()=>{const Ie=N.getBoundingClientRect(),me=pe.innerHeight||N.ownerDocument.documentElement.clientHeight,xe=me+Ie.height;if(xe<=0)return;const Ce=Math.min(1,Math.max(0,(me-Ie.top)/xe));le(Zw(Ce,g,m))};fe(),pe.addEventListener("scroll",fe,{passive:!0,capture:!0}),pe.addEventListener("resize",fe);const we=new ResizeObserver(fe);return we.observe(N),()=>{pe.removeEventListener("scroll",fe,{capture:!0}),pe.removeEventListener("resize",fe),we.disconnect()}}const J=m==="left"?-1:1;let be=null,Pe=null;const ye=pe=>{if(Pe!==null){const fe=(pe-Pe)/1e3/ie*J;$.current=ha($.current+fe)}Pe=pe,le($.current),be=requestAnimationFrame(ye)},ce=()=>{be===null&&(Pe=null,be=requestAnimationFrame(ye))},K=()=>{be!==null&&cancelAnimationFrame(be),be=null},se=new IntersectionObserver(([pe])=>{pe!=null&&pe.isIntersecting?ce():K()});return se.observe(N),()=>{K(),se.disconnect()}},[j,A,O,_,ie,g,m]);const re=j||A?$.current:0;return L.length===0?a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:P}}),a.jsx("div",{className:`${o}-wrapper`,style:{width:W(l)}})]}):a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:P}}),a.jsx("div",{ref:r,className:`${o}-wrapper`,style:{width:W(l),height:W(U)},children:Array.from({length:V},(N,le)=>{const J=le-C,Pe=L[Mp(J,L.length)].image,ye=Xl(J,u),ce=O[le],K=Qw(J,u,d,D),se=v===0?0:(Cd(ye+7.3)-.5)*v*D,pe=S?1:1+(Cd(ye+3.1)-.5)*2*Cp*(.35+v),fe=c*pe,we={"--helix-base-w":W(fe),...S?{"--helix-base-h":W(E)}:{}},Ie={top:W(K+se),...we,...$d(_,ha(ce+re))},me=b>0?{borderRadius:W(b)}:{},xe=S?{...me,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"}:me,Ce=Ww(Pe)?a.jsx("video",{className:`${o}-media`,style:xe,src:Pe.url,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:`${o}-media`,style:xe,src:Pe.url,alt:Pe.name??"",loading:"lazy",decoding:"async"});return a.jsx("div",{ref:h=>{G.current[le]=h},className:S?`${o}-item ${o}-item-cover`:`${o}-item`,style:Ie,children:S?a.jsx("div",{className:`${o}-cover`,style:me,children:Ce}):Ce},`${p}-${u}-${J}`)})})]})}const e$=`import { useEffect, useMemo, useRef, type CSSProperties } from 'react';
23469
+ `}function Tp(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 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 _w(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 Hw(e){const[t,n]=e.ratioValue.split(":").map(Number),i=e.reversed?n:t;return(e.reversed?t:n)/i}function Ww(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.name??"")||/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url??"")}function Lp(e,t){return(1-e)/(1-e*Math.cos(t))}function Ow(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)*Lp(e,i)))}return t||1}function Dw(e,t){return e?1:1+Cp*(.35+t)}function Bw(e,t,n,i){const o=t*Dw(n,i);return Math.max(0,(e-o)/2)}function zw(e,t,n){const i=Lp(e,n);return{offset:Math.sin(n)*i/t,scale:i}}function jw(e,t,n){return e/2+t*n}function Vw(e,t,n){return`translate(calc(${e(t)} - var(--helix-base-w) / 2), -50%) scale(${Tp(n)})`}function Gw(e){return Math.round(e*1e3)}function Pp(e,t,n){const i=Math.cos(e),o=Math.cos(Fw*Math.PI/2);if(i>=o)return n;const r=(i+1)/(o+1);return Tp(t+(n-t)*r)}function Xw(e){return Pp(e,Mw,Ew)}function Uw(e){return Pp(e,kw,Aw)}function qw(e,t){if(!t)return"none";const n=Uw(e);return n<=0?"none":`blur(${n}px)`}function $d(e,t){const n=t*Math.PI*2,{offset:i,scale:o}=zw(e.depthFactor,e.spreadFactor,n),r=jw(e.width,e.orbitRadius,i);return{transform:Vw(e.scaled,r,o),zIndex:Gw(o),opacity:Xw(n),filter:qw(n,e.blurEnabled)}}function Ip(e,t){return(e%t+t)%t}function Yw(e,t){return Xl(e,t)/t}function Xl(e,t){return Ip(e,t)}function Kw(e,t){return Math.floor(e/t)}function Qw(e,t,n,i){return Kw(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 Zw(e,t,n){const i=t/$p,o=n==="left"?-e*i:e*i;return ha(o)}function Jw({settings:e,content:t,isEditor:n,isPreviewMode:i}){const{prefix:o}=F.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,$w),d=Ls(e==null?void 0:e.turnHeight,Cw),u=wd(e==null?void 0:e.itemsPerTurn,Tw,3,40),p=wd(e==null?void 0:e.turns,Lw,1,30),y=Math.min(Rw,Math.max(0,Pw)),v=Math.min(1,Math.max(0,Iw)),g=Math.max(0,(e==null?void 0:e.speed)??$p),m=(e==null?void 0:e.direction)==="left"?"left":"right",x=(e==null?void 0:e.playback)==="scroll"?"scroll":"autoplay",b=(e==null?void 0:e.cornerRadius)??0,M=(e==null?void 0:e.blur)!=="off",f=s.useMemo(()=>_w(e==null?void 0:e.imageDisplay),[e==null?void 0:e.imageDisplay]),S=f.display==="cover",W=N=>F.scalingValue(N,n??!1),q=s.useMemo(()=>Ow(y),[y]),z=s.useMemo(()=>Bw(l,c,S,v),[l,c,S,v]),P=s.useMemo(()=>Nw(o),[o]),_=s.useMemo(()=>({scaled:N=>F.scalingValue(N,n??!1),width:l,orbitRadius:z,depthFactor:y,spreadFactor:q,blurEnabled:M}),[n,l,z,y,q,M]),G=s.useRef([]),$=s.useRef(0),L=s.useMemo(()=>(t??[]).filter(N=>{var le;return!!((le=N.image)!=null&&le.url)}),[t]),D=d/u,E=c*Hw(f),T=Math.min(bw,p*u),C=Sw*u,V=T+C*2,U=Math.max(0,p-1)*d+(u-1)*D,I=g>0,A=x==="scroll"&&I,j=x==="autoplay"&&I&&(n?!!i:!0),ie=j?360/(g*xw):0,ae=L.length===0?0:V,O=s.useMemo(()=>Array.from({length:ae},(N,le)=>Yw(le-C,u)),[ae,C,u]);s.useEffect(()=>{if(!j&&!A)return;const N=r.current;if(!N)return;const le=pe=>{$.current=pe,O.forEach((fe,we)=>{const Re=G.current[we];if(!Re)return;const me=$d(_,ha(fe+pe));Re.style.transform=me.transform,Re.style.zIndex=String(me.zIndex),Re.style.opacity=String(me.opacity),Re.style.filter=me.filter})};if(A){const pe=N.ownerDocument.defaultView??window,fe=()=>{const Re=N.getBoundingClientRect(),me=pe.innerHeight||N.ownerDocument.documentElement.clientHeight,xe=me+Re.height;if(xe<=0)return;const Ce=Math.min(1,Math.max(0,(me-Re.top)/xe));le(Zw(Ce,g,m))};fe(),pe.addEventListener("scroll",fe,{passive:!0,capture:!0}),pe.addEventListener("resize",fe);const we=new ResizeObserver(fe);return we.observe(N),()=>{pe.removeEventListener("scroll",fe,{capture:!0}),pe.removeEventListener("resize",fe),we.disconnect()}}const J=m==="left"?-1:1;let be=null,Pe=null;const ye=pe=>{if(Pe!==null){const fe=(pe-Pe)/1e3/ie*J;$.current=ha($.current+fe)}Pe=pe,le($.current),be=requestAnimationFrame(ye)},ce=()=>{be===null&&(Pe=null,be=requestAnimationFrame(ye))},K=()=>{be!==null&&cancelAnimationFrame(be),be=null},se=new IntersectionObserver(([pe])=>{pe!=null&&pe.isIntersecting?ce():K()});return se.observe(N),()=>{K(),se.disconnect()}},[j,A,O,_,ie,g,m]);const re=j||A?$.current:0;return L.length===0?a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:P}}),a.jsx("div",{className:`${o}-wrapper`,style:{width:W(l)}})]}):a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:P}}),a.jsx("div",{ref:r,className:`${o}-wrapper`,style:{width:W(l),height:W(U)},children:Array.from({length:V},(N,le)=>{const J=le-C,Pe=L[Ip(J,L.length)].image,ye=Xl(J,u),ce=O[le],K=Qw(J,u,d,D),se=v===0?0:(Cd(ye+7.3)-.5)*v*D,pe=S?1:1+(Cd(ye+3.1)-.5)*2*Cp*(.35+v),fe=c*pe,we={"--helix-base-w":W(fe),...S?{"--helix-base-h":W(E)}:{}},Re={top:W(K+se),...we,...$d(_,ha(ce+re))},me=b>0?{borderRadius:W(b)}:{},xe=S?{...me,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"}:me,Ce=Ww(Pe)?a.jsx("video",{className:`${o}-media`,style:xe,src:Pe.url,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:`${o}-media`,style:xe,src:Pe.url,alt:Pe.name??"",loading:"lazy",decoding:"async"});return a.jsx("div",{ref:h=>{G.current[le]=h},className:S?`${o}-item ${o}-item-cover`:`${o}-item`,style:Re,children:S?a.jsx("div",{className:`${o}-cover`,style:me,children:Ce}):Ce},`${p}-${u}-${J}`)})})]})}const e$=`import { useEffect, useMemo, useRef, type CSSProperties } from 'react';
23470
23470
  import { CommonComponentProps } from '../props';
23471
23471
  import { scalingValue } from '../utils/scalingValue';
23472
23472
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -24026,7 +24026,7 @@ export function Helix({
24026
24026
  </>
24027
24027
  );
24028
24028
  }
24029
- `,t$=["01M3QM74XEA13H9Z3AZF1NGY48","01M3QM74XEZJJC5STVP0WF2GN3","01M3QM74XE170PHTE4A34MKNP3","01M3QM74XEZD3SDVVQZ1TF9JPA","01M3QM74XEPJWV4ZR7R3JPS67H"],n$={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]}}}}},default:t$.map(e=>({image:{url:e,name:""}}))},settings:{sizing:"auto auto",properties:{width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},turnHeight:{type:"number",scope:"layout",title:"Turn height",display:{type:"numeric-input"},min:0,max:9999},itemsPerTurn:{type:"number",scope:"common",title:"Per turn",display:{type:"common-numeric-input"},min:3,max:40},turns:{type:"number",scope:"common",title:"Turns",display:{type:"common-numeric-input"},min:1,max:30},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},playback:{type:"string",scope:"common",title:"Playback",display:{type:"toggle-cycle",enum:["autoplay","scroll"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},blur:{type:"string",scope:"common",title:"Blur",display:{type:"toggle-cycle",enum:["on","off"]}}},defaults:{itemsPerTurn:14,turns:3,direction:"right",playback:"autoplay",blur:"off",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1}},layoutDefaults:{d:{defaultPaddingTop:30/1440,width:800/1440,imageWidth:160/1440,turnHeight:380/1440,speed:2.2,cornerRadius:0},m:{defaultPaddingTop:10/375,width:320/375,imageWidth:75/375,turnHeight:310/375,speed:2.8,cornerRadius:0},t:{defaultPaddingTop:20/768,width:620/768,imageWidth:100/768,turnHeight:280/768,speed:2.8,cornerRadius:0}},layout:["__componentName__","width","imageWidth","turnHeight","itemsPerTurn","turns","playback","speed","direction","imageDisplay","cornerRadius","blur"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",items:["direction","speed"]},{type:"row",items:["width"]},{type:"row",items:["imageWidth","turnHeight"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",items:["itemsPerTurn","turns"]},{type:"row",items:["playback","blur"]}]}]},i$={element:Jw,id:"helix",name:"Helix",category:"lists",layoutMode:"structured",preview:{type:"image",url:"01M3QM74XEAV9VYFDKJ386Z0TC"},version:1,defaultSize:{d:{width:720,height:540}},schema:n$,sourceCode:e$,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Cn=300,tn=300,o$=8/1440,mo=.004,r$=50,a$=1440,ji=r$/a$;function s$(e){if(e==="default"||e==="compact"||e==="open")return e;if(e==="onScroll")return"compact"}function l$(e){return e==="center"||e==="right"?e:"left"}function c$(e){return e==="left"||e==="right"?e:"center"}function d$(e,t,n){const i=F.scalingValue(t,n);return e==="center"?`translateX(calc(-50% + ${i}))`:`translateX(${i})`}function u$(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 Ip(e,t){const n=(u$(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 p$(e,t,n){switch(Ip(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 g$(e,t){switch(Ip(e.showIn,t)){case"default and compact":return!1;default:return!0}}function m$(e){return(e==null?void 0:e.find(t=>t.slug===""))??(e==null?void 0:e[0])}function h$(e,t){const n=e?t==null?void 0:t.find(i=>i.id===e):m$(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 Rp(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 Qs(e,t){const n=e.label||"Link",i=Rp(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=h$(i.value,t),r=(i.anchor??"").replace(/^#/,""),l=r?o?`${o}#${r}`:`#${r}`:o;return{label:n,href:l,target:i.target}}const bi=24,xi=bi*.125,Ep=bi*.125,Ps=(bi-(3*xi+2*Ep))/2,Ld=xi+Ep;function f$({className:e,lineClassName:t}){return a.jsxs("svg",{className:e,viewBox:`0 0 ${bi} ${bi}`,"aria-hidden":"true",children:[a.jsx("rect",{className:`${t} ${t}-top`,x:"0",y:Ps,width:bi,height:xi,rx:xi/2}),a.jsx("rect",{className:`${t} ${t}-mid`,x:"0",y:Ps+Ld,width:bi,height:xi,rx:xi/2}),a.jsx("rect",{className:`${t} ${t}-bot`,x:"0",y:Ps+2*Ld,width:bi,height:xi,rx:xi/2})]})}function y$(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function v$(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:F.scalingValue((o-t)/2,i)}}const kp=.004;let er;function x$(){return er!==void 0?er:typeof document>"u"?(er=null,null):(er=document.createElement("canvas").getContext("2d"),er)}function b$(e){const t=getComputedStyle(e),n=parseFloat(t.fontSize)||0;if(n<=0)return 0;const i=x$();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 Pd(e,t){const[n,i]=s.useState(0);return s.useLayoutEffect(()=>{const o=e.current;if(!o)return;const r=()=>{const d=b$(o);i(u=>Math.abs(u-d)<kp?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)<kp))return`translateY(${e}em)`}function Id(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:{...un(en(i,n)),...v$(t.fontSize,t.lineHeight,e,n)},className:y$(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 Ap(e){const n=Math.max(ji,e.fontSize??ji),{start:i,end:o}=Fd(e.textPaddingTop,e.textPaddingBottom,1,n),{start:r,end:l}=Fd(e.textPaddingLeft,e.textPaddingRight,1,ji);return{effectivePaddingLeft:r,effectivePaddingRight:l,effectivePaddingTop:i,effectivePaddingBottom:o,panelSize:1}}function S$(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?S$(e.position):{horizontalAlign:e.horizontalAlign??"left",verticalAlign:e.verticalAlign??"top"}}function $$(e,t){return e.textPaddingLeft!==t.textPaddingLeft||e.textPaddingRight!==t.textPaddingRight||e.textPaddingTop!==t.textPaddingTop||e.textPaddingBottom!==t.textPaddingBottom}const C$=[["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 Fp(e){var o,r;const t=e,n={};for(const[l,c]of C$)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,v,g,m,x,b,R,f,S;e=Fp(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 W=((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;W!==void 0&&(n.openLinkColor=W)}if(e.compactIconColor===void 0){const W=((u=(d=e.stateOverrides)==null?void 0:d.compact)==null?void 0:u.iconColor)??e.iconColor;W!==void 0&&(n.compactIconColor=W)}if(e.compactLinkColor===void 0){const W=((y=(p=e.stateOverrides)==null?void 0:p.compact)==null?void 0:y.linkColor)??e.linkColor;W!==void 0&&(n.compactLinkColor=W)}if(e.compactLogoColor===void 0){const W=((g=(v=e.stateOverrides)==null?void 0:v.compact)==null?void 0:g.logoColor)??e.logoColor;W!==void 0&&(n.compactLogoColor=W)}if(e.openLogoColor===void 0){const W=((x=(m=e.stateOverrides)==null?void 0:m.open)==null?void 0:x.logoColor)??e.logoColor;W!==void 0&&(n.openLogoColor=W)}if(e.compactBackgroundColor===void 0){const W=((R=(b=e.stateOverrides)==null?void 0:b.compact)==null?void 0:R.backgroundColor)??((S=(f=t.stateOverrides)==null?void 0:f.compact)==null?void 0:S.panelColor)??t.compactPanelColor??t.onScrollPanelColor??e.backgroundColor??n.backgroundColor;W!==void 0&&(n.compactBackgroundColor=W)}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=(W,q)=>{if(e[W]!==void 0)return;const z=e[q];z!==void 0&&(n[W]=z)};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 T$(e,t){const n=Ap({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 L$(e,t){return{paddingLeft:F.scalingValue(e.effectivePaddingLeft,t),paddingRight:F.scalingValue(e.effectivePaddingRight,t),paddingTop:F.scalingValue(e.effectivePaddingTop,t),paddingBottom:F.scalingValue(e.effectivePaddingBottom,t)}}function P$(e,t,n,i){const o=Math.max(ji,n??ji),r=Math.max(t.effectivePaddingTop,mo),l=Math.max(t.effectivePaddingBottom,mo),c=Math.max(0,t.panelSize-t.effectivePaddingBottom-o),d=Math.max(0,t.panelSize-t.effectivePaddingTop-o),u=Math.max(t.effectivePaddingLeft,mo),p=Math.max(t.effectivePaddingRight,mo),y=Math.max(0,t.panelSize-t.effectivePaddingRight-ji),v=Math.max(0,t.panelSize-t.effectivePaddingLeft-ji);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(v),className:`${e}-control-anchor`,style:{top:0,right:0,width:i(p),height:"100%"}})]})}const M$={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"},I$=["hover","open"],R$={top:"flex-start",center:"center",bottom:"flex-end"},E$={left:"flex-start",center:"center",right:"flex-end"};function k$(e){return`
24029
+ `,t$=["01M3QM74XEA13H9Z3AZF1NGY48","01M3QM74XEZJJC5STVP0WF2GN3","01M3QM74XE170PHTE4A34MKNP3","01M3QM74XEZD3SDVVQZ1TF9JPA","01M3QM74XEPJWV4ZR7R3JPS67H"],n$={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]}}}}},default:t$.map(e=>({image:{url:e,name:""}}))},settings:{sizing:"auto auto",properties:{width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},turnHeight:{type:"number",scope:"layout",title:"Turn height",display:{type:"numeric-input"},min:0,max:9999},itemsPerTurn:{type:"number",scope:"common",title:"Per turn",display:{type:"common-numeric-input"},min:3,max:40},turns:{type:"number",scope:"common",title:"Turns",display:{type:"common-numeric-input"},min:1,max:30},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},playback:{type:"string",scope:"common",title:"Playback",display:{type:"toggle-cycle",enum:["autoplay","scroll"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},blur:{type:"string",scope:"common",title:"Blur",display:{type:"toggle-cycle",enum:["on","off"]}}},defaults:{itemsPerTurn:14,turns:3,direction:"right",playback:"autoplay",blur:"off",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1}},layoutDefaults:{d:{defaultPaddingTop:30/1440,width:800/1440,imageWidth:160/1440,turnHeight:380/1440,speed:2.2,cornerRadius:0},m:{defaultPaddingTop:10/375,width:320/375,imageWidth:75/375,turnHeight:310/375,speed:2.8,cornerRadius:0},t:{defaultPaddingTop:20/768,width:620/768,imageWidth:100/768,turnHeight:280/768,speed:2.8,cornerRadius:0}},layout:["__componentName__","width","imageWidth","turnHeight","itemsPerTurn","turns","playback","speed","direction","imageDisplay","cornerRadius","blur"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",items:["direction","speed"]},{type:"row",items:["width"]},{type:"row",items:["imageWidth","turnHeight"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",items:["itemsPerTurn","turns"]},{type:"row",items:["playback","blur"]}]}]},i$={element:Jw,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:n$,sourceCode:e$,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Cn=300,tn=300,o$=8/1440,mo=.004,r$=50,a$=1440,ji=r$/a$;function s$(e){if(e==="default"||e==="compact"||e==="open")return e;if(e==="onScroll")return"compact"}function l$(e){return e==="center"||e==="right"?e:"left"}function c$(e){return e==="left"||e==="right"?e:"center"}function d$(e,t,n){const i=F.scalingValue(t,n);return e==="center"?`translateX(calc(-50% + ${i}))`:`translateX(${i})`}function u$(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 Rp(e,t){const n=(u$(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 p$(e,t,n){switch(Rp(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 g$(e,t){switch(Rp(e.showIn,t)){case"default and compact":return!1;default:return!0}}function m$(e){return(e==null?void 0:e.find(t=>t.slug===""))??(e==null?void 0:e[0])}function h$(e,t){const n=e?t==null?void 0:t.find(i=>i.id===e):m$(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 Mp(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 Qs(e,t){const n=e.label||"Link",i=Mp(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=h$(i.value,t),r=(i.anchor??"").replace(/^#/,""),l=r?o?`${o}#${r}`:`#${r}`:o;return{label:n,href:l,target:i.target}}const bi=24,xi=bi*.125,Ep=bi*.125,Ps=(bi-(3*xi+2*Ep))/2,Ld=xi+Ep;function f$({className:e,lineClassName:t}){return a.jsxs("svg",{className:e,viewBox:`0 0 ${bi} ${bi}`,"aria-hidden":"true",children:[a.jsx("rect",{className:`${t} ${t}-top`,x:"0",y:Ps,width:bi,height:xi,rx:xi/2}),a.jsx("rect",{className:`${t} ${t}-mid`,x:"0",y:Ps+Ld,width:bi,height:xi,rx:xi/2}),a.jsx("rect",{className:`${t} ${t}-bot`,x:"0",y:Ps+2*Ld,width:bi,height:xi,rx:xi/2})]})}function y$(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function v$(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:F.scalingValue((o-t)/2,i)}}const kp=.004;let er;function x$(){return er!==void 0?er:typeof document>"u"?(er=null,null):(er=document.createElement("canvas").getContext("2d"),er)}function b$(e){const t=getComputedStyle(e),n=parseFloat(t.fontSize)||0;if(n<=0)return 0;const i=x$();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 Pd(e,t){const[n,i]=s.useState(0);return s.useLayoutEffect(()=>{const o=e.current;if(!o)return;const r=()=>{const d=b$(o);i(u=>Math.abs(u-d)<kp?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 Id(e){if(!(Math.abs(e)<kp))return`translateY(${e}em)`}function Rd(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 Md(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:{...un(en(i,n)),...v$(t.fontSize,t.lineHeight,e,n)},className:y$(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 Ap(e){const n=Math.max(ji,e.fontSize??ji),{start:i,end:o}=Fd(e.textPaddingTop,e.textPaddingBottom,1,n),{start:r,end:l}=Fd(e.textPaddingLeft,e.textPaddingRight,1,ji);return{effectivePaddingLeft:r,effectivePaddingRight:l,effectivePaddingTop:i,effectivePaddingBottom:o,panelSize:1}}function S$(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?S$(e.position):{horizontalAlign:e.horizontalAlign??"left",verticalAlign:e.verticalAlign??"top"}}function $$(e,t){return e.textPaddingLeft!==t.textPaddingLeft||e.textPaddingRight!==t.textPaddingRight||e.textPaddingTop!==t.textPaddingTop||e.textPaddingBottom!==t.textPaddingBottom}const C$=[["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 Fp(e){var o,r;const t=e,n={};for(const[l,c]of C$)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,v,g,m,x,b,M,f,S;e=Fp(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 W=((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;W!==void 0&&(n.openLinkColor=W)}if(e.compactIconColor===void 0){const W=((u=(d=e.stateOverrides)==null?void 0:d.compact)==null?void 0:u.iconColor)??e.iconColor;W!==void 0&&(n.compactIconColor=W)}if(e.compactLinkColor===void 0){const W=((y=(p=e.stateOverrides)==null?void 0:p.compact)==null?void 0:y.linkColor)??e.linkColor;W!==void 0&&(n.compactLinkColor=W)}if(e.compactLogoColor===void 0){const W=((g=(v=e.stateOverrides)==null?void 0:v.compact)==null?void 0:g.logoColor)??e.logoColor;W!==void 0&&(n.compactLogoColor=W)}if(e.openLogoColor===void 0){const W=((x=(m=e.stateOverrides)==null?void 0:m.open)==null?void 0:x.logoColor)??e.logoColor;W!==void 0&&(n.openLogoColor=W)}if(e.compactBackgroundColor===void 0){const W=((M=(b=e.stateOverrides)==null?void 0:b.compact)==null?void 0:M.backgroundColor)??((S=(f=t.stateOverrides)==null?void 0:f.compact)==null?void 0:S.panelColor)??t.compactPanelColor??t.onScrollPanelColor??e.backgroundColor??n.backgroundColor;W!==void 0&&(n.compactBackgroundColor=W)}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=(W,q)=>{if(e[W]!==void 0)return;const z=e[q];z!==void 0&&(n[W]=z)};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 T$(e,t){const n=Ap({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 L$(e,t){return{paddingLeft:F.scalingValue(e.effectivePaddingLeft,t),paddingRight:F.scalingValue(e.effectivePaddingRight,t),paddingTop:F.scalingValue(e.effectivePaddingTop,t),paddingBottom:F.scalingValue(e.effectivePaddingBottom,t)}}function P$(e,t,n,i){const o=Math.max(ji,n??ji),r=Math.max(t.effectivePaddingTop,mo),l=Math.max(t.effectivePaddingBottom,mo),c=Math.max(0,t.panelSize-t.effectivePaddingBottom-o),d=Math.max(0,t.panelSize-t.effectivePaddingTop-o),u=Math.max(t.effectivePaddingLeft,mo),p=Math.max(t.effectivePaddingRight,mo),y=Math.max(0,t.panelSize-t.effectivePaddingRight-ji),v=Math.max(0,t.panelSize-t.effectivePaddingLeft-ji);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(v),className:`${e}-control-anchor`,style:{top:0,right:0,width:i(p),height:"100%"}})]})}const I$={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"},R$=["hover","open"],M$={top:"flex-start",center:"center",bottom:"flex-end"},E$={left:"flex-start",center:"center",right:"flex-end"};function k$(e){return`
24030
24030
  .${e}-root {
24031
24031
  position: relative;
24032
24032
  display: block;
@@ -24686,7 +24686,7 @@ export function Helix({
24686
24686
  word-spacing ${tn}ms ease,
24687
24687
  padding ${tn}ms ease;
24688
24688
  }
24689
- `}function Zs(e){return e?!e.startsWith("http://")&&!e.startsWith("https://")&&!e.startsWith("blob:")&&!e.startsWith("data:"):!1}function A$(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 F$(e){return`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`}function N$(e){const t=e.trim().toLowerCase();return t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")?!0:t.includes(".svg")}function _$(e){const t=N$(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 H$(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 zu(e).then(r=>{o||i(r)}).catch(()=>{o||i(null)}),()=>{o=!0}},[t,e]),t?n:null}function W$(e){const t=e.indexOf("#");if(t===-1)return"";try{return decodeURIComponent(e.slice(t+1))}catch{return e.slice(t+1)}}function O$(e){if(!e||e.startsWith("#"))return!0;try{return new URL(e,window.location.href).pathname===window.location.pathname}catch{return!1}}function Np(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=Np(e);return t?(t.scrollIntoView({behavior:"smooth",block:"start"}),!0):!1}function D$(e,t,n={}){const{isEditor:i,isPreviewMode:o,item:r,pages:l,onLinkNavigate:c}=n,d=n.runAfterClose??(v=>v()),u=e.currentTarget.getAttribute("href")??"",p=W$(u),y=e.currentTarget.target==="_blank";if(r&&c){e.preventDefault(),e.stopPropagation();const v=Qs(r,l),g=Rp(r),m={mode:g.type==="url"?"url":"page",href:v.href||u,page:g.type==="page"?g.value:void 0,url:g.type==="url"?g.value:void 0,anchor:g.type==="anchor"?g.value.replace(/^#/,""):(g.anchor??"").replace(/^#/,""),target:v.target};m.target==="_blank"?c(m):d(()=>c(m)),t();return}if(i){e.preventDefault(),d(()=>_d(p)),t();return}!y&&p&&O$(u)&&Np(p)&&(e.preventDefault(),d(()=>_d(p))),t()}const B$=["--cntrl-article-width","--cntrl-article-top","--cntrl-article-left","--cntrl-viewport-height"];function z$(e){let t=e;for(;t;){if(getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim())return t;t=t.parentElement}return e}function j$(e){const t={},n=z$(e);if(!n)return t;const i=getComputedStyle(n);for(const o of B$){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 V$({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:v}){var tc;const{prefix:g}=F.useScopedStyles(),m=s.useRef(null),x=s.useRef(null),b=s.useRef(null),R=s.useRef(null),f=s.useRef(null),S=s.useRef(0),W=s.useRef(null),q=s.useRef(null),z=s.useRef(d),P=s.useMemo(()=>k$(g),[g]),[_,G]=s.useState(!1),[$,L]=s.useState(!1),[D,E]=s.useState(!1),T=s$(r),C=s.useMemo(()=>new Set(c),[c]),V=Rt=>!!(Rt&&C.has(Rt)),U=!!(t&&!i&&T==="open"&&!V("open"))||!(t&&!i)&&_,M=!!(t&&!i),A=U&&!M;jl(A),s.useEffect(()=>{if(!U||!M)return;const Rt=document.documentElement,Xt=Rt.style.overflow;return Rt.style.overflow="hidden",()=>{Rt.style.overflow=Xt}},[U,M]);const j=!V("compact")&&!V("onScroll"),ie=!t||!!i&&!n,ae=o&&o!=="default"?o:void 0,O=j&&T==="compact"?"compact":"default",[re,N]=s.useState(O),[le,J]=s.useState(!1),be=!n;O!==re&&(N(O),be&&J(!0));const Pe=Fp(e),{logo:ye,logoMaxHeight:ce=120/1440,logoPosition:K="left",panelHeight:se=60/1440,backgroundColor:pe="#b3b3b3",logoColor:fe="#000000",position:we,horizontalAlign:Ie,verticalAlign:me,iconColor:xe="#000000",showIcon:Ce="on",iconSize:h=16/1440,linkColor:Y="#000000",openLinkColor:Q="#000000",compactIconColor:ne="#000000",compactLinkColor:ue="#000000",compactLogoColor:B="#000000",compactBackgroundColor:I="#ffffff",compactLogoMaxHeight:ee=120/1440,compactLogoPosition:te,compactPanelHeight:ge=60/1440,compactShowIcon:X="on",compactIconSize:Me=16/1440,compactNavTextWidth:Se,compactNavTextPosition:Z,compactNavTextOffset:He,compactNavGap:We,compactNavPaddingLeft:ot=10/1440,compactNavPaddingRight:qe=10/1440,compactFontFamily:tt,compactFontSettings:et,compactFontSize:Ge,compactLineHeight:ve,compactLetterSpacing:_e=0,compactWordSpacing:ze=0,compactTextAlign:Qe="left",compactTextAppearance:$e,openLogoColor:Ne="#000000",menuBackgroundColor:Ye="#ffffff",overlayColor:Ze="rgba(0, 0, 0, 0.45)",closeButtonColor:st="#000000",effect:it="fade",openPanelSize:Oe=100,textWidth:Ae=280/1440,navTextWidth:mt,navTextPosition:Be="center",navTextOffset:De=0,gap:Ue=0,navGap:ct,navPaddingLeft:he=10/1440,navPaddingRight:Re=10/1440,textPaddingLeft:nt=10/1440,textPaddingRight:pt=10/1440,textPaddingTop:Ve=10/1440,textPaddingBottom:vt=10/1440,fontFamily:Mt,fontSettings:At,fontSize:wt,lineHeight:Vt,letterSpacing:jt=0,wordSpacing:Yt=0,textAlign:Kt="left",textAppearance:It,openFontFamily:zt,openFontSettings:on,openFontSize:xt,openLineHeight:yt,openLetterSpacing:ke,openWordSpacing:Je,openTextAlign:rt,openTextAppearance:dt,stateOverrides:Pt,link:St}=Pe,{horizontalAlign:ht,verticalAlign:Wt}=w$({position:we,horizontalAlign:Ie,verticalAlign:me}),Tt=O==="compact",Ot=Tt?ee:ce,Gt=l$(Tt?te:K),kt=Tt?ge:se,_t=Tt?Me:h,Ft=Tt?Se:mt,ut=c$(Tt?Z:Be),H=(Tt?He:De)??0,Le=Tt?We:ct,je=Tt?ot:he,Fe=Tt?qe:Re,ft=Ft??Ae,Ht=U||(Tt?X:Ce)!=="off",gt=F.buildColorVars(g,{iconColor:xe,closeButtonColor:st,linkColor:Y,openLinkColor:Q,compactIconColor:ne,compactLinkColor:ue,compactLogoColor:B,compactBackgroundColor:I,openLogoColor:Ne,menuBackgroundColor:Ye,overlayColor:Ze,backgroundColor:pe,logoColor:fe},M$,I$,Pt),Lt=Ed(Tt?{fontFamily:tt,fontSettings:et,fontSize:Ge,lineHeight:ve,letterSpacing:_e,wordSpacing:ze,textAlign:Qe,textAppearance:$e}:{fontFamily:Mt,fontSettings:At,fontSize:wt,lineHeight:Vt,letterSpacing:jt,wordSpacing:Yt,textAlign:Kt,textAppearance:It}),qt=Ed({fontFamily:zt,fontSettings:on,fontSize:xt,lineHeight:yt,letterSpacing:ke,wordSpacing:Je,textAlign:rt,textAppearance:dt},Lt),Dt=kd(g,Lt,t),an=kd(g,qt,t),cn=Pd(b,Id(Lt)),qn=Pd(R,Id(qt)),Yn={...an.css,whiteSpace:"pre-wrap",transform:Md(qn)},Qi=an.className,hn=Rt=>F.scalingValue(Rt,t),Vo=Le??Ue,Go=Math.max(je,mo),xn=Math.max(Fe,mo),di=Math.max(0,1-_t),Zi=Math.max(0,1-_t),bn=n??!1,Kn=bn&&!U,Ji=s.useMemo(()=>Ap({textPaddingLeft:nt,textPaddingRight:pt,textPaddingTop:Ve,textPaddingBottom:vt,fontSize:qt.fontSize}),[nt,pt,Ve,vt,qt.fontSize]),eo=Rt=>{const Xt=a.jsx("span",{className:Qi,style:Yn,children:Ad(Rt)});return Hd(g,Xt,Ae,bn,hn)},Ke=it==="left"||it==="right"?{width:`${Oe}%`}:{height:`${Oe}%`},k={...L$(Ji,t),...Ke,alignItems:E$[ht],justifyContent:R$[Wt]},oe=s.useRef(e),de=s.useRef(d),Ee=s.useRef(null);Zs((tc=e.logo)==null?void 0:tc.icon)&&(Ee.current=e.logo.icon),s.useEffect(()=>{var Nr;if(!y||!t){oe.current=e,de.current=d;return}const Rt=(Nr=e.logo)==null?void 0:Nr.icon;if(e.logo&&!Zs(Rt)&&!Ee.current){oe.current=e,de.current=d;return}const Xt=_r=>{y(A$(_r,Ee.current))};if(de.current!==d){oe.current=e,de.current=d;const _r=Nd(e);_r!==e&&Xt(_r);return}const ln=Nd(e),fn=oe.current,Sn=fn!==e,kn=Sn?T$(ln,fn):ln;oe.current=e;const to=ln!==e,Uo=Sn&&$$(ln,kn);!to&&!Uo||Xt(kn)},[e,y,t,d]);const Xe=F.scalingValue(_t,t),lt={width:Xe,height:Xe,minWidth:Xe,minHeight:Xe,maxWidth:Xe,maxHeight:Xe},Et={...Dt.css,textDecoration:"none",transform:Md(cn)},Bt=Dt.className,rn=(ye==null?void 0:ye.mode)!=="Off",Zt=(ye==null?void 0:ye.icon)??"",ui=_$(Zt),En=H$(Zt,ui),Qn=!!En,kr=hn(Math.min(Ot,kt)),Xo=!!(rn&&Zt&&Gt==="right")?"left":"right",Ql=Array.isArray(St)?St:[],Ga=[O!=="default"?`${g}-state-${O}`:"",U||T==="open"?`${g}-state-open`:"",ae&&ae!==O&&ae!==T?`${g}-state-${ae}`:""].filter(Boolean).join(" "),Xp=t&&!i?`${g}-editor`:"",Zl=ie?`${g}-interactive`:"",Up=be&&(O!==re||le)?`${g}-nav-state-anim`:"",qp=U?`${g}-open`:"",Yp=s.useMemo(()=>j$(m.current),[$,U,d]),Xa=()=>{G(!1)},Ua=!t||i,Kp=Rt=>{if(A){q.current=Rt;return}Rt()};s.useEffect(()=>{if(U)return;const Rt=q.current;q.current=null,Rt==null||Rt()},[U]);const Jl=(Rt,Xt)=>{D$(Rt,Xa,{isEditor:t,isPreviewMode:i,item:Xt,pages:u,onLinkNavigate:p,runAfterClose:Kp})},Qp=()=>{t&&!i||G(Rt=>!Rt)},Zp=Rt=>{Rt.pointerType==="touch"&&Rt.currentTarget.blur()},Ar=()=>{W.current!==null&&(window.clearTimeout(W.current),W.current=null)};s.useEffect(()=>{if(!le)return;const Rt=window.setTimeout(()=>{J(!1)},tn);return()=>window.clearTimeout(Rt)},[le,O]),s.useEffect(()=>{if(U){Ar(),L(!0);return}return S.current+=1,E(!1),Ar(),W.current=window.setTimeout(()=>{W.current=null,L(!1)},Cn),Ar},[U]),s.useLayoutEffect(()=>{z.current!==d&&(z.current=d,S.current+=1,Ar(),G(!1),E(!1),L(!1))},[d]),s.useLayoutEffect(()=>{var ln;if(!$||!U)return;const Rt=S.current+1;S.current=Rt,E(!1),(ln=x.current)==null||ln.offsetHeight;const Xt=requestAnimationFrame(()=>{S.current===Rt&&E(!0)});return()=>{cancelAnimationFrame(Xt)}},[$,U]),s.useLayoutEffect(()=>{if(!A||!$)return;const Rt=f.current;if(!Rt)return;const Xt=getComputedStyle(Rt).backgroundColor;if(!Xt)return;const ln=document.documentElement,{body:fn}=document,Sn=ln.style.backgroundColor,kn=fn.style.backgroundColor;return ln.style.backgroundColor=Xt,fn.style.backgroundColor=Xt,()=>{ln.style.backgroundColor=Sn,fn.style.backgroundColor=kn}},[A,$,Ga,Ye,Pt]),s.useEffect(()=>{v==null||v(U)},[U,v]),s.useEffect(()=>{if(!U)return;const Rt=Xt=>{Xt.key==="Escape"&&(t&&i||Xa())};return window.addEventListener("keydown",Rt),()=>window.removeEventListener("keydown",Rt)},[U,t,i]),s.useEffect(()=>{t&&!i&&T!=="open"&&G(!1)},[t,i,T]),s.useEffect(()=>{i&&G(!1)},[i]);const ec=bn&&U,Jp=Rt=>Ql.filter(Xt=>g$(Xt,d)).map((Xt,ln)=>{const{label:fn,href:Sn,target:kn}=Qs(Xt,u),to=Sn?a.jsx("a",{href:Sn,target:kn,rel:kn==="_blank"?"noopener noreferrer":void 0,className:`${Rt} ${g}-has-href`,onClick:Uo=>Jl(Uo,Xt),children:eo(fn)}):a.jsx("span",{className:Rt,children:eo(fn)});return a.jsxs(s.Fragment,{children:[ln>0&&a.jsx("div",{"data-controls":ec?"gap":void 0,"data-controls-axis":"y",className:ec?`${g}-gap-control`:void 0,style:{height:hn(Ue)}}),to]},ln)}),eg=$?a.jsxs("div",{ref:x,"data-selection":"none",className:[`${g}-lightbox`,`${g}-full-lightbox ${g}-effect-${it}`,D?`${g}-lightbox-active`:"",`${g}-lightbox-editor`,n?`${g}-lightbox-edit-mode`:"",Zl,Ga].filter(Boolean).join(" "),style:{...gt,...Yp},"aria-hidden":!D,children:[a.jsx("div",{className:[`${g}-backdrop`,Ua?`${g}-backdrop-clickable`:""].filter(Boolean).join(" "),"aria-hidden":"true",onClick:Ua?Xa:void 0}),a.jsxs("nav",{className:[`${g}-panel`,Ua?`${g}-panel-blocking`:""].filter(Boolean).join(" "),style:k,"aria-label":"Menu","data-lightbox-scrollable":"",children:[bn&&P$(g,Ji,qt.fontSize,hn),Jp(`${g}-link`)]}),A?a.jsx("div",{ref:f,className:`${g}-safari-tint`,"aria-hidden":"true"}):null]}):null,tg=()=>a.jsx("button",{type:"button",className:`${g}-toggle`,onClick:Qp,onPointerUp:Zp,"aria-expanded":U,"aria-label":U?"Close menu":"Open menu",children:a.jsx(f$,{className:`${g}-icon`,lineClassName:`${g}-icon-line`})}),Fr=Rt=>{const Xt=Rt==="left",ln=Xt?je:Fe,fn=Xt?Go:xn,Sn=Xt?di:Zi,kn=Tt?Xt?"compactNavPaddingLeft":"compactNavPaddingRight":Xt?"navPaddingLeft":"navPaddingRight";return a.jsx("div",{className:Xt?`${g}-nav-padding-left`:`${g}-nav-padding-right`,style:{width:hn(ln),flexShrink:0},children:Kn?a.jsx("div",{"data-controls":kn,"data-controls-axis":"x","data-controls-variant":"column-padding",...Xt?{}:{"data-controls-reverse":""},"data-controls-min":"0","data-controls-max-fraction":String(Sn),className:`${g}-control-anchor`,style:{top:0,[Xt?"left":"right"]:0,width:hn(fn),height:"100%"}}):null})},ng=(Rt,Xt)=>{const{label:ln,href:fn,target:Sn}=Qs(Rt,u),kn=a.jsx("span",{className:Bt,style:Et,children:Ad(ln)}),to=Hd(g,kn,ft,Kn,hn),Uo=fn?a.jsx("a",{href:fn,target:Sn,rel:Sn==="_blank"?"noopener noreferrer":void 0,className:`${g}-nav-link ${g}-has-href`,onClick:Nr=>Jl(Nr,Rt),children:to}):a.jsx("span",{className:`${g}-nav-link`,children:to});return a.jsxs(s.Fragment,{children:[Xt>0&&a.jsx("div",{"data-controls":Kn?Tt?"compactNavGap":"navGap":void 0,"data-controls-axis":"x",className:Kn?`${g}-gap-control ${g}-nav-gap-control`:`${g}-nav-gap-control}`,style:{width:hn(Vo),flexShrink:0}}),Uo]},Xt)},ig={...gt,height:F.scalingValue(kt,t),minHeight:F.scalingValue(kt,t),[`--${g}-panel-height`]:F.scalingValue(kt,t)},og=l&&O==="default"&&T!=="open"&&!i?hn(se+o$):"0px";return a.jsxs("div",{ref:m,className:`${g}-root ${Ga} ${Xp} ${Zl} ${Up}`.trim(),style:{width:"100%",height:"100%",lineHeight:0,fontSize:0,marginTop:og,...gt},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:P}}),a.jsx("span",{ref:b,"aria-hidden":!0,style:Rd(Dt.css),children:"H"}),a.jsx("span",{ref:R,"aria-hidden":!0,style:Rd(an.css),children:"H"}),a.jsx("div",{className:`${g}-nav-slide`,children:a.jsxs("div",{className:`${g}-nav-bar`,style:ig,children:[rn&&Zt?a.jsxs("div",{className:`${g}-nav-logo ${g}-nav-logo-${Gt}`,children:[Gt==="left"?Fr("left"):null,a.jsxs("div",{className:`${g}-nav-logo-inner${Qn?` ${g}-nav-logo-tinted`:""}`,style:{height:kr,...Qn&&En?{[`--${g}-logo-image`]:F$(En)}:{}},children:[a.jsx("img",{src:Qn&&En?En:Zt,alt:"",className:`${g}-nav-logo-img`}),Qn?a.jsx("span",{className:`${g}-nav-logo-tint`,"aria-hidden":"true"}):null]}),Gt==="right"?Fr("right"):null]}):null,a.jsx("nav",{className:`${g}-nav-links ${g}-nav-links-${ut}`,style:{transform:d$(ut,H,t)},"aria-label":"Navigation",children:a.jsx("div",{className:`${g}-nav-links-inner`,children:Ql.filter(Rt=>p$(Rt,O,d)).map((Rt,Xt)=>ng(Rt,Xt))})})]})}),eg,a.jsxs("div",{className:`${g}-nav-toggle-wrap ${g}-nav-toggle-wrap-${Xo}`,children:[Xo==="left"?Fr("left"):null,Ht?a.jsx("div",{className:`${g}-root ${qp}`.trim(),style:lt,children:tg()}):null,Xo==="right"?Fr("right"):null]})]})}const G$=`import { Fragment, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type MouseEvent, type PointerEvent, type ReactNode } from 'react';
24689
+ `}function Zs(e){return e?!e.startsWith("http://")&&!e.startsWith("https://")&&!e.startsWith("blob:")&&!e.startsWith("data:"):!1}function A$(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 F$(e){return`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`}function N$(e){const t=e.trim().toLowerCase();return t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")?!0:t.includes(".svg")}function _$(e){const t=N$(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 H$(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 zu(e).then(r=>{o||i(r)}).catch(()=>{o||i(null)}),()=>{o=!0}},[t,e]),t?n:null}function W$(e){const t=e.indexOf("#");if(t===-1)return"";try{return decodeURIComponent(e.slice(t+1))}catch{return e.slice(t+1)}}function O$(e){if(!e||e.startsWith("#"))return!0;try{return new URL(e,window.location.href).pathname===window.location.pathname}catch{return!1}}function Np(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=Np(e);return t?(t.scrollIntoView({behavior:"smooth",block:"start"}),!0):!1}function D$(e,t,n={}){const{isEditor:i,isPreviewMode:o,item:r,pages:l,onLinkNavigate:c}=n,d=n.runAfterClose??(v=>v()),u=e.currentTarget.getAttribute("href")??"",p=W$(u),y=e.currentTarget.target==="_blank";if(r&&c){e.preventDefault(),e.stopPropagation();const v=Qs(r,l),g=Mp(r),m={mode:g.type==="url"?"url":"page",href:v.href||u,page:g.type==="page"?g.value:void 0,url:g.type==="url"?g.value:void 0,anchor:g.type==="anchor"?g.value.replace(/^#/,""):(g.anchor??"").replace(/^#/,""),target:v.target};m.target==="_blank"?c(m):d(()=>c(m)),t();return}if(i){e.preventDefault(),d(()=>_d(p)),t();return}!y&&p&&O$(u)&&Np(p)&&(e.preventDefault(),d(()=>_d(p))),t()}const B$=["--cntrl-article-width","--cntrl-article-top","--cntrl-article-left","--cntrl-viewport-height"];function z$(e){let t=e;for(;t;){if(getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim())return t;t=t.parentElement}return e}function j$(e){const t={},n=z$(e);if(!n)return t;const i=getComputedStyle(n);for(const o of B$){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 V$({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:v}){var tc;const{prefix:g}=F.useScopedStyles(),m=s.useRef(null),x=s.useRef(null),b=s.useRef(null),M=s.useRef(null),f=s.useRef(null),S=s.useRef(0),W=s.useRef(null),q=s.useRef(null),z=s.useRef(d),P=s.useMemo(()=>k$(g),[g]),[_,G]=s.useState(!1),[$,L]=s.useState(!1),[D,E]=s.useState(!1),T=s$(r),C=s.useMemo(()=>new Set(c),[c]),V=Mt=>!!(Mt&&C.has(Mt)),U=!!(t&&!i&&T==="open"&&!V("open"))||!(t&&!i)&&_,I=!!(t&&!i),A=U&&!I;jl(A),s.useEffect(()=>{if(!U||!I)return;const Mt=document.documentElement,Xt=Mt.style.overflow;return Mt.style.overflow="hidden",()=>{Mt.style.overflow=Xt}},[U,I]);const j=!V("compact")&&!V("onScroll"),ie=!t||!!i&&!n,ae=o&&o!=="default"?o:void 0,O=j&&T==="compact"?"compact":"default",[re,N]=s.useState(O),[le,J]=s.useState(!1),be=!n;O!==re&&(N(O),be&&J(!0));const Pe=Fp(e),{logo:ye,logoMaxHeight:ce=120/1440,logoPosition:K="left",panelHeight:se=60/1440,backgroundColor:pe="#b3b3b3",logoColor:fe="#000000",position:we,horizontalAlign:Re,verticalAlign:me,iconColor:xe="#000000",showIcon:Ce="on",iconSize:h=16/1440,linkColor:Y="#000000",openLinkColor:Q="#000000",compactIconColor:ne="#000000",compactLinkColor:ue="#000000",compactLogoColor:B="#000000",compactBackgroundColor:R="#ffffff",compactLogoMaxHeight:ee=120/1440,compactLogoPosition:te,compactPanelHeight:ge=60/1440,compactShowIcon:X="on",compactIconSize:Ie=16/1440,compactNavTextWidth:Se,compactNavTextPosition:Z,compactNavTextOffset:He,compactNavGap:We,compactNavPaddingLeft:ot=10/1440,compactNavPaddingRight:qe=10/1440,compactFontFamily:tt,compactFontSettings:et,compactFontSize:Ge,compactLineHeight:ve,compactLetterSpacing:_e=0,compactWordSpacing:ze=0,compactTextAlign:Qe="left",compactTextAppearance:$e,openLogoColor:Ne="#000000",menuBackgroundColor:Ye="#ffffff",overlayColor:Ze="rgba(0, 0, 0, 0.45)",closeButtonColor:st="#000000",effect:it="fade",openPanelSize:Oe=100,textWidth:Ae=280/1440,navTextWidth:mt,navTextPosition:Be="center",navTextOffset:De=0,gap:Ue=0,navGap:ct,navPaddingLeft:he=10/1440,navPaddingRight:Me=10/1440,textPaddingLeft:nt=10/1440,textPaddingRight:pt=10/1440,textPaddingTop:Ve=10/1440,textPaddingBottom:vt=10/1440,fontFamily:It,fontSettings:At,fontSize:wt,lineHeight:Vt,letterSpacing:jt=0,wordSpacing:Yt=0,textAlign:Kt="left",textAppearance:Rt,openFontFamily:zt,openFontSettings:on,openFontSize:xt,openLineHeight:yt,openLetterSpacing:ke,openWordSpacing:Je,openTextAlign:rt,openTextAppearance:dt,stateOverrides:Pt,link:St}=Pe,{horizontalAlign:ht,verticalAlign:Wt}=w$({position:we,horizontalAlign:Re,verticalAlign:me}),Tt=O==="compact",Ot=Tt?ee:ce,Gt=l$(Tt?te:K),kt=Tt?ge:se,_t=Tt?Ie:h,Ft=Tt?Se:mt,ut=c$(Tt?Z:Be),H=(Tt?He:De)??0,Le=Tt?We:ct,je=Tt?ot:he,Fe=Tt?qe:Me,ft=Ft??Ae,Ht=U||(Tt?X:Ce)!=="off",gt=F.buildColorVars(g,{iconColor:xe,closeButtonColor:st,linkColor:Y,openLinkColor:Q,compactIconColor:ne,compactLinkColor:ue,compactLogoColor:B,compactBackgroundColor:R,openLogoColor:Ne,menuBackgroundColor:Ye,overlayColor:Ze,backgroundColor:pe,logoColor:fe},I$,R$,Pt),Lt=Ed(Tt?{fontFamily:tt,fontSettings:et,fontSize:Ge,lineHeight:ve,letterSpacing:_e,wordSpacing:ze,textAlign:Qe,textAppearance:$e}:{fontFamily:It,fontSettings:At,fontSize:wt,lineHeight:Vt,letterSpacing:jt,wordSpacing:Yt,textAlign:Kt,textAppearance:Rt}),qt=Ed({fontFamily:zt,fontSettings:on,fontSize:xt,lineHeight:yt,letterSpacing:ke,wordSpacing:Je,textAlign:rt,textAppearance:dt},Lt),Dt=kd(g,Lt,t),an=kd(g,qt,t),cn=Pd(b,Rd(Lt)),qn=Pd(M,Rd(qt)),Yn={...an.css,whiteSpace:"pre-wrap",transform:Id(qn)},Qi=an.className,hn=Mt=>F.scalingValue(Mt,t),Vo=Le??Ue,Go=Math.max(je,mo),xn=Math.max(Fe,mo),di=Math.max(0,1-_t),Zi=Math.max(0,1-_t),bn=n??!1,Kn=bn&&!U,Ji=s.useMemo(()=>Ap({textPaddingLeft:nt,textPaddingRight:pt,textPaddingTop:Ve,textPaddingBottom:vt,fontSize:qt.fontSize}),[nt,pt,Ve,vt,qt.fontSize]),eo=Mt=>{const Xt=a.jsx("span",{className:Qi,style:Yn,children:Ad(Mt)});return Hd(g,Xt,Ae,bn,hn)},Ke=it==="left"||it==="right"?{width:`${Oe}%`}:{height:`${Oe}%`},k={...L$(Ji,t),...Ke,alignItems:E$[ht],justifyContent:M$[Wt]},oe=s.useRef(e),de=s.useRef(d),Ee=s.useRef(null);Zs((tc=e.logo)==null?void 0:tc.icon)&&(Ee.current=e.logo.icon),s.useEffect(()=>{var Nr;if(!y||!t){oe.current=e,de.current=d;return}const Mt=(Nr=e.logo)==null?void 0:Nr.icon;if(e.logo&&!Zs(Mt)&&!Ee.current){oe.current=e,de.current=d;return}const Xt=_r=>{y(A$(_r,Ee.current))};if(de.current!==d){oe.current=e,de.current=d;const _r=Nd(e);_r!==e&&Xt(_r);return}const ln=Nd(e),fn=oe.current,Sn=fn!==e,kn=Sn?T$(ln,fn):ln;oe.current=e;const to=ln!==e,Uo=Sn&&$$(ln,kn);!to&&!Uo||Xt(kn)},[e,y,t,d]);const Xe=F.scalingValue(_t,t),lt={width:Xe,height:Xe,minWidth:Xe,minHeight:Xe,maxWidth:Xe,maxHeight:Xe},Et={...Dt.css,textDecoration:"none",transform:Id(cn)},Bt=Dt.className,rn=(ye==null?void 0:ye.mode)!=="Off",Zt=(ye==null?void 0:ye.icon)??"",ui=_$(Zt),En=H$(Zt,ui),Qn=!!En,kr=hn(Math.min(Ot,kt)),Xo=!!(rn&&Zt&&Gt==="right")?"left":"right",Ql=Array.isArray(St)?St:[],Ga=[O!=="default"?`${g}-state-${O}`:"",U||T==="open"?`${g}-state-open`:"",ae&&ae!==O&&ae!==T?`${g}-state-${ae}`:""].filter(Boolean).join(" "),Xp=t&&!i?`${g}-editor`:"",Zl=ie?`${g}-interactive`:"",Up=be&&(O!==re||le)?`${g}-nav-state-anim`:"",qp=U?`${g}-open`:"",Yp=s.useMemo(()=>j$(m.current),[$,U,d]),Xa=()=>{G(!1)},Ua=!t||i,Kp=Mt=>{if(A){q.current=Mt;return}Mt()};s.useEffect(()=>{if(U)return;const Mt=q.current;q.current=null,Mt==null||Mt()},[U]);const Jl=(Mt,Xt)=>{D$(Mt,Xa,{isEditor:t,isPreviewMode:i,item:Xt,pages:u,onLinkNavigate:p,runAfterClose:Kp})},Qp=()=>{t&&!i||G(Mt=>!Mt)},Zp=Mt=>{Mt.pointerType==="touch"&&Mt.currentTarget.blur()},Ar=()=>{W.current!==null&&(window.clearTimeout(W.current),W.current=null)};s.useEffect(()=>{if(!le)return;const Mt=window.setTimeout(()=>{J(!1)},tn);return()=>window.clearTimeout(Mt)},[le,O]),s.useEffect(()=>{if(U){Ar(),L(!0);return}return S.current+=1,E(!1),Ar(),W.current=window.setTimeout(()=>{W.current=null,L(!1)},Cn),Ar},[U]),s.useLayoutEffect(()=>{z.current!==d&&(z.current=d,S.current+=1,Ar(),G(!1),E(!1),L(!1))},[d]),s.useLayoutEffect(()=>{var ln;if(!$||!U)return;const Mt=S.current+1;S.current=Mt,E(!1),(ln=x.current)==null||ln.offsetHeight;const Xt=requestAnimationFrame(()=>{S.current===Mt&&E(!0)});return()=>{cancelAnimationFrame(Xt)}},[$,U]),s.useLayoutEffect(()=>{if(!A||!$)return;const Mt=f.current;if(!Mt)return;const Xt=getComputedStyle(Mt).backgroundColor;if(!Xt)return;const ln=document.documentElement,{body:fn}=document,Sn=ln.style.backgroundColor,kn=fn.style.backgroundColor;return ln.style.backgroundColor=Xt,fn.style.backgroundColor=Xt,()=>{ln.style.backgroundColor=Sn,fn.style.backgroundColor=kn}},[A,$,Ga,Ye,Pt]),s.useEffect(()=>{v==null||v(U)},[U,v]),s.useEffect(()=>{if(!U)return;const Mt=Xt=>{Xt.key==="Escape"&&(t&&i||Xa())};return window.addEventListener("keydown",Mt),()=>window.removeEventListener("keydown",Mt)},[U,t,i]),s.useEffect(()=>{t&&!i&&T!=="open"&&G(!1)},[t,i,T]),s.useEffect(()=>{i&&G(!1)},[i]);const ec=bn&&U,Jp=Mt=>Ql.filter(Xt=>g$(Xt,d)).map((Xt,ln)=>{const{label:fn,href:Sn,target:kn}=Qs(Xt,u),to=Sn?a.jsx("a",{href:Sn,target:kn,rel:kn==="_blank"?"noopener noreferrer":void 0,className:`${Mt} ${g}-has-href`,onClick:Uo=>Jl(Uo,Xt),children:eo(fn)}):a.jsx("span",{className:Mt,children:eo(fn)});return a.jsxs(s.Fragment,{children:[ln>0&&a.jsx("div",{"data-controls":ec?"gap":void 0,"data-controls-axis":"y",className:ec?`${g}-gap-control`:void 0,style:{height:hn(Ue)}}),to]},ln)}),eg=$?a.jsxs("div",{ref:x,"data-selection":"none",className:[`${g}-lightbox`,`${g}-full-lightbox ${g}-effect-${it}`,D?`${g}-lightbox-active`:"",`${g}-lightbox-editor`,n?`${g}-lightbox-edit-mode`:"",Zl,Ga].filter(Boolean).join(" "),style:{...gt,...Yp},"aria-hidden":!D,children:[a.jsx("div",{className:[`${g}-backdrop`,Ua?`${g}-backdrop-clickable`:""].filter(Boolean).join(" "),"aria-hidden":"true",onClick:Ua?Xa:void 0}),a.jsxs("nav",{className:[`${g}-panel`,Ua?`${g}-panel-blocking`:""].filter(Boolean).join(" "),style:k,"aria-label":"Menu","data-lightbox-scrollable":"",children:[bn&&P$(g,Ji,qt.fontSize,hn),Jp(`${g}-link`)]}),A?a.jsx("div",{ref:f,className:`${g}-safari-tint`,"aria-hidden":"true"}):null]}):null,tg=()=>a.jsx("button",{type:"button",className:`${g}-toggle`,onClick:Qp,onPointerUp:Zp,"aria-expanded":U,"aria-label":U?"Close menu":"Open menu",children:a.jsx(f$,{className:`${g}-icon`,lineClassName:`${g}-icon-line`})}),Fr=Mt=>{const Xt=Mt==="left",ln=Xt?je:Fe,fn=Xt?Go:xn,Sn=Xt?di:Zi,kn=Tt?Xt?"compactNavPaddingLeft":"compactNavPaddingRight":Xt?"navPaddingLeft":"navPaddingRight";return a.jsx("div",{className:Xt?`${g}-nav-padding-left`:`${g}-nav-padding-right`,style:{width:hn(ln),flexShrink:0},children:Kn?a.jsx("div",{"data-controls":kn,"data-controls-axis":"x","data-controls-variant":"column-padding",...Xt?{}:{"data-controls-reverse":""},"data-controls-min":"0","data-controls-max-fraction":String(Sn),className:`${g}-control-anchor`,style:{top:0,[Xt?"left":"right"]:0,width:hn(fn),height:"100%"}}):null})},ng=(Mt,Xt)=>{const{label:ln,href:fn,target:Sn}=Qs(Mt,u),kn=a.jsx("span",{className:Bt,style:Et,children:Ad(ln)}),to=Hd(g,kn,ft,Kn,hn),Uo=fn?a.jsx("a",{href:fn,target:Sn,rel:Sn==="_blank"?"noopener noreferrer":void 0,className:`${g}-nav-link ${g}-has-href`,onClick:Nr=>Jl(Nr,Mt),children:to}):a.jsx("span",{className:`${g}-nav-link`,children:to});return a.jsxs(s.Fragment,{children:[Xt>0&&a.jsx("div",{"data-controls":Kn?Tt?"compactNavGap":"navGap":void 0,"data-controls-axis":"x",className:Kn?`${g}-gap-control ${g}-nav-gap-control`:`${g}-nav-gap-control}`,style:{width:hn(Vo),flexShrink:0}}),Uo]},Xt)},ig={...gt,height:F.scalingValue(kt,t),minHeight:F.scalingValue(kt,t),[`--${g}-panel-height`]:F.scalingValue(kt,t)},og=l&&O==="default"&&T!=="open"&&!i?hn(se+o$):"0px";return a.jsxs("div",{ref:m,className:`${g}-root ${Ga} ${Xp} ${Zl} ${Up}`.trim(),style:{width:"100%",height:"100%",lineHeight:0,fontSize:0,marginTop:og,...gt},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:P}}),a.jsx("span",{ref:b,"aria-hidden":!0,style:Md(Dt.css),children:"H"}),a.jsx("span",{ref:M,"aria-hidden":!0,style:Md(an.css),children:"H"}),a.jsx("div",{className:`${g}-nav-slide`,children:a.jsxs("div",{className:`${g}-nav-bar`,style:ig,children:[rn&&Zt?a.jsxs("div",{className:`${g}-nav-logo ${g}-nav-logo-${Gt}`,children:[Gt==="left"?Fr("left"):null,a.jsxs("div",{className:`${g}-nav-logo-inner${Qn?` ${g}-nav-logo-tinted`:""}`,style:{height:kr,...Qn&&En?{[`--${g}-logo-image`]:F$(En)}:{}},children:[a.jsx("img",{src:Qn&&En?En:Zt,alt:"",className:`${g}-nav-logo-img`}),Qn?a.jsx("span",{className:`${g}-nav-logo-tint`,"aria-hidden":"true"}):null]}),Gt==="right"?Fr("right"):null]}):null,a.jsx("nav",{className:`${g}-nav-links ${g}-nav-links-${ut}`,style:{transform:d$(ut,H,t)},"aria-label":"Navigation",children:a.jsx("div",{className:`${g}-nav-links-inner`,children:Ql.filter(Mt=>p$(Mt,O,d)).map((Mt,Xt)=>ng(Mt,Xt))})})]})}),eg,a.jsxs("div",{className:`${g}-nav-toggle-wrap ${g}-nav-toggle-wrap-${Xo}`,children:[Xo==="left"?Fr("left"):null,Ht?a.jsx("div",{className:`${g}-root ${qp}`.trim(),style:lt,children:tg()}):null,Xo==="right"?Fr("right"):null]})]})}const G$=`import { Fragment, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type MouseEvent, type PointerEvent, type ReactNode } from 'react';
24690
24690
  import { CommonComponentProps } from '../props';
24691
24691
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
24692
24692
  import { useLightboxScrollLock } from '../utils/useLightboxScrollLock';
@@ -27327,7 +27327,7 @@ export function Burger({
27327
27327
  </div>
27328
27328
  );
27329
27329
  }
27330
- `;function tr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Di={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 yi(e,t){return e?`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`:t}function Ul(e){return{[yi(e,"fontFamily")]:{type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},[yi(e,"fontSettings")]:{...Di.fontSettings,scope:"common",title:""},[yi(e,"fontSize")]:{...Di.fontSize,scope:"layout",title:""},[yi(e,"lineHeight")]:{...Di.lineHeight,scope:"layout",title:""},[yi(e,"letterSpacing")]:{...Di.letterSpacing,scope:"layout",title:""},[yi(e,"wordSpacing")]:{...Di.wordSpacing,scope:"layout",title:""},[yi(e,"textAlign")]:{...Di.textAlign,scope:"layout",title:""},[yi(e,"textAppearance")]:{...Di.textAppearance,scope:"layout",title:""}}}const X$=Ul(""),U$=Ul("open"),q$=Ul("compact"),Y$=["__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"],K$=["__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"],Q$=["__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"],Jn={textTransform:"none",textDecoration:"none",fontVariant:"normal"},Ms={fontWeight:400,fontStyle:"normal"},ea={d:"Always",t:"Open Only",m:"Open Only"},Z$=["left-top","center-top","right-top","left-center","center","right-center","left-bottom","center-bottom","right-bottom"],J$=["iconColor","logoColor","linkColor","backgroundColor"],eC={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:[...Z$]}},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}},...X$,...U$,...q$},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:Jn,openFontSize:34/375,openLineHeight:20/375,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:Jn,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:Jn},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:Jn,openFontSize:75/768,openLineHeight:20/768,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:Jn,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:Jn},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:Jn,textAlign:"center",openFontSize:90/1440,openLineHeight:16/1440,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:Jn,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:Jn,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:Y$},{id:"compact",icon:"compact",title:"Compact",tooltip:"Compact State",layout:K$,availableWhen:{navigationPosition:["switch"]}},{id:"open",icon:"open",title:"Open",tooltip:"Open State",layout:Q$},{id:"links",icon:"content",title:"Links",tooltip:"Link Settings",layout:["__componentName__","link"]}],paletteBookmark:{items:[...J$],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"]},tC={element:V$,id:"basic-burger",name:"Basic Burger",category:"navigation",version:1,preview:{type:"image",url:"01M3QM74XG22TTJ182A0MNK29A"},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:eC,sourceCode:G$,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,nC=.12,ql={x:0,y:0,width:100,height:100};function wo(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 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 iC(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 oC(e){return e.map(([t,n])=>({x:t,y:n}))}function Is(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 rC(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 aC(i)}function aC(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 sC(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 lC(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 dC(e,t,n,i){let o=null;for(let r=0;r<Od;r+=1){const l=La(t+(n-t)*r/Math.max(1,Od-1)),c=rC(e,l),d=i==="avoid"?lC(c):c;if(o=o===null?d:sC(o,d),o.length===0)return[]}return o??[]}function Bd(e,t="stretch",n=ql){const i=e.trim();if(!i)return null;if(/^[Mm]/.test(i)){const l=Ii(i),c=$r(l);if(c.length)return t==="viewbox"?wo(c,n):Is(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 v=document.createElementNS("http://www.w3.org/2000/svg","path");v.setAttribute("d",y),u.appendChild(v);let g=0;try{g=v.getTotalLength()}catch{g=0}if(!g)continue;const m=[];for(let x=0;x<Wd;x+=1){const b=v.getPointAtLength(x/Wd*g);m.push({x:b.x,y:b.y})}p.push(m)}return p.length?t==="viewbox"?wo(p,n):Is(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"?wo([r],n):Is([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",Pa=100,el=16,uC=12,pC=16,Rs=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,gC=/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g,zd=Math.PI/4,mC=8,hC=Math.PI/18,fC=8,ho=24,fo=[];function yC(){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 dn(e,n=>({x:(n.x-t.x)/t.width,y:(n.y-t.y)/t.height}))}function vC(e){const t=Ci(e),n=t.maxX-t.minX,i=t.maxY-t.minY;return!isFinite(n)||!isFinite(i)||n<=0||i<=0?e:dn(e,o=>({x:(o.x-t.minX)/n,y:(o.y-t.minY)/i}))}function xC(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 dn(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=Ii(c);d.length&&(l=n==="viewbox"?Es(d,i):vC(d))}if(!l.length){const d=o!=="custom"?Yl[o]:void 0;d?l=Es(Ii(d),ql):l=yC()}}return o==="circle"?xC(l,r):l}function Vd(e,t){return!(t.width>0)||!(t.height>0)||!e.length?"":_o(dn(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?wo($r(Ii(t)),ql):[oC([[0,0],[1,0],[1,1],[0,1]])]}function bC(e){const t=e.match(gC);return t?t.map(Number).filter(n=>!Number.isNaN(n)):[]}function Tn(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 pn(e){return{x:e.x,y:e.y}}function SC(e){return{p:pn(e.p),in:e.in?pn(e.in):null,out:e.out?pn(e.out):null}}function zn(e){return e.map(t=>({closed:t.closed,nodes:t.nodes.map(SC)}))}function dn(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 dn(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:pn(e),c2:pn(l),p:pn(l)}];const u=i*Math.PI/180,p=Math.cos(u),y=Math.sin(u),v=(e.x-l.x)/2,g=(e.y-l.y)/2,m=p*v+y*g,x=-y*v+p*g,b=m*m/(c*c)+x*x/(d*d);if(b>1){const U=Math.sqrt(b);c*=U,d*=U}const R=o===r?-1:1,f=c*c*x*x+d*d*m*m,S=Math.max(0,c*c*d*d-f),W=f===0?0:R*Math.sqrt(S/f),q=W*c*x/d,z=-W*d*m/c,P=p*q-y*z+(e.x+l.x)/2,_=y*q+p*z+(e.y+l.y)/2,G=Math.atan2((x-z)/d,(m-q)/c);let L=Math.atan2((-x-z)/d,(-m-q)/c)-G;!r&&L>0&&(L-=Math.PI*2),r&&L<0&&(L+=Math.PI*2);const D=Math.max(1,Math.ceil(Math.abs(L)/(Math.PI/2))),E=L/D,T=4/3*Math.tan(E/4),C=(U,M)=>({x:P+p*c*U-y*d*M,y:_+y*c*U+p*d*M}),V=[];let w=G;for(let U=0;U<D;U+=1){const M=w+E,A=Math.cos(w),j=Math.sin(w),ie=Math.cos(M),ae=Math.sin(M);V.push({c1:C(A-T*j,j+T*A),c2:C(ie+T*ae,ae-T*ie),p:U===D-1?pn(l):C(ie,ae)}),w=M}return V}function Ii(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 g=i[0],m=i[i.length-1];Math.abs(g.p.x-m.p.x)<1e-6&&Math.abs(g.p.y-m.p.y)<1e-6&&(g.in=m.in??g.in,i.pop())}i.length>1&&n.push({nodes:i,closed:o}),i=[],o=!1},p=(g,m)=>{i.push({p:g,in:Gn(m??null,g),out:null}),r=g},y=g=>{if(!i.length)return;const m=i[i.length-1];m.out=Gn(g,m.p)};Rs.lastIndex=0;let v=Rs.exec(t);for(;v!==null;){const g=v[1],m=g.toUpperCase(),x=g!==m,b=bC(v[2]),R=f=>x?{x:r.x+b[f],y:r.y+b[f+1]}:{x:b[f],y:b[f+1]};if(m==="Z")o=!0,u(),r=pn(l),c=null,d=null;else if(m==="M"){for(let f=0;f+1<b.length;f+=2){const S=R(f);f===0&&(u(),l=pn(S)),p(S)}c=null,d=null}else if(m==="L"){for(let f=0;f+1<b.length;f+=2)p(R(f));c=null,d=null}else if(m==="H"){for(const f of b)p({x:x?r.x+f:f,y:r.y});c=null,d=null}else if(m==="V"){for(const f of b)p({x:r.x,y:x?r.y+f:f});c=null,d=null}else if(m==="C"){for(let f=0;f+5<b.length;f+=6){const S=R(f),W=R(f+2),q=R(f+4);y(S),p(q,W),c=W}d=null}else if(m==="S"){for(let f=0;f+3<b.length;f+=4){const S=c?nl(c,r):pn(r),W=R(f),q=R(f+2);y(S),p(q,W),c=W}d=null}else if(m==="Q")for(let f=0;f+3<b.length;f+=4){const S=R(f),W=R(f+2);y(Tn(r,S,2/3)),p(W,Tn(W,S,2/3)),d=S,c=null}else if(m==="T")for(let f=0;f+1<b.length;f+=2){const S=d?nl(d,r):pn(r),W=R(f);y(Tn(r,S,2/3)),p(W,Tn(W,S,2/3)),d=S,c=null}else if(m==="A")for(let f=0;f+6<b.length;f+=7){const S=x?{x:r.x+b[f+5],y:r.y+b[f+6]}:{x:b[f+5],y:b[f+6]};for(const W of wC(r,b[f],b[f+1],b[f+2],b[f+3]!==0,b[f+4]!==0,S))y(W.c1),p(W.p,W.c2);c=null,d=null}v=Rs.exec(t)}return u(),n}function Dn(e){return`${Number(e.toFixed(2))}`}function Gn(e,t){return!e||Math.abs(e.x-t.x)<1e-6&&Math.abs(e.y-t.y)<1e-6?null:e}function _p(e){return!!(Gn(e.in,e.p)||Gn(e.out,e.p))}function jo(e,t){return!Gn(e.out,e.p)&&!Gn(t.in,t.p)}function Xd(e,t){if(jo(e,t))return`L${Dn(t.p.x)},${Dn(t.p.y)}`;const n=Gn(e.out,e.p)??e.p,i=Gn(t.in,t.p)??t.p;return`C${Dn(n.x)},${Dn(n.y)} ${Dn(i.x)},${Dn(i.y)} ${Dn(t.p.x)},${Dn(t.p.y)}`}function _o(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const[i,...o]=n.nodes;t.push(`M${Dn(i.p.x)},${Dn(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 Hp(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(jo(e,t))return Tn(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 Hp(n)){if(jo(o.from,o.to)){i.push(pn(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(pn(n.nodes[n.nodes.length-1].p)),i.length>2&&t.push(i)}return t}function Ci(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 $C(e){const t=Ci(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 Wp(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 Op(e){return e.filter(t=>t.length>2).map(t=>{if(t.length<=uC)return{closed:!0,nodes:t.map(r=>({p:pn(r),in:null,out:null}))};const n=Math.max(1,Math.round(t.length/pC)),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:pn(r),...Wp(i[(l-1+o)%o],r,i[(l+1)%o])}))}})}function Dp(e,t,n=1){if(!e.length)return!1;const i=Ci(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 CC(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:dn(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 TC(e,t){if(!e.length)return e;const n=Ci(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 dn(e,u=>({x:c+(u.x-n.minX)*l,y:d+(u.y-n.minY)*l}))}function Bp(e){const t={x:0,y:0,width:Pa,height:Pa},n=e!=="custom"?Yl[e]:void 0,i=n?dn(Ii(n),r=>({x:r.x/100*t.width+t.x,y:r.y/100*t.height+t.y})):dn(Op(tl("rectangle")),r=>({x:r.x*t.width+t.x,y:r.y*t.height+t.y})),o=TC(i,t);return{shape:e,customPath:_o(o),pathFit:"viewbox",pathViewBox:Js}}function ta(e,t){return t>0?Math.round(e/t)*t:e}function LC(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=zn(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=zn(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 PC(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=zp(i,r,c)}),i}function MC(e,t,n,i,o,r){var u;if(!((u=e[t])==null?void 0:u.nodes[n]))return e;const c=zn(e),d=c[t].nodes[n];if(d[i]=pn(o),r){const p=i==="in"?"out":"in";d[p]=nl(o,d.p)}return c}function IC(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=zn(e);return r[t].nodes[n][i]=null,r}function RC(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=zn(e),d=c[t].nodes,u=n+1;if(jo(r,l))return d.splice(u,0,{p:Tn(r.p,l.p,i),in:null,out:null}),{contours:c,nodeIndex:u};const p=r.out??r.p,y=l.in??l.p,v=Tn(r.p,p,i),g=Tn(p,y,i),m=Tn(y,l.p,i),x=Tn(v,g,i),b=Tn(g,m,i),R=Tn(x,b,i),f=(n+1)%o.nodes.length;return d[n].out=v,d[f].in=m,d.splice(u,0,{p:R,in:x,out:b}),{contours:c,nodeIndex:u}}function zp(e,t,n){const i=e[t];if(!i||i.nodes.length<=3)return e;const o=zn(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=zn(e),l=r[t].nodes,c=l[n],d=l.length,u=(n-1+d)%d,p=(n+1)%d,y=!!Gn(l[u].out,l[u].p),v=!!Gn(l[p].in,l[p].p);if(_p(c)||y||v)return c.in=null,c.out=null,l[u].out=null,l[p].in=null,r;const g=Wp(l[u].p,c.p,l[p].p);return c.in=g.in,c.out=g.out,r}function EC(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 Hp(i)){const l=jo(r.from,r.to)?1:el;for(let c=0;c<l;c+=1){const d=c/l,u=(c+1)/l,p=EC(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 kC(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 Kd(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 AC(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 FC(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 NC(e,t){const n=ol(e,t);return n?{kind:"align",a:{x:e.x-n.x*ho,y:e.y-n.y*ho},b:{x:t.x+n.x*ho,y:t.y+n.y*ho}}:{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 Zd(e,t,n,i,o){if(e.axis===null)return NC(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 _C(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 HC(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 WC(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:fo};const v=Math.atan2(p,u),g=Math.round(v/zd)*zd;let m=o?g:null,x=!1;if(!o){const z=[];n&&z.push({angle:Math.atan2(n.y,n.x),smooth:!0}),z.push({angle:g,smooth:!1});for(const P of z){const _=FC(P.angle-v);if(!(Math.abs(_)>hC)&&!(Math.abs(Math.sin(_))*y>mC)){m=P.angle,x=P.smooth;break}}}const b=i!==null&&i>0&&Math.abs(y-i)<=fC;if(m===null&&!b)return{point:e,guides:fo};const R=m??v,f=b?i:y,S={x:Math.cos(R),y:Math.sin(R)},W=f+(m===null?0:ho),q=b?f:x?ho:0;return{point:l({x:c.x+S.x*f,y:c.y+S.y*f}),guides:[{kind:"angle",a:{x:c.x-S.x*q,y:c.y-S.y*q},b:{x:c.x+S.x*W,y:c.y+S.y*W}}]}}const al=.1,sl=8,OC=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}}},jp=e=>{switch(e){case"nw":return"se";case"ne":return"sw";case"se":return"nw";case"sw":return"ne"}},ll=(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}},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),Vi=(e,t,n)=>{const i=cl(e,t)*n;return{width:t.width*i,height:t.height*i}},Bn=(e,t,n)=>(e-t)*n,yo=(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)<OC?.5:La(r)},DC=(e,t,n,i,o,r)=>{const l=Vi(e,n,r),c=e.x+Bn(e.width,l.width,i),d=e.y+Bn(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)),v=Vi(t,n,y);return{focalX:yo(t.width,v.width,c-t.x,{clamp:!1}),focalY:yo(t.height,v.height,d-t.y,{clamp:!1}),scale:y}},eu=1.08,na=14,ia=8;function BC({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:v}){const g=s.useRef(null),m=`pretext-image-ghost-${s.useId().replace(/:/g,"")}`,x=s.useRef(null),b=s.useRef(null),R=s.useRef({focalX:d,focalY:u,scale:p});R.current={focalX:d,focalY:u,scale:p};const f=l==="image";s.useEffect(()=>{var E;f&&((E=g.current)==null||E.focus({preventScroll:!0}))},[f]);const S=s.useCallback((E,T)=>{var V;const C=(V=g.current)==null?void 0:V.getBoundingClientRect();return!C||C.width<=0||C.height<=0?{x:0,y:0}:{x:(E-C.left)/C.width*t.width,y:(T-C.top)/C.height*t.height}},[t.width,t.height]),W=E=>{var C,V;if(!i)return;E.stopPropagation(),E.preventDefault(),(C=g.current)==null||C.focus({preventScroll:!0});const T=Vi(n,i,p);x.current={pointerId:E.pointerId,origin:S(E.clientX,E.clientY),startX:Bn(n.width,T.width,d),startY:Bn(n.height,T.height,u),width:T.width,height:T.height,moved:!1},(V=g.current)==null||V.setPointerCapture(E.pointerId)},q=(E,T)=>{var ie,ae;if(!i)return;E.stopPropagation(),E.preventDefault(),(ie=g.current)==null||ie.focus({preventScroll:!0});const C=Vi(n,i,p),V=Bn(n.width,C.width,d),w=Bn(n.height,C.height,u),U={minX:V,minY:w,maxX:V+C.width,maxY:w+C.height},M=Ma(U,jp(T)),A=Ma(U,T),j=Math.hypot(A.x-M.x,A.y-M.y);!isFinite(j)||j<=0||(b.current={pointerId:E.pointerId,anchor:M,startDistance:j,startScale:p,startX:V,startY:w,moved:!1},(ae=g.current)==null||ae.setPointerCapture(E.pointerId))},z=E=>{if(!i)return;const T=b.current;if(T&&E.pointerId===T.pointerId){E.stopPropagation(),E.preventDefault();const V=S(E.clientX,E.clientY),w={x:V.x-n.x,y:V.y-n.y},U=Math.hypot(w.x-T.anchor.x,w.y-T.anchor.y),M=Math.min(sl,Math.max(al,T.startScale*(U/T.startDistance)));if(!T.moved&&Math.abs(M-T.startScale)<1e-4)return;T.moved=!0;const A=M/T.startScale,j=T.anchor.x+(T.startX-T.anchor.x)*A,ie=T.anchor.y+(T.startY-T.anchor.y)*A,ae=Vi(n,i,M);y({focalX:yo(n.width,ae.width,j),focalY:yo(n.height,ae.height,ie),scale:M});return}const C=x.current;if(C&&E.pointerId===C.pointerId){E.stopPropagation(),E.preventDefault();const V=S(E.clientX,E.clientY),w=V.x-C.origin.x,U=V.y-C.origin.y;if(!C.moved&&w===0&&U===0)return;C.moved=!0,y({focalX:yo(n.width,C.width,C.startX+w),focalY:yo(n.height,C.height,C.startY+U),scale:p})}},P=E=>{var V,w;const T=x.current;if(T&&E.pointerId===T.pointerId){x.current=null,E.stopPropagation(),(V=g.current)!=null&&V.hasPointerCapture(T.pointerId)&&g.current.releasePointerCapture(T.pointerId),T.moved&&v(R.current);return}const C=b.current;C&&E.pointerId===C.pointerId&&(b.current=null,E.stopPropagation(),(w=g.current)!=null&&w.hasPointerCapture(C.pointerId)&&g.current.releasePointerCapture(C.pointerId),C.moved&&v(R.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 T=E.key==="="||E.key==="+",C=Math.min(sl,Math.max(al,p*(T?eu:1/eu))),V={focalX:d,focalY:u,scale:C};y(V),v(V)}},G=["nw","ne","se","sw"],$={minX:n.x,minY:n.y,maxX:n.x+n.width,maxY:n.y+n.height},L=s.useMemo(()=>{const E=i??{width:n.width,height:n.height},T=Vi(n,E,p);return!(T.width>0)||!(T.height>0)?null:{x:n.x+Bn(n.width,T.width,d),y:n.y+Bn(n.height,T.height,u),width:T.width,height:T.height}},[i,n.x,n.y,n.width,n.height,d,u,p]),D=L?{minX:L.x,minY:L.y,maxX:L.x+L.width,maxY:L.y+L.height}:$;return a.jsxs("svg",{ref:g,className:`${e}-editor${f?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:_,onPointerMove:z,onPointerUp:P,onPointerCancel:P,onLostPointerCapture:P,"data-pretext-image-editor":!0,children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>c("none")}),f&&o&&L&&r&&a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsxs("mask",{id:m,maskUnits:"userSpaceOnUse",x:L.x,y:L.y,width:L.width,height:L.height,children:[a.jsx("rect",{x:L.x,y:L.y,width:L.width,height:L.height,fill:"#FFFFFF"}),a.jsx("path",{d:r,fillRule:"evenodd",fill:"#000000"})]})}),a.jsx("image",{className:`${e}-editor-ghost`,href:o??void 0,x:L.x,y:L.y,width:L.width,height:L.height,preserveAspectRatio:"none",mask:`url(#${m})`}),a.jsx("rect",{className:`${e}-editor-image-bounds`,x:L.x,y:L.y,width:L.width,height:L.height})]}),f&&a.jsxs(a.Fragment,{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:n.x,y:n.y,width:n.width,height:n.height}),a.jsx("rect",{className:`${e}-editor-body`,x:n.x,y:n.y,width:n.width,height:n.height,onPointerDown:W}),G.map(E=>{const T=ll(D,E),C=E==="ne"||E==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:T.x-ia/2,y:T.y-ia/2,width:ia,height:ia}),a.jsx("rect",{className:`${e}-editor-scale-grab${C?` ${e}-editor-scale-grab-nesw`:""}`,x:T.x-na/2,y:T.y-na/2,width:na,height:na,onPointerDown:V=>q(V,E)})]},E)})]})]})}const dl=10,zC=dl*2,On=7,jC=4,so=9,VC=3.5,tu=1.08,GC=.05,oa=14,XC=1,ra=14,aa=8;function UC({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 v=s.useRef(null),g=s.useRef(null),m=s.useRef(i);m.current=i;const x=s.useRef(null),b=s.useRef(null),R=s.useRef(null),f=s.useRef(null),[S,W]=s.useState([]),[q,z]=s.useState(fo),[P,_]=s.useState(null),G=s.useCallback(h=>{z(Y=>AC(Y,h)?Y:h)},[]),$=c==="shape";s.useEffect(()=>{var h;$&&((h=v.current)==null||h.focus({preventScroll:!0}))},[$]),s.useEffect(()=>{$||W(h=>h.length?[]:h)},[$]);const L=S.length>0;s.useEffect(()=>{u==null||u(L)},[L,u]),s.useEffect(()=>()=>u==null?void 0:u(!1),[u]);const D=n.width>0?t.width/n.width:1,E=n.height>0?t.height/n.height:1,T=Math.min(D,E),C=r&&l?T:D,V=r&&l?T:E,w=r&&l?(t.width-n.width*T)/2:0,U=r&&l?(t.height-n.height*T)/2:0,M=s.useCallback(h=>r?{x:w+(h.x-n.x)*C,y:U+(h.y-n.y)*V}:{x:h.x-n.x,y:h.y-n.y},[r,n,C,V,w,U]),A=s.useCallback(h=>r?{x:n.x+(C>0?(h.x-w)/C:0),y:n.y+(V>0?(h.y-U)/V:0)}:{x:n.x+h.x,y:n.y+h.y},[r,n,C,V,w,U]),j=s.useMemo(()=>A({x:t.width/2,y:t.height/2}),[A,t.width,t.height]),ie=s.useCallback((h,Y)=>{var ne;const Q=(ne=v.current)==null?void 0:ne.getBoundingClientRect();if(!Q||Q.width<=0||Q.height<=0)return{x:0,y:0};if(r){const ue=(h-Q.left)/Q.width*t.width,B=(Y-Q.top)/Q.height*t.height;return{x:n.x+(C>0?(ue-w)/C:0),y:n.y+(V>0?(B-U)/V:0)}}return{x:n.x+(h-Q.left),y:n.y+(Y-Q.top)}},[r,n,t.width,t.height,C,V,w,U]),ae=s.useCallback((h,Y)=>{var ne;const Q=(ne=v.current)==null?void 0:ne.getBoundingClientRect();return!Q||Q.width<=0||Q.height<=0?{x:0,y:0}:{x:(h-Q.left)/Q.width*t.width,y:(Y-Q.top)/Q.height*t.height}},[t.width,t.height]),O=s.useCallback((h,Y)=>{const Q=l&&!(Y!=null&&Y.preserveShape)?CC(h,n,t,w,U,C,V):h;y(Q,Y)},[y,l,n,t,w,U,C,V]),re=s.useCallback(()=>{_(null)},[]),N=s.useCallback((h,Y,Q)=>{if(!Q||x.current||b.current||R.current||f.current){re();return}const ne=ae(h,Y),ue=dn(m.current,M);for(const X of ue)for(const Me of X.nodes)if(Math.hypot(Me.p.x-ne.x,Me.p.y-ne.y)<=so){re();return}const B=Yd(ue,ne);if(!B||B.distance>dl){re();return}const I=ue[B.contour],ee=I==null?void 0:I.nodes[B.segment],te=I==null?void 0:I.nodes[(B.segment+1)%((I==null?void 0:I.nodes.length)??1)],ge=!!(ee&&te&&!jo(ee,te));_(X=>X&&X.curved===ge&&Math.hypot(X.point.x-B.point.x,X.point.y-B.point.y)<.25?X:{point:B.point,curved:ge})},[ae,M,re]),le=h=>{var We;const Y=h.metaKey||h.ctrlKey,Q=R.current;if(Q&&h.pointerId===Q.pointerId){if(h.stopPropagation(),h.preventDefault(),Q.startDistance<=0)return;const ot=ie(h.clientX,h.clientY),qe=Math.hypot(ot.x-Q.origin.x,ot.y-Q.origin.y),tt=Math.max(GC,qe/Q.startDistance);if(!Q.moved&&Math.abs(tt-1)<1e-4)return;Q.moved=!0,p(Gd(Q.startContours,Q.origin,tt));return}const ne=b.current;if(ne&&h.pointerId===ne.pointerId){h.stopPropagation(),h.preventDefault();const ot=ie(h.clientX,h.clientY),{bbox:qe}=ne,tt=qe.maxX-qe.minX,et=qe.maxY-qe.minY,Ge=ot.x-ne.origin.x,ve=ot.y-ne.origin.y;let _e=Ge,ze=ve;if(isFinite(tt)&&isFinite(et))if(r){let $e=n.x,Ne=n.x+n.width,Ye=n.y,Ze=n.y+n.height;l&&(C>0&&($e=n.x+(0-w)/C,Ne=n.x+(t.width-w)/C),V>0&&(Ye=n.y+(0-U)/V,Ze=n.y+(t.height-U)/V));const st=Math.min($e,Ne-tt),it=Math.max($e,Ne-tt),Oe=Math.min(Ye,Ze-et),Ae=Math.max(Ye,Ze-et),mt=Math.min(it,Math.max(st,qe.minX+Ge)),Be=Math.min(Ae,Math.max(Oe,qe.minY+ve));_e=mt-qe.minX,ze=Be-qe.minY}else{const $e=qe.minX-n.x,Ne=qe.minY-n.y,Ye=Math.min(0,t.width-tt),Ze=Math.max(0,t.width-tt),st=Math.min(0,t.height-et),it=Math.max(0,t.height-et),Oe=Math.min(Ze,Math.max(Ye,$e+Ge)),Ae=Math.min(it,Math.max(st,Ne+ve));_e=Oe-$e,ze=Ae-Ne}const Qe=[];if(!Y&&isFinite(tt)&&isFinite(et)){const $e=M({x:qe.minX+tt/2+_e,y:qe.minY+et/2+ze}),Ne={x:t.width/2,y:t.height/2};Math.abs($e.x-Ne.x)<=oa&&(_e=j.x-qe.minX-tt/2,Qe.push(rl(Ne.x,"x",t))),Math.abs($e.y-Ne.y)<=oa&&(ze=j.y-qe.minY-et/2,Qe.push(rl(Ne.y,"y",t)))}if(!ne.moved&&_e===0&&ze===0)return;ne.moved=!0,G(Qe.length?Qe:fo),p(dn(ne.startContours,$e=>({x:$e.x+_e,y:$e.y+ze})),{carryImage:!0});return}const ue=f.current;if(ue&&h.pointerId===ue.pointerId){h.stopPropagation(),h.preventDefault();const ot=ie(h.clientX,h.clientY);let qe=ot.x-ue.origin.x,tt=ot.y-ue.origin.y;if(h.shiftKey&&(Math.abs(qe)>Math.abs(tt)?tt=0:qe=0),!ue.moved&&qe===0&&tt===0)return;ue.moved=!0,p(Ud(ue.startContours,ue.selection,qe,tt));return}const B=x.current;if(!B||h.pointerId!==B.pointerId){N(h.clientX,h.clientY,S.length>0||$);return}re(),h.stopPropagation(),h.preventDefault();const I=ie(h.clientX,h.clientY);if(B.kind==="anchor"){const ot={x:B.anchor.x+(I.x-B.origin.x),y:B.anchor.y+(I.y-B.origin.y)},qe=Y?[]:kC(m.current,{contour:B.contour,node:B.node}),tt=Y||!B.center?[]:[B.center],et=Qd(Kd(qe,tt.map(_e=>_e.x),"x"),ot,"x",M,oa),Ge=Qd(Kd(qe,tt.map(_e=>_e.y),"y"),ot,"y",M,oa),ve=Y?ot:{x:(et==null?void 0:et.value)??ta(ot.x,o),y:(Ge==null?void 0:Ge.value)??ta(ot.y,o)};if(h.shiftKey&&(Math.abs(ve.x-B.anchor.x)>Math.abs(ve.y-B.anchor.y)?ve.y=B.anchor.y:ve.x=B.anchor.x),!B.moved&&ve.x===B.anchor.x&&ve.y===B.anchor.y)return;B.moved=!0,G(_C(ve,et,Ge,t,M)),p(LC(m.current,B.contour,B.node,ve));return}const ee=(We=m.current[B.contour])==null?void 0:We.nodes[B.node],te=B.mirror&&!h.altKey,ge=te||Y?null:B.kind==="in"?ee==null?void 0:ee.out:ee==null?void 0:ee.in,X=ee?M(ee.p):null,Me=ge?M(ge):null,Se=ee&&(!Y||h.shiftKey)?WC(I,ee.p,te||Y?null:HC(m.current[B.contour],B.node,B.kind,M),X&&Me?Math.hypot(Me.x-X.x,Me.y-X.y):null,h.shiftKey,M,A):{point:I,guides:fo},Z=Se.guides.length?Se.point:Y?I:{x:ta(I.x,o),y:ta(I.y,o)},He=B.kind==="in"?ee==null?void 0:ee.in:ee==null?void 0:ee.out;!B.moved&&He&&Z.x===He.x&&Z.y===He.y||(B.moved=!0,G(Se.guides),p(MC(m.current,B.contour,B.node,B.kind,Z,te)))},J=h=>{G(fo);const Y=R.current;if(Y&&h.pointerId===Y.pointerId){R.current=null,h.stopPropagation();const ge=v.current;ge!=null&&ge.hasPointerCapture(Y.pointerId)&&ge.releasePointerCapture(Y.pointerId),Y.moved&&O(m.current,{preserveShape:!0});return}const Q=b.current;if(Q&&h.pointerId===Q.pointerId){b.current=null,h.stopPropagation();const ge=v.current;ge!=null&&ge.hasPointerCapture(Q.pointerId)&&ge.releasePointerCapture(Q.pointerId),Q.moved?O(m.current,{preserveShape:!0}):W([]);return}const ne=f.current;if(ne&&h.pointerId===ne.pointerId){f.current=null,h.stopPropagation();const ge=v.current;ge!=null&&ge.hasPointerCapture(ne.pointerId)&&ge.releasePointerCapture(ne.pointerId),ne.moved&&O(m.current);return}const ue=x.current;if(!ue||h.pointerId!==ue.pointerId)return;x.current=null,h.stopPropagation();const B=v.current;B!=null&&B.hasPointerCapture(ue.pointerId)&&B.releasePointerCapture(ue.pointerId);const I=Math.hypot(h.clientX-ue.clientOrigin.x,h.clientY-ue.clientOrigin.y);if(ue.moved||I>jC){ue.moved&&O(m.current);return}if(!ue.toggleOnRelease||h.type!=="pointerup")return;const te=qd(m.current,ue.contour,ue.node);te!==m.current&&(p(te),O(te))},be=h=>{h.stopPropagation()},Pe=h=>{var Y,Q;h.stopPropagation(),h.preventDefault(),re(),(Y=v.current)==null||Y.focus({preventScroll:!0}),b.current={pointerId:h.pointerId,origin:ie(h.clientX,h.clientY),startContours:zn(i),bbox:Ci(i),moved:!1},(Q=v.current)==null||Q.setPointerCapture(h.pointerId)},ye=(h,Y)=>{var I,ee;h.stopPropagation(),h.preventDefault(),re(),(I=v.current)==null||I.focus({preventScroll:!0}),W([]),d("shape");const Q=Ci(i),ne=Ma(Q,jp(Y)),ue=ll(Q,Y),B=Math.hypot(ue.x-ne.x,ue.y-ne.y);!isFinite(B)||B<=0||(R.current={pointerId:h.pointerId,corner:Y,origin:ne,startDistance:B,startContours:zn(i),moved:!1},(ee=v.current)==null||ee.setPointerCapture(h.pointerId))},ce=(h,Y,Q,ne)=>{var I,ee,te,ge;h.stopPropagation(),h.preventDefault(),re(),(I=v.current)==null||I.focus({preventScroll:!0});const ue=(ee=i[Q])==null?void 0:ee.nodes[ne];if(!ue)return;if(h.altKey){const X=Y==="anchor"?zp(i,Q,ne):IC(i,Q,ne,Y);if(X===i)return;W(Y==="anchor"?[]:[{contour:Q,node:ne}]),p(X),O(X);return}const B=h.metaKey||h.ctrlKey;if(Y==="anchor"&&h.shiftKey&&!B){W(X=>X.some(Me=>Me.contour===Q&&Me.node===ne)?X.filter(Me=>!(Me.contour===Q&&Me.node===ne)):[...X,{contour:Q,node:ne}]);return}if(Y==="anchor"&&!B&&S.length>1&&S.some(X=>X.contour===Q&&X.node===ne)){f.current={pointerId:h.pointerId,origin:ie(h.clientX,h.clientY),startContours:zn(i),selection:S,moved:!1},(te=v.current)==null||te.setPointerCapture(h.pointerId);return}W([{contour:Q,node:ne}]),x.current={kind:Y,contour:Q,node:ne,pointerId:h.pointerId,origin:ie(h.clientX,h.clientY),clientOrigin:{x:h.clientX,y:h.clientY},anchor:ue.p,center:$C(i),mirror:Y!=="anchor"&&!!(ue.in&&ue.out),toggleOnRelease:B,moved:!1},(ge=v.current)==null||ge.setPointerCapture(h.pointerId)},K=h=>{h.stopPropagation(),h.preventDefault(),re();const Y=dn(i,M),Q=Yd(Y,ae(h.clientX,h.clientY));if(!Q||Q.distance>dl)return;const{contours:ne,nodeIndex:ue}=RC(i,Q.contour,Q.segment,Q.t);ue<0||(W([{contour:Q.contour,node:ue}]),p(ne),O(ne))},se=h=>{if(h.key==="="||h.key==="+"||h.key==="-"||h.key==="_"){h.preventDefault(),h.stopPropagation();const B=Ci(i);if(!isFinite(B.minX)||!isFinite(B.maxX))return;const I={x:(B.minX+B.maxX)/2,y:(B.minY+B.maxY)/2},te=h.key==="="||h.key==="+"?tu:1/tu,ge=Gd(i,I,te);p(ge),O(ge,{preserveShape:!0});return}if(h.key==="Escape"){h.stopPropagation(),W([]),d("none");return}if(!S.length)return;if(h.key==="Backspace"||h.key==="Delete"){h.preventDefault(),h.stopPropagation();const B=PC(i,S);if(B===i)return;W([]),p(B),O(B);return}const Y=o>0?o:XC,Q=h.shiftKey?Y*10:Y,ne={ArrowLeft:[-Q,0],ArrowRight:[Q,0],ArrowUp:[0,-Q],ArrowDown:[0,Q]}[h.key];if(!ne)return;h.preventDefault(),h.stopPropagation();const ue=Ud(i,S,ne[0],ne[1]);p(ue),O(ue)},pe=s.useMemo(()=>_o(dn(i,M)),[i,M]),fe=s.useMemo(()=>Ci(i),[i]),we=M({x:fe.minX,y:fe.minY}),Ie={width:M({x:fe.maxX,y:fe.minY}).x-we.x,height:M({x:fe.minX,y:fe.maxY}).y-we.y},me=$&&S.length===0&&isFinite(fe.minX)&&isFinite(fe.maxX)&&fe.maxX>fe.minX&&fe.maxY>fe.minY,xe=S.length>0||$,Ce=xe;return a.jsxs("svg",{ref:v,className:`${e}-editor${xe?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:se,onPointerDown:()=>{var h;return(h=v.current)==null?void 0:h.focus({preventScroll:!0})},onPointerMove:le,onPointerLeave:re,onPointerUp:J,onPointerCancel:J,onLostPointerCapture:J,onContextMenu:h=>{h.preventDefault()},"data-pretext-path-editor":!0,"data-selection":"none",children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>{W([]),d("none")},onClick:K}),Ce&&a.jsx("path",{className:`${e}-editor-outline`,d:pe}),Ce&&q.map((h,Y)=>a.jsx("line",{className:`${e}-editor-snap ${e}-editor-snap-${h.kind}`,x1:h.a.x,y1:h.a.y,x2:h.b.x,y2:h.b.y},`${h.kind}-${Y}`)),a.jsx("path",{ref:g,className:`${e}-editor-body`,d:pe,fillRule:"evenodd",onPointerDown:Pe,onClick:K}),Ce&&a.jsx("path",{className:`${e}-editor-hit`,d:pe,style:{strokeWidth:zC},onClick:K}),Ce&&P&&a.jsx("rect",{className:`${e}-editor-add-preview`,x:P.point.x-On/2,y:P.point.y-On/2,width:On,height:On,rx:P.curved?On/2:0}),Ce&&i.map((h,Y)=>h.nodes.map((Q,ne)=>{const ue=S.some(I=>I.contour===Y&&I.node===ne),B=M(Q.p);return a.jsxs("g",{children:[ue&&S.length===1&&["in","out"].map(I=>{const ee=Q[I];if(!ee)return null;const te=M(ee);return a.jsxs("g",{children:[a.jsx("line",{className:`${e}-editor-handle-line`,x1:B.x,y1:B.y,x2:te.x,y2:te.y}),a.jsx("circle",{className:`${e}-editor-handle`,cx:te.x,cy:te.y,r:VC}),a.jsx("circle",{className:`${e}-editor-grab`,cx:te.x,cy:te.y,r:so,onPointerDown:ge=>ce(ge,I,Y,ne),onClick:be})]},I)}),a.jsx("rect",{className:`${e}-editor-anchor${ue?` ${e}-editor-anchor-selected`:""}`,x:B.x-On/2,y:B.y-On/2,width:On,height:On,rx:_p(Q)?On/2:0}),a.jsx("rect",{className:`${e}-editor-grab`,x:B.x-so,y:B.y-so,width:so*2,height:so*2,onPointerDown:I=>ce(I,"anchor",Y,ne),onClick:be,onDoubleClick:I=>{I.stopPropagation(),I.preventDefault();const ee=qd(i,Y,ne);p(ee),O(ee)}})]},`${Y}-${ne}`)})),me&&a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:we.x,y:we.y,width:Ie.width,height:Ie.height}),["nw","ne","se","sw"].map(h=>{const Y=M(ll(fe,h)),Q=h==="ne"||h==="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${Q?` ${e}-editor-scale-grab-nesw`:""}`,x:Y.x-ra/2,y:Y.y-ra/2,width:ra,height:ra,onPointerDown:ne=>ye(ne,h),onClick:be})]},h)})]})]})}const qC=4e3,YC=/^(?:https?:|mailto:|tel:)/i;function Vp(e){return!!e&&typeof e=="object"&&e.type==="link"}function KC(e){if(!e)return;const t=e.replace(/\s+/g,"");if(!(/^[a-z][a-z0-9+.-]*:/i.test(t)&&!YC.test(t)))return t}function QC(e){const t=[];return e.forEach((n,i)=>{const o=(r,l,c)=>{for(const d of r){if(Vp(d)){o(d.children??[],KC(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 nu(e){return{...e.fontFamily&&{fontFamily:Do(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 ZC(e){return e.map(t=>{const n=[],i=o=>{for(const r of o){if(Vp(r)){i(r.children??[]);continue}n.push((r==null?void 0:r.text)??"")}};return i((t==null?void 0:t.children)??[]),n.join("")})}function JC(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 g of l){const m=g.x*n,x=g.y*i;m<c&&(c=m),m>d&&(d=m),x<u&&(u=x),x>p&&(p=x)}const y=(c+d)/2,v=(u+p)/2;return l.map(g=>{const m=g.x*n,x=g.y*i,b=m-y,R=x-v,f=Math.sqrt(b*b+R*R);if(f<1e-6)return g;const W=Math.max(0,f+r*t)/f;return{x:(y+b*W)/n,y:(v+R*W)/i}})})}const ks=2,As=2;function eT(e,t,n,i,o){if(e.kind!=="whole")return null;const r=t[e.originalIndex],l=e.token.text;if(!r||l.length<ks+As)return null;const c=Math.min(r.length-As,l.length-As);let d=-1;for(let u=c;u>=ks;u-=1)if(r[u-1]*i+o*i<=n){d=u;break}return d<ks?null:{fragmentText:`${l.slice(0,d)}-`,remainderText:l.slice(d),fragmentWidth:r[d-1]+o,remainderWidth:Math.max(0,e.width-r[d-1])}}function iu(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,v=!!e.hyphenate,g=e.charWidths??[],m=e.hyphenWidth??0,x=e.lineHeight*l,b=e.spaceWidth*l,R=Math.max(0,e.shapeMargin??0),f=[],S=t.map((C,V)=>({token:C,originalIndex:V,width:n[V],kind:"whole"}));if(!S.length||c<=0||x<=0)return{segments:f,placed:0,height:0,capLeft:0,capTop:0,renderTokens:t};const W=Math.max(1,b*.5),q=x*nC,z=JC(i,R,c,d,o);let P=0,_=0,G=0,$=S[0].token.para,L=0,D=0,E=null;for(;P<S.length&&G<qC;){const C=_+x>d;if(C&&!u)break;const V=S[P].token.para;if(V>$+1){_+=x*(V-$-1),$=V-1,G+=1;continue}let w=C?[{x0:0,x1:c}]:dC(z,(_+q)/d,(_+x-q)/d,o).map(M=>({x0:M.x0*c,x1:M.x1*c}));p>0&&y>0&&!C&&w.length&&(E===null&&(E=G,L=w[0].x0,D=_),G-E<y&&(w=cC(w,{x0:L,x1:L+p})));const U=w.reduce((M,A)=>Math.max(M,A.x1-A.x0),0);for(const M of w){const A=M.x1-M.x0;if(A<W)continue;if(P>=S.length||S[P].token.para!==V)break;const j=P;let ie=0;for(;P<S.length&&S[P].token.para===V;){const ae=S[P],O=P===j,re=ae.width*l,N=O?re:b+re;if(ie+N<=A){ie+=N,P+=1;continue}if(O&&A>=U-.5&&re>c-.5){ie+=N,P+=1;continue}if(v){const J=A-ie-(O?0:b),be=eT(ae,g,J,l,m);if(be){const Pe={token:{...ae.token,text:be.fragmentText},originalIndex:ae.originalIndex,width:be.fragmentWidth,kind:"fragment"},ye={token:{...ae.token,text:be.remainderText},originalIndex:ae.originalIndex,width:be.remainderWidth,kind:"remainder"};S.splice(P,1,Pe,ye),ie+=(O?0:b)+be.fragmentWidth*l,P+=1}}break}if(P>j){const ae=P>=S.length||S[P].token.para!==V;f.push({top:_,left:M.x0,width:A,from:j,to:P,justify:r==="justify"&&!ae})}if(P>=S.length||S[P].token.para!==V)break}$=V,_+=x,G+=1}let T=0;if(P>0){const C=S[P-1];T=C.kind==="fragment"?C.originalIndex:C.originalIndex+1}return{segments:f,placed:T,height:f.length?_:0,capLeft:L,capTop:D,renderTokens:S.map(C=>C.token)}}const tT=.12,nT=2,iT=10,Fs=.25,oT=e=>{const t=e.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}},rT=(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=oT(e);(!r||!rT(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 sT(){return typeof document>"u"?null:document.body}function lT({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:v,hyphenate:g,showOverflowIndicator:m,dropCapLines:x,dropCapSize:b,showGuides:R,typography:f,imageUrl:S,imageFocalX:W,imageFocalY:q,imageScale:z,imageCustomPath:P,pathDragActive:_,pathCarryImage:G,onCarryImageConsumed:$,pathEditor:L,imageEditor:D}){var Ue,ct;const E=`pretext-shape-image-${s.useId().replace(/:/g,"")}`,[T,C]=s.useState(null),V=s.useRef(null),[w,U]=s.useState({width:0,height:0}),[M,A]=s.useState(0),[j,ie]=s.useState(null),[ae,O]=s.useState(0),[re,N]=s.useState("none");s.useEffect(()=>{!L&&!D&&N("none")},[L,D]);const[le,J]=s.useState(null);s.useEffect(()=>{if(!S||typeof Image>"u"){J(null);return}let he=!1;const Re=new Image;return Re.onload=()=>{he||J({width:Re.naturalWidth,height:Re.naturalHeight})},Re.src=S,()=>{he=!0}},[S]);const be=s.useMemo(()=>Array.isArray(t==null?void 0:t.text)?t.text:[],[t]),Pe=s.useMemo(()=>QC(be),[be]),ye=s.useMemo(()=>ZC(be),[be]),ce=x>0&&b>1?((ct=(Ue=Pe[0])==null?void 0:Ue.text)==null?void 0:ct.charAt(0))??"":"",K=(L==null?void 0:L.contours)??null,se=s.useMemo(()=>{let he=[];if(K){const Re=$r(K);Re.length&&(he=wo(Re,r))}if(!he.length){const Re=i.trim(),nt=Re?Bd(Re,o,r):null;nt&&nt.length?he=nt:he=tl(n==="custom"?"rectangle":n)}return n==="circle"?Ns(he,w):he},[K,n,i,o,r,w.width,w.height]),pe=L==null?void 0:L.onConvert,fe=(L==null?void 0:L.needsConversion)??!1,we=s.useMemo(()=>{if(n==="circle")return!1;const he=K??(i.trim()?Ii(i):null);return!!(he&&Dp(he,r))},[K,i,r,n]),[Ie,me]=s.useState(null);nr(()=>{if(!we){Ie&&me(null);return}!Ie&&w.width>0&&w.height>0&&me({width:w.width,height:w.height})},[we,w.width,w.height,Ie]);const xe=s.useMemo(()=>{if(!we||w.width<=0||w.height<=0)return se;const he=Ie??w,Re=r.width/he.width,nt=r.height/he.height;return se.map(pt=>pt.map(Ve=>({x:Ve.x*Re,y:Ve.y*nt})))},[se,we,Ie,r.width,r.height,w.width,w.height]),Ce=s.useMemo(()=>{if(K){const pt=$r(K);if(pt.length){const Ve=wo(pt,r);return n==="circle"?Ns(Ve,w):Ve}}const he=P.trim(),Re=he?Bd(he,o,r):null,nt=Re&&Re.length?Re:tl(n==="custom"?"rectangle":n);return n==="circle"?Ns(nt,w):nt},[K,n,P,o,r,w.width,w.height]),h=s.useMemo(()=>{if(!we||w.width<=0||w.height<=0)return Ce;const he=Ie??w,Re=r.width/he.width,nt=r.height/he.height;return Ce.map(pt=>pt.map(Ve=>({x:Ve.x*Re,y:Ve.y*nt})))},[Ce,we,Ie,r.width,r.height,w.width,w.height]),Y=s.useRef(null),Q=s.useRef(!1);s.useEffect(()=>{if(!(!pe||w.width<=0||w.height<=0)){if(we){if(Y.current===i)return;const he=K??(i.trim()?Ii(i):null);if(!(he!=null&&he.length))return;const Re=dn(he,nt=>({x:r.x+(nt.x-r.x)/w.width*r.width,y:r.y+(nt.y-r.y)/w.height*r.height}));Y.current=_o(Re),pe(Re);return}!fe||!se.length||Q.current||(Q.current=!0,pe(dn(Op(se),he=>({x:he.x*Pa,y:he.y*Pa}))))}},[fe,we,pe,se,K,i,r,w.width,w.height]);const ne=s.useCallback(()=>{const he=T;if(!he)return;const Re=he.getBoundingClientRect(),nt=parseFloat(window.getComputedStyle(he).paddingTop)||0;A(Ve=>Math.abs(Ve-nt)<.5?Ve:nt);const pt={width:Re.width,height:Re.height};U(Ve=>Math.abs(Ve.width-pt.width)<.5&&Math.abs(Ve.height-pt.height)<.5?Ve:pt)},[T]);nr(()=>{const he=T;if(!he||typeof ResizeObserver>"u")return;ne();const Re=new ResizeObserver(ne);return Re.observe(he),()=>Re.disconnect()},[T,ne]),nr(()=>{ne()},[v,ne]),s.useEffect(()=>{const he=typeof document<"u"?document.fonts:void 0;he!=null&&he.ready&&he.ready.then(()=>{O(Re=>Re+1)})},[]),nr(()=>{const he=V.current;if(!he)return;if(!Pe.length){ie(null);return}const Re=[],nt=document.createDocumentFragment();for(const ut of Pe){const H=document.createElement("span");Object.assign(H.style,nu(ut.leaf)),H.textContent=ut.text,nt.appendChild(H),Re.push(H)}const pt=document.createElement("span");pt.textContent=" ",nt.appendChild(pt);const Ve=document.createElement("span");Ve.textContent="-",nt.appendChild(Ve);const vt=ce||"H",Mt=document.createElement("span");Mt.textContent=vt,Mt.style.lineHeight="1",nt.appendChild(Mt),he.replaceChildren(nt);const At=window.getComputedStyle(he),wt=parseFloat(At.fontSize)||16,Vt=parseFloat(At.lineHeight),jt=Number.isNaN(Vt)?wt*1.2:Vt,Yt=Math.max(jt,wt),Kt=document.createElement("span");Kt.textContent=vt,Kt.style.lineHeight=`${Yt}px`;const It=document.createElement("span");It.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",Kt.appendChild(It),he.appendChild(Kt);const zt=Kt.getBoundingClientRect().top,on=It.getBoundingClientRect().top,xt=Math.max(1,on-zt);Kt.remove();let yt=xt*.8;const Je=document.createElement("canvas").getContext("2d"),rt=ut=>`${At.fontStyle} ${At.fontWeight} ${ut}px ${At.fontFamily}`;if(Je){Je.font=rt(wt);const ut=Je.measureText(vt).actualBoundingBoxAscent;ut>0&&(yt=ut)}const dt=b>1?(b-1)*Yt+yt:yt;let Pt=wt*(dt/yt);if(Je){Je.font=rt(Pt);const ut=Je.measureText(vt).actualBoundingBoxAscent;ut>0&&(Pt=Pt*(dt/ut))}Mt.style.fontSize=`${Pt}px`,Mt.style.lineHeight=`${Pt}px`;const St=document.createElement("span");St.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",Mt.appendChild(St);const ht=Math.max(1,St.getBoundingClientRect().top-Mt.getBoundingClientRect().top);St.remove();const Tt=(b-1)*Yt+xt-ht,Ot=Re.map(ut=>ut.getBoundingClientRect().width),Gt=pt.getBoundingClientRect().width,kt=Ve.getBoundingClientRect().width,_t=ce?Mt.getBoundingClientRect().width:0,Ft=g?Re.map(ut=>{const H=ut.firstChild;if(!(H instanceof Text)||H.data.length<4)return;const Le=document.createRange(),je=ut.getBoundingClientRect().left,Fe=[];for(let ft=1;ft<=H.data.length;ft+=1)Le.setStart(H,0),Le.setEnd(H,ft),Fe.push(Le.getBoundingClientRect().right-je);return Fe}):[];he.replaceChildren(),ie({widths:Ot,spaceWidth:Gt,dashWidth:kt,charWidths:Ft,lineHeight:Yt,capWidth:_t,dropCapFontSize:Pt,dropCapTopAdjust:Tt})},[Pe,f,ce,x,b,ae,w.width,g]);const ue=j&&ce?j.capWidth+j.lineHeight*tT:0,B=Math.max(x,Math.ceil(b)),I=s.useMemo(()=>{if(!j||!Pe.length||w.width<=0||w.height<=0||!u)return 1;const he=pt=>iu({tokens:Pe,widths:j.widths,spaceWidth:j.spaceWidth,lineHeight:j.lineHeight,width:w.width,height:w.height,rings:xe,mode:l,align:c,scale:pt,allowOverflow:!1,capInset:ue*pt,capLines:ce?B:0,hyphenate:g,charWidths:j.charWidths,hyphenWidth:j.dashWidth,shapeMargin:M});if(he(1).placed>=Pe.length)return 1;if(he(Fs).placed<Pe.length)return Fs;let Re=Fs,nt=1;for(let pt=0;pt<iT;pt+=1){const Ve=(Re+nt)/2;he(Ve).placed>=Pe.length?Re=Ve:nt=Ve}return Re},[j,Pe,w.width,w.height,xe,l,c,u,ue,ce,B,g,M]);s.useEffect(()=>{y(I)},[I,y]);const ee=u?Math.min(p,I):1,te=s.useMemo(()=>!j||!Pe.length||w.width<=0||w.height<=0?{segments:[],placed:0,height:0,capLeft:0,capTop:0,renderTokens:Pe}:iu({tokens:Pe,widths:j.widths,spaceWidth:j.spaceWidth,lineHeight:j.lineHeight,width:w.width,height:w.height,rings:xe,mode:l,align:c,scale:ee,allowOverflow:d,capInset:ue*ee,capLines:ce?B:0,hyphenate:g,charWidths:j.charWidths,hyphenWidth:j.dashWidth,shapeMargin:M}),[j,Pe,w.width,w.height,xe,l,c,ee,d,ue,ce,B,g,M]),ge=m&&Pe.length>0&&te.placed<Pe.length,X=j?j.dropCapFontSize*ee:0,Me=j?j.dropCapTopAdjust*ee:0,Se=c==="justify"?"left":c,Z=j?j.lineHeight*ee:0,He=te.segments.length?te.segments[te.segments.length-1]:null,We=He?{top:He.top+Z,left:He.left+He.width/2}:{top:w.height,left:w.width/2},ot=!!(L&&K&&w.width>0&&w.height>0),qe=!!D,tt=(ot||qe)&&w.width>0&&w.height>0,et=aT(T,tt),Ge=tt&&et?sT():null,ve=s.useRef(!1),_e=s.useCallback(he=>{ve.current=he},[]);s.useEffect(()=>{if(!ot&&!qe)return;const he=Re=>{const nt=T;if(!nt)return;const pt=nt.getBoundingClientRect();Re.clientX>=pt.left&&Re.clientX<=pt.right&&Re.clientY>=pt.top&&Re.clientY<=pt.bottom&&(Re.preventDefault(),Re.stopPropagation(),N(vt=>vt==="shape"&&ve.current?vt:vt==="shape"&&qe?"image":ot?"shape":"image"))};return document.addEventListener("dblclick",he,!0),()=>document.removeEventListener("dblclick",he,!0)},[ot,qe,T]);const ze=s.useMemo(()=>S&&w.width>0&&w.height>0?iC(h,w):null,[S,h,w.width,w.height]),Qe=s.useRef(null),$e=(()=>{const he=Qe.current;return G||!D||!le||!ze||!he||P===he.customPath||he.shape!==n&&n!=="custom"?null:DC(he.bounds,ze,le,he.focalX,he.focalY,he.scale)})();nr(()=>{if(_||!D||!le||!ze)return;const he=Qe.current,Re=!!(he&&P!==he.customPath);Re&&$e&&D.onCommit($e),Re&&G&&($==null||$()),Qe.current={rings:h,bounds:ze,focalX:($e==null?void 0:$e.focalX)??W,focalY:($e==null?void 0:$e.focalY)??q,scale:($e==null?void 0:$e.scale)??z,customPath:P,shape:n}},[_,G,P,n,h,ze,D,le,W,q,z,$e,$]);const Ne=Qe.current,Ye=!!(_&&!G&&Ne&&!$e),Ze=Ye&&Ne?Ne.focalX:($e==null?void 0:$e.focalX)??W,st=Ye&&Ne?Ne.focalY:($e==null?void 0:$e.focalY)??q,it=Ye&&Ne?Ne.scale:($e==null?void 0:$e.scale)??z,Oe=Ye&&Ne?Ne.bounds:ze,Ae=s.useMemo(()=>{if(!(w.width>0)||!(w.height>0))return"";let he=jd(i,K,o,r,n,w);if(we){const Re=Ie??w,nt=r.width/Re.width,pt=r.height/Re.height;he=dn(he,Ve=>({x:Ve.x*nt,y:Ve.y*pt}))}return Vd(he,w)||Dd(xe,w)},[i,K,o,r,n,w.width,w.height,we,Ie,xe]),mt=s.useMemo(()=>{if(!S||!(w.width>0)||!(w.height>0))return"";let he=jd(P,K,o,r,n,w);if(we){const Re=Ie??w,nt=r.width/Re.width,pt=r.height/Re.height;he=dn(he,Ve=>({x:Ve.x*nt,y:Ve.y*pt}))}return Vd(he,w)||Dd(h,w)},[S,P,K,o,r,n,w.width,w.height,we,Ie,h]),Be=`${E}-clip`,De=s.useMemo(()=>{if(!Oe)return null;const he=le??{width:Oe.width,height:Oe.height},Re=Vi(Oe,he,it);return{x:Bn(Oe.width,Re.width,Ze),y:Bn(Oe.height,Re.height,st),width:Re.width,height:Re.height}},[Oe,le,Ze,st,it]);return a.jsxs("div",{className:`${e}-column`,style:{padding:v},ref:C,children:[Ae?a.jsxs("svg",{className:`${e}-shape-fill`,style:{top:0,left:0,width:w.width,height:w.height},viewBox:`0 0 ${w.width} ${w.height}`,preserveAspectRatio:"none","aria-hidden":!0,children:[a.jsx("path",{className:`${e}-shape-fill-path`,d:Ae,fillRule:"evenodd"}),S&&mt&&Oe&&De?a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsx("clipPath",{id:Be,clipPathUnits:"userSpaceOnUse",children:a.jsx("path",{d:mt,fillRule:"evenodd"})})}),a.jsx("image",{href:S,x:Oe.x+De.x,y:Oe.y+De.y,width:De.width,height:De.height,preserveAspectRatio:"none",clipPath:`url(#${Be})`})]}):null]}):null,a.jsxs("div",{className:`${e}-flow${d?"":` ${e}-clip`}`,style:{...f,["--"+e+"-fit"]:ee,top:0,left:0,width:w.width,height:w.height},children:[a.jsx("div",{className:`${e}-measure`,ref:V,style:f,"aria-hidden":!0}),te.segments.map((he,Re)=>{const nt=te.renderTokens.slice(he.from,he.to),pt=Re===0;return a.jsx("div",{className:`${e}-line${he.justify?` ${e}-line-justify`:""}`,"aria-hidden":!0,style:{top:`${he.top}px`,left:`${he.left}px`,width:`${he.width}px`,textAlign:he.justify?void 0:Se},children:nt.map((Ve,vt)=>{const At=ce&&pt&&he.from===0&&vt===0?Ve.text.slice(1):Ve.text,wt=nu(Ve.leaf),Vt=Ve.href?a.jsx("a",{className:`${e}-link`,href:Ve.href,target:Ve.target,rel:Ve.target?"noopener noreferrer":void 0,style:wt,children:At}):a.jsx("span",{style:wt,children:At});return a.jsxs("span",{children:[!he.justify&&vt>0?" ":null,Vt]},vt)})},`${he.from}-${he.to}-${Re}`)}),R&&!K&&a.jsx("svg",{className:`${e}-guides`,viewBox:"0 0 1 1",preserveAspectRatio:"none","aria-hidden":!0,children:xe.map((he,Re)=>a.jsx("polygon",{points:he.map(nt=>`${nt.x},${nt.y}`).join(" ")},Re))})]}),ce&&j&&a.jsx("div",{className:`${e}-drop-cap`,"aria-hidden":!0,style:{...f,top:`${te.capTop+Me}px`,left:`${te.capLeft}px`,fontSize:`${X}px`,lineHeight:`${X}px`},children:ce}),Ge&&et&&(K&&L||D)&&Xn.createPortal(a.jsxs("div",{"data-selection":"none",style:{position:"fixed",top:et.top,left:et.left,width:et.width,height:et.height,zIndex:nT,pointerEvents:"none"},children:[K&&L&&a.jsx(UC,{P:e,box:{width:et.width,height:et.height},viewBox:r,contours:K,snap:L.snap,stretchToBox:!we,uniformStretch:n==="circle",stage:re,onStageChange:N,onSelectionChange:_e,onChange:L.onChange,onCommit:L.onCommit}),D&&Oe&&a.jsx(BC,{P:e,box:{width:et.width,height:et.height},bounds:Oe,natural:le,imageUrl:S,maskPath:mt,stage:re,onStageChange:N,focalX:Ze,focalY:st,scale:it,onChange:D.onChange,onCommit:D.onCommit})]}),Ge),a.jsx("div",{className:`${e}-a11y`,children:ye.map((he,Re)=>a.jsx("p",{children:he},Re))}),ge&&a.jsxs("svg",{className:`${e}-overflow-icon`,width:"33",height:"24",viewBox:"0 0 33 24",style:{top:We.top,left:We.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 Gp=["diamond","parallelogram","vase","circle","shield","bobbin","custom"],cT={x:0,y:0,width:100,height:100},dT=e=>{const t=(e??"").trim().split(/[\s,]+/).map(Number).filter(n=>!Number.isNaN(n));return t.length<4||t[2]<=0||t[3]<=0?cT:{x:t[0],y:t[1],width:t[2],height:t[3]}},uT=e=>`
27330
+ `;function tr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Di={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 yi(e,t){return e?`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`:t}function Ul(e){return{[yi(e,"fontFamily")]:{type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},[yi(e,"fontSettings")]:{...Di.fontSettings,scope:"common",title:""},[yi(e,"fontSize")]:{...Di.fontSize,scope:"layout",title:""},[yi(e,"lineHeight")]:{...Di.lineHeight,scope:"layout",title:""},[yi(e,"letterSpacing")]:{...Di.letterSpacing,scope:"layout",title:""},[yi(e,"wordSpacing")]:{...Di.wordSpacing,scope:"layout",title:""},[yi(e,"textAlign")]:{...Di.textAlign,scope:"layout",title:""},[yi(e,"textAppearance")]:{...Di.textAppearance,scope:"layout",title:""}}}const X$=Ul(""),U$=Ul("open"),q$=Ul("compact"),Y$=["__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"],K$=["__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"],Q$=["__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"],Jn={textTransform:"none",textDecoration:"none",fontVariant:"normal"},Is={fontWeight:400,fontStyle:"normal"},ea={d:"Always",t:"Open Only",m:"Open Only"},Z$=["left-top","center-top","right-top","left-center","center","right-center","left-bottom","center-bottom","right-bottom"],J$=["iconColor","logoColor","linkColor","backgroundColor"],eC={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:[...Z$]}},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}},...X$,...U$,...q$},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:Is,textAlign:"left",openFontFamily:"Goudy Bookletter 1911",openFontSettings:Is,openTextAlign:"left",compactFontFamily:"Goudy Bookletter 1911",compactFontSettings:Is,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:Jn,openFontSize:34/375,openLineHeight:20/375,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:Jn,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:Jn},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:Jn,openFontSize:75/768,openLineHeight:20/768,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:Jn,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:Jn},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:Jn,textAlign:"center",openFontSize:90/1440,openLineHeight:16/1440,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:Jn,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:Jn,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:Y$},{id:"compact",icon:"compact",title:"Compact",tooltip:"Compact State",layout:K$,availableWhen:{navigationPosition:["switch"]}},{id:"open",icon:"open",title:"Open",tooltip:"Open State",layout:Q$},{id:"links",icon:"content",title:"Links",tooltip:"Link Settings",layout:["__componentName__","link"]}],paletteBookmark:{items:[...J$],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"]},tC={element:V$,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:eC,sourceCode:G$,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,nC=.12,ql={x:0,y:0,width:100,height:100};function wo(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 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 iC(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 oC(e){return e.map(([t,n])=>({x:t,y:n}))}function Rs(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 rC(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 aC(i)}function aC(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 sC(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 lC(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 dC(e,t,n,i){let o=null;for(let r=0;r<Od;r+=1){const l=La(t+(n-t)*r/Math.max(1,Od-1)),c=rC(e,l),d=i==="avoid"?lC(c):c;if(o=o===null?d:sC(o,d),o.length===0)return[]}return o??[]}function Bd(e,t="stretch",n=ql){const i=e.trim();if(!i)return null;if(/^[Mm]/.test(i)){const l=Ri(i),c=$r(l);if(c.length)return t==="viewbox"?wo(c,n):Rs(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 v=document.createElementNS("http://www.w3.org/2000/svg","path");v.setAttribute("d",y),u.appendChild(v);let g=0;try{g=v.getTotalLength()}catch{g=0}if(!g)continue;const m=[];for(let x=0;x<Wd;x+=1){const b=v.getPointAtLength(x/Wd*g);m.push({x:b.x,y:b.y})}p.push(m)}return p.length?t==="viewbox"?wo(p,n):Rs(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"?wo([r],n):Rs([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",Pa=100,el=16,uC=12,pC=16,Ms=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,gC=/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g,zd=Math.PI/4,mC=8,hC=Math.PI/18,fC=8,ho=24,fo=[];function yC(){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 dn(e,n=>({x:(n.x-t.x)/t.width,y:(n.y-t.y)/t.height}))}function vC(e){const t=Ci(e),n=t.maxX-t.minX,i=t.maxY-t.minY;return!isFinite(n)||!isFinite(i)||n<=0||i<=0?e:dn(e,o=>({x:(o.x-t.minX)/n,y:(o.y-t.minY)/i}))}function xC(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 dn(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=Ri(c);d.length&&(l=n==="viewbox"?Es(d,i):vC(d))}if(!l.length){const d=o!=="custom"?Yl[o]:void 0;d?l=Es(Ri(d),ql):l=yC()}}return o==="circle"?xC(l,r):l}function Vd(e,t){return!(t.width>0)||!(t.height>0)||!e.length?"":_o(dn(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?wo($r(Ri(t)),ql):[oC([[0,0],[1,0],[1,1],[0,1]])]}function bC(e){const t=e.match(gC);return t?t.map(Number).filter(n=>!Number.isNaN(n)):[]}function Tn(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 pn(e){return{x:e.x,y:e.y}}function SC(e){return{p:pn(e.p),in:e.in?pn(e.in):null,out:e.out?pn(e.out):null}}function zn(e){return e.map(t=>({closed:t.closed,nodes:t.nodes.map(SC)}))}function dn(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 dn(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:pn(e),c2:pn(l),p:pn(l)}];const u=i*Math.PI/180,p=Math.cos(u),y=Math.sin(u),v=(e.x-l.x)/2,g=(e.y-l.y)/2,m=p*v+y*g,x=-y*v+p*g,b=m*m/(c*c)+x*x/(d*d);if(b>1){const U=Math.sqrt(b);c*=U,d*=U}const M=o===r?-1:1,f=c*c*x*x+d*d*m*m,S=Math.max(0,c*c*d*d-f),W=f===0?0:M*Math.sqrt(S/f),q=W*c*x/d,z=-W*d*m/c,P=p*q-y*z+(e.x+l.x)/2,_=y*q+p*z+(e.y+l.y)/2,G=Math.atan2((x-z)/d,(m-q)/c);let L=Math.atan2((-x-z)/d,(-m-q)/c)-G;!r&&L>0&&(L-=Math.PI*2),r&&L<0&&(L+=Math.PI*2);const D=Math.max(1,Math.ceil(Math.abs(L)/(Math.PI/2))),E=L/D,T=4/3*Math.tan(E/4),C=(U,I)=>({x:P+p*c*U-y*d*I,y:_+y*c*U+p*d*I}),V=[];let w=G;for(let U=0;U<D;U+=1){const I=w+E,A=Math.cos(w),j=Math.sin(w),ie=Math.cos(I),ae=Math.sin(I);V.push({c1:C(A-T*j,j+T*A),c2:C(ie+T*ae,ae-T*ie),p:U===D-1?pn(l):C(ie,ae)}),w=I}return V}function Ri(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 g=i[0],m=i[i.length-1];Math.abs(g.p.x-m.p.x)<1e-6&&Math.abs(g.p.y-m.p.y)<1e-6&&(g.in=m.in??g.in,i.pop())}i.length>1&&n.push({nodes:i,closed:o}),i=[],o=!1},p=(g,m)=>{i.push({p:g,in:Gn(m??null,g),out:null}),r=g},y=g=>{if(!i.length)return;const m=i[i.length-1];m.out=Gn(g,m.p)};Ms.lastIndex=0;let v=Ms.exec(t);for(;v!==null;){const g=v[1],m=g.toUpperCase(),x=g!==m,b=bC(v[2]),M=f=>x?{x:r.x+b[f],y:r.y+b[f+1]}:{x:b[f],y:b[f+1]};if(m==="Z")o=!0,u(),r=pn(l),c=null,d=null;else if(m==="M"){for(let f=0;f+1<b.length;f+=2){const S=M(f);f===0&&(u(),l=pn(S)),p(S)}c=null,d=null}else if(m==="L"){for(let f=0;f+1<b.length;f+=2)p(M(f));c=null,d=null}else if(m==="H"){for(const f of b)p({x:x?r.x+f:f,y:r.y});c=null,d=null}else if(m==="V"){for(const f of b)p({x:r.x,y:x?r.y+f:f});c=null,d=null}else if(m==="C"){for(let f=0;f+5<b.length;f+=6){const S=M(f),W=M(f+2),q=M(f+4);y(S),p(q,W),c=W}d=null}else if(m==="S"){for(let f=0;f+3<b.length;f+=4){const S=c?nl(c,r):pn(r),W=M(f),q=M(f+2);y(S),p(q,W),c=W}d=null}else if(m==="Q")for(let f=0;f+3<b.length;f+=4){const S=M(f),W=M(f+2);y(Tn(r,S,2/3)),p(W,Tn(W,S,2/3)),d=S,c=null}else if(m==="T")for(let f=0;f+1<b.length;f+=2){const S=d?nl(d,r):pn(r),W=M(f);y(Tn(r,S,2/3)),p(W,Tn(W,S,2/3)),d=S,c=null}else if(m==="A")for(let f=0;f+6<b.length;f+=7){const S=x?{x:r.x+b[f+5],y:r.y+b[f+6]}:{x:b[f+5],y:b[f+6]};for(const W of wC(r,b[f],b[f+1],b[f+2],b[f+3]!==0,b[f+4]!==0,S))y(W.c1),p(W.p,W.c2);c=null,d=null}v=Ms.exec(t)}return u(),n}function Dn(e){return`${Number(e.toFixed(2))}`}function Gn(e,t){return!e||Math.abs(e.x-t.x)<1e-6&&Math.abs(e.y-t.y)<1e-6?null:e}function _p(e){return!!(Gn(e.in,e.p)||Gn(e.out,e.p))}function jo(e,t){return!Gn(e.out,e.p)&&!Gn(t.in,t.p)}function Xd(e,t){if(jo(e,t))return`L${Dn(t.p.x)},${Dn(t.p.y)}`;const n=Gn(e.out,e.p)??e.p,i=Gn(t.in,t.p)??t.p;return`C${Dn(n.x)},${Dn(n.y)} ${Dn(i.x)},${Dn(i.y)} ${Dn(t.p.x)},${Dn(t.p.y)}`}function _o(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const[i,...o]=n.nodes;t.push(`M${Dn(i.p.x)},${Dn(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 Hp(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(jo(e,t))return Tn(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 Hp(n)){if(jo(o.from,o.to)){i.push(pn(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(pn(n.nodes[n.nodes.length-1].p)),i.length>2&&t.push(i)}return t}function Ci(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 $C(e){const t=Ci(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 Wp(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 Op(e){return e.filter(t=>t.length>2).map(t=>{if(t.length<=uC)return{closed:!0,nodes:t.map(r=>({p:pn(r),in:null,out:null}))};const n=Math.max(1,Math.round(t.length/pC)),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:pn(r),...Wp(i[(l-1+o)%o],r,i[(l+1)%o])}))}})}function Dp(e,t,n=1){if(!e.length)return!1;const i=Ci(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 CC(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:dn(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 TC(e,t){if(!e.length)return e;const n=Ci(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 dn(e,u=>({x:c+(u.x-n.minX)*l,y:d+(u.y-n.minY)*l}))}function Bp(e){const t={x:0,y:0,width:Pa,height:Pa},n=e!=="custom"?Yl[e]:void 0,i=n?dn(Ri(n),r=>({x:r.x/100*t.width+t.x,y:r.y/100*t.height+t.y})):dn(Op(tl("rectangle")),r=>({x:r.x*t.width+t.x,y:r.y*t.height+t.y})),o=TC(i,t);return{shape:e,customPath:_o(o),pathFit:"viewbox",pathViewBox:Js}}function ta(e,t){return t>0?Math.round(e/t)*t:e}function LC(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=zn(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=zn(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 PC(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=zp(i,r,c)}),i}function IC(e,t,n,i,o,r){var u;if(!((u=e[t])==null?void 0:u.nodes[n]))return e;const c=zn(e),d=c[t].nodes[n];if(d[i]=pn(o),r){const p=i==="in"?"out":"in";d[p]=nl(o,d.p)}return c}function RC(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=zn(e);return r[t].nodes[n][i]=null,r}function MC(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=zn(e),d=c[t].nodes,u=n+1;if(jo(r,l))return d.splice(u,0,{p:Tn(r.p,l.p,i),in:null,out:null}),{contours:c,nodeIndex:u};const p=r.out??r.p,y=l.in??l.p,v=Tn(r.p,p,i),g=Tn(p,y,i),m=Tn(y,l.p,i),x=Tn(v,g,i),b=Tn(g,m,i),M=Tn(x,b,i),f=(n+1)%o.nodes.length;return d[n].out=v,d[f].in=m,d.splice(u,0,{p:M,in:x,out:b}),{contours:c,nodeIndex:u}}function zp(e,t,n){const i=e[t];if(!i||i.nodes.length<=3)return e;const o=zn(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=zn(e),l=r[t].nodes,c=l[n],d=l.length,u=(n-1+d)%d,p=(n+1)%d,y=!!Gn(l[u].out,l[u].p),v=!!Gn(l[p].in,l[p].p);if(_p(c)||y||v)return c.in=null,c.out=null,l[u].out=null,l[p].in=null,r;const g=Wp(l[u].p,c.p,l[p].p);return c.in=g.in,c.out=g.out,r}function EC(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 Hp(i)){const l=jo(r.from,r.to)?1:el;for(let c=0;c<l;c+=1){const d=c/l,u=(c+1)/l,p=EC(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 kC(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 Kd(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 AC(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 FC(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 NC(e,t){const n=ol(e,t);return n?{kind:"align",a:{x:e.x-n.x*ho,y:e.y-n.y*ho},b:{x:t.x+n.x*ho,y:t.y+n.y*ho}}:{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 Zd(e,t,n,i,o){if(e.axis===null)return NC(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 _C(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 HC(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 WC(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:fo};const v=Math.atan2(p,u),g=Math.round(v/zd)*zd;let m=o?g:null,x=!1;if(!o){const z=[];n&&z.push({angle:Math.atan2(n.y,n.x),smooth:!0}),z.push({angle:g,smooth:!1});for(const P of z){const _=FC(P.angle-v);if(!(Math.abs(_)>hC)&&!(Math.abs(Math.sin(_))*y>mC)){m=P.angle,x=P.smooth;break}}}const b=i!==null&&i>0&&Math.abs(y-i)<=fC;if(m===null&&!b)return{point:e,guides:fo};const M=m??v,f=b?i:y,S={x:Math.cos(M),y:Math.sin(M)},W=f+(m===null?0:ho),q=b?f:x?ho:0;return{point:l({x:c.x+S.x*f,y:c.y+S.y*f}),guides:[{kind:"angle",a:{x:c.x-S.x*q,y:c.y-S.y*q},b:{x:c.x+S.x*W,y:c.y+S.y*W}}]}}const al=.1,sl=8,OC=4,Jd=10,Ia=(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}}},jp=e=>{switch(e){case"nw":return"se";case"ne":return"sw";case"se":return"nw";case"sw":return"ne"}},ll=(e,t)=>{const n=Ia(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}},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),Vi=(e,t,n)=>{const i=cl(e,t)*n;return{width:t.width*i,height:t.height*i}},Bn=(e,t,n)=>(e-t)*n,yo=(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)<OC?.5:La(r)},DC=(e,t,n,i,o,r)=>{const l=Vi(e,n,r),c=e.x+Bn(e.width,l.width,i),d=e.y+Bn(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)),v=Vi(t,n,y);return{focalX:yo(t.width,v.width,c-t.x,{clamp:!1}),focalY:yo(t.height,v.height,d-t.y,{clamp:!1}),scale:y}},eu=1.08,na=14,ia=8;function BC({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:v}){const g=s.useRef(null),m=`pretext-image-ghost-${s.useId().replace(/:/g,"")}`,x=s.useRef(null),b=s.useRef(null),M=s.useRef({focalX:d,focalY:u,scale:p});M.current={focalX:d,focalY:u,scale:p};const f=l==="image";s.useEffect(()=>{var E;f&&((E=g.current)==null||E.focus({preventScroll:!0}))},[f]);const S=s.useCallback((E,T)=>{var V;const C=(V=g.current)==null?void 0:V.getBoundingClientRect();return!C||C.width<=0||C.height<=0?{x:0,y:0}:{x:(E-C.left)/C.width*t.width,y:(T-C.top)/C.height*t.height}},[t.width,t.height]),W=E=>{var C,V;if(!i)return;E.stopPropagation(),E.preventDefault(),(C=g.current)==null||C.focus({preventScroll:!0});const T=Vi(n,i,p);x.current={pointerId:E.pointerId,origin:S(E.clientX,E.clientY),startX:Bn(n.width,T.width,d),startY:Bn(n.height,T.height,u),width:T.width,height:T.height,moved:!1},(V=g.current)==null||V.setPointerCapture(E.pointerId)},q=(E,T)=>{var ie,ae;if(!i)return;E.stopPropagation(),E.preventDefault(),(ie=g.current)==null||ie.focus({preventScroll:!0});const C=Vi(n,i,p),V=Bn(n.width,C.width,d),w=Bn(n.height,C.height,u),U={minX:V,minY:w,maxX:V+C.width,maxY:w+C.height},I=Ia(U,jp(T)),A=Ia(U,T),j=Math.hypot(A.x-I.x,A.y-I.y);!isFinite(j)||j<=0||(b.current={pointerId:E.pointerId,anchor:I,startDistance:j,startScale:p,startX:V,startY:w,moved:!1},(ae=g.current)==null||ae.setPointerCapture(E.pointerId))},z=E=>{if(!i)return;const T=b.current;if(T&&E.pointerId===T.pointerId){E.stopPropagation(),E.preventDefault();const V=S(E.clientX,E.clientY),w={x:V.x-n.x,y:V.y-n.y},U=Math.hypot(w.x-T.anchor.x,w.y-T.anchor.y),I=Math.min(sl,Math.max(al,T.startScale*(U/T.startDistance)));if(!T.moved&&Math.abs(I-T.startScale)<1e-4)return;T.moved=!0;const A=I/T.startScale,j=T.anchor.x+(T.startX-T.anchor.x)*A,ie=T.anchor.y+(T.startY-T.anchor.y)*A,ae=Vi(n,i,I);y({focalX:yo(n.width,ae.width,j),focalY:yo(n.height,ae.height,ie),scale:I});return}const C=x.current;if(C&&E.pointerId===C.pointerId){E.stopPropagation(),E.preventDefault();const V=S(E.clientX,E.clientY),w=V.x-C.origin.x,U=V.y-C.origin.y;if(!C.moved&&w===0&&U===0)return;C.moved=!0,y({focalX:yo(n.width,C.width,C.startX+w),focalY:yo(n.height,C.height,C.startY+U),scale:p})}},P=E=>{var V,w;const T=x.current;if(T&&E.pointerId===T.pointerId){x.current=null,E.stopPropagation(),(V=g.current)!=null&&V.hasPointerCapture(T.pointerId)&&g.current.releasePointerCapture(T.pointerId),T.moved&&v(M.current);return}const C=b.current;C&&E.pointerId===C.pointerId&&(b.current=null,E.stopPropagation(),(w=g.current)!=null&&w.hasPointerCapture(C.pointerId)&&g.current.releasePointerCapture(C.pointerId),C.moved&&v(M.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 T=E.key==="="||E.key==="+",C=Math.min(sl,Math.max(al,p*(T?eu:1/eu))),V={focalX:d,focalY:u,scale:C};y(V),v(V)}},G=["nw","ne","se","sw"],$={minX:n.x,minY:n.y,maxX:n.x+n.width,maxY:n.y+n.height},L=s.useMemo(()=>{const E=i??{width:n.width,height:n.height},T=Vi(n,E,p);return!(T.width>0)||!(T.height>0)?null:{x:n.x+Bn(n.width,T.width,d),y:n.y+Bn(n.height,T.height,u),width:T.width,height:T.height}},[i,n.x,n.y,n.width,n.height,d,u,p]),D=L?{minX:L.x,minY:L.y,maxX:L.x+L.width,maxY:L.y+L.height}:$;return a.jsxs("svg",{ref:g,className:`${e}-editor${f?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:_,onPointerMove:z,onPointerUp:P,onPointerCancel:P,onLostPointerCapture:P,"data-pretext-image-editor":!0,children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>c("none")}),f&&o&&L&&r&&a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsxs("mask",{id:m,maskUnits:"userSpaceOnUse",x:L.x,y:L.y,width:L.width,height:L.height,children:[a.jsx("rect",{x:L.x,y:L.y,width:L.width,height:L.height,fill:"#FFFFFF"}),a.jsx("path",{d:r,fillRule:"evenodd",fill:"#000000"})]})}),a.jsx("image",{className:`${e}-editor-ghost`,href:o??void 0,x:L.x,y:L.y,width:L.width,height:L.height,preserveAspectRatio:"none",mask:`url(#${m})`}),a.jsx("rect",{className:`${e}-editor-image-bounds`,x:L.x,y:L.y,width:L.width,height:L.height})]}),f&&a.jsxs(a.Fragment,{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:n.x,y:n.y,width:n.width,height:n.height}),a.jsx("rect",{className:`${e}-editor-body`,x:n.x,y:n.y,width:n.width,height:n.height,onPointerDown:W}),G.map(E=>{const T=ll(D,E),C=E==="ne"||E==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:T.x-ia/2,y:T.y-ia/2,width:ia,height:ia}),a.jsx("rect",{className:`${e}-editor-scale-grab${C?` ${e}-editor-scale-grab-nesw`:""}`,x:T.x-na/2,y:T.y-na/2,width:na,height:na,onPointerDown:V=>q(V,E)})]},E)})]})]})}const dl=10,zC=dl*2,On=7,jC=4,so=9,VC=3.5,tu=1.08,GC=.05,oa=14,XC=1,ra=14,aa=8;function UC({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 v=s.useRef(null),g=s.useRef(null),m=s.useRef(i);m.current=i;const x=s.useRef(null),b=s.useRef(null),M=s.useRef(null),f=s.useRef(null),[S,W]=s.useState([]),[q,z]=s.useState(fo),[P,_]=s.useState(null),G=s.useCallback(h=>{z(Y=>AC(Y,h)?Y:h)},[]),$=c==="shape";s.useEffect(()=>{var h;$&&((h=v.current)==null||h.focus({preventScroll:!0}))},[$]),s.useEffect(()=>{$||W(h=>h.length?[]:h)},[$]);const L=S.length>0;s.useEffect(()=>{u==null||u(L)},[L,u]),s.useEffect(()=>()=>u==null?void 0:u(!1),[u]);const D=n.width>0?t.width/n.width:1,E=n.height>0?t.height/n.height:1,T=Math.min(D,E),C=r&&l?T:D,V=r&&l?T:E,w=r&&l?(t.width-n.width*T)/2:0,U=r&&l?(t.height-n.height*T)/2:0,I=s.useCallback(h=>r?{x:w+(h.x-n.x)*C,y:U+(h.y-n.y)*V}:{x:h.x-n.x,y:h.y-n.y},[r,n,C,V,w,U]),A=s.useCallback(h=>r?{x:n.x+(C>0?(h.x-w)/C:0),y:n.y+(V>0?(h.y-U)/V:0)}:{x:n.x+h.x,y:n.y+h.y},[r,n,C,V,w,U]),j=s.useMemo(()=>A({x:t.width/2,y:t.height/2}),[A,t.width,t.height]),ie=s.useCallback((h,Y)=>{var ne;const Q=(ne=v.current)==null?void 0:ne.getBoundingClientRect();if(!Q||Q.width<=0||Q.height<=0)return{x:0,y:0};if(r){const ue=(h-Q.left)/Q.width*t.width,B=(Y-Q.top)/Q.height*t.height;return{x:n.x+(C>0?(ue-w)/C:0),y:n.y+(V>0?(B-U)/V:0)}}return{x:n.x+(h-Q.left),y:n.y+(Y-Q.top)}},[r,n,t.width,t.height,C,V,w,U]),ae=s.useCallback((h,Y)=>{var ne;const Q=(ne=v.current)==null?void 0:ne.getBoundingClientRect();return!Q||Q.width<=0||Q.height<=0?{x:0,y:0}:{x:(h-Q.left)/Q.width*t.width,y:(Y-Q.top)/Q.height*t.height}},[t.width,t.height]),O=s.useCallback((h,Y)=>{const Q=l&&!(Y!=null&&Y.preserveShape)?CC(h,n,t,w,U,C,V):h;y(Q,Y)},[y,l,n,t,w,U,C,V]),re=s.useCallback(()=>{_(null)},[]),N=s.useCallback((h,Y,Q)=>{if(!Q||x.current||b.current||M.current||f.current){re();return}const ne=ae(h,Y),ue=dn(m.current,I);for(const X of ue)for(const Ie of X.nodes)if(Math.hypot(Ie.p.x-ne.x,Ie.p.y-ne.y)<=so){re();return}const B=Yd(ue,ne);if(!B||B.distance>dl){re();return}const R=ue[B.contour],ee=R==null?void 0:R.nodes[B.segment],te=R==null?void 0:R.nodes[(B.segment+1)%((R==null?void 0:R.nodes.length)??1)],ge=!!(ee&&te&&!jo(ee,te));_(X=>X&&X.curved===ge&&Math.hypot(X.point.x-B.point.x,X.point.y-B.point.y)<.25?X:{point:B.point,curved:ge})},[ae,I,re]),le=h=>{var We;const Y=h.metaKey||h.ctrlKey,Q=M.current;if(Q&&h.pointerId===Q.pointerId){if(h.stopPropagation(),h.preventDefault(),Q.startDistance<=0)return;const ot=ie(h.clientX,h.clientY),qe=Math.hypot(ot.x-Q.origin.x,ot.y-Q.origin.y),tt=Math.max(GC,qe/Q.startDistance);if(!Q.moved&&Math.abs(tt-1)<1e-4)return;Q.moved=!0,p(Gd(Q.startContours,Q.origin,tt));return}const ne=b.current;if(ne&&h.pointerId===ne.pointerId){h.stopPropagation(),h.preventDefault();const ot=ie(h.clientX,h.clientY),{bbox:qe}=ne,tt=qe.maxX-qe.minX,et=qe.maxY-qe.minY,Ge=ot.x-ne.origin.x,ve=ot.y-ne.origin.y;let _e=Ge,ze=ve;if(isFinite(tt)&&isFinite(et))if(r){let $e=n.x,Ne=n.x+n.width,Ye=n.y,Ze=n.y+n.height;l&&(C>0&&($e=n.x+(0-w)/C,Ne=n.x+(t.width-w)/C),V>0&&(Ye=n.y+(0-U)/V,Ze=n.y+(t.height-U)/V));const st=Math.min($e,Ne-tt),it=Math.max($e,Ne-tt),Oe=Math.min(Ye,Ze-et),Ae=Math.max(Ye,Ze-et),mt=Math.min(it,Math.max(st,qe.minX+Ge)),Be=Math.min(Ae,Math.max(Oe,qe.minY+ve));_e=mt-qe.minX,ze=Be-qe.minY}else{const $e=qe.minX-n.x,Ne=qe.minY-n.y,Ye=Math.min(0,t.width-tt),Ze=Math.max(0,t.width-tt),st=Math.min(0,t.height-et),it=Math.max(0,t.height-et),Oe=Math.min(Ze,Math.max(Ye,$e+Ge)),Ae=Math.min(it,Math.max(st,Ne+ve));_e=Oe-$e,ze=Ae-Ne}const Qe=[];if(!Y&&isFinite(tt)&&isFinite(et)){const $e=I({x:qe.minX+tt/2+_e,y:qe.minY+et/2+ze}),Ne={x:t.width/2,y:t.height/2};Math.abs($e.x-Ne.x)<=oa&&(_e=j.x-qe.minX-tt/2,Qe.push(rl(Ne.x,"x",t))),Math.abs($e.y-Ne.y)<=oa&&(ze=j.y-qe.minY-et/2,Qe.push(rl(Ne.y,"y",t)))}if(!ne.moved&&_e===0&&ze===0)return;ne.moved=!0,G(Qe.length?Qe:fo),p(dn(ne.startContours,$e=>({x:$e.x+_e,y:$e.y+ze})),{carryImage:!0});return}const ue=f.current;if(ue&&h.pointerId===ue.pointerId){h.stopPropagation(),h.preventDefault();const ot=ie(h.clientX,h.clientY);let qe=ot.x-ue.origin.x,tt=ot.y-ue.origin.y;if(h.shiftKey&&(Math.abs(qe)>Math.abs(tt)?tt=0:qe=0),!ue.moved&&qe===0&&tt===0)return;ue.moved=!0,p(Ud(ue.startContours,ue.selection,qe,tt));return}const B=x.current;if(!B||h.pointerId!==B.pointerId){N(h.clientX,h.clientY,S.length>0||$);return}re(),h.stopPropagation(),h.preventDefault();const R=ie(h.clientX,h.clientY);if(B.kind==="anchor"){const ot={x:B.anchor.x+(R.x-B.origin.x),y:B.anchor.y+(R.y-B.origin.y)},qe=Y?[]:kC(m.current,{contour:B.contour,node:B.node}),tt=Y||!B.center?[]:[B.center],et=Qd(Kd(qe,tt.map(_e=>_e.x),"x"),ot,"x",I,oa),Ge=Qd(Kd(qe,tt.map(_e=>_e.y),"y"),ot,"y",I,oa),ve=Y?ot:{x:(et==null?void 0:et.value)??ta(ot.x,o),y:(Ge==null?void 0:Ge.value)??ta(ot.y,o)};if(h.shiftKey&&(Math.abs(ve.x-B.anchor.x)>Math.abs(ve.y-B.anchor.y)?ve.y=B.anchor.y:ve.x=B.anchor.x),!B.moved&&ve.x===B.anchor.x&&ve.y===B.anchor.y)return;B.moved=!0,G(_C(ve,et,Ge,t,I)),p(LC(m.current,B.contour,B.node,ve));return}const ee=(We=m.current[B.contour])==null?void 0:We.nodes[B.node],te=B.mirror&&!h.altKey,ge=te||Y?null:B.kind==="in"?ee==null?void 0:ee.out:ee==null?void 0:ee.in,X=ee?I(ee.p):null,Ie=ge?I(ge):null,Se=ee&&(!Y||h.shiftKey)?WC(R,ee.p,te||Y?null:HC(m.current[B.contour],B.node,B.kind,I),X&&Ie?Math.hypot(Ie.x-X.x,Ie.y-X.y):null,h.shiftKey,I,A):{point:R,guides:fo},Z=Se.guides.length?Se.point:Y?R:{x:ta(R.x,o),y:ta(R.y,o)},He=B.kind==="in"?ee==null?void 0:ee.in:ee==null?void 0:ee.out;!B.moved&&He&&Z.x===He.x&&Z.y===He.y||(B.moved=!0,G(Se.guides),p(IC(m.current,B.contour,B.node,B.kind,Z,te)))},J=h=>{G(fo);const Y=M.current;if(Y&&h.pointerId===Y.pointerId){M.current=null,h.stopPropagation();const ge=v.current;ge!=null&&ge.hasPointerCapture(Y.pointerId)&&ge.releasePointerCapture(Y.pointerId),Y.moved&&O(m.current,{preserveShape:!0});return}const Q=b.current;if(Q&&h.pointerId===Q.pointerId){b.current=null,h.stopPropagation();const ge=v.current;ge!=null&&ge.hasPointerCapture(Q.pointerId)&&ge.releasePointerCapture(Q.pointerId),Q.moved?O(m.current,{preserveShape:!0}):W([]);return}const ne=f.current;if(ne&&h.pointerId===ne.pointerId){f.current=null,h.stopPropagation();const ge=v.current;ge!=null&&ge.hasPointerCapture(ne.pointerId)&&ge.releasePointerCapture(ne.pointerId),ne.moved&&O(m.current);return}const ue=x.current;if(!ue||h.pointerId!==ue.pointerId)return;x.current=null,h.stopPropagation();const B=v.current;B!=null&&B.hasPointerCapture(ue.pointerId)&&B.releasePointerCapture(ue.pointerId);const R=Math.hypot(h.clientX-ue.clientOrigin.x,h.clientY-ue.clientOrigin.y);if(ue.moved||R>jC){ue.moved&&O(m.current);return}if(!ue.toggleOnRelease||h.type!=="pointerup")return;const te=qd(m.current,ue.contour,ue.node);te!==m.current&&(p(te),O(te))},be=h=>{h.stopPropagation()},Pe=h=>{var Y,Q;h.stopPropagation(),h.preventDefault(),re(),(Y=v.current)==null||Y.focus({preventScroll:!0}),b.current={pointerId:h.pointerId,origin:ie(h.clientX,h.clientY),startContours:zn(i),bbox:Ci(i),moved:!1},(Q=v.current)==null||Q.setPointerCapture(h.pointerId)},ye=(h,Y)=>{var R,ee;h.stopPropagation(),h.preventDefault(),re(),(R=v.current)==null||R.focus({preventScroll:!0}),W([]),d("shape");const Q=Ci(i),ne=Ia(Q,jp(Y)),ue=ll(Q,Y),B=Math.hypot(ue.x-ne.x,ue.y-ne.y);!isFinite(B)||B<=0||(M.current={pointerId:h.pointerId,corner:Y,origin:ne,startDistance:B,startContours:zn(i),moved:!1},(ee=v.current)==null||ee.setPointerCapture(h.pointerId))},ce=(h,Y,Q,ne)=>{var R,ee,te,ge;h.stopPropagation(),h.preventDefault(),re(),(R=v.current)==null||R.focus({preventScroll:!0});const ue=(ee=i[Q])==null?void 0:ee.nodes[ne];if(!ue)return;if(h.altKey){const X=Y==="anchor"?zp(i,Q,ne):RC(i,Q,ne,Y);if(X===i)return;W(Y==="anchor"?[]:[{contour:Q,node:ne}]),p(X),O(X);return}const B=h.metaKey||h.ctrlKey;if(Y==="anchor"&&h.shiftKey&&!B){W(X=>X.some(Ie=>Ie.contour===Q&&Ie.node===ne)?X.filter(Ie=>!(Ie.contour===Q&&Ie.node===ne)):[...X,{contour:Q,node:ne}]);return}if(Y==="anchor"&&!B&&S.length>1&&S.some(X=>X.contour===Q&&X.node===ne)){f.current={pointerId:h.pointerId,origin:ie(h.clientX,h.clientY),startContours:zn(i),selection:S,moved:!1},(te=v.current)==null||te.setPointerCapture(h.pointerId);return}W([{contour:Q,node:ne}]),x.current={kind:Y,contour:Q,node:ne,pointerId:h.pointerId,origin:ie(h.clientX,h.clientY),clientOrigin:{x:h.clientX,y:h.clientY},anchor:ue.p,center:$C(i),mirror:Y!=="anchor"&&!!(ue.in&&ue.out),toggleOnRelease:B,moved:!1},(ge=v.current)==null||ge.setPointerCapture(h.pointerId)},K=h=>{h.stopPropagation(),h.preventDefault(),re();const Y=dn(i,I),Q=Yd(Y,ae(h.clientX,h.clientY));if(!Q||Q.distance>dl)return;const{contours:ne,nodeIndex:ue}=MC(i,Q.contour,Q.segment,Q.t);ue<0||(W([{contour:Q.contour,node:ue}]),p(ne),O(ne))},se=h=>{if(h.key==="="||h.key==="+"||h.key==="-"||h.key==="_"){h.preventDefault(),h.stopPropagation();const B=Ci(i);if(!isFinite(B.minX)||!isFinite(B.maxX))return;const R={x:(B.minX+B.maxX)/2,y:(B.minY+B.maxY)/2},te=h.key==="="||h.key==="+"?tu:1/tu,ge=Gd(i,R,te);p(ge),O(ge,{preserveShape:!0});return}if(h.key==="Escape"){h.stopPropagation(),W([]),d("none");return}if(!S.length)return;if(h.key==="Backspace"||h.key==="Delete"){h.preventDefault(),h.stopPropagation();const B=PC(i,S);if(B===i)return;W([]),p(B),O(B);return}const Y=o>0?o:XC,Q=h.shiftKey?Y*10:Y,ne={ArrowLeft:[-Q,0],ArrowRight:[Q,0],ArrowUp:[0,-Q],ArrowDown:[0,Q]}[h.key];if(!ne)return;h.preventDefault(),h.stopPropagation();const ue=Ud(i,S,ne[0],ne[1]);p(ue),O(ue)},pe=s.useMemo(()=>_o(dn(i,I)),[i,I]),fe=s.useMemo(()=>Ci(i),[i]),we=I({x:fe.minX,y:fe.minY}),Re={width:I({x:fe.maxX,y:fe.minY}).x-we.x,height:I({x:fe.minX,y:fe.maxY}).y-we.y},me=$&&S.length===0&&isFinite(fe.minX)&&isFinite(fe.maxX)&&fe.maxX>fe.minX&&fe.maxY>fe.minY,xe=S.length>0||$,Ce=xe;return a.jsxs("svg",{ref:v,className:`${e}-editor${xe?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:se,onPointerDown:()=>{var h;return(h=v.current)==null?void 0:h.focus({preventScroll:!0})},onPointerMove:le,onPointerLeave:re,onPointerUp:J,onPointerCancel:J,onLostPointerCapture:J,onContextMenu:h=>{h.preventDefault()},"data-pretext-path-editor":!0,"data-selection":"none",children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>{W([]),d("none")},onClick:K}),Ce&&a.jsx("path",{className:`${e}-editor-outline`,d:pe}),Ce&&q.map((h,Y)=>a.jsx("line",{className:`${e}-editor-snap ${e}-editor-snap-${h.kind}`,x1:h.a.x,y1:h.a.y,x2:h.b.x,y2:h.b.y},`${h.kind}-${Y}`)),a.jsx("path",{ref:g,className:`${e}-editor-body`,d:pe,fillRule:"evenodd",onPointerDown:Pe,onClick:K}),Ce&&a.jsx("path",{className:`${e}-editor-hit`,d:pe,style:{strokeWidth:zC},onClick:K}),Ce&&P&&a.jsx("rect",{className:`${e}-editor-add-preview`,x:P.point.x-On/2,y:P.point.y-On/2,width:On,height:On,rx:P.curved?On/2:0}),Ce&&i.map((h,Y)=>h.nodes.map((Q,ne)=>{const ue=S.some(R=>R.contour===Y&&R.node===ne),B=I(Q.p);return a.jsxs("g",{children:[ue&&S.length===1&&["in","out"].map(R=>{const ee=Q[R];if(!ee)return null;const te=I(ee);return a.jsxs("g",{children:[a.jsx("line",{className:`${e}-editor-handle-line`,x1:B.x,y1:B.y,x2:te.x,y2:te.y}),a.jsx("circle",{className:`${e}-editor-handle`,cx:te.x,cy:te.y,r:VC}),a.jsx("circle",{className:`${e}-editor-grab`,cx:te.x,cy:te.y,r:so,onPointerDown:ge=>ce(ge,R,Y,ne),onClick:be})]},R)}),a.jsx("rect",{className:`${e}-editor-anchor${ue?` ${e}-editor-anchor-selected`:""}`,x:B.x-On/2,y:B.y-On/2,width:On,height:On,rx:_p(Q)?On/2:0}),a.jsx("rect",{className:`${e}-editor-grab`,x:B.x-so,y:B.y-so,width:so*2,height:so*2,onPointerDown:R=>ce(R,"anchor",Y,ne),onClick:be,onDoubleClick:R=>{R.stopPropagation(),R.preventDefault();const ee=qd(i,Y,ne);p(ee),O(ee)}})]},`${Y}-${ne}`)})),me&&a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:we.x,y:we.y,width:Re.width,height:Re.height}),["nw","ne","se","sw"].map(h=>{const Y=I(ll(fe,h)),Q=h==="ne"||h==="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${Q?` ${e}-editor-scale-grab-nesw`:""}`,x:Y.x-ra/2,y:Y.y-ra/2,width:ra,height:ra,onPointerDown:ne=>ye(ne,h),onClick:be})]},h)})]})]})}const qC=4e3,YC=/^(?:https?:|mailto:|tel:)/i;function Vp(e){return!!e&&typeof e=="object"&&e.type==="link"}function KC(e){if(!e)return;const t=e.replace(/\s+/g,"");if(!(/^[a-z][a-z0-9+.-]*:/i.test(t)&&!YC.test(t)))return t}function QC(e){const t=[];return e.forEach((n,i)=>{const o=(r,l,c)=>{for(const d of r){if(Vp(d)){o(d.children??[],KC(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 nu(e){return{...e.fontFamily&&{fontFamily:Do(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 ZC(e){return e.map(t=>{const n=[],i=o=>{for(const r of o){if(Vp(r)){i(r.children??[]);continue}n.push((r==null?void 0:r.text)??"")}};return i((t==null?void 0:t.children)??[]),n.join("")})}function JC(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 g of l){const m=g.x*n,x=g.y*i;m<c&&(c=m),m>d&&(d=m),x<u&&(u=x),x>p&&(p=x)}const y=(c+d)/2,v=(u+p)/2;return l.map(g=>{const m=g.x*n,x=g.y*i,b=m-y,M=x-v,f=Math.sqrt(b*b+M*M);if(f<1e-6)return g;const W=Math.max(0,f+r*t)/f;return{x:(y+b*W)/n,y:(v+M*W)/i}})})}const ks=2,As=2;function eT(e,t,n,i,o){if(e.kind!=="whole")return null;const r=t[e.originalIndex],l=e.token.text;if(!r||l.length<ks+As)return null;const c=Math.min(r.length-As,l.length-As);let d=-1;for(let u=c;u>=ks;u-=1)if(r[u-1]*i+o*i<=n){d=u;break}return d<ks?null:{fragmentText:`${l.slice(0,d)}-`,remainderText:l.slice(d),fragmentWidth:r[d-1]+o,remainderWidth:Math.max(0,e.width-r[d-1])}}function iu(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,v=!!e.hyphenate,g=e.charWidths??[],m=e.hyphenWidth??0,x=e.lineHeight*l,b=e.spaceWidth*l,M=Math.max(0,e.shapeMargin??0),f=[],S=t.map((C,V)=>({token:C,originalIndex:V,width:n[V],kind:"whole"}));if(!S.length||c<=0||x<=0)return{segments:f,placed:0,height:0,capLeft:0,capTop:0,renderTokens:t};const W=Math.max(1,b*.5),q=x*nC,z=JC(i,M,c,d,o);let P=0,_=0,G=0,$=S[0].token.para,L=0,D=0,E=null;for(;P<S.length&&G<qC;){const C=_+x>d;if(C&&!u)break;const V=S[P].token.para;if(V>$+1){_+=x*(V-$-1),$=V-1,G+=1;continue}let w=C?[{x0:0,x1:c}]:dC(z,(_+q)/d,(_+x-q)/d,o).map(I=>({x0:I.x0*c,x1:I.x1*c}));p>0&&y>0&&!C&&w.length&&(E===null&&(E=G,L=w[0].x0,D=_),G-E<y&&(w=cC(w,{x0:L,x1:L+p})));const U=w.reduce((I,A)=>Math.max(I,A.x1-A.x0),0);for(const I of w){const A=I.x1-I.x0;if(A<W)continue;if(P>=S.length||S[P].token.para!==V)break;const j=P;let ie=0;for(;P<S.length&&S[P].token.para===V;){const ae=S[P],O=P===j,re=ae.width*l,N=O?re:b+re;if(ie+N<=A){ie+=N,P+=1;continue}if(O&&A>=U-.5&&re>c-.5){ie+=N,P+=1;continue}if(v){const J=A-ie-(O?0:b),be=eT(ae,g,J,l,m);if(be){const Pe={token:{...ae.token,text:be.fragmentText},originalIndex:ae.originalIndex,width:be.fragmentWidth,kind:"fragment"},ye={token:{...ae.token,text:be.remainderText},originalIndex:ae.originalIndex,width:be.remainderWidth,kind:"remainder"};S.splice(P,1,Pe,ye),ie+=(O?0:b)+be.fragmentWidth*l,P+=1}}break}if(P>j){const ae=P>=S.length||S[P].token.para!==V;f.push({top:_,left:I.x0,width:A,from:j,to:P,justify:r==="justify"&&!ae})}if(P>=S.length||S[P].token.para!==V)break}$=V,_+=x,G+=1}let T=0;if(P>0){const C=S[P-1];T=C.kind==="fragment"?C.originalIndex:C.originalIndex+1}return{segments:f,placed:T,height:f.length?_:0,capLeft:L,capTop:D,renderTokens:S.map(C=>C.token)}}const tT=.12,nT=2,iT=10,Fs=.25,oT=e=>{const t=e.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}},rT=(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=oT(e);(!r||!rT(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 sT(){return typeof document>"u"?null:document.body}function lT({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:v,hyphenate:g,showOverflowIndicator:m,dropCapLines:x,dropCapSize:b,showGuides:M,typography:f,imageUrl:S,imageFocalX:W,imageFocalY:q,imageScale:z,imageCustomPath:P,pathDragActive:_,pathCarryImage:G,onCarryImageConsumed:$,pathEditor:L,imageEditor:D}){var Ue,ct;const E=`pretext-shape-image-${s.useId().replace(/:/g,"")}`,[T,C]=s.useState(null),V=s.useRef(null),[w,U]=s.useState({width:0,height:0}),[I,A]=s.useState(0),[j,ie]=s.useState(null),[ae,O]=s.useState(0),[re,N]=s.useState("none");s.useEffect(()=>{!L&&!D&&N("none")},[L,D]);const[le,J]=s.useState(null);s.useEffect(()=>{if(!S||typeof Image>"u"){J(null);return}let he=!1;const Me=new Image;return Me.onload=()=>{he||J({width:Me.naturalWidth,height:Me.naturalHeight})},Me.src=S,()=>{he=!0}},[S]);const be=s.useMemo(()=>Array.isArray(t==null?void 0:t.text)?t.text:[],[t]),Pe=s.useMemo(()=>QC(be),[be]),ye=s.useMemo(()=>ZC(be),[be]),ce=x>0&&b>1?((ct=(Ue=Pe[0])==null?void 0:Ue.text)==null?void 0:ct.charAt(0))??"":"",K=(L==null?void 0:L.contours)??null,se=s.useMemo(()=>{let he=[];if(K){const Me=$r(K);Me.length&&(he=wo(Me,r))}if(!he.length){const Me=i.trim(),nt=Me?Bd(Me,o,r):null;nt&&nt.length?he=nt:he=tl(n==="custom"?"rectangle":n)}return n==="circle"?Ns(he,w):he},[K,n,i,o,r,w.width,w.height]),pe=L==null?void 0:L.onConvert,fe=(L==null?void 0:L.needsConversion)??!1,we=s.useMemo(()=>{if(n==="circle")return!1;const he=K??(i.trim()?Ri(i):null);return!!(he&&Dp(he,r))},[K,i,r,n]),[Re,me]=s.useState(null);nr(()=>{if(!we){Re&&me(null);return}!Re&&w.width>0&&w.height>0&&me({width:w.width,height:w.height})},[we,w.width,w.height,Re]);const xe=s.useMemo(()=>{if(!we||w.width<=0||w.height<=0)return se;const he=Re??w,Me=r.width/he.width,nt=r.height/he.height;return se.map(pt=>pt.map(Ve=>({x:Ve.x*Me,y:Ve.y*nt})))},[se,we,Re,r.width,r.height,w.width,w.height]),Ce=s.useMemo(()=>{if(K){const pt=$r(K);if(pt.length){const Ve=wo(pt,r);return n==="circle"?Ns(Ve,w):Ve}}const he=P.trim(),Me=he?Bd(he,o,r):null,nt=Me&&Me.length?Me:tl(n==="custom"?"rectangle":n);return n==="circle"?Ns(nt,w):nt},[K,n,P,o,r,w.width,w.height]),h=s.useMemo(()=>{if(!we||w.width<=0||w.height<=0)return Ce;const he=Re??w,Me=r.width/he.width,nt=r.height/he.height;return Ce.map(pt=>pt.map(Ve=>({x:Ve.x*Me,y:Ve.y*nt})))},[Ce,we,Re,r.width,r.height,w.width,w.height]),Y=s.useRef(null),Q=s.useRef(!1);s.useEffect(()=>{if(!(!pe||w.width<=0||w.height<=0)){if(we){if(Y.current===i)return;const he=K??(i.trim()?Ri(i):null);if(!(he!=null&&he.length))return;const Me=dn(he,nt=>({x:r.x+(nt.x-r.x)/w.width*r.width,y:r.y+(nt.y-r.y)/w.height*r.height}));Y.current=_o(Me),pe(Me);return}!fe||!se.length||Q.current||(Q.current=!0,pe(dn(Op(se),he=>({x:he.x*Pa,y:he.y*Pa}))))}},[fe,we,pe,se,K,i,r,w.width,w.height]);const ne=s.useCallback(()=>{const he=T;if(!he)return;const Me=he.getBoundingClientRect(),nt=parseFloat(window.getComputedStyle(he).paddingTop)||0;A(Ve=>Math.abs(Ve-nt)<.5?Ve:nt);const pt={width:Me.width,height:Me.height};U(Ve=>Math.abs(Ve.width-pt.width)<.5&&Math.abs(Ve.height-pt.height)<.5?Ve:pt)},[T]);nr(()=>{const he=T;if(!he||typeof ResizeObserver>"u")return;ne();const Me=new ResizeObserver(ne);return Me.observe(he),()=>Me.disconnect()},[T,ne]),nr(()=>{ne()},[v,ne]),s.useEffect(()=>{const he=typeof document<"u"?document.fonts:void 0;he!=null&&he.ready&&he.ready.then(()=>{O(Me=>Me+1)})},[]),nr(()=>{const he=V.current;if(!he)return;if(!Pe.length){ie(null);return}const Me=[],nt=document.createDocumentFragment();for(const ut of Pe){const H=document.createElement("span");Object.assign(H.style,nu(ut.leaf)),H.textContent=ut.text,nt.appendChild(H),Me.push(H)}const pt=document.createElement("span");pt.textContent=" ",nt.appendChild(pt);const Ve=document.createElement("span");Ve.textContent="-",nt.appendChild(Ve);const vt=ce||"H",It=document.createElement("span");It.textContent=vt,It.style.lineHeight="1",nt.appendChild(It),he.replaceChildren(nt);const At=window.getComputedStyle(he),wt=parseFloat(At.fontSize)||16,Vt=parseFloat(At.lineHeight),jt=Number.isNaN(Vt)?wt*1.2:Vt,Yt=Math.max(jt,wt),Kt=document.createElement("span");Kt.textContent=vt,Kt.style.lineHeight=`${Yt}px`;const Rt=document.createElement("span");Rt.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",Kt.appendChild(Rt),he.appendChild(Kt);const zt=Kt.getBoundingClientRect().top,on=Rt.getBoundingClientRect().top,xt=Math.max(1,on-zt);Kt.remove();let yt=xt*.8;const Je=document.createElement("canvas").getContext("2d"),rt=ut=>`${At.fontStyle} ${At.fontWeight} ${ut}px ${At.fontFamily}`;if(Je){Je.font=rt(wt);const ut=Je.measureText(vt).actualBoundingBoxAscent;ut>0&&(yt=ut)}const dt=b>1?(b-1)*Yt+yt:yt;let Pt=wt*(dt/yt);if(Je){Je.font=rt(Pt);const ut=Je.measureText(vt).actualBoundingBoxAscent;ut>0&&(Pt=Pt*(dt/ut))}It.style.fontSize=`${Pt}px`,It.style.lineHeight=`${Pt}px`;const St=document.createElement("span");St.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",It.appendChild(St);const ht=Math.max(1,St.getBoundingClientRect().top-It.getBoundingClientRect().top);St.remove();const Tt=(b-1)*Yt+xt-ht,Ot=Me.map(ut=>ut.getBoundingClientRect().width),Gt=pt.getBoundingClientRect().width,kt=Ve.getBoundingClientRect().width,_t=ce?It.getBoundingClientRect().width:0,Ft=g?Me.map(ut=>{const H=ut.firstChild;if(!(H instanceof Text)||H.data.length<4)return;const Le=document.createRange(),je=ut.getBoundingClientRect().left,Fe=[];for(let ft=1;ft<=H.data.length;ft+=1)Le.setStart(H,0),Le.setEnd(H,ft),Fe.push(Le.getBoundingClientRect().right-je);return Fe}):[];he.replaceChildren(),ie({widths:Ot,spaceWidth:Gt,dashWidth:kt,charWidths:Ft,lineHeight:Yt,capWidth:_t,dropCapFontSize:Pt,dropCapTopAdjust:Tt})},[Pe,f,ce,x,b,ae,w.width,g]);const ue=j&&ce?j.capWidth+j.lineHeight*tT:0,B=Math.max(x,Math.ceil(b)),R=s.useMemo(()=>{if(!j||!Pe.length||w.width<=0||w.height<=0||!u)return 1;const he=pt=>iu({tokens:Pe,widths:j.widths,spaceWidth:j.spaceWidth,lineHeight:j.lineHeight,width:w.width,height:w.height,rings:xe,mode:l,align:c,scale:pt,allowOverflow:!1,capInset:ue*pt,capLines:ce?B:0,hyphenate:g,charWidths:j.charWidths,hyphenWidth:j.dashWidth,shapeMargin:I});if(he(1).placed>=Pe.length)return 1;if(he(Fs).placed<Pe.length)return Fs;let Me=Fs,nt=1;for(let pt=0;pt<iT;pt+=1){const Ve=(Me+nt)/2;he(Ve).placed>=Pe.length?Me=Ve:nt=Ve}return Me},[j,Pe,w.width,w.height,xe,l,c,u,ue,ce,B,g,I]);s.useEffect(()=>{y(R)},[R,y]);const ee=u?Math.min(p,R):1,te=s.useMemo(()=>!j||!Pe.length||w.width<=0||w.height<=0?{segments:[],placed:0,height:0,capLeft:0,capTop:0,renderTokens:Pe}:iu({tokens:Pe,widths:j.widths,spaceWidth:j.spaceWidth,lineHeight:j.lineHeight,width:w.width,height:w.height,rings:xe,mode:l,align:c,scale:ee,allowOverflow:d,capInset:ue*ee,capLines:ce?B:0,hyphenate:g,charWidths:j.charWidths,hyphenWidth:j.dashWidth,shapeMargin:I}),[j,Pe,w.width,w.height,xe,l,c,ee,d,ue,ce,B,g,I]),ge=m&&Pe.length>0&&te.placed<Pe.length,X=j?j.dropCapFontSize*ee:0,Ie=j?j.dropCapTopAdjust*ee:0,Se=c==="justify"?"left":c,Z=j?j.lineHeight*ee:0,He=te.segments.length?te.segments[te.segments.length-1]:null,We=He?{top:He.top+Z,left:He.left+He.width/2}:{top:w.height,left:w.width/2},ot=!!(L&&K&&w.width>0&&w.height>0),qe=!!D,tt=(ot||qe)&&w.width>0&&w.height>0,et=aT(T,tt),Ge=tt&&et?sT():null,ve=s.useRef(!1),_e=s.useCallback(he=>{ve.current=he},[]);s.useEffect(()=>{if(!ot&&!qe)return;const he=Me=>{const nt=T;if(!nt)return;const pt=nt.getBoundingClientRect();Me.clientX>=pt.left&&Me.clientX<=pt.right&&Me.clientY>=pt.top&&Me.clientY<=pt.bottom&&(Me.preventDefault(),Me.stopPropagation(),N(vt=>vt==="shape"&&ve.current?vt:vt==="shape"&&qe?"image":ot?"shape":"image"))};return document.addEventListener("dblclick",he,!0),()=>document.removeEventListener("dblclick",he,!0)},[ot,qe,T]);const ze=s.useMemo(()=>S&&w.width>0&&w.height>0?iC(h,w):null,[S,h,w.width,w.height]),Qe=s.useRef(null),$e=(()=>{const he=Qe.current;return G||!D||!le||!ze||!he||P===he.customPath||he.shape!==n&&n!=="custom"?null:DC(he.bounds,ze,le,he.focalX,he.focalY,he.scale)})();nr(()=>{if(_||!D||!le||!ze)return;const he=Qe.current,Me=!!(he&&P!==he.customPath);Me&&$e&&D.onCommit($e),Me&&G&&($==null||$()),Qe.current={rings:h,bounds:ze,focalX:($e==null?void 0:$e.focalX)??W,focalY:($e==null?void 0:$e.focalY)??q,scale:($e==null?void 0:$e.scale)??z,customPath:P,shape:n}},[_,G,P,n,h,ze,D,le,W,q,z,$e,$]);const Ne=Qe.current,Ye=!!(_&&!G&&Ne&&!$e),Ze=Ye&&Ne?Ne.focalX:($e==null?void 0:$e.focalX)??W,st=Ye&&Ne?Ne.focalY:($e==null?void 0:$e.focalY)??q,it=Ye&&Ne?Ne.scale:($e==null?void 0:$e.scale)??z,Oe=Ye&&Ne?Ne.bounds:ze,Ae=s.useMemo(()=>{if(!(w.width>0)||!(w.height>0))return"";let he=jd(i,K,o,r,n,w);if(we){const Me=Re??w,nt=r.width/Me.width,pt=r.height/Me.height;he=dn(he,Ve=>({x:Ve.x*nt,y:Ve.y*pt}))}return Vd(he,w)||Dd(xe,w)},[i,K,o,r,n,w.width,w.height,we,Re,xe]),mt=s.useMemo(()=>{if(!S||!(w.width>0)||!(w.height>0))return"";let he=jd(P,K,o,r,n,w);if(we){const Me=Re??w,nt=r.width/Me.width,pt=r.height/Me.height;he=dn(he,Ve=>({x:Ve.x*nt,y:Ve.y*pt}))}return Vd(he,w)||Dd(h,w)},[S,P,K,o,r,n,w.width,w.height,we,Re,h]),Be=`${E}-clip`,De=s.useMemo(()=>{if(!Oe)return null;const he=le??{width:Oe.width,height:Oe.height},Me=Vi(Oe,he,it);return{x:Bn(Oe.width,Me.width,Ze),y:Bn(Oe.height,Me.height,st),width:Me.width,height:Me.height}},[Oe,le,Ze,st,it]);return a.jsxs("div",{className:`${e}-column`,style:{padding:v},ref:C,children:[Ae?a.jsxs("svg",{className:`${e}-shape-fill`,style:{top:0,left:0,width:w.width,height:w.height},viewBox:`0 0 ${w.width} ${w.height}`,preserveAspectRatio:"none","aria-hidden":!0,children:[a.jsx("path",{className:`${e}-shape-fill-path`,d:Ae,fillRule:"evenodd"}),S&&mt&&Oe&&De?a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsx("clipPath",{id:Be,clipPathUnits:"userSpaceOnUse",children:a.jsx("path",{d:mt,fillRule:"evenodd"})})}),a.jsx("image",{href:S,x:Oe.x+De.x,y:Oe.y+De.y,width:De.width,height:De.height,preserveAspectRatio:"none",clipPath:`url(#${Be})`})]}):null]}):null,a.jsxs("div",{className:`${e}-flow${d?"":` ${e}-clip`}`,style:{...f,["--"+e+"-fit"]:ee,top:0,left:0,width:w.width,height:w.height},children:[a.jsx("div",{className:`${e}-measure`,ref:V,style:f,"aria-hidden":!0}),te.segments.map((he,Me)=>{const nt=te.renderTokens.slice(he.from,he.to),pt=Me===0;return a.jsx("div",{className:`${e}-line${he.justify?` ${e}-line-justify`:""}`,"aria-hidden":!0,style:{top:`${he.top}px`,left:`${he.left}px`,width:`${he.width}px`,textAlign:he.justify?void 0:Se},children:nt.map((Ve,vt)=>{const At=ce&&pt&&he.from===0&&vt===0?Ve.text.slice(1):Ve.text,wt=nu(Ve.leaf),Vt=Ve.href?a.jsx("a",{className:`${e}-link`,href:Ve.href,target:Ve.target,rel:Ve.target?"noopener noreferrer":void 0,style:wt,children:At}):a.jsx("span",{style:wt,children:At});return a.jsxs("span",{children:[!he.justify&&vt>0?" ":null,Vt]},vt)})},`${he.from}-${he.to}-${Me}`)}),M&&!K&&a.jsx("svg",{className:`${e}-guides`,viewBox:"0 0 1 1",preserveAspectRatio:"none","aria-hidden":!0,children:xe.map((he,Me)=>a.jsx("polygon",{points:he.map(nt=>`${nt.x},${nt.y}`).join(" ")},Me))})]}),ce&&j&&a.jsx("div",{className:`${e}-drop-cap`,"aria-hidden":!0,style:{...f,top:`${te.capTop+Ie}px`,left:`${te.capLeft}px`,fontSize:`${X}px`,lineHeight:`${X}px`},children:ce}),Ge&&et&&(K&&L||D)&&Xn.createPortal(a.jsxs("div",{"data-selection":"none",style:{position:"fixed",top:et.top,left:et.left,width:et.width,height:et.height,zIndex:nT,pointerEvents:"none"},children:[K&&L&&a.jsx(UC,{P:e,box:{width:et.width,height:et.height},viewBox:r,contours:K,snap:L.snap,stretchToBox:!we,uniformStretch:n==="circle",stage:re,onStageChange:N,onSelectionChange:_e,onChange:L.onChange,onCommit:L.onCommit}),D&&Oe&&a.jsx(BC,{P:e,box:{width:et.width,height:et.height},bounds:Oe,natural:le,imageUrl:S,maskPath:mt,stage:re,onStageChange:N,focalX:Ze,focalY:st,scale:it,onChange:D.onChange,onCommit:D.onCommit})]}),Ge),a.jsx("div",{className:`${e}-a11y`,children:ye.map((he,Me)=>a.jsx("p",{children:he},Me))}),ge&&a.jsxs("svg",{className:`${e}-overflow-icon`,width:"33",height:"24",viewBox:"0 0 33 24",style:{top:We.top,left:We.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 Gp=["diamond","parallelogram","vase","circle","shield","bobbin","custom"],cT={x:0,y:0,width:100,height:100},dT=e=>{const t=(e??"").trim().split(/[\s,]+/).map(Number).filter(n=>!Number.isNaN(n));return t.length<4||t[2]<=0||t[3]<=0?cT:{x:t[0],y:t[1],width:t[2],height:t[3]}},uT=e=>`
27331
27331
  .${e}-wrapper {
27332
27332
  box-sizing: border-box;
27333
27333
  display: flex;
@@ -27556,7 +27556,7 @@ export function Burger({
27556
27556
  clip-path: inset(50%);
27557
27557
  white-space: nowrap;
27558
27558
  }
27559
- `,pT=1;function gT({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,isSelected:r,onUpdateSettings:l}){const{prefix:c}=F.useScopedStyles(),d=s.useMemo(()=>uT(c),[c]),u=n??!1,p=!!r||!!o,y=s.useMemo(()=>Array.isArray(t)?t[0]??{}:{},[t]),v=(e==null?void 0:e.shape)??"custom",g=(e==null?void 0:e.customPath)??"",m=(e==null?void 0:e.pathFit)??"stretch",x=s.useMemo(()=>dT(e==null?void 0:e.pathViewBox),[e==null?void 0:e.pathViewBox]),b=(e==null?void 0:e.shapeMode)==="B"?"avoid":"contain",R=(e==null?void 0:e.textAlign)??"left",f=((e==null?void 0:e.overflowMode)??"clip")==="visible",S=((e==null?void 0:e.fitText)??"off")==="on",W=((e==null?void 0:e.hyphenate)??"off")==="on",q=F.scalingValue((e==null?void 0:e.padding)??0,u),z=(e==null?void 0:e.dropCapSize)??pT,P=Math.max(1,Math.round((e==null?void 0:e.dropCapLines)??z)),_=u&&p&&!i,G=u&&!i,[$,L]=s.useState(!1);s.useEffect(()=>{if(!u||!p){L(!1);return}const B=()=>L(!0),I=()=>L(!1),ee=["ArticleEditor.Item:drag-start","ArticleEditor.Selection:resize-start","ArticleEditor.Selection:move-start"],te=["ArticleEditor.Item:drag-end","ArticleEditor.Selection:resize-end","ArticleEditor.Selection:move-end"];for(const ge of ee)window.addEventListener(ge,B);for(const ge of te)window.addEventListener(ge,I);return()=>{for(const ge of ee)window.removeEventListener(ge,B);for(const ge of te)window.removeEventListener(ge,I)}},[u,p]);const D=u&&p&&!i&&typeof l=="function",E=!$,T=Math.max(0,(e==null?void 0:e.pathSnap)??0),C=s.useRef(e??{}),V=s.useRef(""),w=[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(w!==V.current)V.current=w,C.current=e??{};else if(e){const{customPath:B,shape:I,pathFit:ee,pathViewBox:te,imageScale:ge,imageFocalX:X,imageFocalY:Me,image:Se,...Z}=e,He=C.current;for(const We of Object.keys(Z))if(He[We]!==Z[We]){C.current={...He,...Z};break}}const[U,M]=s.useState(null),[A,j]=s.useState(!1),[ie,ae]=s.useState(!1),O=s.useCallback(()=>ae(!1),[]),re=C.current.shape??v,N=s.useMemo(()=>!U||U.serialized===g?g:U.serialized,[U,g]);s.useEffect(()=>{D||(j(!1),ae(!1))},[D]),s.useEffect(()=>{!U||A||U.serialized===g&&M(null)},[U,g,A]);const le=s.useMemo(()=>{if(!D)return null;if(U&&(U.base===g||U.serialized===g))return U.contours;const B=Ii(g);return B.length?B:null},[D,U,g]),J=!!(m==="viewbox"&&((e==null?void 0:e.pathViewBox)??"")===Js&&le&&(v==="circle"||!Dp(le,x))),be=s.useCallback((B,I,ee)=>{const te=_o(B);if(M(ge=>({base:ge&&(ge.base===g||ge.serialized===g)?ge.base:g,serialized:te,contours:B})),I){const ge=C.current,X=ee!=null&&ee.preserveShape?ge.shape:"custom",Me={...ge,shape:X,customPath:te};C.current=Me,l==null||l(Me)}},[g,l]),Pe=s.useMemo(()=>D?{contours:J?le:null,snap:T,needsConversion:!J,onConvert:B=>{const I=_o(B);M({base:I,serialized:I,contours:B});const ee={...C.current,pathFit:"viewbox",pathViewBox:Js,customPath:I};C.current=ee,l==null||l(ee)},onChange:(B,I)=>{j(!0),ae(!!(I!=null&&I.carryImage)),be(B,!1)},onCommit:(B,I)=>{be(B,!0,I),j(!1)}}:null,[D,J,le,T,l,be]),ye=b==="avoid"&&!!(e!=null&&e.image),ce=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]),[K,se]=s.useState(null),pe=K??ce,fe=s.useCallback(B=>se(B),[]),we=s.useCallback(B=>{se(B);const I={...C.current,imageFocalX:B.focalX,imageFocalY:B.focalY,imageScale:B.scale};C.current=I,l==null||l(I)},[l]);s.useEffect(()=>{K&&Math.abs(K.focalX-ce.focalX)<1e-9&&Math.abs(K.focalY-ce.focalY)<1e-9&&Math.abs(K.scale-ce.scale)<1e-9&&se(null)},[K,ce]);const Ie=s.useMemo(()=>!D||!ye?null:{onChange:fe,onCommit:we},[D,ye,fe,we]),[me,xe]=s.useState(void 0),Ce=s.useRef(void 0),h=s.useCallback(B=>{const I=Ce.current;I!==void 0&&Math.abs(I-B)<.005||(Ce.current=B,xe(B))},[]),Y=s.useMemo(()=>S&&typeof me=="number"?me:1,[me,S]),Q=B=>`calc(${B} * var(--${c}-fit, 1))`,ne=s.useMemo(()=>{var ee,te,ge,X,Me;const B=(e==null?void 0:e.textFontSize)??.012,I=Math.max((e==null?void 0:e.textLineHeight)??B,B);return{fontFamily:Do(e==null?void 0:e.textFontFamily),fontWeight:(ee=e==null?void 0:e.textFontSettings)==null?void 0:ee.fontWeight,fontStyle:(te=e==null?void 0:e.textFontSettings)==null?void 0:te.fontStyle,fontSize:Q(F.scalingValue(B,u)),lineHeight:Q(F.scalingValue(I,u)),letterSpacing:Q(F.scalingValue((e==null?void 0:e.textLetterSpacing)??0,u)),wordSpacing:Q(F.scalingValue((e==null?void 0:e.textWordSpacing)??0,u)),textTransform:(ge=e==null?void 0:e.textTextAppearance)==null?void 0:ge.textTransform,textDecoration:(X=e==null?void 0:e.textTextAppearance)==null?void 0:X.textDecoration,fontVariant:(Me=e==null?void 0:e.textTextAppearance)==null?void 0:Me.fontVariant}},[e,u,c]),ue={[`--${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:{...ue},children:a.jsx(lT,{P:c,item:y,shape:re,customPath:g,pathFit:m,viewBox:x,mode:b,align:R,allowOverflow:f,fitEnabled:S,scale:Y,onFitScale:h,padding:q,hyphenate:W,showOverflowIndicator:G,dropCapLines:P,dropCapSize:z,showGuides:(_||D)&&E,typography:ne,imageUrl:b==="avoid"?e==null?void 0:e.image:null,imageFocalX:pe.focalX,imageFocalY:pe.focalY,imageScale:pe.scale,imageCustomPath:N,pathDragActive:A,pathCarryImage:ie,onCarryImageConsumed:O,pathEditor:E?Pe:null,imageEditor:E?Ie:null})})]})}const mT=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
27559
+ `,pT=1;function gT({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,isSelected:r,onUpdateSettings:l}){const{prefix:c}=F.useScopedStyles(),d=s.useMemo(()=>uT(c),[c]),u=n??!1,p=!!r||!!o,y=s.useMemo(()=>Array.isArray(t)?t[0]??{}:{},[t]),v=(e==null?void 0:e.shape)??"custom",g=(e==null?void 0:e.customPath)??"",m=(e==null?void 0:e.pathFit)??"stretch",x=s.useMemo(()=>dT(e==null?void 0:e.pathViewBox),[e==null?void 0:e.pathViewBox]),b=(e==null?void 0:e.shapeMode)==="B"?"avoid":"contain",M=(e==null?void 0:e.textAlign)??"left",f=((e==null?void 0:e.overflowMode)??"clip")==="visible",S=((e==null?void 0:e.fitText)??"off")==="on",W=((e==null?void 0:e.hyphenate)??"off")==="on",q=F.scalingValue((e==null?void 0:e.padding)??0,u),z=(e==null?void 0:e.dropCapSize)??pT,P=Math.max(1,Math.round((e==null?void 0:e.dropCapLines)??z)),_=u&&p&&!i,G=u&&!i,[$,L]=s.useState(!1);s.useEffect(()=>{if(!u||!p){L(!1);return}const B=()=>L(!0),R=()=>L(!1),ee=["ArticleEditor.Item:drag-start","ArticleEditor.Selection:resize-start","ArticleEditor.Selection:move-start"],te=["ArticleEditor.Item:drag-end","ArticleEditor.Selection:resize-end","ArticleEditor.Selection:move-end"];for(const ge of ee)window.addEventListener(ge,B);for(const ge of te)window.addEventListener(ge,R);return()=>{for(const ge of ee)window.removeEventListener(ge,B);for(const ge of te)window.removeEventListener(ge,R)}},[u,p]);const D=u&&p&&!i&&typeof l=="function",E=!$,T=Math.max(0,(e==null?void 0:e.pathSnap)??0),C=s.useRef(e??{}),V=s.useRef(""),w=[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(w!==V.current)V.current=w,C.current=e??{};else if(e){const{customPath:B,shape:R,pathFit:ee,pathViewBox:te,imageScale:ge,imageFocalX:X,imageFocalY:Ie,image:Se,...Z}=e,He=C.current;for(const We of Object.keys(Z))if(He[We]!==Z[We]){C.current={...He,...Z};break}}const[U,I]=s.useState(null),[A,j]=s.useState(!1),[ie,ae]=s.useState(!1),O=s.useCallback(()=>ae(!1),[]),re=C.current.shape??v,N=s.useMemo(()=>!U||U.serialized===g?g:U.serialized,[U,g]);s.useEffect(()=>{D||(j(!1),ae(!1))},[D]),s.useEffect(()=>{!U||A||U.serialized===g&&I(null)},[U,g,A]);const le=s.useMemo(()=>{if(!D)return null;if(U&&(U.base===g||U.serialized===g))return U.contours;const B=Ri(g);return B.length?B:null},[D,U,g]),J=!!(m==="viewbox"&&((e==null?void 0:e.pathViewBox)??"")===Js&&le&&(v==="circle"||!Dp(le,x))),be=s.useCallback((B,R,ee)=>{const te=_o(B);if(I(ge=>({base:ge&&(ge.base===g||ge.serialized===g)?ge.base:g,serialized:te,contours:B})),R){const ge=C.current,X=ee!=null&&ee.preserveShape?ge.shape:"custom",Ie={...ge,shape:X,customPath:te};C.current=Ie,l==null||l(Ie)}},[g,l]),Pe=s.useMemo(()=>D?{contours:J?le:null,snap:T,needsConversion:!J,onConvert:B=>{const R=_o(B);I({base:R,serialized:R,contours:B});const ee={...C.current,pathFit:"viewbox",pathViewBox:Js,customPath:R};C.current=ee,l==null||l(ee)},onChange:(B,R)=>{j(!0),ae(!!(R!=null&&R.carryImage)),be(B,!1)},onCommit:(B,R)=>{be(B,!0,R),j(!1)}}:null,[D,J,le,T,l,be]),ye=b==="avoid"&&!!(e!=null&&e.image),ce=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]),[K,se]=s.useState(null),pe=K??ce,fe=s.useCallback(B=>se(B),[]),we=s.useCallback(B=>{se(B);const R={...C.current,imageFocalX:B.focalX,imageFocalY:B.focalY,imageScale:B.scale};C.current=R,l==null||l(R)},[l]);s.useEffect(()=>{K&&Math.abs(K.focalX-ce.focalX)<1e-9&&Math.abs(K.focalY-ce.focalY)<1e-9&&Math.abs(K.scale-ce.scale)<1e-9&&se(null)},[K,ce]);const Re=s.useMemo(()=>!D||!ye?null:{onChange:fe,onCommit:we},[D,ye,fe,we]),[me,xe]=s.useState(void 0),Ce=s.useRef(void 0),h=s.useCallback(B=>{const R=Ce.current;R!==void 0&&Math.abs(R-B)<.005||(Ce.current=B,xe(B))},[]),Y=s.useMemo(()=>S&&typeof me=="number"?me:1,[me,S]),Q=B=>`calc(${B} * var(--${c}-fit, 1))`,ne=s.useMemo(()=>{var ee,te,ge,X,Ie;const B=(e==null?void 0:e.textFontSize)??.012,R=Math.max((e==null?void 0:e.textLineHeight)??B,B);return{fontFamily:Do(e==null?void 0:e.textFontFamily),fontWeight:(ee=e==null?void 0:e.textFontSettings)==null?void 0:ee.fontWeight,fontStyle:(te=e==null?void 0:e.textFontSettings)==null?void 0:te.fontStyle,fontSize:Q(F.scalingValue(B,u)),lineHeight:Q(F.scalingValue(R,u)),letterSpacing:Q(F.scalingValue((e==null?void 0:e.textLetterSpacing)??0,u)),wordSpacing:Q(F.scalingValue((e==null?void 0:e.textWordSpacing)??0,u)),textTransform:(ge=e==null?void 0:e.textTextAppearance)==null?void 0:ge.textTransform,textDecoration:(X=e==null?void 0:e.textTextAppearance)==null?void 0:X.textDecoration,fontVariant:(Ie=e==null?void 0:e.textTextAppearance)==null?void 0:Ie.fontVariant}},[e,u,c]),ue={[`--${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:{...ue},children:a.jsx(lT,{P:c,item:y,shape:re,customPath:g,pathFit:m,viewBox:x,mode:b,align:M,allowOverflow:f,fitEnabled:S,scale:Y,onFitScale:h,padding:q,hyphenate:W,showOverflowIndicator:G,dropCapLines:P,dropCapSize:z,showGuides:(_||D)&&E,typography:ne,imageUrl:b==="avoid"?e==null?void 0:e.image:null,imageFocalX:pe.focalX,imageFocalY:pe.focalY,imageScale:pe.scale,imageCustomPath:N,pathDragActive:A,pathCarryImage:ie,onCarryImageConsumed:O,pathEditor:E?Pe:null,imageEditor:E?Re:null})})]})}const mT=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
27560
27560
  import type React from 'react';
27561
27561
  import { CommonComponentProps } from '../props';
27562
27562
  import { scalingValue, useScopedStyles } from '../utils/index';
@@ -28383,4 +28383,4 @@ export function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode
28383
28383
  </>
28384
28384
  );
28385
28385
  }
28386
- `,ou=[...Gp],hT={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},fT={type:"object",version:1,settings:{sizing:"manual",properties:{shape:{type:"string",scope:"layout",display:{type:"shape-select",isFilled:!0,enum:ou},enum:ou},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 with a hyphen when they don’t fit on a line.",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"}},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:{...hT.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:{...Bp("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},t:{textFontSize:.018,textLineHeight:.024,textLetterSpacing:0,textWordSpacing:0,padding:0},d:{textFontSize:.032,textLineHeight:.0155,textLetterSpacing:-.001,textWordSpacing:0,padding:0}},layout:["__componentName__","shape","customPath","pathSnap","pathFit","shapeMode","fitText","hyphenate","padding","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"]}]},{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."}]}]}]}},yT={element:gT,id:"pretext",name:"Shaped Type",category:"typography",version:1,normalizeLayoutSettingsUpdate:(e,t)=>{const n=e.shape;return typeof n!="string"||n==="custom"||Gp.indexOf(n)===-1||(t==null?void 0:t.shape)===n?e:{...e,...Bp(n)}},defaultSize:{d:{width:1420,height:640},t:{width:710,height:320},m:{width:355,height:160}},preview:{type:"image",url:"01M3QM74XG2XSE348QCE4VTAYF"},schema:fT,sourceCode:mT,assetsPaths:{content:[],parameters:[{path:"image",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}},vT=[mh,Sh,hb,mf,$f,Af,Zf,Sy,My,Ny,av,e0,ox,gx,Yx,ab,Pb,$S,Wb,DS,vw,i$,tC,yT];exports.getAvailableStatePanels=F.getAvailableStatePanels;exports.getUnavailableStates=F.getUnavailableStates;exports.isPanelAvailable=F.isPanelAvailable;exports.components=vT;exports.isSchemaV1=rg;
28386
+ `,ou=[...Gp],hT={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},fT={type:"object",version:1,settings:{sizing:"manual",properties:{shape:{type:"string",scope:"layout",display:{type:"shape-select",isFilled:!0,enum:ou},enum:ou},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 with a hyphen when they don’t fit on a line.",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"}},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:{...hT.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:{...Bp("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},t:{textFontSize:.018,textLineHeight:.024,textLetterSpacing:0,textWordSpacing:0,padding:0},d:{textFontSize:.032,textLineHeight:.0155,textLetterSpacing:-.001,textWordSpacing:0,padding:0}},layout:["__componentName__","shape","customPath","pathSnap","pathFit","shapeMode","fitText","hyphenate","padding","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"]}]},{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."}]}]}]}},yT={element:gT,id:"pretext",name:"Shaped Type",category:"typography",version:1,normalizeLayoutSettingsUpdate:(e,t)=>{const n=e.shape;return typeof n!="string"||n==="custom"||Gp.indexOf(n)===-1||(t==null?void 0:t.shape)===n?e:{...e,...Bp(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:fT,sourceCode:mT,assetsPaths:{content:[],parameters:[{path:"image",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}},vT=[mh,Sh,hb,mf,$f,Af,Zf,Sy,Iy,Ny,av,e0,ox,gx,Yx,ab,Pb,$S,Wb,DS,vw,i$,tC,yT];exports.getAvailableStatePanels=F.getAvailableStatePanels;exports.getUnavailableStates=F.getUnavailableStates;exports.isPanelAvailable=F.isPanelAvailable;exports.components=vT;exports.isSchemaV1=rg;