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

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",Ig="ControlSlider-module__paginationOutsideTop___SCLqB",Lg="ControlSlider-module__paginationInsideLeft___yOBRZ",Pg="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:Ig,paginationInsideLeft:Lg,paginationInsideRight:Pg,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 Ir(e){return ul(e)?e:[e]}function Mn(e,t){Ir(e).forEach(t)}function gl(e,t){return e.indexOf(t)>-1}function la(e,t){return e.push.apply(e,Ir(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 Lr(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 Pr(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&&Lr(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 In(e){return e.getBoundingClientRect()}function Ui(e){Mn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function du(e){return Pr(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 Ii=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=Ii(t,n),r=ya(t,n);return i?o<e&&e<r:o<=e&&e<=r}function lo(e,t,n){var i=Ii(t,n),o=ya(t,n);return Ii(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",Iu="sk",Lu="sh",xa="ei";function nn(e){var t=e?e.event.bus:document.createDocumentFragment(),n=gu();function i(r,l){n.bind(t,Ir(r).join(" "),function(c){l.apply(l,ul(c.detail)?c.detail:[])})}function o(r){n.dispatch(t,r,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?Ii((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(Ir(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",Pu=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:[Pu,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",Pn=_n+"label",Cl=_n+"labelledby",Eu=_n+"hidden",Tl=_n+"orientation",fr=_n+"roledescription",cc=_n+"live",dc=_n+"busy",uc=_n+"atomic",Il=[ri,xo,rm,Mr,Mu,Pn,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",Ll=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:Ll,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(L){m=L.type==="keydown"},{capture:!0}),r(l,"focusin",function(){ii(l,Wu,!!m)})}function M(L){var _=Il.concat("style");li(u),oi(l,p),oi(v,y),Vn([v,g],_),Vn(l,L?_:["style",fr])}function f(){oi(l,p),oi(v,y),p=z(Ya),y=z(pc),jn(l,p),jn(v,y),Nt(l,Pn,n.label),Nt(l,Cl,n.labelledby)}function S(){v=q("."+pc),g=Pr(v,"."+am),ar(v&&g,"A track/list element is missing."),la(u,lu(g,"."+Ha+":not(."+ku+")")),Gi({arrows:Ll,pagination:Oa,prev:Au,next:Fu,bar:cm,toggle:dm},function(L,_){d[_]=q("."+L)}),gr(d,{root:l,track:v,list:g,slides:u})}function W(){var L=l.id||Jg(Rr),_=n.role;l.id=L,v.id=v.id||L+"-track",g.id=g.id||L+"-list",!Nn(l,ri)&&l.tagName!=="SECTION"&&_&&Nt(l,ri,_),Nt(l,fr,c.carousel),Nt(g,ri,"presentation")}function q(L){var _=uu(l,L);return _&&fm(_,"."+Ya)===l?_:void 0}function z(L){return[L+"--"+n.type,L+"--"+n.direction,n.drag&&L+"--draggable",n.isNavigation&&L+"--nav",L===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,Pn),S=n>-1,W=Pr(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,Pn,f||Os(g.slideLabel,[t+1,e.length]))),L()}function L(){c(i,"click",Jt(l,vl,U)),c(i,"keydown",Jt(l,Iu,U)),r([Wo,Lu,Ki],I),r(bl,G),v&&r(ci,$)}function _(){q=!0,o.destroy(),oi(i,mm),Vn(i,Il),Nt(i,"style",M),Nt(i,Pn,f||"")}function G(){var P=e.splides.map(function(A){var j=A.splide.Components.Slides.getAt(t);return j?j.slide.id:""}).join(" ");Nt(i,Pn,Os(g.slideX,(S?n:t)+1)),Nt(i,Mr,P),Nt(i,ri,x?"button":""),x&&Vn(i,fr)}function $(){q||I()}function I(){if(!q){var P=e.index;D(),E(),ii(i,_u,t===P-1),ii(i,Hu,t===P+1)}}function D(){var P=C();P!==rc(i,qi)&&(ii(i,qi,P),Nt(i,Mu,y&&P||""),l(P?mu:hu,U))}function E(){var P=V(),A=!P&&(!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),P!==rc(i,Bs)&&(ii(i,Bs,P),l(P?fu:yu,U)),!P&&document.activeElement===i){var j=d.Slides.getAt(e.index);j&&cu(j.slide)}}function T(P,A,j){Fn(j&&W||i,P,A)}function C(){var P=e.index;return P===t||p.cloneStatus&&P===n}function V(){if(e.is(Er))return C();var P=In(d.Elements.track),A=In(i),j=b("left",!0),ie=b("right",!0);return va(P[j])<=hr(A[j])&&va(A[ie])<=hr(P[ie])}function w(P,A){var j=vn(P-t);return!S&&(p.rewind||e.is(Oo))&&(j=Ii(j,e.length-j)),j<=A}var U={index:t,slideIndex:n,slide:i,container:W,isClone:S,mount:z,destroy:_,update:I,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(I,D){x(I,D,-1)})}function g(){q(function(I){I.destroy()}),li(p)}function m(){q(function(I){I.update()})}function x(I,D,E){var T=xm(e,D,E,I);T.mount(),p.push(T),p.sort(function(C,V){return C.index-V.index})}function b(I){return I?z(function(D){return!D.isClone}):p}function M(I){var D=t.Controller,E=D.toIndex(I),T=D.hasFocus()?1:n.perPage;return z(function(C){return ca(C.index,E,E+T-1)})}function f(I){return z(I)[0]}function S(I,D){Mn(I,function(E){if(Ti(E)&&(E=du(E)),su(E)){var T=d[D];T?ml(E,T):Lr(u,E),jn(E,n.classes.slide),_(E,Jt(r,Co))}}),r(sn)}function W(I){Ui(z(I).map(function(D){return D.slide})),r(sn)}function q(I,D){b(D).forEach(I)}function z(I){return p.filter(au(I)?I:function(D){return Ti(I)?ur(D.slide,I):gl(Ir(I),D.index)})}function L(I,D,E){q(function(T){T.style(I,D,E)})}function _(I,D){var E=hl(I,"img"),T=E.length;T?E.forEach(function(C){l(C,"load error",function(){--T||D()})}):D()}function G(I){return I?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:L,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 P=In(p);(U||b.width!==P.width||b.height!==P.height)&&(Fn(y,"height",z()),m(d("marginRight"),Ai(n.gap)),m("width",_()),m("height",G(),!0),b=P,l(Ma),M!==(M=w())&&(ii(p,Ou,M),l(em,M)))}function q(U){var P=n.padding,A=d(U?"right":"left");return P&&Ai(P[A]||(dr(P)?0:P))||"0px"}function z(){var U="";return x&&(U=L(),ar(U,"height or heightRatio is missing."),U="calc("+U+" - "+q(!1)+" - "+q(!0)+")"),U}function L(){return Ai(n.height||In(v).width*n.heightRatio)}function _(){return n.autoWidth?null:Ai(n.fixedWidth)||(x?"":$())}function G(){return Ai(n.fixedHeight)||(x?n.autoHeight?null:$():L())}function $(){var U=Ai(n.gap);return"calc((100%"+(U&&" + "+U)+")/"+(n.perPage||1)+(U&&" - "+U)+")"}function I(){return In(v)[d("width")]}function D(U,P){var A=g(U||0);return A?In(A.slide)[d("width")]+(P?0:C()):0}function E(U,P){var A=g(U);if(A){var j=In(A.slide)[d("right")],ie=In(v)[d("left")];return vn(j-ie)+(P?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)>I()}return{mount:f,resize:W,listSize:I,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,L=x(W.slide,q);z?ml(L,f[0].slide):Lr(r.list,L),la(d,L),l.register(L,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(In(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(),L(e.index),t.Slides.update())}function z(A,j,ie,ae){A!==j&&U(A>ie)&&(I(),_($(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 L(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(Lu)}}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 I(){_(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 In(M)[A]-In(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")]-In(f)[m("width")]}function P(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:L,translate:_,shift:$,cancel:I,toIndex:D,toPosition:E,getPosition:T,getLimit:w,exceededLimit:P,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,L;function _(){G(),o([mn,sn,xa],G),o(Ma,$)}function G(){q=v(!0),z=n.perMove,L=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 I(N,le,J){if(!re()){var be=E(N),Le=w(be);Le>-1&&(le||Le!==f)&&(ie(Le),l.move(be,Le,W,J))}}function D(N,le,J,be){t.Scroll.scroll(N,le,J,function(){var Le=w(l.toIndex(c()));ie(g?Ii(Le,S):Le),be&&be()})}function E(N){var le=f;if(Ti(N)){var J=N.match(/([+\-<>])(\d+)?/)||[],be=J[1],Le=J[2];be==="+"||be==="-"?le=C(f+ +(""+be+(+Le||1)),f):be===">"?le=Le?P(+Le):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:L),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=P(A(N)):m?N=J?N<0?-(q%L||L):q:N:n.rewind?N=N<0?S:0:N=-1:J&&N!==le&&(N=P(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:L);g&&N-- >0;)if(u(q-1,!0)!==u(N,!0)){N++;break}return lo(N,0,q-1)}function P(N){return lo(O()?N:L*N,0,S)}function A(N){return O()?Ii(N,S):va((N>=S?q-1:N)/L)}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:I,scroll:D,getNext:b,getPrev:M,getAdjacent:T,getEnd:U,setIndex:ie,getIndex:ae,toIndex:P,toPage:A,toDest:j,hasFocus:O,isBusy:re}}var Im="http://www.w3.org/2000/svg",Lm="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 Pm(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=Ll+"--"+n.direction),D&&(L(),I(),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],Il)}function L(){o([Ei,Wo,sn,Ki,xa],I),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,Lr(g,[m,x]),!y&&ml(g,v)}function $(D){var E='<button class="'+c.arrow+" "+(D?c.prev:c.next)+'" type="button"><svg xmlns="'+Im+'" viewBox="0 0 '+Hr+" "+Hr+'" width="'+Hr+'" height="'+Hr+'" focusable="false"><path d="'+(n.arrowPath||Lm)+'" />';return du(E)}function I(){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,Pn,C),Nt(x,Pn,V),l(wu,m,x,E,T)}}return{arrows:f,mount:S,destroy:z,update:I}}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,">"),L),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,Pn,n.i18n[b?"play":"pause"]))}function L(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=Pr(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(L,_,G,$,I){var D=d();if(W(),G&&(!v||!p())){var E=t.Layout.sliderSize(),T=Ws(L)*E*va(vn(L)/E)||0;L=c.toPosition(t.Controller.toDest(L%E))+T}var C=pu(D,L,1);x=1,_=C?0:_||ya(vn(L-D)/Nm,_m),m=$,g=ka(_,f,Jt(S,D,L,I),1),l(Cr),r(Ea),g.start()}function f(){l($o),m&&m(),r(Ki)}function S(L,_,G,$){var I=d(),D=L+(_-L)*z($),E=(D-I)*x;y(I+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(L){var _=n.easingFunc;return _?_(L):1-Math.pow(1-L,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,L,_=!1,G,$,I;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=Le(K);be(K.target)&&(se||!K.button)&&(y.isBusy()?ti(K,!0):(I=se?v:window,L=d.is([Ho,Cr]),q=null,l(I,Ka,C,co),l(I,Qa,V,co),u.cancel(),p.cancel(),U(K)))}}function C(K){if(d.is(sa)||(d.set(sa),r(vu)),K.cancelable)if(L){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)&&(L=A(K),ti(K))}function V(K){d.is(sa)&&(d.set($o),r(bu)),L&&(P(K),ti(K)),c(I,Ka,C),c(I,Qa,V),L=!1}function w(K){!$&&G&&ti(K,!0)}function U(K){q=W,W=K,S=M()}function P(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))>(Le(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)*Ii(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(Le(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 Le(K){return typeof TouchEvent<"u"&&K instanceof TouchEvent}function ye(){return L}function ce(K){$=K}return{mount:D,disable:ce,isDragging:ye}}var Om={Spacebar:" ",Right:Na,Left:Fa,Up:Pu,Down:Ru};function Pl(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=Pl(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,L=S.parentElement,_=Pr(L,"."+z)||vo("span",z,L);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,I=n.classes,D=n.i18n,E=n.perPage,T=p()?u.getEnd()+1:hr($/E);b=m||vo("ul",I.pagination,d.track.parentElement),jn(b,M=Oa+"--"+L()),Nt(b,ri,"tablist"),Nt(b,Pn,D.select),Nt(b,Tl,L()===_a?"vertical":"");for(var C=0;C<T;C++){var V=vo("li",null,b),w=vo("button",{class:I.page,type:"button"},V),U=c.getIn(C).map(function(A){return A.slide.id}),P=!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,Pn,Os(P,C+1)),Nt(w,xo,-1),x.push({li:V,button:w,page:C})}}function q($){v(">"+$,!0)}function z($,I){var D=x.length,E=Pl(I),T=L(),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(I,!0))}function L(){return n.paginationDirection||n.direction}function _($){return x[u.toPage($)]}function G(){var $=_(y(!0)),I=_(y());if($){var D=$.button;oi(D,qi),Vn(D,lc),Nt(D,xo,-1)}if(I){var E=I.button;jn(E,qi),Nt(E,lc,!0),Nt(E,xo,"")}r(Cu,{list:b,items:x},$,I)}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(Iu,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,Pl(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?(Lr(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:Pm,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,Pn)||"",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);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("react"),Pt=require("classnames"),k=require("./panelAvailability-D8c7cdbu.js"),Xn=require("react-dom");function rm(e){return e.type==="object"&&e.version===1}const am="ControlSlider-module__wrapper___sHEkd",sm="ControlSlider-module__hoverArrow___A-dOH",lm="ControlSlider-module__sliderItem___QQSkR",cm="ControlSlider-module__sliderImage___9hRl-",dm="ControlSlider-module__arrow___05ghY",um="ControlSlider-module__arrowVertical___tBfVN",pm="ControlSlider-module__nextArrow___-30Yc",mm="ControlSlider-module__arrowInner___aEra3",gm="ControlSlider-module__arrowIcon___S4ztF",hm="ControlSlider-module__arrowImg___2dwJW",fm="ControlSlider-module__mirror___brd6U",ym="ControlSlider-module__pagination___bicLF",vm="ControlSlider-module__paginationInner___bT-P-",xm="ControlSlider-module__paginationVertical___zYqKw",bm="ControlSlider-module__paginationItem___nTRbk",Sm="ControlSlider-module__dot___p1Qun",wm="ControlSlider-module__activeDot___LHFaj",$m="ControlSlider-module__paginationInsideBottom___R3FWn",Cm="ControlSlider-module__paginationInsideTop___V-qb-",Tm="ControlSlider-module__paginationOutsideBottom___14w8D",Im="ControlSlider-module__paginationOutsideTop___SCLqB",Lm="ControlSlider-module__paginationInsideLeft___yOBRZ",Pm="ControlSlider-module__paginationInsideRight___Rtt3o",Rm="ControlSlider-module__paginationOutsideLeft___lahaw",Mm="ControlSlider-module__paginationOutsideRight___EtuQa",Em="ControlSlider-module__imgWrapper___UjEgB",km="ControlSlider-module__captionBlock___dJ6-j",Am="ControlSlider-module__captionTextWrapper___HFlpf",Fm="ControlSlider-module__captionText___uGBVc",Nm="ControlSlider-module__active___WZK4G",_m="ControlSlider-module__withPointerEvents___t-18M",Hm="ControlSlider-module__topLeftAlignment___zjnGM",Wm="ControlSlider-module__topCenterAlignment___gD1xW",Om="ControlSlider-module__topRightAlignment___NMapS",Dm="ControlSlider-module__middleLeftAlignment___OnUrY",Bm="ControlSlider-module__middleCenterAlignment___Tdkl0",zm="ControlSlider-module__middleRightAlignment___wEbfX",jm="ControlSlider-module__bottomLeftAlignment___cTP2-",Vm="ControlSlider-module__bottomCenterAlignment___c54fB",Gm="ControlSlider-module__bottomRightAlignment___kEwrz",Xm="ControlSlider-module__clickOverlay___DZA28",Um="ControlSlider-module__contain___pLyq7",qm="ControlSlider-module__cover___KdDat",It={wrapper:am,hoverArrow:sm,sliderItem:lm,sliderImage:cm,arrow:dm,arrowVertical:um,nextArrow:pm,arrowInner:mm,arrowIcon:gm,arrowImg:hm,mirror:fm,pagination:ym,paginationInner:vm,paginationVertical:xm,paginationItem:bm,dot:Sm,activeDot:wm,paginationInsideBottom:$m,paginationInsideTop:Cm,paginationOutsideBottom:Tm,paginationOutsideTop:Im,paginationInsideLeft:Lm,paginationInsideRight:Pm,paginationOutsideLeft:Rm,paginationOutsideRight:Mm,imgWrapper:Em,captionBlock:km,captionTextWrapper:Am,captionText:Fm,active:Nm,withPointerEvents:_m,topLeftAlignment:Hm,topCenterAlignment:Wm,topRightAlignment:Om,middleLeftAlignment:Dm,middleCenterAlignment:Bm,middleRightAlignment:zm,bottomLeftAlignment:jm,bottomCenterAlignment:Vm,bottomRightAlignment:Gm,clickOverlay:Xm,contain:Um,cover:qm};function Ym(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 Km(e,t,n){return t&&Ym(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var nc="(prefers-reduced-motion: reduce)",mo=1,Qm=2,$o=3,Ho=4,Cr=5,sa=6,fa=7,Zm={CREATED:mo,MOUNTED:Qm,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 Ir(e){return ul(e)?e:[e]}function Mn(e,t){Ir(e).forEach(t)}function ml(e,t){return e.indexOf(t)>-1}function la(e,t){return e.push.apply(e,Ir(t)),e}function 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 Lr(e,t){Mn(t,e.appendChild.bind(e))}function gl(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 Pr(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 mr(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 Bt(e,t,n){dr(t)?Gi(t,function(i,o){Bt(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):Bt(i,t)),n&&Lr(n,i),i}function Fn(e,t,n){if(Tr(n))return getComputedStyle(e)[t];pl(n)||(e.style[t]=""+n)}function gr(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 In(e){return e.getBoundingClientRect()}function Ui(e){Mn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function du(e){return Pr(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 Ii=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=Ii(t,n),r=ya(t,n);return i?o<e&&e<r:o<=e&&e<=r}function lo(e,t,n){var i=Ii(t,n),o=ya(t,n);return Ii(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 Jm(e){return""+e+yl(ac[e]=(ac[e]||0)+1)}function mu(){var e=[];function t(l,c,d,u){o(l,c,function(p,v,b){var m="addEventListener"in p,h=m?p.removeEventListener.bind(p,v,d,u):p.removeListener.bind(p,d);m?p.addEventListener(v,d,u):p.addListener(d),e.push([p,v,b,d,h])})}function n(l,c,d){o(l,c,function(u,p,v){e=e.filter(function(b){return b[0]===u&&b[1]===p&&b[2]===v&&(!d||b[3]===d)?(b[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(v){var b=v.split(".");d(u,b[0],b[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",gu="active",hu="inactive",fu="visible",yu="hidden",sn="refresh",gn="updated",Co="resize",Ma="resized",vu="drag",xu="dragging",bu="dragged",Ea="scroll",Ki="scrolled",eg="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",Iu="sk",Lu="sh",xa="ei";function nn(e){var t=e?e.event.bus:document.createDocumentFragment(),n=mu();function i(r,l){n.bind(t,Ir(r).join(" "),function(c){l.apply(l,ul(c.detail)?c.detail:[])})}function o(r){n.dispatch(t,r,Mi(arguments,1))}return e&&e.event.on(xl,n.destroy),mr(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?Ii((o()-r)/e,1):1,n&&n(l),l>=1&&(t(),r=o(),i&&++u>=i))return b();c=ic(p)}}function v(P){P||h(),r=o()-(P?l*e:0),d=!1,c=ic(p)}function b(){d=!0}function m(){r=o(),l=0,n&&n(l)}function h(){c&&cancelAnimationFrame(c),l=0,c=0,d=!0}function x(P){e=P}function S(){return d}return{start:v,rewind:m,pause:b,cancel:h,set:x,isPaused:S}}function tg(e){var t=e;function n(o){t=o}function i(o){return ml(Ir(o),t)}return{set:n,is:i}}function ng(e,t){var n=ka(0,e,null,1);return function(){n.isPaused()&&n.start()}}function ig(e,t,n){var i=e.state,o=n.breakpoints||{},r=n.reducedMotion||{},l=mu(),c=[];function d(){var h=n.mediaQuery==="min";pr(o).sort(function(x,S){return h?+x-+S:+S-+x}).forEach(function(x){p(o[x],"("+(h?"min":"max")+"-width:"+x+"px)")}),p(r,nc),v()}function u(h){h&&l.destroy()}function p(h,x){var S=matchMedia(x);l.bind(S,"change",v),c.push([h,S])}function v(){var h=i.is(fa),x=n.direction,S=c.reduce(function(P,f){return Si(P,f[1].matches?f[0]:{})},{});oc(n),m(S),n.destroy?e.destroy(n.destroy==="completely"):h?(u(!0),e.mount()):x!==n.direction&&e.refresh()}function b(h){matchMedia(nc).matches&&(h?Si(n,r):oc(n,pr(r)))}function m(h,x,S){Si(n,h),x&&Si(Object.getPrototypeOf(n),h),(S||!i.is(mo))&&e.emit(gn,n)}return{setup:d,destroy:u,reduce:b,set:m}}var Aa="Arrow",Fa=Aa+"Left",Na=Aa+"Right",Pu=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:[Pu,Na],ArrowRight:[Ru,Fa]};function og(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 v=qa[u.toLowerCase()][d]||u;return p>0?v.charAt(0).toUpperCase()+v.slice(1):v})}function o(r){return r*(n.direction===sc?1:-1)}return{resolve:i,orient:o}}var ri="role",xo="tabindex",rg="disabled",_n="aria-",Mr=_n+"controls",Mu=_n+"current",lc=_n+"selected",Pn=_n+"label",Cl=_n+"labelledby",Eu=_n+"hidden",Tl=_n+"orientation",fr=_n+"roledescription",cc=_n+"live",dc=_n+"busy",uc=_n+"atomic",Il=[ri,xo,rg,Mr,Mu,Pn,Cl,Eu,Tl,fr],Un=Rr+"__",ki="is-",Ya=Rr,pc=Un+"track",ag=Un+"list",Ha=Un+"slide",ku=Ha+"--clone",sg=Ha+"__container",Ll=Un+"arrows",Wa=Un+"arrow",Au=Wa+"--prev",Fu=Wa+"--next",Oa=Un+"pagination",Nu=Oa+"__page",lg=Un+"progress",cg=lg+"__bar",dg=Un+"toggle",ug=Un+"spinner",pg=Un+"sr",mg=ki+"initialized",qi=ki+"active",_u=ki+"prev",Hu=ki+"next",Bs=ki+"visible",zs=ki+"loading",Wu=ki+"focus-in",Ou=ki+"overflow",gg=[qi,Bs,_u,Hu,zs,Wu,Ou],hg={slide:Ha,clone:ku,arrows:Ll,arrow:Wa,prev:Au,next:Fu,pagination:Oa,page:Nu,spinner:ug};function fg(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 yg=5,mc=200,Du="touchstart mousedown",Ka="touchmove mousemove",Qa="touchend touchcancel mouseup click";function vg(e,t,n){var i=nn(e),o=i.on,r=i.bind,l=e.root,c=n.i18n,d={},u=[],p=[],v=[],b,m,h;function x(){w(),N(),f()}function S(){o(sn,P),o(sn,x),o(gn,f),r(document,Du+" keydown",function(H){h=H.type==="keydown"},{capture:!0}),r(l,"focusin",function(){ii(l,Wu,!!h)})}function P(H){var _=Il.concat("style");li(u),oi(l,p),oi(b,v),Vn([b,m],_),Vn(l,H?_:["style",fr])}function f(){oi(l,p),oi(b,v),p=B(Ya),v=B(pc),jn(l,p),jn(b,v),Bt(l,Pn,n.label),Bt(l,Cl,n.labelledby)}function w(){b=V("."+pc),m=Pr(b,"."+ag),ar(b&&m,"A track/list element is missing."),la(u,lu(m,"."+Ha+":not(."+ku+")")),Gi({arrows:Ll,pagination:Oa,prev:Au,next:Fu,bar:cg,toggle:dg},function(H,_){d[_]=V("."+H)}),mr(d,{root:l,track:b,list:m,slides:u})}function N(){var H=l.id||Jm(Rr),_=n.role;l.id=H,b.id=b.id||H+"-track",m.id=m.id||H+"-list",!Nn(l,ri)&&l.tagName!=="SECTION"&&_&&Bt(l,ri,_),Bt(l,fr,c.carousel),Bt(m,ri,"presentation")}function V(H){var _=uu(l,H);return _&&fg(_,"."+Ya)===l?_:void 0}function B(H){return[H+"--"+n.type,H+"--"+n.direction,n.drag&&H+"--draggable",n.isNavigation&&H+"--nav",H===Ya&&qi]}return mr(d,{setup:x,mount:S,destroy:P})}var To="slide",Oo="loop",Er="fade";function xg(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,v=p.isNavigation,b=p.updateOnMove,m=p.i18n,h=p.pagination,x=p.slideFocus,S=d.Direction.resolve,P=Nn(i,"style"),f=Nn(i,Pn),w=n>-1,N=Pr(i,"."+sg),V;function B(){w||(i.id=u.id+"-slide"+yl(t+1),Bt(i,ri,h?"tabpanel":"group"),Bt(i,fr,m.slide),Bt(i,Pn,f||Os(m.slideLabel,[t+1,e.length]))),H()}function H(){c(i,"click",Jt(l,vl,Y)),c(i,"keydown",Jt(l,Iu,Y)),r([Wo,Lu,Ki],E),r(bl,z),b&&r(ci,$)}function _(){V=!0,o.destroy(),oi(i,gg),Vn(i,Il),Bt(i,"style",P),Bt(i,Pn,f||"")}function z(){var R=e.splides.map(function(y){var U=y.splide.Components.Slides.getAt(t);return U?U.slide.id:""}).join(" ");Bt(i,Pn,Os(m.slideX,(w?n:t)+1)),Bt(i,Mr,R),Bt(i,ri,x?"button":""),x&&Vn(i,fr)}function $(){V||E()}function E(){if(!V){var R=e.index;j(),L(),ii(i,_u,t===R-1),ii(i,Hu,t===R+1)}}function j(){var R=T();R!==rc(i,qi)&&(ii(i,qi,R),Bt(i,Mu,v&&R||""),l(R?gu:hu,Y))}function L(){var R=G(),y=!R&&(!T()||w);if(e.state.is([Ho,Cr])||Bt(i,Eu,y||""),Bt(hl(i,p.focusableNodes||""),xo,y?-1:""),x&&Bt(i,xo,y?-1:0),R!==rc(i,Bs)&&(ii(i,Bs,R),l(R?fu:yu,Y)),!R&&document.activeElement===i){var U=d.Slides.getAt(e.index);U&&cu(U.slide)}}function C(R,y,U){Fn(U&&N||i,R,y)}function T(){var R=e.index;return R===t||p.cloneStatus&&R===n}function G(){if(e.is(Er))return T();var R=In(d.Elements.track),y=In(i),U=S("left",!0),ee=S("right",!0);return va(R[U])<=hr(y[U])&&va(y[ee])<=hr(R[ee])}function A(R,y){var U=vn(R-t);return!w&&(p.rewind||e.is(Oo))&&(U=Ii(U,e.length-U)),U<=y}var Y={index:t,slideIndex:n,slide:i,container:N,isClone:w,mount:B,destroy:_,update:E,style:C,isWithin:A};return Y}function bg(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 v(){b(),o(sn,m),o(sn,b)}function b(){d.forEach(function(E,j){x(E,j,-1)})}function m(){V(function(E){E.destroy()}),li(p)}function h(){V(function(E){E.update()})}function x(E,j,L){var C=xg(e,j,L,E);C.mount(),p.push(C),p.sort(function(T,G){return T.index-G.index})}function S(E){return E?B(function(j){return!j.isClone}):p}function P(E){var j=t.Controller,L=j.toIndex(E),C=j.hasFocus()?1:n.perPage;return B(function(T){return ca(T.index,L,L+C-1)})}function f(E){return B(E)[0]}function w(E,j){Mn(E,function(L){if(Ti(L)&&(L=du(L)),su(L)){var C=d[j];C?gl(L,C):Lr(u,L),jn(L,n.classes.slide),_(L,Jt(r,Co))}}),r(sn)}function N(E){Ui(B(E).map(function(j){return j.slide})),r(sn)}function V(E,j){S(j).forEach(E)}function B(E){return p.filter(au(E)?E:function(j){return Ti(E)?ur(j.slide,E):ml(Ir(E),j.index)})}function H(E,j,L){V(function(C){C.style(E,j,L)})}function _(E,j){var L=hl(E,"img"),C=L.length;C?L.forEach(function(T){l(T,"load error",function(){--C||j()})}):j()}function z(E){return E?d.length:p.length}function $(){return p.length>n.perPage}return{mount:v,destroy:m,update:h,register:x,get:S,getIn:P,getAt:f,add:w,remove:N,forEach:V,filter:B,style:H,getLength:z,isEnough:$}}function Sg(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,v=u.track,b=u.list,m=c.getAt,h=c.style,x,S,P;function f(){w(),r(window,"resize load",ng(Jt(l,Co))),o([gn,sn],w),o(Co,N)}function w(){x=n.direction===_a,Fn(p,"maxWidth",Ai(n.width)),Fn(v,d("paddingLeft"),V(!1)),Fn(v,d("paddingRight"),V(!0)),N(!0)}function N(Y){var R=In(p);(Y||S.width!==R.width||S.height!==R.height)&&(Fn(v,"height",B()),h(d("marginRight"),Ai(n.gap)),h("width",_()),h("height",z(),!0),S=R,l(Ma),P!==(P=A())&&(ii(p,Ou,P),l(eg,P)))}function V(Y){var R=n.padding,y=d(Y?"right":"left");return R&&Ai(R[y]||(dr(R)?0:R))||"0px"}function B(){var Y="";return x&&(Y=H(),ar(Y,"height or heightRatio is missing."),Y="calc("+Y+" - "+V(!1)+" - "+V(!0)+")"),Y}function H(){return Ai(n.height||In(b).width*n.heightRatio)}function _(){return n.autoWidth?null:Ai(n.fixedWidth)||(x?"":$())}function z(){return Ai(n.fixedHeight)||(x?n.autoHeight?null:$():H())}function $(){var Y=Ai(n.gap);return"calc((100%"+(Y&&" + "+Y)+")/"+(n.perPage||1)+(Y&&" - "+Y)+")"}function E(){return In(b)[d("width")]}function j(Y,R){var y=m(Y||0);return y?In(y.slide)[d("width")]+(R?0:T()):0}function L(Y,R){var y=m(Y);if(y){var U=In(y.slide)[d("right")],ee=In(b)[d("left")];return vn(U-ee)+(R?0:T())}return 0}function C(Y){return L(e.length-1)-L(0)+j(0,Y)}function T(){var Y=m(0);return Y&&parseFloat(Fn(Y.slide,d("marginRight")))||0}function G(Y){return parseFloat(Fn(v,d("padding"+(Y?"Right":"Left"))))||0}function A(){return e.is(Er)||C(!0)>E()}return{mount:f,resize:N,listSize:E,slideSize:j,sliderSize:C,totalSize:L,getPadding:G,isOverflow:A}}var wg=2;function $g(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,v),o([gn,Co],m),(u=S())&&(h(u),t.Layout.resize(!0))}function v(){b(),p()}function b(){Ui(d),li(d),i.destroy()}function m(){var P=S();u!==P&&(u<P||!P)&&i.emit(sn)}function h(P){var f=l.get().slice(),w=f.length;if(w){for(;f.length<P;)la(f,f);la(f.slice(-P),f.slice(0,P)).forEach(function(N,V){var B=V<P,H=x(N.slide,V);B?gl(H,f[0].slide):Lr(r.list,H),la(d,H),l.register(H,V-P+(B?0:w),N.index)})}}function x(P,f){var w=P.cloneNode(!0);return jn(w,n.classes.clone),w.id=e.root.id+"-clone"+yl(f+1),w}function S(){var P=n.clones;if(!e.is(Oo))P=0;else if(Tr(P)){var f=n[c("fixedWidth")]&&t.Layout.slideSize(0),w=f&&hr(In(r.track)[c("width")]/f);P=w||n[c("autoWidth")]&&e.length||n.perPage*wg}return P}return{mount:p,destroy:b}}function Cg(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,v=c.listSize,b=c.sliderSize,m=t.Direction,h=m.resolve,x=m.orient,S=t.Elements,P=S.list,f=S.track,w;function N(){w=t.Transition,o([Ei,Ma,gn,sn],V)}function V(){t.Controller.isBusy()||(t.Scroll.cancel(),H(e.index),t.Slides.update())}function B(y,U,ee,de){y!==U&&Y(y>ee)&&(E(),_($(C(),y>ee),!0)),l(Ho),r(ci,U,ee,y),w.start(U,function(){l($o),r(Wo,U,ee,y),de&&de()})}function H(y){_(L(y,!0))}function _(y,U){if(!e.is(Er)){var ee=U?y:z(y);Fn(P,"transform","translate"+h("X")+"("+ee+"px)"),y!==ee&&r(Lu)}}function z(y){if(e.is(Oo)){var U=j(y),ee=U>t.Controller.getEnd(),de=U<0;(de||ee)&&(y=$(y,ee))}return y}function $(y,U){var ee=y-A(U),de=b();return y-=x(de*(hr(vn(ee)/de)||1))*(U?1:-1),y}function E(){_(C(),!0),w.cancel()}function j(y){for(var U=t.Slides.get(),ee=0,de=1/0,F=0;F<U.length;F++){var ie=U[F].index,I=vn(L(ie,!0)-y);if(I<=de)de=I,ee=ie;else break}return ee}function L(y,U){var ee=x(p(y-1)-G(y));return U?T(ee):ee}function C(){var y=h("left");return In(P)[y]-In(f)[y]+x(u(!1))}function T(y){return n.trimSpace&&e.is(To)&&(y=lo(y,0,x(b(!0)-v()))),y}function G(y){var U=n.focus;return U==="center"?(v()-d(y,!0))/2:+U*d(y)||0}function A(y){return L(y?t.Controller.getEnd():0,!!n.trimSpace)}function Y(y){var U=x($(C(),y));return y?U>=0:U<=P[h("scrollWidth")]-In(f)[h("width")]}function R(y,U){U=Tr(U)?C():U;var ee=y!==!0&&x(U)<x(A(!1)),de=y!==!1&&x(U)>x(A(!0));return ee||de}return{mount:N,move:B,jump:H,translate:_,shift:$,cancel:E,toIndex:j,toPosition:L,getPosition:C,getLimit:A,exceededLimit:R,reposition:V}}function Tg(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,v=p.isEnough,b=p.getLength,m=n.omitEnd,h=e.is(Oo),x=e.is(To),S=Jt(C,!1),P=Jt(C,!0),f=n.start||0,w,N=f,V,B,H;function _(){z(),o([gn,sn,xa],z),o(Ma,$)}function z(){V=b(!0),B=n.perMove,H=n.perPage,w=Y();var I=lo(f,0,m?w:V-1);I!==f&&(f=I,l.reposition())}function $(){w!==Y()&&r(xa)}function E(I,se,J){if(!ie()){var Se=L(I),Re=A(Se);Re>-1&&(se||Re!==f)&&(ee(Re),l.move(Se,Re,N,J))}}function j(I,se,J,Se){t.Scroll.scroll(I,se,J,function(){var Re=A(l.toIndex(c()));ee(m?Ii(Re,w):Re),Se&&Se()})}function L(I){var se=f;if(Ti(I)){var J=I.match(/([+\-<>])(\d+)?/)||[],Se=J[1],Re=J[2];Se==="+"||Se==="-"?se=T(f+ +(""+Se+(+Re||1)),f):Se===">"?se=Re?R(+Re):S(!0):Se==="<"&&(se=P(!0))}else se=h?I:lo(I,0,w);return se}function C(I,se){var J=B||(F()?1:H),Se=T(f+J*(I?-1:1),f,!(B||F()));return Se===-1&&x&&!pu(c(),d(!I),1)?I?0:w:se?Se:A(Se)}function T(I,se,J){if(v()||F()){var Se=G(I);Se!==I&&(se=I,I=Se,J=!1),I<0||I>w?!B&&(ca(0,I,se,!0)||ca(w,se,I,!0))?I=R(y(I)):h?I=J?I<0?-(V%H||H):V:I:n.rewind?I=I<0?w:0:I=-1:J&&I!==se&&(I=R(y(se)+(I<se?-1:1)))}else I=-1;return I}function G(I){if(x&&n.trimSpace==="move"&&I!==f)for(var se=c();se===u(I,!0)&&ca(I,0,e.length-1,!n.rewind);)I<f?--I:++I;return I}function A(I){return h?(I+V)%V||0:I}function Y(){for(var I=V-(F()||h&&B?1:H);m&&I-- >0;)if(u(V-1,!0)!==u(I,!0)){I++;break}return lo(I,0,V-1)}function R(I){return lo(F()?I:H*I,0,w)}function y(I){return F()?Ii(I,w):va((I>=w?V-1:I)/H)}function U(I){var se=l.toIndex(I);return x?lo(se,0,w):se}function ee(I){I!==f&&(N=f,f=I)}function de(I){return I?N:f}function F(){return!Tr(n.focus)||n.isNavigation}function ie(){return e.state.is([Ho,Cr])&&!!n.waitForTransition}return{mount:_,go:E,scroll:j,getNext:S,getPrev:P,getAdjacent:C,getEnd:Y,setIndex:ee,getIndex:de,toIndex:R,toPage:y,toDest:U,hasFocus:F,isBusy:ie}}var Ig="http://www.w3.org/2000/svg",Lg="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 Pg(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,v=u.arrows,b=u.track,m=v,h=u.prev,x=u.next,S,P,f={};function w(){V(),o(gn,N)}function N(){B(),w()}function V(){var j=n.arrows;j&&!(h&&x)&&z(),h&&x&&(mr(f,{prev:h,next:x}),gr(m,j?"":"none"),jn(m,P=Ll+"--"+n.direction),j&&(H(),E(),Bt([h,x],Mr,b.id),l(Su,h,x)))}function B(){i.destroy(),oi(m,P),S?(Ui(v?[h,x]:m),h=x=null):Vn([h,x],Il)}function H(){o([Ei,Wo,sn,Ki,xa],E),r(x,"click",Jt(_,">")),r(h,"click",Jt(_,"<"))}function _(j){p.go(j,!0)}function z(){m=v||vo("div",c.arrows),h=$(!0),x=$(!1),S=!0,Lr(m,[h,x]),!v&&gl(m,b)}function $(j){var L='<button class="'+c.arrow+" "+(j?c.prev:c.next)+'" type="button"><svg xmlns="'+Ig+'" viewBox="0 0 '+Hr+" "+Hr+'" width="'+Hr+'" height="'+Hr+'" focusable="false"><path d="'+(n.arrowPath||Lg)+'" />';return du(L)}function E(){if(h&&x){var j=e.index,L=p.getPrev(),C=p.getNext(),T=L>-1&&j<L?d.last:d.prev,G=C>-1&&j>C?d.first:d.next;h.disabled=L<0,x.disabled=C<0,Bt(h,Pn,T),Bt(x,Pn,G),l(wu,h,x,L,C)}}return{arrows:f,mount:w,destroy:B,update:E}}var Rg=fl+"-interval";function Mg(e,t,n){var i=nn(e),o=i.on,r=i.bind,l=i.emit,c=ka(n.interval,e.go.bind(e,">"),H),d=c.isPaused,u=t.Elements,p=t.Elements,v=p.root,b=p.toggle,m=n.autoplay,h,x,S=m==="pause";function P(){m&&(f(),b&&Bt(b,Mr,u.track.id),S||w(),B())}function f(){n.pauseOnHover&&r(v,"mouseenter mouseleave",function(z){h=z.type==="mouseenter",V()}),n.pauseOnFocus&&r(v,"focusin focusout",function(z){x=z.type==="focusin",V()}),b&&r(b,"click",function(){S?w():N(!0)}),o([ci,Ea,sn],c.rewind),o(ci,_)}function w(){d()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),x=h=S=!1,B(),l(Sl))}function N(z){z===void 0&&(z=!0),S=!!z,B(),d()||(c.pause(),l(wl))}function V(){S||(h||x?N(!1):w())}function B(){b&&(ii(b,qi,!S),Bt(b,Pn,n.i18n[S?"play":"pause"]))}function H(z){var $=u.bar;$&&Fn($,"width",z*100+"%"),l(Tu,z)}function _(z){var $=t.Slides.getAt(z);c.set($&&+Nn($.slide,Rg)||n.interval)}return{mount:P,destroy:c.cancel,play:w,pause:N,isPaused:d}}function Eg(e,t,n){var i=nn(e),o=i.on;function r(){n.cover&&(o($l,Jt(c,!0)),o([Ei,gn,sn],Jt(l,!0)))}function l(d){t.Slides.forEach(function(u){var p=Pr(u.container||u.slide,"img");p&&p.src&&c(d,p,u)})}function c(d,u,p){p.style("background",d?'center/cover no-repeat url("'+u.src+'")':"",!0),gr(u,d?"none":"")}return{mount:r,destroy:Jt(l,!1)}}var kg=10,Ag=600,Fg=.6,Ng=1.5,_g=800;function Hg(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,v=c.translate,b=e.is(To),m,h,x=1;function S(){o(ci,N),o([gn,sn],V)}function P(H,_,z,$,E){var j=d();if(N(),z&&(!b||!p())){var L=t.Layout.sliderSize(),C=Ws(H)*L*va(vn(H)/L)||0;H=c.toPosition(t.Controller.toDest(H%L))+C}var T=pu(j,H,1);x=1,_=T?0:_||ya(vn(H-j)/Ng,_g),h=$,m=ka(_,f,Jt(w,j,H,E),1),l(Cr),r(Ea),m.start()}function f(){l($o),h&&h(),r(Ki)}function w(H,_,z,$){var E=d(),j=H+(_-H)*B($),L=(j-E)*x;v(E+L),b&&!z&&p()&&(x*=Fg,vn(L)<kg&&P(u(p(!0)),Ag,!1,h,!0))}function N(){m&&m.cancel()}function V(){m&&!m.isPaused()&&(N(),f())}function B(H){var _=n.easingFunc;return _?_(H):1-Math.pow(1-H,4)}return{mount:S,destroy:N,scroll:P,cancel:V}}var co={passive:!1,capture:!0};function Wg(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,v=t.Controller,b=t.Elements.track,m=t.Media.reduce,h=t.Direction,x=h.resolve,S=h.orient,P=u.getPosition,f=u.exceededLimit,w,N,V,B,H,_=!1,z,$,E;function j(){l(b,Ka,_s,co),l(b,Qa,_s,co),l(b,Du,C,co),l(b,"click",A,{capture:!0}),l(b,"dragstart",ti),o([Ei,gn],L)}function L(){var te=n.drag;he(!te),B=te==="free"}function C(te){if(z=!1,!$){var le=Re(te);Se(te.target)&&(le||!te.button)&&(v.isBusy()?ti(te,!0):(E=le?b:window,H=d.is([Ho,Cr]),V=null,l(E,Ka,T,co),l(E,Qa,G,co),u.cancel(),p.cancel(),Y(te)))}}function T(te){if(d.is(sa)||(d.set(sa),r(vu)),te.cancelable)if(H){u.translate(w+J(F(te)));var le=ie(te)>mc,re=_!==(_=f());(le||re)&&Y(te),z=!0,r(xu),ti(te)}else U(te)&&(H=y(te),ti(te))}function G(te){d.is(sa)&&(d.set($o),r(bu)),H&&(R(te),ti(te)),c(E,Ka,T),c(E,Qa,G),H=!1}function A(te){!$&&z&&ti(te,!0)}function Y(te){V=N,N=te,w=P()}function R(te){var le=ee(te),re=de(le),fe=n.rewind&&n.rewindByDrag;m(!1),B?v.scroll(re,0,n.snap):e.is(Er)?v.go(S(Ws(le))<0?fe?"<":"-":fe?">":"+"):e.is(To)&&_&&fe?v.go(f(!0)?">":"<"):v.go(v.toDest(re),!0),m(!0)}function y(te){var le=n.dragMinThreshold,re=dr(le),fe=re&&le.mouse||0,xe=(re?le.touch:+le)||10;return vn(F(te))>(Re(te)?xe:fe)}function U(te){return vn(F(te))>vn(F(te,!0))}function ee(te){if(e.is(Oo)||!_){var le=ie(te);if(le&&le<mc)return F(te)/le}return 0}function de(te){return P()+Ws(te)*Ii(vn(te)*(n.flickPower||600),B?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function F(te,le){return se(te,le)-se(I(te),le)}function ie(te){return Hs(te)-Hs(I(te))}function I(te){return N===te&&V||N}function se(te,le){return(Re(te)?te.changedTouches[0]:te)["page"+x(le?"Y":"X")]}function J(te){return te/(_&&e.is(To)?yg:1)}function Se(te){var le=n.noDrag;return!ur(te,"."+Nu+", ."+Wa)&&(!le||!ur(te,le))}function Re(te){return typeof TouchEvent<"u"&&te instanceof TouchEvent}function pe(){return H}function he(te){$=te}return{mount:j,disable:he,isDragging:pe}}var Og={Spacebar:" ",Right:Na,Left:Fa,Up:Pu,Down:Ru};function Pl(e){return e=Ti(e)?e:e.key,Og[e]||e}var gc="keydown";function Dg(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 v(){b(),o(gn,m),o(gn,b),o(ci,x)}function b(){var P=n.keyboard;P&&(u=P==="global"?window:c,r(u,gc,S))}function m(){l(u,gc)}function h(P){p=P}function x(){var P=p;p=!0,ru(function(){p=P})}function S(P){if(!p){var f=Pl(P);f===d(Fa)?e.go("<"):f===d(Na)&&e.go(">")}}return{mount:v,destroy:m,disable:h}}var sr=fl+"-lazy",da=sr+"-srcset",Bg="["+sr+"], ["+da+"]";function zg(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 v(){n.lazyLoad&&(b(),o(sn,b))}function b(){li(p),m(),d?P():(r(u),o(u,h),h())}function m(){t.Slides.forEach(function(f){hl(f.slide,Bg).forEach(function(w){var N=Nn(w,sr),V=Nn(w,da);if(N!==w.src||V!==w.srcset){var B=n.classes.spinner,H=w.parentElement,_=Pr(H,"."+B)||vo("span",B,H);p.push([w,f,_]),w.src||gr(w,"none")}})})}function h(){p=p.filter(function(f){var w=n.perPage*((n.preloadPages||1)+1)-1;return f[1].isWithin(e.index,w)?x(f):!0}),p.length||r(u)}function x(f){var w=f[0];jn(f[1].slide,zs),l(w,"load error",Jt(S,f)),Bt(w,"src",Nn(w,sr)),Bt(w,"srcset",Nn(w,da)),Vn(w,sr),Vn(w,da)}function S(f,w){var N=f[0],V=f[1];oi(V.slide,zs),w.type!=="error"&&(Ui(f[2]),gr(N,""),c($l,N,V),c(Co)),d&&P()}function P(){p.length&&x(p.shift())}return{mount:v,destroy:Jt(li,p),check:h}}function jg(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,v=u.getIndex,b=u.go,m=t.Direction.resolve,h=d.pagination,x=[],S,P;function f(){w(),o([gn,sn,xa],f);var $=n.pagination;h&&gr(h,$?"":"none"),$&&(o([ci,Ea,Ki],z),N(),z(),r($u,{list:S,items:x},_(e.index)))}function w(){S&&(Ui(h?Mi(S.children):S),oi(S,P),li(x),S=null),i.destroy()}function N(){var $=e.length,E=n.classes,j=n.i18n,L=n.perPage,C=p()?u.getEnd()+1:hr($/L);S=h||vo("ul",E.pagination,d.track.parentElement),jn(S,P=Oa+"--"+H()),Bt(S,ri,"tablist"),Bt(S,Pn,j.select),Bt(S,Tl,H()===_a?"vertical":"");for(var T=0;T<C;T++){var G=vo("li",null,S),A=vo("button",{class:E.page,type:"button"},G),Y=c.getIn(T).map(function(y){return y.slide.id}),R=!p()&&L>1?j.pageX:j.slideX;l(A,"click",Jt(V,T)),n.paginationKeyboard&&l(A,"keydown",Jt(B,T)),Bt(G,ri,"presentation"),Bt(A,ri,"tab"),Bt(A,Mr,Y.join(" ")),Bt(A,Pn,Os(R,T+1)),Bt(A,xo,-1),x.push({li:G,button:A,page:T})}}function V($){b(">"+$,!0)}function B($,E){var j=x.length,L=Pl(E),C=H(),T=-1;L===m(Na,!1,C)?T=++$%j:L===m(Fa,!1,C)?T=(--$+j)%j:L==="Home"?T=0:L==="End"&&(T=j-1);var G=x[T];G&&(cu(G.button),b(">"+T),ti(E,!0))}function H(){return n.paginationDirection||n.direction}function _($){return x[u.toPage($)]}function z(){var $=_(v(!0)),E=_(v());if($){var j=$.button;oi(j,qi),Vn(j,lc),Bt(j,xo,-1)}if(E){var L=E.button;jn(L,qi),Bt(L,lc,!0),Bt(L,xo,"")}r(Cu,{list:S,items:x},$,E)}return{items:x,mount:f,destroy:w,getAt:_,update:z}}var Vg=[" ","Enter"];function Gg(e,t,n){var i=n.isNavigation,o=n.slideFocus,r=[];function l(){e.splides.forEach(function(h){h.isParent||(u(e,h.splide),u(h.splide,e))}),i&&p()}function c(){r.forEach(function(h){h.destroy()}),li(r)}function d(){c(),l()}function u(h,x){var S=nn(h);S.on(ci,function(P,f,w){x.go(x.is(Oo)?w:P)}),r.push(S)}function p(){var h=nn(e),x=h.on;x(vl,b),x(Iu,m),x([Ei,gn],v),r.push(h),h.emit(bl,e.splides)}function v(){Bt(t.Elements.list,Tl,n.direction===_a?"vertical":"")}function b(h){e.go(h.index)}function m(h,x){ml(Vg,Pl(x))&&(b(h),ti(x))}return{setup:Jt(t.Media.set,{slideFocus:Tr(o)?i:o},!0),mount:l,destroy:c,remount:d}}function Xg(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,v=p<0,b=Hs(u),m=n.wheelMinThreshold||0,h=n.wheelSleep||0;vn(p)>m&&b-r>h&&(e.go(v?"<":">"),r=b),d(v)&&ti(u)}}function d(u){return!n.releaseWheel||e.state.is(Ho)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var Ug=90;function qg(e,t,n){var i=nn(e),o=i.on,r=t.Elements.track,l=n.live&&!n.isNavigation,c=vo("span",pg),d=ka(Ug,Jt(p,!1));function u(){l&&(b(!t.Autoplay.isPaused()),Bt(r,uc,!0),c.textContent="…",o(Sl,Jt(b,!0)),o(wl,Jt(b,!1)),o([Wo,Ki],Jt(p,!0)))}function p(m){Bt(r,dc,m),m?(Lr(r,c),d.start()):(Ui(c),d.cancel())}function v(){Vn(r,[cc,uc,dc]),Ui(c)}function b(m){l&&Bt(r,cc,m?"off":"polite")}return{mount:u,disable:b,destroy:v}}var Yg=Object.freeze({__proto__:null,Media:ig,Direction:og,Elements:vg,Slides:bg,Layout:Sg,Clones:$g,Move:Cg,Controller:Tg,Arrows:Pg,Autoplay:Mg,Cover:Eg,Scroll:Hg,Drag:Wg,Keyboard:Dg,LazyLoad:zg,Pagination:jg,Sync:Gg,Wheel:Xg,Live:qg}),Kg={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"},Qg={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:hg,i18n:Kg,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Zg(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 Jg(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(m){m.target===l&&d&&(v(),d())})}function p(m,h){var x=i.toPosition(m,!0),S=i.getPosition(),P=b(m);vn(x-S)>=1&&P>=1?n.useScroll?r.scroll(x,P,!1,h):(c("transform "+P+"ms "+n.easing),i.translate(x,!0),d=h):(i.jump(m),h())}function v(){c(""),r.cancel()}function b(m){var h=n.rewindSpeed;if(e.is(To)&&h){var x=o.getIndex(!0),S=o.getEnd();if(x===0&&m>=S||x>=S&&m===0)return h}return n.speed}return{mount:u,start:p,cancel:v}}var eh=(function(){function e(n,i){this.event=nn(),this.Components={},this.state=tg(mo),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,Pn)||"",labelledby:Nn(o,Cl)||""},Qg,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([mo,fa]),"Already mounted!"),l.set(mo),this._C=c,this._T=o||this._T||(this.is(Er)?Zg:Jg),this._E=i||this._E;var d=mr({},Yg,this._E,{Transition:this._T});return Gi(d,function(u,p){var v=u(r,c,r._o);c[p]=v,v.setup&&v.setup()}),Gi(c,function(u){u.mount&&u.mount()}),this.emit(Ei),jn(this.root,mg),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(mo)?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},Km(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=Zm;var hc=[[Ei,"onMounted"],[Ds,"onReady"],[ci,"onMove"],[Wo,"onMoved"],[vl,"onClick"],[gu,"onActive"],[hu,"onInactive"],[fu,"onVisible"],[yu,"onHidden"],[sn,"onRefresh"],[gn,"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,M]=s.useState(null),[f,S]=s.useState(0),[W,q]=s.useState(0),{direction:z,transition:L,controls:_,pagination:G,imageCaption:$,triggers:I}=e,D=s.useRef(L.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===L.type||(q(V=>V+1),D.current=L.type)},[L.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:L.backgroundColor&&L.type==="fade in"?L.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:L.duration?`${Math.round(parseInt(L.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:L.duration?parseInt(L.duration):500,autoplay:I.autoPlay!==null,...I.autoPlay!==null&&{interval:parseInt(I.autoPlay)*1e3},direction:z==="horiz"||L.type==="fade in"?"ltr":"ttb",pagination:!1,drag:I.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:L.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.assetId,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)})]})})]}),I.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.assetId",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"inside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",assetId:"01M3QM74XES6E7GVC0H3KJ2RH6",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEAZ8H1DTC5V1S554K",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEDRP49HNTEPNZYQTP",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},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.assetId;const r=i.width?Number.parseFloat(i.width):o.naturalWidth,l=o.naturalHeight/o.naturalWidth*r,c=r/2,d=l/2;if(e>=i.x-c&&e<=i.x+c&&t>=i.y-d&&t<=i.y+d)return!0}return!1}function Ja(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function 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:L}=e.position,{cursorType:_,target:G,defaultCursorScale:$,defaultCursor:I,hoverCursorScale:D,hoverCursor:E}=e.cursor;s.useEffect(()=>{if(!i)return;const V=(P,A)=>{const j=i.getBoundingClientRect(),ie=P-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:I??"none",scale:$};x(le.img),g(le.scale)},w=P=>{P.stopPropagation(),b.current={x:P.clientX,y:P.clientY},V(P.clientX,P.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,I,D,$,r]),s.useEffect(()=>{M||(x("none"),g(0))},[M]);const T=async(V,w,U,P={})=>{const{width:A,height:j,finalWidth:ie}=await xh(V.image.assetId,S,W,q);let ae=0,O=0;z==="same"?(ae=w/2,O=U/2):(ae=P.x??Math.random()*w,O=P.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++,assetId:V.image.assetId,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,P=[];(async()=>{const j=t[0],ie=await T(j,w,U);P.push(ie),l(P),d(1)})()},[S,W,q,z,i]),s.useEffect(()=>{L==="last One"&&l(V=>V.length>0?[V[V.length-1]]:[])},[L]);const C=async V=>{if(!i)return;const w=i.getBoundingClientRect(),U=V.clientX-w.left,P=V.clientY-w.top;if(G==="image"&&!vc(U,P,r))return;let A=0,j=0;z==="on Click"?(A=U,j=P):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=>L==="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.assetId,alt:V.name,className:no.image},V.id)}):a.jsx("img",{src:V.assetId,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.assetId",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",assetId:"01M3QM74XGWBJY3AQQ71GC2Z6Q",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",assetId:"01M3QM74XGMXS1Z5ZY2RFGS3T4",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",assetId:"01M3QM74XGWG6VCHNEXKVKAJGT",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",assetId:"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",Ih="LightBox-module__contentStyle___Bgnsq",Lh="LightBox-module__imageStyle___tLIlB",Ph="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:Ih,imageStyle:Lh,imgWrapper:Ph,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),{assetId:u}=e.thumbnailBlock.cover;return s.useEffect(()=>{o==="close"&&d(!1),o==="open"&&d(!0)},[o]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:u,alt:"Cover",className: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,L]=s.useState(!1),[_,G]=s.useState({}),$=s.useRef(null),I=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),P=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:Le,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=P.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),L(!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),L(!1)}},[e,se]),s.useEffect(()=>{I.current!==null&&I.current!==O.type&&S(h=>h+1),I.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",L(!1);const ne=B=>{B.target===T.current&&!E.current&&B.animationName&&(Y&&!l&&Q>.9&&(document.body.style.backgroundColor=le.color),L(!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),L(!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,Pe;if(!e||!me||!((Pe=(X=$.current)==null?void 0:X.splide)!=null&&Pe.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:Le,{[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.assetId,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:P,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),Pe=()=>{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)}:{},...Pe(),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.assetId,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.assetId",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.assetId",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{assetId:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},lightboxBlock:{appear:{type:"slide in",duration:"1000ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.01,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:0,bottom:.06,left:0}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},linkColor:"#cccccc",linkHoverColor:"#cccccc"}}},m:{thumbnailBlock:{cover:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"horiz",duration:"1000ms"},thumbnail:{isActive:!0,position:"bottom-center",fit:"fit",align:"start",triggers:"hov",grid:{size:.1,gap:.05},offset:{x:.01,y:-.05},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.05,bottom:.06,left:.05}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}},t:{thumbnailBlock:{cover:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",assetId:"01M3QM74XD4J8X0B8TTSQ8CV3P",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XD0N6VQJ5J8J9YB32N",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XE4WSEPVF1QQSKMD76",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}};function Or(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function 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:k.scalingValue(e.letterSpacing,t),wordSpacing:k.scalingValue(e.wordSpacing,t),fontSize:k.scalingValue(n,t),lineHeight:i!==void 0?k.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,'\\"')}")`,mn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[r,l]=s.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")')),[c,d]=s.useState(()=>yr(e)?e:null);return s.useEffect(()=>{if(typeof window<"u"&&window.CSS){const u=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');l(u)}},[]),s.useEffect(()=>{if(!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:Pt(fc.img,i),style:o}):a.jsx("span",{"data-supports-mask":r,className:Pt(fc.svg,i),style:{"--svg":uh(c),"--fill":t,"--hover-fill":n,...o??{}}})},ph={"top-left":It.topLeftAlignment,"top-center":It.topCenterAlignment,"top-right":It.topRightAlignment,"middle-left":It.middleLeftAlignment,"middle-center":It.middleCenterAlignment,"middle-right":It.middleRightAlignment,"bottom-left":It.bottomLeftAlignment,"bottom-center":It.bottomCenterAlignment,"bottom-right":It.bottomRightAlignment};function mh({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:v,textAppearance:b,color:m}=n.imageCaption??{},[h,x]=s.useState(void 0),[S,P]=s.useState(null),[f,w]=s.useState(0),[N,V]=s.useState(0),{direction:B,transition:H,controls:_,pagination:z,imageCaption:$,triggers:E}=e,j=s.useRef(H.type),{x:L,y:C}=e.controls.offset,T=G=>{o&&o.go(G)};return s.useEffect(()=>{if(!S)return;const G=new ResizeObserver(A=>{if(!o)return;const[Y]=A;x({width:Math.round(Y.contentRect.width),height:Math.round(Y.contentRect.height)})});return G.observe(S),()=>G.unobserve(S)},[S]),s.useEffect(()=>{!o||j.current===H.type||(V(G=>G+1),j.current=H.type)},[H.type]),a.jsx("div",{className:Pt(It.wrapper,{[It.editor]:i}),ref:P,children:a.jsxs("div",{className:It.sliderInner,style:{width:h?h.width:"100%",height:h?h.height:"100%",backgroundColor:H.backgroundColor&&H.type==="fade in"?H.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:Pt(It.captionBlock),children:a.jsx("div",{className:It.captionTextWrapper,children:t.map((G,A)=>a.jsx("div",{className:Pt(It.captionText,ph[$.alignment],{[It.withPointerEvents]:A===f&&i,[It.active]:A===f}),style:{fontFamily:Do(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:l.sizing==="auto"?"max-content":k.scalingValue(l.width,i),letterSpacing:k.scalingValue(d,i),wordSpacing:k.scalingValue(p,i),textAlign:u,fontSize:k.scalingValue(v.fontSize,i),lineHeight:k.scalingValue(v.lineHeight,i),textTransform:b.textTransform??"none",textDecoration:b.textDecoration??"none",fontVariant:b.fontVariant??"normal",color:m,transitionDuration:H.duration?`${Math.round(parseInt(H.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:It.captionTextInner,style:{"--link-hover-color":$.linkHoverColor,"--link-color":$.linkColor,position:"relative",top:k.scalingValue($.offset.y,i),left:k.scalingValue($.offset.x,i)},children:a.jsx(Yi,{content:G.imageCaption})})},A))})}),a.jsx(El,{onMove:G=>{w(G.index)},ref:r,options:{arrows:!1,speed:H.duration?parseInt(H.duration):500,autoplay:E.autoPlay!==null,...E.autoPlay!==null&&{interval:parseInt(E.autoPlay)*1e3},direction:B==="horiz"||H.type==="fade in"?"ltr":"ttb",pagination:!1,drag:E.triggersList.drag,perPage:1,width:h?h.width:"100%",height:h?h.height:"100%",type:H.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((G,A)=>a.jsx(kl,{children:a.jsx("div",{className:It.sliderItem,children:a.jsx("div",{className:It.imgWrapper,children:a.jsx("img",{className:Pt(It.sliderImage,{[It.contain]:G.image.objectFit==="contain",[It.cover]:G.image.objectFit==="cover"}),src:G.image.assetId,alt:G.image.name??""})})})},A))},N),_.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Pt(It.arrow,{[It.arrowVertical]:B==="vert",[It.hoverArrow]:_.show==="on hover"}),style:{color:_.color,"--arrow-hover-color":_.hover},children:a.jsxs("button",{onClick:()=>{T("-1")},className:It.arrowInner,style:{transform:`translate(${k.scalingValue(L,i)}, ${k.scalingValue(C*(B==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:[_.arrowsImgUrl&&a.jsx(mn,{url:_.arrowsImgUrl,fill:_.color,hoverFill:_.hover,className:Pt(It.arrowImg,It.mirror)}),!_.arrowsImgUrl&&a.jsx(yc,{color:_.color,className:Pt(It.arrowIcon,It.arrowImg,It.mirror)})]})}),a.jsx("div",{className:Pt(It.arrow,It.nextArrow,{[It.arrowVertical]:B==="vert",[It.hoverArrow]:_.show==="on hover"}),style:{color:_.color,"--arrow-hover-color":_.hover},children:a.jsxs("button",{className:It.arrowInner,onClick:()=>T("+1"),style:{transform:`translate(${k.scalingValue(L*(B==="horiz"?-1:1),i)}, ${k.scalingValue(C,i)}) scale(${e.controls.scale/100}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:[_.arrowsImgUrl&&a.jsx(mn,{url:_.arrowsImgUrl,fill:_.color,hoverFill:_.hover,className:It.arrowImg}),!_.arrowsImgUrl&&a.jsx(yc,{color:_.color,className:Pt(It.arrowIcon,It.arrowImg)})]})})]}),E.triggersList.click&&a.jsx("div",{className:It.clickOverlay,onClick:()=>{o&&o.go("+1")}}),z.isActive&&a.jsx("div",{className:Pt(It.pagination,{[It.paginationInsideBottom]:z.position==="inside-1"&&B==="horiz",[It.paginationInsideTop]:z.position==="inside-2"&&B==="horiz",[It.paginationOutsideBottom]:z.position==="outside-1"&&B==="horiz",[It.paginationOutsideTop]:z.position==="outside-2"&&B==="horiz",[It.paginationInsideLeft]:z.position==="inside-1"&&B==="vert",[It.paginationInsideRight]:z.position==="inside-2"&&B==="vert",[It.paginationOutsideLeft]:z.position==="outside-1"&&B==="vert",[It.paginationOutsideRight]:z.position==="outside-2"&&B==="vert",[It.paginationVertical]:B==="vert"}),children:a.jsx("div",{className:It.paginationInner,style:{backgroundColor:z.colors[2],transform:`scale(${z.scale/100}) translate(${k.scalingValue(z.offset.x,i)}, ${k.scalingValue(z.offset.y,i)}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:t.map((G,A)=>a.jsx("button",{onClick:()=>{o&&o.go(A)},className:Pt(It.paginationItem),children:a.jsx("div",{className:Pt(It.dot,{[It.activeDot]:A===f}),style:{backgroundColor:A===f?z.colors[0]:z.colors[1],"--pagination-hover-color":z.hover}})},A))})})]})})}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 gh={element:mh,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"inside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",assetId:"01M3QM74XES6E7GVC0H3KJ2RH6",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEAZ8H1DTC5V1S554K",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEDRP49HNTEPNZYQTP",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},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.assetId;const r=i.width?Number.parseFloat(i.width):o.naturalWidth,l=o.naturalHeight/o.naturalWidth*r,c=r/2,d=l/2;if(e>=i.x-c&&e<=i.x+c&&t>=i.y-d&&t<=i.y+d)return!0}return!1}function Ja(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function 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,v]=s.useState({x:0,y:0}),[b,m]=s.useState(1),[h,x]=s.useState("none"),S=s.useRef({x:0,y:0}),[P,f]=s.useState(!1),{sizeType:w,imageWidth:N,randomRangeImageWidth:V}=e.imageSize,{revealPosition:B,visible:H}=e.position,{cursorType:_,target:z,defaultCursorScale:$,defaultCursor:E,hoverCursorScale:j,hoverCursor:L}=e.cursor;s.useEffect(()=>{if(!i)return;const G=(R,y)=>{const U=i.getBoundingClientRect(),ee=R-U.left,de=y-U.top;if(v({x:ee,y:de}),_==="system"){x("none"),m(1);return}const F=ee,ie=de,I=document.elementFromPoint(U.left+F,U.top+ie);if(I&&I.closest("a")){x("none"),m(1);return}const se=vc(F,ie,r)||z==="area"?{img:L??"none",scale:j}:{img:E??"none",scale:$};x(se.img),m(se.scale)},A=R=>{R.stopPropagation(),S.current={x:R.clientX,y:R.clientY},G(R.clientX,R.clientY)},Y=()=>{P&&G(S.current.x,S.current.y)};return i.addEventListener("mousemove",A),window.addEventListener("scroll",Y,!0),()=>{i.removeEventListener("mousemove",A),window.removeEventListener("scroll",Y,!0)}},[i,P,p,_,z,L,E,j,$,r]),s.useEffect(()=>{P||(x("none"),m(0))},[P]);const C=async(G,A,Y,R={})=>{const{width:y,height:U,finalWidth:ee}=await xh(G.image.assetId,w,N,V);let de=0,F=0;B==="same"?(de=A/2,F=Y/2):(de=R.x??Math.random()*A,F=R.y??Math.random()*Y);const ie=Math.min(Math.max(de,y/2),A-y/2),I=Math.min(Math.max(F,U/2),Y-U/2);return{id:u.current++,assetId:G.image.assetId,link:G.link,name:G.image.name,x:ie,y:I,width:ee}};s.useEffect(()=>{if(!i||t.length===0)return;const G=i.getBoundingClientRect(),A=G.width,Y=G.height,R=[];(async()=>{const U=t[0],ee=await C(U,A,Y);R.push(ee),l(R),d(1)})()},[w,N,V,B,i]),s.useEffect(()=>{H==="last One"&&l(G=>G.length>0?[G[G.length-1]]:[])},[H]);const T=async G=>{if(!i)return;const A=i.getBoundingClientRect(),Y=G.clientX-A.left,R=G.clientY-A.top;if(z==="image"&&!vc(Y,R,r))return;let y=0,U=0;B==="on Click"?(y=Y,U=R):B==="same"?(y=A.width/2,U=A.height/2):(y=Math.random()*A.width,U=Math.random()*A.height);const ee=t[c],de=await C(ee,A.width,A.height,{x:y,y:U});l(F=>H==="all"?[...F,de]:[de]),d(F=>F>=t.length-1?0:F+1)};return a.jsxs("div",{ref:o,onClick:T,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),className:no.imageRevealSlider,style:{cursor:h==="none"?"default":"none"},children:[r.map(G=>a.jsx("div",{className:no.wrapper,style:{top:`${G.y}px`,left:`${G.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:G.width??"auto",height:"auto",cursor:h==="none"?"default":"none"},children:z==="area"&&G.link?a.jsx("a",{href:G.link,target:"_blank",className:no.link,children:a.jsx("img",{src:G.assetId,alt:G.name,className:no.image},G.id)}):a.jsx("img",{src:G.assetId,alt:G.name,className:no.image},G.id)},G.id)),P&&a.jsx("div",{className:no.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${b})`,backgroundImage:`url('${h}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const 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.assetId",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",assetId:"01M3QM74XGWBJY3AQQ71GC2Z6Q",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",assetId:"01M3QM74XGMXS1Z5ZY2RFGS3T4",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",assetId:"01M3QM74XGWG6VCHNEXKVKAJGT",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",assetId:"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",Ih="LightBox-module__contentStyle___Bgnsq",Lh="LightBox-module__imageStyle___tLIlB",Ph="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:Ih,imageStyle:Lh,imgWrapper:Ph,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% + ${k.scalingValue(t.x,n)}), calc(-50% + ${k.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${k.scalingValue(t.x,n)}, calc(-50% + ${k.scalingValue(t.y,n)}))`:r==="center"?i.transform=`translate(calc(-50% + ${k.scalingValue(t.x,n)}), ${k.scalingValue(t.y,n)})`:i.transform=`translate(${k.scalingValue(t.x,n)}, ${k.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:v,offsetY:b}=Gu(n,i,u,p,c),m=(v+u/2)/n*100,h=(b+p/2)/i*100;return`${m}% ${h}%`}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:v}=Gu(i,o,c,d,u),b=t.left+n.left,m=t.top+n.top;return{x:p+b,y:v+m,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),{assetId:u}=e.thumbnailBlock.cover;return s.useEffect(()=>{o==="close"&&d(!1),o==="open"&&d(!0)},[o]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:u,alt:"Cover",className:at.heroImage,onClick:()=>d(!0)}),a.jsx(mf,{isOpen:c,onClose:()=>d(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:r})]})},mf=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:r,isEditor:l,metadata:c})=>{var we;const{widthSettings:d,fontSettings:u,letterSpacing:p,textAlign:v,wordSpacing:b,fontSizeLineHeight:m,textAppearance:h,color:x}=i.imageCaption??{},[S,P]=s.useState(0),[f,w]=s.useState(0),[N,V]=s.useState(!1),[B,H]=s.useState(!1),[_,z]=s.useState({}),$=s.useRef(null),E=s.useRef(null),j=s.useRef(null),L=s.useRef(!1),C=s.useRef(null),T=s.useRef(null),G=s.useRef(null),A=s.useRef(null),Y=s.useRef(!1),R=s.useRef(null),[y,U]=s.useState(!1),{appear:ee,triggers:de,slider:F,thumbnail:ie,controls:I,area:se,caption:J,layout:Se}=o.lightboxBlock,{appearClass:Re,backdropAppearClass:pe,backdropDisappearClass:he,disappearClass:te}=uf(ee.type,ee.direction),le=(c==null?void 0:c.itemId)??null;s.useEffect(()=>{const g=()=>{setTimeout(()=>{var Z,ne;(ne=(Z=$.current)==null?void 0:Z.splide)==null||ne.refresh()},16)},X=()=>{w(Z=>Z+1)};return window.addEventListener("ArticleEditor.Layout:change",g),window.addEventListener("ArticleEditor.ComponentContent:change",X),()=>{window.removeEventListener("ArticleEditor.Layout:change",g),window.removeEventListener("ArticleEditor.ComponentContent:change",X)}},[]),s.useEffect(()=>{if(!e||!ie.isActive){U(!1);return}const g=R.current;if(!g)return;const X=()=>{F.direction==="horiz"?U(g.scrollWidth>g.clientWidth):U(g.scrollHeight>g.clientHeight)};X();const Z=new ResizeObserver(X);return Z.observe(g),()=>Z.disconnect()},[e,ie.isActive,n.length,_,F.direction]);const re=s.useCallback(()=>{const g=window.matchMedia("(max-width: 768px)").matches,X=k.getColorAlpha(se.color);g&&!l&&X>.9&&(document.body.style.backgroundColor=""),V(!0),L.current=!0;const Z=ne=>{ne.target===C.current&&ne.animationName&&(C.current&&T.current&&C.current.removeEventListener("animationend",T.current),T.current=null,L.current&&(L.current=!1,t()),V(!1))};C.current&&(T.current=Z,C.current.addEventListener("animationend",Z))},[t,se.color,l]),fe=(g,X,Z)=>{var ne,ye;if(g){if(de.type==="click"&&de.switch==="image")de.repeat==="close"&&S===n.length-1?re():(ne=$.current)==null||ne.go("+1");else if(de.type==="click"&&de.switch==="50/50"){const K=g.getBoundingClientRect(),D=X-K.left,ce=Z-K.top,q=K.width,ue=K.height;let W;F.direction==="horiz"?W=D<q/2?"-1":"+1":W=ce<ue/2?"-1":"+1",(ye=$.current)==null||ye.go(W)}}},xe=g=>{if(Y.current){Y.current=!1;return}const X=n[S],Z=(X==null?void 0:X.image.objectFit)==="cover";let ne,ye;if("changedTouches"in g&&g.changedTouches.length>0)ne=g.changedTouches[0].clientX,ye=g.changedTouches[0].clientY;else if("clientX"in g)ne=g.clientX,ye=g.clientY;else return;let K;if(Z&&j.current){const D=xc(j.current);K=ne>=D.left&&ne<=D.right&&ye>=D.top&&ye<=D.bottom}else{const D=j.current?Sa(j.current):null;if(!D){g.target===g.currentTarget&&re();return}K=ne>=D.x&&ne<=D.x+D.width&&ye>=D.y&&ye<=D.y+D.height}K?fe(j.current,ne,ye):re()},Te=g=>{const X=g.target;(X.classList.contains(at.thumbsWrapper)||X.classList.contains(at.thumbsContainer))&&xe(g)};s.useEffect(()=>{if(!e)return;const g=X=>{var Z,ne;if(X.key==="Escape"){re();return}if(X.key==="ArrowRight"){P(ye=>(ye+1)%Math.max(n.length,1)),(Z=$.current)==null||Z.go("+1");return}X.key==="ArrowLeft"&&(P(ye=>(ye-1+Math.max(n.length,1))%Math.max(n.length,1)),(ne=$.current)==null||ne.go("-1"))};return window.addEventListener("keydown",g),()=>{window.removeEventListener("keydown",g)}},[e,re,n.length]),s.useEffect(()=>{if(e){if(P(0),w(X=>X+1),L.current=!1,V(!1),H(!1),z({}),!le)return;const g=new CustomEvent("page-overlay",{detail:{itemId:le}});window.dispatchEvent(g)}return()=>{C.current&&T.current&&(C.current.removeEventListener("animationend",T.current),T.current=null),H(!1)}},[e,le]),s.useEffect(()=>{E.current!==null&&E.current!==F.type&&w(g=>g+1),E.current=F.type},[F.type]),s.useEffect(()=>{if(!e)return;const g=document.body.style.overflow,X=window.matchMedia("(max-width: 768px)").matches,Z=k.getColorAlpha(se.color);document.body.style.overflow="hidden",H(!1);const ne=K=>{K.target===C.current&&!L.current&&K.animationName&&(X&&!l&&Z>.9&&(document.body.style.backgroundColor=se.color),H(!0),C.current&&G.current&&C.current.removeEventListener("animationend",G.current),G.current=null)};C.current&&(G.current=ne,C.current.addEventListener("animationend",ne));const ye=K=>{const D=K.target;D&&(D.closest(`.${at.thumbsWrapper}`)||D.closest(`.${at.thumbsContainer}`))||F.type!=="slide"&&K.preventDefault()};return document.addEventListener("touchmove",ye,{passive:!1}),()=>{document.body.style.overflow=g,document.removeEventListener("touchmove",ye),C.current&&G.current&&(C.current.removeEventListener("animationend",G.current),G.current=null),H(!1)}},[e,l,se.color,F.type]),s.useEffect(()=>{if(!e)return;const g=X=>{var ne,ye;if(L.current){X.stopPropagation();return}if(Y.current){Y.current=!1;return}const Z=X.target;if(!(Z&&(Z.closest(`.${at.thumbsContainer}`)||Z.closest(`.${at.thumbItem}`)||Z.closest(`.${at.arrow}`)||Z.closest(`.${at.closeButton}`)||Z.closest(`.${at.caption}`)))){if(F.type==="slide"&&de.type==="drag"&&((ye=(ne=$.current)==null?void 0:ne.splide)!=null&&ye.root)){const K=$.current.splide.root;if(Z&&(K.contains(Z)||K===Z))return}if(X.touches.length===0&&X.changedTouches.length>0){const K=n[S],D=(K==null?void 0:K.image.objectFit)==="cover",ce=X.changedTouches[0];let q;if(D&&j.current){const ue=xc(j.current);q=ce.clientX>=ue.left&&ce.clientX<=ue.right&&ce.clientY>=ue.top&&ce.clientY<=ue.bottom}else{const ue=j.current?Sa(j.current):null;if(!ue)return;q=ce.clientX>=ue.x&&ce.clientX<=ue.x+ue.width&&ce.clientY>=ue.y&&ce.clientY<=ue.y+ue.height}if(!q){X.stopPropagation(),L.current=!0;const ue=W=>{W.stopPropagation(),W.preventDefault(),document.removeEventListener("click",ue,!0)};document.addEventListener("click",ue,!0),re()}}}};return document.addEventListener("touchend",g,{passive:!0}),()=>{document.removeEventListener("touchend",g)}},[e,re,S,n]);const me=(F.type==="scale"||F.type==="fade")&&F.direction==="vert"&&de.type==="drag";s.useEffect(()=>{var W,Le;if(!e||!me||!((Le=(W=$.current)==null?void 0:W.splide)!=null&&Le.root))return;const g=$.current.splide.root,X=30,Z=(ae,Q)=>{if(A.current){const Ne=Math.abs(ae-A.current.x),Oe=Math.abs(Q-A.current.y);(Ne>0||Oe>0)&&(Y.current=!0)}},ne=ae=>{A.current&&(ae.preventDefault(),Z(ae.clientX,ae.clientY))},ye=ae=>{A.current&&ae.touches.length>0&&(ae.preventDefault(),Z(ae.touches[0].clientX,ae.touches[0].clientY))},K=(ae,Q)=>{if(!A.current||!$.current){A.current=null;return}const Ne=Math.abs(ae-A.current.x),Oe=Math.abs(Q-A.current.y);Oe>X&&Oe>Ne&&$.current.go(Q<A.current.y?"+1":"-1"),A.current=null},D=ae=>{A.current&&K(ae.clientX,ae.clientY),document.removeEventListener("pointerup",D),document.removeEventListener("pointercancel",D),document.removeEventListener("pointermove",ne)},ce=ae=>{if(A.current){if(ae.changedTouches.length>0){const Q=ae.changedTouches[0];K(Q.clientX,Q.clientY)}document.removeEventListener("touchend",ce),document.removeEventListener("touchcancel",ce),document.removeEventListener("touchmove",ye)}},q=ae=>{A.current={x:ae.clientX,y:ae.clientY},Y.current=!1,document.addEventListener("pointermove",ne,{passive:!1}),document.addEventListener("pointerup",D),document.addEventListener("pointercancel",D)},ue=ae=>{ae.touches.length>0&&(A.current={x:ae.touches[0].clientX,y:ae.touches[0].clientY},Y.current=!1,document.addEventListener("touchmove",ye,{passive:!1}),document.addEventListener("touchend",ce),document.addEventListener("touchcancel",ce))};return g.addEventListener("pointerdown",q),g.addEventListener("touchstart",ue),()=>{g.removeEventListener("pointerdown",q),g.removeEventListener("touchstart",ue),document.removeEventListener("pointermove",ne),document.removeEventListener("pointerup",D),document.removeEventListener("pointercancel",D),document.removeEventListener("touchmove",ye),document.removeEventListener("touchend",ce),document.removeEventListener("touchcancel",ce),A.current=null,Y.current=!1}},[e,me,f]);const be={backgroundColor:se.color,backdropFilter:`blur(${se.blur}px)`,animationDuration:`${parseInt(ee.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:C,className:Pt(at.background,N?he:pe,{[at.editor]:l},{[at.hidden]:!e}),style:{...be,...B&&!l&&!N?{position:"absolute"}:{}}}),a.jsxs("div",{ref:l?C:null,className:Pt(at.contentStyle,N?te:Re,{[at.editor]:l},{[at.hidden]:!e}),style:{animationDuration:`${parseInt(ee.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(El,{onMove:g=>P(g.index),ref:$,className:at.lightboxSplide,options:{arrows:!1,speed:F.duration?parseInt(F.duration):500,direction:F.direction==="horiz"||F.type==="fade"||F.type==="scale"?"ltr":"ttb",pagination:!1,drag:de.type==="drag"&&!me,perPage:1,width:"100%",height:"100%",type:F.type==="fade"||F.type==="scale"?"fade":"loop",padding:0,rewind:de.repeat!=="close",start:0},style:{"--splide-speed":F.duration},children:n.map((g,X)=>{const Z=Wr(Se.position,Se.offset,l),ne=`${k.scalingValue(Se.padding.top,l)} ${k.scalingValue(Se.padding.right,l)} ${k.scalingValue(Se.padding.bottom,l)} ${k.scalingValue(Se.padding.left,l)}`,ye=F.type==="scale"?(()=>{const{transform:K,...D}=Z;return{...D,position:"absolute",padding:ne,boxSizing:"border-box","--position-transform":K||"none"}})():{...Z,position:"absolute",padding:ne,boxSizing:"border-box"};return a.jsx(kl,{children:a.jsx("div",{className:at.imgWrapper,onClick:xe,children:a.jsx("img",{ref:X===S?j:null,className:Pt(at.imageStyle,{[at.contain]:g.image.objectFit==="contain",[at.cover]:g.image.objectFit==="cover",[at.scaleSlide]:F.type==="scale"}),src:g.image.assetId,alt:g.image.name??"",style:{...ye,pointerEvents:g.image.objectFit==="contain"?"none":"auto"}})})},X)})},f),I.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Pt(at.arrow,{[at.arrowVertical]:F.direction==="vert"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:a.jsxs("button",{className:at.arrowInner,style:{transform:`translate(${k.scalingValue(I.offset.x,l)}, ${k.scalingValue(I.offset.y*(F.direction==="horiz"?1:-1),l)}) scale(${I.scale}) rotate(${F.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var g;return(g=$.current)==null?void 0:g.go("-1")},"aria-label":"Previous",children:[I.arrowsImgUrl&&a.jsx(mn,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:Pt(at.arrowImg,at.mirror)}),!I.arrowsImgUrl&&a.jsx(bc,{color:I.color,className:Pt(at.arrowIcon,at.arrowImg,at.mirror)})]})}),a.jsx("div",{className:Pt(at.arrow,at.nextArrow,{[at.arrowVertical]:F.direction==="vert"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:a.jsxs("button",{className:at.arrowInner,style:{transform:`translate(${k.scalingValue(I.offset.x*(F.direction==="horiz"?-1:1),l)}, ${k.scalingValue(I.offset.y,l)}) scale(${I.scale}) rotate(${F.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var g;return(g=$.current)==null?void 0:g.go("+1")},"aria-label":"Next",children:[I.arrowsImgUrl&&a.jsx(mn,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:at.arrowImg}),!I.arrowsImgUrl&&a.jsx(bc,{color:I.color,className:Pt(at.arrowIcon,at.arrowImg)})]})})]}),se.closeIconUrl&&(()=>{const g=Wr(se.closeIconAlign,se.closeIconOffset,l),X=`scale(${se.closeIconScale})`,Z=g.transform?`${g.transform} ${X}`:X;return a.jsx("button",{className:at.closeButton,style:{...g,transform:Z},onClick:re,"aria-label":"Close lightbox",children:a.jsx(mn,{url:se.closeIconUrl,fill:se.closeIconColor??"#000000",hoverFill:se.closeIconHover??"#cccccc"})})})(),J&&J.isActive&&i.imageCaption&&((we=n[S])==null?void 0:we.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":k.scalingValue(d.width,l),letterSpacing:k.scalingValue(p,l),wordSpacing:k.scalingValue(b,l),textAlign:v,fontSize:k.scalingValue(m.fontSize,l),lineHeight:k.scalingValue(m.lineHeight,l),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:x},onClick:g=>g.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[S].imageCaption})})}),ie.isActive&&(()=>{const[g,X]=ie.position.split("-"),Z=F.direction==="horiz"?`${g}-left`:ie.position,ne=Wr(Z,ie.offset,l),ye=()=>{if(F.direction==="horiz"){if(X==="left")return"flex-start";if(X==="center")return"center";if(X==="right")return"flex-end"}else{if(g==="top")return"flex-start";if(g==="middle")return"center";if(g==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:R,className:at.thumbsWrapper,onClick:K=>Te(K),style:{position:l?"absolute":"fixed",...ne,...F.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:Pt(at.thumbsContainer,{[at.thumbsContainerVertical]:F.direction==="vert",[at.thumbsAlignStart]:ie.align==="start",[at.thumbsAlignCenter]:ie.align==="center",[at.thumbsAlignEnd]:ie.align==="end"}),style:{gap:k.scalingValue(ie.grid.gap,l),justifyContent:y?"flex-start":ye()},children:n.map((K,D)=>{const ce=D===S,q=_[D],W=ie.grid.size*(ce?ie.activeState.scale:1),Le=()=>{if(ie.fit!=="fit")return{};if(!q)return F.direction==="horiz"?{height:k.scalingValue(W,l)}:{width:k.scalingValue(W,l)};const ae=q.width/q.height;if(F.direction==="horiz"){const Q=W,Ne=Q*ae;return{width:k.scalingValue(Ne,l),height:k.scalingValue(Q,l)}}else{const Q=W,Ne=Q/ae;return{width:k.scalingValue(Q,l),height:k.scalingValue(Ne,l)}}};return a.jsx("button",{className:at.thumbItem,style:{...F.direction==="horiz"&&ie.fit!=="fit"?{height:k.scalingValue(W,l)}:{},...F.direction==="vert"&&ie.fit!=="fit"?{width:k.scalingValue(W,l)}:{},...ie.fit==="cover"?{width:k.scalingValue(W,l),height:k.scalingValue(W,l)}:{},...Le(),transition:ce?"all 0.25s ease-out":"none",opacity:ce?ie.activeState.opacity/100:ie.opacity/100,"--thumb-hover":ie.activeState.opacity/100},onClick:ae=>{var Q;ae.stopPropagation(),P(D),(Q=$.current)==null||Q.go(D)},onMouseEnter:()=>{var ae;ie.triggers==="hov"&&((ae=$.current)==null||ae.go(D))},children:a.jsx("img",{src:K.image.assetId,alt:K.image.name??"",onLoad:ae=>{const Q=ae.currentTarget;Q.naturalWidth&&Q.naturalHeight&&z(Ne=>({...Ne,[D]:{width:Q.naturalWidth,height:Q.naturalHeight}}))},style:{objectFit:ie.fit==="cover"?"cover":"contain",...ie.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ie.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${K.image.name}-${D}`)})})})})()]})]}),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 gf={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.assetId",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.assetId",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{assetId:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},lightboxBlock:{appear:{type:"slide in",duration:"1000ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.01,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:0,bottom:.06,left:0}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},linkColor:"#cccccc",linkHoverColor:"#cccccc"}}},m:{thumbnailBlock:{cover:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"horiz",duration:"1000ms"},thumbnail:{isActive:!0,position:"bottom-center",fit:"fit",align:"start",triggers:"hov",grid:{size:.1,gap:.05},offset:{x:.01,y:-.05},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.05,bottom:.06,left:.05}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}},t:{thumbnailBlock:{cover:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",assetId:"01M3QM74XD4J8X0B8TTSQ8CV3P",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XD0N6VQJ5J8J9YB32N",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XE4WSEPVF1QQSKMD76",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}};function Or(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function 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:M,buttonPadding:f,isButtonFullWidth:S,inputCorners:W,inputStroke:q,inputPadding:z,inputColor:L,inputTextColor:_,inputBorderColor:G,placeholderColor:$,buttonColor:I,buttonTextColor:D,buttonBorderColor:E,labelTextColor:T,successColor:C,errorColor:V,fontFamily:w,inputFontSettings:U,inputFontSize:P,inputLineHeight:A,inputLetterSpacing:j,inputWordSpacing:ie,inputTextAppearance:ae,buttonFontSettings:O,buttonFontSize:re,buttonLineHeight:N,buttonLetterSpacing:le,buttonWordSpacing:J,buttonTextAppearance:be,labelFontSettings:Le,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:P??.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??P??.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)),Pe={...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:(Le==null?void 0:Le.fontWeight)??400,fontStyle:(Le==null?void 0:Le.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:L,inputTextColor:_,inputBorderColor:G,placeholderColor:$!=null&&$.trim()?$:"#cccccc",buttonColor:I,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:{...Pe,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:Pe,"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}=k.useScopedStyles(),{type:u="A",fieldsToShow:p=2,textareaRows:v=1,fields:b=[],buttonLabel:m,gap:h,fieldsGap:x,buttonCorners:S,buttonStroke:P,buttonPadding:f,isButtonFullWidth:w,inputCorners:N,inputStroke:V,inputPadding:B,inputColor:H,inputTextColor:_,inputBorderColor:z,placeholderColor:$,buttonColor:E,buttonTextColor:j,buttonBorderColor:L,labelTextColor:C,successColor:T,errorColor:G,fontFamily:A,inputFontSettings:Y,inputFontSize:R,inputLineHeight:y,inputLetterSpacing:U,inputWordSpacing:ee,inputTextAppearance:de,buttonFontSettings:F,buttonFontSize:ie,buttonLineHeight:I,buttonLetterSpacing:se,buttonWordSpacing:J,buttonTextAppearance:Se,labelFontSettings:Re,labelFontSize:pe,labelLineHeight:he,labelLetterSpacing:te,labelWordSpacing:le,labelTextAppearance:re,statusFontSettings:fe,statusFontSize:xe,statusLineHeight:Te,statusLetterSpacing:me,statusWordSpacing:be,statusTextAppearance:we,successMessage:g,errorMessage:X,stateOverrides:Z}=e,ne=u==="B",ye=b.slice(0,Math.min(p,b.length)),K={fontSettings:{fontFamily:A,fontWeight:(Y==null?void 0:Y.fontWeight)??400,fontStyle:(Y==null?void 0:Y.fontStyle)??"normal"},fontSize:R??.01,lineHeight:y,letterSpacing:U??0,wordSpacing:ee??0,textAppearance:de,color:_},D=un(en(K,t)),ce=k.scalingValue(V??0,t),q=We=>k.scalingValue((y??R??.01)*We+((B==null?void 0:B.top)??0)+((B==null?void 0:B.bottom)??0)+(u==="C"?V??0:(V??0)*2),t),ue=q(1),W=q(Math.max(1,v)),Le={...D,borderStyle:"solid",borderRadius:u==="C"?0:k.scalingValue(N??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ce,borderLeftWidth:0}:{borderWidth:ce},paddingTop:k.scalingValue((B==null?void 0:B.top)??0,t),paddingRight:k.scalingValue((B==null?void 0:B.right)??0,t),paddingBottom:k.scalingValue((B==null?void 0:B.bottom)??0,t),paddingLeft:k.scalingValue((B==null?void 0:B.left)??0,t),height:ue,minHeight:ue},ae={fontSettings:{fontFamily:A,fontWeight:(F==null?void 0:F.fontWeight)??400,fontStyle:(F==null?void 0:F.fontStyle)??"normal"},fontSize:ie??.01,lineHeight:I,letterSpacing:se??0,wordSpacing:J??0,textAppearance:Se,color:j},Q=un(en(ae,t)),Ne=k.scalingValue(P??0,t),Oe={fontSettings:{fontFamily:A,fontWeight:(Re==null?void 0:Re.fontWeight)??400,fontStyle:(Re==null?void 0:Re.fontStyle)??"normal"},fontSize:pe??.01,lineHeight:he,letterSpacing:te??0,wordSpacing:le??0,textAppearance:re,color:C},it=en(Oe,t),qe={fontSettings:{fontFamily:A,fontWeight:(fe==null?void 0:fe.fontWeight)??400,fontStyle:(fe==null?void 0:fe.fontStyle)??"normal"},fontSize:xe??.01,lineHeight:Te,letterSpacing:me??0,wordSpacing:be??0,textAppearance:we,color:T},Je=un(en(qe,t)),ot=k.buildColorVars(d,{inputColor:H,inputTextColor:_,inputBorderColor:z,placeholderColor:$!=null&&$.trim()?$:"#cccccc",buttonColor:E,buttonTextColor:j,buttonBorderColor:L,labelTextColor:C,successColor:T,errorColor:G},yf,vf,Z),[Ve,ve]=s.useState(()=>Object.fromEntries(ye.map(We=>[We.name,""]))),[Fe,Xe]=s.useState("idle"),[Ye,Pe]=s.useState(null),_e=r==="success"?"success":r==="error"?"error":Fe,Ke=r==="error"?X:Ye,Ze=r==="filled",st=s.useMemo(()=>{if(!Ze)return Ve;let We=null;for(const mt of ye)(Ve[mt.name]??"").trim().length>0||(We=We??{...Ve},We[mt.name]="Filled");return We??Ve},[Ve,Ze,ye]),Ue=_e==="error"?k.getFormFieldValidationError(ye,st):null,ke=`${r&&r!=="default"?`${d}-state-${r}`:""}`.trim(),ht=o==null?void 0:o.submitUrl,Be=(We,mt)=>{ve(rt=>({...rt,[We]:mt}))},ze=async We=>{if(We.preventDefault(),!c)return;const mt=Object.fromEntries(ye.map(St=>{var Nt;return[St.name,((Nt=Ve[St.name])==null?void 0:Nt.trim())??""]}).filter(([,St])=>St));if(!ht){Xe("error"),Pe("No integrations were found for this form.");return}if(Object.keys(mt).length===0)return;const rt=k.getFormFieldValidationError(ye,Ve);if(rt){Xe("error"),Pe(rt);return}Xe("submitting"),Pe(null);try{const St=await fetch(ht,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(mt)});if(!St.ok){const Nt=await St.text();throw new Error(Nt||`Request failed: ${St.status}`)}Xe("success"),ve(Object.fromEntries(ye.map(Nt=>[Nt.name,""])))}catch(St){Xe("error"),Pe(St instanceof Error?St.message:"Something went wrong")}};return a.jsxs("div",{className:`${d}-wrapper ${d}-type-${u} ${ke}`.trim(),style:ot,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:hf(d)}}),a.jsxs("form",{onSubmit:ze,className:`${d}-form`,children:[a.jsx("div",{className:`${d}-fields`,children:ye.map((We,mt)=>a.jsxs(s.Fragment,{children:[mt>0&&a.jsx("div",{"data-controls":l?"fieldsGap":void 0,className:l?`${d}-control`:void 0,style:{height:k.scalingValue(x??0,t)}}),a.jsxs("div",{className:`${d}-field-group${ne?` ${d}-labeled`:""}`,children:[ne&&a.jsx("span",{className:`${d}-field-label`,style:it?{...it,lineHeight:it.fontSize}:void 0,children:We.label||We.name}),We.type==="textarea"?a.jsx("textarea",{name:We.name,autoComplete:"off",value:st[We.name]??"",onChange:rt=>Be(We.name,rt.target.value),placeholder:We.placeholder,className:`${d}-input`,style:{...Le,height:W,minHeight:W},rows:v,"data-filled":Ze||(st[We.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:We.type==="phone"?"tel":We.type==="email"?"email":"text",name:We.name,autoComplete:"off",value:st[We.name]??"",onChange:rt=>Be(We.name,rt.target.value),placeholder:We.placeholder,required:We.isRequired??We.type==="email",className:`${d}-input`,style:Le,"data-filled":Ze||(st[We.name]??"").trim().length>0})]})]},mt))}),a.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${d}-control`:void 0,style:{height:k.scalingValue(h??0,t)}}),a.jsx("div",{className:`${d}-overlay-anchor`,children:a.jsx("button",{type:c?"submit":"button",className:`${d}-button`,style:{borderStyle:"solid",borderRadius:k.scalingValue(S??0,t),borderWidth:Ne,paddingTop:k.scalingValue((f==null?void 0:f.top)??0,t),paddingRight:k.scalingValue((f==null?void 0:f.right)??0,t),paddingBottom:k.scalingValue((f==null?void 0:f.bottom)??0,t),paddingLeft:k.scalingValue((f==null?void 0:f.left)??0,t),pointerEvents:c?"auto":void 0,...Q,...w?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${d}-overlay-anchor`,style:w?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:Fe==="submitting"?"...":m})})})]}),_e==="success"&&a.jsx("p",{className:`${d}-success`,style:{...Je},children:g}),_e==="error"&&a.jsx("p",{className:`${d}-error`,style:{...Je},role:"alert",children:Ue??Ke??X})]})}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';
@@ -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:M,buttonFontSettings:f,buttonFontSize:S,buttonLineHeight:W,buttonLetterSpacing:q,buttonWordSpacing:z,buttonTextAppearance:L,statusFontSettings:_,statusFontSize:G,statusLineHeight:$,statusLetterSpacing:I,statusWordSpacing:D,statusTextAppearance:E,iconMaxWidth:T,minHeight:C,corners:V,stroke:w,stateOverrides:U,inputPadding:P,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),Le=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=Le==="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:L,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:I??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"},If,Lf,U),ge={borderRadius:F.scalingValue(V,t),borderWidth:F.scalingValue(w,t),borderStyle:"solid"},X={borderLeftWidth:F.scalingValue(w,t)},Pe=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:Pe,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(P.right,t),paddingLeft:F.scalingValue(P.left,t),paddingTop:F.scalingValue(P.top,t),paddingBottom:F.scalingValue(P.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})})]}),Le==="success"&&a.jsx("p",{className:`${r}-success`,style:{...ee},children:j}),Le==="error"&&a.jsx("p",{className:`${r}-error`,style:{...ee},role:"alert",children:se??ye??ie})]})},If={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"},Lf=["hover","focus","filled","success","error"],Pf=`import React, { useMemo, useState } from 'react';
989
+ `}const Tf=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:r}=k.useScopedStyles(),l=n&&t||!t,{fields:c=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:d,buttonLabel:u,fieldsToShow:p=1,fontFamily:v,inputFontSettings:b,inputFontSize:m,inputLineHeight:h,inputLetterSpacing:x,inputWordSpacing:S,inputTextAppearance:P,buttonFontSettings:f,buttonFontSize:w,buttonLineHeight:N,buttonLetterSpacing:V,buttonWordSpacing:B,buttonTextAppearance:H,statusFontSettings:_,statusFontSize:z,statusLineHeight:$,statusLetterSpacing:E,statusWordSpacing:j,statusTextAppearance:L,iconMaxWidth:C,minHeight:T,corners:G,stroke:A,stateOverrides:Y,inputPadding:R,buttonPadding:y,successMessage:U="Thanks for subscribing!",errorMessage:ee="Please, fill all required fields."}=e,de=c.slice(0,Math.min(p,c.length)),[F,ie]=s.useState(()=>Object.fromEntries(de.map(ae=>[ae.name,""]))),[I,se]=s.useState("idle"),[J,Se]=s.useState(null),Re=o==="success"?"success":o==="error"?"error":I,pe=o==="error"?ee:J,he=o==="filled",te=s.useMemo(()=>{if(!he)return F;let ae=null;for(const Q of de)(F[Q.name]??"").trim().length>0||(ae=ae??{...F},ae[Q.name]="Filled");return ae??F},[he,F,de]),le=Re==="error"?k.getFormFieldValidationError(de,te):null,re=o&&o!=="default"?`${r}-state-${o}`:"",fe=de.some(ae=>(te[ae.name]??"").trim().length>0),xe=re!==`${r}-state-filled`&&fe?`${r}-state-filled`:"",Te=`${re} ${xe}`.trim(),me=i==null?void 0:i.submitUrl,be=u??"",we=(d==null?void 0:d.icon)??"",g=(d==null?void 0:d.mode)==="On",X=be||"Submit",Z={fontSettings:{fontFamily:v,fontWeight:(b==null?void 0:b.fontWeight)??400,fontStyle:(b==null?void 0:b.fontStyle)??"normal"},fontSize:m??.01,lineHeight:h,letterSpacing:x??0,wordSpacing:S??0,textAppearance:P,color:e.inputTextColor??"#111111"},ne={fontSettings:{fontFamily:v,fontWeight:(f==null?void 0:f.fontWeight)??400,fontStyle:(f==null?void 0:f.fontStyle)??"normal"},fontSize:w??.01,lineHeight:N,letterSpacing:V??0,wordSpacing:B??0,textAppearance:H,color:e.buttonTextColor??"#ffffff"},ye={fontSettings:{fontFamily:v,fontWeight:(_==null?void 0:_.fontWeight)??400,fontStyle:(_==null?void 0:_.fontStyle)??"normal"},fontSize:z??.01,lineHeight:$,letterSpacing:E??0,wordSpacing:j??0,textAppearance:L,color:e.successColor??"#22c55e"},K=un(en(Z,t)),D=un(en(ne,t)),ce=un(en(ye,t)),q=k.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(Z==null?void 0:Z.color)??"#111111",buttonTextColor:e.buttonTextColor??(ne==null?void 0:ne.color)??"#ffffff"},If,Lf,Y),ue={borderRadius:k.scalingValue(G,t),borderWidth:k.scalingValue(A,t),borderStyle:"solid"},W={borderLeftWidth:k.scalingValue(A,t)},Le=async ae=>{if(ae.preventDefault(),!l)return;const Q=Object.fromEntries(de.map(Oe=>{var it;return[Oe.name,((it=F[Oe.name])==null?void 0:it.trim())??""]}).filter(([,Oe])=>Oe));if(!me){se("error"),Se("No integrations were found for this form.");return}if(Object.keys(Q).length===0)return;const Ne=k.getFormFieldValidationError(de,F);if(Ne){se("error"),Se(Ne);return}se("submitting"),Se(null);try{const Oe=await fetch(me,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Q)});if(!Oe.ok){const it=await Oe.text();throw new Error(it||`Request failed: ${Oe.status}`)}se("success"),ie(Object.fromEntries(de.map(it=>[it.name,""])))}catch(Oe){se("error"),Se(Oe instanceof Error?Oe.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${Te}`.trim(),style:q,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Cf(r)}}),a.jsxs("form",{onSubmit:Le,className:`${r}-form`,style:{...ue,height:k.scalingValue(T,t),minHeight:k.scalingValue(T,t)},children:[a.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:de.map(ae=>a.jsx("input",{type:ae.type==="email"?"email":ae.type==="phone"?"tel":"text",name:ae.name,autoComplete:"off",value:te[ae.name]??"",onChange:Q=>ie(Ne=>({...Ne,[ae.name]:Q.target.value})),placeholder:ae.placeholder,required:ae.isRequired??ae.type==="email",className:`${r}-input`,style:{...K,paddingRight:k.scalingValue(R.right,t),paddingLeft:k.scalingValue(R.left,t),paddingTop:k.scalingValue(R.top,t),paddingBottom:k.scalingValue(R.bottom,t)}},ae.name))}),a.jsx("div",{className:`${r}-overlayAnchor`,children:a.jsx("button",{type:l?"submit":"button",className:`${r}-submitBtn`,"aria-label":X,style:{...D,...W,paddingRight:k.scalingValue(y.right,t),paddingLeft:k.scalingValue(y.left,t),paddingTop:k.scalingValue(y.top,t),paddingBottom:k.scalingValue(y.bottom,t),pointerEvents:l?"auto":void 0},children:I==="submitting"?"...":g?we&&a.jsx(mn,{url:we,className:`${r}-submitBtnIcon`,style:{maxWidth:k.scalingValue(C??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):be})})]}),Re==="success"&&a.jsx("p",{className:`${r}-success`,style:{...ce},children:U}),Re==="error"&&a.jsx("p",{className:`${r}-error`,style:{...ce},role:"alert",children:le??pe??ee})]})},If={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"},Lf=["hover","focus","filled","success","error"],Pf=`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';
@@ -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.assetId??"")},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.assetId&&Xf(e.image));s.useLayoutEffect(()=>{c&&Uf(p.current)&&(u==null||u())},[c,(E=e.image)==null?void 0:E.assetId,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,L=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},I=((T=e.image)==null?void 0:T.assetId)&&(y?a.jsx("video",{ref:V=>{p.current=V},src:e.image.assetId,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.assetId,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:L}:{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:L,height:_,overflow:"hidden",...G}:{width:"max-content",maxWidth:d(i),height:d(o)}},children:I&&e.link?a.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:Ct(`${t}-marquee-link`,!v&&`${t}-marquee-link-contain`),children:I}):I})})},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,L=n?!!i:!0,G=((t==null?void 0:t.length)??0)>0&&(L||!!n),$=Math.max(0,p)*Nf,I=we=>F.scalingValue(we,n??!1),D=s.useRef(null),E=s.useRef(null),T=s.useRef(null),[C,V]=s.useState(0),w=L&&v==="on",[U,P]=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.assetId)??""}).join("\0"),[t]),[le,J]=s.useState(ts),be=s.useMemo(()=>{const we=t??[];return we.length===0||!(L||!!n)?we:Bf(we,le)},[t,L,le,n]),Le=s.useMemo(()=>(t??[]).filter(we=>{var Re;return!!((Re=we.image)!=null&&Re.assetId)}).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((L||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()}},[L,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&&P(!0)},K=()=>{w&&P(!1)},se=s.useCallback(()=>{var we;O.current=Math.min(Le,O.current+1),(we=re.current)==null||we.call(re)},[Le]),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(${I(g)}, ${_f}px)`,Y=`calc(-0.5 * (${h} + ${I(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:I,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=L?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:I(g),paddingRight:I(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:I(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';
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.assetId??"")},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 j,L,C,T;const p=s.useRef(null),v=!!((j=e.image)!=null&&j.assetId&&Xf(e.image));s.useLayoutEffect(()=>{c&&Uf(p.current)&&(u==null||u())},[c,(L=e.image)==null?void 0:L.assetId,u]);const b=n.display==="cover",m=n.ratioValue??"1:1",h=n.reversed??!1,[x,S]=m.split(":").map(Number),w=(h?S:x)/(h?x:S),N=i/w,V=N>o?o:N,B=N>o?o*w:i,H=d(B),_=d(V),z={borderRadius:d(r)},$=b?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...z}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:d(i),maxHeight:d(o),objectFit:"contain",...z},E=((C=e.image)==null?void 0:C.assetId)&&(v?a.jsx("video",{ref:G=>{p.current=G},src:e.image.assetId,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:G=>{p.current=G},src:e.image.assetId,alt:((T=e.image)==null?void 0:T.name)??"",style:$,onLoad:c?u:void 0,onError:c?u:void 0}));return a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...b?{width:H}:{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,...b?{width:H,height:_,overflow:"hidden",...z}:{width:"max-content",maxWidth:d(i),height:d(o)}},children:E&&e.link?a.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:Pt(`${t}-marquee-link`,!b&&`${t}-marquee-link-contain`),children:E}):E})})},Yf=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=k.useScopedStyles(),[l,c]=s.useState(0),d=l>0?Math.round(l):0,u=s.useMemo(()=>Ff(r,d),[r,d]),{speed:p,direction:v,pauseOnHover:b,gap:m,imageMaxWidth:h,imageMaxHeight:x,hoverEffect:S,cornerRadius:P=0}=e,f=s.useMemo(()=>zf(e.imageFit),[e.imageFit]),w=(t==null?void 0:t.length)??0,N=!!o,V=!n||!!i,B=V&&S!=="off"&&S!=="randomize"?`${r}-image-hover-${S}`:void 0,H=n?!!i:!0,z=((t==null?void 0:t.length)??0)>0&&(H||!!n),$=Math.max(0,p)*Nf,E=xe=>k.scalingValue(xe,n??!1),j=s.useRef(null),L=s.useRef(null),C=s.useRef(null),[T,G]=s.useState(0),A=H&&b==="on",[Y,R]=s.useState(!1),[y,U]=s.useState({}),ee=s.useRef(y);ee.current=y;const de=s.useRef(null),F=s.useRef(0),ie=s.useRef(null),I=s.useMemo(()=>(t??[]).map(xe=>{var Te;return((Te=xe.image)==null?void 0:Te.assetId)??""}).join("\0"),[t]),[se,J]=s.useState(ts),Se=s.useMemo(()=>{const xe=t??[];return xe.length===0||!(H||!!n)?xe:Bf(xe,se)},[t,H,se,n]),Re=s.useMemo(()=>(t??[]).filter(xe=>{var Te;return!!((Te=xe.image)!=null&&Te.assetId)}).length,[t]),pe=z?Of:1;s.useLayoutEffect(()=>{F.current=0,U({}),de.current=null,J(ts),c(0)},[I]),s.useEffect(()=>{if(!V||S!=="randomize")return;const xe=j.current;if(!xe)return;const Te=g=>{U(X=>{const Z=Array.from(g).filter(ye=>ye in X&&!Gf(xe,ye));if(Z.length===0)return X;const ne={...X};return Z.forEach(ye=>{delete ne[ye]}),ne})},me=new IntersectionObserver(g=>{const X=new Set;for(const Z of g){const ne=Z.target.dataset.marqueeItemIndex,ye=ne!==void 0?Number(ne):NaN;Number.isNaN(ye)||X.add(ye)}X.size>0&&Te(X)},{root:xe,threshold:0});Object.keys(y).forEach(g=>{const X=Number(g);xe.querySelectorAll(`[data-marquee-item-index="${X}"]`).forEach(Z=>me.observe(Z))});const be={current:0},we=()=>{const g=Object.keys(ee.current);g.length!==0&&(Te(g.map(Number)),be.current=requestAnimationFrame(we))};return Object.keys(ee.current).length>0&&(be.current=requestAnimationFrame(we)),()=>{cancelAnimationFrame(be.current),me.disconnect()}},[S,y,V]),s.useEffect(()=>{const xe=j.current;if(!xe||typeof IntersectionObserver>"u")return;const Te=xe.querySelectorAll("video");if(Te.length===0)return;const me=new IntersectionObserver(be=>{for(const we of be){const g=we.target;we.isIntersecting?g.paused&&g.play().catch(()=>{}):g.paused||g.pause()}},{threshold:0});return Te.forEach(be=>me.observe(be)),()=>me.disconnect()},[z,Se,pe,y]),s.useLayoutEffect(()=>{if(!z)return;const xe=j.current,Te=C.current;if(!xe||!Te)return;const me={current:0},be=()=>{const X=xe.getBoundingClientRect().width||xe.offsetWidth,Z=jf(Te),ne=de.current,ye=typeof ne=="number"&&Math.abs(ne-Z)<=.25;de.current=Z;let K=se,D=0;if((H||n)&&w>0&&X>0){const ue=Sc(Te,w);if(ue>=Wf){D=ue;const W=Math.min(Hf,Math.max(ts,Math.ceil(X/ue)+1));K=W,W!==se&&J(W)}}const q=K!==se&&D>0?D*K:Z>0?Z:D>0?D*K:(()=>{const ue=Sc(Te,w);return ue>0?ue*K:0})();q>0?c(ue=>ue<=0?q:!ye||Math.round(ue)===Math.round(q)?ue:q):!ye&&l<=0&&(cancelAnimationFrame(me.current),me.current=requestAnimationFrame(be))},we=()=>{cancelAnimationFrame(me.current),me.current=requestAnimationFrame(be)};ie.current=we,we();const g=new ResizeObserver(we);return g.observe(xe),g.observe(Te),()=>{ie.current=null,cancelAnimationFrame(me.current),g.disconnect()}},[H,z,l,I,se,w,n]),s.useLayoutEffect(()=>{if(!z||d<=0)return;const xe=L.current;xe&&Df(xe)},[z,d,v,$]),s.useLayoutEffect(()=>{if(!z||l<=0){G(0);return}const xe=L.current,Te=C.current;if(!xe||!Te)return;const me=()=>{const we=xe.offsetHeight||xe.getBoundingClientRect().height,g=Array.from(Te.children).reduce((Z,ne)=>Math.max(Z,ne.offsetHeight||ne.getBoundingClientRect().height),0),X=we>0?we:g;G(X>0?X:0)};me();const be=new ResizeObserver(me);return be.observe(xe),be.observe(Te),()=>be.disconnect()},[z,pe,Se,n,m,h,x,l,f,y]),s.useLayoutEffect(()=>{if(!n||!N||!z||typeof window>"u")return;const xe=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(xe)},[n,N,z,v,l,T,m,Se]);const he=()=>{A&&R(!0)},te=()=>{A&&R(!1)},le=s.useCallback(()=>{var xe;F.current=Math.min(Re,F.current+1),(xe=ie.current)==null||xe.call(ie)},[Re]),re=s.useCallback((xe,Te)=>{U(me=>{const be=me[xe]??Te,we=(t??[]).filter(X=>X!==be);if(we.length===0)return me;const g=we[Math.floor(Math.random()*we.length)];return{...me,[xe]:g}})},[t]),fe=(xe,Te,me,be)=>{const we=V&&S==="randomize"&&f.display==="cover"?y[me]??xe:xe,g=`max(${E(m)}, ${_f}px)`,X=`calc(-0.5 * (${g} + ${E(m)}))`;return a.jsxs("div",{className:`${r}-marquee-card`,"data-marquee-item-index":me,onMouseEnter:V&&S==="randomize"&&f.display==="cover"?()=>re(me,xe):void 0,children:[a.jsx(qf,{item:we,prefix:r,imageFit:f,imageMaxWidth:h,imageMaxHeight:x,cornerRadius:P,imageHoverClass:B,isEditor:n,isFirstSet:be,scaled:E,onFirstSetImageDone:le}),N&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${r}-gap-control`,style:{position:"absolute",top:0,right:X,width:g,height:"100%"}})]},`${Te}-${me}`)};if(z){const xe=H?A&&Y?"paused":"running":"paused",Te=d>0&&$>0?d/$*1e3:0,me=`${Math.max(0,Te)/1e3}s`;return a.jsxs("div",{ref:j,className:Pt(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Marquee",style:T>0?{height:T}:void 0,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{ref:L,className:`${r}-marquee-track`,"data-direction":v,onMouseEnter:he,onMouseLeave:te,style:{WebkitAnimationDuration:me,animationDuration:me,WebkitAnimationPlayState:xe,animationPlayState:xe},children:Array.from({length:pe},(be,we)=>a.jsx("div",{ref:we===0?C:void 0,className:Pt(`${r}-marquee-row`,`${r}-marquee-set`),style:{gap:E(m),paddingRight:E(m)},"aria-hidden":we>0,children:Se.map((g,X)=>fe(g,we,X,we===0&&X<w))},`set-${we}`))})]})}return a.jsxs("div",{ref:j,className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{className:Pt(`${r}-marquee-row`,`${r}-marquee-static`),style:{gap:E(m),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((xe,Te)=>fe(xe,0,Te))},"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';
@@ -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,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,L=M-f/3,_=W-d(M)*f/3;return`C${q.toFixed(2)} ${z.toFixed(2)} ${L.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.assetId)&&a.jsx("img",{src:e.image.assetId,alt:e.image.name??"",className:`${t}-item-image`,style:d}),p=u&&(l?a.jsx("span",{className:`${t}-item-image-wrap`,"data-marquee-wave-node":!0,children:u}):u),y=l?a.jsx("span",{className:`${t}-text`,style:c,children:Array.from(e.text).map((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:L}=e,_=L??M,G=v==="curve",$=ry(g),I=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,P=V&&p==="on",[A,j]=s.useState(!1),ie=V?P&&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),Le=s.useRef(null),ye=s.useRef(ae),ce=s.useRef(null),K=s.useRef(null),se=s.useRef($),pe=s.useRef(I);ye.current=ae,se.current=$,pe.current=I;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.assetId)??""}\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=Le.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 Pt=Ve>0||vt>0?(vt-pt-(Ve-nt))/2:0;me(At=>Math.abs(At-Pt)>.25?Pt: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 Pt=he*se.current,At=pe.current,wt=At>0?2*Math.PI*At/he:0,Vt=gy(Pt,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,$,I]),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 Pt=vt.firstElementChild;Pt&&Ve.push({inner:Pt,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,Pt=2*Math.PI*vt/pt,At=`${pt}|${Ve}|${Pt}`;if(At!==Ae.lutKey&&(Ae.lutKey=At,Ae.lut=qu(Ve,Pt,Uu)),Math.abs(Ve)<=0||Pt<=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=Pt*Je,dt=Ve*Math.sin(rt),Lt=Ve*Pt*Math.cos(rt),St=Math.atan(Lt)*(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,$,I,h]),s.useLayoutEffect(()=>{var Oe;(Oe=ce.current)==null||Oe.call(ce)},[ae,u]);const ge=Oe=>{P&&Oe.pointerType==="mouse"&&j(!0)},X=()=>{P&&j(!1)},Pe=G?Math.abs($)*100:0,Se=T(_),Z={minHeight:Se,...G?{paddingTop:`${Pe}%`,paddingBottom:`${Pe}%`}:{}},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,I,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:Le,"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 v=p*d,b=v+d;o[p+1]=b,r[p+1]=r[p]+(c(v)+c(b))*.5*d}),{wavelength:i,periodArc:r[n],x:o,s:r}},my=(e,t)=>{const n=qu(e,t,Uu);return!n||n.wavelength<=0?1:n.periodArc/n.wavelength},gy=(e,t)=>{if(e.periodArc<=0)return t;const n=t<0?-1:1,i=Math.abs(t),o=Math.floor(i/e.periodArc),r=i-o*e.periodArc,{s:l,x:c}=e,d=(m,h)=>{if(h-m<=1)return[m,h];const x=m+h>>1;return l[x]<=r?d(x,h):d(m,x)},[u,p]=d(0,l.length-1),v=l[p]-l[u],b=v>0?(r-l[u])/v:0;return n*(o*e.wavelength+c[u]+(c[p]-c[u])*b)},hy=(e,t,n,i,o=0)=>{const r=Math.max(0,n),l=e>0?2*Math.PI*r/e:0,c=h=>i+t*Math.sin(l*h),d=h=>t*l*Math.cos(l*h),u=-o,v=e+o-u,b=Math.max(4,Math.ceil(r*4*(v/Math.max(e,1)))),m=Array.from({length:b},(h,x)=>{const S=u+x/b*v,P=u+(x+1)/b*v,f=P-S,w=c(S),N=c(P),V=S+f/3,B=w+d(S)*f/3,H=P-f/3,_=N-d(P)*f/3;return`C${V.toFixed(2)} ${B.toFixed(2)} ${H.toFixed(2)} ${_.toFixed(2)} ${P.toFixed(2)} ${N.toFixed(2)}`});return[`M${u.toFixed(2)} ${c(u).toFixed(2)}`,...m].join(" ")},fy=({item:e,prefix:t,textCss:n,capHeightPx:i,opticalOffsetY:o,imageGapPx:r,isCurve:l})=>{var m;const c=o!==0?{...n,transform:`translateY(${o}px)`}:n,d=i>0?{height:`${i}px`}:{fontSize:n.fontSize,height:`${ua}em`},u=((m=e.image)==null?void 0:m.assetId)&&a.jsx("img",{src:e.image.assetId,alt:e.image.name??"",className:`${t}-item-image`,style:d}),p=u&&(l?a.jsx("span",{className:`${t}-item-image-wrap`,"data-marquee-wave-node":!0,children:u}):u),v=l?a.jsx("span",{className:`${t}-text`,style:c,children:Array.from(e.text).map((h,x)=>a.jsx("span",{className:`${t}-glyph`,"data-marquee-wave-node":!0,children:a.jsx("span",{className:`${t}-glyph-inner`,children:h===" "?" ":h})},x))}):a.jsx("span",{className:`${t}-text`,style:c,children:e.text}),b=a.jsxs(a.Fragment,{children:[p,v]});return a.jsx("div",{className:`${t}-item`,"data-marquee-text-item":!0,style:{gap:r},children:e.link?a.jsx("a",{href:e.link,className:`${t}-item-link`,style:{gap:r},children:b}):b})},yy=({settings:e,content:t,isEditor:n,isPreviewMode:i})=>{const{prefix:o}=k.useScopedStyles(),[r,l]=s.useState(0),c=r>0?Math.round(r):0,{speed:d,direction:u,pauseOnHover:p,gap:v,layoutType:b,curveAmplitude:m,curveFrequency:h,textFontFamily:x,textFontSettings:S,textFontSize:P,textLetterSpacing:f,textWordSpacing:w,textTextAppearance:N,textColor:V,backgroundColor:B,ribbonWidth:H}=e,_=H??P,z=b==="curve",$=ry(m),E=ay(h),j=s.useMemo(()=>Jf(o,c,z),[o,c,z]),L=s.useMemo(()=>en({fontSettings:{fontFamily:x,fontWeight:S.fontWeight,fontStyle:S.fontStyle},letterSpacing:f,wordSpacing:w,fontSize:P,lineHeight:P,textAppearance:N,color:V},n),[x,S,f,w,P,N,V,n]),C=De=>k.scalingValue(De,n??!1),T=((t==null?void 0:t.length)??0)>0,G=n?!!i:!0,A=T&&(G||!!n),Y=Math.max(0,d)*ey,R=G&&p==="on",[y,U]=s.useState(!1),ee=G?R&&y?"paused":"running":"paused",de=ee==="running"&&Y>0&&c>0,F=c>0&&Y>0?c/Y*1e3:0,ie=s.useRef(null),I=s.useRef(null),se=s.useRef(null),J=s.useRef(null),Se=s.useRef(null),Re=s.useRef(null),pe=s.useRef(de),he=s.useRef(null),te=s.useRef(null),le=s.useRef($),re=s.useRef(E);pe.current=de,le.current=$,re.current=E;const[fe,xe]=s.useState(0),[Te,me]=s.useState(0),[be,we]=s.useState(0),[g,X]=s.useState(0),[Z,ne]=s.useState(0),ye=s.useMemo(()=>(t??[]).map(De=>{var ke;return`${De.text}\0${((ke=De.image)==null?void 0:ke.assetId)??""}\0${De.link??""}`}).join("\0"),[t]),[K,D]=s.useState(ns),ce=s.useMemo(()=>{const De=t??[];return De.length===0||!(G||n)?De:ly(De,K)},[t,G,K,n]),q=A?wc:1;s.useLayoutEffect(()=>{D(ns),l(0)},[ye]),s.useLayoutEffect(()=>{var ze;const De=Re.current;if(!De)return;const ke=()=>{const We=getComputedStyle(De),mt=parseFloat(We.fontSize)||0;if(mt<=0)return;const rt=cy();if(!rt){xe(mt*ua),me(0);return}rt.font=`${We.fontStyle} ${We.fontWeight} ${mt}px ${We.fontFamily}`;const St=rt.measureText("H"),Nt=St.actualBoundingBoxAscent>0?St.actualBoundingBoxAscent:mt*ua,jt=Math.max(0,St.actualBoundingBoxDescent||0),xt=St.fontBoundingBoxAscent||0,Ce=St.fontBoundingBoxDescent||0;xe(lt=>Math.abs(lt-Nt)>.5?Nt:lt);const He=xt>0||Ce>0?(Ce-jt-(xt-Nt))/2:0;me(lt=>Math.abs(lt-He)>.25?He:lt)};ke();const ht=typeof document<"u"?document.fonts:void 0;(ze=ht==null?void 0:ht.ready)==null||ze.then(ke).catch(()=>{});const Be=new ResizeObserver(ke);return Be.observe(De),()=>Be.disconnect()},[L.fontFamily,L.fontWeight,L.fontStyle,L.fontSize,L.lineHeight]),s.useLayoutEffect(()=>{if(!A)return;const De=ie.current,ke=J.current;if(!De||!ke)return;const ht={id:0},Be=()=>{const rt=De.offsetWidth||De.getBoundingClientRect().width,St=ke.offsetWidth||ke.getBoundingClientRect().width;if(T&&rt>0&&St>0){const Nt=St/K;if(Nt>0){let jt=rt,xt=ty;if(z){const He=rt*le.current,lt=re.current,et=lt>0?2*Math.PI*lt/rt:0,yt=my(He,et);jt=Math.max(rt,yt*rt/(wc-1)),xt=ny}const Ce=Math.min(xt,Math.max(ns,Math.ceil(jt/Nt)+1));if(Ce!==K){D(Ce);return}}}St>0&&l(St)},ze=()=>{cancelAnimationFrame(ht.id),ht.id=requestAnimationFrame(Be)};ze();const We=new ResizeObserver(ze);We.observe(De),We.observe(ke);const mt=()=>{document.hidden||ze()};return document.addEventListener("visibilitychange",mt),window.addEventListener("pageshow",mt),window.addEventListener("focus",mt),()=>{cancelAnimationFrame(ht.id),We.disconnect(),document.removeEventListener("visibilitychange",mt),window.removeEventListener("pageshow",mt),window.removeEventListener("focus",mt)}},[A,ye,K,T,fe,z,$,E]),s.useLayoutEffect(()=>{const De=Se.current;if(!De)return;const ke={id:0},ht=()=>{const ze=De.offsetHeight;ze>0&&ne(We=>Math.abs(We-ze)>.5?ze:We)};ke.id=requestAnimationFrame(ht);const Be=new ResizeObserver(()=>{cancelAnimationFrame(ke.id),ke.id=requestAnimationFrame(ht)});return Be.observe(De),()=>{cancelAnimationFrame(ke.id),Be.disconnect()}},[_,n]),s.useLayoutEffect(()=>{if(!z){we(0),X(0);return}const De=ie.current,ke=J.current;if(!De||!ke)return;const ht={id:0},Be=()=>{const We=De.offsetWidth,mt=ke.offsetHeight;We>0&&X(rt=>Math.abs(rt-We)>.5?We:rt),mt>0&&we(rt=>Math.abs(rt-mt)>.5?mt:rt)};ht.id=requestAnimationFrame(Be);const ze=new ResizeObserver(()=>{cancelAnimationFrame(ht.id),ht.id=requestAnimationFrame(Be)});return ze.observe(De),ze.observe(ke),()=>{cancelAnimationFrame(ht.id),ze.disconnect()}},[z,ye,fe,P,A]),s.useLayoutEffect(()=>{if(!A||c<=0)return;const De=se.current;De&&sy(De)},[A,c,u,Y]),s.useLayoutEffect(()=>{if(!z||!T)return;const De=ie.current;if(!De)return;const ke={raf:0,cancelled:!1,lut:null,lutKey:"",itemsCache:[],cacheDirty:!0},ht=()=>{for(const Nt of ke.itemsCache)for(const jt of Nt.glyphs)$c(jt.inner)},Be=()=>{const Nt=I.current??De;ke.itemsCache=Array.from(De.querySelectorAll("[data-marquee-text-item]"),jt=>{const xt=[];return jt.querySelectorAll("[data-marquee-wave-node]").forEach(Ce=>{const He=Ce.firstElementChild;He&&xt.push({inner:He,layoutLocalX:py(Ce,Nt)})}),{item:jt,glyphs:xt}}),ke.cacheDirty=!1},ze=()=>{ke.cacheDirty&&Be();const jt=(I.current??De).offsetWidth||1,xt=jt*le.current,Ce=re.current,He=2*Math.PI*Ce/jt,lt=`${jt}|${xt}|${He}`;if(lt!==ke.lutKey&&(ke.lutKey=lt,ke.lut=qu(xt,He,Uu)),Math.abs(xt)<=0||He<=0){ht();return}const et=se.current,yt=et?uy(getComputedStyle(et).transform):0,Rt=De.getBoundingClientRect(),At=Rt.left,qt=Rt.right,$t=ke.lut&&ke.lut.wavelength>0?Math.max(0,(ke.lut.periodArc/ke.lut.wavelength-1)*jt):0;for(const{item:zt,glyphs:on}of ke.itemsCache){const vt=zt.getBoundingClientRect();if(vt.right<At||vt.left>qt+$t){for(const ft of on)$c(ft.inner);continue}for(const ft of on){const Me=ft.layoutLocalX+yt,nt=ke.lut?gy(ke.lut,Me):Me,ct=He*nt,gt=xt*Math.sin(ct),Et=xt*He*Math.cos(ct),wt=Math.atan(Et)*(180/Math.PI);dy(ft.inner,nt-Me,gt,wt)}}},We=()=>{ke.cancelled||(ke.raf=0,ze(),pe.current&&!document.hidden&&(ke.raf=requestAnimationFrame(We)))},mt=()=>{ke.cancelled||ke.raf||(ke.raf=requestAnimationFrame(We))},rt=()=>{ke.cacheDirty=!0,ze(),mt()};he.current=mt,te.current=rt,ze(),mt();const St=()=>{if(document.hidden){cancelAnimationFrame(ke.raf),ke.raf=0;return}cancelAnimationFrame(ke.raf),ke.raf=0,rt()};return document.addEventListener("visibilitychange",St),window.addEventListener("pageshow",St),window.addEventListener("focus",St),()=>{ke.cancelled=!0,he.current=null,te.current=null,cancelAnimationFrame(ke.raf),document.removeEventListener("visibilitychange",St),window.removeEventListener("pageshow",St),window.removeEventListener("focus",St),ht()}},[z,T]),s.useLayoutEffect(()=>{var De;!z||!T||(De=te.current)==null||De.call(te)},[z,T,r,ye,K,fe,$,E,g]),s.useLayoutEffect(()=>{var De;(De=he.current)==null||De.call(he)},[de,u]);const ue=De=>{R&&De.pointerType==="mouse"&&U(!0)},W=()=>{R&&U(!1)},Le=z?Math.abs($)*100:0,ae=C(_),Q={minHeight:ae,...z?{paddingTop:`${Le}%`,paddingBottom:`${Le}%`}:{}},Ne={height:ae,...z?{visibility:"hidden"}:{backgroundColor:B}},Oe={gap:C(v),minHeight:ae},it=g*$,qe=Math.abs(it),Je=Z>0?Z:be,ot=Math.max(be,Je),Ve=qe+ot/2,ve=Math.max(Je,1),Fe=z&&g>0&&ot>0?hy(g,it,E,Ve,ve):"",Xe=qe*2+ot,Ye=Fe?a.jsx("svg",{className:`${o}-curve-bg`,viewBox:`0 0 ${g} ${Xe}`,preserveAspectRatio:"none","aria-hidden":!0,children:a.jsx("path",{d:Fe,fill:"none",stroke:B,strokeWidth:Je,strokeLinecap:"butt",strokeLinejoin:"round"})}):null,Pe=a.jsx("div",{ref:Se,className:`${o}-ribbon`,style:Ne,"aria-hidden":!0}),_e={...L,lineHeight:fe>0?`${fe}px`:`${ua}em`},Ke=(De,ke,ht)=>a.jsx(fy,{item:De,prefix:o,textCss:_e,capHeightPx:fe,opticalOffsetY:Te,imageGapPx:C(v),isCurve:z},`${ke}-${ht}`),Ze=a.jsx("span",{ref:Re,"aria-hidden":!0,className:`${o}-cap-ref`,style:L,children:"H"}),st=`${Math.max(0,F)/1e3}s`,Ue=A?a.jsx("div",{ref:se,className:`${o}-marquee-track`,"data-direction":u,onPointerEnter:ue,onPointerLeave:W,style:{WebkitAnimationDuration:st,animationDuration:st,WebkitAnimationPlayState:ee,animationPlayState:ee},children:Array.from({length:q},(De,ke)=>a.jsx("div",{ref:ke===0?J:void 0,className:`${o}-marquee-set`,style:{...Oe,paddingRight:C(v)},"aria-hidden":ke>0,children:ce.map((ht,Be)=>Ke(ht,ke,Be))},`set-${ke}`))}):a.jsx("div",{ref:J,className:Pt(`${o}-marquee-set`,`${o}-marquee-static`),style:Oe,children:t==null?void 0:t.map((De,ke)=>Ke(De,0,ke))});return a.jsxs("div",{ref:ie,className:`${o}-wrapper`,"aria-label":"Marquee text",children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:j}}),Ze,a.jsxs("div",{ref:I,className:`${o}-marquee-wrapper`,style:Q,children:[Pe,Ye,Ue]})]})},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';
@@ -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:M,logoWidth:f,logoHeight:S,captionMarginTop:W}=e,q=!!o,z=((t==null?void 0:t.length)??0)>0,L=c>0&&(!n||i),_=z&&(L||n),G=Math.max(0,c)*$y,$=R=>F.scalingValue(R,n??!1),I=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,P=s.useMemo(()=>wy(r,U),[r,U]),[A,j]=s.useState(0),ie=L&&u==="on",[ae,O]=s.useState(!1),re=s.useRef(null),[N,le]=s.useState(0),[J,be]=s.useState(0),Le=s.useRef(null),ye=R=>{var te,ge,X,Pe,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:((Pe=e==null?void 0:e[`${R}TextAppearance`])==null?void 0:Pe.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=I.current,ee=E.current;if(!R||!ee)return;let te=0;const ge=()=>{const Se=R.getBoundingClientRect().width,Z=ee.getBoundingClientRect().width,He=Le.current,We=typeof He=="number"&&Math.abs(He-Z)<=.25;if(Le.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 Pe=new ResizeObserver(X);return Pe.observe(R),Pe.observe(ee),()=>{cancelAnimationFrame(te),Pe.disconnect()}},[L,_,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 Pe=0;Pe<R.children.length;Pe++){const Z=R.children[Pe].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,Pe;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.assetId)&&a.jsx("img",{src:R.logo.assetId,alt:((X=R.logo)==null?void 0:X.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Pe=R.logo)==null?void 0:Pe.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=L?ie&&ae?"paused":"running":"paused";return a.jsxs("div",{ref:I,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:P}}),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:P}}),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))})]})},Iy=`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}=k.useScopedStyles(),{align:l,speed:c,direction:d,pauseOnHover:u,gap:p,cardWidth:v,corners:b,stroke:m,strokeColor:h,bgColor:x,padding:S,logoMarginTop:P,logoWidth:f,logoHeight:w,captionMarginTop:N}=e,V=!!o,B=((t==null?void 0:t.length)??0)>0,H=c>0&&(!n||i),_=B&&(H||n),z=Math.max(0,c)*$y,$=D=>k.scalingValue(D,n??!1),E=s.useRef(null),j=s.useRef(null),L=s.useRef(null),[C,T]=s.useState(0),[G,A]=s.useState(0),Y=G>0?G:0,R=s.useMemo(()=>wy(r,Y),[r,Y]),[y,U]=s.useState(0),ee=H&&u==="on",[de,F]=s.useState(!1),ie=s.useRef(null),[I,se]=s.useState(0),[J,Se]=s.useState(0),Re=s.useRef(null),pe=D=>{var q,ue,W,Le,ae;return{fontSettings:{fontFamily:(e==null?void 0:e[`${D}FontFamily`])??"Arial",fontWeight:((q=e==null?void 0:e[`${D}FontSettings`])==null?void 0:q.fontWeight)??400,fontStyle:((ue=e==null?void 0:e[`${D}FontSettings`])==null?void 0:ue.fontStyle)??"normal"},textAppearance:{textTransform:((W=e==null?void 0:e[`${D}TextAppearance`])==null?void 0:W.textTransform)??"none",textDecoration:((Le=e==null?void 0:e[`${D}TextAppearance`])==null?void 0:Le.textDecoration)??"none",fontVariant:((ae=e==null?void 0:e[`${D}TextAppearance`])==null?void 0:ae.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${D}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${D}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${D}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${D}LineHeight`])??.01,color:(e==null?void 0:e[`${D}Color`])??"#000000"}},he=pe("text"),te=pe("caption"),le=s.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(D=>{var ce,q;return(((ce=D.text)==null?void 0:ce.length)??0)>0||(((q=D.caption)==null?void 0:q.length)??0)>0}),[t]),re=s.useMemo(()=>!_||(t==null?void 0:t.length)===0?1:G<=0||C<=0?Cc:Math.max(Cc,Math.ceil(C/G)+1),[_,t==null?void 0:t.length,G,C]);s.useLayoutEffect(()=>{if(!_)return;const D=E.current,ce=L.current;if(!D||!ce)return;let q=0;const ue=()=>{const ae=D.getBoundingClientRect().width,Q=ce.getBoundingClientRect().width,Ne=Re.current,Oe=typeof Ne=="number"&&Math.abs(Ne-Q)<=.25;if(Re.current=Q,T(ae),typeof Q=="number"&&Q>0&&G<=0){A(Q);return}Oe&&Q!==G?A(Q):!Oe&&G<=0&&(cancelAnimationFrame(q),q=requestAnimationFrame(ue))},W=()=>{cancelAnimationFrame(q),q=requestAnimationFrame(ue)};W();const Le=new ResizeObserver(W);return Le.observe(D),Le.observe(ce),()=>{cancelAnimationFrame(q),Le.disconnect()}},[H,_,G]);const fe=Y>0&&z>0?Y/z*1e3:0,xe=`${Math.max(0,fe)/1e3}s`;s.useLayoutEffect(()=>{if(!_||Y<=0)return;const D=j.current;D&&Cy(D)},[_,Y,d]),s.useLayoutEffect(()=>{if(!_){U(0);return}const D=L.current,ce=j.current;if(!D||!ce)return;const q=()=>{let W=0;for(let Le=0;Le<D.children.length;Le++){const Q=D.children[Le].firstElementChild;Q&&(W=Math.max(W,Q.offsetHeight))}W<=0&&(W=ce.offsetHeight),U(W>0?W:0)};q();const ue=new ResizeObserver(q);return ue.observe(D),ue.observe(ce),()=>{ue.disconnect()}},[_,re,t,n,p,v,S,m,b,f,w,I,J]);const Te=()=>{ee&&F(!0)},me=()=>{ee&&F(!1)},be=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),we=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]),g=s.useCallback((D,ce,q,ue)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:be,width:"100%"},children:[a.jsx("div",{"data-controls":V?ue==null?void 0:ue.controlsName:void 0,"data-controls-axis":V?"y":void 0,className:V?`${r}-control`:void 0,style:{height:$((ue==null?void 0:ue.marginTop)??0)}}),a.jsx("div",{...ue!=null&&ue.dataMeasureKind?{"data-testimonial-measure":ue.dataMeasureKind}:{},style:{...en(D,n),textAlign:we,pointerEvents:"auto",...typeof(ue==null?void 0:ue.minHeightPx)=="number"&&ue.minHeightPx>0?{minHeight:ue.minHeightPx}:{}},children:a.jsx(Yi,{content:ce})})]},q),[be,we,n,V,r,$]),X=s.useCallback((D,ce,q)=>{var ue,W,Le;return a.jsxs("div",{style:{padding:`${$(S.top)} ${$(S.right)} ${$(S.bottom)} ${$(S.left)}`,width:$(v+m*2),height:"100%",borderRadius:$(b),border:`${$(m)} solid ${h}`,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:be,textAlign:we},children:[D.text&&g(he,D.text,"text",q!=null&&q.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(q==null?void 0:q.textMinHeightPx)=="number"&&q.textMinHeightPx>0?{minHeightPx:q.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:be,width:"100%"},children:[a.jsx("div",{"data-controls":V&&!(q!=null&&q.dataMeasureAttrs)?"logoMarginTop":void 0,className:V&&!(q!=null&&q.dataMeasureAttrs)?`${r}-control`:void 0,style:{height:$(P)}}),a.jsx("div",{style:{width:$(f),height:$(w)},children:((ue=D.logo)==null?void 0:ue.assetId)&&a.jsx("img",{src:D.logo.assetId,alt:((W=D.logo)==null?void 0:W.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Le=D.logo)==null?void 0:Le.objectFit)||"contain"}})})]}),D.caption&&g(te,D.caption,"caption",{...q!=null&&q.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:N,...q!=null&&q.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(q==null?void 0:q.captionMinHeightPx)=="number"&&q.captionMinHeightPx>0?{minHeightPx:q.captionMinHeightPx}:{}})]})]},ce)},[x,N,te,v,b,w,P,f,be,we,S.bottom,S.left,S.right,S.top,g,m,h,he,n,V,r]),Z=s.useCallback(D=>{se(D.maxTextPx),Se(D.maxCaptionPx)},[]);s.useLayoutEffect(()=>{if(!le){Z({maxTextPx:0,maxCaptionPx:0});return}const D=ie.current;if(!D)return;const ce=()=>{k.readTestimonialTextMeasure(D,Z)};ce();const q=new ResizeObserver(ce);return q.observe(D),()=>{q.disconnect()}},[le,Z,t,X]);const ne=le?{textMinHeightPx:I,captionMinHeightPx:J}:void 0,ye=le?a.jsx("div",{ref:ie,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((D,ce)=>X(D,`measure-${ce}`,{dataMeasureAttrs:!0}))}):null,K=(D,ce)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[X(D,`card-${ce}`,ne),V&&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}})]},ce);if(_){const D=H?ee&&de?"paused":"running":"paused";return a.jsxs("div",{ref:E,className:Pt(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...y>0?{height:y}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:R}}),ye,a.jsx("div",{ref:j,className:`${r}-marquee-track`,"data-direction":d,onMouseEnter:Te,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:xe,WebkitAnimationDuration:xe,animationPlayState:D,WebkitAnimationPlayState:D},children:Array.from({length:re},(ce,q)=>a.jsx("div",{ref:q===0?L:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:$(p),paddingRight:$(p)},"aria-hidden":q>0,children:t==null?void 0:t.map((ue,W)=>K(ue,`${q}-${W}`))},`set-${q}`))})]})}return a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:R}}),ye,a.jsx("div",{style:{gap:$(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((D,ce)=>K(D,ce))})]})},Iy=`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';
@@ -4411,7 +4411,7 @@ type TestimonialsSettings = {
4411
4411
  width: 100%;
4412
4412
  height: 100%;
4413
4413
  }
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),[L,_]=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]),I=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),[P,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:I,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.assetId)&&a.jsx("img",{src:(Re=ye.image)==null?void 0:Re.assetId,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:I,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 Le=w?{textMinHeightPx:P,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&&L&&a.jsx("div",{className:Ct(`${r}-fade-item-prev`,`${r}-fade-out`),children:J(E,{...Le,hideControls:!0})}),a.jsx("div",{className:Ct(`${r}-fade-item-current`,L?`${r}-fade-in`:void 0),children:J(D,Le)})]})]}),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';
4414
+ `}const My=3e3,Ey=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=k.useScopedStyles(),l=t||[],{speed:c,align:d,width:u,imageMarginTop:p,textMarginTop:v,captionMarginTop:b,imageWidth:m,imageHeight:h,controlsWidth:x,controlsColor:S,controlsHoverColor:P}=e,f=c>0&&(!n||!!i),[w,N]=s.useState(0),[V,B]=s.useState(null),[H,_]=s.useState(!1),z=s.useRef(null),$=s.useMemo(()=>{switch(d){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[d]),E=s.useMemo(()=>{switch(d){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[d]);s.useEffect(()=>{N(0),B(null),_(!1)},[l.length]);const j=l[w],L=V===null?null:l[V],C=pe=>{var te,le,re,fe,xe;return{fontSettings:{fontFamily:(e==null?void 0:e[`${pe}FontFamily`])??"Arial",fontWeight:((te=e==null?void 0:e[`${pe}FontSettings`])==null?void 0:te.fontWeight)??400,fontStyle:((le=e==null?void 0:e[`${pe}FontSettings`])==null?void 0:le.fontStyle)??"normal"},textAppearance:{textTransform:((re=e==null?void 0:e[`${pe}TextAppearance`])==null?void 0:re.textTransform)??"none",textDecoration:((fe=e==null?void 0:e[`${pe}TextAppearance`])==null?void 0:fe.textDecoration)??"none",fontVariant:((xe=e==null?void 0:e[`${pe}TextAppearance`])==null?void 0:xe.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${pe}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${pe}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${pe}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${pe}WordSpacing`])??0,color:(e==null?void 0:e[`${pe}Color`])??"#000000"}},T=C("text"),G=C("caption"),A=l.length>1&&l.some(pe=>{var he,te;return(((he=pe.text)==null?void 0:he.length)??0)>0||(((te=pe.caption)==null?void 0:te.length)??0)>0}),Y=s.useRef(null),[R,y]=s.useState(0),[U,ee]=s.useState(0),de=e.controls??{mode:"Off",icon:null},F=l.length>1,ie=s.useCallback((pe,he)=>!F||he===pe?pe:(z.current&&window.clearTimeout(z.current),B(pe),_(!0),z.current=window.setTimeout(()=>{B(null),_(!1),z.current=null},300),he),[F]),I=s.useCallback(()=>{F&&N(pe=>ie(pe,(pe-1+l.length)%l.length))},[F,ie,l.length]),se=s.useCallback(()=>{F&&N(pe=>ie(pe,(pe+1)%l.length))},[F,ie,l.length]);s.useEffect(()=>{if(!f||!F)return;const pe=Math.max(300,My/c),he=window.setInterval(()=>{N(te=>ie(te,(te+1)%l.length))},pe);return()=>{window.clearInterval(he)}},[f,F,ie,l.length,c]),s.useEffect(()=>()=>{z.current&&window.clearTimeout(z.current)},[]);const J=(pe,he)=>{var xe,Te,me,be;const te=he==null?void 0:he.textMinHeightPx,le=he==null?void 0:he.captionMinHeightPx,re=he==null?void 0:he.dataMeasureAttrs,fe=o&&!(he!=null&&he.dataMeasureAttrs)&&!(he!=null&&he.hideControls);return a.jsxs(a.Fragment,{children:[pe.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:k.scalingValue(v??0,n??!1)}}),a.jsx("div",{...re&&{"data-testimonial-measure":"text"},style:{...en(T,n),...te&&te>0?{minHeight:te}:{},textAlign:E,pointerEvents:"auto"},children:a.jsx(Yi,{content:pe.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:k.scalingValue(p??0,n??!1)}}),a.jsx("div",{style:{width:k.scalingValue(m??0,n??!1),height:k.scalingValue(h??0,n??!1)},children:((xe=pe.image)==null?void 0:xe.assetId)&&a.jsx("img",{src:(Te=pe.image)==null?void 0:Te.assetId,alt:((me=pe.image)==null?void 0:me.name)??"",className:`${r}-icon`,style:{objectFit:((be=pe.image)==null?void 0:be.objectFit)||"contain"}})})]}),pe.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:k.scalingValue(b??0,n??!1)}}),a.jsx("div",{...re?{"data-testimonial-measure":"caption"}:{},style:{...en(G,n),...le&&le>0?{minHeight:le}:{},textAlign:E,pointerEvents:"auto"},children:a.jsx(Yi,{content:pe.caption})})]})]})},Se=s.useCallback(pe=>{y(pe.maxTextPx),ee(pe.maxCaptionPx)},[]);if(s.useLayoutEffect(()=>{if(!A){Se({maxTextPx:0,maxCaptionPx:0});return}const pe=Y.current;if(!pe)return;const he=()=>{k.readTestimonialTextMeasure(pe,Se)};he();const te=new ResizeObserver(he);return te.observe(pe),()=>{te.disconnect()}},[A,Se,t]),!j)return a.jsx(a.Fragment,{});const Re=A?{textMinHeightPx:R,captionMinHeightPx:U}: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:k.scalingValue(u??0,n??!1),alignItems:$},children:[A&&a.jsx("div",{ref:Y,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((pe,he)=>a.jsx("div",{style:{width:"100%"},children:J(pe,{dataMeasureAttrs:!0})},he))}),a.jsxs("div",{className:`${r}-fade-stack`,children:[L&&H&&a.jsx("div",{className:Pt(`${r}-fade-item-prev`,`${r}-fade-out`),children:J(L,{...Re,hideControls:!0})}),a.jsx("div",{className:Pt(`${r}-fade-item-current`,H?`${r}-fade-in`:void 0),children:J(j,Re)})]})]}),de.mode==="On"&&a.jsxs("div",{className:`${r}-controls`,children:[a.jsx("div",{className:`${r}-arrow`,style:{width:k.scalingValue(x??.02,n??!1),height:k.scalingValue(x??.02,n??!1),"--arrow-hover-color":P},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:I,disabled:!F,"aria-label":"Previous testimonial",children:de.icon&&a.jsx(mn,{url:de.icon,fill:S,hoverFill:P,className:Pt(`${r}-arrow-img`,`${r}-mirror`)})})}),a.jsx("div",{className:Pt(`${r}-arrow`,`${r}-next-arrow`),style:{width:k.scalingValue(x??.02,n??!1),height:k.scalingValue(x??.02,n??!1),"--arrow-hover-color":P},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:se,disabled:!F,"aria-label":"Next testimonial",children:de.icon&&a.jsx(mn,{url:de.icon,fill:S,hoverFill:P,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",Ic={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Fy={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Controls Default",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Ic.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Caption Default"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Ic.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Default"}},defaults:{controls:{mode:"On",icon: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",assetId:"01M3QM74XFE5YFEHBH605E8FXT",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XFZD1R3FV8BKW3NT24",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XGNPA7232QGZAYFNSS",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},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.assetId",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 Lc(e){return((e==null?void 0:e.trim().length)??0)>0}function is(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function os(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:F.scalingValue((o-t)/2,i)}}function Hy(e){return`
4910
+ `,Ay="01M46GNEM3GEJ4HQSNJYYTA45T",Ic={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Fy={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Controls Default",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Ic.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Caption Default"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Ic.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Default"}},defaults:{controls:{mode:"On",icon: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",assetId:"01M3QM74XFE5YFEHBH605E8FXT",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XFZD1R3FV8BKW3NT24",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XGNPA7232QGZAYFNSS",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},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.assetId",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 Lc(e){return((e==null?void 0:e.trim().length)??0)>0}function is(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function os(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:k.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.assetId?n:t!=null&&t.assetId?t:null}function Xy(e){const[t]=e.media;return t!=null&&t.assetId?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.assetId?i:null}]}):e.filter(t=>t==null?void 0:t.assetId).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.assetId&&!t.has(l.assetId)&&(t.add(l.assetId),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.assetId,preload:"auto",muted:!0,playsInline:!0},t.assetId):a.jsx("img",{src:t.assetId,alt:""},t.assetId))})}function Yy(e){e.pause(),e.removeAttribute("src"),e.load()}function Pc({media:e,className:t,style:n,onMediaClick:i}){return Xi(e)?a.jsx("video",{src:e.assetId,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):a.jsx("img",{src:e.assetId,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function 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),L=s.useRef(!1),_=s.useRef(null),G=s.useRef(null),$=s.useRef(null),I=s.useRef(()=>{}),[D,E]=s.useState(null),[T,C]=s.useState(null),[V,w]=s.useState("opening"),[U,P]=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),[Le,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,L.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,L.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),L.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(L.current){if(G.current===$e){$.current=$e,xe();return}Ce()}me(),z.current=$e,ae($e),L.current=!1,re(!1),q.current=0,j(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Y($e,!0)})})}},[t.length,Y,xe,Ce,me]);I.current=Q;const ne=s.useCallback($e=>{$e.propertyName!=="transform"||!L.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.assetId)||(me(),G.current=null,ae(null),P(0),j(0),re(!1),be(!1),le(!1),ye(null),x.current=0,b.current=0,M.current="none",f.current=!1,L.current=!1,q.current=0,z.current=null,m.current=null,S.current=!1,ce.current=n,K.current=se==null?void 0:se.assetId)},[n,se==null?void 0:se.assetId,me]),s.useLayoutEffect(()=>{const $e=$.current;$e!==null&&($.current=null,requestAnimationFrame(()=>{I.current($e)}))},[n,se==null?void 0:se.assetId]),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||L.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||L.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,P(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),P(De),w("closing")}else x.current=0,P(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,Le):null,Pe=$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.assetId,muted:!0,playsInline:!0,preload:"auto",style:ze},`neighbor-${Ge}-${ve.assetId}`):a.jsx("img",{src:ve.assetId,alt:ve.name,style:ze},`neighbor-${Ge}-${ve.assetId}`)}),D&&T&&se&&a.jsx("div",{style:qe,onTransitionEnd:ne,children:pe?a.jsx(Qy,{src:se.assetId,phase:V,mediaRef:g,mediaStyle:tt,onLoadedMetadata:Re,onClick:Pe,onMouseMove:Se},`${n}-${se.assetId}`):a.jsx("img",{ref:g,src:se.assetId,alt:se.name,onLoad:Re,style:tt},`${n}-${se.assetId}`)}),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:L,subtitleMarginTop:_,titleColor:G,subtitleColor:$,lightboxCounterColor:I,titleFontFamily:D,titleFontSettings:E,titleFontSize:T,titleLineHeight:C,titleLetterSpacing:V,titleWordSpacing:w,titleTextAppearance:U,subtitleFontFamily:P,subtitleFontSettings:A,subtitleFontSize:j,subtitleLineHeight:ie,subtitleLetterSpacing:ae,subtitleWordSpacing:O,subtitleTextAppearance:re,lightboxCounterFontFamily:N,lightboxCounterFontSettings:le,lightboxCounterFontSize:J,lightboxCounterLineHeight:be,lightboxCounterLetterSpacing:Le,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:P,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:Le??0,wordSpacing:ye??0,textAppearance:ce,color:I},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:I},tv,nv),Pe=`${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 Pt=(()=>{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} ${Pe}`.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=Lc(xt.title),Je=Lc(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,Lt=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(L??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(L??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(L??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],Ie=H?Gt.findIndex(je=>je.assetId===H.assetId):-1;return a.jsx(Pc,{media:ut,className:`${u}-item-${Xi(ut)?"video":"image"}`.trim(),style:Me,onMediaClick:Rt&&Ie>=0?()=>zt(Gt,Ie):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.assetId,muted:!0,playsInline:!0},`sizer-${ut.assetId}`):a.jsx("img",{src:ut.assetId,alt:""},`sizer-${ut.assetId}`))}),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},Ie)=>{const je=H?Gt.findIndex(Fe=>Fe.assetId===H.assetId):-1;return a.jsx(kl,{children:a.jsx(Pc,{media:ut,className:`${u}-item-${Xi(ut)?"video":"image"}`.trim(),style:Me,onMediaClick:Rt&&je>=0?()=>zt(Gt,je):void 0})},Ie)})},`${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(L??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:Lt&&!Ue?{gridColumn:Lt}: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,...Lt&&Ue?{gridColumn:Lt}:{}},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:Pt,"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.assetId?n:t!=null&&t.assetId?t:null}function Xy(e){const[t]=e.media;return t!=null&&t.assetId?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.assetId?i:null}]}):e.filter(t=>t==null?void 0:t.assetId).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.assetId&&!t.has(l.assetId)&&(t.add(l.assetId),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.assetId,preload:"auto",muted:!0,playsInline:!0},t.assetId):a.jsx("img",{src:t.assetId,alt:""},t.assetId))})}function Yy(e){e.pause(),e.removeAttribute("src"),e.load()}function Pc({media:e,className:t,style:n,onMediaClick:i}){return Xi(e)?a.jsx("video",{src:e.assetId,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):a.jsx("img",{src:e.assetId,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function 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",v=s.useRef(null),b=s.useRef(null),m=s.useRef(null),h=s.useRef(null),x=s.useRef(0),S=s.useRef(0),P=s.useRef("none"),f=s.useRef(!1),w=s.useRef(!1),N=s.useRef(null),V=s.useRef(0),B=s.useRef(null),H=s.useRef(!1),_=s.useRef(null),z=s.useRef(null),$=s.useRef(null),E=s.useRef(()=>{}),[j,L]=s.useState(null),[C,T]=s.useState(null),[G,A]=s.useState("opening"),[Y,R]=s.useState(0),[y,U]=s.useState(0),[ee,de]=s.useState(null),[F,ie]=s.useState(!1),[I,se]=s.useState(!1),[J,Se]=s.useState(!1),[Re,pe]=s.useState(null),he=s.useRef(n),te=s.useRef(void 0),le=t[n],re=le?Xi(le):!1,fe=y!==0||F,xe=ee!==null,Te=s.useCallback(Pe=>{const _e=Pe.currentTarget,Ke=_e instanceof HTMLVideoElement?{width:_e.videoWidth,height:_e.videoHeight}:{width:_e.naturalWidth,height:_e.naturalHeight};!Ke.width||!Ke.height||pe(Ke)},[]);s.useEffect(()=>{N.current=C},[C]),s.useEffect(()=>{const Pe=v.current;if(!Pe)return;const _e=()=>T(Rc(Pe));_e();const Ke=new ResizeObserver(_e);return Ke.observe(Pe),()=>Ke.disconnect()},[]);const me=s.useCallback(()=>{_.current!==null&&(window.clearTimeout(_.current),_.current=null)},[]),be=s.useCallback(()=>{const Pe=z.current;z.current=null,me(),B.current=null,H.current=!1,de(null),ie(!1),U(0),V.current=0,se(!1),f.current=!1,S.current=0,P.current="none",Pe===1?c():Pe===-1&&l()},[me,c,l]),we=s.useCallback(()=>{me(),z.current=null,B.current=null,H.current=!1,de(null),ie(!1),U(0),V.current=0},[me]),g=s.useCallback(()=>{me(),_.current=window.setTimeout(()=>{z.current!==null&&be()},An+32)},[me,be]),X=s.useCallback((Pe,_e)=>{var Ze;const Ke=((Ze=N.current)==null?void 0:Ze.width)??0;if(me(),B.current=Pe,de(Pe),H.current=!0,ie(!0),_e){z.current=Pe;const st=-Pe*Ke;V.current=st,U(st),g();return}V.current=0,U(0),_.current=window.setTimeout(()=>{_.current=null,we()},An+32)},[me,we,g]),Z=s.useCallback(Pe=>{if(!(t.length<=1)){if(H.current){if(z.current===Pe){$.current=Pe,be();return}we()}me(),B.current=Pe,de(Pe),H.current=!1,ie(!1),V.current=0,U(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{X(Pe,!0)})})}},[t.length,X,be,we,me]);E.current=Z;const ne=s.useCallback(Pe=>{Pe.propertyName!=="transform"||!H.current||z.current!==null&&be()},[be]),ye=s.useCallback(()=>{const Pe=b.current;if(!Pe)return;const _e=Rc(Pe);!_e.width||!_e.height||L(_e)},[]);s.useEffect(()=>{ye();const Pe=b.current;if(!Pe)return;const _e=new ResizeObserver(()=>ye());return _e.observe(Pe),()=>_e.disconnect()},[ye]),s.useEffect(()=>{G==="opening"&&j&&A("open")},[G,j]),s.useEffect(()=>{if(G!=="closing")return;const Pe=setTimeout(()=>r(),An);return()=>clearTimeout(Pe)},[G,r]),s.useEffect(()=>()=>{me()},[me]),s.useLayoutEffect(()=>{he.current===n&&te.current===(le==null?void 0:le.assetId)||(me(),z.current=null,de(null),R(0),U(0),ie(!1),Se(!1),se(!1),pe(null),x.current=0,S.current=0,P.current="none",f.current=!1,H.current=!1,V.current=0,B.current=null,h.current=null,w.current=!1,he.current=n,te.current=le==null?void 0:le.assetId)},[n,le==null?void 0:le.assetId,me]),s.useLayoutEffect(()=>{const Pe=$.current;Pe!==null&&($.current=null,requestAnimationFrame(()=>{E.current(Pe)}))},[n,le==null?void 0:le.assetId]),s.useEffect(()=>{if(G!=="open")return;let Pe=null;const _e=()=>{Pe&&(document.removeEventListener("click",Pe,!0),Pe=null)},Ke=()=>{_e(),Pe=ke=>{ke.stopPropagation(),ke.preventDefault(),_e()},document.addEventListener("click",Pe,!0)},Ze=ke=>{const ht=ke<0?1:-1;if(Math.abs(ke)>jy&&t.length>1){X(ht,!0);return}X(ht,!1)},st=ke=>{if(ke.touches.length!==1||H.current)return;const ht=ke.touches[0];w.current=!0,h.current={x:ht.clientX,y:ht.clientY},P.current="none",S.current=0,f.current=!1},Ue=ke=>{if(!h.current||ke.touches.length!==1||H.current)return;const ht=ke.touches[0],Be=ht.clientX-h.current.x,ze=ht.clientY-h.current.y;if(P.current==="none"){if(Math.abs(Be)<10&&Math.abs(ze)<10)return;if(Math.abs(Be)>Math.abs(ze)){if(t.length<=1)return;P.current="horizontal"}else if(ze>0)P.current="vertical";else return}if(P.current==="horizontal"){f.current=!0,se(!0),S.current=Be;const We=Be<0?1:-1;B.current!==We&&(B.current=We,de(We)),V.current=Be,U(Be),ke.preventDefault();return}P.current==="vertical"&&(f.current=!0,se(!0),x.current=ze,R(ze),ke.preventDefault())},De=()=>{if(!h.current)return;const ke=P.current,ht=f.current;if(ht&&ke==="horizontal")Ze(S.current),Ke();else if(ht&&ke==="vertical")if(x.current>zy){const ze=window.innerHeight;x.current=ze,Se(!0),R(ze),A("closing")}else x.current=0,R(0),Ke();else ke==="horizontal"&&Math.abs(S.current)>0&&(Ze(S.current),Ke());h.current=null,P.current="none",S.current=0,f.current=!1,se(!1)};return document.addEventListener("touchstart",st,{passive:!0}),document.addEventListener("touchmove",Ue,{passive:!1}),document.addEventListener("touchend",De),document.addEventListener("touchcancel",De),()=>{document.removeEventListener("touchstart",st),document.removeEventListener("touchmove",Ue),document.removeEventListener("touchend",De),document.removeEventListener("touchcancel",De),_e()}},[G,t.length,X]),s.useEffect(()=>{const Pe=_e=>{_e.key==="Escape"&&(_e.preventDefault(),_e.stopPropagation(),G!=="closing"&&A("closing"))};return window.addEventListener("keydown",Pe,!0),()=>window.removeEventListener("keydown",Pe,!0)},[G]);const K=()=>{G!=="closing"&&A("closing")},D=G==="open",ce=G==="closing",q=Y>0?Math.max(0,1-Y/500):1,ue=Y>0?Math.max(.35,1-Y/500):1,W=j?p?j:Ky(j,Re):null,Le=Pe=>{if(Pe.stopPropagation(),w.current){w.current=!1;return}if(t.length<=1)return;const _e=W??Pe.currentTarget.getBoundingClientRect(),Ke=Pe.clientY-_e.top,Ze=Math.min(52,_e.height*.2);if(!(Ke>_e.height-Ze)){if(Pe.clientX-_e.left<_e.width/2){Z(-1);return}Z(1)}},ae=Pe=>{if(t.length<=1)return;const _e=W??Pe.currentTarget.getBoundingClientRect(),Ke=Pe.clientX-_e.left,Ze=Pe.clientY-_e.top,st=Math.min(52,_e.height*.2);if(Ze>_e.height-st){Pe.currentTarget.style.cursor="default";return}Pe.currentTarget.style.cursor=Ke<_e.width/2?"w-resize":"e-resize"},Q={position:"fixed",top:C==null?void 0:C.top,left:C==null?void 0:C.left,width:C==null?void 0:C.width,height:C==null?void 0:C.height,zIndex:9998},Ne=p?"cover":"contain",Oe=y!==0||Y>0?`translate(${y}px, ${Y}px)`:void 0,it=I&&!F?"none":F?`transform ${An}ms ${pi}`:J?`transform ${An}ms ${pi}, opacity ${An}ms ${pi}`:G==="opening"||ce?`opacity ${An}ms ${pi}`:"none",qe={...Q,transform:Oe,opacity:Y>0?ue:G==="opening"||ce?0:1,transition:it,pointerEvents:"none"},Je={position:"absolute",top:((W==null?void 0:W.top)??0)-((C==null?void 0:C.top)??0),left:((W==null?void 0:W.left)??0)-((C==null?void 0:C.left)??0),width:W==null?void 0:W.width,height:W==null?void 0:W.height,objectFit:Ne,pointerEvents:re&&D&&!fe?"auto":"none",touchAction:re&&D?"none":void 0},ot=(C==null?void 0:C.width)??0,Ve=xe?(n+ee+t.length)%t.length:null,ve=Ve!==null?t[Ve]:null,Fe={...Q,transform:xe?`translateX(${ee*ot+y}px)`:void 0,opacity:1,transition:F?`transform ${An}ms ${pi}`:"none",pointerEvents:"none"},Xe={position:"absolute",top:((j==null?void 0:j.top)??0)-((C==null?void 0:C.top)??0),left:((j==null?void 0:j.left)??0)-((C==null?void 0:C.left)??0),width:j==null?void 0:j.width,height:j==null?void 0:j.height,objectFit:Ne,pointerEvents:"none"},Ye=W?{position:"fixed",top:W.top,height:W.height,width:W.width/2,zIndex:9999}:null;return a.jsxs("div",{ref:v,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:G==="open"?"none":void 0},onClick:K,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:D?q:0,transition:I?"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:b,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:D?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:b,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:D?1:0,transition:`opacity ${An}ms ${pi}`},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]})}),j&&C&&ve&&a.jsx("div",{style:Fe,onTransitionEnd:ne,children:Xi(ve)?a.jsx("video",{src:ve.assetId,muted:!0,playsInline:!0,preload:"auto",style:Xe},`neighbor-${Ve}-${ve.assetId}`):a.jsx("img",{src:ve.assetId,alt:ve.name,style:Xe},`neighbor-${Ve}-${ve.assetId}`)}),j&&C&&le&&a.jsx("div",{style:qe,onTransitionEnd:ne,children:re?a.jsx(Qy,{src:le.assetId,phase:G,mediaRef:m,mediaStyle:Je,onLoadedMetadata:Te,onClick:Le,onMouseMove:ae},`${n}-${le.assetId}`):a.jsx("img",{ref:m,src:le.assetId,alt:le.name,onLoad:Te,style:Je},`${n}-${le.assetId}`)}),D&&Ye&&t.length>1&&!re&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Ye,left:W.left,cursor:"w-resize",pointerEvents:I?"none":"auto"},onClick:Pe=>{if(w.current){w.current=!1;return}Pe.stopPropagation(),Z(-1)}}),a.jsx("div",{style:{...Ye,left:W.left+W.width/2,cursor:"e-resize",pointerEvents:I?"none":"auto"},onClick:Pe=>{if(w.current){w.current=!1;return}Pe.stopPropagation(),Z(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}=k.useScopedStyles(),{type:p="a",gridLayout:v,textBoxWidth:b=100,verticalGap:m,entriesCount:h,lightbox:x,imageDisplay:S,imageCorners:P,lightboxImageDisplay:f,slider:w,sliderTiming:N,direction:V,transition:B,titleMarginTop:H,subtitleMarginTop:_,titleColor:z,subtitleColor:$,lightboxCounterColor:E,titleFontFamily:j,titleFontSettings:L,titleFontSize:C,titleLineHeight:T,titleLetterSpacing:G,titleWordSpacing:A,titleTextAppearance:Y,subtitleFontFamily:R,subtitleFontSettings:y,subtitleFontSize:U,subtitleLineHeight:ee,subtitleLetterSpacing:de,subtitleWordSpacing:F,subtitleTextAppearance:ie,lightboxCounterFontFamily:I,lightboxCounterFontSettings:se,lightboxCounterFontSize:J,lightboxCounterLineHeight:Se,lightboxCounterLetterSpacing:Re,lightboxCounterWordSpacing:pe,lightboxCounterTextAppearance:he,showText:te="always",alignEntries:le="off",align:re="top"}=e,fe={fontSettings:{fontFamily:j,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:C??.01,lineHeight:T,letterSpacing:G??0,wordSpacing:A??0,textAppearance:Y,color:z},Te={...un(en(fe,n))},me={fontSettings:{fontFamily:R,fontWeight:(y==null?void 0:y.fontWeight)??400,fontStyle:(y==null?void 0:y.fontStyle)??"normal"},fontSize:U??.01,lineHeight:ee,letterSpacing:de??0,wordSpacing:F??0,textAppearance:ie,color:$},we={...un(en(me,n))},g={fontSettings:{fontFamily:I,fontWeight:(se==null?void 0:se.fontWeight)??400,fontStyle:(se==null?void 0:se.fontStyle)??"normal"},fontSize:J??.01,lineHeight:Se,letterSpacing:Re??0,wordSpacing:pe??0,textAppearance:he,color:E},Z={...un(en(g,n)),...os(J,Se,u,n)},ne=is(C,T,`${u}-item-title`,`${u}-text-tight-leading`),ye=is(U,ee,`${u}-item-subtitle`,`${u}-text-tight-leading`),K=os(C,T,u,n),D=os(U,ee,u,n),ce=is(J,Se,`${u}-lightbox-counter`,`${u}-text-tight-leading`),q=k.buildColorVars(u,{titleColor:z,subtitleColor:$,lightboxCounterColor:E},tv,nv),Le=`${l&&l!=="default"?`${u}-state-${l}`:""}${te==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),ae=h===0?1/0:h,Q=(t??[]).slice(0,ae),Ne=s.useMemo(()=>x==="on"?Uy(Q):[],[Q,x]),Oe=v.entryWidth??.2,it=(S==null?void 0:S.display)==="cover",qe=(S==null?void 0:S.ratioValue)??"1:1",Je=(S==null?void 0:S.reversed)??!1,[ot,Ve]=qe.split(":").map(Number),Xe=`${Je?Ve:ot} / ${Je?ot:Ve}`,Ye=v.columnsCount,Pe=k.scalingValue(Oe??0,n),_e=Pe,Ke=!it&&w!=="off",Ze=Q.length%Ye||Ye,st=Ze<Ye&&Q.length>0,Ue=Q.length-Ze,De=st?Math.floor((Ye-Ze)/2)+1:1,ke=P?k.scalingValue(P,n):void 0,ht={width:_e,...it?{aspectRatio:Xe,height:"auto",overflow:"hidden"}:{height:"auto"},...ke?{borderRadius:ke,overflow:"hidden"}:{}},Be=`${u}-item-image-wrapper${Ke?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),ze=p==="d"||p==="e"||p==="f",We=le==="on",mt=`calc(${k.scalingValue(Oe??0,n)} * (${b} / 100))`,rt=k.scalingValue(Oe*b/100,n),St=it?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...ke?{borderRadius:ke}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...ke?{borderRadius:ke}:{}},[Nt,jt]=s.useState(0),xt=s.useRef(null),Ce=B==="fade"||V==="horizontal"?"ltr":V==="vertical"?"ttb":"ltr";s.useEffect(()=>{const vt=xt.current;if(!vt)return;const ft=new ResizeObserver(Me=>{jt(Math.round(Me[0].contentRect.width))});return ft.observe(vt),()=>ft.disconnect()},[]);const He=(()=>{const vt={...q},ft=xt.current?getComputedStyle(xt.current).getPropertyValue("--cntrl-article-width").trim():"";return ft&&(vt["--cntrl-article-width"]=ft),vt})(),[lt,et]=s.useState(!1),[yt,Rt]=s.useState([]),[At,qt]=s.useState(0),$t=x==="on"&&(!n||i),zt=(vt,ft)=>{n&&!i||x!=="off"&&(Rt(vt),qt(ft),et(!0))};s.useEffect(()=>{if(!lt||x!=="on"||typeof document>"u")return;const vt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=vt}},[lt,x]),s.useEffect(()=>{!n||i||et(!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:Ne}),a.jsx("div",{style:q,children:a.jsx("div",{ref:xt,className:`${u}-wrapper ${u}-type-${p}${We?` ${u}-align-entries`:""} ${u}-image-align-${re} ${Le}`.trim(),style:{gridTemplateColumns:`repeat(${Ye}, ${Pe})`,rowGap:We?0:k.scalingValue(m??0,n),columnGap:k.scalingValue(v.horizontalGap??0,n),width:k.scalingValue(v.wrapperWidth??0,n),...We?{[`--${u}-align-entries-row-gap`]:k.scalingValue(m??0,n)}:{}},children:Q.map((vt,ft)=>{var Dt;const Me=Lc(vt.title),nt=Lc(vt.subtitle),ct=(((Dt=vt.link)==null?void 0:Dt.length)??0)>0&&x==="off"?vt.link:void 0,gt=Math.floor(ft/Ye)===Math.ceil(Q.length/Ye)-1,Et=st&&ft>=Ue?`${De+(ft-Ue)}`:void 0,wt=ze?a.jsxs("div",{className:`${u}-item-text-block`,children:[Me&&a.jsx("p",{className:ne,style:{width:mt,...Te,...K},children:vt.title}),Me&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:k.scalingValue(H??0,n),width:rt}}),nt&&a.jsx("p",{className:ye,style:{width:mt,...we,...D},children:vt.subtitle}),nt&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:k.scalingValue(_??0,n),width:rt}})]}):null,dt=We?a.jsxs("div",{className:`${u}-item-title-row`,children:[!ze&&a.jsx("div",{"data-controls":o&&Me?"titleMarginTop":void 0,className:o&&Me?`${u}-control`:void 0,style:{height:Me?k.scalingValue(H??0,n):0,width:rt}}),Me&&a.jsx("p",{className:ne,style:{width:mt,...Te,...K},children:vt.title}),ze&&Me&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:k.scalingValue(H??0,n),width:rt}})]}):null,Ot=We?a.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!ze&&a.jsx("div",{"data-controls":o&&nt?"subtitleMarginTop":void 0,className:o&&nt?`${u}-control`:void 0,style:{height:nt?k.scalingValue(_??0,n):0,width:rt}}),nt&&a.jsx("p",{className:ye,style:{width:mt,...we,...D},children:vt.subtitle}),ze&&nt&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:k.scalingValue(_??0,n),width:rt}})]}):null,Lt=ct?a.jsxs("a",{href:ct,target:"_blank",className:`${u}-item-text-link`,children:[dt,Ot]}):a.jsxs(a.Fragment,{children:[dt,Ot]}),Ht=Yu(vt.gallery),Gt=Ht.filter(Ct=>Ct.lightboxMedia).map(Ct=>Ct.lightboxMedia),_t=a.jsx("div",{className:Be,style:ht,children:Ht.length===0?null:w==="off"?(()=>{const{displayMedia:Ct,lightboxMedia:O}=Ht[0],Ie=O?Gt.findIndex(je=>je.assetId===O.assetId):-1;return a.jsx(Pc,{media:Ct,className:`${u}-item-${Xi(Ct)?"video":"image"}`.trim(),style:St,onMediaClick:$t&&Ie>=0?()=>zt(Gt,Ie):void 0})})():a.jsxs(a.Fragment,{children:[Ke&&a.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Ht.map(({displayMedia:Ct})=>Xi(Ct)?a.jsx("video",{src:Ct.assetId,muted:!0,playsInline:!0},`sizer-${Ct.assetId}`):a.jsx("img",{src:Ct.assetId,alt:""},`sizer-${Ct.assetId}`))}),a.jsx(El,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:N*1e3,width:"100%",height:"100%",speed:By,type:B==="fade"?"fade":"loop",rewind:B==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:Ce},onMoved:Ct=>{V!=="random"||B==="fade"||Dy(Ct)},children:Ht.map(({displayMedia:Ct,lightboxMedia:O},Ie)=>{const je=O?Gt.findIndex(Ae=>Ae.assetId===O.assetId):-1;return a.jsx(kl,{children:a.jsx(Pc,{media:Ct,className:`${u}-item-${Xi(Ct)?"video":"image"}`.trim(),style:St,onMediaClick:$t&&je>=0?()=>zt(Gt,je):void 0})},Ie)})},`${B}-${Oe}-${V}-${N}-${Nt}-${c}`)]})}),Vt=ze?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":o&&Me?"titleMarginTop":void 0,className:o&&Me?`${u}-control`:void 0,style:{height:Me?k.scalingValue(H??0,n):0,width:rt}}),a.jsx("p",{className:ne,style:{width:mt,...Te,...K},children:vt.title}),a.jsx("div",{"data-controls":o&&nt?"subtitleMarginTop":void 0,className:o&&nt?`${u}-control`:void 0,style:{height:nt?k.scalingValue(_??0,n):0,width:rt}}),a.jsx("p",{className:ye,style:{width:mt,...we,...D},children:vt.subtitle})]});return a.jsx("div",{className:`${u}-item`.trim(),style:Et&&!We?{gridColumn:Et}:void 0,children:a.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${We&&gt?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(b??0)>100?`calc(${Pe} * (${b} / 100))`:Pe,...Et&&We?{gridColumn:Et}:{}},children:We?a.jsx(a.Fragment,{children:ze?a.jsxs(a.Fragment,{children:[Lt,a.jsx("a",{href:ct,target:"_blank",className:`${u}-item-image-link`,children:_t})]}):a.jsxs(a.Fragment,{children:[a.jsx("a",{href:ct,target:"_blank",className:`${u}-item-image-link`,children:_t}),Lt]})}):ct?a.jsxs(a.Fragment,{children:[a.jsxs("a",{href:ct,target:"_blank",className:`${u}-item-image-link`,children:[wt,_t]}),!ze&&a.jsx("a",{href:ct,target:"_blank",className:`${u}-item-text-link`,children:Vt})]}):a.jsxs(a.Fragment,{children:[wt,_t,Vt]})})},ft)})})}),(!n||i)&&lt&&typeof document<"u"&&x==="on"&&(()=>{const vt=(d?document.getElementById(d):null)??document.body;return Xn.createPortal(a.jsx("div",{style:He,"data-selection":"none",children:a.jsx(Zy,{prefix:u,items:yt,index:At,imageDisplay:Jy(f),isEditor:n,onClose:()=>et(!1),onPrev:()=>qt(ft=>(ft-1+yt.length)%yt.length),onNext:()=>qt(ft=>(ft+1)%yt.length),counterClassName:ce,counterStyle:Z})}),vt)})()]})}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:{assetId:{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:[{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Salton Sea from Above",subtitle:"Hasselblad 500 EL / Zeiss Sonnar 250 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XERA3G7J0J00XVKEXX",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module Pilot",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module 3 porch",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Command Module",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEZCK8SJPAFXCKG8QN",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"CSM and Lunar Module LM",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"David R. Scott during EVA",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Fourth day of the mission",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XES6MX14JTT1CF24BB",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Landing of the Spider1",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEMGJWCYNPZ3ETQTKM",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""}]},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.assetId",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)`,Io=e=>((e==null?void 0:e.image)??[]).slice(0,uv),Zu=e=>e.reduce((t,n)=>t+Io(n).length,0),pv=(e,t)=>{const n=e.slice(0,t).reduce((o,r)=>o+Io(r).length,1),i=Io(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)=>Io(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Io(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,Ln=.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},Lo=(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)=>Lo(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:Lo(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),Li=["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(Li.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),L=F.scalingValue(b,i),_=F.scalingValue(g,i),G=m==="mobile",$=zi("title1",Bi(n,"title1"),i),I=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,$,I,D),[e,t,$,I,D]),V=s.useMemo(()=>C.map(X=>E[X.widthKey]),[C,E]),w=s.useMemo(()=>Lo(C.length,V),[C.length,V]),U=s.useMemo(()=>vr(C.length,V),[C.length,V]),P=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(P,E),[P,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,Pe)=>{const Se=C.findIndex(He=>He.prefix===X.prefix);if(!G||Pe==="single-row")return{effectiveWidth:U[Se]??0,resolvedWidth:w[Se]??0,maxWidth:yn(Se,w)};if(Pe==="two-row-top"){const He=P.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,Pe,Se)=>{if(!G||Se==="single-row"){const qe=X.findIndex(ve=>ve.prefix===Pe.prefix),tt=X.map(ve=>E[ve.widthKey]),et=Lo(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===Pe.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===Pe.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),Le=()=>G?0:p??0,ye=X=>A.slice(0,X).reduce((Pe,Se,Z)=>Pe+(Se.marginLeftKey?T[Se.marginLeftKey]??0:0)+(ie.resolved[Z]??0),0),ce=X=>{const Pe=A[X];return ye(X)+(Pe.marginLeftKey?T[Pe.marginLeftKey]??0:0)+(ie.resolved[X]??0)},K=(X,Pe,Se)=>{const Z=X.marginLeftKey?T[X.marginLeftKey]??0:0,{effectiveWidth:He,resolvedWidth:We,maxWidth:ot}=Se??le(X,Pe),qe=Math.max(Z,ni),tt=o&&Pe==="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(-Ln/2,i),width:F.scalingValue(Ln,i),height:"100%",pointerEvents:"auto"}}):null]},X.className)},se=(X="two-row")=>{const Pe=C.findIndex(He=>He.prefix==="title1"),Se=Pe>=0?w[Pe]: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 Pe=wi(e,X,$,I,D);return a.jsx(a.Fragment,{children:Pe.map(Se=>K(Se,"single-row",J(Pe,Se,"single-row")))})},we=X=>{const Pe=wi(e,X,$,I,D),Se=Pe.find(Z=>Z.prefix==="title1");return Se?K(Se,"two-row-top",J(Pe,Se,"two-row-top")):null},Re=(X,Pe=!1)=>{const Se=wi(e,X,$,I,D),Z=Se.filter(ot=>ot.prefix==="title2"||ot.prefix==="title3"),He=o&&Pe;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")))}),Pe&&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:L,"--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:L,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,Pe=!1)=>a.jsxs(a.Fragment,{children:[h(we(X)),Re(X,Pe)]}),Q=()=>{const X=G?-1:C.findIndex(Z=>Z.prefix==="title1"),Pe=!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)+Le(),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 Pe?[Pe,...Se]:Se},ne=()=>C.map((X,Pe)=>{const Se=yn(Pe,w),He=be(Pe)-Ln/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(Ln,i),height:"100%",pointerEvents:"auto"}})},`${X.widthKey}-junction`)}),ue=()=>A.flatMap((X,Pe)=>{if(!X.marginLeftKey)return[];const Se=T[X.marginLeftKey]??0,Z=ye(Pe),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,Pe)=>{const{maxWidth:Se}=le(X,"two-row-bottom"),He=ce(Pe)-Ln/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(Ln,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`
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:{assetId:{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:[{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Salton Sea from Above",subtitle:"Hasselblad 500 EL / Zeiss Sonnar 250 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XERA3G7J0J00XVKEXX",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module Pilot",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module 3 porch",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Command Module",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEZCK8SJPAFXCKG8QN",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"CSM and Lunar Module LM",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"David R. Scott during EVA",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Fourth day of the mission",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XES6MX14JTT1CF24BB",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Landing of the Spider1",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEMGJWCYNPZ3ETQTKM",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""}]},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.assetId",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)`,Io=e=>((e==null?void 0:e.image)??[]).slice(0,uv),Zu=e=>e.reduce((t,n)=>t+Io(n).length,0),pv=(e,t)=>{const n=e.slice(0,t).reduce((o,r)=>o+Io(r).length,1),i=Io(e[t]).length;return{start:n,end:n+i-1}},mv=(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)=>Io(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Io(n)})),gv=(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 mv(i,o)},Fc=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",hv=(e,t,n)=>e==="B"?t.length>1:Zu(n)>1,Ln=.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},Lo=(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)=>Lo(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:Lo(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),Li=["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(Li.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:v=0,title3MarginLeft:b=0,titleRowMarginBottom:m=0,titleHeaderLayout:h="desktop",contentMarginTop:x=0,iconMarginRight:S=0,closeIcon:P=null,closeIconMaxWidth:f=0,closeIconColor:w="#000000",closeIconHoverColor:N="#cccccc"}=n,V=k.scalingValue(x,i),B=k.scalingValue(Math.max(x,ni),i),H=k.scalingValue(S,i),_=k.scalingValue(m,i),z=h==="mobile",$=zi("title1",Bi(n,"title1"),i),E=zi("title2",Bi(n,"title2"),i),j=zi("title3",Bi(n,"title3"),i),L=s.useMemo(()=>({title1Width:c??bo.title1Width,title2Width:d??bo.title2Width,title3Width:u??bo.title3Width}),[c,d,u]),C=s.useMemo(()=>({title2MarginLeft:v,title3MarginLeft:b}),[v,b]),T=s.useMemo(()=>wi(e,t,$,E,j),[e,t,$,E,j]),G=s.useMemo(()=>T.map(W=>L[W.widthKey]),[T,L]),A=s.useMemo(()=>Lo(T.length,G),[T.length,G]),Y=s.useMemo(()=>vr(T.length,G),[T.length,G]),R=s.useMemo(()=>T.filter(W=>W.prefix==="title1"),[T]),y=s.useMemo(()=>T.filter(W=>W.prefix==="title2"||W.prefix==="title3"),[T]),U=s.useMemo(()=>$i(R,L),[R,L]),ee=s.useMemo(()=>$i(y,L),[y,L]),de=!!(t.title1||t.title2||t.title3),F=P!==null;if(!(de||F))return null;const I=(p??0)>0||o,se=(W,Le)=>{const ae=T.findIndex(Ne=>Ne.prefix===W.prefix);if(!z||Le==="single-row")return{effectiveWidth:Y[ae]??0,resolvedWidth:A[ae]??0,maxWidth:yn(ae,A)};if(Le==="two-row-top"){const Ne=R.findIndex(Oe=>Oe.prefix===W.prefix);return{effectiveWidth:U.effective[Ne]??0,resolvedWidth:U.resolved[Ne]??0,maxWidth:yn(Ne,U.resolved)}}const Q=y.findIndex(Ne=>Ne.prefix===W.prefix);return{effectiveWidth:ee.effective[Q]??0,resolvedWidth:ee.resolved[Q]??0,maxWidth:yn(Q,ee.resolved)}},J=(W,Le,ae)=>{if(!z||ae==="single-row"){const qe=W.findIndex(ve=>ve.prefix===Le.prefix),Je=W.map(ve=>L[ve.widthKey]),ot=Lo(W.length,Je);return{effectiveWidth:vr(W.length,Je)[qe]??0,resolvedWidth:ot[qe]??0,maxWidth:yn(qe,ot)}}if(ae==="two-row-top"){const qe=W.filter(ve=>ve.prefix==="title1"),Je=qe.findIndex(ve=>ve.prefix===Le.prefix),{resolved:ot,effective:Ve}=$i(qe,L);return{effectiveWidth:Ve[Je]??0,resolvedWidth:ot[Je]??0,maxWidth:yn(Je,ot)}}const Q=W.filter(qe=>qe.prefix==="title2"||qe.prefix==="title3"),Ne=Q.findIndex(qe=>qe.prefix===Le.prefix),{resolved:Oe,effective:it}=$i(Q,L);return{effectiveWidth:it[Ne]??0,resolvedWidth:Oe[Ne]??0,maxWidth:yn(Ne,Oe)}},Se=W=>ep(T,A,C,W)+(z?0:p??0),Re=()=>z?0:p??0,pe=W=>y.slice(0,W).reduce((Le,ae,Q)=>Le+(ae.marginLeftKey?C[ae.marginLeftKey]??0:0)+(ee.resolved[Q]??0),0),he=W=>{const Le=y[W];return pe(W)+(Le.marginLeftKey?C[Le.marginLeftKey]??0:0)+(ee.resolved[W]??0)},te=(W,Le,ae)=>{const Q=W.marginLeftKey?C[W.marginLeftKey]??0:0,{effectiveWidth:Ne,resolvedWidth:Oe,maxWidth:it}=ae??se(W,Le),qe=Math.max(Q,ni),Je=o&&Le==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":W.prefix,style:{width:k.scalingValue(Ne,i),...Q>0?{marginLeft:k.scalingValue(Q,i)}:{}},children:[a.jsx("p",{className:W.className,style:W.style,children:W.text}),Je&&W.marginLeftKey?a.jsx("div",{"data-controls":W.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Oe),style:{position:"absolute",top:0,left:k.scalingValue(-Q,i),width:k.scalingValue(qe,i),height:"100%",pointerEvents:"auto"}}):null,Je?a.jsx("div",{"data-controls":W.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(it),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:k.scalingValue(-Ln/2,i),width:k.scalingValue(Ln,i),height:"100%",pointerEvents:"auto"}}):null]},W.className)},le=(W="two-row")=>{const Le=T.findIndex(Ne=>Ne.prefix==="title1"),ae=Le>=0?A[Le]:L.title1Width,Q=W==="two-row"&&o;return a.jsx("div",{...Q?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ae)}:{},style:{width:k.scalingValue(p??0,i),flexShrink:0,alignSelf:"stretch",...Q?{pointerEvents:"auto"}:{}}})},re=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:$,"aria-hidden":"true",children:" "}),fe=W=>{const Le=wi(e,W,$,E,j);return a.jsx(a.Fragment,{children:Le.map(ae=>te(ae,"single-row",J(Le,ae,"single-row")))})},xe=W=>{const Le=wi(e,W,$,E,j),ae=Le.find(Q=>Q.prefix==="title1");return ae?te(ae,"two-row-top",J(Le,ae,"two-row-top")):null},Te=(W,Le=!1)=>{const ae=wi(e,W,$,E,j),Q=ae.filter(it=>it.prefix==="title2"||it.prefix==="title3"),Ne=o&&Le;return Q.length>0||Ne||(m??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[Q.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[a.jsx("div",{className:`${e}-titles-stack`,children:Q.map(it=>te(it,"two-row-bottom",J(ae,it,"two-row-bottom")))}),Le&&o?a.jsxs(a.Fragment,{children:[ye(),K()]}):null]}):null,(m??0)>0||Ne?a.jsx("div",{"data-controls":Ne?"titleRowMarginBottom":void 0,"data-controls-axis":Ne?"y":void 0,"data-controls-reverse":Ne?"":void 0,className:Ne?`${e}-control`:void 0,style:{height:_,width:"100%",flexShrink:0,pointerEvents:Ne?"auto":"none"}}):null]}):null},me=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:k.scalingValue(f??0,i),height:k.scalingValue(f??0,i),marginRight:H,"--close-icon-hover-color":N},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:W=>{W.stopPropagation(),l==null||l()},"aria-label":"Close",children:a.jsx(mn,{url:P??"",fill:w,hoverFill:i&&!r?w:N,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:H,height:"100%",pointerEvents:"auto"}})]}),be=()=>F?a.jsx("div",{className:`${e}-titles-row-header-controls`,children:me()}):null,we=W=>a.jsx("div",{className:`${e}-titles-row-titles`,children:a.jsx("div",{className:`${e}-titles-stack`,children:W})}),g=W=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[F||de?re():null,I?le("two-row"):null,we(W),be()]}),X=(W,Le=!1)=>a.jsxs(a.Fragment,{children:[g(xe(W)),Te(W,Le)]}),Z=()=>{const W=z?-1:T.findIndex(Q=>Q.prefix==="title1"),Le=!z&&(o||(p??0)>0)?(()=>{const Q=p??0,Ne=W>=0?A[W]:L.title1Width,Oe=Math.max(Q,ni);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ne),style:{position:"absolute",top:0,left:0,width:k.scalingValue(Oe,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,ae=T.flatMap((Q,Ne)=>{if(!Q.marginLeftKey)return[];const Oe=C[Q.marginLeftKey]??0,it=Ju(T,A,C,Ne)+Re(),qe=Math.max(Oe,ni);return a.jsx("div",{"data-controls":Q.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(A[Ne]),style:{position:"absolute",top:0,left:k.scalingValue(it,i),width:k.scalingValue(qe,i),height:"100%",pointerEvents:"auto"}},Q.marginLeftKey)});return Le?[Le,...ae]:ae},ne=()=>T.map((W,Le)=>{const ae=yn(Le,A),Ne=Se(Le)-Ln/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":W.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ae),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:k.scalingValue(Ne,i),width:k.scalingValue(Ln,i),height:"100%",pointerEvents:"auto"}})},`${W.widthKey}-junction`)}),ye=()=>y.flatMap((W,Le)=>{if(!W.marginLeftKey)return[];const ae=C[W.marginLeftKey]??0,Q=pe(Le),Ne=Math.max(ae,ni),{resolvedWidth:Oe}=se(W,"two-row-bottom");return a.jsx("div",{"data-controls":W.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Oe),style:{position:"absolute",top:0,left:k.scalingValue(Q,i),width:k.scalingValue(Ne,i),height:"100%",pointerEvents:"auto"}},W.marginLeftKey)}),K=()=>y.map((W,Le)=>{const{maxWidth:ae}=se(W,"two-row-bottom"),Ne=he(Le)-Ln/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":W.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ae),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:k.scalingValue(Ne,i),width:k.scalingValue(Ln,i),height:"100%",pointerEvents:"auto"}})},`${W.widthKey}-junction`)}),D=()=>!o||z?null:a.jsxs(a.Fragment,{children:[Z(),ne()]}),ce=!!(t.title2||t.title3||(m??0)>0||o),q=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[F||de?re():null,I?le("single-row"):null,de?we(fe(t)):a.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),be(),D()]}),ue=()=>a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...ce?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:ce?void 0:{flex:"0 0 auto",height:"auto"},children:X(t,!0)}),D()]});return a.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:V,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:B,pointerEvents:"auto"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...z?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${z?` ${e}-lightbox-content-area-stacked`:""}`,children:a.jsx("div",{className:`${e}-text-bar-cell${z?` ${e}-text-bar-cell-stacked`:""}`,style:z?void 0:{flex:1,minWidth:0,width:"100%"},children:z?ue():q()})})})]})}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={assetId:"",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 Iv(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 Lv(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?np(i,n):null}function Pv(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.assetId,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.assetId,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.assetId,n.naturalWidth,n.naturalHeight)},n.src=e.assetId}function 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.assetId&&!t.has(c.assetId)&&(t.add(c.assetId),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.assetId,preload:"auto",muted:!0,playsInline:!0},t.assetId):a.jsx("img",{src:t.assetId,alt:""},t.assetId))})}function Po(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=Po(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=Po(e,"left",i),r=Po(e,"right",i),l=wa(e,"left",i),c=wa(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:c,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:c};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function _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=Po(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.assetId?t:void 0,o=n!=null&&n.assetId?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.assetId?n:t!=null&&t.assetId?t:null}function Ov(e){const[t]=e.media;return t!=null&&t.assetId?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.assetId?o:null})}return t}return e.filter(t=>t==null?void 0:t.assetId).map(t=>({displayMedia:t,lightboxMedia:t}))}function Bo(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.assetId)}function Dv({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return Bo(e)?a.jsx("video",{src:e.assetId,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onClick:o}):a.jsx("img",{src:e.assetId,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function 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.assetId,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.assetId,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.assetId,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.assetId,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function zv({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,canNavigate:d,lightboxEntries:u,entryIdx:p,layoutId:y,sourceRect: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),L=s.useRef(null),_=s.useRef(0),G=s.useRef(0),$=s.useRef("none"),I=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),P=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"),[Le,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),Pe=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,Ie)=>t.length<=1?null:t[(H+Ie+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.assetId!==(Ge==null?void 0:Ge.assetId)?_e:null,$e=ze&&ze.assetId!==(ve==null?void 0:ve.assetId)?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.assetId!==Ge.assetId?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.assetId!==ve.assetId?H:null})():null,Ze=Qe??Ne,st=$e??Ye,it=s.useCallback((H,Ie,je)=>{if(!H||!Ie||!je)return;const Fe=W.current,ft=Fe.get(H);(ft==null?void 0:ft.width)===Ie&&(ft==null?void 0:ft.height)===je||(Fe.set(H,{width:Ie,height:je}),z(Ht=>Ht+1))},[]),Oe=s.useCallback(H=>{if(!(H!=null&&H.assetId))return null;const Ie=W.current.get(H.assetId);return Ev(f.current,Ie)},[q,N]),Ae=s.useCallback(()=>{if(!Z)return;const H=Oe(Z);if(H){ae(H);return}const Ie=f.current;Ie&&ae(Hc(Ie))},[Z,Oe]),mt=s.useCallback(H=>{if(tt){const Ie=u.length;me((p+H+Ie)%Ie),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 Ie=H.getBoundingClientRect();re({left:Ie.left,top:Ie.top,width:Ie.width,height:Ie.height})},[]),he=s.useCallback((H,Ie)=>{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,Ie,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),I.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),I.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,P.current!==null&&(window.clearInterval(P.current),P.current=null),A.current!==null&&(window.clearTimeout(A.current),A.current=null)},[]),Pt=s.useCallback(H=>{P.current!==null&&window.clearInterval(P.current);const Ie=j.current?Tv:Cv;P.current=window.setInterval(()=>{w.current(H)},Ie)},[]),At=s.useCallback(H=>{U.current!==H&&(vt(),U.current=H,j.current=!1,w.current(H),Pt(H),A.current=window.setTimeout(()=>{A.current=null,U.current===H&&(j.current=!0,Pt(H))},$v))},[vt,Pt]),wt=s.useCallback(()=>{const H=f.current;if(!H)return;const Ie=Z==null?void 0:Z.assetId,je=Ie?W.current.get(Ie):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&&Ie&&(Fe.src===Ie||Fe.currentSrc===Ie)){const{width:Ht,height:gt}=Mv(Fe);if(Ht&&gt){it(Ie,Ht,gt),ae(Xs(H,Ht,gt));return}}const ft=Hc(H);!ft.width||!ft.height||ae(ft)},[Z==null?void 0:Z.assetId,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,Ie=M.current,je=new ResizeObserver(()=>jt());return H&&je.observe(H),Ie&&je.observe(Ie),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.assetId,n,wt]),s.useEffect(()=>{Ae()},[Ae,q]),s.useEffect(()=>{const H=new Set,Ie=[],je=Fe=>{!(Fe!=null&&Fe.assetId)||H.has(Fe.assetId)||(H.add(Fe.assetId),Ie.push(Fe))};t.forEach(je),u.forEach(Fe=>Fe.items.forEach(je)),Ie.forEach(Fe=>{W.current.has(Fe.assetId)||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(()=>{Pe.current===n&&Se.current===(Z==null?void 0:Z.assetId)||(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",I.current=!1,L.current=null,D.current=!1,S.current=null,Ae(),Pe.current=n,Se.current=Z==null?void 0:Z.assetId)},[n,Z==null?void 0:Z.assetId,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.assetId]),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.assetId,ve==null?void 0:ve.assetId]),s.useEffect(()=>{if(J!=="open")return;const H=()=>{const gt=It=>{It.stopPropagation(),It.preventDefault(),document.removeEventListener("click",gt,!0)};document.addEventListener("click",gt,!0)},Ie=gt=>{const It=gt<0?1:-1;De(),mt(It),C.current=It,we(It),Be(!0),nt()},je=gt=>{if(Math.abs(gt)>wv&&qe){Ie(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 It=gt.touches[0];D.current=!0,L.current={x:It.clientX,y:It.clientY},$.current="none",G.current=0,I.current=!1},ft=gt=>{if(!L.current||gt.touches.length!==1||E.current)return;const It=gt.touches[0],qt=It.clientX-L.current.x,Dt=It.clientY-L.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"){I.current=!0,te(!0),G.current=qt,K(qt),gt.preventDefault();return}$.current==="vertical"&&(I.current=!0,te(!0),_.current=Dt,ye(Dt),gt.preventDefault())},Ht=()=>{if(!L.current)return;const gt=$.current,It=I.current;if(It&&gt==="horizontal")je(G.current),H();else if(It&&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());L.current=null,$.current="none",G.current=0,I.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)},Ie=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",Ie),window.addEventListener("blur",je),()=>{window.removeEventListener("keydown",H),window.removeEventListener("keyup",Ie),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=Le>0?Math.max(0,1-Le/500):1,xt=Le>0?Math.max(.35,1-Le/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)?Iv(ke,ie):void 0,rt=We&&Z?he(Z,"center"):Le>0?`translateY(${Le}px)`:Je,dt=ie?zr(ie,O):null,Lt=!!(ke&&ie),St=Lt&&(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:Le>0?xt:Lt?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,Ie,je="adjacent")=>{const Fe=Oe(H);if(!Fe)return{display:"none"};const ft=je==="far"?Ie==="left"?"far-left":"far-right":Ie==="left"?"left-adjacent":"right-adjacent",{start:Ht}=fe!==null?op(Fe,ft,fe,O):{start:je==="far"?wa(Fe,Ie,O):Po(Fe,Ie,O)},gt=zr(Ht,O),It=he(H,ft),qt=!We&&je==="adjacent"&&Rt&&!ue?Hv(Fe,Ie,O):null,Dt=je==="far"&&We&&fe===(Ie==="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:It??(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,Ie)=>{const je=Oe(H);return je?Nv(Po(je,Ie,O),Ie,O):null},Gt=H=>Ie=>{if(!l){if(D.current){D.current=!1;return}Ie.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.assetId}`),Rt&&Ge&&a.jsxs(a.Fragment,{children:[a.jsx(jr,{media:Ge,style:Tt(Ge,"left"),onMeasure:it,onTransitionEnd:yt},`prev-${Ge.assetId}`),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.assetId}`),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.assetId}`),ie&&Z&&(He?a.jsx(Bv,{src:Z.assetId,phase:J,onMediaElement:Vt,wrapperStyle:ht,videoStyle:Wt,onLoadedMetadata:wt,onTransitionEnd:yt},`${n}-${Z.assetId}`):a.jsx("img",{ref:Vt,src:Z.assetId,alt:Z.name,onLoad:wt,onTransitionEnd:yt,style:ht},`${n}-${Z.assetId}`))]})}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),L=F.scalingValue(d.horizontalGap??0,n),_=z,G=z,$={width:_,...v?{aspectRatio:S,height:"auto",overflow:"hidden"}:{height:"auto"}},I=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),[P,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,Le=be<q&&J.length>0,ye=J.length-be,ce=Le?Math.floor((q-be)/2)+1:1,K=s.useMemo(()=>Pv(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[P];return!xe||!D.current?j:Lv(D.current,xe.gridIndex,v?"cover":"contain")??j},[K,P,j,v]),Re=s.useCallback(xe=>{if(K.length>1){const Ce=K.length,h=(P+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,P,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:L,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=Le&&Ce>=ye?`${ce+(Ce-ye)}`:void 0,B=Y[0],R=B!=null&&B.lightboxMedia?Q.findIndex(te=>te.assetId===B.lightboxMedia.assetId):-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:I,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:P,layoutId:r,sourceRect:j,resolveCloseSourceRect:we,onClose:fe,onPrev:()=>Re(-1),onNext:()=>Re(1)})}),xe)})()]})}const Vv=`import { CommonComponentProps } from '../props';
7630
+ `}const Nc={assetId:"",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 Iv(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 Lv(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?np(i,n):null}function Pv(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.assetId,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.assetId,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.assetId,n.naturalWidth,n.naturalHeight)},n.src=e.assetId}function 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.assetId&&!t.has(c.assetId)&&(t.add(c.assetId),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.assetId,preload:"auto",muted:!0,playsInline:!0},t.assetId):a.jsx("img",{src:t.assetId,alt:""},t.assetId))})}function Po(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=Po(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=Po(e,"left",i),r=Po(e,"right",i),l=wa(e,"left",i),c=wa(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:c,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:c};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function _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=Po(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.assetId?t:void 0,o=n!=null&&n.assetId?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.assetId?n:t!=null&&t.assetId?t:null}function Ov(e){const[t]=e.media;return t!=null&&t.assetId?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.assetId?o:null})}return t}return e.filter(t=>t==null?void 0:t.assetId).map(t=>({displayMedia:t,lightboxMedia:t}))}function Bo(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.assetId)}function Dv({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return Bo(e)?a.jsx("video",{src:e.assetId,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onClick:o}):a.jsx("img",{src:e.assetId,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function 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.assetId,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.assetId,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.assetId,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.assetId,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function zv({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,canNavigate:d,lightboxEntries:u,entryIdx:p,layoutId:v,sourceRect:b,resolveCloseSourceRect:m,onClose:h,onPrev:x,onNext:S}){const P=s.useRef(null),f=s.useRef(null),w=s.useRef(null),N=s.useRef(new Map),[V,B]=s.useState(0),H=s.useRef(null),_=s.useRef(0),z=s.useRef(0),$=s.useRef("none"),E=s.useRef(!1),j=s.useRef(!1),L=s.useRef(!1),C=s.useRef(null),T=s.useRef(null),G=s.useRef(null),A=s.useRef(()=>{}),Y=s.useRef(null),R=s.useRef(null),y=s.useRef(null),U=s.useRef(!1),[ee,de]=s.useState(null),[F,ie]=s.useState(ss),[I,se]=s.useState(0),[J,Se]=s.useState("opening"),[Re,pe]=s.useState(0),[he,te]=s.useState(0),[le,re]=s.useState(!1),[fe,xe]=s.useState(null),[Te,me]=s.useState(null),[be,we]=s.useState(null),[g,X]=s.useState(!1),[Z,ne]=s.useState(null),[ye,K]=s.useState(!1),D=s.useRef(!1),[ce,q]=s.useState(!1),[ue,W]=s.useState(!1),Le=s.useRef(n),ae=s.useRef(void 0),Q=t[n],Ne=Q?Bo(Q):!1,Oe=he!==0||le,it=!l&&(!r||!!c),qe=d&&!l,Je=u.length>1,ot=s.useCallback((O,Ie)=>t.length<=1?null:t[(O+Ie+t.length)%t.length]??null,[t]),Ve=Je?ir(u,p,-1):ot(n,-1),ve=Je?ir(u,p,1):ot(n,1),Fe=fe===-1&&Oe?Je&&Te!==null?ir(u,Te,-1):be!==null?ot(be,-1):null:null,Xe=fe===1&&Oe?Je&&Te!==null?ir(u,Te,1):be!==null?ot(be,1):null:null,Ye=Fe&&Fe.assetId!==(Ve==null?void 0:Ve.assetId)?Fe:null,Pe=Xe&&Xe.assetId!==(ve==null?void 0:ve.assetId)?Xe:null,_e=Ve&&qe?(()=>{const O=Je?_c(u,p,-1):t.length>2?ot((n-1+t.length)%t.length,-1):null;return O&&O.assetId!==Ve.assetId?O:null})():null,Ke=ve&&qe?(()=>{const O=Je?_c(u,p,1):t.length>2?ot((n+1)%t.length,1):null;return O&&O.assetId!==ve.assetId?O:null})():null,Ze=Ye??_e,st=Pe??Ke,Ue=s.useCallback((O,Ie,je)=>{if(!O||!Ie||!je)return;const Ae=N.current,tt=Ae.get(O);(tt==null?void 0:tt.width)===Ie&&(tt==null?void 0:tt.height)===je||(Ae.set(O,{width:Ie,height:je}),B(Mt=>Mt+1))},[]),De=s.useCallback(O=>{if(!(O!=null&&O.assetId))return null;const Ie=N.current.get(O.assetId);return Ev(f.current,Ie)},[V,I]),ke=s.useCallback(()=>{if(!Q)return;const O=De(Q);if(O){de(O);return}const Ie=f.current;Ie&&de(Hc(Ie))},[Q,De]),ht=s.useCallback(O=>{if(Je){const Ie=u.length;me((p+O+Ie)%Ie),we(null);return}t.length>1&&(we((n+O+t.length)%t.length),me(null))},[Je,u.length,p,t.length,n]),Be=s.useCallback(O=>{L.current=O,re(O)},[]),ze=s.useCallback(()=>{C.current!==null&&(window.clearTimeout(C.current),C.current=null)},[]),We=s.useCallback(()=>{ze(),C.current=window.setTimeout(()=>{ze(),Be(!1)},qo+32)},[ze,Be]),mt=s.useCallback(()=>{const O=P.current;if(!O){ie({left:0,top:0,width:typeof window<"u"?window.innerWidth:ss.width,height:typeof window<"u"?window.innerHeight:ss.height});return}const Ie=O.getBoundingClientRect();ie({left:Ie.left,top:Ie.top,width:Ie.width,height:Ie.height})},[]),rt=s.useCallback((O,Ie)=>{if(Oe){if(ce&&!le)return`translate(${he}px, 0px)`;if(le&&fe!==null){const je=De(O);if(!je)return;const{x:Ae,y:tt}=_v(je,Ie,fe,F);return`translate(${Ae}px, ${tt}px)`}if(le)return"translate(0px, 0px)"}},[Oe,ce,le,he,fe,F,De]),St=s.useCallback(()=>{const O=T.current;T.current=null,ze(),Be(!1),xe(null),me(null),we(null),te(0),q(!1),E.current=!1,z.current=0,$.current="none",O===-1?x():O===1&&S()},[ze,Be,x,S]),Nt=s.useCallback(()=>{ze(),C.current=window.setTimeout(()=>{T.current!==null&&St()},qo+32)},[ze,St]),jt=s.useCallback(()=>{ze(),T.current=null,Be(!1),xe(null),me(null),we(null),te(0),q(!1),E.current=!1,z.current=0,$.current="none"},[ze,Be]),xt=s.useCallback(O=>{if(!(!qe||!ee)){if(L.current){if(T.current===O){G.current=O,St();return}jt()}ze(),ht(O),T.current=O,xe(O),Be(!0),Nt()}},[qe,ee,St,jt,ze,ht,Be,Nt]);A.current=xt;const Ce=s.useCallback(()=>{Y.current=null,U.current=!1,R.current!==null&&(window.clearInterval(R.current),R.current=null),y.current!==null&&(window.clearTimeout(y.current),y.current=null)},[]),He=s.useCallback(O=>{R.current!==null&&window.clearInterval(R.current);const Ie=U.current?Tv:Cv;R.current=window.setInterval(()=>{A.current(O)},Ie)},[]),lt=s.useCallback(O=>{Y.current!==O&&(Ce(),Y.current=O,U.current=!1,A.current(O),He(O),y.current=window.setTimeout(()=>{y.current=null,Y.current===O&&(U.current=!0,He(O))},$v))},[Ce,He]),et=s.useCallback(()=>{const O=f.current;if(!O)return;const Ie=Q==null?void 0:Q.assetId,je=Ie?N.current.get(Ie):void 0;if(je!=null&&je.width&&(je!=null&&je.height)){de(Xs(O,je.width,je.height));return}const Ae=w.current;if(Ae&&Ie&&(Ae.src===Ie||Ae.currentSrc===Ie)){const{width:Mt,height:ut}=Mv(Ae);if(Mt&&ut){Ue(Ie,Mt,ut),de(Xs(O,Mt,ut));return}}const tt=Hc(O);!tt.width||!tt.height||de(tt)},[Q==null?void 0:Q.assetId,Ue]),yt=s.useCallback(O=>{if(w.current=O,!!O){if(O instanceof HTMLVideoElement){O.readyState>=1&&O.videoWidth>0&&et();return}O.complete&&O.naturalWidth>0&&et()}},[et]),Rt=s.useCallback(()=>{mt(),et(),se(O=>O+1)},[mt,et]);s.useEffect(()=>{Rt();const O=f.current,Ie=P.current,je=new ResizeObserver(()=>Rt());return O&&je.observe(O),Ie&&je.observe(Ie),window.addEventListener("resize",Rt),()=>{je.disconnect(),window.removeEventListener("resize",Rt)}},[Rt,n,v]),s.useLayoutEffect(()=>{if(!Q)return;const O=w.current;if(O){if(O instanceof HTMLImageElement&&O.complete&&O.naturalWidth>0){et();return}O instanceof HTMLVideoElement&&O.readyState>=1&&O.videoWidth>0&&et()}},[Q==null?void 0:Q.assetId,n,et]),s.useEffect(()=>{ke()},[ke,V]),s.useEffect(()=>{const O=new Set,Ie=[],je=Ae=>{!(Ae!=null&&Ae.assetId)||O.has(Ae.assetId)||(O.add(Ae.assetId),Ie.push(Ae))};t.forEach(je),u.forEach(Ae=>Ae.items.forEach(je)),Ie.forEach(Ae=>{N.current.has(Ae.assetId)||kv(Ae,Ue)})},[t,u,Ue]),s.useEffect(()=>{if(J!=="opening"||!ee)return;if(!b){Se("open");return}X(!1);const O=requestAnimationFrame(()=>{requestAnimationFrame(()=>{X(!0),Se("open")})});return()=>cancelAnimationFrame(O)},[J,ee,b]),s.useEffect(()=>{if(J!=="closing")return;const O=setTimeout(()=>h(),Hn);return()=>clearTimeout(O)},[J,h]),s.useEffect(()=>()=>{ze()},[ze]),s.useLayoutEffect(()=>{Le.current===n&&ae.current===(Q==null?void 0:Q.assetId)||(ze(),T.current=null,xe(null),me(null),we(null),pe(0),te(0),Be(!1),W(!1),q(!1),_.current=0,z.current=0,$.current="none",E.current=!1,H.current=null,j.current=!1,w.current=null,ke(),Le.current=n,ae.current=Q==null?void 0:Q.assetId)},[n,Q==null?void 0:Q.assetId,Be,ze,ke]),s.useLayoutEffect(()=>{const O=G.current;O!==null&&(G.current=null,requestAnimationFrame(()=>{A.current(O)}))},[n,p,Q==null?void 0:Q.assetId]),s.useLayoutEffect(()=>{if(J==="opening"){D.current=!1,K(!1);return}if(J!=="open"||D.current)return;if(!Ve&&!ve){D.current=!0;return}K(!1);const O=requestAnimationFrame(()=>{requestAnimationFrame(()=>{K(!0),D.current=!0})});return()=>cancelAnimationFrame(O)},[J,Ve==null?void 0:Ve.assetId,ve==null?void 0:ve.assetId]),s.useEffect(()=>{if(J!=="open")return;const O=()=>{const ut=Tt=>{Tt.stopPropagation(),Tt.preventDefault(),document.removeEventListener("click",ut,!0)};document.addEventListener("click",ut,!0)},Ie=ut=>{const Tt=ut<0?1:-1;ze(),ht(Tt),T.current=Tt,xe(Tt),Be(!0),Nt()},je=ut=>{if(Math.abs(ut)>wv&&qe){Ie(ut);return}T.current=null,xe(null),me(null),we(null),Be(!0),te(0),We()},Ae=ut=>{if(ut.touches.length!==1||L.current)return;const Tt=ut.touches[0];j.current=!0,H.current={x:Tt.clientX,y:Tt.clientY},$.current="none",z.current=0,E.current=!1},tt=ut=>{if(!H.current||ut.touches.length!==1||L.current)return;const Tt=ut.touches[0],Ut=Tt.clientX-H.current.x,Wt=Tt.clientY-H.current.y;if($.current==="none"){if(Math.abs(Ut)<10&&Math.abs(Wt)<10)return;if(Math.abs(Ut)>Math.abs(Wt)){if(!qe)return;$.current="horizontal"}else if(Wt>0){if(!it)return;$.current="vertical"}else return}if($.current==="horizontal"){E.current=!0,q(!0),z.current=Ut,te(Ut),ut.preventDefault();return}$.current==="vertical"&&(E.current=!0,q(!0),_.current=Wt,pe(Wt),ut.preventDefault())},Mt=()=>{if(!H.current)return;const ut=$.current,Tt=E.current;if(Tt&&ut==="horizontal")je(z.current),O();else if(Tt&&ut==="vertical"){const Ut=_.current;if(it&&Ut>Sv){const Wt=window.innerHeight;_.current=Wt,W(!0),pe(Wt),Se("closing")}else _.current=0,pe(0);O()}else ut==="horizontal"&&Math.abs(z.current)>0&&(je(z.current),O());H.current=null,$.current="none",z.current=0,E.current=!1,q(!1)};return document.addEventListener("touchstart",Ae,{passive:!0}),document.addEventListener("touchmove",tt,{passive:!1}),document.addEventListener("touchend",Mt),document.addEventListener("touchcancel",Mt),()=>{document.removeEventListener("touchstart",Ae),document.removeEventListener("touchmove",tt),document.removeEventListener("touchend",Mt),document.removeEventListener("touchcancel",Mt)}},[J,qe,Be,We,ze,it,Nt,ht]);const At=s.useCallback(()=>{const O=(m==null?void 0:m())??b??null;O&&ee&&(ne(O),X(!0)),Se("closing")},[m,b,ee]);s.useEffect(()=>{const O=Ae=>{if(Ae.key==="Escape"){if(r&&c||J==="closing")return;Ce(),At();return}if(Ae.key!=="ArrowLeft"&&Ae.key!=="ArrowRight"||J!=="open"||!qe)return;Ae.preventDefault();const tt=Ae.key==="ArrowLeft"?-1:1;Ae.repeat&&Y.current===tt||lt(tt)},Ie=Ae=>{if(Ae.key!=="ArrowLeft"&&Ae.key!=="ArrowRight")return;const tt=Ae.key==="ArrowLeft"?-1:1;Y.current===tt&&Ce()},je=()=>{Ce()};return window.addEventListener("keydown",O),window.addEventListener("keyup",Ie),window.addEventListener("blur",je),()=>{window.removeEventListener("keydown",O),window.removeEventListener("keyup",Ie),window.removeEventListener("blur",je),Ce()}},[J,r,c,At,qe,lt,Ce]),s.useEffect(()=>{J!=="open"&&Ce()},[J,Ce]);const qt=()=>{J==="closing"||l||At()},$t=J==="open",zt=J==="closing",on=Re>0?Math.max(0,1-Re/500):1,vt=Re>0?Math.max(.35,1-Re/500):1,ft=s.useCallback(O=>{if(!(O.propertyName!=="transform"||!L.current)){if(T.current!==null){St();return}ze(),Be(!1)}},[ze,Be,St]),Me=J==="closing"?Z??b:b,nt=Me&&ee&&(J==="opening"||zt)?Iv(Me,ee):void 0,ct=Oe&&Q?rt(Q,"center"):Re>0?`translateY(${Re}px)`:nt,gt=ee?zr(ee,F):null,Et=!!(Me&&ee),wt=Et&&(J==="closing"||J==="open"&&g),dt={position:"absolute",top:gt==null?void 0:gt.top,left:gt==null?void 0:gt.left,width:gt==null?void 0:gt.width,height:gt==null?void 0:gt.height,objectFit:"contain",transformOrigin:"top left",transform:ct,opacity:Re>0?vt:Et?1:J==="opening"||zt?0:1,transition:ce&&!le?"none":le?`transform ${qo}ms ${wn}`:ue?`transform ${Hn}ms ${wn}, opacity ${Hn}ms ${wn}`:wt?`transform ${Hn}ms ${wn}`:J==="opening"||zt?`opacity ${Hn}ms ${wn}`:"none",pointerEvents:Ne&&$t&&!Oe?"auto":"none",touchAction:Ne&&$t?"none":void 0,zIndex:1,overflow:Ne?"hidden":void 0},Ot={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:$t&&!Oe?"auto":"none"},Lt=(O,Ie,je="adjacent")=>{const Ae=De(O);if(!Ae)return{display:"none"};const tt=je==="far"?Ie==="left"?"far-left":"far-right":Ie==="left"?"left-adjacent":"right-adjacent",{start:Mt}=fe!==null?op(Ae,tt,fe,F):{start:je==="far"?wa(Ae,Ie,F):Po(Ae,Ie,F)},ut=zr(Mt,F),Tt=rt(O,tt),Ut=!Oe&&je==="adjacent"&&$t&&!ye?Hv(Ae,Ie,F):null,Wt=je==="far"&&Oe&&fe===(Ie==="left"?-1:1),an=ce&&!le?!1:le,cn=je==="adjacent"&&$t&&ye&&!Oe;return{position:"absolute",top:ut.top,left:ut.left,width:ut.width,height:ut.height,objectFit:"contain",transform:Tt??(Ut?`translate(${Ut.x}px, ${Ut.y}px)`:void 0),opacity:je==="far"?$t&&Wt?1:0:$t?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}},Ht=(O,Ie)=>{const je=De(O);return je?Nv(Po(je,Ie,F),Ie,F):null},Gt=O=>Ie=>{if(!l){if(j.current){j.current=!1;return}Ie.stopPropagation(),xt(O)}},_t=Ve?Ht(Ve,"left"):null,Vt=ve?Ht(ve,"right"):null,Dt=_t?zr(_t,F):null,Ct=Vt?zr(Vt,F):null;return a.jsxs("div",{ref:P,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:J==="open"?"none":void 0},onClick:qt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:$t?on:0,transition:ce?"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:$t?1:0,transition:ce?"none":`opacity ${Hn}ms ${wn}`,pointerEvents:"none"},children:a.jsx(tp,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,onClose:qt})})]}),$t&&Ze&&a.jsx(jr,{media:Ze,style:Lt(Ze,"left","far"),onMeasure:Ue,onTransitionEnd:ft},`far-prev-${Ze.assetId}`),$t&&Ve&&a.jsxs(a.Fragment,{children:[a.jsx(jr,{media:Ve,style:Lt(Ve,"left"),onMeasure:Ue,onTransitionEnd:ft},`prev-${Ve.assetId}`),Dt&&a.jsx("div",{style:{position:"absolute",top:Dt.top,left:Dt.left,width:Dt.width,height:Dt.height,cursor:l||ce?"default":"pointer",pointerEvents:l||ce?"none":"auto",zIndex:3},onClick:Gt(-1)})]}),$t&&ve&&a.jsxs(a.Fragment,{children:[a.jsx(jr,{media:ve,style:Lt(ve,"right"),onMeasure:Ue,onTransitionEnd:ft},`next-${ve.assetId}`),Ct&&a.jsx("div",{style:{position:"absolute",top:Ct.top,left:Ct.left,width:Ct.width,height:Ct.height,cursor:l||ce?"default":"pointer",pointerEvents:l||ce?"none":"auto",zIndex:3},onClick:Gt(1)})]}),$t&&st&&a.jsx(jr,{media:st,style:Lt(st,"right","far"),onMeasure:Ue,onTransitionEnd:ft},`far-next-${st.assetId}`),ee&&Q&&(Ne?a.jsx(Bv,{src:Q.assetId,phase:J,onMediaElement:yt,wrapperStyle:dt,videoStyle:Ot,onLoadedMetadata:et,onTransitionEnd:ft},`${n}-${Q.assetId}`):a.jsx("img",{ref:yt,src:Q.assetId,alt:Q.name,onLoad:et,onTransitionEnd:ft,style:dt},`${n}-${Q.assetId}`))]})}function jv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:c}=k.useScopedStyles(),{gridLayout:d,verticalGap:u,align:p="top",imageDisplay:v}=e,b=(v==null?void 0:v.display)==="cover",m=(v==null?void 0:v.ratioValue)??"1:1",h=(v==null?void 0:v.reversed)??!1,[x,S]=m.split(":").map(Number),w=`${h?S:x} / ${h?x:S}`,N=d.entryWidth??.2,V=d.columnsCount,B=k.scalingValue(N,n),H=k.scalingValue(d.horizontalGap??0,n),_=B,z=B,$={width:_,...b?{aspectRatio:w,height:"auto",overflow:"hidden"}:{height:"auto"}},E=b?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},j=s.useRef(null),[L,C]=s.useState(!1),[T,G]=s.useState([]),[A,Y]=s.useState(0),[R,y]=s.useState(0),[U,ee]=s.useState(null),[de,F]=s.useState({title1:"",title2:"",title3:""}),ie=(()=>{const be={},we=j.current?getComputedStyle(j.current).getPropertyValue("--cntrl-article-width").trim():"";return we&&(be["--cntrl-article-width"]=we),be})(),I=!n||i||o,se=s.useMemo(()=>bv(c),[c]),J=t??[],Se=J.length%V||V,Re=Se<V&&J.length>0,pe=J.length-Se,he=Re?Math.floor((V-Se)/2)+1:1,te=s.useMemo(()=>Pv(J),[J]),le=s.useMemo(()=>Av(J),[J]),re=(be,we,g)=>{if(n&&!o&&!i)return;const X=te.findIndex(ne=>ne.gridIndex===be);if(X<0)return;const Z=te[X];y(X),G(Z.items),Y(we),F(Z.entry),ee(g??null),C(!0)},fe=s.useCallback(()=>{C(!1),ee(null)},[]),xe=s.useCallback(()=>{const be=te[R];return!be||!j.current?U:Lv(j.current,be.gridIndex,b?"cover":"contain")??U},[te,R,U,b]),Te=s.useCallback(be=>{if(te.length>1){const we=te.length,g=(R+be+we)%we,X=te[g],Z=Math.min(A,X.items.length-1);y(g),G(X.items),Y(Z),F(X.entry);return}Y(we=>(we+be+T.length)%T.length)},[te,R,A,T.length]),me=te.length>1||T.length>1;return s.useEffect(()=>{if(!L||typeof document>"u")return;const be=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=be}},[L]),s.useEffect(()=>{!n||o||i||C(!1)},[n,o,i]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:se}}),a.jsx(Fv,{mediaList:le}),a.jsx("div",{ref:j,className:`${c}-wrapper ${c}-align-entries ${c}-image-align-${p}`.trim(),style:{gridTemplateColumns:`repeat(${V}, ${B})`,rowGap:0,columnGap:H,width:k.scalingValue(d.wrapperWidth??0,n),[`--${c}-align-entries-row-gap`]:k.scalingValue(u??0,n)},children:J.map((be,we)=>{const g=Hl(be.gallery),X=Wl(g),Z=X.filter(q=>q.lightboxMedia).map(q=>q.lightboxMedia),ne=Math.floor(we/V)===Math.ceil(J.length/V)-1,ye=Re&&we>=pe?`${he+(we-pe)}`:void 0,K=X[0],D=K!=null&&K.lightboxMedia?Z.findIndex(q=>q.assetId===K.lightboxMedia.assetId):-1,ce=a.jsx("div",{className:`${c}-item-image-wrapper`,style:$,children:X.length>0&&a.jsx(Dv,{media:K.displayMedia,gridIndex:we,className:`${c}-item-${Bo(K.displayMedia)?"video":"image"}`.trim(),style:E,onMediaClick:I&&D>=0?q=>re(we,D,np(q.currentTarget,b?"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:B,...ye?{gridColumn:ye}:{}},children:[a.jsx("div",{className:`${c}-item-title-row`,children:a.jsx("div",{style:{height:0,width:z}})}),a.jsx("a",{className:`${c}-item-image-link`,children:ce}),a.jsx("div",{className:`${c}-item-subtitle-row`,children:a.jsx("div",{style:{height:0,width:z}})})]})},we)})}),L&&typeof document<"u"&&(()=>{const be=(l?document.getElementById(l):null)??document.body;return Xn.createPortal(a.jsx("div",{style:ie,"data-selection":"none",children:a.jsx(zv,{prefix:c,items:T,index:A,entry:de,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:me,lightboxEntries:te,entryIdx:R,layoutId:r,sourceRect:U,resolveCloseSourceRect:xe,onClose:fe,onPrev:()=>Te(-1),onNext:()=>Te(1)})}),be)})()]})}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 Ro=Li.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:[{assetId:Qv[t-1],name:"",objectFit:"cover"},{assetId:"",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:{assetId:{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.assetId",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.assetId)}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.assetId]),e.isVideo?a.jsx("video",{ref:i,className:t,src:e.assetId,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:t,src:e.assetId,alt:"",style:n})}function cs(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function 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=Li.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:[{assetId:Qv[t-1],name:"",objectFit:"cover"},{assetId:"",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:{assetId:{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.assetId",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.assetId)}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.assetId]),e.isVideo?a.jsx("video",{ref:i,className:t,src:e.assetId,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:t,src:e.assetId,alt:"",style:n})}function cs(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function 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=k.scalingValue(r,l),d=k.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=k.scalingValue(t,n),o=k.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 m=n.current,h=i.current;m&&(m.style.transform=`translate3d(${h.x}px, ${h.y}px, 0) translate(-50%, -50%) rotate(${h.rotation.toFixed(3)}deg)`)},[]),l=s.useCallback(()=>{o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)},[]),c=s.useCallback(()=>{const m=i.current;t?(m.x=ds(m.x,m.targetX,Yo.positionEase),m.y=ds(m.y,m.targetY,Yo.positionEase),m.rotation=ds(m.rotation,m.targetRotation,Yo.rotationEase)):(m.x=m.targetX,m.y=m.targetY,m.rotation=m.targetRotation),r();const h=Math.abs(m.x-m.targetX)<.4&&Math.abs(m.y-m.targetY)<.4,x=Math.abs(m.rotation-m.targetRotation)<.08;!h||!x?o.current=requestAnimationFrame(c):o.current=null},[r,t]),d=s.useCallback(()=>{o.current===null&&(o.current=requestAnimationFrame(c))},[c]),u=s.useCallback((m,h)=>{const x=i.current;x.targetX=m,x.targetY=h,x.targetRotation=0,x.x=m,x.y=h,x.rotation=0,x.lastX=m,x.hasLastX=!0,r(),t&&d()},[r,t,d]),p=s.useCallback((m,h)=>{if(!e)return;const x=i.current;if(t&&x.hasLastX){const S=m-x.lastX;x.targetRotation=r0(S*Yo.rotationFactor,-20,Yo.maxRotation)}else x.targetRotation=0;if(x.lastX=m,x.hasLastX=!0,x.targetX=m,x.targetY=h,t){d();return}x.x=m,x.y=h,x.rotation=x.targetRotation,r()},[e,r,t,d]),v=s.useCallback(m=>{l(),i.current.hasLastX=!1,m==null||m()},[l]),b=s.useCallback(()=>{l(),i.current={x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1},n.current&&(n.current.style.transform="")},[l]);return s.useEffect(()=>(e||b(),l),[e,b,l]),{anchorRef:n,onShow:u,onCursorMove:p,exit:v,reset:b}}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 Pi=["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 I0(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 L0(e,t=1){const n=t/e;return Object.fromEntries(Rn.map(i=>[i,n]))}function P0(){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:[...Pi]}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,...L0(n,o),...P0()};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:Pi.length,y=S=>{if(u)return S;const W=Vr({...t,...S}),q=lr(S),z=ga(p,q,W),L=M0(p,z,{...t,...S});return Object.keys(L).length===0?S:{...S,...L}};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:L,imagePosition:_="cursor",imageInterpolation:G="on",entryHoverEffect:$,entryHoverShowOption:I,rowPaddingTop:D,rowPaddingBottom:E,rowPaddingTopB:T,columnsOrder:C,textPaddingLR:V,textColor:w,backgroundColor:U,dividerColor:P,textHoverColor:A,backgroundHoverColor:j,dividerHoverColor:ie}=e,[ae,O]=s.useState(void 0),[re,N]=s.useState(null),le=s.useRef(null),J=L==="on"&&(!n||i),be=_==="cursor",Le=be&&G==="on",{anchorRef:ye,onShow:ce,onCursorMove:K,exit:se}=s0(!!(J&&re!==null),Le),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(I0(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:P,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),Pe=(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:[...Pi],[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(Pi.map(Lt=>[Lt,rt[Lt]??""])),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=[Pe?`${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,Pe,Se,st,b??0,n??!1).borderTopWidth,nt=fe?"rowPaddingTopB":"rowPaddingTop",pt=Ge[0],Ve=Ge[Ge.length-1],vt=$e[0],Pt=$e[$e.length-1],At=pt&&vt?Math.max(vt.paddingLeft,uo):0,wt=Ve&&Pt?Math.max(Pt.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.assetId)){se(()=>N(null));return}const dt=(z==null?void 0:z.min)??80,Lt=(z==null?void 0:z.max)??320,St=(re==null?void 0:re.rowId)===ke.id,ht=St?re.widthPx:H0(dt,Lt),{x:Wt,y:Tt}=jt(Je,ht);if(St&&be){K(Wt,Tt);return}N({rowId:ke.id,assetId:rt.assetId,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.assetId,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 Lt=ke.querySelector("[data-list-row]");if(!Lt){xe(null);return}const St=Je.getBoundingClientRect(),ht=Lt.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,Pe,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}),Ie=new Map,je=(Fe,ft)=>{const Ht=Ie.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 Ie.set(Fe.letter,cn),cn}ft.add(Fe.letter);const It=je(gt,ft);ft.delete(Fe.letter);const qt=us(Fe,Ft,Ot,Gt),Dt=It-qt;x0(Fe.titleEl,Dt);const an=us(Fe,Ft,Ot,Gt);return Ie.set(Fe.letter,an),an};H.forEach(Fe=>je(Fe,new Set))})};let dt=null;const Lt=()=>{dt===null&&(dt=requestAnimationFrame(()=>{dt=null,rt()}))};rt();const St=new ResizeObserver(()=>Lt());St.observe(ke);let ht=!1;return typeof document<"u"&&((Wt=document.fonts)!=null&&Wt.ready)&&document.fonts.ready.then(()=>{ht||Lt()}),()=>{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",Lt=Dc(Je,Ze.length,Pe,Se,st,b??0,n??!1);return a.jsxs(dt,{ref:Je===0?ht=>{Re.current=ht}:void 0,className:`${u}-list-item${rt||I==="always"?` ${u}-list-item-has-link`:""}${st&&Je===Ze.length-1?` ${u}-list-item-before-cut`:""}`,...rt?{href:ke.link,target:"_blank"}:{},style:Lt,onMouseEnter:ht=>{X&&(rt||I==="always")&&Wc(ht,u),J&&Yt(ke,ht)},onMouseLeave:ht=>{X&&(rt||I==="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),Ie=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":Ie.kind,...Ie.kind==="baseline"?{"data-valign-anchor":Ie.anchorLetter}:{}},children:[a.jsx("div",{className:`${u}-list-col${Tt?` ${u}-list-col-last`:""}`,style:{...ut,...Ft,...fe?{justifyContent:jc(Ie.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(Ie.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]-((Pt==null?void 0:Pt.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),Lt=$e[Je],St=$e[Je+1],ht=Math.max(Lt.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]-Lt.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),Lt=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(Lt),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.assetId}`)}),rt)})()]})})]})}const B0=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
10349
+ `}const Pi=["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 m0(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 g0(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 Kt(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[Kt(e,"textFontFamily"),Kt(e,"textFontSettings"),{type:"row",items:[Kt(e,"textFontSize"),Kt(e,"textLineHeight"),Kt(e,"textLetterSpacing"),Kt(e,"textWordSpacing")]},Kt(e,"textTextAlign"),Kt(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=Kt(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`]:k.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 I0(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 L0(e,t=1){const n=t/e;return Object.fromEntries(Rn.map(i=>[i,n]))}function P0(){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 ma(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 v=Math.min(d,p);c[u]-=v,d-=v}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:[...Pi]}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],v=Eo[d],b=ko[d],m=Rn[l],h=Mo[l],x=Eo[l],S=ko[l],P=n[u],f=n[p],w=n[v],N=n[b];typeof P=="number"&&(r[m]=P),typeof f=="number"&&(r[h]=f),typeof w=="number"&&(r[x]=w),typeof N=="number"&&(r[S]=N)}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,...L0(n,o),...P0()};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=m0(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:Pi.length,v=w=>{if(u)return w;const N=Vr({...t,...w}),V=lr(w),B=ma(p,V,N),H=M0(p,B,{...t,...w});return Object.keys(H).length===0?w:{...w,...H}};if(typeof r=="number"&&r!==l)return e;const b=qc(e),m=qc(t);if(!k0(b,m))return v({...e,...A0(b,m,t,p)});if(c<d&&typeof p=="number"&&!u){const w=Vr({...t,...e});return v({...e,...E0(p,c,w)})}if(u){const w=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,N=Math.max(0,(c-o)/2);return w>N?{...e,textPaddingLR:N}:e}const h=Vr({...t,...e}),x=ma(p,d,Vr(t)),P=ma(p,c,h).some((w,N)=>w<(x[N]??w)),f=Rn.some(w=>{const N=e[w],V=t[w];return typeof N=="number"&&typeof V=="number"&&N!==V});return P||f?v(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 ms(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}=k.useScopedStyles(),p=!!o,{columns:v,type:b,wrapperWidth:m,entriesCount:h,cellMinHeight:x,dividerWidth:S,showVisibility:P,cut:f,showCut:w,cutCellMinHeight:N,cutLabel:V,imageSize:B,imageOnHover:H,imagePosition:_="cursor",imageInterpolation:z="on",entryHoverEffect:$,entryHoverShowOption:E,rowPaddingTop:j,rowPaddingBottom:L,rowPaddingTopB:C,columnsOrder:T,textPaddingLR:G,textColor:A,backgroundColor:Y,dividerColor:R,textHoverColor:y,backgroundHoverColor:U,dividerHoverColor:ee}=e,[de,F]=s.useState(void 0),[ie,I]=s.useState(null),se=s.useRef(null),J=H==="on"&&(!n||i),Se=_==="cursor",Re=Se&&z==="on",{anchorRef:pe,onShow:he,onCursorMove:te,exit:le}=s0(!!(J&&ie!==null),Re),re=(f??0)>0,fe=b==="b",xe=s.useRef(null),Te=s.useRef(null),[me,be]=s.useState(null),[we,g]=s.useState(Sr),X=cp(we),Z=Math.max(0,((m??0)-X)/2),ne=Math.min(G??0,Z),ye=Math.max(ne,uo),K=((m??0)+X)/2;s.useLayoutEffect(()=>{if(!n){g(Sr);return}const Me=()=>{g(I0(xe.current))};Me();const nt=xe.current;if(!nt)return;const ct=new ResizeObserver(Me);ct.observe(nt);let gt=nt;for(;gt&&!gt.style.getPropertyValue("--cntrl-article-width");)gt=gt.parentElement;return gt&&ct.observe(gt),()=>ct.disconnect()},[n,l]),s.useEffect(()=>{F(void 0)},[f,w,t,h]),s.useEffect(()=>{n&&!i&&F(void 0)},[n,i]);const D=k.buildColorVars(u,{textColor:A,backgroundColor:Y,dividerColor:R,textHoverColor:y,backgroundHoverColor:U,dividerHoverColor:ee},C0,T0),ce=r&&r!=="default"?`${u}-state-${r}`:"",ue=`${!n||i?$==="default"?`${u}-entry-hover-default`:$==="blinds"?`${u}-entry-hover-blinds`:$==="reveal"?`${u}-entry-hover-reveal`:"":""} ${ce}`.trim(),W=$==="reveal"&&(!n||i),Le=(P==null?void 0:P[0])??!1,ae=(P==null?void 0:P[1])??!1,Q=s.useRef(e),Ne=s.useRef(l);s.useEffect(()=>{if(!d||!n){Q.current=e,Ne.current=l;return}if(Ne.current!==l){Q.current=e,Ne.current=l;return}const Me=Q.current;if(!(Me!==e))return;if(typeof Me.columns=="number"&&typeof e.columns=="number"&&Me.columns!==e.columns){Q.current=e;return}const ct=N0(e,Me,{designWidth:we});Q.current=e,pp(e,ct)&&d(ct)},[e,d,n,l,we]);const Oe=s.useMemo(()=>W0(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),it=s.useMemo(()=>ms(e,Mo),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),qe=s.useMemo(()=>ms(e,Eo),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Je=s.useMemo(()=>ms(e,ko),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),ot=s.useMemo(()=>Array.isArray(T)&&T.length>0?T:[...Pi],[T]),Ve=s.useMemo(()=>O0(ot,v,Oe,it,qe,Je),[ot,v,Oe,it,qe,Je]),ve=lr(e),Fe=s.useMemo(()=>Rn.slice(0,v).map(Me=>Oe[Me]),[v,Oe]),Xe=s.useMemo(()=>zl(v,ve,Oe),[v,ve,Oe]),Ye=s.useMemo(()=>ma(v,ve,Oe),[v,ve,Oe]),Pe=s.useMemo(()=>Ve.map((Me,nt)=>up(Ye[nt]??0,Me.paddingLeft,Me.paddingRight)),[Ve,Ye]),_e=s.useMemo(()=>{const Me=h===0?1/0:h;return(t??[]).slice(0,Me).map((ct,gt)=>({id:gt,cells:Object.fromEntries(Pi.map(Et=>[Et,ct[Et]??""])),image:ct.image,link:ct.link}))},[t,h]),Ke=re?de??f:_e.length,Ze=s.useMemo(()=>re?_e.slice(0,Ke):_e,[_e,re,Ke]),st=re&&Ke<_e.length,Ue=Ze.length>1||st,De=[Le?`${u}-divider-top`:"",ae||Ue?`${u}-divider-bottom`:""].filter(Boolean).join(" "),ke=!n||i,ht=()=>{if(!ke)return;const Me=de??f;if(!w){F(_e.length);return}F(Math.min(Me+w,_e.length))},Be=Me=>k.scalingValue(Me,n??!1),ze=fe?C??0:j??0,We=L??0,mt=x??0,rt=Math.max(We,ps),St=Dc(0,Ze.length,Le,ae,st,S??0,n??!1).borderTopWidth,Nt=fe?"rowPaddingTopB":"rowPaddingTop",jt=Ve[0],xt=Ve[Ve.length-1],Ce=Pe[0],He=Pe[Pe.length-1],lt=jt&&Ce?Math.max(Ce.paddingLeft,uo):0,et=xt&&He?Math.max(He.paddingRight,uo):0,yt=ve,Rt=(Me,nt)=>a0(_,xe.current,Se?Me:null,nt),At=(Me,nt)=>{if(!J)return;const ct=Me.image;if(!(ct!=null&&ct.assetId)){le(()=>I(null));return}const gt=(B==null?void 0:B.min)??80,Et=(B==null?void 0:B.max)??320,wt=(ie==null?void 0:ie.rowId)===Me.id,dt=wt?ie.widthPx:H0(gt,Et),{x:Ot,y:Lt}=Rt(nt,dt);if(wt&&Se){te(Ot,Lt);return}I({rowId:Me.id,assetId:ct.assetId,objectFit:"contain",isVideo:t0(ct),widthPx:dt}),se.current={x:Ot,y:Lt}},qt=Me=>{if(!J||!ie||!Se)return;const{x:nt,y:ct}=Rt(Me,ie.widthPx);te(nt,ct)},$t=()=>{ie&&le(()=>I(null))},zt=Me=>{W&&Wc(Me,u),!(!J||!ie)&&le(()=>I(null))},on=Me=>{W&&Oc(Me,u)};s.useLayoutEffect(()=>{if(!ie||!se.current)return;const{x:Me,y:nt}=se.current;se.current=null,he(Me,nt)},[ie==null?void 0:ie.rowId,ie==null?void 0:ie.assetId,he]),s.useLayoutEffect(()=>{if(!p||fe){be(null);return}const Me=Te.current,nt=Me==null?void 0:Me.parentElement;if(!Me||!nt){be(null);return}const ct=()=>{const Et=Me.querySelector("[data-list-row]");if(!Et){be(null);return}const wt=nt.getBoundingClientRect(),dt=Et.getBoundingClientRect();be(dt.top-wt.top+dt.height/2)};ct();const gt=new ResizeObserver(ct);return gt.observe(Me),gt.observe(nt),()=>gt.disconnect()},[p,fe,Ze,ze,We,mt,t,e,Ve,Ye,we,S,Le,ae,st]);const vt=s.useMemo(()=>!fe&&Ol.some(Me=>{const nt=Me.charAt(0),ct=e[`${Me}VerticalAlign`];return lp(ct,e,nt)}),[fe,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);s.useLayoutEffect(()=>{var Ot;const Me=xe.current;if(!Me)return;const nt=()=>{Me.querySelectorAll("[data-list-col]").forEach(Lt=>{Lt.style.transform="";const Ht=Lt.querySelector(`.${u}-list-col`);Ht&&(Ht.style.minHeight="",Ht.style.height="");const Gt=Lt.querySelector(`.${u}-list-col-title`);Gt&&(Gt.style.transform="")})};if(fe||!vt){nt();return}const ct=()=>{const Lt=Array.from(Me.querySelectorAll("[data-list-row]")),Ht=`${u}-list-col`,Gt=`${u}-baseline-probe`;Lt.forEach(_t=>{_t.querySelectorAll("[data-list-col]").forEach(Vt=>{Vt.style.transform="";const Dt=Vt.querySelector(`.${Ht}`);Dt&&(Dt.style.minHeight="",Dt.style.height="");const Ct=Vt.querySelector(`.${u}-list-col-title`);Ct&&(Ct.style.transform="")})}),Lt.forEach(_t=>{const Vt=Array.from(_t.querySelectorAll("[data-list-col]"));v0(_t,Vt,Ht)}),Me.offsetHeight,Lt.forEach(_t=>{const Vt=Array.from(_t.querySelectorAll("[data-list-col]")),Dt=_t.getBoundingClientRect().top,Ct=new Map,O=Vt.map(Ae=>{const tt=Ae.querySelector(`.${u}-list-col-title`),Mt={el:Ae,titleEl:tt,letter:Ae.getAttribute("data-col-letter")??"",kind:Ae.getAttribute("data-valign")??"top",anchor:Ae.getAttribute("data-valign-anchor")};return Ct.set(Mt.letter,Mt),Mt}),Ie=new Map,je=(Ae,tt)=>{const Mt=Ie.get(Ae.letter);if(Mt!==void 0)return Mt;const ut=Ae.anchor?Ct.get(Ae.anchor):void 0;if(Ae.kind!=="baseline"||!ut||tt.has(Ae.letter)){const cn=us(Ae,Dt,Ht,Gt);return Ie.set(Ae.letter,cn),cn}tt.add(Ae.letter);const Tt=je(ut,tt);tt.delete(Ae.letter);const Ut=us(Ae,Dt,Ht,Gt),Wt=Tt-Ut;x0(Ae.titleEl,Wt);const an=us(Ae,Dt,Ht,Gt);return Ie.set(Ae.letter,an),an};O.forEach(Ae=>je(Ae,new Set))})};let gt=null;const Et=()=>{gt===null&&(gt=requestAnimationFrame(()=>{gt=null,ct()}))};ct();const wt=new ResizeObserver(()=>Et());wt.observe(Me);let dt=!1;return typeof document<"u"&&((Ot=document.fonts)!=null&&Ot.ready)&&document.fonts.ready.then(()=>{dt||Et()}),()=>{dt=!0,gt!==null&&(cancelAnimationFrame(gt),gt=null),wt.disconnect(),nt()}},[vt,fe,e,t,we,Ze,Ye]);const ft=s.useMemo(()=>l0(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ft}}),a.jsx("div",{style:D,children:a.jsxs("div",{ref:xe,className:`${u}-wrapper ${ue}${De?` ${De}`:""}${fe?` ${u}-type-b`:""}`.trim(),style:{width:k.scalingValue(m??0,n)},onMouseMove:J?qt:void 0,onMouseLeave:J?$t:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[Ze.map((Me,nt)=>{var wt;const ct=(((wt=Me.link)==null?void 0:wt.length)??0)>0,gt=ct&&(!n||i)?"a":"div",Et=Dc(nt,Ze.length,Le,ae,st,S??0,n??!1);return a.jsxs(gt,{ref:nt===0?dt=>{Te.current=dt}:void 0,className:`${u}-list-item${ct||E==="always"?` ${u}-list-item-has-link`:""}${st&&nt===Ze.length-1?` ${u}-list-item-before-cut`:""}`,...ct?{href:Me.link,target:"_blank"}:{},style:Et,onMouseEnter:dt=>{W&&(ct||E==="always")&&Wc(dt,u),J&&At(Me,dt)},onMouseLeave:dt=>{W&&(ct||E==="always")&&Oc(dt,u)},children:[ze>0&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:Be(ze)}}),a.jsxs("div",{className:`${u}-list-cols-row${fe?"":` ${u}-list-cols-row-h`}${p&&nt===0&&fe?` ${u}-list-cols-row-controls`:""}`,...fe?{}:{"data-list-row":""},style:fe?void 0:{minHeight:Be(mt)},children:[Ve.map((dt,Ot)=>{const Lt=Ot===Ve.length-1,Ht=Pe[Ot],Gt=dt.paddingBottom,_t=i0(Me.cells[dt.key]),Vt=fe&&_t&&Gt>0,Dt=fe?{minHeight:Be(mt)}:{width:Be(Ye[Ot])},Ct=fe?{paddingLeft:Be(ne),paddingRight:Be(ne)}:{paddingLeft:Be(Ht.paddingLeft),paddingRight:Be(Ht.paddingRight)},O=dt.textPrefix.charAt(0),Ie=fe?p0(e[`${dt.textPrefix}VerticalAlign`]):u0(e[`${dt.textPrefix}VerticalAlign`],e,O),je=fe&&_t&&p&&nt===0;return fe&&!_t?null:a.jsxs("div",{className:fe?`${u}-list-col-wrap`:void 0,...fe?{}:{"data-list-col":"","data-col-letter":O,"data-valign":Ie.kind,...Ie.kind==="baseline"?{"data-valign-anchor":Ie.anchorLetter}:{}},children:[a.jsx("div",{className:`${u}-list-col${Lt?` ${u}-list-col-last`:""}`,style:{...Ct,...Dt,...fe?{justifyContent:jc(Ie.kind)}:{}},"data-test":dt.width,children:a.jsx("span",{className:Gc(e,dt.textPrefix,`${u}-list-col-title`,`${u}-text-tight-leading`),style:{...Vc($a(e,dt.textPrefix),n),...Xc(e,dt.textPrefix,u,n),...fe?{}:g0(Ie.kind)},children:Me.cells[dt.key]??null})}),Vt&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:Be(Gt)}}),je&&a.jsx("div",{"data-controls":dt.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))}})]},dt.key)}),p&&nt===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(K),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{top:0,left:0,width:Be(ye),height:"100%"}}),a.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(K),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{top:0,left:Be(Math.max(ye,ve-ye)),width:Be(ye),height:"100%"}})]})]}),!fe&&We>0&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:Be(We)}}),p&&nt===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(rt)}})]},Me.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:St,left:0,width:"100%",height:Be(Math.max(ze,ps))}})},"row-padding-handles"),p&&!fe&&jt&&xt&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":jt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ye[0]-((Ce==null?void 0:Ce.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(lt),height:"100%"}}),a.jsx("div",{"data-controls":xt.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ye[Ve.length-1]-((He==null?void 0:He.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(yt-et),width:Be(et),height:"100%"}})]},"column-edge-padding-handles"),p&&!fe&&Ve.slice(0,-1).map((Me,nt)=>{const ct=Ve[nt+1],gt=Xe.slice(0,nt+1).reduce((Lt,Ht)=>Lt+Ht,0),Et=Pe[nt],wt=Pe[nt+1],dt=Math.max(Et.paddingRight,uo),Ot=Math.max(wt.paddingLeft,uo);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":Me.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ye[nt]-Et.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(gt-dt),width:Be(dt),height:"100%"}}),a.jsx("div",{"data-controls":ct.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ye[nt+1]-wt.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(gt),width:Be(Ot),height:"100%"}})]},`${Me.paddingRightKey}-padding`)}),p&&!fe&&Ve.slice(0,-1).map((Me,nt)=>{const ct=_0(nt,Xe,Fe,ve),Et=Xe.slice(0,nt+1).reduce((wt,dt)=>wt+dt,0)-Uc/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Me.widthKey,"data-controls-axis":"x","data-controls-min":String(Bl),"data-controls-max-fraction":String(ct),"data-controls-variant":"column-width",className:`${u}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Be(Et),width:Be(Uc),height:"calc(100%)",pointerEvents:"auto"}})},`${Me.widthKey}-junction`)})]}),st&&(()=>{const Me=$a(e,ai),nt=h0(e.cutLabelVerticalAlign),ct=Me.textTextAlign==="justify"||fe;return a.jsx("button",{type:"button",className:`${u}-cut-item`,style:{minHeight:Be(N??0),cursor:ke?"pointer":"default",...o0(ae,S??0,n??!1)},onClick:ke?ht:void 0,onMouseEnter:W||J?zt:void 0,onMouseLeave:W?on:void 0,children:a.jsx("div",{className:`${u}-list-cols-row`,style:{...fe?{paddingLeft:Be(ne),paddingRight:Be(ne)}:{},justifyContent:f0(Me.textTextAlign),alignItems:jc(nt)},children:a.jsx("span",{className:Gc(e,ai,`${u}-cut-label`,`${u}-text-tight-leading`),style:{...Vc(Me,n),...Xc(e,ai,u,n),...ct?{width:"100%"}:{}},children:V})})})})(),J&&ie&&typeof document<"u"&&(()=>{const Me=`${ie.widthPx}px`,nt={width:Me,height:"auto",maxHeight:Me,objectFit:"contain"},ct=(c?document.getElementById(c):null)??document.body;return Xn.createPortal(a.jsx("div",{ref:pe,className:`${u}-hover-media-anchor`,"data-selection":"none",children:a.jsx(n0,{media:ie,className:ie.isVideo?`${u}-hover-video`:`${u}-hover-image`,style:nt},`${ie.rowId}-${ie.assetId}`)}),ct)})()]})})]})}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=Pi[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:[...Pi]};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=Pi[n],o=gp(t);for(let r=1;r<Pi.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",assetId:"01M3QM74XESYN1HRYH9VRTZ5CK"},{objectFit:"contain",assetId:"01M3QM74XEVZ9F59FC7M9BA63Q"},{objectFit:"contain",assetId:"01M3QM74XEE2101QD8PM6E4JSA"},{objectFit:"contain",assetId:"01M3QM74XE20C38X4NND20C5R4"},{objectFit:"contain",assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA"},{objectFit:"contain",assetId:"01M3QM74XEBS5231QA4355P4VQ"},{objectFit:"contain",assetId:"01M3QM74XEWT5YM43KF6PEYRCV"}],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:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","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.assetId",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=Pi[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:[...Pi]};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[Kt(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Kt(e,"textFontSettings")]={...Ni.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Kt(e,"textFontSize")]={...Ni.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Kt(e,"textLineHeight")]={...Ni.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Kt(e,"textLetterSpacing")]={...Ni.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Kt(e,"textWordSpacing")]={...Ni.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Kt(e,"textTextAlign")]={...Ni.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Kt(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[Kt(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Kt(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Kt(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Kt(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Kt(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Kt(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Kt(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Kt(e,"textTextAppearance")]=t.textTextAppearance),o}function ga(e={},t){return xr.reduce((n,i)=>({...n,...Y0(i,q0(i,e),t)}),{})}const K0=ga(),Q0=$0();function mp(e){return[Kt(e,"textFontFamily"),Kt(e,"textFontSettings"),Kt(e,"textFontSize"),Kt(e,"textLineHeight"),Kt(e,"textLetterSpacing"),Kt(e,"textWordSpacing"),Kt(e,"textTextAlign"),Kt(e,"textTextAppearance"),`${e}VerticalAlign`]}function Z0(){const e=[];return Ol.forEach((t,n)=>{const i=Pi[n],o=mp(t);for(let r=1;r<Pi.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"];mp(ai);const ex=[...zo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],_i=[{objectFit:"contain",assetId:"01M3QM74XESYN1HRYH9VRTZ5CK"},{objectFit:"contain",assetId:"01M3QM74XEVZ9F59FC7M9BA63Q"},{objectFit:"contain",assetId:"01M3QM74XEE2101QD8PM6E4JSA"},{objectFit:"contain",assetId:"01M3QM74XE20C38X4NND20C5R4"},{objectFit:"contain",assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA"},{objectFit:"contain",assetId:"01M3QM74XEBS5231QA4355P4VQ"},{objectFit:"contain",assetId:"01M3QM74XEWT5YM43KF6PEYRCV"}],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:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","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,...ga({},"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},...ga({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},...ga({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.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...xr.map(e=>({path:`${Kt(e,"textFontFamily")}`}))]},fontRelations:{...xr.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${Kt(t,"textFontFamily")}`}),{})},schema:ix,sourceCode:B0},Zc=300,mi=.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`]:k.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:M="rotate 45",questionColor:f="#000000",answerColor:S="#000000",dividerColor:W="#0000001F",iconColor:q="#000000",questionHoverColor:z="#666666",iconHoverColor:L="#666666",iconActiveColor:_="#000000",dividerHoverColor:G="#000000",questionFontFamily:$,questionFontSettings:I,questionFontSize:D,questionLineHeight:E,questionLetterSpacing:T,questionWordSpacing:C,questionTextAppearance:V,answerFontFamily:w,answerFontSettings:U,answerFontSize:P,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:Le=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(Le,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!=="",Pe=M.replace(/^rotate /,""),Se=`${l}-icon-anim-${Pe}`,Z=un(en(td($,I,D,E,T,C,V,f),n)),He=un(en(td(w,U,P,A,j,ie,ae,S),n)),We=Jc(D,E,`${l}-question`,`${l}-text-tight-leading`),ot=Jc(P,A,`${l}-answer-text`,`${l}-text-tight-leading`),qe=ed(D,E,l,n),tt=ed(P,A,l,n),et=F.buildColorVars(l,{questionColor:f,answerColor:S,dividerColor:W,iconColor:q,questionHoverColor:z,iconHoverColor:L,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})})}),Le>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:pe(Le)}}),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}=k.useScopedStyles(),c=o??!1,{wrapperWidth:d=1,cellMinHeight:u=0,dividerWidth:p=694e-6,dividerStyle:v="solid",entryHoverEffect:b="default",autoclose:m="off",icon:h,iconMaxWidth:x=.00833,iconPaddingRight:S=0,iconAnimation:P="rotate 45",questionColor:f="#000000",answerColor:w="#000000",dividerColor:N="#0000001F",iconColor:V="#000000",questionHoverColor:B="#666666",iconHoverColor:H="#666666",iconActiveColor:_="#000000",dividerHoverColor:z="#000000",questionFontFamily:$,questionFontSettings:E,questionFontSize:j,questionLineHeight:L,questionLetterSpacing:C,questionWordSpacing:T,questionTextAppearance:G,answerFontFamily:A,answerFontSettings:Y,answerFontSize:R,answerLineHeight:y,answerLetterSpacing:U,answerWordSpacing:ee,answerTextAppearance:de,questionPaddingLeft:F=0,questionPaddingTop:ie=0,questionPaddingBottom:I=0,answerPaddingLeft:se=0,answerPaddingRight:J=0,answerPaddingTop:Se=0,answerPaddingBottom:Re=0}=e,pe=t??[],[he,te]=s.useState(()=>new Set),le=!n||i;s.useEffect(()=>{te(new Set)},[m]),s.useEffect(()=>{n&&!o&&!i&&te(new Set)},[n,o,i]);const re=Ye=>k.scalingValue(Ye,n??!1),fe=Math.max(F,mi),xe=Math.max(ie,mi),Te=Math.max(I,mi),me=Math.max(se,mi),be=Math.max(J,mi),we=Math.max(Se,mi),g=Math.max(Re,mi),X=Math.max(0,(d??1)-S-x),Z=Math.max(0,(d??1)-J),ne=Math.max(0,(d??1)-se),ye=Math.max(S,mi),K=Math.max(0,(d??1)-F-x),D=s.useMemo(()=>he.size===0?0:Math.min(...he),[he]),ce=s.useCallback(Ye=>he.has(Ye),[he]),q=le&&b==="default"?`${l}-entry-hover-default`:"",ue=h??"",W=ue!=="",Le=P.replace(/^rotate /,""),ae=`${l}-icon-anim-${Le}`,Q=un(en(td($,E,j,L,C,T,G,f),n)),Ne=un(en(td(A,Y,R,y,U,ee,de,w),n)),Oe=Jc(j,L,`${l}-question`,`${l}-text-tight-leading`),it=Jc(R,y,`${l}-answer-text`,`${l}-text-tight-leading`),qe=ed(j,L,l,n),Je=ed(R,y,l,n),ot=k.buildColorVars(l,{questionColor:f,answerColor:w,dividerColor:N,iconColor:V,questionHoverColor:B,iconHoverColor:H,iconActiveColor:_,dividerHoverColor:z},rx,ax),Ve=r&&r!=="default"?`${l}-state-${r}`:"",ve=s.useCallback(Ye=>{le&&te(Pe=>{if(Pe.has(Ye)){const Ke=new Set(Pe);return Ke.delete(Ye),Ke}if(m==="on")return new Set([Ye]);const _e=new Set(Pe);return _e.add(Ye),_e})},[le,m]),Fe=s.useMemo(()=>lx(l),[l]),Xe={[`--${l}-divider-width`]:k.scalingValue(p,n??!1),[`--${l}-divider-style`]:v,[`--${l}-icon-max-width`]:k.scalingValue(x,n??!1),...u>0?{[`--${l}-question-min-height`]:k.scalingValue(u,n??!1)}:{}};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Fe}}),a.jsx("div",{style:ot,children:a.jsx("div",{className:Pt(`${l}-wrapper`,n&&!i&&`${l}-editor`,q,Ve),style:{width:k.scalingValue(d,n??!1),maxWidth:"100%",...Xe},children:pe.map((Ye,Pe)=>{var De;const _e=ce(Pe),Ke=((De=Ye.question)==null?void 0:De.trim())??"",Ze=Ye.answer,st=((Ze==null?void 0:Ze.length)??0)>0,Ue=c&&Pe===D;return a.jsxs("div",{className:Pt(`${l}-item`,_e&&`${l}-item-open`),"data-faq-item":"",children:[a.jsxs("div",{className:`${l}-question-controls`,children:[Ue&&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:re(xe)}}),a.jsx("div",{"data-controls":"questionPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(X),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:re(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(K),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:re(ye),height:"100%"}})]}),a.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":_e,style:{...Q,...qe,paddingLeft:re(F),paddingRight:re(S)},onClick:()=>ve(Pe),children:[ie>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:re(ie)},"aria-hidden":"true"}),a.jsxs("span",{className:`${l}-question-row`,children:[a.jsx("span",{className:Oe,children:Ke}),st&&(W?a.jsx("span",{className:`${l}-icon ${l}-icon-custom ${ae}`,"aria-hidden":"true",children:a.jsx(mn,{url:ue,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 ${ae}`,"aria-hidden":"true"}))]}),I>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:re(I)},"aria-hidden":"true"})]}),Ue&&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:re(Te)}})]}),st&&Ze&&a.jsx("div",{className:`${l}-panel`,"aria-hidden":!_e,children:a.jsx("div",{className:`${l}-panel-inner`,children:a.jsxs("div",{className:`${l}-answer-controls`,children:[Ue&&_e&&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:re(we)}}),a.jsx("div",{"data-controls":"answerPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Z),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:re(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:re(be),height:"100%"}})]}),Se>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:re(Se)}}),a.jsx("div",{className:`${l}-answer`,style:{...Ne,...Je,paddingLeft:re(se),paddingRight:re(J)},children:a.jsx("div",{className:it,children:a.jsx(Yi,{content:Ze})})}),Re>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:re(Re)}}),Ue&&_e&&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:re(g)}})]})})})]},Pe)})})})]})}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:"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 I=typeof window<"u"?window.innerHeight:800,D=Math.max(.88,1-$/I*.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 I=d.current;if(!e||!I||$.pointerType!=="touch"||I.pointerId!==$.pointerId)return;const D=$.clientX-I.startX,E=$.clientY-I.startY;if(I.isLocked===null){if(Math.abs(D)<od&&Math.abs(E)<od)return;if(E>0&&E>Math.abs(D))I.isLocked=!0,$.currentTarget.setPointerCapture($.pointerId);else{I.isLocked=!1,m();return}}if(!I.isLocked)return;$.preventDefault();const T=Math.max(0,E);u.current=T,r(T)},[e,m]),S=s.useCallback($=>{const I=d.current;if(!e||!I||$.pointerType!=="touch"||I.pointerId!==$.pointerId)return;const D=I.isLocked===!0;if($.currentTarget.hasPointerCapture($.pointerId)&&$.currentTarget.releasePointerCapture($.pointerId),!D){m();return}$.clientY-I.startY>=p?b():x()},[p,b,e,m,x]),W=s.useCallback($=>{S($)},[S]),q=s.useCallback($=>{S($)},[S]),z=o>0,L=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:L,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,Ix=.05,Lx=1,Xr=.3,Px=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:L,title1MarginLeft:_=0,title2MarginLeft:G=0,title3MarginLeft:$=0,titleRowMarginBottom:I=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),P=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:Le}=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||Le),h=s.useMemo(()=>Hx(e,J,be,Le,ye,ce,K),[e,O,J,be,Le,ye,ce,K]),Y=s.useMemo(()=>({title1Width:q,title2Width:z,title3Width:L}),[q,z,L]),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]),Pe=X(I??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,Pt]=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,Pt(!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||(I??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:Pe,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]}),Lt=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:Lt}),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},Ie=(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=Ie(oe),lt=Ye.current[Xe];if(H(lt))return Ie(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]),It=()=>{if(!ze.current||t.length===0||Vt.current!==null||it.current.isActive&&it.current.hasMoved)return;const k=ze.current.scrollLeft,oe=Ie(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(),It(),Ue.current=null,ct.current=!1;return}k.scrollLeft+=oe*Ix,_t(),It(),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)):It(),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=Ie()%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=Ie(k),Bt=Ye.current[Et];if(H(Bt)){Dt(!0),It();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=Ie(En),kr=Ye.current[Qn];if(kr&&Math.abs(kr.offsetLeft-En)<1){Dt(!0),It();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<Px||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),It()),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),Lt(k.target))return;st.current={startX:k.clientX,startY:k.clientY,startActiveIndex:N.current};return}if(k.pointerType!=="mouse"||k.button!==0||Lt(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)>Lx&&(it.current.hasMoved=!0,Ve(!0)),it.current.hasMoved&&(k.preventDefault(),oe.scrollLeft=it.current.scrollLeft-de,_t(!0),It(),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(()=>Pt(!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||It()};k.addEventListener("scroll",oe,{passive:!0});const de=new ResizeObserver(()=>{kt(),_t(it.current.isActive),je(Be.current),It()});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.assetId,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.assetId}-${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(P),oe=`calc(-0.5 * (${P} + ${k}))`;return a.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:P},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.assetId,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.assetId}-${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 gi(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:gi("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:gi("Question Padding Left"),questionPaddingTop:gi("Question Padding Top"),questionPaddingBottom:gi("Question Padding Bottom"),answerPaddingLeft:gi("Answer Padding Left"),answerPaddingRight:gi("Answer Padding Right"),answerPaddingTop:gi("Answer Padding Top"),answerPaddingBottom:gi("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"]}}},mx={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,gx=.2,od=8,gp=({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*gx),[]),v=s.useCallback($=>Math.max(0,1-$/(p*1.5)),[p]),b=s.useCallback($=>Math.max(0,1-$/(p*.45)),[p]),m=s.useCallback($=>{const E=typeof window<"u"?window.innerHeight:800,j=Math.max(.88,1-$/E*.12);return`translateY(${$}px) scale(${j})`},[]),h=s.useCallback(()=>{d.current=null},[]),x=s.useCallback(()=>{c(!0),r(0),window.setTimeout(()=>c(!1),n),h()},[n,h]),S=s.useCallback(()=>{const $=typeof window<"u"?window.innerHeight:800;c(!0),r($),window.setTimeout(()=>{t(),h(),c(!1)},Math.min(n,200))},[n,t,h]),P=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 E=d.current;if(!e||!E||$.pointerType!=="touch"||E.pointerId!==$.pointerId)return;const j=$.clientX-E.startX,L=$.clientY-E.startY;if(E.isLocked===null){if(Math.abs(j)<od&&Math.abs(L)<od)return;if(L>0&&L>Math.abs(j))E.isLocked=!0,$.currentTarget.setPointerCapture($.pointerId);else{E.isLocked=!1,h();return}}if(!E.isLocked)return;$.preventDefault();const C=Math.max(0,L);u.current=C,r(C)},[e,h]),w=s.useCallback($=>{const E=d.current;if(!e||!E||$.pointerType!=="touch"||E.pointerId!==$.pointerId)return;const j=E.isLocked===!0;if($.currentTarget.hasPointerCapture($.pointerId)&&$.currentTarget.releasePointerCapture($.pointerId),!j){h();return}$.clientY-E.startY>=p?S():x()},[p,S,e,h,x]),N=s.useCallback($=>{w($)},[w]),V=s.useCallback($=>{w($)},[w]),B=o>0,H=l?`transform ${n}ms ease`:"none",_=l?`opacity ${n}ms ease`:"none",z=o>0||l;return{isSwipeDragging:B,backdropStyle:{opacity:v(o),transition:_},mediaAreaStyle:{transform:m(o),transition:H,touchAction:B?"none":void 0,willChange:B?"transform":void 0},overlayContentStyle:z?{opacity:b(o),transition:_}:void 0,swipeHandlers:e?{onPointerDown:P,onPointerMove:f,onPointerUp:N,onPointerCancel:V}:{},dismissAreaStyle:e?{touchAction:B?"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=(h,x)=>{yx(t),e.scrollLeft=h,x&&(r==null||r())};if(Math.abs(c)<.5)return u(n,!0),()=>{};let p=!1,v=0;const b=()=>{t.removeEventListener("transitionend",m),clearTimeout(v)},m=h=>{h.target!==t||h.propertyName!=="transform"||p||(p=!0,b(),u(n,!0))};return t.addEventListener("transitionend",m),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${d}px, 0, 0)`,v=window.setTimeout(()=>{p||(p=!0,b(),u(n,!0))},i+64),()=>{p||(p=!0,b(),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,Ix=.05,Lx=1,Xr=.3,Px=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},gs=(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:v,closeIcon:b,closeIconMaxWidth:m,closeIconColor:h,closeIconHoverColor:x,thumbnailTrigger:S,thumbnailVisibility:P,thumbnailObjectFit:f,thumbnailActive:w,thumbnailActiveColor:N,title1Width:V,title2Width:B,title3Width:H,title1MarginLeft:_=0,title2MarginLeft:z=0,title3MarginLeft:$=0,titleRowMarginBottom:E=0,titleHeaderLayout:j="desktop",contentMarginTop:L,iconMarginLeft:C}=n,T=M=>k.scalingValue(M,i??!1),G=d??n.thumnailSize??.03,A=T(G),Y=T(u),R=T(p??.02),y=T(v??0),U=T(L??0),ee=Ur(U),de=T(C??0),[F,ie]=s.useState(0),I=s.useRef(F);I.current=F;const se=t[F],{title1:J,title2:Se,title3:Re}=Fx(se),pe=hs("title1",gs(n,"title1"),i),he=hs("title2",gs(n,"title2"),i),te=hs("title3",gs(n,"title3"),i),le=j==="mobile",re=!o&&(!i||r),fe=re,xe=re,Te=re,me=si(f),be=me?{"--image-aspect-ratio":ja(f)}:void 0,we=!!(J||Se||Re),g=s.useMemo(()=>Hx(e,J,Se,Re,pe,he,te),[e,F,J,Se,Re,pe,he,te]),X=s.useMemo(()=>({title1Width:V,title2Width:B,title3Width:H}),[V,B,H]),Z=s.useMemo(()=>g.map(M=>X[M.widthKey]),[g,X]),ne=s.useMemo(()=>Vl(g.length,Z),[g.length,Z]),ye=s.useMemo(()=>hp(g.length,Z),[g.length,Z]),K=s.useMemo(()=>g.filter(M=>M.prefix==="title1"),[g]),D=s.useMemo(()=>g.filter(M=>M.prefix==="title2"||M.prefix==="title3"),[g]),ce=s.useMemo(()=>rd(K,X),[K,X]),q=s.useMemo(()=>rd(D,X),[D,X]),ue=s.useCallback((M,oe)=>{const ge=g.indexOf(M);if(!le||oe==="single-row")return{effectiveWidth:ye[ge]??0,resolvedWidth:ne[ge]??0,maxWidth:qr(ge,ne)};if(oe==="two-row-top"){const Ge=K.indexOf(M);return{effectiveWidth:ce.effective[Ge]??0,resolvedWidth:ce.resolved[Ge]??0,maxWidth:qr(Ge,ce.resolved)}}const Ee=D.indexOf(M);return{effectiveWidth:q.effective[Ee]??0,resolvedWidth:q.resolved[Ee]??0,maxWidth:qr(Ee,q.resolved)}},[D,q,ye,ne,g,K,ce,le]),W=s.useCallback(M=>k.scalingValue(M,i??!1),[i]),Le=W(E??0),ae=s.useMemo(()=>({title1MarginLeft:_,title2MarginLeft:z,title3MarginLeft:$}),[_,z,$]),Q=s.useCallback(M=>g.slice(0,M+1).reduce((oe,ge,Ee)=>oe+(ge!=null&&ge.marginLeftKey?ae[ge.marginLeftKey]??0:0)+(ne[Ee]??0),0)+(le?0:_??0),[g,ae,ne,le,_]),Ne=s.useCallback(()=>le?0:_??0,[le,_]),Oe=s.useCallback(M=>D.slice(0,M).reduce((oe,ge,Ee)=>oe+(ge.marginLeftKey?ae[ge.marginLeftKey]??0:0)+(q.resolved[Ee]??0),0),[D,q.resolved,ae]),it=s.useCallback(M=>{const oe=D[M];return Oe(M)+(oe.marginLeftKey?ae[oe.marginLeftKey]??0:0)+(q.resolved[M]??0)},[D,q.resolved,Oe,ae]),qe=(M,oe)=>{const ge=M.marginLeftKey?ae[M.marginLeftKey]??0:0,{effectiveWidth:Ee,resolvedWidth:Ge,maxWidth:pt}=ue(M,oe),Ft=o&&oe==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":M.prefix,style:{...oe==="single-row"?{gridArea:M.prefix}:{},width:W(Ee),...ge>0?{marginLeft:W(ge)}:{}},children:[a.jsx("p",{className:M.className,style:M.style,children:M.text}),Ft&&M.marginLeftKey&&a.jsx("div",{"data-controls":M.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ge),style:{position:"absolute",top:0,left:W(-ge),width:`max(${W(ge)}, 10px)`,height:"100%",pointerEvents:"auto"}}),Ft&&a.jsx("div",{"data-controls":M.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(pt),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:W(-oo/2),width:W(oo),height:"100%",pointerEvents:"auto"}})]},M.className)},Je=()=>{const M=le?-1:g.findIndex(Ee=>Ee.prefix==="title1"),oe=!le&&(o||(_??0)>0)?(()=>{const Ee=_??0,Ge=M>=0?ne[M]:V??0;return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ge),style:{position:"absolute",top:0,left:0,width:`max(${W(Ee)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,ge=g.flatMap((Ee,Ge)=>{if(!Ee.marginLeftKey)return[];const pt=ae[Ee.marginLeftKey]??0,Ft=Wx(g,ne,ae,Ge)+Ne();return a.jsx("div",{"data-controls":Ee.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ne[Ge]),style:{position:"absolute",top:0,left:W(Ft),width:`max(${W(pt)}, 10px)`,height:"100%",pointerEvents:"auto"}},Ee.marginLeftKey)});return oe?[oe,...ge]:ge},ot=()=>g.map((M,oe)=>{const ge=qr(oe,ne),Ge=Q(oe)-oo/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":M.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ge),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:W(Ge),width:W(oo),height:"100%",pointerEvents:"auto"}})},`${M.widthKey}-junction`)}),Ve=()=>D.flatMap((M,oe)=>{if(!M.marginLeftKey)return[];const ge=ae[M.marginLeftKey]??0,Ee=Oe(oe),{resolvedWidth:Ge}=ue(M,"two-row-bottom");return a.jsx("div",{"data-controls":M.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ge),style:{position:"absolute",top:0,left:W(Ee),width:`max(${W(ge)}, 10px)`,height:"100%",pointerEvents:"auto"}},M.marginLeftKey)}),ve=()=>D.map((M,oe)=>{const{maxWidth:ge}=ue(M,"two-row-bottom"),Ge=it(oe)-oo/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":M.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ge),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:W(Ge),width:W(oo),height:"100%",pointerEvents:"auto"}})},`${M.widthKey}-junction`)}),Fe=s.useRef(null),Xe=s.useRef(null),Ye=s.useRef(null),Pe=s.useRef(null),_e=s.useRef([]),Ke=s.useRef([]),Ze=s.useRef(0),st=s.useRef(null),Ue=s.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),De=s.useRef(null),ke=s.useRef(null),ht=s.useRef(0),Be=s.useRef("forward"),ze=s.useRef(0),We=s.useRef(null),mt=s.useRef(!1),rt=t.length>1&&(!o||!!r),St=rt?3:1,Nt=s.useMemo(()=>Array.from({length:St},()=>t).flat(),[t,St]),[jt,xt]=s.useState(!1),[Ce,He]=s.useState(!1),[lt,et]=s.useState(!0),yt=s.useRef(null),Rt=s.useRef(null),At=s.useRef(!1),qt=s.useRef(!1),$t=s.useRef(null),zt=s.useRef(null),on=fe&&!lt,vt=s.useCallback(()=>{fe&&(et(!0),zt.current&&clearTimeout(zt.current),zt.current=setTimeout(()=>{Ue.current.isActive||et(!1)},$x))},[fe]),ft=s.useCallback(()=>{o||qt.current||(qt.current=!0,He(!1),$t.current=setTimeout(()=>{l()},cr))},[o,l]),Me=()=>a.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":on?"true":"false",style:{width:k.scalingValue(m??0,i),height:k.scalingValue(m??0,i),marginRight:de,"--close-icon-hover-color":x},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:ft,"aria-label":"Close",children:a.jsx(mn,{url:b,fill:h,hoverFill:i&&!r?h: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:de,height:"100%",pointerEvents:"auto"}})]}),nt=(M="two-row")=>a.jsx("div",{...M==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:W(_??0),flexShrink:0,...M==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...M==="two-row"&&o?{pointerEvents:"auto"}:{}}}),ct=()=>{const M=g.find(Ee=>Ee.prefix==="title1"),oe=g.filter(Ee=>Ee.prefix==="title2"||Ee.prefix==="title3"),ge=oe.length>0||o||(E??0)>0;return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`${e}-header-row-top`,children:[(_??0)>0||o?nt():null,M&&qe(M,"two-row-top"),b&&Me()]}),ge?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:[Ve(),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:Le,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},gt=()=>a.jsxs(a.Fragment,{children:[(_??0)>0||o?nt("single-row"):null,g.map(M=>qe(M,"single-row")),o?a.jsxs(a.Fragment,{children:[Je(),ot()]}):null,b?Me():null]}),Et=s.useCallback(M=>!!(M.closest("[data-controls]")||M.closest(`.${e}-thumbnails`)||M.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:wt,backdropStyle:dt,mediaAreaStyle:Ot,overlayContentStyle:Lt,swipeHandlers:Ht,dismissAreaStyle:Gt}=gp({enabled:re??!1,onClose:ft,animMs:cr,isBlockedTarget:Et}),_t=()=>{if(!rt||t.length===0)return Ze.current=0,0;const M=Ke.current[0],oe=Ke.current[t.length];if(!M||!oe)return Ze.current;const ge=oe.offsetLeft-M.offsetLeft;return ge>0&&(Ze.current=ge),Ze.current},Vt=(M=!1)=>{if(!rt)return;const oe=Xe.current,ge=_t();!oe||ge<=0||ge<oe.clientWidth*.25||(oe.scrollLeft<=0?(oe.scrollLeft+=ge,M&&(Ue.current.scrollLeft+=ge),mt.current&&(ze.current+=ge)):oe.scrollLeft>=ge*2&&(oe.scrollLeft-=ge,M&&(Ue.current.scrollLeft-=ge),mt.current&&(ze.current-=ge)))},Dt=(M,oe=(ge=>(ge=Xe.current)==null?void 0:ge.scrollLeft)()??0)=>{if(!rt)return M;let Ee=t.length+M,Ge=1/0;for(let pt=0;pt<St;pt++){const Ft=pt*t.length+M,Xt=Ke.current[Ft];if(!Xt)continue;const rn=Math.abs(Xt.offsetLeft-oe);rn<Ge&&(Ge=rn,Ee=Ft)}return Ee},Ct=M=>{const oe=Xe.current;return!M||!oe?!1:M.offsetWidth>oe.clientWidth+1},O=M=>{const oe=Xe.current;if(!M||!oe||!Ct(M))return!1;const ge=M.offsetLeft,Ee=ge+M.offsetWidth;return oe.scrollLeft>=ge-1&&oe.scrollLeft+oe.clientWidth<=Ee+1},Ie=(M=(oe=>(oe=Xe.current)==null?void 0:oe.scrollLeft)()??0)=>{for(let Ee=0;Ee<Ke.current.length;Ee+=1){const Ge=Ke.current[Ee];if(Ge&&O(Ge))return Ee}let ge={flatIndex:0,distance:1/0};return Ke.current.forEach((Ee,Ge)=>{if(!Ee)return;const pt=Math.abs(Ee.offsetLeft-M);pt<ge.distance&&(ge={flatIndex:Ge,distance:pt})}),ge.flatIndex},je=M=>{Xe.current&&Ke.current.forEach(oe=>{oe&&(oe.style.scrollSnapAlign=Ct(oe)&&M==="backward"?"end":"start")})},Ae=(M,oe,ge)=>{const Ee=M-oe,Ge=Ie(oe),pt=Ke.current[Ge];if(O(pt))return Ie(M)%t.length;const Ft=Ke.current[Ge+1],Xt=pt?Ft?Ft.offsetLeft-pt.offsetLeft:pt.offsetWidth:0,rn=Xt>0?Ee>Xt*Xr?1:Ee<-Xt*Xr?-1:0:0;return rn===0?ge:rt?(ge+rn+t.length)%t.length:Math.max(0,Math.min(t.length-1,ge+rn))},tt=s.useCallback((M=!1)=>{if(P!=="on"||o)return;const oe=Pe.current,ge=I.current,Ee=_e.current[ge];if(!oe||!Ee||oe.scrollWidth<=oe.clientWidth)return;const Ge=oe.scrollLeft,pt=Ge+oe.clientWidth,Ft=Ee.offsetLeft,Xt=Ft+Ee.offsetWidth;if(Ft>=Ge&&Xt<=pt)return;const rn=oe.scrollWidth-oe.clientWidth;let Zt=Ge;if(!M&&yt.current===null){const ui=_e.current[ge-1],En=_e.current[ge+1],Qn=ui?Ee.offsetLeft-ui.offsetLeft:En?En.offsetLeft-Ee.offsetLeft:Ee.offsetWidth;Xt>pt?Zt+=Qn:Ft<Ge&&(Zt-=Qn)}else Xt>pt?Zt=Xt-oe.clientWidth:Zt=Ft;oe.scrollLeft=Math.max(0,Math.min(rn,Zt))},[o,P]),Mt=s.useCallback((M=!1)=>{M&&(At.current=!0),Rt.current===null&&(Rt.current=requestAnimationFrame(()=>{Rt.current=null;const oe=At.current;At.current=!1,tt(oe)}))},[tt]),ut=s.useCallback(M=>{if(M===I.current)return;const oe=I.current;I.current=M;const ge=Math.abs(M-oe)>1,Ee=rt&&t.length>1&&(oe===t.length-1&&M===0||oe===0&&M===t.length-1);ie(M),Mt(ge||Ee)},[t.length,rt,Mt]),Tt=()=>{if(!Xe.current||t.length===0||yt.current!==null||Ue.current.isActive&&Ue.current.hasMoved)return;const M=Xe.current.scrollLeft,oe=Ie(M)%t.length;oe!==I.current&&ut(oe)},Ut=()=>{yt.current=null},Wt=M=>{const oe=Xe.current;oe&&(oe.style.scrollSnapType=M?"":"none")},an=()=>{var M;(M=ke.current)==null||M.call(ke),ke.current=null},cn=()=>{We.current!==null&&(cancelAnimationFrame(We.current),We.current=null),mt.current=!1},qn=()=>{const M=Xe.current;if(!M){We.current=null,mt.current=!1;return}const oe=ze.current-M.scrollLeft;if(Math.abs(oe)<.5){M.scrollLeft=ze.current,Vt(),Tt(),We.current=null,mt.current=!1;return}M.scrollLeft+=oe*Ix,Vt(),Tt(),vt(),We.current=requestAnimationFrame(qn)},Yn=()=>{const M=Ye.current;M&&(M.style.transition="",M.style.transform="",M.style.willChange="")},Qi=(M,oe,ge,Ee)=>{Yn(),M.scrollLeft=oe,ht.current=M.scrollLeft,Vt(),ge!==void 0?(I.current=ge,ie(ge)):Tt(),Wt(!0),Ee==null||Ee()},hn=(M,{behavior:oe="smooth",activeIndex:ge,onComplete:Ee}={})=>{const Ge=Xe.current,pt=Ye.current;if(!Ge||!pt)return;if(cn(),an(),Wt(!1),oe==="auto"){Qi(Ge,M,ge,Ee);return}const Ft=Math.abs(M-Ge.scrollLeft),Xt=fx(Ft,bx,Sx,Ge.clientWidth*.55);ke.current=xx(Ge,pt,M,{duration:Xt,easing:wx,onComplete:()=>{ke.current=null,Qi(Ge,M,ge,Ee)}})},Vo=(M="smooth")=>{const oe=Xe.current;if(!oe||t.length===0)return;const ge=Ie()%t.length,Ee=Dt(ge,oe.scrollLeft),Ge=Ke.current[Ee];Ge&&hn(Ge.offsetLeft,{behavior:M,activeIndex:ge})},Go=(M,oe="smooth",ge,Ee)=>{const Ge=Xe.current;if(!Ge||t.length===0)return;const pt=(Ee??Ge.scrollLeft)-M,Ft=Ie(M),Xt=Ke.current[Ft];if(O(Xt)){Wt(!0),Tt();return}const rn=Ke.current[Ft+1],Zt=Xt?rn?rn.offsetLeft-Xt.offsetLeft:Xt.offsetWidth:0;if((Zt>0?pt>Zt*Xr?1:pt<-Zt*Xr?-1:0:0)!==0){const Kl=ge??Ft%t.length,Xo=Ae(Ee??Ge.scrollLeft,M,Kl);xn(Xo,oe);return}const En=Ee??Ge.scrollLeft,Qn=Ie(En),kr=Ke.current[Qn];if(kr&&Math.abs(kr.offsetLeft-En)<1){Wt(!0),Tt();return}Vo("auto")},xn=(M,oe="smooth")=>{const ge=Xe.current;if(!ge||t.length===0)return;const Ee=Dt(M,ge.scrollLeft),Ge=Ke.current[Ee];Ge&&(oe==="smooth"?yt.current=M:yt.current=null,I.current=M,ie(M),Mt(!0),hn(Ge.offsetLeft,{behavior:oe,activeIndex:M,onComplete:oe==="smooth"?Ut:void 0}))},di=()=>{De.current&&(window.removeEventListener("pointerup",De.current),window.removeEventListener("pointercancel",De.current),De.current=null)},Zi=(M,oe,ge,Ee,Ge)=>{const pt=ge-M,Ft=Ee-oe,Xt=Math.abs(pt),rn=Math.abs(Ft);if(Xt<Px||Xt<=rn)return!1;const Zt=pt<0?1:-1,ui=rt?(Ge+Zt+t.length)%t.length:Math.max(0,Math.min(t.length-1,Ge+Zt));return ui===Ge?!1:(xn(ui),!0)},bn=M=>{if(!Ue.current.isActive)return;di();const oe=Xe.current;if(!oe)return;const{scrollLeft:ge,startActiveIndex:Ee,hasMoved:Ge}=Ue.current,pt=oe.scrollLeft;Vt(!0),Ue.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},xt(!1),M!==void 0&&oe.hasPointerCapture(M)&&oe.releasePointerCapture(M),Ge?Go(ge,"smooth",Ee,pt):(Wt(!0),Tt()),vt()},Kn=(M,oe)=>{const ge=st.current;st.current=null,ge&&(Zi(ge.startX,ge.startY,M,oe,ge.startActiveIndex),vt())},Ji=M=>{if(!xe)return;if(M.pointerType==="touch"){if(cn(),Wt(!0),Et(M.target))return;st.current={startX:M.clientX,startY:M.clientY,startActiveIndex:I.current};return}if(M.pointerType!=="mouse"||M.button!==0||Et(M.target))return;const oe=Xe.current;if(!oe)return;cn(),an(),Yn(),yt.current=null,Ue.current={isActive:!0,startX:M.clientX,scrollLeft:oe.scrollLeft,startActiveIndex:I.current,hasMoved:!1},Wt(!1),vt(),oe.setPointerCapture(M.pointerId),di();const ge=Ee=>{Ee.pointerType==="mouse"&&bn(Ee.pointerId)};De.current=ge,window.addEventListener("pointerup",ge),window.addEventListener("pointercancel",ge)},eo=M=>{if(!xe||M.pointerType!=="mouse")return;const oe=Xe.current;if(!oe||!Ue.current.isActive)return;if(M.buttons===0){bn(M.pointerId);return}const ge=M.clientX-Ue.current.startX;Math.abs(ge)>Lx&&(Ue.current.hasMoved=!0,xt(!0)),Ue.current.hasMoved&&(M.preventDefault(),oe.scrollLeft=Ue.current.scrollLeft-ge,Vt(!0),Tt(),vt())},$e=M=>{if(xe){if(M.pointerType==="touch"){M.type==="pointerup"?Kn(M.clientX,M.clientY):st.current=null;return}M.pointerType==="mouse"&&bn(M.pointerId)}},Qe=M=>{!xe||M.pointerType!=="mouse"||bn(M.pointerId)};return jl(),s.useEffect(()=>{const M=requestAnimationFrame(()=>He(!0));return()=>{cancelAnimationFrame(M),an(),di(),Rt.current!==null&&(cancelAnimationFrame(Rt.current),Rt.current=null),$t.current&&clearTimeout($t.current),zt.current&&clearTimeout(zt.current)}},[]),s.useEffect(()=>{if(!fe){et(!0);return}vt();const M=()=>vt();return document.addEventListener("pointermove",M,{passive:!0}),document.addEventListener("pointerdown",M,{passive:!0}),()=>{document.removeEventListener("pointermove",M),document.removeEventListener("pointerdown",M),zt.current&&clearTimeout(zt.current)}},[fe,vt]),s.useEffect(()=>{const M=oe=>{oe.key==="Escape"&&ft()};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[ft]),s.useLayoutEffect(()=>{_t()},[y,t.length,rt]),s.useLayoutEffect(()=>{o||xn(I.current,"auto")},[y,o]),s.useLayoutEffect(()=>{xn(0,"auto")},[t.length,rt]),s.useEffect(()=>{const M=Xe.current;if(!M||o||!re)return;const oe=ge=>{if(ge.preventDefault(),Math.abs(ge.deltaY)<=Math.abs(ge.deltaX))return;const Ee=ge.deltaMode===1?Tx:ge.deltaMode===2?M.clientHeight:1,Ge=ge.deltaY*Ee*Cx;if(Ge!==0){if(an(),mt.current||(mt.current=!0,ze.current=M.scrollLeft,yt.current=null,Wt(!1)),ze.current+=Ge,!rt){const pt=M.scrollWidth-M.clientWidth;ze.current=Math.max(0,Math.min(pt,ze.current))}vt(),We.current===null&&(We.current=requestAnimationFrame(qn))}};return M.addEventListener("wheel",oe,{passive:!1}),()=>{M.removeEventListener("wheel",oe),cn()}},[o,re,rt]),s.useEffect(()=>{const M=Xe.current;if(!M)return;const oe=()=>{Vt(Ue.current.isActive);const Ee=M.scrollLeft,Ge=Ee-ht.current;ht.current=Ee;const pt=Ze.current>0?Ze.current*.5:1/0;if(Ge!==0&&Math.abs(Ge)<pt){const Ft=Ge>0?"forward":"backward";Ft!==Be.current&&(Be.current=Ft,je(Ft))}Ue.current.isActive&&Ue.current.hasMoved||Tt()};M.addEventListener("scroll",oe,{passive:!0});const ge=new ResizeObserver(()=>{_t(),Vt(Ue.current.isActive),je(Be.current),Tt()});return ge.observe(M),()=>{an(),M.removeEventListener("scroll",oe),ge.disconnect()}},[t.length,rt]),a.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{wt||ft()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:Ce?1:0,transition:`opacity ${cr}ms ease`,pointerEvents:Ce?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:c,...dt}}),a.jsxs("div",{ref:Fe,className:`${e}-lightbox-dismiss-area`,style:Gt,...Ht,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:Ot,onClick:M=>M.stopPropagation(),children:a.jsx("div",{ref:Xe,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":xe&&t.length>0?"true":"false","data-mouse-dragging":jt?"true":"false",onPointerDown:Ji,onPointerMove:eo,onPointerUp:$e,onPointerCancel:$e,onLostPointerCapture:Qe,children:a.jsx("div",{ref:Ye,className:`${e}-lightbox-strip-track`,style:{gap:y},children:Nt.map((M,oe)=>{const ge=M.image.objectFit??"contain",Ee=oe%t.length,Ge=Math.floor(oe/t.length),pt=Ur(y),Ft=`calc(-0.5 * (${pt} + ${y}))`;return a.jsxs("div",{ref:Xt=>Ke.current[oe]=Xt,className:`${e}-strip-item`,style:{height:j==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[a.jsx("img",{src:M.image.assetId,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:ge}}),o&&Ee<t.length-1&&Ge===0&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Ft,width:pt,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Ge}-${M.image.assetId}-${Ee}`)})})})}),a.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":on?"true":"false",style:Lt,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:U,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:ee,pointerEvents:"auto",zIndex:3}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:a.jsx("div",{className:`${e}-lightbox-content-area${le?` ${e}-lightbox-content-area-stacked`:""}`,children:(we||b)&&a.jsx("div",{className:`${e}-header ${le?`${e}-header-two-row`:`${e}-header-single-row`}`,children:le?ct():we||b?gt():null})})})]}),t.length>1&&P==="on"&&(()=>{const M=Ur(R),oe=`calc(-0.5 * (${R} + ${M}))`;return a.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:R},children:a.jsx("div",{ref:Pe,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:ge=>ge.stopPropagation(),children:a.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":w,style:{gap:Y,"--thumbnail-active-color":N},children:[t.map((ge,Ee)=>{const Ge=Ur(Y),pt=`calc(-0.5 * (${Ge} + ${Y}))`;return a.jsxs("div",{ref:Ft=>{_e.current[Ee]=Ft},style:{position:"relative",flex:"0 0 auto"},children:[a.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":F===Ee?"true":"false",onClick:()=>re&&S==="click"&&xn(Ee),onMouseEnter:()=>Te&&S==="hover"&&xn(Ee),"aria-label":ge.image.name?`View ${ge.image.name}`:`View image ${Ee+1}`,"aria-current":F===Ee?"true":void 0,children:a.jsx("img",{className:`${e}-thumb-image${me?` ${e}-thumb-image-cover`:""}`,src:ge.image.assetId,alt:"",draggable:!1,style:{...be,maxWidth:A,maxHeight:A,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:pt,width:Ge,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${ge.image.assetId}-${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:M,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function Dx(e){return`
14353
14353
  .${e}-wrapper {
14354
14354
  position: relative;
14355
14355
  width: 100%;
@@ -14734,7 +14734,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
14734
14734
  pointer-events: auto;
14735
14735
  z-index: 10;
14736
14736
  }
14737
- `}const Bx=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r})=>{const{prefix:l}=F.useScopedStyles(),{cover:c,coverFit:d}=e,u=s.useRef(null),[p,y]=s.useState(!1),v=t??[],g=p&&v.length>0,m=()=>{v.length!==0&&y(!0)};return s.useEffect(()=>{!n||i||o||y(!1)},[n,i,o]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:u,className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Dx(l)}}),c&&a.jsx("div",{className:`${l}-cover ${si(d)?`${l}-ratio-wrapper-cover`:`${l}-ratio-wrapper-fit`}`,onClick:()=>m(),style:{...si(d)?{"--image-aspect-ratio":ja(d)}:{}},"aria-label":"Open image gallery",children:a.jsx("img",{className:`${l}-cover-image ${si(d)?`${l}-cover-image-cover`:`${l}-cover-image-fit`}`,src:c,alt:"cover"})})]}),g&&typeof document<"u"&&(()=>{const x=(r?document.getElementById(r):null)??document.body;return Xn.createPortal(a.jsx(Ox,{prefix:l,images:v,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>y(!1)}),x)})()]})},zx=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
14737
+ `}const Bx=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r})=>{const{prefix:l}=k.useScopedStyles(),{cover:c,coverFit:d}=e,u=s.useRef(null),[p,v]=s.useState(!1),b=t??[],m=p&&b.length>0,h=()=>{b.length!==0&&v(!0)};return s.useEffect(()=>{!n||i||o||v(!1)},[n,i,o]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:u,className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Dx(l)}}),c&&a.jsx("div",{className:`${l}-cover ${si(d)?`${l}-ratio-wrapper-cover`:`${l}-ratio-wrapper-fit`}`,onClick:()=>h(),style:{...si(d)?{"--image-aspect-ratio":ja(d)}:{}},"aria-label":"Open image gallery",children:a.jsx("img",{className:`${l}-cover-image ${si(d)?`${l}-cover-image-cover`:`${l}-cover-image-fit`}`,src:c,alt:"cover"})})]}),m&&typeof document<"u"&&(()=>{const x=(r?document.getElementById(r):null)??document.body;return Xn.createPortal(a.jsx(Ox,{prefix:l,images:b,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>v(!1)}),x)})()]})},zx=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
14738
14738
  import { createPortal } from 'react-dom';
14739
14739
  import { CommonComponentProps } from '../props';
14740
14740
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -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:{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"}]}},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.assetId",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:L=0,titleRowMarginBottom:_=0,titleHeaderLayout:G="single-row",countCloseGap:$=0,closeIcon:I,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),P=`${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,Le=!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,Pe]=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:Le,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(()=>{Pe(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),Pe(null),Se.current=null},400)):($e(),me(null),Ce(!1),ee(void 0),ge(void 0),Pe(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),Pe(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,Pt=(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=I!==null,Vt=Pt||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:L}),[z,L]),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(()=>Lo(ke.length,Je),[ke.length,Je]),dt=s.useMemo(()=>vr(ke.length,Je),[ke.length,Je]),Lt=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(Lt,xt),[Lt,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=Lt.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,Lt,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=Lo(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(-Ln/2),width:w(Ln),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"}:{}}})},Ie=()=>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?It():null]}),Ht=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[At||Pt?Ie():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||Pt?Ie():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()]}),It=()=>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:I??"",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||Pt?Ie():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)-Ln/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(Ln),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)-Ln/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(Ln),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:P,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.assetId,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.assetId,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.assetId}-${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`
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:{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"}]}},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.assetId",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:v,coverFit:b,backgroundColor:m,imageGap:h,maxWidth:x,maxHeight:S,textTransition:P,title1Width:f,title2Width:w,title3Width:N,title1MarginLeft:V=0,title2MarginLeft:B=0,title3MarginLeft:H=0,titleRowMarginBottom:_=0,titleHeaderLayout:z="single-row",countCloseGap:$=0,closeIcon:E,closeIconMaxWidth:j,closeIconColor:L,closeIconHoverColor:C,contentMarginTop:T=0,iconMarginRight:G=0}=n,A=s.useCallback($e=>k.scalingValue($e,i??!1),[i]),Y=A(h??0),R=`${x}%`,y=`${S}%`,U=A($),ee=A(T),de=A(G),F=zi("title1",Bi(n,"title1"),i),ie=zi("title2",Bi(n,"title2"),i),I=zi("title3",Bi(n,"title3"),i),se=zi("count",Bi(n,"count"),i),J=z==="mobile",Se=!i||!!r,Re=!o&&(!i||!!r),pe=s.useMemo(()=>pa(t,v),[t,v]),[he,te]=s.useState(l),le=pe[he],re=le==null?void 0:le.entry,[fe,xe]=s.useState(!1),[Te,me]=s.useState(null),[be,we]=s.useState(!1),[g,X]=s.useState(null),[Z,ne]=s.useState(!1),[ye,K]=s.useState(0),[D,ce]=s.useState(),[q,ue]=s.useState(),[W,Le]=s.useState(null),ae=s.useRef(null),Q=s.useRef(0),Ne=s.useRef(0),Oe=s.useRef(0),it=s.useRef(!1),qe=s.useRef(null),Je=s.useRef(null),ot=s.useRef(null),Ve=s.useRef(null),ve=s.useRef(null),Fe=s.useRef(null),Xe=s.useRef(null),Ye=s.useCallback(()=>{const $e=Je.current;if(!$e)return;const Qe=$e.closest(`.${e}-lightbox-content-area`);if(!Qe)return $e.getBoundingClientRect().width;const M=Array.from(Qe.children).reduce((oe,ge)=>!(ge instanceof HTMLElement)||ge.contains($e)?oe:oe+ge.getBoundingClientRect().width,0);return Qe.getBoundingClientRect().width-M},[e]),Pe=s.useCallback(()=>{ae.current&&(clearTimeout(ae.current),ae.current=null)},[]),_e=s.useCallback($e=>{$e===Q.current&&(X(null),ne(!1))},[]),Ke=s.useCallback(()=>{o||it.current||(it.current=!0,u==null||u(),xe(!1),qe.current=setTimeout(()=>{p()},300))},[o,u,p]),Ze=s.useCallback($e=>!!($e.closest("[data-controls]")||$e.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:st,backdropStyle:Ue,mediaAreaStyle:De,overlayContentStyle:ke,swipeHandlers:ht,dismissAreaStyle:Be}=gp({enabled:Re,onClose:Ke,animMs:300,isBlockedTarget:Ze}),ze=s.useCallback($e=>{c&&Ku($e+1,d,!0)},[c,d]),We=s.useCallback($e=>{if($e)return $e.getBoundingClientRect().height},[]),mt=s.useCallback($e=>{if(pe.length===0)return;const Qe=($e%pe.length+pe.length)%pe.length;if(Qe===he)return;const M=pe[he],oe=pe[Qe];Q.current+=1;const ge=Q.current,Ee=P==="fade"&&Fc(M==null?void 0:M.entry)!==Fc(oe==null?void 0:oe.entry),Ge=We(ot.current),pt=Ee?(()=>{const Xt=Ye();Xn.flushSync(()=>{Le(oe.entry)}),ot.current&&Xt&&(ot.current.style.width=`${Xt}px`);const rn=We(ot.current);return ot.current&&(ot.current.style.width=""),{measuredIncomingTitlesHeight:rn,incomingTitlesMeasureWidth:Xt}})():void 0,Ft=Math.max(Ge??0,(pt==null?void 0:pt.measuredIncomingTitlesHeight)??0)||void 0;K(ge),X(he),ne(!0),te(Qe),ze(Qe),Oe.current=Qe,Ee?(Pe(),Ft&&ce(Ft),pt!=null&&pt.incomingTitlesMeasureWidth&&ue(pt.incomingTitlesMeasureWidth),me((M==null?void 0:M.entryIndex)??null),we(!0),Ne.current=oe.entryIndex,ae.current=setTimeout(()=>{me(null),we(!1),ce(void 0),ue(void 0),Le(null),ae.current=null},400)):(Pe(),me(null),we(!1),ce(void 0),ue(void 0),Le(null),Ne.current=oe.entryIndex)},[he,Pe,Ye,We,pe,ze,P]),rt=s.useCallback(()=>{Xe.current=null},[]),St=s.useCallback($e=>{!Se||pe.length<=1||$e.pointerType==="mouse"&&$e.button!==0||$e.target.closest("[data-controls]")||(Xe.current={startX:$e.clientX,startY:$e.clientY,pointerId:$e.pointerId})},[Se,pe.length]),Nt=s.useCallback($e=>{var Xt;if(!Se||pe.length<=1||$e.pointerType==="mouse"&&$e.button!==0)return;if(st){rt();return}const Qe=Xe.current;if(!Qe||Qe.pointerId!==$e.pointerId||(rt(),$e.target.closest("[data-controls]")))return;const oe=$e.clientX-Qe.startX,ge=$e.clientY-Qe.startY,Ee=Math.abs(oe),Ge=Math.abs(ge);if(Ee>=sv&&Ee>Ge){mt(oe>0?he-1:he+1);return}if(Ee>Mc||Ge>Mc)return;const pt=(Xt=Ve.current)==null?void 0:Xt.getBoundingClientRect(),Ft=pt?pt.left+pt.width/2:window.innerWidth/2;mt($e.clientX<Ft?he-1:he+1)},[he,Se,mt,st,rt,pe.length]),jt=s.useCallback($e=>{const Qe=Xe.current;(Qe==null?void 0:Qe.pointerId)===$e.pointerId&&rt()},[rt]);jl(),s.useEffect(()=>{Fe.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const $e=requestAnimationFrame(()=>{xe(!0),requestAnimationFrame(()=>{ve.current?ve.current.focus():Ve.current&&Ve.current.focus()})});return()=>{cancelAnimationFrame($e),qe.current&&clearTimeout(qe.current),ae.current&&clearTimeout(ae.current);const Qe=Fe.current;Qe&&document.contains(Qe)&&Qe.focus({preventScroll:!0})}},[]),s.useEffect(()=>{var $e;P!=="fade"&&(Ne.current=(($e=pe[he])==null?void 0:$e.entryIndex)??0,Pe(),me(null),we(!1),ce(void 0),ue(void 0))},[he,Pe,pe,P]),s.useEffect(()=>{const $e=Qe=>{if(Qe.key==="Escape"){Ke();return}if(Qe.key==="ArrowLeft"&&pe.length>1){mt(he-1);return}if(Qe.key==="ArrowRight"&&pe.length>1){mt(he+1);return}if(Qe.key==="Tab"&&Ve.current){const M=Ve.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),oe=Array.from(M).filter(pt=>!pt.closest('[aria-hidden="true"]'));if(oe.length===0)return;const ge=oe[0],Ee=oe[oe.length-1],Ge=document.activeElement;Qe.shiftKey?(Ge===ge||!Ve.current.contains(Ge))&&(Qe.preventDefault(),Ee.focus()):(Ge===Ee||!Ve.current.contains(Ge))&&(Qe.preventDefault(),ge.focus())}};return window.addEventListener("keydown",$e),()=>window.removeEventListener("keydown",$e)},[mt,Ke,he,pe.length]),s.useLayoutEffect(()=>{Pe(),Q.current=0,K(0),X(null),ne(!1),me(null),we(!1),ce(void 0),ue(void 0),Le(null),te($e=>{const Qe=Math.max(0,pe.length-1);return Math.min($e,Qe)})},[Pe,t.length,v,pe.length]),s.useLayoutEffect(()=>{var M;const $e=Math.max(0,pe.length-1),Qe=Math.min(Math.max(0,l),$e);Oe.current=Qe,Ne.current=((M=pe[Qe])==null?void 0:M.entryIndex)??0,te(Qe)},[l]);const xt=Te!==null?t[Te]:null,Ce=g!==null?pe[g]:null,He=(re==null?void 0:re.title1)||(re==null?void 0:re.title2)||(re==null?void 0:re.title3)||(xt==null?void 0:xt.title1)||(xt==null?void 0:xt.title2)||(xt==null?void 0:xt.title3),lt=hv(v,pe,t),et=E!==null,yt=He||lt||et,Rt=lt&&et?{gap:U}:void 0,At=`${e}-titles-stack${J?` ${e}-titles-stack-stacked`:""}`,qt=`${e}-titles-layer-out${J?` ${e}-titles-layer-out-stacked`:""}`,$t=`${e}-titles-layer-out`,zt=(V??0)>0||o,on=A(_),vt=s.useMemo(()=>({title1Width:f??bo.title1Width,title2Width:w??bo.title2Width,title3Width:N??bo.title3Width}),[f,w,N]),ft=s.useMemo(()=>({title2MarginLeft:B,title3MarginLeft:H}),[B,H]),Me=s.useMemo(()=>re?wi(e,re,F,ie,I):[],[e,re,F,ie,I]),nt=s.useMemo(()=>Me.map($e=>vt[$e.widthKey]),[Me,vt]),ct=s.useMemo(()=>Lo(Me.length,nt),[Me.length,nt]),gt=s.useMemo(()=>vr(Me.length,nt),[Me.length,nt]),Et=s.useMemo(()=>Me.filter($e=>$e.prefix==="title1"),[Me]),wt=s.useMemo(()=>Me.filter($e=>$e.prefix==="title2"||$e.prefix==="title3"),[Me]),dt=s.useMemo(()=>$i(Et,vt),[Et,vt]),Ot=s.useMemo(()=>$i(wt,vt),[wt,vt]),Lt=s.useCallback(($e,Qe)=>{const M=Me.findIndex(ge=>ge.prefix===$e.prefix);if(!J||Qe==="single-row")return{effectiveWidth:gt[M]??0,resolvedWidth:ct[M]??0,maxWidth:yn(M,ct)};if(Qe==="two-row-top"){const ge=Et.findIndex(Ee=>Ee.prefix===$e.prefix);return{effectiveWidth:dt.effective[ge]??0,resolvedWidth:dt.resolved[ge]??0,maxWidth:yn(ge,dt.resolved)}}const oe=wt.findIndex(ge=>ge.prefix===$e.prefix);return{effectiveWidth:Ot.effective[oe]??0,resolvedWidth:Ot.resolved[oe]??0,maxWidth:yn(oe,Ot.resolved)}},[Me,wt,Ot,gt,ct,Et,dt,J]),Ht=s.useCallback($e=>ep(Me,ct,ft,$e)+(J?0:V??0),[Me,ct,ft,J,V]),Gt=s.useCallback(()=>J?0:V??0,[J,V]),_t=s.useCallback($e=>wt.slice(0,$e).reduce((Qe,M,oe)=>Qe+(M.marginLeftKey?ft[M.marginLeftKey]??0:0)+(Ot.resolved[oe]??0),0),[wt,Ot.resolved,ft]),Vt=s.useCallback($e=>{const Qe=wt[$e];return _t($e)+(Qe.marginLeftKey?ft[Qe.marginLeftKey]??0:0)+(Ot.resolved[$e]??0)},[wt,Ot.resolved,_t,ft]),Dt=s.useCallback(($e,Qe,M)=>{if(!J||M==="single-row"){const pt=$e.findIndex(Zt=>Zt.prefix===Qe.prefix),Ft=$e.map(Zt=>vt[Zt.widthKey]),Xt=Lo($e.length,Ft);return{effectiveWidth:vr($e.length,Ft)[pt]??0,resolvedWidth:Xt[pt]??0,maxWidth:yn(pt,Xt)}}if(M==="two-row-top"){const pt=$e.filter(Zt=>Zt.prefix==="title1"),Ft=pt.findIndex(Zt=>Zt.prefix===Qe.prefix),{resolved:Xt,effective:rn}=$i(pt,vt);return{effectiveWidth:rn[Ft]??0,resolvedWidth:Xt[Ft]??0,maxWidth:yn(Ft,Xt)}}const oe=$e.filter(pt=>pt.prefix==="title2"||pt.prefix==="title3"),ge=oe.findIndex(pt=>pt.prefix===Qe.prefix),{resolved:Ee,effective:Ge}=$i(oe,vt);return{effectiveWidth:Ge[ge]??0,resolvedWidth:Ee[ge]??0,maxWidth:yn(ge,Ee)}},[vt,J]),Ct=($e,Qe,M)=>{const oe=$e.marginLeftKey?ft[$e.marginLeftKey]??0:0,{effectiveWidth:ge,resolvedWidth:Ee,maxWidth:Ge}=M??Lt($e,Qe),pt=Math.max(oe,ni),Ft=o&&Qe==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":$e.prefix,style:{width:A(ge),...oe>0?{marginLeft:A(oe)}:{}},children:[a.jsx("p",{className:$e.className,style:$e.style,children:$e.text}),Ft&&$e.marginLeftKey?a.jsx("div",{"data-controls":$e.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ee),style:{position:"absolute",top:0,left:A(-oe),width:A(pt),height:"100%",pointerEvents:"auto"}}):null,Ft?a.jsx("div",{"data-controls":$e.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ge),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:A(-Ln/2),width:A(Ln),height:"100%",pointerEvents:"auto"}}):null]},$e.className)},O=($e="two-row")=>{const Qe=Me.findIndex(ge=>ge.prefix==="title1"),M=Qe>=0?ct[Qe]:vt.title1Width,oe=$e==="two-row"&&o;return a.jsx("div",{...oe?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(M)}:{},style:{width:A(V??0),flexShrink:0,alignSelf:"stretch",...oe?{pointerEvents:"auto"}:{}}})},Ie=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:F,"aria-hidden":"true",children:" "}),je=()=>a.jsx("span",{className:`${e}-entry-counter`,style:se,"aria-live":"polite","aria-atomic":"true",children:gv(pe,he,v,t)}),Ae=()=>lt?o&&et?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(U)} + ${U}))`,width:as(U),height:"100%",pointerEvents:"auto",zIndex:3}})]}):je():null,tt=()=>!lt&&!et?null:a.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Rt,children:[Ae(),et?Tt():null]}),Mt=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[lt||He?Ie():null,zt?O("single-row"):null,Wt(re),a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),tt(),xn()]}),ut=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[lt||He?Ie():null,zt?O("single-row"):null,a.jsxs("div",{className:`${e}-titles-row-titles`,style:be&&D?{minHeight:D}:void 0,children:[a.jsx("div",{ref:ot,className:At,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Yn(W||re)}),a.jsxs("div",{ref:Je,className:At,style:{position:be?"absolute":"relative",inset:be?0:void 0,width:"100%",...be&&q?{width:q,maxWidth:"100%"}:void 0},children:[xt&&be?a.jsx("div",{className:`${qt} ${e}-titles-fade-out`,children:Yn(xt)}):null,a.jsx("div",{className:`${e}-titles-layer-in${be?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Yn(re)})]})]}),tt(),xn()]}),Tt=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:k.scalingValue(j??0,i),height:k.scalingValue(j??0,i),marginRight:de,"--close-icon-hover-color":C},children:[a.jsx("button",{ref:ve,type:"button",className:`${e}-close-icon-inner`,onClick:Ke,"aria-label":"Close",children:a.jsx(mn,{url:E??"",fill:L,hoverFill:i&&!r?L:C,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:de,height:"100%",pointerEvents:"auto"}})]}),Ut=($e,Qe)=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[lt||He?Ie():null,zt?O("two-row"):null,Qe!==void 0?a.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:Qe},children:$e}):a.jsxs(a.Fragment,{children:[$e,a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),tt()]}),Wt=$e=>{if(!$e)return null;const Qe=wi(e,$e,F,ie,I);return a.jsx(a.Fragment,{children:Qe.map(M=>Ct(M,"single-row",Dt(Qe,M,"single-row")))})},an=$e=>{if(!$e)return null;const Qe=wi(e,$e,F,ie,I),M=Qe.find(oe=>oe.prefix==="title1");return M?Ct(M,"two-row-top",Dt(Qe,M,"two-row-top")):null},cn=($e,Qe=!1)=>{const M=$e?wi(e,$e,F,ie,I):[],oe=M.filter(Ge=>Ge.prefix==="title2"||Ge.prefix==="title3"),ge=o&&Qe;return oe.length>0||ge||(_??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(Ge=>Ct(Ge,"two-row-bottom",Dt(M,Ge,"two-row-bottom"))),Qe&&o?a.jsxs(a.Fragment,{children:[Vo(),Go()]}):null]}):null,(_??0)>0||ge?a.jsx("div",{"data-controls":ge?"titleRowMarginBottom":void 0,"data-controls-axis":ge?"y":void 0,"data-controls-reverse":ge?"":void 0,className:ge?`${e}-control`:void 0,style:{height:on,width:"100%",flexShrink:0,pointerEvents:ge?"auto":"none"}}):null]}):null},qn=($e,Qe=!1)=>a.jsxs(a.Fragment,{children:[Ut(an($e)),cn($e,Qe)]}),Yn=$e=>J?a.jsx("div",{className:`${e}-titles-row-two-row`,children:qn($e)}):$e?a.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Wt($e)}):null,Qi=()=>{const $e=J?-1:Me.findIndex(oe=>oe.prefix==="title1"),Qe=!J&&(o||(V??0)>0)?(()=>{const oe=V??0,ge=$e>=0?ct[$e]:vt.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(ge),style:{position:"absolute",top:0,left:0,width:A(Ee),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,M=Me.flatMap((oe,ge)=>{if(!oe.marginLeftKey)return[];const Ee=ft[oe.marginLeftKey]??0,Ge=Ju(Me,ct,ft,ge)+Gt(),pt=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(ct[ge]),style:{position:"absolute",top:0,left:A(Ge),width:A(pt),height:"100%",pointerEvents:"auto"}},oe.marginLeftKey)});return Qe?[Qe,...M]:M},hn=()=>Me.map(($e,Qe)=>{const M=yn(Qe,ct),ge=Ht(Qe)-Ln/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":$e.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(M),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:A(ge),width:A(Ln),height:"100%",pointerEvents:"auto"}})},`${$e.widthKey}-junction`)}),Vo=()=>wt.flatMap(($e,Qe)=>{if(!$e.marginLeftKey)return[];const M=ft[$e.marginLeftKey]??0,oe=_t(Qe),ge=Math.max(M,ni),{resolvedWidth:Ee}=Lt($e,"two-row-bottom");return a.jsx("div",{"data-controls":$e.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ee),style:{position:"absolute",top:0,left:A(oe),width:A(ge),height:"100%",pointerEvents:"auto"}},$e.marginLeftKey)}),Go=()=>wt.map(($e,Qe)=>{const{maxWidth:M}=Lt($e,"two-row-bottom"),ge=Vt(Qe)-Ln/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":$e.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(M),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:A(ge),width:A(Ln),height:"100%",pointerEvents:"auto"}})},`${$e.widthKey}-junction`)}),xn=()=>!o||J?null:a.jsxs(a.Fragment,{children:[Qi(),hn()]}),di=$e=>{const Qe=!$e.objectFit&&si(b);return{className:`${e}-slide-image-cell${Qe?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:R,maxHeight:y,...Qe?{"--image-aspect-ratio":ja(b)}:{}}}},Zi=$e=>$e.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":$e.objectFit}}:si(b)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},bn=$e=>{if($e.length===0)return null;const Qe=$e.length>1,M=as(Y),oe=`calc(-0.5 * (${M} + ${Y}))`;if($e.length===1){const ge=$e[0];return a.jsx("div",{...di(ge),children:a.jsx("img",{...Zi(ge),src:ge.assetId,alt:ge.name??"",draggable:!1})})}return a.jsx("div",{className:`${e}-slide-inner`,style:Qe?{gap:Y}:void 0,children:$e.map((ge,Ee)=>a.jsxs("div",{...di(ge),children:[a.jsx("img",{...Zi(ge),src:ge.assetId,alt:ge.name??"",draggable:!1}),o&&Qe&&Ee<$e.length-1&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:oe,width:M,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${ge.assetId}-${Ee}`))})},Kn=!!(re!=null&&re.title2||re!=null&&re.title3||xt!=null&&xt.title2||xt!=null&&xt.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:ot,className:At,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:qn(W||re)}),a.jsxs("div",{ref:Je,className:`${e}-titles-row-two-row`,style:{...be&&D?{minHeight:D}:void 0,...be&&q?{width:q,maxWidth:"100%"}:void 0},children:[Ut(a.jsxs("div",{className:At,style:{position:be?"absolute":"relative",inset:be?0:void 0,width:"100%"},children:[xt&&be?a.jsx("div",{className:`${$t} ${e}-titles-fade-out`,children:an(xt)}):null,a.jsx("div",{className:`${e}-titles-layer-in${be?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:an(re)})]}),be&&D?D:void 0),Kn?a.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[xt&&be?a.jsx("div",{className:`${qt} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:cn(xt)}):null,a.jsx("div",{className:`${e}-titles-layer-in${be?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${J?` ${e}-titles-layer-in-stacked`:""}`,children:cn(re,!0)})]}):null]})]}),eo=()=>{const $e=Kn;return a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...$e?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:$e?void 0:{flex:"0 0 auto",height:"auto"},children:qn(re,!0)}),xn()]})};return a.jsxs("div",{ref:Ve,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{st||Ke()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:et?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:m,...Ue}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:Be,...ht,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:De,onClick:$e=>$e.stopPropagation(),children:a.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":Se&&pe.length>1?"true":"false",onPointerDown:Se?St:void 0,onPointerUp:Se?Nt:void 0,onPointerCancel:Se?jt:void 0,children:a.jsxs("div",{className:`${e}-slide-stack`,children:[Ce&&Z?a.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:$e=>{$e.target===$e.currentTarget&&_e(ye)},children:a.jsx("div",{className:`${e}-slide-area`,children:bn(Ce.images)})},`slide-out-${ye}`):null,a.jsx("div",{className:`${e}-slide-layer-in${Z?` ${e}-slide-fade-in`:""}`,children:a.jsx("div",{className:`${e}-slide-area`,children:le?bn(le.images):null})},`slide-in-${ye}-${he}`)]})})}),a.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:ke,children:[a.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:ee,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:yt&&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?P==="fade"?Ji():eo():P==="fade"?ut():Mt()})})})]})]})]})};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),M=s.useRef(!1),f=s.useRef(!1),S=s.useRef(!1),W=s.useMemo(()=>(t??[]).filter($=>Io($).length>0),[t]),q=g&&W.length>0,z=!n,L=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 I=pa(W,y),D=Math.max(0,Math.min($,I.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 I=Ac($,pa(W,y).length);I<0||(b(I),m(!0))},[W,d,z,y]),s.useEffect(()=>{if(!z)return;const $=()=>{if(S.current){S.current=!1,m(!1);return}const I=kc(d);if(!I){m(!1);return}const D=Ac(I,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:L,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}=k.useScopedStyles(),d=(l==null?void 0:l.itemId)??null,{cover:u,coverFit:p,type:v}=e,b=s.useRef(null),[m,h]=s.useState(!1),[x,S]=s.useState(0),P=s.useRef(!1),f=s.useRef(!1),w=s.useRef(!1),N=s.useMemo(()=>(t??[]).filter($=>Io($).length>0),[t]),V=m&&N.length>0,B=!n,H=s.useCallback(()=>{B&&(w.current=!0,cv(f.current,d),f.current=!1)},[B,d]),_=($=0)=>{if(N.length===0||n&&!i&&!o)return;const E=pa(N,v),j=Math.max(0,Math.min($,E.length-1));if(S(j),B){const L=Qu();Ku(j+1,d,L),f.current=!L}h(!0)},z=s.useCallback(()=>{h(!1),w.current=!1},[]);return s.useEffect(()=>{!n||i||o||h(!1)},[n,i,o]),s.useEffect(()=>{if(!B||typeof window>"u")return;const $=window.history.scrollRestoration;return window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration=$}},[B]),s.useEffect(()=>{if(!B||P.current)return;P.current=!0;const $=kc(d);if(!$)return;const E=Ac($,pa(N,v).length);E<0||(S(E),h(!0))},[N,d,B,v]),s.useEffect(()=>{if(!B)return;const $=()=>{if(w.current){w.current=!1,h(!1);return}const E=kc(d);if(!E){h(!1);return}const j=Ac(E,pa(N,v).length);if(j<0){h(!1);return}f.current=!1,S(j),h(!0)};return window.addEventListener("popstate",$),()=>window.removeEventListener("popstate",$)},[N,d,B,v]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:b,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]}),V&&typeof document<"u"&&(()=>{const $=(r?document.getElementById(r):null)??document.body;return Xn.createPortal(a.jsx(Kx,{prefix:c,entries:N,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:x,enableUrlSync:B,journalItemId:d,onBeforeClose:H,onClose:z}),$)})()]})},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';
@@ -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,M]=s.useState(!1),[f,S]=s.useState(!1),W=s.useRef(new Map),{imageSize:q=sb,cursor:z="system",target:L="area",position:_="random",visible:G="all",defaultCursor:$=null,hoverCursor:I=null}=e,D=t.filter(P=>{var A;return!!((A=P==null?void 0:P.image)!=null&&A.assetId)}),E=s.useMemo(()=>cb(i),[i]),T=s.useCallback((P,A,j=l)=>{if(!o)return;const ie=o.getBoundingClientRect(),ae=P-ie.left,O=A-ie.top;v({x:ae,y:O}),m(lb(ae,O,j,o,z,L,I,$))},[o,l,z,L,I,$]);s.useEffect(()=>{const P=[...D.map(j=>j.image.assetId),$,I].filter(j=>!!j);if(P.length===0){W.current=new Map,S(!0);return}let A=!1;return S(!1),ub(P).then(j=>{A||(W.current=j,S(!0))}),()=>{A=!0}},[t,$,I]),s.useEffect(()=>{if(!o)return;const P=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",P),window.addEventListener("scroll",A,!0),()=>{o.removeEventListener("mousemove",P),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=(P,A,j,ie={})=>{var J,be;if(!((J=P==null?void 0:P.image)!=null&&J.assetId))return null;const ae=((be=W.current.get(P.image.assetId))==null?void 0:be.aspectRatio)??1,O=sd(P.image.assetId,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++,assetId:P.image.assetId,link:P.link,name:P.image.name,x:N,y:le,xRatio:N/A,yRatio:le/j,aspectRatio:ae,widthPx:O}},V=()=>{if(!o)return;const P=o.getBoundingClientRect(),A=P.width,j=P.height;A===0||j===0||c(ie=>ie.length===0?ie:ie.map(ae=>{const O=q.sizeType==="random"?ae.widthPx:sd(ae.assetId,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 P=o.getBoundingClientRect(),A=P.width,j=P.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 P=new ResizeObserver(V);return P.observe(o),window.addEventListener("resize",V),()=>{P.disconnect(),window.removeEventListener("resize",V)}},[o,_,q,l.length]),s.useEffect(()=>{G==="last One"&&c(P=>P.length>0?[P[P.length-1]]:[])},[G]);const w=P=>{if(!o||D.length===0||!f)return;const A=o.getBoundingClientRect(),j=P.clientX-A.left,ie=P.clientY-A.top;if(L==="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(P.clientX,P.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(P=>a.jsx("div",{className:`${i}-wrapper`,style:{top:`${P.y}px`,left:`${P.x}px`,width:`${P.widthPx}px`,cursor:U?"none":"default"},children:L==="area"&&P.link?a.jsx("a",{href:P.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:a.jsx("img",{src:P.assetId,alt:P.name,className:`${i}-image`})}):a.jsx("img",{src:P.assetId,alt:P.name,className:`${i}-image`})},P.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}=k.useScopedStyles(),[o,r]=s.useState(null),[l,c]=s.useState([]),[d,u]=s.useState(0),p=s.useRef(0),[v,b]=s.useState({x:0,y:0}),[m,h]=s.useState("none"),x=s.useRef({x:0,y:0}),[S,P]=s.useState(!1),[f,w]=s.useState(!1),N=s.useRef(new Map),{imageSize:V=sb,cursor:B="system",target:H="area",position:_="random",visible:z="all",defaultCursor:$=null,hoverCursor:E=null}=e,j=t.filter(R=>{var y;return!!((y=R==null?void 0:R.image)!=null&&y.assetId)}),L=s.useMemo(()=>cb(i),[i]),C=s.useCallback((R,y,U=l)=>{if(!o)return;const ee=o.getBoundingClientRect(),de=R-ee.left,F=y-ee.top;b({x:de,y:F}),h(lb(de,F,U,o,B,H,E,$))},[o,l,B,H,E,$]);s.useEffect(()=>{const R=[...j.map(U=>U.image.assetId),$,E].filter(U=>!!U);if(R.length===0){N.current=new Map,w(!0);return}let y=!1;return w(!1),ub(R).then(U=>{y||(N.current=U,w(!0))}),()=>{y=!0}},[t,$,E]),s.useEffect(()=>{if(!o)return;const R=U=>{U.stopPropagation(),x.current={x:U.clientX,y:U.clientY},C(U.clientX,U.clientY)},y=()=>{S&&C(x.current.x,x.current.y)};return o.addEventListener("mousemove",R),window.addEventListener("scroll",y,!0),()=>{o.removeEventListener("mousemove",R),window.removeEventListener("scroll",y,!0)}},[o,S,C]),s.useEffect(()=>{!o||!S||C(x.current.x,x.current.y)},[l,o,S,C]),s.useEffect(()=>{S||h("none")},[S]);const T=(R,y,U,ee={})=>{var J,Se;if(!((J=R==null?void 0:R.image)!=null&&J.assetId))return null;const de=((Se=N.current.get(R.image.assetId))==null?void 0:Se.aspectRatio)??1,F=sd(R.image.assetId,V,N.current),{heightPx:ie}=Ca(F,de);let I=0,se=0;return _==="same"?{x:I,y:se}=ad(y,U,F,de):(I=ee.x??Math.random()*y,se=ee.y??Math.random()*U,{x:I,y:se}=qs(I,se,y,U,F,ie)),{id:p.current++,assetId:R.image.assetId,link:R.link,name:R.image.name,x:I,y:se,xRatio:I/y,yRatio:se/U,aspectRatio:de,widthPx:F}},G=()=>{if(!o)return;const R=o.getBoundingClientRect(),y=R.width,U=R.height;y===0||U===0||c(ee=>ee.length===0?ee:ee.map(de=>{const F=V.sizeType==="random"?de.widthPx:sd(de.assetId,V,N.current),{heightPx:ie}=Ca(F,de.aspectRatio);if(_==="same"){const{x:J,y:Se}=ad(y,U,F,de.aspectRatio);return{...de,x:J,y:Se,widthPx:F}}const{x:I,y:se}=qs(de.xRatio*y,de.yRatio*U,y,U,F,ie);return{...de,x:I,y:se,widthPx:F}}))};s.useEffect(()=>{if(!o||j.length===0||!f)return;const R=o.getBoundingClientRect(),y=R.width,U=R.height,ee=T(j[0],y,U);ee&&(c([ee]),u(j.length>1?1:0))},[V,_,o,t,f]),s.useEffect(()=>{if(!o)return;G();const R=new ResizeObserver(G);return R.observe(o),window.addEventListener("resize",G),()=>{R.disconnect(),window.removeEventListener("resize",G)}},[o,_,V,l.length]),s.useEffect(()=>{z==="last One"&&c(R=>R.length>0?[R[R.length-1]]:[])},[z]);const A=R=>{if(!o||j.length===0||!f)return;const y=o.getBoundingClientRect(),U=R.clientX-y.left,ee=R.clientY-y.top;if(H==="image"&&!fp(U,ee,l))return;let de=0,F=0;_==="on Click"?(de=U,F=ee):_==="same"?(de=y.width/2,F=y.height/2):(de=Math.random()*y.width,F=Math.random()*y.height);const ie=j[d%j.length],I=T(ie,y.width,y.height,{x:de,y:F});if(!I)return;const se=z==="all"?[...l,I]:[I];c(se),u(J=>(J+1)%j.length),C(R.clientX,R.clientY,se)},Y=B==="custom"&&m!=="none";return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:L}}),a.jsxs("div",{ref:r,onClick:A,onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),className:`${i}-root`,style:{cursor:Y?"none":"default"},children:[l.map(R=>a.jsx("div",{className:`${i}-wrapper`,style:{top:`${R.y}px`,left:`${R.x}px`,width:`${R.widthPx}px`,cursor:Y?"none":"default"},children:H==="area"&&R.link?a.jsx("a",{href:R.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:a.jsx("img",{src:R.assetId,alt:R.name,className:`${i}-image`})}):a.jsx("img",{src:R.assetId,alt:R.name,className:`${i}-image`})},R.id)),S&&Y&&a.jsx("div",{className:`${i}-cursor`,style:{left:`${v.x}px`,top:`${v.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const mb=`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:{assetId:{type:"string"},name:{type:"string"}},required:["assetId","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:"Slider-1.png"},link:""},{image:{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"Slider-2.png"},link:""},{image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"Slider-3.png"},link:""},{image:{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"Slider-4.png"},link:""},{image:{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"Slider-5.png"},link:""},{image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"Slider-6.png"},link:""},{image:{assetId:"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.assetId",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
+ `,gb={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"}},required:["assetId","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:"Slider-1.png"},link:""},{image:{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"Slider-2.png"},link:""},{image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"Slider-3.png"},link:""},{image:{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"Slider-4.png"},link:""},{image:{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"Slider-5.png"},link:""},{image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"Slider-6.png"},link:""},{image:{assetId:"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:gb,sourceCode:mb,assetsPaths:{content:[{path:"image.assetId",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),[M,f]=s.useState(!1),[S,W]=s.useState(!1),[q,z]=s.useState(null),[L,_]=s.useState(null),[G,$]=s.useState(0),[I,D]=s.useState(1),[E,T]=s.useState("none"),[C,V]=s.useState("next"),[w,U]=s.useState({}),[P,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(P.width,P.height,ee,re,N)},[P.height,P.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.assetId}).filter(ee=>!!ee);$b(R,(ee,te)=>{U(ge=>{var X,Pe;return((X=ge[ee])==null?void 0:X.width)===te.width&&((Pe=ge[ee])==null?void 0:Pe.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 Le=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.assetId),ge=be((We=(He=y[ee])==null?void 0:He.image)==null?void 0:We.assetId),X=cd(P.width,P.height,te),Pe=cd(P.width,P.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(Pe),T(Ko(p,1,Pe))),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,P.height,P.width,be,M,ae,y,le]),ye=y[g],ce=x!==null?y[x]:null,K=q!==null?y[q]:null,se=L!==null?y[L]: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.assetId),Re=be((h=K==null?void 0:K.image)==null?void 0:h.assetId),me=be((Y=se==null?void 0:se.image)==null?void 0:Y.assetId),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.assetId)&&a.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:ce.image.assetId,alt:"",style:{filter:J}})}),M&&((ne=K==null?void 0:K.image)==null?void 0:ne.assetId)&&a.jsx("div",{className:Ct(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${C}`),style:dd(Re,I,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:K.image.assetId,alt:"",style:{filter:E}})}),M&&((ue=se==null?void 0:se.image)==null?void 0:ue.assetId)&&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.assetId,alt:""})}),!M&&((B=ye==null?void 0:ye.image)==null?void 0:B.assetId)&&a.jsx("div",{className:Ct(`${o}-stage`,`${o}-foreground`),style:yp(we),children:a.jsx("img",{className:`${o}-image`,src:ye.image.assetId,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:()=>Le("prev"),"aria-label":`Show previous image (${pe+1} of ${y.length})`}),a.jsx("button",{type:"button",className:Ct(`${o}-nav`,`${o}-nav-next`),onClick:()=>Le("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 we,g,X,Z,ne,ye,K;const{prefix:o}=k.useScopedStyles(),r=s.useMemo(()=>vb(o),[o]),{imageSize:l,maxWidth:c,maxHeight:d,transition:u=1e3,bgImage:p="greyscale"}=e,v=t??[],b=ld(v.length),[m,h]=s.useState(b.activeIndex),[x,S]=s.useState(b.backgroundIndex),[P,f]=s.useState(!1),[w,N]=s.useState(!1),[V,B]=s.useState(null),[H,_]=s.useState(null),[z,$]=s.useState(0),[E,j]=s.useState(1),[L,C]=s.useState("none"),[T,G]=s.useState("next"),[A,Y]=s.useState({}),[R,y]=s.useState({width:0,height:0}),U=s.useRef(null),ee=s.useRef(null),de=!n||!!i,F=l??60,ie=Math.max(10,Math.min(100,c??F)),I=Math.max(10,Math.min(100,d??F)),se=Math.max(100,u),J=Ko(p),Se=s.useCallback(D=>{const ce=Sb(D?A[D]:void 0);return wb(R.width,R.height,ce,ie,I)},[R.height,R.width,A,I,ie]);s.useEffect(()=>{const D=ee.current;if(!D)return;const ce=new ResizeObserver(([q])=>{const{width:ue,height:W}=q.contentRect;y({width:ue,height:W})});return ce.observe(D),()=>ce.disconnect()},[]),s.useEffect(()=>{const D=(t??[]).map(ce=>{var q;return(q=ce.image)==null?void 0:q.assetId}).filter(ce=>!!ce);$b(D,(ce,q)=>{Y(ue=>{var W,Le;return((W=ue[ce])==null?void 0:W.width)===q.width&&((Le=ue[ce])==null?void 0:Le.height)===q.height?ue:{...ue,[ce]:q}})})},[t]),s.useEffect(()=>{const{backgroundIndex:D,activeIndex:ce}=ld(v.length);h(ce),S(D),f(!1),N(!1),B(null),_(null),$(0),j(1),C("none"),G("next")},[v.length,t]),s.useEffect(()=>()=>{U.current&&clearTimeout(U.current)},[]);const Re=s.useCallback(D=>{var ae,Q,Ne,Oe;if(!de||P||v.length<=1)return;const ce=D==="next"?(m+1)%v.length:(m-1+v.length)%v.length,q=Se((Q=(ae=v[m])==null?void 0:ae.image)==null?void 0:Q.assetId),ue=Se((Oe=(Ne=v[ce])==null?void 0:Ne.image)==null?void 0:Oe.assetId),W=cd(R.width,R.height,q),Le=cd(R.width,R.height,ue);U.current&&clearTimeout(U.current),G(D),N(!0),f(!0),D==="next"?(B(m),_(ce),$(0),j(1),C(Ko(p,0,1))):(S(bb(ce,v.length)),B(ce),_(m),$(1),j(Le),C(Ko(p,1,Le))),requestAnimationFrame(()=>{N(!1),requestAnimationFrame(()=>{D==="next"?($(1),j(W),C(Ko(p,1,W))):($(0),j(1),C(Ko(p,0,1)))})}),U.current=setTimeout(()=>{D==="next"&&S(m),h(ce),B(null),_(null),f(!1)},se)},[m,p,R.height,R.width,Se,P,de,v,se]),pe=v[m],he=x!==null?v[x]:null,te=V!==null?v[V]:null,le=H!==null?v[H]:null,re=v.length<=1?0:(m-1+v.length)%v.length,fe=v.length<=1?0:(m+1)%v.length,xe=Se((we=pe==null?void 0:pe.image)==null?void 0:we.assetId),Te=Se((g=te==null?void 0:te.image)==null?void 0:g.assetId),me=Se((X=le==null?void 0:le.image)==null?void 0:X.assetId),be={[`--${o}-transition-ms`]:`${se}ms`};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:r}}),a.jsxs("div",{ref:ee,className:Pt(`${o}-wrapper`,w&&`${o}-snap`,n&&!i&&`${o}-editor`),style:be,"aria-label":"Zoom gallery",children:[((Z=he==null?void 0:he.image)==null?void 0:Z.assetId)&&a.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:he.image.assetId,alt:"",style:{filter:J}})}),P&&((ne=te==null?void 0:te.image)==null?void 0:ne.assetId)&&a.jsx("div",{className:Pt(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${T}`),style:dd(Te,E,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:te.image.assetId,alt:"",style:{filter:L}})}),P&&((ye=le==null?void 0:le.image)==null?void 0:ye.assetId)&&a.jsx("div",{className:Pt(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${T}`),style:dd(me,z,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-image`,src:le.image.assetId,alt:""})}),!P&&((K=pe==null?void 0:pe.image)==null?void 0:K.assetId)&&a.jsx("div",{className:Pt(`${o}-stage`,`${o}-foreground`),style:yp(xe),children:a.jsx("img",{className:`${o}-image`,src:pe.image.assetId,alt:pe.image.name??""})}),de&&v.length>1&&!P&&a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:Pt(`${o}-nav`,`${o}-nav-prev`),onClick:()=>Re("prev"),"aria-label":`Show previous image (${re+1} of ${v.length})`}),a.jsx("button",{type:"button",className:Pt(`${o}-nav`,`${o}-nav-next`),onClick:()=>Re("next"),"aria-label":`Show next image (${fe+1} of ${v.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
- `,Ib={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:{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:""}},{image:{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:""}},{image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:""}},{image:{assetId:"01M3QM74XE20C38X4NND20C5R4",name:""}},{image:{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:""}},{image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:""}},{image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:""}}]}},Lb={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:Ib,sourceCode:Tb,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Pb={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`
17764
+ `,Ib={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:{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:""}},{image:{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:""}},{image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:""}},{image:{assetId:"01M3QM74XE20C38X4NND20C5R4",name:""}},{image:{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:""}},{image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:""}},{image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:""}}]}},Lb={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:Ib,sourceCode:Tb,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Pb={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}`,v=`.${e}-button:focus-visible, a:focus-visible .${e}-button`,b=`.${e}-button:hover, ${v}`,m=h=>`.${e}-hover-effect-${h}:hover, .${e}-hover-effect-${h}:focus-visible, a:focus-visible .${e}-hover-effect-${h}`;return`
17765
17765
  .${e}-root {
17766
17766
  line-height: 0;
17767
17767
  }
@@ -17793,11 +17793,11 @@ export function Scale({ settings, content, isEditor, isPreviewMode }: ScaleProps
17793
17793
  .${e}-wrapper.${e}-editing .${e}-button {
17794
17794
  transition: color 250ms, background-color 250ms, border-color 250ms, transform 250ms;
17795
17795
  }
17796
- ${g("scale-up")},
17796
+ ${m("scale-up")},
17797
17797
  .${e}-wrapper.${e}-state-hover .${e}-hover-effect-scale-up {
17798
17798
  transform: scale(1.05);
17799
17799
  }
17800
- ${g("lift")},
17800
+ ${m("lift")},
17801
17801
  .${e}-wrapper.${e}-state-hover .${e}-hover-effect-lift {
17802
17802
  transform: translateY(-2px);
17803
17803
  box-shadow: ${p};
@@ -17859,9 +17859,9 @@ a:focus-visible .${e}-hover-effect-swipe::before,
17859
17859
  .${e}-wrapper.${e}-state-hover .${e}-hover-effect-swipe::before {
17860
17860
  transform: translateX(0);
17861
17861
  }
17862
- ${g("reveal")},
17862
+ ${m("reveal")},
17863
17863
  .${e}-wrapper.${e}-state-hover .${e}-hover-effect-reveal,
17864
- ${g("swipe")},
17864
+ ${m("swipe")},
17865
17865
  .${e}-wrapper.${e}-state-hover .${e}-hover-effect-swipe {
17866
17866
  background-color: var(--${e}-background-color);
17867
17867
  }
@@ -17924,7 +17924,7 @@ a:focus-visible .${e}-hover-effect-content-roll .${e}-content-roll-layer-hover,
17924
17924
  transform: translateY(-50%);
17925
17925
  opacity: 1;
17926
17926
  }
17927
- ${v} {
17927
+ ${b} {
17928
17928
  background-color: var(--${e}-hover-background-color, var(--${e}-background-color));
17929
17929
  color: var(--${e}-hover-text-color, var(--${e}-text-color));
17930
17930
  border-color: var(--${e}-hover-border-color, var(--${e}-border-color));
@@ -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: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:L=0,blur:_=0,backgroundColor:G="#000000",textColor:$="#ffffff",borderColor:I="#ffffff",iconColor:D="#ffffff",hoverEffect:E="none",fontFamily:T,fontSettings:C,fontSize:V,lineHeight:w,letterSpacing:U=0,wordSpacing:P=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:I,iconColor:D,boxShadowColor:W,innerBoxShadowColor:z},Pb,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}`:"",Le=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:P,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(L,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):Le?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';
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(mn,{url:t,fill:`var(--${e}-icon-color)`,hoverFill:`var(--${e}-icon-color)`,className:`${e}-icon-image`});if(n==="inline")return a.jsx("span",{className:`${e}-icon ${e}-icon-inline`,style:{[`--${e}-icon-scale`]:i/100},"aria-hidden":"true",children:l});if(n==="fixed"&&o>0){const c=k.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}=k.useScopedStyles(),l=s.useMemo(()=>kb(r),[r]),{type:c="a",label:d="Button",icon:u,alignment:p="center",alignA:v,order:b="text-icon",gap:m=0,iconSize:h=0,iconWidthC:x=0,dimensions:S=!1,padding:P={top:0,right:0,bottom:0,left:0},cornerRadius:f=0,boxShadow:w={top:0,left:0,right:0,bottom:0},boxShadowColor:N="rgba(0, 0, 0, 0)",innerBoxShadow:V={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:B="rgba(0, 0, 0, 0)",stroke:H=0,blur:_=0,backgroundColor:z="#000000",textColor:$="#ffffff",borderColor:E="#ffffff",iconColor:j="#ffffff",hoverEffect:L="none",fontFamily:C,fontSettings:T,fontSize:G,lineHeight:A,letterSpacing:Y=0,wordSpacing:R=0,textAppearance:y,stateOverrides:U,minWidth:ee=0,minHeight:de=0,width:F=0,height:ie=0}=e,I=k.buildColorVars(r,{backgroundColor:z,textColor:$,borderColor:E,iconColor:j,boxShadowColor:N,innerBoxShadowColor:B},Pb,Rb,U),se=i&&i!=="default"?`${r}-state-${i}`:"",J=t&&!n?`${r}-editing`:"",Se=L!=="none"&&(!t||n||i==="hover")?`${r}-hover-effect-${L}`:"",Re=L==="reveal"||L==="swipe",pe=L==="content-roll",he=L==="reveal"&&(!t||n),te=S===!0,re=c==="a"?v??p:p,fe=c==="c",xe=c!=="b",Te={fontSettings:{fontFamily:C,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:G??.01,lineHeight:A,letterSpacing:Y,wordSpacing:R,textAppearance:y,color:$},be={...xe?un(en(Te,t)):{},[`--${r}-box-shadow-x`]:k.scalingValue(w.left,t),[`--${r}-box-shadow-y`]:k.scalingValue(w.top,t),[`--${r}-box-shadow-blur`]:k.scalingValue(w.right,t),[`--${r}-box-shadow-spread`]:k.scalingValue(w.bottom,t),[`--${r}-inner-box-shadow-x`]:k.scalingValue(V.left,t),[`--${r}-inner-box-shadow-y`]:k.scalingValue(V.top,t),[`--${r}-inner-box-shadow-blur`]:k.scalingValue(V.right,t),[`--${r}-inner-box-shadow-spread`]:k.scalingValue(V.bottom,t),[`--${r}-backdrop-blur`]:_>0?`blur(${k.scalingValue(_,t)})`:void 0,paddingTop:k.scalingValue(P.top,t),paddingRight:k.scalingValue(P.right,t),paddingBottom:k.scalingValue(P.bottom,t),paddingLeft:k.scalingValue(P.left,t),borderRadius:k.scalingValue(f,t),borderWidth:k.scalingValue(H,t),...fe?{}:{justifyContent:vs[re],textAlign:re},...fe&&!pe?{gap:k.scalingValue(m,t)}:{},...te?{width:k.scalingValue(F,t),height:k.scalingValue(ie,t)}:{minWidth:k.scalingValue(ee,t),minHeight:k.scalingValue(de,t),...fe?{width:"100%"}:{}}};let we;const g={display:"inline-flex",alignItems:"center",justifyContent:fe?vs[re]:vs[c==="a"?re:"center"],gap:fe?k.scalingValue(m,t):void 0,width:"100%",height:"100%",...c==="a"?{textAlign:re}:{}};if(c==="b"){const ne=()=>ud(r,u,h>0?"fixed":"fill",100,h,t);we=pe?xs(r,ne,`${r}-icon-roll`,void 0,g):ne()}else if(c==="c"){const ne=()=>{const ye=a.jsx("span",{className:`${r}-text`,style:{textAlign:re},children:d}),K=ud(r,u,x>0?"fixed":"fill",100,x,t);return b==="icon-text"?a.jsxs(a.Fragment,{children:[K,ye]}):a.jsxs(a.Fragment,{children:[ye,K]})};we=pe?xs(r,ne,`${r}-icon-text-roll`,void 0,g):ne()}else we=pe?xs(r,()=>d,`${r}-label-roll`,void 0,g):Re?a.jsx("span",{className:`${r}-button-inner`,children:d}):d;const X=he?ne=>Mb(ne,r):void 0,Z=he?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:I,children:a.jsx("div",{className:`${r}-wrapper ${se} ${J}`.trim(),children:a.jsx("div",{className:`${r}-button ${Se}`.trim(),style:be,onMouseEnter:X,onMouseLeave:Z,role:"button",tabIndex:o||t&&!n?void 0:0,children:we})})})]})}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';
@@ -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.assetId&&t.push({gridIndex:i,items:[n.image],entry:{title1:n.title??"",title2:n.subtitle??"",title3:n.caption??""}}),t},[])}function or(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function pd(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return or(e,i,n)}const 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.assetId,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.assetId,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.assetId,n.naturalWidth,n.naturalHeight)},n.src=e.assetId}function Zb(e){const t=new Set,n=[];for(const i of e){const o=i.image;!(o!=null&&o.assetId)||t.has(o.assetId)||(t.add(o.assetId),n.push(o))}return n}function 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.assetId,preload:"auto",muted:!0,playsInline:!0},t.assetId):a.jsx("img",{src:t.assetId,alt:""},t.assetId))})}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.assetId)}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.assetId,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.assetId,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.assetId,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.assetId,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function 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),L=s.useRef(null),_=s.useRef(0),G=s.useRef(0),$=s.useRef("none"),I=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),P=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"),[Le,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),Pe=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,Ie)=>t.length<=1?null:t[(H+Ie+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.assetId!==(Ge==null?void 0:Ge.assetId)?_e:null,$e=ze&&ze.assetId!==(ve==null?void 0:ve.assetId)?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.assetId!==Ge.assetId?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.assetId!==ve.assetId?H:null})():null,Ze=Qe??Ne,st=$e??Ye,it=s.useCallback((H,Ie,je)=>{if(!H||!Ie||!je)return;const Fe=W.current,ft=Fe.get(H);(ft==null?void 0:ft.width)===Ie&&(ft==null?void 0:ft.height)===je||(Fe.set(H,{width:Ie,height:je}),z(Ht=>Ht+1))},[]),Oe=s.useCallback(H=>{if(!(H!=null&&H.assetId))return null;const Ie=W.current.get(H.assetId);return Kb(f.current,Ie)},[q,N]),Ae=s.useCallback(()=>{if(!Z)return;const H=Oe(Z);if(H){ae(H);return}const Ie=f.current;Ie&&ae(gd(Ie))},[Z,Oe]),mt=s.useCallback(H=>{if(tt){const Ie=u.length;me((p+H+Ie)%Ie),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 Ie=H.getBoundingClientRect();re({left:Ie.left,top:Ie.top,width:Ie.width,height:Ie.height})},[]),he=s.useCallback((H,Ie)=>{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,Ie,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),I.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),I.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,P.current!==null&&(window.clearInterval(P.current),P.current=null),A.current!==null&&(window.clearTimeout(A.current),A.current=null)},[]),Pt=s.useCallback(H=>{P.current!==null&&window.clearInterval(P.current);const Ie=j.current?Vb:jb;P.current=window.setInterval(()=>{w.current(H)},Ie)},[]),At=s.useCallback(H=>{U.current!==H&&(vt(),U.current=H,j.current=!1,w.current(H),Pt(H),A.current=window.setTimeout(()=>{A.current=null,U.current===H&&(j.current=!0,Pt(H))},zb))},[vt,Pt]),wt=s.useCallback(()=>{const H=f.current;if(!H)return;const Ie=Z==null?void 0:Z.assetId,je=Ie?W.current.get(Ie):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&&Ie&&(Fe.src===Ie||Fe.currentSrc===Ie)){const{width:Ht,height:gt}=Yb(Fe);if(Ht&&gt){it(Ie,Ht,gt),ae(Ys(H,Ht,gt));return}}const ft=gd(H);!ft.width||!ft.height||ae(ft)},[Z==null?void 0:Z.assetId,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,Ie=M.current,je=new ResizeObserver(()=>jt());return H&&je.observe(H),Ie&&je.observe(Ie),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.assetId,n,wt]),s.useEffect(()=>{Ae()},[Ae,q]),s.useEffect(()=>{const H=new Set,Ie=[],je=Fe=>{!(Fe!=null&&Fe.assetId)||H.has(Fe.assetId)||(H.add(Fe.assetId),Ie.push(Fe))};t.forEach(je),u.forEach(Fe=>Fe.items.forEach(je)),Ie.forEach(Fe=>{W.current.has(Fe.assetId)||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(()=>{Pe.current===n&&Se.current===(Z==null?void 0:Z.assetId)||(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",I.current=!1,L.current=null,D.current=!1,S.current=null,Ae(),Pe.current=n,Se.current=Z==null?void 0:Z.assetId)},[n,Z==null?void 0:Z.assetId,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.assetId]),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.assetId,ve==null?void 0:ve.assetId]),s.useEffect(()=>{if(J!=="open")return;const H=()=>{const gt=It=>{It.stopPropagation(),It.preventDefault(),document.removeEventListener("click",gt,!0)};document.addEventListener("click",gt,!0)},Ie=gt=>{const It=gt<0?1:-1;De(),mt(It),C.current=It,we(It),Be(!0),nt()},je=gt=>{if(Math.abs(gt)>Bb&&qe){Ie(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 It=gt.touches[0];D.current=!0,L.current={x:It.clientX,y:It.clientY},$.current="none",G.current=0,I.current=!1},ft=gt=>{if(!L.current||gt.touches.length!==1||E.current)return;const It=gt.touches[0],qt=It.clientX-L.current.x,Dt=It.clientY-L.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"){I.current=!0,te(!0),G.current=qt,K(qt),gt.preventDefault();return}$.current==="vertical"&&(I.current=!0,te(!0),_.current=Dt,ye(Dt),gt.preventDefault())},Ht=()=>{if(!L.current)return;const gt=$.current,It=I.current;if(It&&gt==="horizontal")je(G.current),H();else if(It&&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());L.current=null,$.current="none",G.current=0,I.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)},Ie=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",Ie),window.addEventListener("blur",je),()=>{window.removeEventListener("keydown",H),window.removeEventListener("keyup",Ie),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=Le>0?Math.max(0,1-Le/500):1,xt=Le>0?Math.max(.35,1-Le/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"):Le>0?`translateY(${Le}px)`:Je,dt=ie?Yr(ie,O):null,Lt=!!(ke&&ie),St=Lt&&(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:Le>0?xt:Lt?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,Ie,je="adjacent")=>{const Fe=Oe(H);if(!Fe)return{display:"none"};const ft=je==="far"?Ie==="left"?"far-left":"far-right":Ie==="left"?"left-adjacent":"right-adjacent",{start:Ht}=fe!==null?bp(Fe,ft,fe,O):{start:je==="far"?Ta(Fe,Ie,O):Fo(Fe,Ie,O)},gt=Yr(Ht,O),It=he(H,ft),qt=!We&&je==="adjacent"&&Rt&&!ue?nS(Fe,Ie,O):null,Dt=je==="far"&&We&&fe===(Ie==="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:It??(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,Ie)=>{const je=Oe(H);return je?eS(Fo(je,Ie,O),Ie,O):null},Gt=H=>Ie=>{if(!l){if(D.current){D.current=!1;return}Ie.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.assetId}`),Rt&&Ge&&a.jsxs(a.Fragment,{children:[a.jsx(Kr,{media:Ge,style:Tt(Ge,"left"),onMeasure:it,onTransitionEnd:yt},`prev-${Ge.assetId}`),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.assetId}`),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.assetId}`),ie&&Z&&(He?a.jsx(iS,{src:Z.assetId,phase:J,onMediaElement:Vt,wrapperStyle:ht,videoStyle:Wt,onLoadedMetadata:wt,onTransitionEnd:yt},`${n}-${Z.assetId}`):a.jsx("img",{ref:Vt,src:Z.assetId,alt:Z.name,onLoad:wt,onTransitionEnd:yt,style:ht},`${n}-${Z.assetId}`))]})}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.assetId&&t.push({gridIndex:i,items:[n.image],entry:{title1:n.title??"",title2:n.subtitle??"",title3:n.caption??""}}),t},[])}function or(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function pd(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return or(e,i,n)}const 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 md(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.assetId,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.assetId,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.assetId,n.naturalWidth,n.naturalHeight)},n.src=e.assetId}function Zb(e){const t=new Set,n=[];for(const i of e){const o=i.image;!(o!=null&&o.assetId)||t.has(o.assetId)||(t.add(o.assetId),n.push(o))}return n}function 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.assetId,preload:"auto",muted:!0,playsInline:!0},t.assetId):a.jsx("img",{src:t.assetId,alt:""},t.assetId))})}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.assetId)}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.assetId,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.assetId,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.assetId,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.assetId,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function oS({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,canNavigate:d,lightboxEntries:u,entryIdx:p,layoutId:v,sourceRect:b,resolveCloseSourceRect:m,onClose:h,onPrev:x,onNext:S}){const P=s.useRef(null),f=s.useRef(null),w=s.useRef(null),N=s.useRef(new Map),[V,B]=s.useState(0),H=s.useRef(null),_=s.useRef(0),z=s.useRef(0),$=s.useRef("none"),E=s.useRef(!1),j=s.useRef(!1),L=s.useRef(!1),C=s.useRef(null),T=s.useRef(null),G=s.useRef(null),A=s.useRef(()=>{}),Y=s.useRef(null),R=s.useRef(null),y=s.useRef(null),U=s.useRef(!1),[ee,de]=s.useState(null),[F,ie]=s.useState(bs),[I,se]=s.useState(0),[J,Se]=s.useState("opening"),[Re,pe]=s.useState(0),[he,te]=s.useState(0),[le,re]=s.useState(!1),[fe,xe]=s.useState(null),[Te,me]=s.useState(null),[be,we]=s.useState(null),[g,X]=s.useState(!1),[Z,ne]=s.useState(null),[ye,K]=s.useState(!1),D=s.useRef(!1),[ce,q]=s.useState(!1),[ue,W]=s.useState(!1),Le=s.useRef(n),ae=s.useRef(void 0),Q=t[n],Ne=Q?Va(Q):!1,Oe=he!==0||le,it=!l&&(!r||!!c),qe=d&&!l,Je=u.length>1,ot=s.useCallback((O,Ie)=>t.length<=1?null:t[(O+Ie+t.length)%t.length]??null,[t]),Ve=Je?or(u,p,-1):ot(n,-1),ve=Je?or(u,p,1):ot(n,1),Fe=fe===-1&&Oe?Je&&Te!==null?or(u,Te,-1):be!==null?ot(be,-1):null:null,Xe=fe===1&&Oe?Je&&Te!==null?or(u,Te,1):be!==null?ot(be,1):null:null,Ye=Fe&&Fe.assetId!==(Ve==null?void 0:Ve.assetId)?Fe:null,Pe=Xe&&Xe.assetId!==(ve==null?void 0:ve.assetId)?Xe:null,_e=Ve&&qe?(()=>{const O=Je?pd(u,p,-1):t.length>2?ot((n-1+t.length)%t.length,-1):null;return O&&O.assetId!==Ve.assetId?O:null})():null,Ke=ve&&qe?(()=>{const O=Je?pd(u,p,1):t.length>2?ot((n+1)%t.length,1):null;return O&&O.assetId!==ve.assetId?O:null})():null,Ze=Ye??_e,st=Pe??Ke,Ue=s.useCallback((O,Ie,je)=>{if(!O||!Ie||!je)return;const Ae=N.current,tt=Ae.get(O);(tt==null?void 0:tt.width)===Ie&&(tt==null?void 0:tt.height)===je||(Ae.set(O,{width:Ie,height:je}),B(Mt=>Mt+1))},[]),De=s.useCallback(O=>{if(!(O!=null&&O.assetId))return null;const Ie=N.current.get(O.assetId);return Kb(f.current,Ie)},[V,I]),ke=s.useCallback(()=>{if(!Q)return;const O=De(Q);if(O){de(O);return}const Ie=f.current;Ie&&de(md(Ie))},[Q,De]),ht=s.useCallback(O=>{if(Je){const Ie=u.length;me((p+O+Ie)%Ie),we(null);return}t.length>1&&(we((n+O+t.length)%t.length),me(null))},[Je,u.length,p,t.length,n]),Be=s.useCallback(O=>{L.current=O,re(O)},[]),ze=s.useCallback(()=>{C.current!==null&&(window.clearTimeout(C.current),C.current=null)},[]),We=s.useCallback(()=>{ze(),C.current=window.setTimeout(()=>{ze(),Be(!1)},Qo+32)},[ze,Be]),mt=s.useCallback(()=>{const O=P.current;if(!O){ie({left:0,top:0,width:typeof window<"u"?window.innerWidth:bs.width,height:typeof window<"u"?window.innerHeight:bs.height});return}const Ie=O.getBoundingClientRect();ie({left:Ie.left,top:Ie.top,width:Ie.width,height:Ie.height})},[]),rt=s.useCallback((O,Ie)=>{if(Oe){if(ce&&!le)return`translate(${he}px, 0px)`;if(le&&fe!==null){const je=De(O);if(!je)return;const{x:Ae,y:tt}=tS(je,Ie,fe,F);return`translate(${Ae}px, ${tt}px)`}if(le)return"translate(0px, 0px)"}},[Oe,ce,le,he,fe,F,De]),St=s.useCallback(()=>{const O=T.current;T.current=null,ze(),Be(!1),xe(null),me(null),we(null),te(0),q(!1),E.current=!1,z.current=0,$.current="none",O===-1?x():O===1&&S()},[ze,Be,x,S]),Nt=s.useCallback(()=>{ze(),C.current=window.setTimeout(()=>{T.current!==null&&St()},Qo+32)},[ze,St]),jt=s.useCallback(()=>{ze(),T.current=null,Be(!1),xe(null),me(null),we(null),te(0),q(!1),E.current=!1,z.current=0,$.current="none"},[ze,Be]),xt=s.useCallback(O=>{if(!(!qe||!ee)){if(L.current){if(T.current===O){G.current=O,St();return}jt()}ze(),ht(O),T.current=O,xe(O),Be(!0),Nt()}},[qe,ee,St,jt,ze,ht,Be,Nt]);A.current=xt;const Ce=s.useCallback(()=>{Y.current=null,U.current=!1,R.current!==null&&(window.clearInterval(R.current),R.current=null),y.current!==null&&(window.clearTimeout(y.current),y.current=null)},[]),He=s.useCallback(O=>{R.current!==null&&window.clearInterval(R.current);const Ie=U.current?Vb:jb;R.current=window.setInterval(()=>{A.current(O)},Ie)},[]),lt=s.useCallback(O=>{Y.current!==O&&(Ce(),Y.current=O,U.current=!1,A.current(O),He(O),y.current=window.setTimeout(()=>{y.current=null,Y.current===O&&(U.current=!0,He(O))},zb))},[Ce,He]),et=s.useCallback(()=>{const O=f.current;if(!O)return;const Ie=Q==null?void 0:Q.assetId,je=Ie?N.current.get(Ie):void 0;if(je!=null&&je.width&&(je!=null&&je.height)){de(Ys(O,je.width,je.height));return}const Ae=w.current;if(Ae&&Ie&&(Ae.src===Ie||Ae.currentSrc===Ie)){const{width:Mt,height:ut}=Yb(Ae);if(Mt&&ut){Ue(Ie,Mt,ut),de(Ys(O,Mt,ut));return}}const tt=md(O);!tt.width||!tt.height||de(tt)},[Q==null?void 0:Q.assetId,Ue]),yt=s.useCallback(O=>{if(w.current=O,!!O){if(O instanceof HTMLVideoElement){O.readyState>=1&&O.videoWidth>0&&et();return}O.complete&&O.naturalWidth>0&&et()}},[et]),Rt=s.useCallback(()=>{mt(),et(),se(O=>O+1)},[mt,et]);s.useEffect(()=>{Rt();const O=f.current,Ie=P.current,je=new ResizeObserver(()=>Rt());return O&&je.observe(O),Ie&&je.observe(Ie),window.addEventListener("resize",Rt),()=>{je.disconnect(),window.removeEventListener("resize",Rt)}},[Rt,n,v]),s.useLayoutEffect(()=>{if(!Q)return;const O=w.current;if(O){if(O instanceof HTMLImageElement&&O.complete&&O.naturalWidth>0){et();return}O instanceof HTMLVideoElement&&O.readyState>=1&&O.videoWidth>0&&et()}},[Q==null?void 0:Q.assetId,n,et]),s.useEffect(()=>{ke()},[ke,V]),s.useEffect(()=>{const O=new Set,Ie=[],je=Ae=>{!(Ae!=null&&Ae.assetId)||O.has(Ae.assetId)||(O.add(Ae.assetId),Ie.push(Ae))};t.forEach(je),u.forEach(Ae=>Ae.items.forEach(je)),Ie.forEach(Ae=>{N.current.has(Ae.assetId)||Qb(Ae,Ue)})},[t,u,Ue]),s.useEffect(()=>{if(J!=="opening"||!ee)return;if(!b){Se("open");return}X(!1);const O=requestAnimationFrame(()=>{requestAnimationFrame(()=>{X(!0),Se("open")})});return()=>cancelAnimationFrame(O)},[J,ee,b]),s.useEffect(()=>{if(J!=="closing")return;const O=setTimeout(()=>h(),Wn);return()=>clearTimeout(O)},[J,h]),s.useEffect(()=>()=>{ze()},[ze]),s.useLayoutEffect(()=>{Le.current===n&&ae.current===(Q==null?void 0:Q.assetId)||(ze(),T.current=null,xe(null),me(null),we(null),pe(0),te(0),Be(!1),W(!1),q(!1),_.current=0,z.current=0,$.current="none",E.current=!1,H.current=null,j.current=!1,w.current=null,ke(),Le.current=n,ae.current=Q==null?void 0:Q.assetId)},[n,Q==null?void 0:Q.assetId,Be,ze,ke]),s.useLayoutEffect(()=>{const O=G.current;O!==null&&(G.current=null,requestAnimationFrame(()=>{A.current(O)}))},[n,p,Q==null?void 0:Q.assetId]),s.useLayoutEffect(()=>{if(J==="opening"){D.current=!1,K(!1);return}if(J!=="open"||D.current)return;if(!Ve&&!ve){D.current=!0;return}K(!1);const O=requestAnimationFrame(()=>{requestAnimationFrame(()=>{K(!0),D.current=!0})});return()=>cancelAnimationFrame(O)},[J,Ve==null?void 0:Ve.assetId,ve==null?void 0:ve.assetId]),s.useEffect(()=>{if(J!=="open")return;const O=()=>{const ut=Tt=>{Tt.stopPropagation(),Tt.preventDefault(),document.removeEventListener("click",ut,!0)};document.addEventListener("click",ut,!0)},Ie=ut=>{const Tt=ut<0?1:-1;ze(),ht(Tt),T.current=Tt,xe(Tt),Be(!0),Nt()},je=ut=>{if(Math.abs(ut)>Bb&&qe){Ie(ut);return}T.current=null,xe(null),me(null),we(null),Be(!0),te(0),We()},Ae=ut=>{if(ut.touches.length!==1||L.current)return;const Tt=ut.touches[0];j.current=!0,H.current={x:Tt.clientX,y:Tt.clientY},$.current="none",z.current=0,E.current=!1},tt=ut=>{if(!H.current||ut.touches.length!==1||L.current)return;const Tt=ut.touches[0],Ut=Tt.clientX-H.current.x,Wt=Tt.clientY-H.current.y;if($.current==="none"){if(Math.abs(Ut)<10&&Math.abs(Wt)<10)return;if(Math.abs(Ut)>Math.abs(Wt)){if(!qe)return;$.current="horizontal"}else if(Wt>0){if(!it)return;$.current="vertical"}else return}if($.current==="horizontal"){E.current=!0,q(!0),z.current=Ut,te(Ut),ut.preventDefault();return}$.current==="vertical"&&(E.current=!0,q(!0),_.current=Wt,pe(Wt),ut.preventDefault())},Mt=()=>{if(!H.current)return;const ut=$.current,Tt=E.current;if(Tt&&ut==="horizontal")je(z.current),O();else if(Tt&&ut==="vertical"){const Ut=_.current;if(it&&Ut>Db){const Wt=window.innerHeight;_.current=Wt,W(!0),pe(Wt),Se("closing")}else _.current=0,pe(0);O()}else ut==="horizontal"&&Math.abs(z.current)>0&&(je(z.current),O());H.current=null,$.current="none",z.current=0,E.current=!1,q(!1)};return document.addEventListener("touchstart",Ae,{passive:!0}),document.addEventListener("touchmove",tt,{passive:!1}),document.addEventListener("touchend",Mt),document.addEventListener("touchcancel",Mt),()=>{document.removeEventListener("touchstart",Ae),document.removeEventListener("touchmove",tt),document.removeEventListener("touchend",Mt),document.removeEventListener("touchcancel",Mt)}},[J,qe,Be,We,ze,it,Nt,ht]);const At=s.useCallback(()=>{const O=(m==null?void 0:m())??b??null;O&&ee&&(ne(O),X(!0)),Se("closing")},[m,b,ee]);s.useEffect(()=>{const O=Ae=>{if(Ae.key==="Escape"){if(r&&c||J==="closing")return;Ce(),At();return}if(Ae.key!=="ArrowLeft"&&Ae.key!=="ArrowRight"||J!=="open"||!qe)return;Ae.preventDefault();const tt=Ae.key==="ArrowLeft"?-1:1;Ae.repeat&&Y.current===tt||lt(tt)},Ie=Ae=>{if(Ae.key!=="ArrowLeft"&&Ae.key!=="ArrowRight")return;const tt=Ae.key==="ArrowLeft"?-1:1;Y.current===tt&&Ce()},je=()=>{Ce()};return window.addEventListener("keydown",O),window.addEventListener("keyup",Ie),window.addEventListener("blur",je),()=>{window.removeEventListener("keydown",O),window.removeEventListener("keyup",Ie),window.removeEventListener("blur",je),Ce()}},[J,r,c,At,qe,lt,Ce]),s.useEffect(()=>{J!=="open"&&Ce()},[J,Ce]);const qt=()=>{J==="closing"||l||At()},$t=J==="open",zt=J==="closing",on=Re>0?Math.max(0,1-Re/500):1,vt=Re>0?Math.max(.35,1-Re/500):1,ft=s.useCallback(O=>{if(!(O.propertyName!=="transform"||!L.current)){if(T.current!==null){St();return}ze(),Be(!1)}},[ze,Be,St]),Me=J==="closing"?Z??b:b,nt=Me&&ee&&(J==="opening"||zt)?Gb(Me,ee):void 0,ct=Oe&&Q?rt(Q,"center"):Re>0?`translateY(${Re}px)`:nt,gt=ee?Yr(ee,F):null,Et=!!(Me&&ee),wt=Et&&(J==="closing"||J==="open"&&g),dt={position:"absolute",top:gt==null?void 0:gt.top,left:gt==null?void 0:gt.left,width:gt==null?void 0:gt.width,height:gt==null?void 0:gt.height,objectFit:"contain",transformOrigin:"top left",transform:ct,opacity:Re>0?vt:Et?1:J==="opening"||zt?0:1,transition:ce&&!le?"none":le?`transform ${Qo}ms ${$n}`:ue?`transform ${Wn}ms ${$n}, opacity ${Wn}ms ${$n}`:wt?`transform ${Wn}ms ${$n}`:J==="opening"||zt?`opacity ${Wn}ms ${$n}`:"none",pointerEvents:Ne&&$t&&!Oe?"auto":"none",touchAction:Ne&&$t?"none":void 0,zIndex:1,overflow:Ne?"hidden":void 0},Ot={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:$t&&!Oe?"auto":"none"},Lt=(O,Ie,je="adjacent")=>{const Ae=De(O);if(!Ae)return{display:"none"};const tt=je==="far"?Ie==="left"?"far-left":"far-right":Ie==="left"?"left-adjacent":"right-adjacent",{start:Mt}=fe!==null?bp(Ae,tt,fe,F):{start:je==="far"?Ta(Ae,Ie,F):Fo(Ae,Ie,F)},ut=Yr(Mt,F),Tt=rt(O,tt),Ut=!Oe&&je==="adjacent"&&$t&&!ye?nS(Ae,Ie,F):null,Wt=je==="far"&&Oe&&fe===(Ie==="left"?-1:1),an=ce&&!le?!1:le,cn=je==="adjacent"&&$t&&ye&&!Oe;return{position:"absolute",top:ut.top,left:ut.left,width:ut.width,height:ut.height,objectFit:"contain",transform:Tt??(Ut?`translate(${Ut.x}px, ${Ut.y}px)`:void 0),opacity:je==="far"?$t&&Wt?1:0:$t?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}},Ht=(O,Ie)=>{const je=De(O);return je?eS(Fo(je,Ie,F),Ie,F):null},Gt=O=>Ie=>{if(!l){if(j.current){j.current=!1;return}Ie.stopPropagation(),xt(O)}},_t=Ve?Ht(Ve,"left"):null,Vt=ve?Ht(ve,"right"):null,Dt=_t?Yr(_t,F):null,Ct=Vt?Yr(Vt,F):null;return a.jsxs("div",{ref:P,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:J==="open"?"none":void 0},onClick:qt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:$t?on:0,transition:ce?"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:$t?1:0,transition:ce?"none":`opacity ${Wn}ms ${$n}`,pointerEvents:"none"},children:a.jsx(tp,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,onClose:qt})})]}),$t&&Ze&&a.jsx(Kr,{media:Ze,style:Lt(Ze,"left","far"),onMeasure:Ue,onTransitionEnd:ft},`far-prev-${Ze.assetId}`),$t&&Ve&&a.jsxs(a.Fragment,{children:[a.jsx(Kr,{media:Ve,style:Lt(Ve,"left"),onMeasure:Ue,onTransitionEnd:ft},`prev-${Ve.assetId}`),Dt&&a.jsx("div",{style:{position:"absolute",top:Dt.top,left:Dt.left,width:Dt.width,height:Dt.height,cursor:l||ce?"default":"pointer",pointerEvents:l||ce?"none":"auto",zIndex:3},onClick:Gt(-1)})]}),$t&&ve&&a.jsxs(a.Fragment,{children:[a.jsx(Kr,{media:ve,style:Lt(ve,"right"),onMeasure:Ue,onTransitionEnd:ft},`next-${ve.assetId}`),Ct&&a.jsx("div",{style:{position:"absolute",top:Ct.top,left:Ct.left,width:Ct.width,height:Ct.height,cursor:l||ce?"default":"pointer",pointerEvents:l||ce?"none":"auto",zIndex:3},onClick:Gt(1)})]}),$t&&st&&a.jsx(Kr,{media:st,style:Lt(st,"right","far"),onMeasure:Ue,onTransitionEnd:ft},`far-next-${st.assetId}`),ee&&Q&&(Ne?a.jsx(iS,{src:Q.assetId,phase:J,onMediaElement:yt,wrapperStyle:dt,videoStyle:Ot,onLoadedMetadata:et,onTransitionEnd:ft},`${n}-${Q.assetId}`):a.jsx("img",{ref:yt,src:Q.assetId,alt:Q.name,onLoad:et,onTransitionEnd:ft,style:dt},`${n}-${Q.assetId}`))]})}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),M=uS(e,n),f=s.useRef(null),[S,W]=s.useState(!1),[q,z]=s.useState([]),[L,_]=s.useState(0),[G,$]=s.useState(0),[I,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,P=(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(P)},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?I:Xb(f.current,ce.gridIndex,x)??I},[re,G,I,x]),Le=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.assetId),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.assetId?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.assetId,"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.assetId,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:L,entry:E,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:ye,lightboxEntries:re,entryIdx:G,layoutId:r,sourceRect:I,resolveCloseSourceRect:be,onClose:J,onPrev:()=>Le(-1),onNext:()=>Le(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`]:k.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:k.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 mS(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 gS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:c}=k.useScopedStyles(),d=s.useMemo(()=>sS(c),[c]),u=t??[],p=(e==null?void 0:e.type)??"a",v=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,b=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,m=k.scalingValue(b,n??!1),h=`max(${m}, ${rS}px)`,{objectFitMode:x,imageStyle:S}=pS(e),P=uS(e,n),f=s.useRef(null),[w,N]=s.useState(!1),[V,B]=s.useState([]),[H,_]=s.useState(0),[z,$]=s.useState(0),[E,j]=s.useState(null),[L,C]=s.useState({title1:"",title2:"",title3:""}),T=(!n||i)&&!w,G=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},A=G.sizeType??"none",Y=T&&A!=="none"?`${c}-item-image-hover-${A}`:void 0,R=(G.value??120)/100,y=s.useCallback(he=>{!he||A!=="scale"||(he.style.transformOrigin=df(he))},[A]),U=s.useCallback(he=>{if(he){if(x==="contain"){const te=cS(he);if(te){const le=he.closest(`.${c}-item-image`);le instanceof HTMLElement&&le.style.setProperty(`--${c}-item-media-aspect`,String(te))}}y(he)}},[c,y,x]),ee={width:k.scalingValue(v,n??!1),...P,...dS(e,c,n),[`--${c}-image-hover-scale`]:String(R)},de=(()=>{const he={},te=f.current?getComputedStyle(f.current).getPropertyValue("--cntrl-article-width").trim():"";return te&&(he["--cntrl-article-width"]=te),he})(),F=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),ie=s.useMemo(()=>Ub(u),[u]),I=s.useMemo(()=>Zb(u),[u]),se=(he,te)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const le=ie.findIndex(fe=>fe.gridIndex===he);if(le<0)return;const re=ie[le];$(le),B(re.items),_(0),C(re.entry),j(te??null),N(!0)},J=s.useCallback(()=>{N(!1),j(null)},[]),Se=s.useCallback(()=>{const he=ie[z];return!he||!f.current?E:Xb(f.current,he.gridIndex,x)??E},[ie,z,E,x]),Re=s.useCallback(he=>{if(ie.length>1){const te=ie.length,le=(z+he+te)%te,re=ie[le];$(le),B(re.items),_(0),C(re.entry);return}_(te=>(te+he+V.length)%V.length)},[ie,z,V.length]),pe=ie.length>1||V.length>1;return s.useEffect(()=>{if(!w||typeof document>"u")return;const he=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=he}},[w]),s.useEffect(()=>{!n||o||i||N(!1)},[n,o,i]),s.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&N(!1)},[e==null?void 0:e.lightbox]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),a.jsx(Jb,{mediaList:I}),a.jsx("div",{ref:f,className:`${c}-wrapper ${c}-type-${p}`,style:ee,children:u.map((he,te)=>{var fe,xe;const le=!!((fe=he.image)!=null&&fe.assetId),re=mS(!!F,le,te,c,x,se);return a.jsxs("div",{className:`${c}-item`,children:[he.title?a.jsx("span",{className:`${c}-item-title`,onClick:re,style:re?{cursor:"pointer"}:void 0,children:he.title}):null,(xe=he.image)!=null&&xe.assetId?a.jsx("span",{className:[`${c}-item-image`,x==="contain"?`${c}-item-image-fit`:void 0,Y].filter(Boolean).join(" "),children:he.image.type==="video"?a.jsx("video",{ref:U,src:he.image.assetId,"data-waterfall-index":te,style:S,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:re,onLoadedData:Te=>U(Te.currentTarget)}):a.jsx("img",{ref:U,src:he.image.assetId,alt:he.image.name??"","data-waterfall-index":te,style:S,onClick:re,onLoad:Te=>U(Te.currentTarget)})}):null,te<u.length-1&&a.jsx("div",{className:`${c}-item-gap-host`,style:{width:m},children:o&&!w&&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:h,height:"100%"}})})]},te)})}),w&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const he=(l?document.getElementById(l):null)??document.body;return Xn.createPortal(a.jsx("div",{style:de,"data-selection":"none",children:a.jsx(oS,{prefix:c,items:V,index:H,entry:L,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:pe,lightboxEntries:ie,entryIdx:z,layoutId:r,sourceRect:E,resolveCloseSourceRect:Se,onClose:J,onPrev:()=>Re(-1),onNext:()=>Re(1)})}),he)})()]})}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=Li.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:{assetId:"01M3QM74XERA3G7J0J00XVKEXX",objectFit:"cover"}},{title:"Lunar Module Pilot",...Qr,image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...Qr,image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",objectFit:"cover"}},{title:"David R. Scott During EVA",...Qr,image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",objectFit:"cover"}}],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:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","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.assetId",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,IS=.15,LS=.4,PS=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`
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=Li.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:{assetId:"01M3QM74XERA3G7J0J00XVKEXX",objectFit:"cover"}},{title:"Lunar Module Pilot",...Qr,image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...Qr,image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",objectFit:"cover"}},{title:"David R. Scott During EVA",...Qr,image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",objectFit:"cover"}}],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:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","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:gS,id:"waterfall",name:"Waterfall",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/waterfall.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},...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,IS=.15,LS=.4,PS=100,ro=100,gd={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}: ${k.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,v)=>{n.style.transform=`translate(${p}px, ${v}px)`;const b=n.getBoundingClientRect();return{x:b.left,y:b.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=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,L=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,I=(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),P=!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,Le]=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),Le(Qe);return}ne.current=Qe,se(!0),Le(Ne);return}se(!1),Le(Qe)},[le,d,N,A,ge]),Pe=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),Le(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),Le(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,Le(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),Le(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(()=>{P&&Ce||Pe(1)},ve);return()=>window.clearInterval(_e)},[y,d,Pe,U,Ce,P]);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>PS)&&Math.abs(_e.velocity)>LS,Ne=_e.size>0&&Math.abs(_e.offset-_e.baseOffset)>_e.size*IS;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),Le(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.assetId,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(),Pe(-1)},className:`${r}-arrow-inner`,style:{transform:`translate(${F.scalingValue(z,n)}, ${F.scalingValue(L*(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(),Pe(1)},style:{transform:`translate(${F.scalingValue(z*(C?-1:1),n)}, ${F.scalingValue(L,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:()=>Pe(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?I:$,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}=k.useScopedStyles(),l=ES(e,n),c=t??[],d=c.length,u=(e==null?void 0:e.trigger)??hd,p=u.sizeType??"drag",v=u.value??hd.value,b=(e==null?void 0:e.direction)??"horizontal",m=(e==null?void 0:e.transition)??"slide",h=(e==null?void 0:e.nav)??"classic",x=(e==null?void 0:e.navSize)??"m",S=RS[x],P=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,f=ve=>k.scalingValue(ve*P,n),w=(e==null?void 0:e.show)??"always",N=(e==null?void 0:e.controls)??null,V=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,B=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,H=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,_=(e==null?void 0:e.controlsColor)??gd.color,z=(e==null?void 0:e.controlsHoverColor)??gd.hover,$=(e==null?void 0:e.navColor)??Zo.colors.inactive,E=(e==null?void 0:e.navPaginationColor)??Zo.colors.pagination,j=(e==null?void 0:e.navBackgroundColor)??Zo.colors.background,L=(e==null?void 0:e.linkColor)??ws.linkColor,C=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,T=b==="horizontal",G=p==="click",A=p==="drag",Y=p==="auto"&&(!n||!!i),R=!n,y=m==="slide",U=h==="classic",ee=w!=="never"&&V>0,de=w==="on hover",F=k.scalingValue(V,n),ie={width:F,height:F,maxWidth:F},I=y&&d>1,[se,J]=s.useState(0),[Se,Re]=s.useState(I?1:0),[pe,he]=s.useState(!1),[te,le]=s.useState(!1),[re,fe]=s.useState(!1),[xe,Te]=s.useState(0),[me,be]=s.useState(!1),[we,g]=s.useState(!1),X=s.useRef(!1),Z=s.useRef(Se);Z.current=Se;const ne=s.useRef(null),ye=s.useRef(0),K=s.useRef(null),D=s.useRef(null),ce=s.useRef(null),q=s.useRef(null),ue=s.useCallback(ve=>{X.current=ve,he(ve)},[]),W=s.useCallback(ve=>{if(d<2||ve===0)return;const Fe=ve>0?1:-1,Xe=Math.abs(ve);if(be(!0),ue(!0),!y){J(st=>rr(st+ve,d));return}let Ye=Z.current;const Pe=I&&(Ye===0||Ye===d+1),_e=Pe?se+1:null;Pe&&(Ye=se+1);let Ke=Xe;for(;Ke>0;){const st=kS(Ye,Fe,d,I);if(Ye=st.position,Ke-=1,st.hitBoundary){ye.current=Ke*Fe;break}}const Ze=Xe-Ke;if(Ze>0&&J(st=>rr(st+Ze*Fe,d)),Z.current=Ye,_e!==null){if(Z.current=_e,Ye===_e){le(!0),Re(Ye);return}ne.current=Ye,le(!0),Re(_e);return}le(!1),Re(Ye)},[se,d,I,y,ue]),Le=s.useCallback(ve=>{W(ve)},[W]),ae=s.useCallback(ve=>{if(d<2)return;const Fe=rr(ve,d);if(!(Fe===se&&!X.current)&&(be(!0),ue(!0),J(Fe),y)){const Xe=Fe+(I?1:0);ne.current=null,ye.current=0,Z.current=Xe,le(!1),Re(Xe)}},[se,d,I,y,ue]);s.useEffect(()=>{if(!pe)return;const ve=window.setTimeout(()=>{if(I&&(Se===0||Se===d+1)){ne.current=null,le(!0),Re(se+1);return}ue(!1)},So);return()=>window.clearTimeout(ve)},[se,d,I,pe,ue,Se]),s.useEffect(()=>{if(!te)return;let ve=0;const Fe=requestAnimationFrame(()=>{ve=requestAnimationFrame(()=>{const Xe=ne.current;ne.current=null;const Ye=ye.current;if(ye.current=0,le(!1),Xe!==null){Z.current=Xe,Re(Xe);return}if(Ye!==0){W(Ye);return}ue(!1)})});return()=>{cancelAnimationFrame(Fe),cancelAnimationFrame(ve)}},[W,ue,te]);const Q=`${I}:${d}`,Ne=s.useRef(Q);s.useEffect(()=>{if(Ne.current===Q)return;Ne.current=Q;const ve=d>0?Math.min(se,d-1):0;ce.current=null,q.current=null,fe(!1),Te(0),J(ve),le(!0),Re(ve+(I?1:0))},[se,d,I,Q]),s.useEffect(()=>{if(!me)return;const ve=window.setTimeout(()=>be(!1),CS);return()=>window.clearTimeout(ve)},[me,se]),s.useEffect(()=>{if(!Y||d<2)return;const ve=Math.max(v,.1)*1e3,Fe=window.setInterval(()=>{R&&we||Le(1)},ve);return()=>window.clearInterval(Fe)},[v,d,Le,Y,we,R]);const Oe=s.useCallback(ve=>{const Fe=ce.current;if(!Fe||Fe.pointerId!==ve.pointerId)return;ce.current=null,q.current=null;const Xe=K.current;if(Xe!=null&&Xe.hasPointerCapture(ve.pointerId)&&Xe.releasePointerCapture(ve.pointerId),!Fe.isActive){y&&Te(0);return}const Pe=!(ve.timeStamp-Fe.lastTime>PS)&&Math.abs(Fe.velocity)>LS,_e=Fe.size>0&&Math.abs(Fe.offset-Fe.baseOffset)>Fe.size*IS;if(fe(!1),!Pe&&!_e){Te(0);return}const Ke=_e?Fe.offset-Fe.baseOffset:Fe.velocity;let Ze=1;_e&&Fe.size>0&&(Ze=Math.max(1,Math.round(Math.abs(Ke)/Fe.size))),Te(0),W(Ke<0?Ze:-Ze)},[W,y]);s.useEffect(()=>{const ve=Fe=>{q.current===null||Fe.pointerId!==q.current||Oe(Fe)};return window.addEventListener("pointerup",ve),window.addEventListener("pointercancel",ve),()=>{window.removeEventListener("pointerup",ve),window.removeEventListener("pointercancel",ve)}},[Oe]);const it=ve=>{const Fe=K.current;if(!A||d<2||!Fe||ve.pointerType==="mouse"&&ve.button!==0)return;ne.current=null,ye.current=0,X.current&&ue(!1);let Xe=0;const Ye=D.current;if(y&&Ye){const Pe=T?Ye.offsetWidth:Ye.offsetHeight;if(Pe>0){const _e=AS(Ye,T);let Ke=Z.current;I&&(Ke===0||Ke===d+1)?(Ke=se+1,Z.current=Ke,le(!0),Re(Ke),Xe=0):Xe=_e+Ke*Pe,Te(Xe)}}Fe.setPointerCapture(ve.pointerId),q.current=ve.pointerId,ce.current={pointerId:ve.pointerId,startClientX:ve.clientX,startClientY:ve.clientY,axes:FS(Fe,`${r}-axis-probe`),size:T?Fe.offsetWidth:Fe.offsetHeight,isActive:!1,baseOffset:Xe,offset:Xe,lastTime:ve.timeStamp,velocity:0}},qe=ve=>{const Fe=ce.current;if(!Fe||Fe.pointerId!==ve.pointerId)return;if(ve.pointerType==="mouse"&&ve.buttons===0){Oe(ve);return}const Xe=ve.clientX-Fe.startClientX,Ye=ve.clientY-Fe.startClientY,Pe=Fe.axes?NS(Fe.axes,Xe,Ye):{x:Xe,y:Ye},_e=T?Pe.x:Pe.y,Ke=T?Pe.y:Pe.x,Ze=Fe.baseOffset+_e;if(!Fe.isActive){if(Math.max(Math.abs(_e),Math.abs(Ke))<TS)return;if(Math.abs(Ke)>Math.abs(_e)){const Ue=K.current;Ue!=null&&Ue.hasPointerCapture(Fe.pointerId)&&Ue.releasePointerCapture(Fe.pointerId),ce.current=null,q.current=null,y&&Te(0);return}Fe.isActive=!0,fe(!0)}const st=ve.timeStamp-Fe.lastTime;st>0&&(Fe.velocity=(Ze-Fe.offset)/st,Fe.lastTime=ve.timeStamp),Fe.offset=Ze,y&&Te(Ze)},Je=ve=>{Oe(ve)},ot=T?`translate3d(calc(${-Se*100}% + ${xe}px), 0, 0)`:`translate3d(0, calc(${-Se*100}% + ${xe}px), 0)`,Ve=I?[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:Pt(`${r}-wrapper`,{[`${r}-transition-reveal`]:m==="reveal",[`${r}-transition-reveal-vertical`]:m==="reveal"&&!T}),onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),children:[a.jsxs("div",{className:`${r}-slider-inner`,style:{backgroundColor:"transparent"},children:[a.jsx("div",{ref:K,className:Pt(`${r}-track`,{[`${r}-track-draggable`]:A,[`${r}-track-draggable-vertical`]:A&&!T}),onPointerDown:it,onPointerMove:qe,onPointerUp:Je,onPointerCancel:Je,onLostPointerCapture:ve=>{q.current===ve.pointerId&&Oe(ve)},children:a.jsx("div",{ref:D,className:Pt(`${r}-list`,{[`${r}-list-slide`]:y,[`${r}-list-slide-vertical`]:y&&!T,[`${r}-list-fade`]:!y}),style:y?{transform:ot,transition:re||te?"none":`transform ${So}ms ${Sp}`}:void 0,children:Ve.map((ve,Fe)=>{const Xe=I?rr(Fe-1,d):Fe,Pe=I&&(Fe===0||Fe===d+1)?`clone-${Fe===0?"start":"end"}`:`slide-${Xe}`;return a.jsx("div",{className:Pt(`${r}-slide`,{[`${r}-is-active`]:!y&&Xe===se}),children:a.jsx("div",{className:`${r}-slider-item`,children:a.jsx("div",{className:`${r}-img-wrapper`,children:a.jsx("img",{className:Pt(`${r}-slider-image`,{[`${r}-contain`]:ve.image.objectFit==="contain",[`${r}-cover`]:ve.image.objectFit==="cover"}),src:ve.image.assetId,alt:ve.image.name??"",draggable:!1})})})},Pe)})})}),ee&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Pt(`${r}-arrow`,{[`${r}-arrow-prev`]:T,[`${r}-arrow-prev-vertical`]:!T,[`${r}-hover-arrow`]:de}),style:{color:_,"--arrow-hover-color":z,...ie},children:a.jsxs("button",{onClick:ve=>{ve.stopPropagation(),Le(-1)},className:`${r}-arrow-inner`,style:{transform:`translate(${k.scalingValue(B,n)}, ${k.scalingValue(H*(T?1:-1),n)}) rotate(${T?"0deg":"90deg"})`},children:[N&&a.jsx(mn,{url:N,fill:_,hoverFill:z,className:Pt(`${r}-arrow-img`,`${r}-mirror`),style:ie}),!N&&a.jsx(fd,{color:_,className:Pt(`${r}-arrow-icon`,`${r}-arrow-img`,`${r}-mirror`)})]})}),a.jsx("div",{className:Pt(`${r}-arrow`,{[`${r}-arrow-next`]:T,[`${r}-arrow-next-vertical`]:!T,[`${r}-hover-arrow`]:de}),style:{color:_,"--arrow-hover-color":z,...ie},children:a.jsxs("button",{className:`${r}-arrow-inner`,onClick:ve=>{ve.stopPropagation(),Le(1)},style:{transform:`translate(${k.scalingValue(B*(T?-1:1),n)}, ${k.scalingValue(H,n)}) rotate(${T?"0deg":"90deg"})`},children:[N&&a.jsx(mn,{url:N,fill:_,hoverFill:z,className:`${r}-arrow-img`,style:ie}),!N&&a.jsx(fd,{color:_,className:Pt(`${r}-arrow-icon`,`${r}-arrow-img`)})]})})]}),G&&a.jsx("div",{className:`${r}-click-overlay`,onClick:()=>Le(1)}),U&&a.jsx("div",{className:Pt(`${r}-pagination`,{[`${r}-pagination-inside-bottom`]:T,[`${r}-pagination-inside-left`]:!T}),style:T?{bottom:f(S.inset)}:{left:f(S.inset)},children:a.jsx("div",{className:Pt(`${r}-pagination-inner`,{[`${r}-pagination-vertical`]:!T,[`${r}-animate-dots`]:me}),style:{backgroundColor:j,gap:f(S.gapInactive-S.activeDot+S.dot),...T?{height:f(S.activeDot+S.paddingY*2),paddingTop:f(S.paddingY),paddingBottom:f(S.paddingY),paddingLeft:f(S.paddingActive),paddingRight:f(S.paddingActive)}:{width:f(S.activeDot+S.paddingY*2),paddingLeft:f(S.paddingY),paddingRight:f(S.paddingY),paddingTop:f(S.paddingActive),paddingBottom:f(S.paddingActive)},borderRadius:f(S.borderRadius),transform:`translate(${k.scalingValue(Zo.offset.x,n)}, ${k.scalingValue(Zo.offset.y,n)})`},children:c.map((ve,Fe)=>{const Xe=Fe===se,Ye=Xe?S.activeDot:S.dot;return a.jsx("button",{onClick:()=>ae(Fe),className:`${r}-pagination-item`,style:{width:f(S.activeDot)},children:a.jsx("div",{className:`${r}-dot`,style:{backgroundColor:Xe?E:$,width:f(Ye)}})},Fe)})},`${x}-${b}`)})]}),a.jsxs("div",{className:`${r}-caption-block`,children:[a.jsx("div",{"data-controls":o?"captionMarginTop":void 0,className:o?`${r}-control`:void 0,style:{height:k.scalingValue(C,n)}}),a.jsx("div",{className:`${r}-caption-text-wrapper`,children:c.map((ve,Fe)=>a.jsx("div",{className:Pt(`${r}-caption-text`,{[`${r}-with-pointer-events`]:Fe===se&&n,[`${r}-active`]:Fe===se}),style:{...l,width:"max-content",transitionDuration:`${Math.round(So/2)}ms`},children:a.jsx("div",{className:`${r}-caption-text-inner`,style:{"--link-color":L,"--link-hover-color":L,position:"relative",top:k.scalingValue(ws.offset.y,n),left:k.scalingValue(ws.offset.x,n)},children:a.jsx(Yi,{content:ve.imageCaption})})},Fe))})]})]})]})}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:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",assetId:"01M3QM74XESYN1HRYH9VRTZ5CK"},imageCaption:[{type:"paragraph",children:[{text:"Earth-orbital mission"}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XERA3G7J0J00XVKEXX"},imageCaption:[{type:"paragraph",children:[{text:"Salton Sea from Above"}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEE2101QD8PM6E4JSA"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module Pilot"}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEVZ9F59FC7M9BA63Q"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module 3 porch"}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA"},imageCaption:[{type:"paragraph",children:[{text:"Command Module"}]}]}]}},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.assetId",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:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",assetId:"01M3QM74XESYN1HRYH9VRTZ5CK"},imageCaption:[{type:"paragraph",children:[{text:"Earth-orbital mission"}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XERA3G7J0J00XVKEXX"},imageCaption:[{type:"paragraph",children:[{text:"Salton Sea from Above"}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEE2101QD8PM6E4JSA"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module Pilot"}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEVZ9F59FC7M9BA63Q"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module 3 porch"}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA"},imageCaption:[{type:"paragraph",children:[{text:"Command Module"}]}]}]}},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.assetId",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}`]:k.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.assetId?n:t!=null&&t.assetId?t:null}function JS(e){const[t]=e.media;return t!=null&&t.assetId?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.assetId?o:null})}return t}return e.filter(t=>t==null?void 0:t.assetId).map(t=>({displayMedia:t,lightboxMedia:t}))}function Ks(e){return e.type==="video"}function 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,L]=s.useState(null),[_,G]=s.useState("opening"),[$,I]=s.useState(0),[D,E]=s.useState(0),[T,C]=s.useState(!1),[V,w]=s.useState(!1),[U,P]=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"){L({width:h,height:Y,left:Ce.left,top:Ce.top});return}if(!xe){L(Zr(me));return}const{width:Q,height:ne}=nw(xe);if(!Q||!ne){L(Zr(me));return}const ue=Q/ne,B=h/Y;if(ue>B){const R=h/ue;L({width:h,height:R,left:Ce.left,top:Ce.top+(Y-R)/2})}else{const R=Y*ue;L({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(),I(0),E(0),O(!1),P(!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&&L(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&&L(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,I(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,P(!0),I(te),G("closing")}else x.current=0,I(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",Le=_==="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"||Le?0:1,transition:V&&!T?"none":T?`transform ${Zn}ms ${Oi}`:U?`transform ${Zn}ms ${Oi}, opacity ${Zn}ms ${Oi}`:_==="opening"||Le?`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.assetId,phase:_,mediaRef:g,mediaStyle:we,onLoadedMetadata:le,onClick:K,onMouseMove:se,onTransitionEnd:pe},`${n}-${j.assetId}`):a.jsx("img",{ref:g,src:j.assetId,alt:j.name,onLoad:le,onTransitionEnd:pe,style:we},`${n}-${j.assetId}`)),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),L=Ks(t)?a.jsx("video",{...q,src:t.assetId,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):a.jsx("img",{...q,src:t.assetId,alt:t.name??""});return a.jsxs("div",{className:`${e}-gallery-item`,children:[v?a.jsx("div",{style:f,children:L}):L,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:L,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 I=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-${L}`,`${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,I]}):a.jsxs(a.Fragment,{children:[I,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,Lt;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,L=dw(e==null?void 0:e.transition),_=(e==null?void 0:e.lightbox)??"on",G=p==="b",$=L==="fade"||L==="retype",{setTitleRef:I,dominantIndex:D}=mw(d.length,$,x),E=((dt=d[D])==null?void 0:dt.title)??"",T=((Lt=d[D])==null?void 0:Lt.description)??"",C=Sd(E,L==="retype"),V=Sd(T,L==="retype"),w=L==="fade"||L==="retype",U=L==="retype"?C:E,P=L==="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,Le=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:Pe,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:Pe??.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(Pe,Se,l,n),...Cs(Ge,ve,l,n,"description-leading-gap")},Me=$s(Pe,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),Pt={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(Pt,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:P,position:x,titleRef:()=>{},titleClassName:`${Me} ${l}-single-title`,titleContainerStyle:{...he,...Le},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:I(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.assetId===_t.assetId):-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.assetId}-${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.assetId===_t.assetId):-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.assetId}-${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.assetId?n:t!=null&&t.assetId?t:null}function JS(e){const[t]=e.media;return t!=null&&t.assetId?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.assetId?o:null})}return t}return e.filter(t=>t==null?void 0:t.assetId).map(t=>({displayMedia:t,lightboxMedia:t}))}function Ks(e){return e.type==="video"}function 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 v=i==="cover",b=s.useRef(null),m=s.useRef(null),h=s.useRef(null),x=s.useRef(0),S=s.useRef(0),P=s.useRef("none"),f=s.useRef(!1),w=s.useRef(!1),N=s.useRef(!1),V=s.useRef(null),[B,H]=s.useState(null),[_,z]=s.useState("opening"),[$,E]=s.useState(0),[j,L]=s.useState(0),[C,T]=s.useState(!1),[G,A]=s.useState(!1),[Y,R]=s.useState(!1),y=s.useRef(n),U=t[n],ee=U?Ks(U):!1,de=j!==0||C,F=s.useCallback(me=>{N.current=me,T(me)},[]),ie=s.useCallback(()=>{V.current!==null&&(window.clearTimeout(V.current),V.current=null)},[]),I=s.useCallback(()=>{ie(),V.current=window.setTimeout(()=>{ie(),F(!1)},Zn+32)},[ie,F]),se=s.useCallback(()=>{const me=b.current,be=m.current;if(!me)return;const we=me.getBoundingClientRect(),g=we.width,X=we.height;if(!g||!X)return;if(i==="cover"){H({width:g,height:X,left:we.left,top:we.top});return}if(!be){H(Zr(me));return}const{width:Z,height:ne}=nw(be);if(!Z||!ne){H(Zr(me));return}const ye=Z/ne,K=g/X;if(ye>K){const D=g/ye;H({width:g,height:D,left:we.left,top:we.top+(X-D)/2})}else{const D=X*ye;H({width:D,height:X,left:we.left+(g-D)/2,top:we.top})}},[i]);s.useEffect(()=>{se();const me=b.current;if(!me)return;const be=new ResizeObserver(()=>se());return be.observe(me),()=>be.disconnect()},[se,n]),s.useEffect(()=>{_==="opening"&&B&&z("open")},[_,B]),s.useEffect(()=>{if(_!=="closing")return;const me=setTimeout(()=>r(),Zn);return()=>clearTimeout(me)},[_,r]),s.useEffect(()=>()=>{ie()},[ie]),s.useLayoutEffect(()=>{if(y.current===n)return;ie(),E(0),L(0),F(!1),R(!1),A(!1),x.current=0,S.current=0,P.current="none",f.current=!1,h.current=null,w.current=!1;const me=b.current;me&&H(Zr(me)),y.current=n},[n,F,ie]),s.useEffect(()=>{if(_!=="open")return;let me=null;const be=()=>{me&&(document.removeEventListener("click",me,!0),me=null)},we=()=>{be(),me=K=>{K.stopPropagation(),K.preventDefault(),be()},document.addEventListener("click",me,!0)},g=K=>{ie(),N.current=!1,T(!1),L(0),A(!1),f.current=!1,S.current=0,P.current="none";const D=b.current;D&&H(Zr(D)),K<0?c():l()},X=K=>{if(Math.abs(K)>qS&&t.length>1){g(K);return}F(!0),L(0),I()},Z=K=>{if(K.touches.length!==1||N.current)return;const D=K.touches[0];w.current=!0,h.current={x:D.clientX,y:D.clientY},P.current="none",S.current=0,f.current=!1},ne=K=>{if(!h.current||K.touches.length!==1||N.current)return;const D=K.touches[0],ce=D.clientX-h.current.x,q=D.clientY-h.current.y;if(P.current==="none"){if(Math.abs(ce)<10&&Math.abs(q)<10)return;if(Math.abs(ce)>Math.abs(q)){if(t.length<=1)return;P.current="horizontal"}else if(q>0)P.current="vertical";else return}if(P.current==="horizontal"){f.current=!0,A(!0),S.current=ce,L(ce),K.preventDefault();return}P.current==="vertical"&&(f.current=!0,A(!0),x.current=q,E(q),K.preventDefault())},ye=()=>{if(!h.current)return;const K=P.current,D=f.current;if(D&&K==="horizontal")X(S.current),we();else if(D&&K==="vertical")if(x.current>US){const q=window.innerHeight;x.current=q,R(!0),E(q),z("closing")}else x.current=0,E(0),we();else K==="horizontal"&&Math.abs(S.current)>0&&(X(S.current),we());h.current=null,P.current="none",S.current=0,f.current=!1,A(!1)};return document.addEventListener("touchstart",Z,{passive:!0}),document.addEventListener("touchmove",ne,{passive:!1}),document.addEventListener("touchend",ye),document.addEventListener("touchcancel",ye),()=>{document.removeEventListener("touchstart",Z),document.removeEventListener("touchmove",ne),document.removeEventListener("touchend",ye),document.removeEventListener("touchcancel",ye),be()}},[_,t.length,c,l,F,I,ie]),s.useEffect(()=>{const me=be=>{be.key==="Escape"&&(be.preventDefault(),be.stopPropagation(),_!=="closing"&&z("closing"))};return window.addEventListener("keydown",me,!0),()=>window.removeEventListener("keydown",me,!0)},[_]);const J=()=>{_!=="closing"&&z("closing")},Se=_==="open",Re=_==="closing",pe=$>0?Math.max(0,1-$/500):1,he=$>0?Math.max(.35,1-$/500):1,te=me=>{if(me.stopPropagation(),w.current){w.current=!1;return}if(t.length<=1)return;const be=me.currentTarget.getBoundingClientRect(),we=me.clientY-be.top,g=Math.min(52,be.height*.2);if(!(we>be.height-g)){if(me.clientX-be.left<be.width/2){l();return}c()}},le=me=>{if(t.length<=1)return;const be=me.currentTarget.getBoundingClientRect(),we=me.clientX-be.left,g=me.clientY-be.top,X=Math.min(52,be.height*.2);if(g>be.height-X){me.currentTarget.style.cursor="default";return}me.currentTarget.style.cursor=we<be.width/2?"w-resize":"e-resize"},re=s.useCallback(me=>{me.propertyName!=="transform"||!N.current||(ie(),F(!1))},[ie,F]),fe=de?`translateX(${j}px)`:$>0?`translateY(${$}px)`:void 0,xe={position:"fixed",top:B==null?void 0:B.top,left:B==null?void 0:B.left,width:B==null?void 0:B.width,height:B==null?void 0:B.height,objectFit:i==="cover"?"cover":"contain",transform:fe,opacity:$>0?he:_==="opening"||Re?0:1,transition:G&&!C?"none":C?`transform ${Zn}ms ${Oi}`:Y?`transform ${Zn}ms ${Oi}, opacity ${Zn}ms ${Oi}`:_==="opening"||Re?`opacity ${Zn}ms ${Oi}`:"none",pointerEvents:ee&&Se&&!de?"auto":"none",touchAction:ee&&Se?"none":void 0,zIndex:9998},Te=B?{position:"fixed",top:B.top,height:B.height,width:B.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:Se?pe:0,transition:G?"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:v?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:b,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Se?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:b,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Se?1:0,transition:`opacity ${Zn}ms ${Oi}`},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]})}),B&&U&&(ee?a.jsx(sw,{src:U.assetId,phase:_,mediaRef:m,mediaStyle:xe,onLoadedMetadata:se,onClick:te,onMouseMove:le,onTransitionEnd:re},`${n}-${U.assetId}`):a.jsx("img",{ref:m,src:U.assetId,alt:U.name,onLoad:se,onTransitionEnd:re,style:xe},`${n}-${U.assetId}`)),Se&&Te&&t.length>1&&!ee&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Te,left:B.left,cursor:"w-resize",pointerEvents:de?"none":"auto"},onClick:me=>{if(w.current){w.current=!1;return}me.stopPropagation(),l()}}),a.jsx("div",{style:{...Te,left:B.left+B.width/2,cursor:"e-resize",pointerEvents:de?"none":"auto"},onClick:me=>{if(w.current){w.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 v=`${e}-gallery-${Ks(t)?"video":"image"}`,b=r.display==="cover",m=rw(r),h=_=>k.scalingValue(_,l??!1),x=n??po,S=o?{width:"100%",maxWidth:"100%"}:{width:h(x),maxWidth:"100%"},P=i?{borderRadius:h(i)}:{},f={...S,...b?{aspectRatio:m,height:"auto",overflow:"hidden"}:{},...P},w={...b?{display:"block",width:"100%",height:"100%",objectFit:"cover",maxWidth:"100%"}:{display:"block",maxWidth:"100%",height:"auto",width:o?"100%":h(x)},...p?{cursor:"pointer",pointerEvents:"auto"}:{},...b?{}:P},V={className:v,style:w,onClick:p?_=>{_.stopPropagation(),p()}:void 0},B=Math.max(c,ei),H=Ks(t)?a.jsx("video",{...V,src:t.assetId,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):a.jsx("img",{...V,src:t.assetId,alt:t.name??""});return a.jsxs("div",{className:`${e}-gallery-item`,children:[b?a.jsx("div",{style:f,children:H}):H,d&&c>0&&a.jsx("div",{className:`${e}-padding-handle`,style:{height:h(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:h(B)}})]})}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 v=t==="a"?i:t==="c"?o:0,b=v>0||d;return a.jsxs("div",{className:`${e}-gallery-controls`,children:[t==="c"&&b&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(v)},"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"&&b&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(v)},"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:v,showTextBoxOutline:b=!1,showDescriptionPaddingControl:m=!1,descriptionPaddingPaired:h=!1,topPaddingControl:x,bottomPaddingControl:S}){const P=s.useRef(null),[f,w]=s.useState(0),N=t??"",V=n??"",B=V.length>0,{horizontal:H,vertical:_}=Gl(i),z=_==="center"||_==="bottom",$=_==="bottom";s.useLayoutEffect(()=>{if(!z)return;const C=P.current;if(!C||typeof ResizeObserver>"u")return;const T=()=>w(C.offsetHeight);T();const G=new ResizeObserver(T);return G.observe(C),()=>G.disconnect()},[N,V,z]);const E=a.jsx("span",{className:`${e}-title-text`,style:d,children:N}),j=B?a.jsx("span",{className:u,style:p,children:V}):null,L=B?a.jsx("div",{className:`${e}-title-texts-gap`,style:{height:v},children:m&&a.jsx("div",{"data-controls":"titleDescriptionPadding",...h?{"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:C=>{P.current=C,o(C)},className:[r,`${e}-title-h-${H}`,`${e}-title-v-${_}`].join(" "),style:{...z?{[`--${e}-title-height`]:`${f}px`}:{},...l},children:a.jsxs("div",{className:`${e}-title-text-stack`,style:c,children:[x,a.jsx("div",{className:b?`${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:[j,L,E]}):a.jsxs(a.Fragment,{children:[E,L,j]})})}),S]})})}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 mw(e,t,n){const i=Array.from({length:t},(l,c)=>{const d=e.current[c];if(!d)return 0;const u=d.getBoundingClientRect(),p=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 gw(e,t,n){const i=s.useRef([]),[{opacities:o,dominantIndex:r},l]=s.useState(()=>({opacities:Array.from({length:e},(d,u)=>u===0?1:0),dominantIndex:0}));return s.useLayoutEffect(()=>{if(!t||e===0){l({opacities:Array.from({length:e},()=>1),dominantIndex:0});return}let d=0;const u=()=>{l(mw(i,e,n))},p=()=>{d||(d=window.requestAnimationFrame(()=>{d=0,u()}))};return u(),window.addEventListener("scroll",p,{passive:!0}),window.addEventListener("resize",p,{passive:!0}),()=>{d&&window.cancelAnimationFrame(d),window.removeEventListener("scroll",p),window.removeEventListener("resize",p)}},[t,e,n]),{setTitleRef:d=>u=>{i.current[d]=u},opacities:o,dominantIndex:r}}function 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 gt,Et;const{prefix:l}=k.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",v=(e==null?void 0:e.imgWidth)??po,b=(e==null?void 0:e.titleWidth)??iw,m=ow(e==null?void 0:e.imageDisplay),h=(e==null?void 0:e.cornerRadius)??BS,x=GS(e==null?void 0:e.position),{horizontal:S,vertical:P}=Gl(x),f=(e==null?void 0:e.titleTopPadding)??0,w=(e==null?void 0:e.titleBottomPadding)??0,N=(e==null?void 0:e.titleLeftPadding)??0,V=(e==null?void 0:e.titleRightPadding)??0,B=(e==null?void 0:e.titleDescriptionPadding)??0,H=dw(e==null?void 0:e.transition),_=(e==null?void 0:e.lightbox)??"on",z=p==="b",$=H==="fade"||H==="retype",{setTitleRef:E,dominantIndex:j}=gw(d.length,$,x),L=((gt=d[j])==null?void 0:gt.title)??"",C=((Et=d[j])==null?void 0:Et.description)??"",T=Sd(L,H==="retype"),G=Sd(C,H==="retype"),A=H==="fade"||H==="retype",Y=H==="retype"?T:L,R=H==="retype"?G:C,y=z?void 0:{width:k.scalingValue(v,n??!1)},U=_==="on"&&(!n||i||o),ee=o??!1,de=(e==null?void 0:e.galleryPaddingRight)??0,F=(e==null?void 0:e.galleryPaddingLeft)??0,ie=(e==null?void 0:e.galleryPaddingBetween)??0,I=wt=>k.scalingValue(wt,n??!1),J={width:I(b)},Se=p==="a"?de:F,Re=z?{width:"100%"}:{width:`calc(100% - ${I(v)} - ${I(Se)})`,...p==="c"?{marginLeft:"auto"}:{}},pe=Math.max(de,ei),he=Math.max(F,ei),te=Math.max(ie,ei),le=Math.max(f,ei),re=Math.max(w,ei),fe=Math.max(N,ei),xe=Math.max(V,ei),Te=Math.max(B,ei),me=Math.max(0,(u??1)-(v??po)),be=p==="a"?Math.max(0,(u??1)-(v??po)-de):p==="c"?Math.max(0,(u??1)-(v??po)-F):p==="b"?u??1:1,we=ee&&P==="top",g=ee&&P==="bottom",X=ee&&S==="left",Z=ee&&S==="right",ne=d.length>1,ye=z?void 0:I((p==="c"?F:de)+(v??po)),K=p==="c"&&ye?{left:ye}:void 0,D=p==="a"&&ye?{right:ye}:void 0,ce=z?{left:0,width:"100%"}:p==="a"?{right:I(de),width:I(v)}:{left:I(F),width:I(v)},{titleColor:q,titleFontFamily:ue,titleFontSettings:W,titleFontSize:Le,titleLineHeight:ae,titleLetterSpacing:Q,titleWordSpacing:Ne,titleAlign:Oe,titleTextAppearance:it,descriptionColor:qe,descriptionFontFamily:Je,descriptionFontSettings:ot,descriptionFontSize:Ve,descriptionLineHeight:ve,descriptionLetterSpacing:Fe,descriptionWordSpacing:Xe,descriptionAlign:Ye,descriptionTextAppearance:Pe,lightboxCounterColor:_e,lightboxCounterFontFamily:Ke,lightboxCounterFontSettings:Ze,lightboxCounterFontSize:st,lightboxCounterLineHeight:Ue,lightboxCounterLetterSpacing:De,lightboxCounterWordSpacing:ke,lightboxCounterTextAppearance:ht}=e??{},Be={fontSettings:{fontFamily:ue,fontWeight:(W==null?void 0:W.fontWeight)??400,fontStyle:(W==null?void 0:W.fontStyle)??"normal"},fontSize:Le??.01,lineHeight:ae,letterSpacing:Q??0,wordSpacing:Ne??0,textAlign:Oe??"left",textAppearance:it,color:q??"#000000"},We=un(en(Be,n)),mt=J,rt={...Cs(Le,ae,l,n),...Cs(Ve,ve,l,n,"description-leading-gap")},St=$s(Le,ae,`${l}-title`,`${l}-text-tight-leading`),Nt={fontSettings:{fontFamily:Je,fontWeight:(ot==null?void 0:ot.fontWeight)??400,fontStyle:(ot==null?void 0:ot.fontStyle)??"normal"},fontSize:Ve??.01,lineHeight:ve,letterSpacing:Fe??0,wordSpacing:Xe??0,textAlign:Ye??"left",textAppearance:Pe,color:qe??"#000000"},jt=un(en(Nt,n)),xt=$s(Ve,ve,`${l}-description-text`,`${l}-description-tight-leading`),Ce=I(ee?Te:B),He={fontSettings:{fontFamily:Ke,fontWeight:(Ze==null?void 0:Ze.fontWeight)??400,fontStyle:(Ze==null?void 0:Ze.fontStyle)??"normal"},fontSize:st??.01,lineHeight:Ue,letterSpacing:De??0,wordSpacing:ke??0,textAppearance:ht,color:_e??"#DEDDDD"},et={...un(en(He,n)),...Cs(st,Ue,l,n)},yt=$s(st,Ue,`${l}-lightbox-counter`,`${l}-text-tight-leading`),Rt=k.buildColorVars(l,{titleColor:q??"#000000",descriptionColor:qe??"#000000",lightboxCounterColor:_e??"#DEDDDD"},YS,KS),At=s.useRef(null),[qt,$t]=s.useState(!1),[zt,on]=s.useState([]),[vt,ft]=s.useState(0),Me=s.useCallback((wt,dt)=>{U&&(on(wt),ft(dt),$t(!0))},[U]),nt=s.useCallback(()=>{$t(!1)},[]),ct=s.useMemo(()=>{const wt={...Rt},dt=At.current?getComputedStyle(At.current).getPropertyValue("--cntrl-article-width").trim():"";return dt&&(wt["--cntrl-article-width"]=dt),wt},[Rt,qt]);return s.useEffect(()=>{if(!qt||_!=="on"||typeof document>"u")return;const wt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=wt}},[qt,_]),s.useEffect(()=>{!n||o||i||$t(!1)},[n,o,i]),s.useEffect(()=>{_==="off"&&$t(!1)},[_]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),a.jsx("div",{style:Rt,children:a.jsxs("div",{ref:At,className:`${l}-wrapper`,style:{width:k.scalingValue(u,n??!1),[`--${l}-title-top-padding`]:P==="top"?I(f):void 0,[`--${l}-title-bottom-padding`]:P==="bottom"?I(w):void 0,[`--${l}-title-left-padding`]:S==="left"?I(N):void 0,[`--${l}-title-right-padding`]:S==="right"?I(V):void 0},children:[A&&a.jsx("div",{className:`${l}-single-title-layer`,children:a.jsx(Ts,{P:l,title:Y,description:R,position:x,titleRef:()=>{},titleClassName:`${St} ${l}-single-title`,titleContainerStyle:{...rt,...Re},titleTextBoxStyle:mt,titleStyle:We,descriptionClassName:xt,descriptionStyle:jt,descriptionPadding:Ce,showTextBoxOutline:ee,showDescriptionPaddingControl:ee,topPaddingControl:we?Jr({P:l,controlKey:"titleTopPadding",scaled:I,height:le,paired:!1,side:"top"}):void 0,bottomPaddingControl:g?Jr({P:l,controlKey:"titleBottomPadding",scaled:I,height:re,paired:!1,side:"bottom"}):void 0})}),d.map((wt,dt)=>{const Ot=ew(wt.gallery),Lt=dt<d.length-1,Ht=Ot.filter(_t=>_t.lightboxMedia).map(_t=>_t.lightboxMedia),Gt={P:l,position:x,titleRef:E(dt),titleClassName:St,titleContainerStyle:rt,titleTextBoxStyle:A?{maxWidth:"100%"}:mt,titleStyle:We,descriptionClassName:xt,descriptionStyle:jt,descriptionPadding:Ce,showTextBoxOutline:ee&&!A,showDescriptionPaddingControl:ee&&!A,descriptionPaddingPaired:ne,topPaddingControl:we&&!A?Jr({P:l,controlKey:"titleTopPadding",scaled:I,height:le,paired:ne,side:"top"}):void 0,bottomPaddingControl:g&&!A?Jr({P:l,controlKey:"titleBottomPadding",scaled:I,height:re,paired:ne,side:"bottom"}):void 0};return a.jsxs("div",{"data-item-index":dt,className:`${l}-item ${l}-item-${p}`,style:{paddingBottom:Lt?I(ie):void 0},children:[X&&vd({P:l,controlKey:"titleLeftPadding",scaled:I,width:fe,maxFraction:be,side:"left",paired:ne,anchorStyle:K}),Z&&vd({P:l,controlKey:"titleRightPadding",scaled:I,width:xe,maxFraction:be,side:"right",paired:ne,anchorStyle:D}),ee&&Lt&&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:I(te),...ce}}),z?a.jsxs("div",{className:`${l}-gallery`,children:[a.jsx("div",{className:`${l}-gallery-media`,children:Ot.map(({displayMedia:_t,lightboxMedia:Vt},Dt)=>{const Ct=Vt?Ht.findIndex(O=>O.assetId===Vt.assetId):-1;return a.jsx(yd,{P:l,media:_t,imgWidth:v||void 0,cornerRadius:h||void 0,imageDisplay:m,isEditor:n,galleryPaddingBetween:ie,showPaddingAfter:Dt<Ot.length-1,showControls:ee,onMediaClick:U&&Ct>=0?()=>Me(Ht,Ct):void 0},`${_t.assetId}-${Dt}`)})}),a.jsx("div",{className:`${l}-title-layer`,children:a.jsx(Ts,{...Gt,title:A?"":wt.title,description:A?"":wt.description})})]}):a.jsxs(a.Fragment,{children:[a.jsx(Ts,{...Gt,title:A?"":wt.title,description:A?"":wt.description}),Ot.length>0&&a.jsx(cw,{P:l,layoutType:p,galleryWidthStyle:y,galleryPaddingRight:de,galleryPaddingLeft:F,galleryPaddingRightWidth:pe,galleryPaddingLeftWidth:he,galleryPaddingMaxFraction:me,showControls:ee,scaled:I,children:Ot.map(({displayMedia:_t,lightboxMedia:Vt},Dt)=>{const Ct=Vt?Ht.findIndex(O=>O.assetId===Vt.assetId):-1;return a.jsx(yd,{P:l,media:_t,cornerRadius:h||void 0,fillGalleryWidth:!0,imageDisplay:m,isEditor:n,galleryPaddingBetween:ie,showPaddingAfter:Dt<Ot.length-1,showControls:ee,onMediaClick:U&&Ct>=0?()=>Me(Ht,Ct):void 0},`${_t.assetId}-${Dt}`)})})]})]},dt)})]})}),qt&&_==="on"&&typeof document<"u"&&e&&(()=>{const wt=(r?document.getElementById(r):null)??document.body;return Xn.createPortal(a.jsx("div",{style:ct,"data-selection":"none",children:a.jsx(lw,{prefix:l,items:zt,index:vt,imageDisplay:aw(e.lightboxImageDisplay),isEditor:n,onClose:nt,onPrev:()=>ft(dt=>(dt-1+zt.length)%zt.length),onNext:()=>ft(dt=>(dt+1)%zt.length),counterClassName:yt,counterStyle:et,backgroundColor:e.backgroundColor??XS})}),wt)})()]})}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';
@@ -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 Is(e,t,n=0,i=9999){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,r)):t}function _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.assetId??"")}function Ip(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)*Ip(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=Ip(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 Lp(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 Lp(e,Mw,Ew)}function Uw(e){return Lp(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 Pp(e,t){return(e%t+t)%t}function Yw(e,t){return Xl(e,t)/t}function Xl(e,t){return Pp(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=Is((e==null?void 0:e.width)??(e==null?void 0:e.spread)??(e==null?void 0:e.wrapperWidth),ww),c=Is(e==null?void 0:e.imageWidth,$w),d=Is(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,Iw,1,30),y=Math.min(Rw,Math.max(0,Lw)),v=Math.min(1,Math.max(0,Pw)),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]),L=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),I=s.useMemo(()=>(t??[]).filter(N=>{var le;return!!((le=N.image)!=null&&le.assetId)}),[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,P=g>0,A=x==="scroll"&&P,j=x==="autoplay"&&P&&(n?!!i:!0),ie=j?360/(g*xw):0,ae=I.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,Le=null;const ye=pe=>{if(Le!==null){const fe=(pe-Le)/1e3/ie*J;$.current=ha($.current+fe)}Le=pe,le($.current),be=requestAnimationFrame(ye)},ce=()=>{be===null&&(Le=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 I.length===0?a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:L}}),a.jsx("div",{className:`${o}-wrapper`,style:{width:W(l)}})]}):a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:L}}),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,Le=I[Pp(J,I.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(Le)?a.jsx("video",{className:`${o}-media`,style:xe,src:Le.assetId,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:`${o}-media`,style:xe,src:Le.assetId,alt:Le.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';
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 Is(e,t,n=0,i=9999){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,r)):t}function _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.assetId??"")}function Ip(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)*Ip(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=Ip(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 Lp(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 Lp(e,Mw,Ew)}function Uw(e){return Lp(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 Pp(e,t){return(e%t+t)%t}function Yw(e,t){return Xl(e,t)/t}function Xl(e,t){return Pp(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}=k.useScopedStyles(),r=s.useRef(null),l=Is((e==null?void 0:e.width)??(e==null?void 0:e.spread)??(e==null?void 0:e.wrapperWidth),ww),c=Is(e==null?void 0:e.imageWidth,$w),d=Is(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,Iw,1,30),v=Math.min(Rw,Math.max(0,Lw)),b=Math.min(1,Math.max(0,Pw)),m=Math.max(0,(e==null?void 0:e.speed)??$p),h=(e==null?void 0:e.direction)==="left"?"left":"right",x=(e==null?void 0:e.playback)==="scroll"?"scroll":"autoplay",S=(e==null?void 0:e.cornerRadius)??0,P=(e==null?void 0:e.blur)!=="off",f=s.useMemo(()=>_w(e==null?void 0:e.imageDisplay),[e==null?void 0:e.imageDisplay]),w=f.display==="cover",N=I=>k.scalingValue(I,n??!1),V=s.useMemo(()=>Ow(v),[v]),B=s.useMemo(()=>Bw(l,c,w,b),[l,c,w,b]),H=s.useMemo(()=>Nw(o),[o]),_=s.useMemo(()=>({scaled:I=>k.scalingValue(I,n??!1),width:l,orbitRadius:B,depthFactor:v,spreadFactor:V,blurEnabled:P}),[n,l,B,v,V,P]),z=s.useRef([]),$=s.useRef(0),E=s.useMemo(()=>(t??[]).filter(I=>{var se;return!!((se=I.image)!=null&&se.assetId)}),[t]),j=d/u,L=c*Hw(f),C=Math.min(bw,p*u),T=Sw*u,G=C+T*2,Y=Math.max(0,p-1)*d+(u-1)*j,R=m>0,y=x==="scroll"&&R,U=x==="autoplay"&&R&&(n?!!i:!0),ee=U?360/(m*xw):0,de=E.length===0?0:G,F=s.useMemo(()=>Array.from({length:de},(I,se)=>Yw(se-T,u)),[de,T,u]);s.useEffect(()=>{if(!U&&!y)return;const I=r.current;if(!I)return;const se=re=>{$.current=re,F.forEach((fe,xe)=>{const Te=z.current[xe];if(!Te)return;const me=$d(_,ha(fe+re));Te.style.transform=me.transform,Te.style.zIndex=String(me.zIndex),Te.style.opacity=String(me.opacity),Te.style.filter=me.filter})};if(y){const re=I.ownerDocument.defaultView??window,fe=()=>{const Te=I.getBoundingClientRect(),me=re.innerHeight||I.ownerDocument.documentElement.clientHeight,be=me+Te.height;if(be<=0)return;const we=Math.min(1,Math.max(0,(me-Te.top)/be));se(Zw(we,m,h))};fe(),re.addEventListener("scroll",fe,{passive:!0,capture:!0}),re.addEventListener("resize",fe);const xe=new ResizeObserver(fe);return xe.observe(I),()=>{re.removeEventListener("scroll",fe,{capture:!0}),re.removeEventListener("resize",fe),xe.disconnect()}}const J=h==="left"?-1:1;let Se=null,Re=null;const pe=re=>{if(Re!==null){const fe=(re-Re)/1e3/ee*J;$.current=ha($.current+fe)}Re=re,se($.current),Se=requestAnimationFrame(pe)},he=()=>{Se===null&&(Re=null,Se=requestAnimationFrame(pe))},te=()=>{Se!==null&&cancelAnimationFrame(Se),Se=null},le=new IntersectionObserver(([re])=>{re!=null&&re.isIntersecting?he():te()});return le.observe(I),()=>{te(),le.disconnect()}},[U,y,F,_,ee,m,h]);const ie=U||y?$.current:0;return E.length===0?a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:H}}),a.jsx("div",{className:`${o}-wrapper`,style:{width:N(l)}})]}):a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:H}}),a.jsx("div",{ref:r,className:`${o}-wrapper`,style:{width:N(l),height:N(Y)},children:Array.from({length:G},(I,se)=>{const J=se-T,Re=E[Pp(J,E.length)].image,pe=Xl(J,u),he=F[se],te=Qw(J,u,d,j),le=b===0?0:(Cd(pe+7.3)-.5)*b*j,re=w?1:1+(Cd(pe+3.1)-.5)*2*Cp*(.35+b),fe=c*re,xe={"--helix-base-w":N(fe),...w?{"--helix-base-h":N(L)}:{}},Te={top:N(te+le),...xe,...$d(_,ha(he+ie))},me=S>0?{borderRadius:N(S)}:{},be=w?{...me,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"}:me,we=Ww(Re)?a.jsx("video",{className:`${o}-media`,style:be,src:Re.assetId,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:`${o}-media`,style:be,src:Re.assetId,alt:Re.name??"",loading:"lazy",decoding:"async"});return a.jsx("div",{ref:g=>{z.current[se]=g},className:w?`${o}-item ${o}-item-cover`:`${o}-item`,style:Te,children:w?a.jsx("div",{className:`${o}-cover`,style:me,children:we}):we},`${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:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]}}}}},default:t$.map(e=>({image:{assetId:e,name:""}}))},settings:{sizing:"auto auto",properties:{width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},turnHeight:{type:"number",scope:"layout",title:"Turn height",display:{type:"numeric-input"},min:0,max:9999},itemsPerTurn:{type:"number",scope:"common",title:"Per turn",display:{type:"common-numeric-input"},min:3,max:40},turns:{type:"number",scope:"common",title:"Turns",display:{type:"common-numeric-input"},min:1,max:30},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},playback:{type:"string",scope:"common",title:"Playback",display:{type:"toggle-cycle",enum:["autoplay","scroll"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},blur:{type:"string",scope:"common",title:"Blur",display:{type:"toggle-cycle",enum:["on","off"]}}},defaults:{itemsPerTurn:14,turns:3,direction:"right",playback:"autoplay",blur:"off",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1}},layoutDefaults:{d:{defaultPaddingTop:30/1440,width:800/1440,imageWidth:160/1440,turnHeight:380/1440,speed:2.2,cornerRadius:0},m:{defaultPaddingTop:10/375,width:320/375,imageWidth:75/375,turnHeight:310/375,speed:2.8,cornerRadius:0},t:{defaultPaddingTop:20/768,width:620/768,imageWidth:100/768,turnHeight:280/768,speed:2.8,cornerRadius:0}},layout:["__componentName__","width","imageWidth","turnHeight","itemsPerTurn","turns","playback","speed","direction","imageDisplay","cornerRadius","blur"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",items:["direction","speed"]},{type:"row",items:["width"]},{type:"row",items:["imageWidth","turnHeight"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",items:["itemsPerTurn","turns"]},{type:"row",items:["playback","blur"]}]}]},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.assetId",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,Ls=(bi-(3*xi+2*Ep))/2,Id=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:Ls,width:bi,height:xi,rx:xi/2}),a.jsx("rect",{className:`${t} ${t}-mid`,x:"0",y:Ls+Id,width:bi,height:xi,rx:xi/2}),a.jsx("rect",{className:`${t} ${t}-bot`,x:"0",y:Ls+2*Id,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 Ld(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 Pd(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 I$(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 L$(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 P$={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`
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:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]}}}}},default:t$.map(e=>({image:{assetId:e,name:""}}))},settings:{sizing:"auto auto",properties:{width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},turnHeight:{type:"number",scope:"layout",title:"Turn height",display:{type:"numeric-input"},min:0,max:9999},itemsPerTurn:{type:"number",scope:"common",title:"Per turn",display:{type:"common-numeric-input"},min:3,max:40},turns:{type:"number",scope:"common",title:"Turns",display:{type:"common-numeric-input"},min:1,max:30},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},playback:{type:"string",scope:"common",title:"Playback",display:{type:"toggle-cycle",enum:["autoplay","scroll"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},blur:{type:"string",scope:"common",title:"Blur",display:{type:"toggle-cycle",enum:["on","off"]}}},defaults:{itemsPerTurn:14,turns:3,direction:"right",playback:"autoplay",blur:"off",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1}},layoutDefaults:{d:{defaultPaddingTop:30/1440,width:800/1440,imageWidth:160/1440,turnHeight:380/1440,speed:2.2,cornerRadius:0},m:{defaultPaddingTop:10/375,width:320/375,imageWidth:75/375,turnHeight:310/375,speed:2.8,cornerRadius:0},t:{defaultPaddingTop:20/768,width:620/768,imageWidth:100/768,turnHeight:280/768,speed:2.8,cornerRadius:0}},layout:["__componentName__","width","imageWidth","turnHeight","itemsPerTurn","turns","playback","speed","direction","imageDisplay","cornerRadius","blur"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",items:["direction","speed"]},{type:"row",items:["width"]},{type:"row",items:["imageWidth","turnHeight"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",items:["itemsPerTurn","turns"]},{type:"row",items:["playback","blur"]}]}]},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.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Cn=300,tn=300,o$=8/1440,go=.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=k.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 m$(e,t){switch(Rp(e.showIn,t)){case"default and compact":return!1;default:return!0}}function g$(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):g$(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,Ls=(bi-(3*xi+2*Ep))/2,Id=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:Ls,width:bi,height:xi,rx:xi/2}),a.jsx("rect",{className:`${t} ${t}-mid`,x:"0",y:Ls+Id,width:bi,height:xi,rx:xi/2}),a.jsx("rect",{className:`${t} ${t}-bot`,x:"0",y:Ls+2*Id,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`]:k.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 Ld(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 Pd(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,v,b,m,h,x,S,P,f,w;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 N=((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;N!==void 0&&(n.openLinkColor=N)}if(e.compactIconColor===void 0){const N=((u=(d=e.stateOverrides)==null?void 0:d.compact)==null?void 0:u.iconColor)??e.iconColor;N!==void 0&&(n.compactIconColor=N)}if(e.compactLinkColor===void 0){const N=((v=(p=e.stateOverrides)==null?void 0:p.compact)==null?void 0:v.linkColor)??e.linkColor;N!==void 0&&(n.compactLinkColor=N)}if(e.compactLogoColor===void 0){const N=((m=(b=e.stateOverrides)==null?void 0:b.compact)==null?void 0:m.logoColor)??e.logoColor;N!==void 0&&(n.compactLogoColor=N)}if(e.openLogoColor===void 0){const N=((x=(h=e.stateOverrides)==null?void 0:h.open)==null?void 0:x.logoColor)??e.logoColor;N!==void 0&&(n.openLogoColor=N)}if(e.compactBackgroundColor===void 0){const N=((P=(S=e.stateOverrides)==null?void 0:S.compact)==null?void 0:P.backgroundColor)??((w=(f=t.stateOverrides)==null?void 0:f.compact)==null?void 0:w.panelColor)??t.compactPanelColor??t.onScrollPanelColor??e.backgroundColor??n.backgroundColor;N!==void 0&&(n.compactBackgroundColor=N)}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=(N,V)=>{if(e[N]!==void 0)return;const B=e[V];B!==void 0&&(n[N]=B)};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 I$(e,t){return{paddingLeft:k.scalingValue(e.effectivePaddingLeft,t),paddingRight:k.scalingValue(e.effectivePaddingRight,t),paddingTop:k.scalingValue(e.effectivePaddingTop,t),paddingBottom:k.scalingValue(e.effectivePaddingBottom,t)}}function L$(e,t,n,i){const o=Math.max(ji,n??ji),r=Math.max(t.effectivePaddingTop,go),l=Math.max(t.effectivePaddingBottom,go),c=Math.max(0,t.panelSize-t.effectivePaddingBottom-o),d=Math.max(0,t.panelSize-t.effectivePaddingTop-o),u=Math.max(t.effectivePaddingLeft,go),p=Math.max(t.effectivePaddingRight,go),v=Math.max(0,t.panelSize-t.effectivePaddingRight-ji),b=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(v),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(b),className:`${e}-control-anchor`,style:{top:0,right:0,width:i(p),height:"100%"}})]})}const P$={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=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),L=s.useMemo(()=>k$(g),[g]),[_,G]=s.useState(!1),[$,I]=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)&&_,P=!!(t&&!i),A=U&&!P;jl(A),s.useEffect(()=>{if(!U||!P)return;const Mt=document.documentElement,Xt=Mt.style.overflow;return Mt.style.overflow="hidden",()=>{Mt.style.overflow=Xt}},[U,P]);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 Le=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:Pe=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:Pt,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:Lt,link:St}=Le,{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?Pe:h,Ft=Tt?Se:mt,ut=c$(Tt?Z:Be),H=(Tt?He:De)??0,Ie=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},P$,R$,Lt),It=Ed(Tt?{fontFamily:tt,fontSettings:et,fontSize:Ge,lineHeight:ve,letterSpacing:_e,wordSpacing:ze,textAlign:Qe,textAppearance:$e}:{fontFamily:Pt,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},It),Dt=kd(g,It,t),an=kd(g,qt,t),cn=Ld(b,Rd(It)),qn=Ld(M,Rd(qt)),Yn={...an.css,whiteSpace:"pre-wrap",transform:Pd(qn)},Qi=an.className,hn=Mt=>F.scalingValue(Mt,t),Vo=Ie??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={...I$(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:Pd(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(),I(!0);return}return S.current+=1,E(!1),Ar(),W.current=window.setTimeout(()=>{W.current=null,I(!1)},Cn),Ar},[U]),s.useLayoutEffect(()=>{z.current!==d&&(z.current=d,S.current+=1,Ar(),G(!1),E(!1),I(!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,Lt]),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&&L$(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:L}}),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';
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??(b=>b()),u=e.currentTarget.getAttribute("href")??"",p=W$(u),v=e.currentTarget.target==="_blank";if(r&&c){e.preventDefault(),e.stopPropagation();const b=Qs(r,l),m=Mp(r),h={mode:m.type==="url"?"url":"page",href:b.href||u,page:m.type==="page"?m.value:void 0,url:m.type==="url"?m.value:void 0,anchor:m.type==="anchor"?m.value.replace(/^#/,""):(m.anchor??"").replace(/^#/,""),target:b.target};h.target==="_blank"?c(h):d(()=>c(h)),t();return}if(i){e.preventDefault(),d(()=>_d(p)),t();return}!v&&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:v,onOpenChange:b}){var tc;const{prefix:m}=k.useScopedStyles(),h=s.useRef(null),x=s.useRef(null),S=s.useRef(null),P=s.useRef(null),f=s.useRef(null),w=s.useRef(0),N=s.useRef(null),V=s.useRef(null),B=s.useRef(d),H=s.useMemo(()=>k$(m),[m]),[_,z]=s.useState(!1),[$,E]=s.useState(!1),[j,L]=s.useState(!1),C=s$(r),T=s.useMemo(()=>new Set(c),[c]),G=kt=>!!(kt&&T.has(kt)),Y=!!(t&&!i&&C==="open"&&!G("open"))||!(t&&!i)&&_,R=!!(t&&!i),y=Y&&!R;jl(y),s.useEffect(()=>{if(!Y||!R)return;const kt=document.documentElement,Yt=kt.style.overflow;return kt.style.overflow="hidden",()=>{kt.style.overflow=Yt}},[Y,R]);const U=!G("compact")&&!G("onScroll"),ee=!t||!!i&&!n,de=o&&o!=="default"?o:void 0,F=U&&C==="compact"?"compact":"default",[ie,I]=s.useState(F),[se,J]=s.useState(!1),Se=!n;F!==ie&&(I(F),Se&&J(!0));const Re=Fp(e),{logo:pe,logoMaxHeight:he=120/1440,logoPosition:te="left",panelHeight:le=60/1440,backgroundColor:re="#b3b3b3",logoColor:fe="#000000",position:xe,horizontalAlign:Te,verticalAlign:me,iconColor:be="#000000",showIcon:we="on",iconSize:g=16/1440,linkColor:X="#000000",openLinkColor:Z="#000000",compactIconColor:ne="#000000",compactLinkColor:ye="#000000",compactLogoColor:K="#000000",compactBackgroundColor:D="#ffffff",compactLogoMaxHeight:ce=120/1440,compactLogoPosition:q,compactPanelHeight:ue=60/1440,compactShowIcon:W="on",compactIconSize:Le=16/1440,compactNavTextWidth:ae,compactNavTextPosition:Q,compactNavTextOffset:Ne,compactNavGap:Oe,compactNavPaddingLeft:it=10/1440,compactNavPaddingRight:qe=10/1440,compactFontFamily:Je,compactFontSettings:ot,compactFontSize:Ve,compactLineHeight:ve,compactLetterSpacing:Fe=0,compactWordSpacing:Xe=0,compactTextAlign:Ye="left",compactTextAppearance:Pe,openLogoColor:_e="#000000",menuBackgroundColor:Ke="#ffffff",overlayColor:Ze="rgba(0, 0, 0, 0.45)",closeButtonColor:st="#000000",effect:Ue="fade",openPanelSize:De=100,textWidth:ke=280/1440,navTextWidth:ht,navTextPosition:Be="center",navTextOffset:ze=0,gap:We=0,navGap:mt,navPaddingLeft:rt=10/1440,navPaddingRight:St=10/1440,textPaddingLeft:Nt=10/1440,textPaddingRight:jt=10/1440,textPaddingTop:xt=10/1440,textPaddingBottom:Ce=10/1440,fontFamily:He,fontSettings:lt,fontSize:et,lineHeight:yt,letterSpacing:Rt=0,wordSpacing:At=0,textAlign:qt="left",textAppearance:$t,openFontFamily:zt,openFontSettings:on,openFontSize:vt,openLineHeight:ft,openLetterSpacing:Me,openWordSpacing:nt,openTextAlign:ct,openTextAppearance:gt,stateOverrides:Et,link:wt}=Re,{horizontalAlign:dt,verticalAlign:Ot}=w$({position:xe,horizontalAlign:Te,verticalAlign:me}),Lt=F==="compact",Ht=Lt?ce:he,Gt=l$(Lt?q:te),_t=Lt?ue:le,Vt=Lt?Le:g,Dt=Lt?ae:ht,Ct=c$(Lt?Q:Be),O=(Lt?Ne:ze)??0,Ie=Lt?Oe:mt,je=Lt?it:rt,Ae=Lt?qe:St,tt=Dt??ke,Mt=Y||(Lt?W:we)!=="off",ut=k.buildColorVars(m,{iconColor:be,closeButtonColor:st,linkColor:X,openLinkColor:Z,compactIconColor:ne,compactLinkColor:ye,compactLogoColor:K,compactBackgroundColor:D,openLogoColor:_e,menuBackgroundColor:Ke,overlayColor:Ze,backgroundColor:re,logoColor:fe},P$,R$,Et),Tt=Ed(Lt?{fontFamily:Je,fontSettings:ot,fontSize:Ve,lineHeight:ve,letterSpacing:Fe,wordSpacing:Xe,textAlign:Ye,textAppearance:Pe}:{fontFamily:He,fontSettings:lt,fontSize:et,lineHeight:yt,letterSpacing:Rt,wordSpacing:At,textAlign:qt,textAppearance:$t}),Ut=Ed({fontFamily:zt,fontSettings:on,fontSize:vt,lineHeight:ft,letterSpacing:Me,wordSpacing:nt,textAlign:ct,textAppearance:gt},Tt),Wt=kd(m,Tt,t),an=kd(m,Ut,t),cn=Ld(S,Rd(Tt)),qn=Ld(P,Rd(Ut)),Yn={...an.css,whiteSpace:"pre-wrap",transform:Pd(qn)},Qi=an.className,hn=kt=>k.scalingValue(kt,t),Vo=Ie??We,Go=Math.max(je,go),xn=Math.max(Ae,go),di=Math.max(0,1-Vt),Zi=Math.max(0,1-Vt),bn=n??!1,Kn=bn&&!Y,Ji=s.useMemo(()=>Ap({textPaddingLeft:Nt,textPaddingRight:jt,textPaddingTop:xt,textPaddingBottom:Ce,fontSize:Ut.fontSize}),[Nt,jt,xt,Ce,Ut.fontSize]),eo=kt=>{const Yt=a.jsx("span",{className:Qi,style:Yn,children:Ad(kt)});return Hd(m,Yt,ke,bn,hn)},Qe=Ue==="left"||Ue==="right"?{width:`${De}%`}:{height:`${De}%`},M={...I$(Ji,t),...Qe,alignItems:E$[dt],justifyContent:M$[Ot]},oe=s.useRef(e),ge=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(!v||!t){oe.current=e,ge.current=d;return}const kt=(Nr=e.logo)==null?void 0:Nr.icon;if(e.logo&&!Zs(kt)&&!Ee.current){oe.current=e,ge.current=d;return}const Yt=_r=>{v(A$(_r,Ee.current))};if(ge.current!==d){oe.current=e,ge.current=d;const _r=Nd(e);_r!==e&&Yt(_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||Yt(kn)},[e,v,t,d]);const Ge=k.scalingValue(Vt,t),pt={width:Ge,height:Ge,minWidth:Ge,minHeight:Ge,maxWidth:Ge,maxHeight:Ge},Ft={...Wt.css,textDecoration:"none",transform:Pd(cn)},Xt=Wt.className,rn=(pe==null?void 0:pe.mode)!=="Off",Zt=(pe==null?void 0:pe.icon)??"",ui=_$(Zt),En=H$(Zt,ui),Qn=!!En,kr=hn(Math.min(Ht,_t)),Xo=!!(rn&&Zt&&Gt==="right")?"left":"right",Ql=Array.isArray(wt)?wt:[],Ga=[F!=="default"?`${m}-state-${F}`:"",Y||C==="open"?`${m}-state-open`:"",de&&de!==F&&de!==C?`${m}-state-${de}`:""].filter(Boolean).join(" "),Xp=t&&!i?`${m}-editor`:"",Zl=ee?`${m}-interactive`:"",Up=Se&&(F!==ie||se)?`${m}-nav-state-anim`:"",qp=Y?`${m}-open`:"",Yp=s.useMemo(()=>j$(h.current),[$,Y,d]),Xa=()=>{z(!1)},Ua=!t||i,Kp=kt=>{if(y){V.current=kt;return}kt()};s.useEffect(()=>{if(Y)return;const kt=V.current;V.current=null,kt==null||kt()},[Y]);const Jl=(kt,Yt)=>{D$(kt,Xa,{isEditor:t,isPreviewMode:i,item:Yt,pages:u,onLinkNavigate:p,runAfterClose:Kp})},Qp=()=>{t&&!i||z(kt=>!kt)},Zp=kt=>{kt.pointerType==="touch"&&kt.currentTarget.blur()},Ar=()=>{N.current!==null&&(window.clearTimeout(N.current),N.current=null)};s.useEffect(()=>{if(!se)return;const kt=window.setTimeout(()=>{J(!1)},tn);return()=>window.clearTimeout(kt)},[se,F]),s.useEffect(()=>{if(Y){Ar(),E(!0);return}return w.current+=1,L(!1),Ar(),N.current=window.setTimeout(()=>{N.current=null,E(!1)},Cn),Ar},[Y]),s.useLayoutEffect(()=>{B.current!==d&&(B.current=d,w.current+=1,Ar(),z(!1),L(!1),E(!1))},[d]),s.useLayoutEffect(()=>{var ln;if(!$||!Y)return;const kt=w.current+1;w.current=kt,L(!1),(ln=x.current)==null||ln.offsetHeight;const Yt=requestAnimationFrame(()=>{w.current===kt&&L(!0)});return()=>{cancelAnimationFrame(Yt)}},[$,Y]),s.useLayoutEffect(()=>{if(!y||!$)return;const kt=f.current;if(!kt)return;const Yt=getComputedStyle(kt).backgroundColor;if(!Yt)return;const ln=document.documentElement,{body:fn}=document,Sn=ln.style.backgroundColor,kn=fn.style.backgroundColor;return ln.style.backgroundColor=Yt,fn.style.backgroundColor=Yt,()=>{ln.style.backgroundColor=Sn,fn.style.backgroundColor=kn}},[y,$,Ga,Ke,Et]),s.useEffect(()=>{b==null||b(Y)},[Y,b]),s.useEffect(()=>{if(!Y)return;const kt=Yt=>{Yt.key==="Escape"&&(t&&i||Xa())};return window.addEventListener("keydown",kt),()=>window.removeEventListener("keydown",kt)},[Y,t,i]),s.useEffect(()=>{t&&!i&&C!=="open"&&z(!1)},[t,i,C]),s.useEffect(()=>{i&&z(!1)},[i]);const ec=bn&&Y,Jp=kt=>Ql.filter(Yt=>m$(Yt,d)).map((Yt,ln)=>{const{label:fn,href:Sn,target:kn}=Qs(Yt,u),to=Sn?a.jsx("a",{href:Sn,target:kn,rel:kn==="_blank"?"noopener noreferrer":void 0,className:`${kt} ${m}-has-href`,onClick:Uo=>Jl(Uo,Yt),children:eo(fn)}):a.jsx("span",{className:kt,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?`${m}-gap-control`:void 0,style:{height:hn(We)}}),to]},ln)}),em=$?a.jsxs("div",{ref:x,"data-selection":"none",className:[`${m}-lightbox`,`${m}-full-lightbox ${m}-effect-${Ue}`,j?`${m}-lightbox-active`:"",`${m}-lightbox-editor`,n?`${m}-lightbox-edit-mode`:"",Zl,Ga].filter(Boolean).join(" "),style:{...ut,...Yp},"aria-hidden":!j,children:[a.jsx("div",{className:[`${m}-backdrop`,Ua?`${m}-backdrop-clickable`:""].filter(Boolean).join(" "),"aria-hidden":"true",onClick:Ua?Xa:void 0}),a.jsxs("nav",{className:[`${m}-panel`,Ua?`${m}-panel-blocking`:""].filter(Boolean).join(" "),style:M,"aria-label":"Menu","data-lightbox-scrollable":"",children:[bn&&L$(m,Ji,Ut.fontSize,hn),Jp(`${m}-link`)]}),y?a.jsx("div",{ref:f,className:`${m}-safari-tint`,"aria-hidden":"true"}):null]}):null,tm=()=>a.jsx("button",{type:"button",className:`${m}-toggle`,onClick:Qp,onPointerUp:Zp,"aria-expanded":Y,"aria-label":Y?"Close menu":"Open menu",children:a.jsx(f$,{className:`${m}-icon`,lineClassName:`${m}-icon-line`})}),Fr=kt=>{const Yt=kt==="left",ln=Yt?je:Ae,fn=Yt?Go:xn,Sn=Yt?di:Zi,kn=Lt?Yt?"compactNavPaddingLeft":"compactNavPaddingRight":Yt?"navPaddingLeft":"navPaddingRight";return a.jsx("div",{className:Yt?`${m}-nav-padding-left`:`${m}-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",...Yt?{}:{"data-controls-reverse":""},"data-controls-min":"0","data-controls-max-fraction":String(Sn),className:`${m}-control-anchor`,style:{top:0,[Yt?"left":"right"]:0,width:hn(fn),height:"100%"}}):null})},nm=(kt,Yt)=>{const{label:ln,href:fn,target:Sn}=Qs(kt,u),kn=a.jsx("span",{className:Xt,style:Ft,children:Ad(ln)}),to=Hd(m,kn,tt,Kn,hn),Uo=fn?a.jsx("a",{href:fn,target:Sn,rel:Sn==="_blank"?"noopener noreferrer":void 0,className:`${m}-nav-link ${m}-has-href`,onClick:Nr=>Jl(Nr,kt),children:to}):a.jsx("span",{className:`${m}-nav-link`,children:to});return a.jsxs(s.Fragment,{children:[Yt>0&&a.jsx("div",{"data-controls":Kn?Lt?"compactNavGap":"navGap":void 0,"data-controls-axis":"x",className:Kn?`${m}-gap-control ${m}-nav-gap-control`:`${m}-nav-gap-control}`,style:{width:hn(Vo),flexShrink:0}}),Uo]},Yt)},im={...ut,height:k.scalingValue(_t,t),minHeight:k.scalingValue(_t,t),[`--${m}-panel-height`]:k.scalingValue(_t,t)},om=l&&F==="default"&&C!=="open"&&!i?hn(le+o$):"0px";return a.jsxs("div",{ref:h,className:`${m}-root ${Ga} ${Xp} ${Zl} ${Up}`.trim(),style:{width:"100%",height:"100%",lineHeight:0,fontSize:0,marginTop:om,...ut},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:H}}),a.jsx("span",{ref:S,"aria-hidden":!0,style:Md(Wt.css),children:"H"}),a.jsx("span",{ref:P,"aria-hidden":!0,style:Md(an.css),children:"H"}),a.jsx("div",{className:`${m}-nav-slide`,children:a.jsxs("div",{className:`${m}-nav-bar`,style:im,children:[rn&&Zt?a.jsxs("div",{className:`${m}-nav-logo ${m}-nav-logo-${Gt}`,children:[Gt==="left"?Fr("left"):null,a.jsxs("div",{className:`${m}-nav-logo-inner${Qn?` ${m}-nav-logo-tinted`:""}`,style:{height:kr,...Qn&&En?{[`--${m}-logo-image`]:F$(En)}:{}},children:[a.jsx("img",{src:Qn&&En?En:Zt,alt:"",className:`${m}-nav-logo-img`}),Qn?a.jsx("span",{className:`${m}-nav-logo-tint`,"aria-hidden":"true"}):null]}),Gt==="right"?Fr("right"):null]}):null,a.jsx("nav",{className:`${m}-nav-links ${m}-nav-links-${Ct}`,style:{transform:d$(Ct,O,t)},"aria-label":"Navigation",children:a.jsx("div",{className:`${m}-nav-links-inner`,children:Ql.filter(kt=>p$(kt,F,d)).map((kt,Yt)=>nm(kt,Yt))})})]})}),em,a.jsxs("div",{className:`${m}-nav-toggle-wrap ${m}-nav-toggle-wrap-${Xo}`,children:[Xo==="left"?Fr("left"):null,Mt?a.jsx("div",{className:`${m}-root ${qp}`.trim(),style:pt,children:tm()}):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"},Ps={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:Ps,textAlign:"left",openFontFamily:"Goudy Bookletter 1911",openFontSettings:Ps,openTextAlign:"left",compactFontFamily:"Goudy Bookletter 1911",compactFontSettings:Ps,compactTextAlign:"left",stateOverrides:{hover:{linkColor:"#666666",iconColor:"#666666",logoColor:"#666666"},"open-hover":{closeButtonColor:"#666666"}}},displayRules:[{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoMaxHeight.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoPosition.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoMaxHeight.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoPosition.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoColor.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoColor.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.openLogoColor.display.visible",value:!1}},{if:{name:"effect",value:"left"},then:{name:"properties.openPanelSize.title",value:"Width"}},{if:{name:"effect",value:"right"},then:{name:"properties.openPanelSize.title",value:"Width"}},{if:{name:"showIcon",value:"off"},then:{name:"properties.iconSize.display.visible",value:!1}},{if:{name:"showIcon",value:"off"},then:{name:"properties.iconColor.display.visible",value:!1}},{if:{name:"compactShowIcon",value:"off"},then:{name:"properties.compactIconSize.display.visible",value:!1}},{if:{name:"compactShowIcon",value:"off"},then:{name:"properties.compactIconColor.display.visible",value:!1}}],layoutDefaults:{m:{position:"center",panelHeight:50/375,logoMaxHeight:30/375,logoPosition:"center",compactLogoPosition:"left",navTextPosition:"center",navTextOffset:0,compactNavTextPosition:"center",compactNavTextOffset:0,showIcon:"on",iconSize:30/375,textWidth:240/375,openPanelSize:100,navTextWidth:120/375,gap:24/375,navGap:24/375,navPaddingLeft:20/375,navPaddingRight:20/375,textPaddingLeft:10/375,textPaddingRight:10/375,textPaddingTop:10/375,textPaddingBottom:10/375,fontSize:16/375,lineHeight:20/375,letterSpacing:0,wordSpacing:0,textAppearance: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 Ia(e){return e<0?0:e>1?1:e}function Dd(e,t){return e.filter(n=>n.length>0).map(n=>`M ${n.map(i=>`${i.x*t.width} ${i.y*t.height}`).join(" L ")} Z`).join(" ")}function 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=Ia(n[o]),l=Ia(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=Ia(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",La=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,L=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 I=Math.atan2((-x-z)/d,(-m-q)/c)-G;!r&&I>0&&(I-=Math.PI*2),r&&I<0&&(I+=Math.PI*2);const D=Math.max(1,Math.ceil(Math.abs(I)/(Math.PI/2))),E=I/D,T=4/3*Math.tan(E/4),C=(U,P)=>({x:L+p*c*U-y*d*P,y:_+y*c*U+p*d*P}),V=[];let w=G;for(let U=0;U<D;U+=1){const P=w+E,A=Math.cos(w),j=Math.sin(w),ie=Math.cos(P),ae=Math.sin(P);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=P}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:La,height:La},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 IC(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 LC(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 PC(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 L of z){const _=FC(L.angle-v);if(!(Math.abs(_)>hC)&&!(Math.abs(Math.sin(_))*y>mC)){m=L.angle,x=L.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,Pa=(e,t)=>{switch(t){case"nw":return{x:e.minX,y:e.minY};case"ne":return{x:e.maxX,y:e.minY};case"se":return{x:e.maxX,y:e.maxY};case"sw":return{x:e.minX,y:e.maxY}}},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=Pa(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:Ia(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},P=Pa(U,jp(T)),A=Pa(U,T),j=Math.hypot(A.x-P.x,A.y-P.y);!isFinite(j)||j<=0||(b.current={pointerId:E.pointerId,anchor:P,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),P=Math.min(sl,Math.max(al,T.startScale*(U/T.startDistance)));if(!T.moved&&Math.abs(P-T.startScale)<1e-4)return;T.moved=!0;const A=P/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,P);y({focalX:yo(n.width,ae.width,j),focalY:yo(n.height,ae.height,ie),scale:P});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})}},L=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},I=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=I?{minX:I.x,minY:I.y,maxX:I.x+I.width,maxY:I.y+I.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:L,onPointerCancel:L,onLostPointerCapture:L,"data-pretext-image-editor":!0,children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>c("none")}),f&&o&&I&&r&&a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsxs("mask",{id:m,maskUnits:"userSpaceOnUse",x:I.x,y:I.y,width:I.width,height:I.height,children:[a.jsx("rect",{x:I.x,y:I.y,width:I.width,height:I.height,fill:"#FFFFFF"}),a.jsx("path",{d:r,fillRule:"evenodd",fill:"#000000"})]})}),a.jsx("image",{className:`${e}-editor-ghost`,href:o??void 0,x:I.x,y:I.y,width:I.width,height:I.height,preserveAspectRatio:"none",mask:`url(#${m})`}),a.jsx("rect",{className:`${e}-editor-image-bounds`,x:I.x,y:I.y,width:I.width,height:I.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),[L,_]=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 I=S.length>0;s.useEffect(()=>{u==null||u(I)},[I,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,P=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,P);for(const X of ue)for(const Pe of X.nodes)if(Math.hypot(Pe.p.x-ne.x,Pe.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,P,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=P({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",P,oa),Ge=Qd(Kd(qe,tt.map(_e=>_e.y),"y"),ot,"y",P,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,P)),p(IC(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?P(ee.p):null,Pe=ge?P(ge):null,Se=ee&&(!Y||h.shiftKey)?WC(R,ee.p,te||Y?null:HC(m.current[B.contour],B.node,B.kind,P),X&&Pe?Math.hypot(Pe.x-X.x,Pe.y-X.y):null,h.shiftKey,P,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(PC(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()},Le=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=Pa(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(Pe=>Pe.contour===Q&&Pe.node===ne)?X.filter(Pe=>!(Pe.contour===Q&&Pe.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,P),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=LC(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,P)),[i,P]),fe=s.useMemo(()=>Ci(i),[i]),we=P({x:fe.minX,y:fe.minY}),Re={width:P({x:fe.maxX,y:fe.minY}).x-we.x,height:P({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:Le,onClick:K}),Ce&&a.jsx("path",{className:`${e}-editor-hit`,d:pe,style:{strokeWidth:zC},onClick:K}),Ce&&L&&a.jsx("rect",{className:`${e}-editor-add-preview`,x:L.point.x-On/2,y:L.point.y-On/2,width:On,height:On,rx:L.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=P(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=P(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=P(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 L=0,_=0,G=0,$=S[0].token.para,I=0,D=0,E=null;for(;L<S.length&&G<qC;){const C=_+x>d;if(C&&!u)break;const V=S[L].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(P=>({x0:P.x0*c,x1:P.x1*c}));p>0&&y>0&&!C&&w.length&&(E===null&&(E=G,I=w[0].x0,D=_),G-E<y&&(w=cC(w,{x0:I,x1:I+p})));const U=w.reduce((P,A)=>Math.max(P,A.x1-A.x0),0);for(const P of w){const A=P.x1-P.x0;if(A<W)continue;if(L>=S.length||S[L].token.para!==V)break;const j=L;let ie=0;for(;L<S.length&&S[L].token.para===V;){const ae=S[L],O=L===j,re=ae.width*l,N=O?re:b+re;if(ie+N<=A){ie+=N,L+=1;continue}if(O&&A>=U-.5&&re>c-.5){ie+=N,L+=1;continue}if(v){const J=A-ie-(O?0:b),be=eT(ae,g,J,l,m);if(be){const Le={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(L,1,Le,ye),ie+=(O?0:b)+be.fragmentWidth*l,L+=1}}break}if(L>j){const ae=L>=S.length||S[L].token.para!==V;f.push({top:_,left:P.x0,width:A,from:j,to:L,justify:r==="justify"&&!ae})}if(L>=S.length||S[L].token.para!==V)break}$=V,_+=x,G+=1}let T=0;if(L>0){const C=S[L-1];T=C.kind==="fragment"?C.originalIndex:C.originalIndex+1}return{segments:f,placed:T,height:f.length?_:0,capLeft:I,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:L,pathDragActive:_,pathCarryImage:G,onCarryImageConsumed:$,pathEditor:I,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}),[P,A]=s.useState(0),[j,ie]=s.useState(null),[ae,O]=s.useState(0),[re,N]=s.useState("none");s.useEffect(()=>{!I&&!D&&N("none")},[I,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]),Le=s.useMemo(()=>QC(be),[be]),ye=s.useMemo(()=>ZC(be),[be]),ce=x>0&&b>1?((ct=(Ue=Le[0])==null?void 0:Ue.text)==null?void 0:ct.charAt(0))??"":"",K=(I==null?void 0:I.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=I==null?void 0:I.onConvert,fe=(I==null?void 0:I.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=L.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,L,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*La,y:he.y*La}))))}},[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(!Le.length){ie(null);return}const Me=[],nt=document.createDocumentFragment();for(const ut of Le){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",Pt=document.createElement("span");Pt.textContent=vt,Pt.style.lineHeight="1",nt.appendChild(Pt),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 Lt=wt*(dt/yt);if(Je){Je.font=rt(Lt);const ut=Je.measureText(vt).actualBoundingBoxAscent;ut>0&&(Lt=Lt*(dt/ut))}Pt.style.fontSize=`${Lt}px`,Pt.style.lineHeight=`${Lt}px`;const St=document.createElement("span");St.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",Pt.appendChild(St);const ht=Math.max(1,St.getBoundingClientRect().top-Pt.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?Pt.getBoundingClientRect().width:0,Ft=g?Me.map(ut=>{const H=ut.firstChild;if(!(H instanceof Text)||H.data.length<4)return;const Ie=document.createRange(),je=ut.getBoundingClientRect().left,Fe=[];for(let ft=1;ft<=H.data.length;ft+=1)Ie.setStart(H,0),Ie.setEnd(H,ft),Fe.push(Ie.getBoundingClientRect().right-je);return Fe}):[];he.replaceChildren(),ie({widths:Ot,spaceWidth:Gt,dashWidth:kt,charWidths:Ft,lineHeight:Yt,capWidth:_t,dropCapFontSize:Lt,dropCapTopAdjust:Tt})},[Le,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||!Le.length||w.width<=0||w.height<=0||!u)return 1;const he=pt=>iu({tokens:Le,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:P});if(he(1).placed>=Le.length)return 1;if(he(Fs).placed<Le.length)return Fs;let Me=Fs,nt=1;for(let pt=0;pt<iT;pt+=1){const Ve=(Me+nt)/2;he(Ve).placed>=Le.length?Me=Ve:nt=Ve}return Me},[j,Le,w.width,w.height,xe,l,c,u,ue,ce,B,g,P]);s.useEffect(()=>{y(R)},[R,y]);const ee=u?Math.min(p,R):1,te=s.useMemo(()=>!j||!Le.length||w.width<=0||w.height<=0?{segments:[],placed:0,height:0,capLeft:0,capTop:0,renderTokens:Le}:iu({tokens:Le,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:P}),[j,Le,w.width,w.height,xe,l,c,ee,d,ue,ce,B,g,P]),ge=m&&Le.length>0&&te.placed<Le.length,X=j?j.dropCapFontSize*ee:0,Pe=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=!!(I&&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||L===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&&L!==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:L,shape:n}},[_,G,L,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(L,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,L,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+Pe}px`,left:`${te.capLeft}px`,fontSize:`${X}px`,lineHeight:`${X}px`},children:ce}),Ge&&et&&(K&&I||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&&I&&a.jsx(UC,{P:e,box:{width:et.width,height:et.height},viewBox:r,contours:K,snap:I.snap,stretchToBox:!we,uniformStretch:n==="circle",stage:re,onStageChange:N,onSelectionChange:_e,onChange:I.onChange,onCommit:I.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=>`
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"},Ps={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:Ps,textAlign:"left",openFontFamily:"Goudy Bookletter 1911",openFontSettings:Ps,openTextAlign:"left",compactFontFamily:"Goudy Bookletter 1911",compactFontSettings:Ps,compactTextAlign:"left",stateOverrides:{hover:{linkColor:"#666666",iconColor:"#666666",logoColor:"#666666"},"open-hover":{closeButtonColor:"#666666"}}},displayRules:[{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoMaxHeight.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoPosition.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoMaxHeight.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoPosition.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoColor.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoColor.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.openLogoColor.display.visible",value:!1}},{if:{name:"effect",value:"left"},then:{name:"properties.openPanelSize.title",value:"Width"}},{if:{name:"effect",value:"right"},then:{name:"properties.openPanelSize.title",value:"Width"}},{if:{name:"showIcon",value:"off"},then:{name:"properties.iconSize.display.visible",value:!1}},{if:{name:"showIcon",value:"off"},then:{name:"properties.iconColor.display.visible",value:!1}},{if:{name:"compactShowIcon",value:"off"},then:{name:"properties.compactIconSize.display.visible",value:!1}},{if:{name:"compactShowIcon",value:"off"},then:{name:"properties.compactIconColor.display.visible",value:!1}}],layoutDefaults:{m:{position:"center",panelHeight:50/375,logoMaxHeight:30/375,logoPosition:"center",compactLogoPosition:"left",navTextPosition:"center",navTextOffset:0,compactNavTextPosition:"center",compactNavTextOffset:0,showIcon:"on",iconSize:30/375,textWidth:240/375,openPanelSize:100,navTextWidth:120/375,gap:24/375,navGap:24/375,navPaddingLeft:20/375,navPaddingRight:20/375,textPaddingLeft:10/375,textPaddingRight:10/375,textPaddingTop:10/375,textPaddingBottom:10/375,fontSize:16/375,lineHeight:20/375,letterSpacing:0,wordSpacing:0,textAppearance: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 Ia(e){return e<0?0:e>1?1:e}function Dd(e,t){return e.filter(n=>n.length>0).map(n=>`M ${n.map(i=>`${i.x*t.width} ${i.y*t.height}`).join(" L ")} Z`).join(" ")}function 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,v=u.y*t.height;p<n&&(n=p),p>o&&(o=p),v<i&&(i=v),v>r&&(r=v)}const l=o-n,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=Ia(n[o]),l=Ia(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=Ia(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(v=>v.trim()).filter(Boolean),u=document.createElementNS("http://www.w3.org/2000/svg","svg"),p=[];for(const v of d){const b=document.createElementNS("http://www.w3.org/2000/svg","path");b.setAttribute("d",v),u.appendChild(b);let m=0;try{m=b.getTotalLength()}catch{m=0}if(!m)continue;const h=[];for(let x=0;x<Wd;x+=1){const S=b.getPointAtLength(x/Wd*m);h.push({x:S.x,y:S.y})}p.push(h)}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",La=100,el=16,uC=12,pC=16,Ms=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,mC=/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g,zd=Math.PI/4,gC=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(mC);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),v=Math.sin(u),b=(e.x-l.x)/2,m=(e.y-l.y)/2,h=p*b+v*m,x=-v*b+p*m,S=h*h/(c*c)+x*x/(d*d);if(S>1){const Y=Math.sqrt(S);c*=Y,d*=Y}const P=o===r?-1:1,f=c*c*x*x+d*d*h*h,w=Math.max(0,c*c*d*d-f),N=f===0?0:P*Math.sqrt(w/f),V=N*c*x/d,B=-N*d*h/c,H=p*V-v*B+(e.x+l.x)/2,_=v*V+p*B+(e.y+l.y)/2,z=Math.atan2((x-B)/d,(h-V)/c);let E=Math.atan2((-x-B)/d,(-h-V)/c)-z;!r&&E>0&&(E-=Math.PI*2),r&&E<0&&(E+=Math.PI*2);const j=Math.max(1,Math.ceil(Math.abs(E)/(Math.PI/2))),L=E/j,C=4/3*Math.tan(L/4),T=(Y,R)=>({x:H+p*c*Y-v*d*R,y:_+v*c*Y+p*d*R}),G=[];let A=z;for(let Y=0;Y<j;Y+=1){const R=A+L,y=Math.cos(A),U=Math.sin(A),ee=Math.cos(R),de=Math.sin(R);G.push({c1:T(y-C*U,U+C*y),c2:T(ee+C*de,de-C*ee),p:Y===j-1?pn(l):T(ee,de)}),A=R}return G}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 m=i[0],h=i[i.length-1];Math.abs(m.p.x-h.p.x)<1e-6&&Math.abs(m.p.y-h.p.y)<1e-6&&(m.in=h.in??m.in,i.pop())}i.length>1&&n.push({nodes:i,closed:o}),i=[],o=!1},p=(m,h)=>{i.push({p:m,in:Gn(h??null,m),out:null}),r=m},v=m=>{if(!i.length)return;const h=i[i.length-1];h.out=Gn(m,h.p)};Ms.lastIndex=0;let b=Ms.exec(t);for(;b!==null;){const m=b[1],h=m.toUpperCase(),x=m!==h,S=bC(b[2]),P=f=>x?{x:r.x+S[f],y:r.y+S[f+1]}:{x:S[f],y:S[f+1]};if(h==="Z")o=!0,u(),r=pn(l),c=null,d=null;else if(h==="M"){for(let f=0;f+1<S.length;f+=2){const w=P(f);f===0&&(u(),l=pn(w)),p(w)}c=null,d=null}else if(h==="L"){for(let f=0;f+1<S.length;f+=2)p(P(f));c=null,d=null}else if(h==="H"){for(const f of S)p({x:x?r.x+f:f,y:r.y});c=null,d=null}else if(h==="V"){for(const f of S)p({x:r.x,y:x?r.y+f:f});c=null,d=null}else if(h==="C"){for(let f=0;f+5<S.length;f+=6){const w=P(f),N=P(f+2),V=P(f+4);v(w),p(V,N),c=N}d=null}else if(h==="S"){for(let f=0;f+3<S.length;f+=4){const w=c?nl(c,r):pn(r),N=P(f),V=P(f+2);v(w),p(V,N),c=N}d=null}else if(h==="Q")for(let f=0;f+3<S.length;f+=4){const w=P(f),N=P(f+2);v(Tn(r,w,2/3)),p(N,Tn(N,w,2/3)),d=w,c=null}else if(h==="T")for(let f=0;f+1<S.length;f+=2){const w=d?nl(d,r):pn(r),N=P(f);v(Tn(r,w,2/3)),p(N,Tn(N,w,2/3)),d=w,c=null}else if(h==="A")for(let f=0;f+6<S.length;f+=7){const w=x?{x:r.x+S[f+5],y:r.y+S[f+6]}:{x:S[f+5],y:S[f+6]};for(const N of wC(r,S[f],S[f+1],S[f+2],S[f+3]!==0,S[f+4]!==0,w))v(N.c1),p(N.p,N.c2);c=null,d=null}b=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,v=o+(u.y-t.y)*l;return{x:t.x+p/c,y:t.y+v/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:La,height:La},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 IC(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 LC(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 PC(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,v=l.in??l.p,b=Tn(r.p,p,i),m=Tn(p,v,i),h=Tn(v,l.p,i),x=Tn(b,m,i),S=Tn(m,h,i),P=Tn(x,S,i),f=(n+1)%o.nodes.length;return d[n].out=b,d[f].in=h,d.splice(u,0,{p:P,in:x,out:S}),{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,v=!!Gn(l[u].out,l[u].p),b=!!Gn(l[p].in,l[p].p);if(_p(c)||v||b)return c.in=null,c.out=null,l[u].out=null,l[p].in=null,r;const m=Wp(l[u].p,c.p,l[p].p);return c.in=m.in,c.out=m.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,v=Math.hypot(u,p);if(v<1e-6)return{point:e,guides:fo};const b=Math.atan2(p,u),m=Math.round(b/zd)*zd;let h=o?m:null,x=!1;if(!o){const B=[];n&&B.push({angle:Math.atan2(n.y,n.x),smooth:!0}),B.push({angle:m,smooth:!1});for(const H of B){const _=FC(H.angle-b);if(!(Math.abs(_)>hC)&&!(Math.abs(Math.sin(_))*v>gC)){h=H.angle,x=H.smooth;break}}}const S=i!==null&&i>0&&Math.abs(v-i)<=fC;if(h===null&&!S)return{point:e,guides:fo};const P=h??b,f=S?i:v,w={x:Math.cos(P),y:Math.sin(P)},N=f+(h===null?0:ho),V=S?f:x?ho:0;return{point:l({x:c.x+w.x*f,y:c.y+w.y*f}),guides:[{kind:"angle",a:{x:c.x-w.x*V,y:c.y-w.y*V},b:{x:c.x+w.x*N,y:c.y+w.y*N}}]}}const al=.1,sl=8,OC=4,Jd=10,Pa=(e,t)=>{switch(t){case"nw":return{x:e.minX,y:e.minY};case"ne":return{x:e.maxX,y:e.minY};case"se":return{x:e.maxX,y:e.maxY};case"sw":return{x:e.minX,y:e.maxY}}},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=Pa(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:Ia(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),v=Math.min(sl,Math.max(al,p>0?r*(u/p):r)),b=Vi(t,n,v);return{focalX:yo(t.width,b.width,c-t.x,{clamp:!1}),focalY:yo(t.height,b.height,d-t.y,{clamp:!1}),scale:v}},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:v,onCommit:b}){const m=s.useRef(null),h=`pretext-image-ghost-${s.useId().replace(/:/g,"")}`,x=s.useRef(null),S=s.useRef(null),P=s.useRef({focalX:d,focalY:u,scale:p});P.current={focalX:d,focalY:u,scale:p};const f=l==="image";s.useEffect(()=>{var L;f&&((L=m.current)==null||L.focus({preventScroll:!0}))},[f]);const w=s.useCallback((L,C)=>{var G;const T=(G=m.current)==null?void 0:G.getBoundingClientRect();return!T||T.width<=0||T.height<=0?{x:0,y:0}:{x:(L-T.left)/T.width*t.width,y:(C-T.top)/T.height*t.height}},[t.width,t.height]),N=L=>{var T,G;if(!i)return;L.stopPropagation(),L.preventDefault(),(T=m.current)==null||T.focus({preventScroll:!0});const C=Vi(n,i,p);x.current={pointerId:L.pointerId,origin:w(L.clientX,L.clientY),startX:Bn(n.width,C.width,d),startY:Bn(n.height,C.height,u),width:C.width,height:C.height,moved:!1},(G=m.current)==null||G.setPointerCapture(L.pointerId)},V=(L,C)=>{var ee,de;if(!i)return;L.stopPropagation(),L.preventDefault(),(ee=m.current)==null||ee.focus({preventScroll:!0});const T=Vi(n,i,p),G=Bn(n.width,T.width,d),A=Bn(n.height,T.height,u),Y={minX:G,minY:A,maxX:G+T.width,maxY:A+T.height},R=Pa(Y,jp(C)),y=Pa(Y,C),U=Math.hypot(y.x-R.x,y.y-R.y);!isFinite(U)||U<=0||(S.current={pointerId:L.pointerId,anchor:R,startDistance:U,startScale:p,startX:G,startY:A,moved:!1},(de=m.current)==null||de.setPointerCapture(L.pointerId))},B=L=>{if(!i)return;const C=S.current;if(C&&L.pointerId===C.pointerId){L.stopPropagation(),L.preventDefault();const G=w(L.clientX,L.clientY),A={x:G.x-n.x,y:G.y-n.y},Y=Math.hypot(A.x-C.anchor.x,A.y-C.anchor.y),R=Math.min(sl,Math.max(al,C.startScale*(Y/C.startDistance)));if(!C.moved&&Math.abs(R-C.startScale)<1e-4)return;C.moved=!0;const y=R/C.startScale,U=C.anchor.x+(C.startX-C.anchor.x)*y,ee=C.anchor.y+(C.startY-C.anchor.y)*y,de=Vi(n,i,R);v({focalX:yo(n.width,de.width,U),focalY:yo(n.height,de.height,ee),scale:R});return}const T=x.current;if(T&&L.pointerId===T.pointerId){L.stopPropagation(),L.preventDefault();const G=w(L.clientX,L.clientY),A=G.x-T.origin.x,Y=G.y-T.origin.y;if(!T.moved&&A===0&&Y===0)return;T.moved=!0,v({focalX:yo(n.width,T.width,T.startX+A),focalY:yo(n.height,T.height,T.startY+Y),scale:p})}},H=L=>{var G,A;const C=x.current;if(C&&L.pointerId===C.pointerId){x.current=null,L.stopPropagation(),(G=m.current)!=null&&G.hasPointerCapture(C.pointerId)&&m.current.releasePointerCapture(C.pointerId),C.moved&&b(P.current);return}const T=S.current;T&&L.pointerId===T.pointerId&&(S.current=null,L.stopPropagation(),(A=m.current)!=null&&A.hasPointerCapture(T.pointerId)&&m.current.releasePointerCapture(T.pointerId),T.moved&&b(P.current))},_=L=>{if(L.key==="Escape"){L.stopPropagation(),c("none");return}if(L.key==="="||L.key==="+"||L.key==="-"||L.key==="_"){L.preventDefault(),L.stopPropagation();const C=L.key==="="||L.key==="+",T=Math.min(sl,Math.max(al,p*(C?eu:1/eu))),G={focalX:d,focalY:u,scale:T};v(G),b(G)}},z=["nw","ne","se","sw"],$={minX:n.x,minY:n.y,maxX:n.x+n.width,maxY:n.y+n.height},E=s.useMemo(()=>{const L=i??{width:n.width,height:n.height},C=Vi(n,L,p);return!(C.width>0)||!(C.height>0)?null:{x:n.x+Bn(n.width,C.width,d),y:n.y+Bn(n.height,C.height,u),width:C.width,height:C.height}},[i,n.x,n.y,n.width,n.height,d,u,p]),j=E?{minX:E.x,minY:E.y,maxX:E.x+E.width,maxY:E.y+E.height}:$;return a.jsxs("svg",{ref:m,className:`${e}-editor${f?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:_,onPointerMove:B,onPointerUp:H,onPointerCancel:H,onLostPointerCapture:H,"data-pretext-image-editor":!0,children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>c("none")}),f&&o&&E&&r&&a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsxs("mask",{id:h,maskUnits:"userSpaceOnUse",x:E.x,y:E.y,width:E.width,height:E.height,children:[a.jsx("rect",{x:E.x,y:E.y,width:E.width,height:E.height,fill:"#FFFFFF"}),a.jsx("path",{d:r,fillRule:"evenodd",fill:"#000000"})]})}),a.jsx("image",{className:`${e}-editor-ghost`,href:o??void 0,x:E.x,y:E.y,width:E.width,height:E.height,preserveAspectRatio:"none",mask:`url(#${h})`}),a.jsx("rect",{className:`${e}-editor-image-bounds`,x:E.x,y:E.y,width:E.width,height:E.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:N}),z.map(L=>{const C=ll(j,L),T=L==="ne"||L==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:C.x-ia/2,y:C.y-ia/2,width:ia,height:ia}),a.jsx("rect",{className:`${e}-editor-scale-grab${T?` ${e}-editor-scale-grab-nesw`:""}`,x:C.x-na/2,y:C.y-na/2,width:na,height:na,onPointerDown:G=>V(G,L)})]},L)})]})]})}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:v}){const b=s.useRef(null),m=s.useRef(null),h=s.useRef(i);h.current=i;const x=s.useRef(null),S=s.useRef(null),P=s.useRef(null),f=s.useRef(null),[w,N]=s.useState([]),[V,B]=s.useState(fo),[H,_]=s.useState(null),z=s.useCallback(g=>{B(X=>AC(X,g)?X:g)},[]),$=c==="shape";s.useEffect(()=>{var g;$&&((g=b.current)==null||g.focus({preventScroll:!0}))},[$]),s.useEffect(()=>{$||N(g=>g.length?[]:g)},[$]);const E=w.length>0;s.useEffect(()=>{u==null||u(E)},[E,u]),s.useEffect(()=>()=>u==null?void 0:u(!1),[u]);const j=n.width>0?t.width/n.width:1,L=n.height>0?t.height/n.height:1,C=Math.min(j,L),T=r&&l?C:j,G=r&&l?C:L,A=r&&l?(t.width-n.width*C)/2:0,Y=r&&l?(t.height-n.height*C)/2:0,R=s.useCallback(g=>r?{x:A+(g.x-n.x)*T,y:Y+(g.y-n.y)*G}:{x:g.x-n.x,y:g.y-n.y},[r,n,T,G,A,Y]),y=s.useCallback(g=>r?{x:n.x+(T>0?(g.x-A)/T:0),y:n.y+(G>0?(g.y-Y)/G:0)}:{x:n.x+g.x,y:n.y+g.y},[r,n,T,G,A,Y]),U=s.useMemo(()=>y({x:t.width/2,y:t.height/2}),[y,t.width,t.height]),ee=s.useCallback((g,X)=>{var ne;const Z=(ne=b.current)==null?void 0:ne.getBoundingClientRect();if(!Z||Z.width<=0||Z.height<=0)return{x:0,y:0};if(r){const ye=(g-Z.left)/Z.width*t.width,K=(X-Z.top)/Z.height*t.height;return{x:n.x+(T>0?(ye-A)/T:0),y:n.y+(G>0?(K-Y)/G:0)}}return{x:n.x+(g-Z.left),y:n.y+(X-Z.top)}},[r,n,t.width,t.height,T,G,A,Y]),de=s.useCallback((g,X)=>{var ne;const Z=(ne=b.current)==null?void 0:ne.getBoundingClientRect();return!Z||Z.width<=0||Z.height<=0?{x:0,y:0}:{x:(g-Z.left)/Z.width*t.width,y:(X-Z.top)/Z.height*t.height}},[t.width,t.height]),F=s.useCallback((g,X)=>{const Z=l&&!(X!=null&&X.preserveShape)?CC(g,n,t,A,Y,T,G):g;v(Z,X)},[v,l,n,t,A,Y,T,G]),ie=s.useCallback(()=>{_(null)},[]),I=s.useCallback((g,X,Z)=>{if(!Z||x.current||S.current||P.current||f.current){ie();return}const ne=de(g,X),ye=dn(h.current,R);for(const W of ye)for(const Le of W.nodes)if(Math.hypot(Le.p.x-ne.x,Le.p.y-ne.y)<=so){ie();return}const K=Yd(ye,ne);if(!K||K.distance>dl){ie();return}const D=ye[K.contour],ce=D==null?void 0:D.nodes[K.segment],q=D==null?void 0:D.nodes[(K.segment+1)%((D==null?void 0:D.nodes.length)??1)],ue=!!(ce&&q&&!jo(ce,q));_(W=>W&&W.curved===ue&&Math.hypot(W.point.x-K.point.x,W.point.y-K.point.y)<.25?W:{point:K.point,curved:ue})},[de,R,ie]),se=g=>{var Oe;const X=g.metaKey||g.ctrlKey,Z=P.current;if(Z&&g.pointerId===Z.pointerId){if(g.stopPropagation(),g.preventDefault(),Z.startDistance<=0)return;const it=ee(g.clientX,g.clientY),qe=Math.hypot(it.x-Z.origin.x,it.y-Z.origin.y),Je=Math.max(GC,qe/Z.startDistance);if(!Z.moved&&Math.abs(Je-1)<1e-4)return;Z.moved=!0,p(Gd(Z.startContours,Z.origin,Je));return}const ne=S.current;if(ne&&g.pointerId===ne.pointerId){g.stopPropagation(),g.preventDefault();const it=ee(g.clientX,g.clientY),{bbox:qe}=ne,Je=qe.maxX-qe.minX,ot=qe.maxY-qe.minY,Ve=it.x-ne.origin.x,ve=it.y-ne.origin.y;let Fe=Ve,Xe=ve;if(isFinite(Je)&&isFinite(ot))if(r){let Pe=n.x,_e=n.x+n.width,Ke=n.y,Ze=n.y+n.height;l&&(T>0&&(Pe=n.x+(0-A)/T,_e=n.x+(t.width-A)/T),G>0&&(Ke=n.y+(0-Y)/G,Ze=n.y+(t.height-Y)/G));const st=Math.min(Pe,_e-Je),Ue=Math.max(Pe,_e-Je),De=Math.min(Ke,Ze-ot),ke=Math.max(Ke,Ze-ot),ht=Math.min(Ue,Math.max(st,qe.minX+Ve)),Be=Math.min(ke,Math.max(De,qe.minY+ve));Fe=ht-qe.minX,Xe=Be-qe.minY}else{const Pe=qe.minX-n.x,_e=qe.minY-n.y,Ke=Math.min(0,t.width-Je),Ze=Math.max(0,t.width-Je),st=Math.min(0,t.height-ot),Ue=Math.max(0,t.height-ot),De=Math.min(Ze,Math.max(Ke,Pe+Ve)),ke=Math.min(Ue,Math.max(st,_e+ve));Fe=De-Pe,Xe=ke-_e}const Ye=[];if(!X&&isFinite(Je)&&isFinite(ot)){const Pe=R({x:qe.minX+Je/2+Fe,y:qe.minY+ot/2+Xe}),_e={x:t.width/2,y:t.height/2};Math.abs(Pe.x-_e.x)<=oa&&(Fe=U.x-qe.minX-Je/2,Ye.push(rl(_e.x,"x",t))),Math.abs(Pe.y-_e.y)<=oa&&(Xe=U.y-qe.minY-ot/2,Ye.push(rl(_e.y,"y",t)))}if(!ne.moved&&Fe===0&&Xe===0)return;ne.moved=!0,z(Ye.length?Ye:fo),p(dn(ne.startContours,Pe=>({x:Pe.x+Fe,y:Pe.y+Xe})),{carryImage:!0});return}const ye=f.current;if(ye&&g.pointerId===ye.pointerId){g.stopPropagation(),g.preventDefault();const it=ee(g.clientX,g.clientY);let qe=it.x-ye.origin.x,Je=it.y-ye.origin.y;if(g.shiftKey&&(Math.abs(qe)>Math.abs(Je)?Je=0:qe=0),!ye.moved&&qe===0&&Je===0)return;ye.moved=!0,p(Ud(ye.startContours,ye.selection,qe,Je));return}const K=x.current;if(!K||g.pointerId!==K.pointerId){I(g.clientX,g.clientY,w.length>0||$);return}ie(),g.stopPropagation(),g.preventDefault();const D=ee(g.clientX,g.clientY);if(K.kind==="anchor"){const it={x:K.anchor.x+(D.x-K.origin.x),y:K.anchor.y+(D.y-K.origin.y)},qe=X?[]:kC(h.current,{contour:K.contour,node:K.node}),Je=X||!K.center?[]:[K.center],ot=Qd(Kd(qe,Je.map(Fe=>Fe.x),"x"),it,"x",R,oa),Ve=Qd(Kd(qe,Je.map(Fe=>Fe.y),"y"),it,"y",R,oa),ve=X?it:{x:(ot==null?void 0:ot.value)??ta(it.x,o),y:(Ve==null?void 0:Ve.value)??ta(it.y,o)};if(g.shiftKey&&(Math.abs(ve.x-K.anchor.x)>Math.abs(ve.y-K.anchor.y)?ve.y=K.anchor.y:ve.x=K.anchor.x),!K.moved&&ve.x===K.anchor.x&&ve.y===K.anchor.y)return;K.moved=!0,z(_C(ve,ot,Ve,t,R)),p(IC(h.current,K.contour,K.node,ve));return}const ce=(Oe=h.current[K.contour])==null?void 0:Oe.nodes[K.node],q=K.mirror&&!g.altKey,ue=q||X?null:K.kind==="in"?ce==null?void 0:ce.out:ce==null?void 0:ce.in,W=ce?R(ce.p):null,Le=ue?R(ue):null,ae=ce&&(!X||g.shiftKey)?WC(D,ce.p,q||X?null:HC(h.current[K.contour],K.node,K.kind,R),W&&Le?Math.hypot(Le.x-W.x,Le.y-W.y):null,g.shiftKey,R,y):{point:D,guides:fo},Q=ae.guides.length?ae.point:X?D:{x:ta(D.x,o),y:ta(D.y,o)},Ne=K.kind==="in"?ce==null?void 0:ce.in:ce==null?void 0:ce.out;!K.moved&&Ne&&Q.x===Ne.x&&Q.y===Ne.y||(K.moved=!0,z(ae.guides),p(PC(h.current,K.contour,K.node,K.kind,Q,q)))},J=g=>{z(fo);const X=P.current;if(X&&g.pointerId===X.pointerId){P.current=null,g.stopPropagation();const ue=b.current;ue!=null&&ue.hasPointerCapture(X.pointerId)&&ue.releasePointerCapture(X.pointerId),X.moved&&F(h.current,{preserveShape:!0});return}const Z=S.current;if(Z&&g.pointerId===Z.pointerId){S.current=null,g.stopPropagation();const ue=b.current;ue!=null&&ue.hasPointerCapture(Z.pointerId)&&ue.releasePointerCapture(Z.pointerId),Z.moved?F(h.current,{preserveShape:!0}):N([]);return}const ne=f.current;if(ne&&g.pointerId===ne.pointerId){f.current=null,g.stopPropagation();const ue=b.current;ue!=null&&ue.hasPointerCapture(ne.pointerId)&&ue.releasePointerCapture(ne.pointerId),ne.moved&&F(h.current);return}const ye=x.current;if(!ye||g.pointerId!==ye.pointerId)return;x.current=null,g.stopPropagation();const K=b.current;K!=null&&K.hasPointerCapture(ye.pointerId)&&K.releasePointerCapture(ye.pointerId);const D=Math.hypot(g.clientX-ye.clientOrigin.x,g.clientY-ye.clientOrigin.y);if(ye.moved||D>jC){ye.moved&&F(h.current);return}if(!ye.toggleOnRelease||g.type!=="pointerup")return;const q=qd(h.current,ye.contour,ye.node);q!==h.current&&(p(q),F(q))},Se=g=>{g.stopPropagation()},Re=g=>{var X,Z;g.stopPropagation(),g.preventDefault(),ie(),(X=b.current)==null||X.focus({preventScroll:!0}),S.current={pointerId:g.pointerId,origin:ee(g.clientX,g.clientY),startContours:zn(i),bbox:Ci(i),moved:!1},(Z=b.current)==null||Z.setPointerCapture(g.pointerId)},pe=(g,X)=>{var D,ce;g.stopPropagation(),g.preventDefault(),ie(),(D=b.current)==null||D.focus({preventScroll:!0}),N([]),d("shape");const Z=Ci(i),ne=Pa(Z,jp(X)),ye=ll(Z,X),K=Math.hypot(ye.x-ne.x,ye.y-ne.y);!isFinite(K)||K<=0||(P.current={pointerId:g.pointerId,corner:X,origin:ne,startDistance:K,startContours:zn(i),moved:!1},(ce=b.current)==null||ce.setPointerCapture(g.pointerId))},he=(g,X,Z,ne)=>{var D,ce,q,ue;g.stopPropagation(),g.preventDefault(),ie(),(D=b.current)==null||D.focus({preventScroll:!0});const ye=(ce=i[Z])==null?void 0:ce.nodes[ne];if(!ye)return;if(g.altKey){const W=X==="anchor"?zp(i,Z,ne):RC(i,Z,ne,X);if(W===i)return;N(X==="anchor"?[]:[{contour:Z,node:ne}]),p(W),F(W);return}const K=g.metaKey||g.ctrlKey;if(X==="anchor"&&g.shiftKey&&!K){N(W=>W.some(Le=>Le.contour===Z&&Le.node===ne)?W.filter(Le=>!(Le.contour===Z&&Le.node===ne)):[...W,{contour:Z,node:ne}]);return}if(X==="anchor"&&!K&&w.length>1&&w.some(W=>W.contour===Z&&W.node===ne)){f.current={pointerId:g.pointerId,origin:ee(g.clientX,g.clientY),startContours:zn(i),selection:w,moved:!1},(q=b.current)==null||q.setPointerCapture(g.pointerId);return}N([{contour:Z,node:ne}]),x.current={kind:X,contour:Z,node:ne,pointerId:g.pointerId,origin:ee(g.clientX,g.clientY),clientOrigin:{x:g.clientX,y:g.clientY},anchor:ye.p,center:$C(i),mirror:X!=="anchor"&&!!(ye.in&&ye.out),toggleOnRelease:K,moved:!1},(ue=b.current)==null||ue.setPointerCapture(g.pointerId)},te=g=>{g.stopPropagation(),g.preventDefault(),ie();const X=dn(i,R),Z=Yd(X,de(g.clientX,g.clientY));if(!Z||Z.distance>dl)return;const{contours:ne,nodeIndex:ye}=MC(i,Z.contour,Z.segment,Z.t);ye<0||(N([{contour:Z.contour,node:ye}]),p(ne),F(ne))},le=g=>{if(g.key==="="||g.key==="+"||g.key==="-"||g.key==="_"){g.preventDefault(),g.stopPropagation();const K=Ci(i);if(!isFinite(K.minX)||!isFinite(K.maxX))return;const D={x:(K.minX+K.maxX)/2,y:(K.minY+K.maxY)/2},q=g.key==="="||g.key==="+"?tu:1/tu,ue=Gd(i,D,q);p(ue),F(ue,{preserveShape:!0});return}if(g.key==="Escape"){g.stopPropagation(),N([]),d("none");return}if(!w.length)return;if(g.key==="Backspace"||g.key==="Delete"){g.preventDefault(),g.stopPropagation();const K=LC(i,w);if(K===i)return;N([]),p(K),F(K);return}const X=o>0?o:XC,Z=g.shiftKey?X*10:X,ne={ArrowLeft:[-Z,0],ArrowRight:[Z,0],ArrowUp:[0,-Z],ArrowDown:[0,Z]}[g.key];if(!ne)return;g.preventDefault(),g.stopPropagation();const ye=Ud(i,w,ne[0],ne[1]);p(ye),F(ye)},re=s.useMemo(()=>_o(dn(i,R)),[i,R]),fe=s.useMemo(()=>Ci(i),[i]),xe=R({x:fe.minX,y:fe.minY}),Te={width:R({x:fe.maxX,y:fe.minY}).x-xe.x,height:R({x:fe.minX,y:fe.maxY}).y-xe.y},me=$&&w.length===0&&isFinite(fe.minX)&&isFinite(fe.maxX)&&fe.maxX>fe.minX&&fe.maxY>fe.minY,be=w.length>0||$,we=be;return a.jsxs("svg",{ref:b,className:`${e}-editor${be?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:le,onPointerDown:()=>{var g;return(g=b.current)==null?void 0:g.focus({preventScroll:!0})},onPointerMove:se,onPointerLeave:ie,onPointerUp:J,onPointerCancel:J,onLostPointerCapture:J,onContextMenu:g=>{g.preventDefault()},"data-pretext-path-editor":!0,"data-selection":"none",children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>{N([]),d("none")},onClick:te}),we&&a.jsx("path",{className:`${e}-editor-outline`,d:re}),we&&V.map((g,X)=>a.jsx("line",{className:`${e}-editor-snap ${e}-editor-snap-${g.kind}`,x1:g.a.x,y1:g.a.y,x2:g.b.x,y2:g.b.y},`${g.kind}-${X}`)),a.jsx("path",{ref:m,className:`${e}-editor-body`,d:re,fillRule:"evenodd",onPointerDown:Re,onClick:te}),we&&a.jsx("path",{className:`${e}-editor-hit`,d:re,style:{strokeWidth:zC},onClick:te}),we&&H&&a.jsx("rect",{className:`${e}-editor-add-preview`,x:H.point.x-On/2,y:H.point.y-On/2,width:On,height:On,rx:H.curved?On/2:0}),we&&i.map((g,X)=>g.nodes.map((Z,ne)=>{const ye=w.some(D=>D.contour===X&&D.node===ne),K=R(Z.p);return a.jsxs("g",{children:[ye&&w.length===1&&["in","out"].map(D=>{const ce=Z[D];if(!ce)return null;const q=R(ce);return a.jsxs("g",{children:[a.jsx("line",{className:`${e}-editor-handle-line`,x1:K.x,y1:K.y,x2:q.x,y2:q.y}),a.jsx("circle",{className:`${e}-editor-handle`,cx:q.x,cy:q.y,r:VC}),a.jsx("circle",{className:`${e}-editor-grab`,cx:q.x,cy:q.y,r:so,onPointerDown:ue=>he(ue,D,X,ne),onClick:Se})]},D)}),a.jsx("rect",{className:`${e}-editor-anchor${ye?` ${e}-editor-anchor-selected`:""}`,x:K.x-On/2,y:K.y-On/2,width:On,height:On,rx:_p(Z)?On/2:0}),a.jsx("rect",{className:`${e}-editor-grab`,x:K.x-so,y:K.y-so,width:so*2,height:so*2,onPointerDown:D=>he(D,"anchor",X,ne),onClick:Se,onDoubleClick:D=>{D.stopPropagation(),D.preventDefault();const ce=qd(i,X,ne);p(ce),F(ce)}})]},`${X}-${ne}`)})),me&&a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:xe.x,y:xe.y,width:Te.width,height:Te.height}),["nw","ne","se","sw"].map(g=>{const X=R(ll(fe,g)),Z=g==="ne"||g==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:X.x-aa/2,y:X.y-aa/2,width:aa,height:aa}),a.jsx("rect",{className:`${e}-editor-scale-grab${Z?` ${e}-editor-scale-grab-nesw`:""}`,x:X.x-ra/2,y:X.y-ra/2,width:ra,height:ra,onPointerDown:ne=>pe(ne,g),onClick:Se})]},g)})]})]})}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 v of p.split(/\s+/))v&&t.push({text:v,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 m of l){const h=m.x*n,x=m.y*i;h<c&&(c=h),h>d&&(d=h),x<u&&(u=x),x>p&&(p=x)}const v=(c+d)/2,b=(u+p)/2;return l.map(m=>{const h=m.x*n,x=m.y*i,S=h-v,P=x-b,f=Math.sqrt(S*S+P*P);if(f<1e-6)return m;const N=Math.max(0,f+r*t)/f;return{x:(v+S*N)/n,y:(b+P*N)/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:v}=e,b=!!e.hyphenate,m=e.charWidths??[],h=e.hyphenWidth??0,x=e.lineHeight*l,S=e.spaceWidth*l,P=Math.max(0,e.shapeMargin??0),f=[],w=t.map((A,Y)=>({token:A,originalIndex:Y,width:n[Y],kind:"whole"}));if(!w.length||c<=0||x<=0)return{segments:f,placed:0,height:0,capLeft:0,capTop:0,renderTokens:t};const N=Math.max(1,S*.5),V=x*nC,B=JC(i,P,c,d,o),H=Math.max(1,Math.floor(e.columns??1)),_=H>1?Math.max(0,e.columnGap??0):0,z=(c-_*(H-1))/H;let $=0,E=0,j=0,L=0,C=0,T=null;for(let A=0;A<H&&$<w.length&&z>0;A+=1){const Y=A*(z+_),R=Y+z,y=u&&A===H-1;let U=w[$].token.para,ee=0;for(;$<w.length&&j<qC;){const de=ee+x>d;if(de&&!y)break;const F=w[$].token.para;if(F>U+1){ee+=x*(F-U-1),U=F-1,j+=1;continue}let ie=de?[{x0:Y,x1:R}]:dC(B,(ee+V)/d,(ee+x-V)/d,o).map(se=>({x0:Math.max(Y,se.x0*c),x1:Math.min(R,se.x1*c)})).filter(se=>se.x1>se.x0);p>0&&v>0&&A===0&&!de&&ie.length&&(T===null&&(T=j,L=ie[0].x0,C=ee),j-T<v&&(ie=cC(ie,{x0:L,x1:L+p})));const I=ie.reduce((se,J)=>Math.max(se,J.x1-J.x0),0);for(const se of ie){const J=se.x1-se.x0;if(J<N)continue;if($>=w.length||w[$].token.para!==F)break;const Se=$;let Re=0;for(;$<w.length&&w[$].token.para===F;){const pe=w[$],he=$===Se,te=pe.width*l,le=he?te:S+te;if(Re+le<=J){Re+=le,$+=1;continue}if(he&&J>=I-.5&&te>z-.5){Re+=le,$+=1;continue}if(b){const fe=J-Re-(he?0:S),xe=eT(pe,m,fe,l,h);if(xe){const Te={token:{...pe.token,text:xe.fragmentText},originalIndex:pe.originalIndex,width:xe.fragmentWidth,kind:"fragment"},me={token:{...pe.token,text:xe.remainderText},originalIndex:pe.originalIndex,width:xe.remainderWidth,kind:"remainder"};w.splice($,1,Te,me),Re+=(he?0:S)+xe.fragmentWidth*l,$+=1}}break}if($>Se){const pe=$>=w.length||w[$].token.para!==F;f.push({top:ee,left:se.x0,width:J,from:Se,to:$,justify:r==="justify"&&!pe})}if($>=w.length||w[$].token.para!==F)break}U=F,ee+=x,j+=1}E=Math.max(E,ee)}let G=0;if($>0){const A=w[$-1];G=A.kind==="fragment"?A.originalIndex:A.originalIndex+1}return{segments:f,placed:G,height:f.length?E:0,capLeft:L,capTop:C,renderTokens:w.map(A=>A.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:v,padding:b,columns:m,gutter:h,hyphenate:x,showOverflowIndicator:S,dropCapLines:P,dropCapSize:f,showGuides:w,typography:N,imageUrl:V,imageFocalX:B,imageFocalY:H,imageScale:_,imageCustomPath:z,imagePathEdited:$,pathDragActive:E,pathCarryImage:j,onCarryImageConsumed:L,pathEditor:C,imageEditor:T}){var jt,xt;const G=`pretext-shape-image-${s.useId().replace(/:/g,"")}`,[A,Y]=s.useState(null),R=s.useRef(null),[y,U]=s.useState({width:0,height:0}),[ee,de]=s.useState(0),[F,ie]=s.useState(0),[I,se]=s.useState(null),[J,Se]=s.useState(0),[Re,pe]=s.useState("none");s.useEffect(()=>{!C&&!T&&pe("none")},[C,T]);const[he,te]=s.useState(null);s.useEffect(()=>{if(!V||typeof Image>"u"){te(null);return}let Ce=!1;const He=new Image;return He.onload=()=>{Ce||te({width:He.naturalWidth,height:He.naturalHeight})},He.src=V,()=>{Ce=!0}},[V]);const le=s.useMemo(()=>Array.isArray(t==null?void 0:t.text)?t.text:[],[t]),re=s.useMemo(()=>QC(le),[le]),fe=s.useMemo(()=>ZC(le),[le]),xe=P>0&&f>1?((xt=(jt=re[0])==null?void 0:jt.text)==null?void 0:xt.charAt(0))??"":"",Te=(C==null?void 0:C.contours)??null,me=s.useMemo(()=>{let Ce=[];if(Te){const He=$r(Te);He.length&&(Ce=wo(He,r))}if(!Ce.length){const He=i.trim(),lt=He?Bd(He,o,r):null;lt&&lt.length?Ce=lt:Ce=tl(n==="custom"?"rectangle":n)}return n==="circle"?Ns(Ce,y):Ce},[Te,n,i,o,r,y.width,y.height]),be=C==null?void 0:C.onConvert,we=(C==null?void 0:C.needsConversion)??!1,g=s.useMemo(()=>{if(n==="circle")return!1;const Ce=Te??(i.trim()?Ri(i):null);return!!(Ce&&Dp(Ce,r))},[Te,i,r,n]),[X,Z]=s.useState(null);nr(()=>{if(!g){X&&Z(null);return}!X&&y.width>0&&y.height>0&&Z({width:y.width,height:y.height})},[g,y.width,y.height,X]);const ne=s.useMemo(()=>{if(!g||y.width<=0||y.height<=0)return me;const Ce=X??y,He=r.width/Ce.width,lt=r.height/Ce.height;return me.map(et=>et.map(yt=>({x:yt.x*He,y:yt.y*lt})))},[me,g,X,r.width,r.height,y.width,y.height]),ye=s.useMemo(()=>{if(Te){const et=$r(Te);if(et.length){const yt=wo(et,r);return n==="circle"?Ns(yt,y):yt}}const Ce=z.trim(),He=Ce?Bd(Ce,o,r):null,lt=He&&He.length?He:tl(n==="custom"?"rectangle":n);return n==="circle"?Ns(lt,y):lt},[Te,n,z,o,r,y.width,y.height]),K=s.useMemo(()=>{if(!g||y.width<=0||y.height<=0)return ye;const Ce=X??y,He=r.width/Ce.width,lt=r.height/Ce.height;return ye.map(et=>et.map(yt=>({x:yt.x*He,y:yt.y*lt})))},[ye,g,X,r.width,r.height,y.width,y.height]),D=s.useRef(null),ce=s.useRef(!1);s.useEffect(()=>{if(!(!be||y.width<=0||y.height<=0)){if(g){if(D.current===i)return;const Ce=Te??(i.trim()?Ri(i):null);if(!(Ce!=null&&Ce.length))return;const He=dn(Ce,lt=>({x:r.x+(lt.x-r.x)/y.width*r.width,y:r.y+(lt.y-r.y)/y.height*r.height}));D.current=_o(He),be(He);return}!we||!me.length||ce.current||(ce.current=!0,be(dn(Op(me),Ce=>({x:Ce.x*La,y:Ce.y*La}))))}},[we,g,be,me,Te,i,r,y.width,y.height]);const q=s.useCallback(()=>{const Ce=A;if(!Ce)return;const He=Ce.getBoundingClientRect(),lt=window.getComputedStyle(Ce),et=parseFloat(lt.paddingTop)||0;de(At=>Math.abs(At-et)<.5?At:et);const yt=parseFloat(lt.columnGap)||0;ie(At=>Math.abs(At-yt)<.5?At:yt);const Rt={width:He.width,height:He.height};U(At=>Math.abs(At.width-Rt.width)<.5&&Math.abs(At.height-Rt.height)<.5?At:Rt)},[A]);nr(()=>{const Ce=A;if(!Ce||typeof ResizeObserver>"u")return;q();const He=new ResizeObserver(q);return He.observe(Ce),()=>He.disconnect()},[A,q]),nr(()=>{q()},[b,h,q]),s.useEffect(()=>{const Ce=typeof document<"u"?document.fonts:void 0;Ce!=null&&Ce.ready&&Ce.ready.then(()=>{Se(He=>He+1)})},[]),nr(()=>{const Ce=R.current;if(!Ce)return;if(!re.length){se(null);return}const He=[],lt=document.createDocumentFragment();for(const tt of re){const Mt=document.createElement("span");Object.assign(Mt.style,nu(tt.leaf)),Mt.textContent=tt.text,lt.appendChild(Mt),He.push(Mt)}const et=document.createElement("span");et.textContent=" ",lt.appendChild(et);const yt=document.createElement("span");yt.textContent="-",lt.appendChild(yt);const Rt=xe||"H",At=document.createElement("span");At.textContent=Rt,At.style.lineHeight="1",lt.appendChild(At),Ce.replaceChildren(lt);const qt=window.getComputedStyle(Ce),$t=parseFloat(qt.fontSize)||16,zt=parseFloat(qt.lineHeight),on=Number.isNaN(zt)?$t*1.2:zt,vt=Math.max(on,$t),ft=document.createElement("span");ft.textContent=Rt,ft.style.lineHeight=`${vt}px`;const Me=document.createElement("span");Me.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",ft.appendChild(Me),Ce.appendChild(ft);const nt=ft.getBoundingClientRect().top,ct=Me.getBoundingClientRect().top,gt=Math.max(1,ct-nt);ft.remove();let Et=gt*.8;const dt=document.createElement("canvas").getContext("2d"),Ot=tt=>`${qt.fontStyle} ${qt.fontWeight} ${tt}px ${qt.fontFamily}`;if(dt){dt.font=Ot($t);const tt=dt.measureText(Rt).actualBoundingBoxAscent;tt>0&&(Et=tt)}const Lt=f>1?(f-1)*vt+Et:Et;let Ht=$t*(Lt/Et);if(dt){dt.font=Ot(Ht);const tt=dt.measureText(Rt).actualBoundingBoxAscent;tt>0&&(Ht=Ht*(Lt/tt))}At.style.fontSize=`${Ht}px`,At.style.lineHeight=`${Ht}px`;const Gt=document.createElement("span");Gt.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",At.appendChild(Gt);const _t=Math.max(1,Gt.getBoundingClientRect().top-At.getBoundingClientRect().top);Gt.remove();const Dt=(f-1)*vt+gt-_t,Ct=He.map(tt=>tt.getBoundingClientRect().width),O=et.getBoundingClientRect().width,Ie=yt.getBoundingClientRect().width,je=xe?At.getBoundingClientRect().width:0,Ae=x?He.map(tt=>{const Mt=tt.firstChild;if(!(Mt instanceof Text)||Mt.data.length<4)return;const ut=document.createRange(),Tt=tt.getBoundingClientRect().left,Ut=[];for(let Wt=1;Wt<=Mt.data.length;Wt+=1)ut.setStart(Mt,0),ut.setEnd(Mt,Wt),Ut.push(ut.getBoundingClientRect().right-Tt);return Ut}):[];Ce.replaceChildren(),se({widths:Ct,spaceWidth:O,dashWidth:Ie,charWidths:Ae,lineHeight:vt,capWidth:je,dropCapFontSize:Ht,dropCapTopAdjust:Dt})},[re,N,xe,P,f,J,y.width,x]);const ue=I&&xe?I.capWidth+I.lineHeight*tT:0,W=Math.max(P,Math.ceil(f)),Le=s.useMemo(()=>{if(!I||!re.length||y.width<=0||y.height<=0||!u)return 1;const Ce=et=>iu({tokens:re,widths:I.widths,spaceWidth:I.spaceWidth,lineHeight:I.lineHeight,width:y.width,height:y.height,rings:ne,mode:l,align:c,scale:et,allowOverflow:!1,capInset:ue*et,capLines:xe?W:0,hyphenate:x,charWidths:I.charWidths,hyphenWidth:I.dashWidth,shapeMargin:ee,columns:m,columnGap:F});if(Ce(1).placed>=re.length)return 1;if(Ce(Fs).placed<re.length)return Fs;let He=Fs,lt=1;for(let et=0;et<iT;et+=1){const yt=(He+lt)/2;Ce(yt).placed>=re.length?He=yt:lt=yt}return He},[I,re,y.width,y.height,ne,l,c,u,ue,xe,W,x,ee,m,F]);s.useEffect(()=>{v(Le)},[Le,v]);const ae=u?Math.min(p,Le):1,Q=s.useMemo(()=>!I||!re.length||y.width<=0||y.height<=0?{segments:[],placed:0,height:0,capLeft:0,capTop:0,renderTokens:re}:iu({tokens:re,widths:I.widths,spaceWidth:I.spaceWidth,lineHeight:I.lineHeight,width:y.width,height:y.height,rings:ne,mode:l,align:c,scale:ae,allowOverflow:d,capInset:ue*ae,capLines:xe?W:0,hyphenate:x,charWidths:I.charWidths,hyphenWidth:I.dashWidth,shapeMargin:ee,columns:m,columnGap:F}),[I,re,y.width,y.height,ne,l,c,ae,d,ue,xe,W,x,ee,m,F]),Ne=S&&re.length>0&&Q.placed<re.length,Oe=I?I.dropCapFontSize*ae:0,it=I?I.dropCapTopAdjust*ae:0,qe=c==="justify"?"left":c,Je=I?I.lineHeight*ae:0,ot=Q.segments.length?Q.segments[Q.segments.length-1]:null,Ve=ot?{top:ot.top+Je,left:ot.left+ot.width/2}:{top:y.height,left:y.width/2},ve=!!(C&&Te&&y.width>0&&y.height>0),Fe=!!T,Xe=(ve||Fe)&&y.width>0&&y.height>0,Ye=aT(A,Xe),Pe=Xe&&Ye?sT():null,_e=s.useRef(!1),Ke=s.useCallback(Ce=>{_e.current=Ce},[]);s.useEffect(()=>{if(!ve&&!Fe)return;const Ce=He=>{const lt=A;if(!lt)return;const et=lt.getBoundingClientRect();He.clientX>=et.left&&He.clientX<=et.right&&He.clientY>=et.top&&He.clientY<=et.bottom&&(He.preventDefault(),He.stopPropagation(),pe(Rt=>Rt==="shape"&&_e.current?Rt:Rt==="shape"&&Fe?"image":ve?"shape":"image"))};return document.addEventListener("dblclick",Ce,!0),()=>document.removeEventListener("dblclick",Ce,!0)},[ve,Fe,A]);const Ze=s.useMemo(()=>V&&y.width>0&&y.height>0?iC(K,y):null,[V,K,y.width,y.height]),st=s.useRef(null),Ue=(()=>{const Ce=st.current;return j||!$||!T||!he||!Ze||!Ce||z===Ce.customPath||Ce.shape!==n&&n!=="custom"?null:DC(Ce.bounds,Ze,he,Ce.focalX,Ce.focalY,Ce.scale)})();nr(()=>{if(!T){st.current=null;return}if(E||!he||!Ze)return;const Ce=st.current,He=!!(Ce&&z!==Ce.customPath);He&&Ue&&T.onCommit(Ue),He&&j&&(L==null||L()),st.current={rings:K,bounds:Ze,focalX:(Ue==null?void 0:Ue.focalX)??B,focalY:(Ue==null?void 0:Ue.focalY)??H,scale:(Ue==null?void 0:Ue.scale)??_,customPath:z,shape:n}},[E,j,z,n,K,Ze,T,he,B,H,_,Ue,L]);const De=st.current,ke=!!(E&&!j&&De&&!Ue),ht=ke&&De?De.focalX:(Ue==null?void 0:Ue.focalX)??B,Be=ke&&De?De.focalY:(Ue==null?void 0:Ue.focalY)??H,ze=ke&&De?De.scale:(Ue==null?void 0:Ue.scale)??_,We=ke&&De?De.bounds:Ze,mt=s.useMemo(()=>{if(!(y.width>0)||!(y.height>0))return"";let Ce=jd(i,Te,o,r,n,y);if(g){const He=X??y,lt=r.width/He.width,et=r.height/He.height;Ce=dn(Ce,yt=>({x:yt.x*lt,y:yt.y*et}))}return Vd(Ce,y)||Dd(ne,y)},[i,Te,o,r,n,y.width,y.height,g,X,ne]),rt=s.useMemo(()=>{if(!V||!(y.width>0)||!(y.height>0))return"";let Ce=jd(z,Te,o,r,n,y);if(g){const He=X??y,lt=r.width/He.width,et=r.height/He.height;Ce=dn(Ce,yt=>({x:yt.x*lt,y:yt.y*et}))}return Vd(Ce,y)||Dd(K,y)},[V,z,Te,o,r,n,y.width,y.height,g,X,K]),St=`${G}-clip`,Nt=s.useMemo(()=>{if(!We)return null;const Ce=he??{width:We.width,height:We.height},He=Vi(We,Ce,ze);return{x:Bn(We.width,He.width,ht),y:Bn(We.height,He.height,Be),width:He.width,height:He.height}},[We,he,ht,Be,ze]);return a.jsxs("div",{className:`${e}-column`,style:{padding:b,columnGap:h},ref:Y,children:[mt?a.jsxs("svg",{className:`${e}-shape-fill`,style:{top:0,left:0,width:y.width,height:y.height},viewBox:`0 0 ${y.width} ${y.height}`,preserveAspectRatio:"none","aria-hidden":!0,children:[a.jsx("path",{className:`${e}-shape-fill-path`,d:mt,fillRule:"evenodd"}),V&&rt&&We&&Nt?a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsx("clipPath",{id:St,clipPathUnits:"userSpaceOnUse",children:a.jsx("path",{d:rt,fillRule:"evenodd"})})}),a.jsx("image",{href:V,x:We.x+Nt.x,y:We.y+Nt.y,width:Nt.width,height:Nt.height,preserveAspectRatio:"none",clipPath:`url(#${St})`})]}):null]}):null,a.jsxs("div",{className:`${e}-flow${d?"":` ${e}-clip`}`,style:{...N,["--"+e+"-fit"]:ae,top:0,left:0,width:y.width,height:y.height},children:[a.jsx("div",{className:`${e}-measure`,ref:R,style:N,"aria-hidden":!0}),Q.segments.map((Ce,He)=>{const lt=Q.renderTokens.slice(Ce.from,Ce.to),et=He===0;return a.jsx("div",{className:`${e}-line${Ce.justify?` ${e}-line-justify`:""}`,"aria-hidden":!0,style:{top:`${Ce.top}px`,left:`${Ce.left}px`,width:`${Ce.width}px`,textAlign:Ce.justify?void 0:qe},children:lt.map((yt,Rt)=>{const qt=xe&&et&&Ce.from===0&&Rt===0?yt.text.slice(1):yt.text,$t=nu(yt.leaf),zt=yt.href?a.jsx("a",{className:`${e}-link`,href:yt.href,target:yt.target,rel:yt.target?"noopener noreferrer":void 0,style:$t,children:qt}):a.jsx("span",{style:$t,children:qt});return a.jsxs("span",{children:[!Ce.justify&&Rt>0?" ":null,zt]},Rt)})},`${Ce.from}-${Ce.to}-${He}`)}),w&&!Te&&a.jsx("svg",{className:`${e}-guides`,viewBox:"0 0 1 1",preserveAspectRatio:"none","aria-hidden":!0,children:ne.map((Ce,He)=>a.jsx("polygon",{points:Ce.map(lt=>`${lt.x},${lt.y}`).join(" ")},He))})]}),xe&&I&&a.jsx("div",{className:`${e}-drop-cap`,"aria-hidden":!0,style:{...N,top:`${Q.capTop+it}px`,left:`${Q.capLeft}px`,fontSize:`${Oe}px`,lineHeight:`${Oe}px`},children:xe}),Pe&&Ye&&(Te&&C||T)&&Xn.createPortal(a.jsxs("div",{"data-selection":"none",style:{position:"fixed",top:Ye.top,left:Ye.left,width:Ye.width,height:Ye.height,zIndex:nT,pointerEvents:"none"},children:[Te&&C&&a.jsx(UC,{P:e,box:{width:Ye.width,height:Ye.height},viewBox:r,contours:Te,snap:C.snap,stretchToBox:!g,uniformStretch:n==="circle",stage:Re,onStageChange:pe,onSelectionChange:Ke,onChange:C.onChange,onCommit:C.onCommit}),T&&We&&a.jsx(BC,{P:e,box:{width:Ye.width,height:Ye.height},bounds:We,natural:he,imageUrl:V,maskPath:rt,stage:Re,onStageChange:pe,focalX:ht,focalY:Be,scale:ze,onChange:T.onChange,onCommit:T.onCommit})]}),Pe),a.jsx("div",{className:`${e}-a11y`,children:fe.map((Ce,He)=>a.jsx("p",{children:Ce},He))}),Ne&&a.jsxs("svg",{className:`${e}-overflow-icon`,width:"33",height:"24",viewBox:"0 0 33 24",style:{top:Ve.top,left:Ve.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",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,L=Math.max(1,Math.round((e==null?void 0:e.dropCapLines)??z)),_=u&&p&&!i,G=u&&!i,[$,I]=s.useState(!1);s.useEffect(()=>{if(!u||!p){I(!1);return}const B=()=>I(!0),R=()=>I(!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:Pe,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,P]=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&&P(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(P(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",Pe={...ge,shape:X,customPath:te};C.current=Pe,l==null||l(Pe)}},[g,l]),Le=s.useMemo(()=>D?{contours:J?le:null,snap:T,needsConversion:!J,onConvert:B=>{const R=_o(B);P({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,Pe;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:(Pe=e==null?void 0:e.textTextAppearance)==null?void 0:Pe.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:L,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?Le:null,imageEditor:E?Re:null})})]})}const mT=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
27559
+ `,pT=1;function mT({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,isSelected:r,onUpdateSettings:l}){const{prefix:c}=k.useScopedStyles(),d=s.useMemo(()=>uT(c),[c]),u=n??!1,p=!!r||!!o,v=s.useMemo(()=>Array.isArray(t)?t[0]??{}:{},[t]),b=(e==null?void 0:e.shape)??"custom",m=(e==null?void 0:e.customPath)??"",h=(e==null?void 0:e.pathFit)??"stretch",x=s.useMemo(()=>dT(e==null?void 0:e.pathViewBox),[e==null?void 0:e.pathViewBox]),S=(e==null?void 0:e.shapeMode)==="B"?"avoid":"contain",P=(e==null?void 0:e.textAlign)??"left",f=((e==null?void 0:e.overflowMode)??"clip")==="visible",w=((e==null?void 0:e.fitText)??"off")==="on",N=((e==null?void 0:e.hyphenate)??"off")==="on",V=k.scalingValue((e==null?void 0:e.padding)??0,u),B=Math.max(1,Math.round((e==null?void 0:e.columns)??1)),H=k.scalingValue((e==null?void 0:e.columnGutter)??0,u),_=(e==null?void 0:e.dropCapSize)??pT,z=Math.max(1,Math.round((e==null?void 0:e.dropCapLines)??_)),$=u&&p&&!i,E=u&&!i,[j,L]=s.useState(!1);s.useEffect(()=>{if(!u||!p){L(!1);return}const q=()=>L(!0),ue=()=>L(!1),W=["ArticleEditor.Item:drag-start","ArticleEditor.Selection:resize-start","ArticleEditor.Selection:move-start"],Le=["ArticleEditor.Item:drag-end","ArticleEditor.Selection:resize-end","ArticleEditor.Selection:move-end"];for(const ae of W)window.addEventListener(ae,q);for(const ae of Le)window.addEventListener(ae,ue);return()=>{for(const ae of W)window.removeEventListener(ae,q);for(const ae of Le)window.removeEventListener(ae,ue)}},[u,p]);const C=u&&p&&!i&&typeof l=="function",T=!j,G=Math.max(0,(e==null?void 0:e.pathSnap)??0),A=s.useRef(e??{}),Y=s.useRef(""),R=[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(R!==Y.current)Y.current=R,A.current=e??{};else if(e){const{customPath:q,shape:ue,pathFit:W,pathViewBox:Le,imageScale:ae,imageFocalX:Q,imageFocalY:Ne,image:Oe,...it}=e,qe=A.current;for(const Je of Object.keys(it))if(qe[Je]!==it[Je]){A.current={...qe,...it};break}}const[y,U]=s.useState(null),[ee,de]=s.useState(!1),[F,ie]=s.useState(!1),I=s.useCallback(()=>ie(!1),[]),se=A.current.shape??b,J=!!(y&&(y.base===m||y.serialized===m)),Se=J&&y?y.serialized:m;s.useEffect(()=>{C||(de(!1),ie(!1))},[C]),s.useEffect(()=>{!y||ee||y.serialized===m&&U(null)},[y,m,ee]);const Re=s.useMemo(()=>{if(!C)return null;if(y&&(y.base===m||y.serialized===m))return y.contours;const q=Ri(m);return q.length?q:null},[C,y,m]),pe=!!(h==="viewbox"&&((e==null?void 0:e.pathViewBox)??"")===Js&&Re&&(b==="circle"||!Dp(Re,x))),he=s.useCallback((q,ue,W)=>{const Le=_o(q);if(U(ae=>({base:ae&&(ae.base===m||ae.serialized===m)?ae.base:m,serialized:Le,contours:q})),ue){const ae=A.current,Q=W!=null&&W.preserveShape?ae.shape:"custom",Ne={...ae,shape:Q,customPath:Le};A.current=Ne,l==null||l(Ne)}},[m,l]),te=s.useMemo(()=>C?{contours:pe?Re:null,snap:G,needsConversion:!pe,onConvert:q=>{const ue=_o(q);U({base:ue,serialized:ue,contours:q});const W={...A.current,pathFit:"viewbox",pathViewBox:Js,customPath:ue};A.current=W,l==null||l(W)},onChange:(q,ue)=>{de(!0),ie(!!(ue!=null&&ue.carryImage)),he(q,!1)},onCommit:(q,ue)=>{he(q,!0,ue),de(!1)}}:null,[C,pe,Re,G,l,he]),le=S==="avoid"&&!!(e!=null&&e.image),re=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]),[fe,xe]=s.useState(null),Te=fe??re,me=s.useCallback(q=>xe(q),[]),be=s.useCallback(q=>{xe(q);const ue={...A.current,imageFocalX:q.focalX,imageFocalY:q.focalY,imageScale:q.scale};A.current=ue,l==null||l(ue)},[l]);s.useEffect(()=>{fe&&Math.abs(fe.focalX-re.focalX)<1e-9&&Math.abs(fe.focalY-re.focalY)<1e-9&&Math.abs(fe.scale-re.scale)<1e-9&&xe(null)},[fe,re]);const we=s.useMemo(()=>!C||!le?null:{onChange:me,onCommit:be},[C,le,me,be]),[g,X]=s.useState(void 0),Z=s.useRef(void 0),ne=s.useCallback(q=>{const ue=Z.current;ue!==void 0&&Math.abs(ue-q)<.005||(Z.current=q,X(q))},[]),ye=s.useMemo(()=>w&&typeof g=="number"?g:1,[g,w]),K=q=>`calc(${q} * var(--${c}-fit, 1))`,D=s.useMemo(()=>{var W,Le,ae,Q,Ne;const q=(e==null?void 0:e.textFontSize)??.012,ue=Math.max((e==null?void 0:e.textLineHeight)??q,q);return{fontFamily:Do(e==null?void 0:e.textFontFamily),fontWeight:(W=e==null?void 0:e.textFontSettings)==null?void 0:W.fontWeight,fontStyle:(Le=e==null?void 0:e.textFontSettings)==null?void 0:Le.fontStyle,fontSize:K(k.scalingValue(q,u)),lineHeight:K(k.scalingValue(ue,u)),letterSpacing:K(k.scalingValue((e==null?void 0:e.textLetterSpacing)??0,u)),wordSpacing:K(k.scalingValue((e==null?void 0:e.textWordSpacing)??0,u)),textTransform:(ae=e==null?void 0:e.textTextAppearance)==null?void 0:ae.textTransform,textDecoration:(Q=e==null?void 0:e.textTextAppearance)==null?void 0:Q.textDecoration,fontVariant:(Ne=e==null?void 0:e.textTextAppearance)==null?void 0:Ne.fontVariant}},[e,u,c]),ce={[`--${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:{...ce},children:a.jsx(lT,{P:c,item:v,shape:se,customPath:m,pathFit:h,viewBox:x,mode:S,align:P,allowOverflow:f,fitEnabled:w,scale:ye,onFitScale:ne,padding:V,columns:B,gutter:H,hyphenate:N,showOverflowIndicator:E,dropCapLines:z,dropCapSize:_,showGuides:($||C)&&T,typography:D,imageUrl:S==="avoid"?e==null?void 0:e.image:null,imageFocalX:Te.focalX,imageFocalY:Te.focalY,imageScale:Te.scale,imageCustomPath:Se,imagePathEdited:J,pathDragActive:ee,pathCarryImage:F,onCarryImageConsumed:I,pathEditor:T?te:null,imageEditor:T?we:null})})]})}const gT=`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';
@@ -27625,6 +27625,8 @@ export type PretextSettings = {
27625
27625
  fitText?: 'on' | 'off';
27626
27626
  hyphenate?: 'on' | 'off';
27627
27627
  padding?: number;
27628
+ columns?: number;
27629
+ columnGutter?: number;
27628
27630
  dropCapLines?: number;
27629
27631
  dropCapSize?: number;
27630
27632
  image?: string | null;
@@ -27761,6 +27763,8 @@ export type ColumnProps = {
27761
27763
  scale: number;
27762
27764
  onFitScale: (scale: number) => void;
27763
27765
  padding: string;
27766
+ columns: number;
27767
+ gutter: string;
27764
27768
  hyphenate: boolean;
27765
27769
  showOverflowIndicator: boolean;
27766
27770
  dropCapLines: number;
@@ -27772,6 +27776,7 @@ export type ColumnProps = {
27772
27776
  imageFocalY: number;
27773
27777
  imageScale: number;
27774
27778
  imageCustomPath: string;
27779
+ imagePathEdited: boolean;
27775
27780
  pathDragActive: boolean;
27776
27781
  pathCarryImage: boolean;
27777
27782
  onCarryImageConsumed?: () => void;
@@ -28108,6 +28113,8 @@ export function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode
28108
28113
  const fitEnabled = (settings?.fitText ?? 'off') === 'on';
28109
28114
  const hyphenate = (settings?.hyphenate ?? 'off') === 'on';
28110
28115
  const paddingCss = scalingValue(settings?.padding ?? 0, editor);
28116
+ const columns = Math.max(1, Math.round(settings?.columns ?? 1));
28117
+ const gutterCss = scalingValue(settings?.columnGutter ?? 0, editor);
28111
28118
  const dropCapSize = settings?.dropCapSize ?? DROP_CAP_SIZE_DEFAULT;
28112
28119
  const dropCapLines = Math.max(1, Math.round(settings?.dropCapLines ?? dropCapSize));
28113
28120
  const showGuides = editor && selected && !isPreviewMode;
@@ -28183,10 +28190,11 @@ export function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode
28183
28190
  const onCarryImageConsumed = useCallback(() => setPathCarryImage(false), []);
28184
28191
 
28185
28192
  const liveShape = settingsRef.current.shape ?? shape;
28186
- const imageCustomPath = useMemo(() => {
28187
- if (!draft || draft.serialized === customPath) return customPath;
28188
- return draft.serialized;
28189
- }, [draft, customPath]);
28193
+ // A draft only stands in for the path it was made from. Once customPath moves
28194
+ // on for another reason (layout switch, undo), the draft is stale and the
28195
+ // image must not treat that change as a path edit.
28196
+ const imagePathEdited = Boolean(draft && (draft.base === customPath || draft.serialized === customPath));
28197
+ const imageCustomPath = imagePathEdited && draft ? draft.serialized : customPath;
28190
28198
 
28191
28199
  useEffect(() => {
28192
28200
  if (!pathEditing) {
@@ -28362,6 +28370,8 @@ export function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode
28362
28370
  scale={sharedScale}
28363
28371
  onFitScale={handleFitScale}
28364
28372
  padding={paddingCss}
28373
+ columns={columns}
28374
+ gutter={gutterCss}
28365
28375
  hyphenate={hyphenate}
28366
28376
  showOverflowIndicator={showOverflowIndicator}
28367
28377
  dropCapLines={dropCapLines}
@@ -28373,6 +28383,7 @@ export function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode
28373
28383
  imageFocalY={liveImageTransform.focalY}
28374
28384
  imageScale={liveImageTransform.scale}
28375
28385
  imageCustomPath={imageCustomPath}
28386
+ imagePathEdited={imagePathEdited}
28376
28387
  pathDragActive={pathDragActive}
28377
28388
  pathCarryImage={pathCarryImage}
28378
28389
  onCarryImageConsumed={onCarryImageConsumed}
@@ -28383,4 +28394,4 @@ export function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode
28383
28394
  </>
28384
28395
  );
28385
28396
  }
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,Py,Ny,av,e0,ox,gx,Yx,ab,Lb,$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;
28397
+ `,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"}},columns:{type:"number",scope:"layout",title:"Columns",tooltip:"Splits the text area into columns. Text fills them left to right.",min:1,max:5,display:{type:"count-number"}},columnGutter:{type:"number",scope:"layout",title:"Columns gap",tooltip:"Space between columns.",min:0,display:{type:"numeric-input"}},dropCapLines:{type:"number",scope:"common",title:"Drop cap lines",min:1,max:8,step:1,display:{type:"numeric-input"}},dropCapSize:{type:"number",scope:"common",title:"Drop cap size",tooltip:"Height of the drop cap, in lines of body text.",min:1,max:8,step:1,display:{type:"common-numeric-input"}},image:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},backgroundColor:{type:"string",scope:"common",title:"BG Shape",display:{type:"settings-color-picker"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...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,columns:1,columnGutter:.04},t:{textFontSize:.018,textLineHeight:.024,textLetterSpacing:0,textWordSpacing:0,padding:0,columns:1,columnGutter:.02},d:{textFontSize:.032,textLineHeight:.0155,textLetterSpacing:-.001,textWordSpacing:0,padding:0,columns:1,columnGutter:.015}},layout:["__componentName__","shape","customPath","pathSnap","pathFit","shapeMode","fitText","hyphenate","padding","columns","columnGutter","dropCapLines","dropCapSize","image"],displayRules:[{if:{name:"shapeMode",value:"B",isNotEqual:!0},then:{name:"properties.image.display.visible",value:!1}},{if:{name:"shapeMode",value:"B",isNotEqual:!0},then:{name:"properties.padding.display.visible",value:!1}},{if:{name:"shapeMode",value:"A"},then:{name:"properties.shape.display.isFilled",value:!0}},{if:{name:"shapeMode",value:"B"},then:{name:"properties.shape.display.isFilled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["shapeMode"]},{type:"row",title:"Shape",items:["shape"]},{type:"row",items:["dropCapSize","hyphenate"]},{type:"row",items:["padding","image"]},{type:"row",items:["columns","columnGutter"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"",items:["textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textAlign","textTextAppearance"]}]}],paletteBookmark:{items:["textColor","linkColor","backgroundColor"],panelIds:["general","typeStyle"]},content:{type:"array",max:1,settings:{addItemWithoutImage:!0,addItemFromFileExplorer:!1},display:{type:"array"},items:{type:"object",properties:{text:{label:"Text",placeholder:"Add Text...",display:{type:"rich-text"}}}},default:[{text:[{type:"paragraph",children:[{text:"Le loro superficie, excelso Duca, fra loro similmente possiamo dire al medesimo modo esser proportionali commo de lor massa corporea s'è dicto, cioè irrationali per la malitia de la figura pentagona che in lo duodecedron se interpone. Ma de l'altre possano a le volte essere rationali, commo quelle del tetracedron, cubo, octocedron, per essere triangole e quadrate e note in proportione con lo diametro de la loro sphera in la quale si formano, commo s'è veduto di sopra."}]}]}]}},yT={element:mT,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:gT,assetsPaths:{content:[],parameters:[{path:"image",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}},vT=[gh,Sh,hb,gf,$f,Af,Zf,Sy,Py,Ny,av,e0,ox,mx,Yx,ab,Lb,$S,Wb,DS,vw,i$,tC,yT];exports.getAvailableStatePanels=k.getAvailableStatePanels;exports.getUnavailableStates=k.getUnavailableStates;exports.isPanelAvailable=k.isPanelAvailable;exports.components=vT;exports.isSchemaV1=rm;