@cntrl-site/components 1.0.87 → 1.0.88

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"),_=require("./panelAvailability-D8c7cdbu.js"),li=require("react-dom");function Np(e){return e.type==="object"&&e.version===1}const _p="ControlSlider-module__wrapper___sHEkd",Hp="ControlSlider-module__hoverArrow___A-dOH",Wp="ControlSlider-module__sliderItem___QQSkR",Op="ControlSlider-module__sliderImage___9hRl-",Dp="ControlSlider-module__arrow___05ghY",zp="ControlSlider-module__arrowVertical___tBfVN",Bp="ControlSlider-module__nextArrow___-30Yc",jp="ControlSlider-module__arrowInner___aEra3",Vp="ControlSlider-module__arrowIcon___S4ztF",Gp="ControlSlider-module__arrowImg___2dwJW",Xp="ControlSlider-module__mirror___brd6U",qp="ControlSlider-module__pagination___bicLF",Up="ControlSlider-module__paginationInner___bT-P-",Kp="ControlSlider-module__paginationVertical___zYqKw",Yp="ControlSlider-module__paginationItem___nTRbk",Zp="ControlSlider-module__dot___p1Qun",Jp="ControlSlider-module__activeDot___LHFaj",Qp="ControlSlider-module__paginationInsideBottom___R3FWn",em="ControlSlider-module__paginationInsideTop___V-qb-",tm="ControlSlider-module__paginationOutsideBottom___14w8D",nm="ControlSlider-module__paginationOutsideTop___SCLqB",im="ControlSlider-module__paginationInsideLeft___yOBRZ",om="ControlSlider-module__paginationInsideRight___Rtt3o",rm="ControlSlider-module__paginationOutsideLeft___lahaw",am="ControlSlider-module__paginationOutsideRight___EtuQa",sm="ControlSlider-module__imgWrapper___UjEgB",lm="ControlSlider-module__captionBlock___dJ6-j",cm="ControlSlider-module__captionTextWrapper___HFlpf",dm="ControlSlider-module__captionText___uGBVc",um="ControlSlider-module__active___WZK4G",pm="ControlSlider-module__withPointerEvents___t-18M",mm="ControlSlider-module__topLeftAlignment___zjnGM",gm="ControlSlider-module__topCenterAlignment___gD1xW",hm="ControlSlider-module__topRightAlignment___NMapS",fm="ControlSlider-module__middleLeftAlignment___OnUrY",ym="ControlSlider-module__middleCenterAlignment___Tdkl0",vm="ControlSlider-module__middleRightAlignment___wEbfX",xm="ControlSlider-module__bottomLeftAlignment___cTP2-",bm="ControlSlider-module__bottomCenterAlignment___c54fB",Sm="ControlSlider-module__bottomRightAlignment___kEwrz",wm="ControlSlider-module__clickOverlay___DZA28",$m="ControlSlider-module__contain___pLyq7",Cm="ControlSlider-module__cover___KdDat",$t={wrapper:_p,hoverArrow:Hp,sliderItem:Wp,sliderImage:Op,arrow:Dp,arrowVertical:zp,nextArrow:Bp,arrowInner:jp,arrowIcon:Vp,arrowImg:Gp,mirror:Xp,pagination:qp,paginationInner:Up,paginationVertical:Kp,paginationItem:Yp,dot:Zp,activeDot:Jp,paginationInsideBottom:Qp,paginationInsideTop:em,paginationOutsideBottom:tm,paginationOutsideTop:nm,paginationInsideLeft:im,paginationInsideRight:om,paginationOutsideLeft:rm,paginationOutsideRight:am,imgWrapper:sm,captionBlock:lm,captionTextWrapper:cm,captionText:dm,active:um,withPointerEvents:pm,topLeftAlignment:mm,topCenterAlignment:gm,topRightAlignment:hm,middleLeftAlignment:fm,middleCenterAlignment:ym,middleRightAlignment:vm,bottomLeftAlignment:xm,bottomCenterAlignment:bm,bottomRightAlignment:Sm,clickOverlay:wm,contain:$m,cover:Cm};function Tm(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 Lm(e,t,n){return t&&Tm(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Dl="(prefers-reduced-motion: reduce)",go=1,Pm=2,Co=3,Wo=4,Sr=5,na=6,ca=7,Im={CREATED:go,MOUNTED:Pm,IDLE:Co,MOVING:Wo,SCROLLING:Sr,DRAGGING:na,DESTROYED:ca};function ai(e){e.length=0}function Ri(e,t,n){return Array.prototype.slice.call(e,t,n)}function Jt(e){return e.bind.apply(e,[null].concat(Ri(arguments,1)))}var Od=setTimeout,Ps=function(){};function zl(e){return requestAnimationFrame(e)}function wa(e,t){return typeof t===e}function lr(e){return!il(e)&&wa("object",e)}var nl=Array.isArray,Dd=Jt(wa,"function"),Ci=Jt(wa,"string"),wr=Jt(wa,"undefined");function il(e){return e===null}function zd(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function $r(e){return nl(e)?e:[e]}function Pn(e,t){$r(e).forEach(t)}function ol(e,t){return e.indexOf(t)>-1}function ia(e,t){return e.push.apply(e,$r(t)),e}function ti(e,t,n){e&&Pn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Bn(e,t){ti(e,Ci(t)?t.split(" "):t,!0)}function Cr(e,t){Pn(t,e.appendChild.bind(e))}function rl(e,t){Pn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function cr(e,t){return zd(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Bd(e,t){var n=e?Ri(e.children):[];return t?n.filter(function(i){return cr(i,t)}):n}function Tr(e,t){return t?Bd(e,t)[0]:e.firstElementChild}var dr=Object.keys;function qi(e,t,n){return e&&(n?dr(e).reverse():dr(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function ur(e){return Ri(arguments,1).forEach(function(t){qi(t,function(n,i){e[i]=t[i]})}),e}function bi(e){return Ri(arguments,1).forEach(function(t){qi(t,function(n,i){nl(n)?e[i]=n.slice():lr(n)?e[i]=bi({},lr(e[i])?e[i]:{},n):e[i]=n})}),e}function Bl(e,t){Pn(t||dr(e),function(n){delete e[n]})}function jn(e,t){Pn(e,function(n){Pn(t,function(i){n&&n.removeAttribute(i)})})}function Ft(e,t,n){lr(t)?qi(t,function(i,o){Ft(e,o,i)}):Pn(e,function(i){il(n)||n===""?jn(i,t):i.setAttribute(t,String(n))})}function xo(e,t,n){var i=document.createElement(e);return t&&(Ci(t)?Bn(i,t):Ft(i,t)),n&&Cr(n,i),i}function kn(e,t,n){if(wr(n))return getComputedStyle(e)[t];il(n)||(e.style[t]=""+n)}function pr(e,t){kn(e,"display",t)}function jd(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function En(e,t){return e.getAttribute(t)}function jl(e,t){return e&&e.classList.contains(t)}function $n(e){return e.getBoundingClientRect()}function Ki(e){Pn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Vd(e){return Tr(new DOMParser().parseFromString(e,"text/html").body)}function Qn(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Gd(e,t){return e&&e.querySelector(t)}function al(e,t){return t?Ri(e.querySelectorAll(t)):[]}function ni(e,t){ti(e,t,!1)}function Is(e){return e.timeStamp}function Ni(e){return Ci(e)?e:e?e+"px":""}var Lr="splide",sl="data-"+Lr;function or(e,t){if(!e)throw new Error("["+Lr+"] "+(t||""))}var Ti=Math.min,da=Math.max,ua=Math.floor,mr=Math.ceil,fn=Math.abs;function Xd(e,t,n){return fn(e-t)<n}function oa(e,t,n,i){var o=Ti(t,n),r=da(t,n);return i?o<e&&e<r:o<=e&&e<=r}function co(e,t,n){var i=Ti(t,n),o=da(t,n);return Ti(da(i,e),o)}function Rs(e){return+(e>0)-+(e<0)}function ks(e,t){return Pn(t,function(n){e=e.replace("%s",""+n)}),e}function ll(e){return e<10?"0"+e:""+e}var Vl={};function Rm(e){return""+e+ll(Vl[e]=(Vl[e]||0)+1)}function qd(){var e=[];function t(l,d,c,u){o(l,d,function(p,x,y){var m="addEventListener"in p,g=m?p.removeEventListener.bind(p,x,c,u):p.removeListener.bind(p,c);m?p.addEventListener(x,c,u):p.addListener(c),e.push([p,x,y,c,g])})}function n(l,d,c){o(l,d,function(u,p,x){e=e.filter(function(y){return y[0]===u&&y[1]===p&&y[2]===x&&(!c||y[3]===c)?(y[4](),!1):!0})})}function i(l,d,c){var u,p=!0;return typeof CustomEvent=="function"?u=new CustomEvent(d,{bubbles:p,detail:c}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(d,p,!1,c)),l.dispatchEvent(u),u}function o(l,d,c){Pn(l,function(u){u&&Pn(d,function(p){p.split(" ").forEach(function(x){var y=x.split(".");c(u,y[0],y[1])})})})}function r(){e.forEach(function(l){l[4]()}),ai(e)}return{bind:t,unbind:n,dispatch:i,destroy:r}}var ki="mounted",Es="ready",si="move",Oo="moved",cl="click",Ud="active",Kd="inactive",Yd="visible",Zd="hidden",an="refresh",mn="updated",To="resize",$a="resized",Jd="drag",Qd="dragging",eu="dragged",Ca="scroll",Ji="scrolled",km="overflow",dl="destroy",tu="arrows:mounted",nu="arrows:updated",iu="pagination:mounted",ou="pagination:updated",ul="navigation:mounted",pl="autoplay:play",ru="autoplay:playing",ml="autoplay:pause",gl="lazyload:loaded",au="sk",su="sh",pa="ei";function tn(e){var t=e?e.event.bus:document.createDocumentFragment(),n=qd();function i(r,l){n.bind(t,$r(r).join(" "),function(d){l.apply(l,nl(d.detail)?d.detail:[])})}function o(r){n.dispatch(t,r,Ri(arguments,1))}return e&&e.event.on(dl,n.destroy),ur(n,{bus:t,on:i,off:Jt(n.unbind,t),emit:o})}function Ta(e,t,n,i){var o=Date.now,r,l=0,d,c=!0,u=0;function p(){if(!c){if(l=e?Ti((o()-r)/e,1):1,n&&n(l),l>=1&&(t(),r=o(),i&&++u>=i))return y();d=zl(p)}}function x(E){E||g(),r=o()-(E?l*e:0),c=!1,d=zl(p)}function y(){c=!0}function m(){r=o(),l=0,n&&n(l)}function g(){d&&cancelAnimationFrame(d),l=0,d=0,c=!0}function v(E){e=E}function b(){return c}return{start:x,rewind:m,pause:y,cancel:g,set:v,isPaused:b}}function Em(e){var t=e;function n(o){t=o}function i(o){return ol($r(o),t)}return{set:n,is:i}}function Mm(e,t){var n=Ta(0,e,null,1);return function(){n.isPaused()&&n.start()}}function Am(e,t,n){var i=e.state,o=n.breakpoints||{},r=n.reducedMotion||{},l=qd(),d=[];function c(){var g=n.mediaQuery==="min";dr(o).sort(function(v,b){return g?+v-+b:+b-+v}).forEach(function(v){p(o[v],"("+(g?"min":"max")+"-width:"+v+"px)")}),p(r,Dl),x()}function u(g){g&&l.destroy()}function p(g,v){var b=matchMedia(v);l.bind(b,"change",x),d.push([g,b])}function x(){var g=i.is(ca),v=n.direction,b=d.reduce(function(E,f){return bi(E,f[1].matches?f[0]:{})},{});Bl(n),m(b),n.destroy?e.destroy(n.destroy==="completely"):g?(u(!0),e.mount()):v!==n.direction&&e.refresh()}function y(g){matchMedia(Dl).matches&&(g?bi(n,r):Bl(n,dr(r)))}function m(g,v,b){bi(n,g),v&&bi(Object.getPrototypeOf(n),g),(b||!i.is(go))&&e.emit(mn,n)}return{setup:c,destroy:u,reduce:y,set:m}}var La="Arrow",Pa=La+"Left",Ia=La+"Right",lu=La+"Up",cu=La+"Down",Gl="rtl",Ra="ttb",Da={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[lu,Ia],ArrowRight:[cu,Pa]};function Fm(e,t,n){function i(r,l,d){d=d||n.direction;var c=d===Gl&&!l?1:d===Ra?0:-1;return Da[r]&&Da[r][c]||r.replace(/width|left|right/i,function(u,p){var x=Da[u.toLowerCase()][c]||u;return p>0?x.charAt(0).toUpperCase()+x.slice(1):x})}function o(r){return r*(n.direction===Gl?1:-1)}return{resolve:i,orient:o}}var ii="role",bo="tabindex",Nm="disabled",Mn="aria-",Pr=Mn+"controls",du=Mn+"current",Xl=Mn+"selected",Tn=Mn+"label",hl=Mn+"labelledby",uu=Mn+"hidden",fl=Mn+"orientation",gr=Mn+"roledescription",ql=Mn+"live",Ul=Mn+"busy",Kl=Mn+"atomic",yl=[ii,bo,Nm,Pr,du,Tn,hl,uu,fl,gr],Gn=Lr+"__",Ei="is-",za=Lr,Yl=Gn+"track",_m=Gn+"list",ka=Gn+"slide",pu=ka+"--clone",Hm=ka+"__container",vl=Gn+"arrows",Ea=Gn+"arrow",mu=Ea+"--prev",gu=Ea+"--next",Ma=Gn+"pagination",hu=Ma+"__page",Wm=Gn+"progress",Om=Wm+"__bar",Dm=Gn+"toggle",zm=Gn+"spinner",Bm=Gn+"sr",jm=Ei+"initialized",Yi=Ei+"active",fu=Ei+"prev",yu=Ei+"next",Ms=Ei+"visible",As=Ei+"loading",vu=Ei+"focus-in",xu=Ei+"overflow",Vm=[Yi,Ms,fu,yu,As,vu,xu],Gm={slide:ka,clone:pu,arrows:vl,arrow:Ea,prev:mu,next:gu,pagination:Ma,page:hu,spinner:zm};function Xm(e,t){if(Dd(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!cr(n,t);)n=n.parentElement;return n}var qm=5,Zl=200,bu="touchstart mousedown",Ba="touchmove mousemove",ja="touchend touchcancel mouseup click";function Um(e,t,n){var i=tn(e),o=i.on,r=i.bind,l=e.root,d=n.i18n,c={},u=[],p=[],x=[],y,m,g;function v(){w(),G(),f()}function b(){o(an,E),o(an,v),o(mn,f),r(document,bu+" keydown",function(T){g=T.type==="keydown"},{capture:!0}),r(l,"focusin",function(){ti(l,vu,!!g)})}function E(T){var N=yl.concat("style");ai(u),ni(l,p),ni(y,x),jn([y,m],N),jn(l,T?N:["style",gr])}function f(){ni(l,p),ni(y,x),p=M(za),x=M(Yl),Bn(l,p),Bn(y,x),Ft(l,Tn,n.label),Ft(l,hl,n.labelledby)}function w(){y=X("."+Yl),m=Tr(y,"."+_m),or(y&&m,"A track/list element is missing."),ia(u,Bd(m,"."+ka+":not(."+pu+")")),qi({arrows:vl,pagination:Ma,prev:mu,next:gu,bar:Om,toggle:Dm},function(T,N){c[N]=X("."+T)}),ur(c,{root:l,track:y,list:m,slides:u})}function G(){var T=l.id||Rm(Lr),N=n.role;l.id=T,y.id=y.id||T+"-track",m.id=m.id||T+"-list",!En(l,ii)&&l.tagName!=="SECTION"&&N&&Ft(l,ii,N),Ft(l,gr,d.carousel),Ft(m,ii,"presentation")}function X(T){var N=Gd(l,T);return N&&Xm(N,"."+za)===l?N:void 0}function M(T){return[T+"--"+n.type,T+"--"+n.direction,n.drag&&T+"--draggable",n.isNavigation&&T+"--nav",T===za&&Yi]}return ur(c,{setup:v,mount:b,destroy:E})}var Lo="slide",Do="loop",Ir="fade";function Km(e,t,n,i){var o=tn(e),r=o.on,l=o.emit,d=o.bind,c=e.Components,u=e.root,p=e.options,x=p.isNavigation,y=p.updateOnMove,m=p.i18n,g=p.pagination,v=p.slideFocus,b=c.Direction.resolve,E=En(i,"style"),f=En(i,Tn),w=n>-1,G=Tr(i,"."+Hm),X;function M(){w||(i.id=u.id+"-slide"+ll(t+1),Ft(i,ii,g?"tabpanel":"group"),Ft(i,gr,m.slide),Ft(i,Tn,f||ks(m.slideLabel,[t+1,e.length]))),T()}function T(){d(i,"click",Jt(l,cl,K)),d(i,"keydown",Jt(l,au,K)),r([Oo,su,Ji],I),r(ul,q),y&&r(si,$)}function N(){X=!0,o.destroy(),ni(i,Vm),jn(i,yl),Ft(i,"style",E),Ft(i,Tn,f||"")}function q(){var k=e.splides.map(function(H){var j=H.splide.Components.Slides.getAt(t);return j?j.slide.id:""}).join(" ");Ft(i,Tn,ks(m.slideX,(w?n:t)+1)),Ft(i,Pr,k),Ft(i,ii,v?"button":""),v&&jn(i,gr)}function $(){X||I()}function I(){if(!X){var k=e.index;W(),O(),ti(i,fu,t===k-1),ti(i,yu,t===k+1)}}function W(){var k=L();k!==jl(i,Yi)&&(ti(i,Yi,k),Ft(i,du,x&&k||""),l(k?Ud:Kd,K))}function O(){var k=z(),H=!k&&(!L()||w);if(e.state.is([Wo,Sr])||Ft(i,uu,H||""),Ft(al(i,p.focusableNodes||""),bo,H?-1:""),v&&Ft(i,bo,H?-1:0),k!==jl(i,Ms)&&(ti(i,Ms,k),l(k?Yd:Zd,K)),!k&&document.activeElement===i){var j=c.Slides.getAt(e.index);j&&jd(j.slide)}}function C(k,H,j){kn(j&&G||i,k,H)}function L(){var k=e.index;return k===t||p.cloneStatus&&k===n}function z(){if(e.is(Ir))return L();var k=$n(c.Elements.track),H=$n(i),j=b("left",!0),ne=b("right",!0);return ua(k[j])<=mr(H[j])&&ua(H[ne])<=mr(k[ne])}function S(k,H){var j=fn(k-t);return!w&&(p.rewind||e.is(Do))&&(j=Ti(j,e.length-j)),j<=H}var K={index:t,slideIndex:n,slide:i,container:G,isClone:w,mount:M,destroy:N,update:I,style:C,isWithin:S};return K}function Ym(e,t,n){var i=tn(e),o=i.on,r=i.emit,l=i.bind,d=t.Elements,c=d.slides,u=d.list,p=[];function x(){y(),o(an,m),o(an,y)}function y(){c.forEach(function(I,W){v(I,W,-1)})}function m(){X(function(I){I.destroy()}),ai(p)}function g(){X(function(I){I.update()})}function v(I,W,O){var C=Km(e,W,O,I);C.mount(),p.push(C),p.sort(function(L,z){return L.index-z.index})}function b(I){return I?M(function(W){return!W.isClone}):p}function E(I){var W=t.Controller,O=W.toIndex(I),C=W.hasFocus()?1:n.perPage;return M(function(L){return oa(L.index,O,O+C-1)})}function f(I){return M(I)[0]}function w(I,W){Pn(I,function(O){if(Ci(O)&&(O=Vd(O)),zd(O)){var C=c[W];C?rl(O,C):Cr(u,O),Bn(O,n.classes.slide),N(O,Jt(r,To))}}),r(an)}function G(I){Ki(M(I).map(function(W){return W.slide})),r(an)}function X(I,W){b(W).forEach(I)}function M(I){return p.filter(Dd(I)?I:function(W){return Ci(I)?cr(W.slide,I):ol($r(I),W.index)})}function T(I,W,O){X(function(C){C.style(I,W,O)})}function N(I,W){var O=al(I,"img"),C=O.length;C?O.forEach(function(L){l(L,"load error",function(){--C||W()})}):W()}function q(I){return I?c.length:p.length}function $(){return p.length>n.perPage}return{mount:x,destroy:m,update:g,register:v,get:b,getIn:E,getAt:f,add:w,remove:G,forEach:X,filter:M,style:T,getLength:q,isEnough:$}}function Zm(e,t,n){var i=tn(e),o=i.on,r=i.bind,l=i.emit,d=t.Slides,c=t.Direction.resolve,u=t.Elements,p=u.root,x=u.track,y=u.list,m=d.getAt,g=d.style,v,b,E;function f(){w(),r(window,"resize load",Mm(Jt(l,To))),o([mn,an],w),o(To,G)}function w(){v=n.direction===Ra,kn(p,"maxWidth",Ni(n.width)),kn(x,c("paddingLeft"),X(!1)),kn(x,c("paddingRight"),X(!0)),G(!0)}function G(K){var k=$n(p);(K||b.width!==k.width||b.height!==k.height)&&(kn(x,"height",M()),g(c("marginRight"),Ni(n.gap)),g("width",N()),g("height",q(),!0),b=k,l($a),E!==(E=S())&&(ti(p,xu,E),l(km,E)))}function X(K){var k=n.padding,H=c(K?"right":"left");return k&&Ni(k[H]||(lr(k)?0:k))||"0px"}function M(){var K="";return v&&(K=T(),or(K,"height or heightRatio is missing."),K="calc("+K+" - "+X(!1)+" - "+X(!0)+")"),K}function T(){return Ni(n.height||$n(y).width*n.heightRatio)}function N(){return n.autoWidth?null:Ni(n.fixedWidth)||(v?"":$())}function q(){return Ni(n.fixedHeight)||(v?n.autoHeight?null:$():T())}function $(){var K=Ni(n.gap);return"calc((100%"+(K&&" + "+K)+")/"+(n.perPage||1)+(K&&" - "+K)+")"}function I(){return $n(y)[c("width")]}function W(K,k){var H=m(K||0);return H?$n(H.slide)[c("width")]+(k?0:L()):0}function O(K,k){var H=m(K);if(H){var j=$n(H.slide)[c("right")],ne=$n(y)[c("left")];return fn(j-ne)+(k?0:L())}return 0}function C(K){return O(e.length-1)-O(0)+W(0,K)}function L(){var K=m(0);return K&&parseFloat(kn(K.slide,c("marginRight")))||0}function z(K){return parseFloat(kn(x,c("padding"+(K?"Right":"Left"))))||0}function S(){return e.is(Ir)||C(!0)>I()}return{mount:f,resize:G,listSize:I,slideSize:W,sliderSize:C,totalSize:O,getPadding:z,isOverflow:S}}var Jm=2;function Qm(e,t,n){var i=tn(e),o=i.on,r=t.Elements,l=t.Slides,d=t.Direction.resolve,c=[],u;function p(){o(an,x),o([mn,To],m),(u=b())&&(g(u),t.Layout.resize(!0))}function x(){y(),p()}function y(){Ki(c),ai(c),i.destroy()}function m(){var E=b();u!==E&&(u<E||!E)&&i.emit(an)}function g(E){var f=l.get().slice(),w=f.length;if(w){for(;f.length<E;)ia(f,f);ia(f.slice(-E),f.slice(0,E)).forEach(function(G,X){var M=X<E,T=v(G.slide,X);M?rl(T,f[0].slide):Cr(r.list,T),ia(c,T),l.register(T,X-E+(M?0:w),G.index)})}}function v(E,f){var w=E.cloneNode(!0);return Bn(w,n.classes.clone),w.id=e.root.id+"-clone"+ll(f+1),w}function b(){var E=n.clones;if(!e.is(Do))E=0;else if(wr(E)){var f=n[d("fixedWidth")]&&t.Layout.slideSize(0),w=f&&mr($n(r.track)[d("width")]/f);E=w||n[d("autoWidth")]&&e.length||n.perPage*Jm}return E}return{mount:p,destroy:y}}function eg(e,t,n){var i=tn(e),o=i.on,r=i.emit,l=e.state.set,d=t.Layout,c=d.slideSize,u=d.getPadding,p=d.totalSize,x=d.listSize,y=d.sliderSize,m=t.Direction,g=m.resolve,v=m.orient,b=t.Elements,E=b.list,f=b.track,w;function G(){w=t.Transition,o([ki,$a,mn,an],X)}function X(){t.Controller.isBusy()||(t.Scroll.cancel(),T(e.index),t.Slides.update())}function M(H,j,ne,oe){H!==j&&K(H>ne)&&(I(),N($(C(),H>ne),!0)),l(Wo),r(si,j,ne,H),w.start(j,function(){l(Co),r(Oo,j,ne,H),oe&&oe()})}function T(H){N(O(H,!0))}function N(H,j){if(!e.is(Ir)){var ne=j?H:q(H);kn(E,"transform","translate"+g("X")+"("+ne+"px)"),H!==ne&&r(su)}}function q(H){if(e.is(Do)){var j=W(H),ne=j>t.Controller.getEnd(),oe=j<0;(oe||ne)&&(H=$(H,ne))}return H}function $(H,j){var ne=H-S(j),oe=y();return H-=v(oe*(mr(fn(ne)/oe)||1))*(j?1:-1),H}function I(){N(C(),!0),w.cancel()}function W(H){for(var j=t.Slides.get(),ne=0,oe=1/0,R=0;R<j.length;R++){var ce=j[R].index,D=fn(O(ce,!0)-H);if(D<=oe)oe=D,ne=ce;else break}return ne}function O(H,j){var ne=v(p(H-1)-z(H));return j?L(ne):ne}function C(){var H=g("left");return $n(E)[H]-$n(f)[H]+v(u(!1))}function L(H){return n.trimSpace&&e.is(Lo)&&(H=co(H,0,v(y(!0)-x()))),H}function z(H){var j=n.focus;return j==="center"?(x()-c(H,!0))/2:+j*c(H)||0}function S(H){return O(H?t.Controller.getEnd():0,!!n.trimSpace)}function K(H){var j=v($(C(),H));return H?j>=0:j<=E[g("scrollWidth")]-$n(f)[g("width")]}function k(H,j){j=wr(j)?C():j;var ne=H!==!0&&v(j)<v(S(!1)),oe=H!==!1&&v(j)>v(S(!0));return ne||oe}return{mount:G,move:M,jump:T,translate:N,shift:$,cancel:I,toIndex:W,toPosition:O,getPosition:C,getLimit:S,exceededLimit:k,reposition:X}}function tg(e,t,n){var i=tn(e),o=i.on,r=i.emit,l=t.Move,d=l.getPosition,c=l.getLimit,u=l.toPosition,p=t.Slides,x=p.isEnough,y=p.getLength,m=n.omitEnd,g=e.is(Do),v=e.is(Lo),b=Jt(C,!1),E=Jt(C,!0),f=n.start||0,w,G=f,X,M,T;function N(){q(),o([mn,an,pa],q),o($a,$)}function q(){X=y(!0),M=n.perMove,T=n.perPage,w=K();var D=co(f,0,m?w:X-1);D!==f&&(f=D,l.reposition())}function $(){w!==K()&&r(pa)}function I(D,le,ie){if(!ce()){var we=O(D),Ie=S(we);Ie>-1&&(le||Ie!==f)&&(ne(Ie),l.move(we,Ie,G,ie))}}function W(D,le,ie,we){t.Scroll.scroll(D,le,ie,function(){var Ie=S(l.toIndex(d()));ne(m?Ti(Ie,w):Ie),we&&we()})}function O(D){var le=f;if(Ci(D)){var ie=D.match(/([+\-<>])(\d+)?/)||[],we=ie[1],Ie=ie[2];we==="+"||we==="-"?le=L(f+ +(""+we+(+Ie||1)),f):we===">"?le=Ie?k(+Ie):b(!0):we==="<"&&(le=E(!0))}else le=g?D:co(D,0,w);return le}function C(D,le){var ie=M||(R()?1:T),we=L(f+ie*(D?-1:1),f,!(M||R()));return we===-1&&v&&!Xd(d(),c(!D),1)?D?0:w:le?we:S(we)}function L(D,le,ie){if(x()||R()){var we=z(D);we!==D&&(le=D,D=we,ie=!1),D<0||D>w?!M&&(oa(0,D,le,!0)||oa(w,le,D,!0))?D=k(H(D)):g?D=ie?D<0?-(X%T||T):X:D:n.rewind?D=D<0?w:0:D=-1:ie&&D!==le&&(D=k(H(le)+(D<le?-1:1)))}else D=-1;return D}function z(D){if(v&&n.trimSpace==="move"&&D!==f)for(var le=d();le===u(D,!0)&&oa(D,0,e.length-1,!n.rewind);)D<f?--D:++D;return D}function S(D){return g?(D+X)%X||0:D}function K(){for(var D=X-(R()||g&&M?1:T);m&&D-- >0;)if(u(X-1,!0)!==u(D,!0)){D++;break}return co(D,0,X-1)}function k(D){return co(R()?D:T*D,0,w)}function H(D){return R()?Ti(D,w):ua((D>=w?X-1:D)/T)}function j(D){var le=l.toIndex(D);return v?co(le,0,w):le}function ne(D){D!==f&&(G=f,f=D)}function oe(D){return D?G:f}function R(){return!wr(n.focus)||n.isNavigation}function ce(){return e.state.is([Wo,Sr])&&!!n.waitForTransition}return{mount:N,go:I,scroll:W,getNext:b,getPrev:E,getAdjacent:C,getEnd:K,setIndex:ne,getIndex:oe,toIndex:k,toPage:H,toDest:j,hasFocus:R,isBusy:ce}}var ng="http://www.w3.org/2000/svg",ig="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",Mr=40;function og(e,t,n){var i=tn(e),o=i.on,r=i.bind,l=i.emit,d=n.classes,c=n.i18n,u=t.Elements,p=t.Controller,x=u.arrows,y=u.track,m=x,g=u.prev,v=u.next,b,E,f={};function w(){X(),o(mn,G)}function G(){M(),w()}function X(){var W=n.arrows;W&&!(g&&v)&&q(),g&&v&&(ur(f,{prev:g,next:v}),pr(m,W?"":"none"),Bn(m,E=vl+"--"+n.direction),W&&(T(),I(),Ft([g,v],Pr,y.id),l(tu,g,v)))}function M(){i.destroy(),ni(m,E),b?(Ki(x?[g,v]:m),g=v=null):jn([g,v],yl)}function T(){o([ki,Oo,an,Ji,pa],I),r(v,"click",Jt(N,">")),r(g,"click",Jt(N,"<"))}function N(W){p.go(W,!0)}function q(){m=x||xo("div",d.arrows),g=$(!0),v=$(!1),b=!0,Cr(m,[g,v]),!x&&rl(m,y)}function $(W){var O='<button class="'+d.arrow+" "+(W?d.prev:d.next)+'" type="button"><svg xmlns="'+ng+'" viewBox="0 0 '+Mr+" "+Mr+'" width="'+Mr+'" height="'+Mr+'" focusable="false"><path d="'+(n.arrowPath||ig)+'" />';return Vd(O)}function I(){if(g&&v){var W=e.index,O=p.getPrev(),C=p.getNext(),L=O>-1&&W<O?c.last:c.prev,z=C>-1&&W>C?c.first:c.next;g.disabled=O<0,v.disabled=C<0,Ft(g,Tn,L),Ft(v,Tn,z),l(nu,g,v,O,C)}}return{arrows:f,mount:w,destroy:M,update:I}}var rg=sl+"-interval";function ag(e,t,n){var i=tn(e),o=i.on,r=i.bind,l=i.emit,d=Ta(n.interval,e.go.bind(e,">"),T),c=d.isPaused,u=t.Elements,p=t.Elements,x=p.root,y=p.toggle,m=n.autoplay,g,v,b=m==="pause";function E(){m&&(f(),y&&Ft(y,Pr,u.track.id),b||w(),M())}function f(){n.pauseOnHover&&r(x,"mouseenter mouseleave",function(q){g=q.type==="mouseenter",X()}),n.pauseOnFocus&&r(x,"focusin focusout",function(q){v=q.type==="focusin",X()}),y&&r(y,"click",function(){b?w():G(!0)}),o([si,Ca,an],d.rewind),o(si,N)}function w(){c()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),v=g=b=!1,M(),l(pl))}function G(q){q===void 0&&(q=!0),b=!!q,M(),c()||(d.pause(),l(ml))}function X(){b||(g||v?G(!1):w())}function M(){y&&(ti(y,Yi,!b),Ft(y,Tn,n.i18n[b?"play":"pause"]))}function T(q){var $=u.bar;$&&kn($,"width",q*100+"%"),l(ru,q)}function N(q){var $=t.Slides.getAt(q);d.set($&&+En($.slide,rg)||n.interval)}return{mount:E,destroy:d.cancel,play:w,pause:G,isPaused:c}}function sg(e,t,n){var i=tn(e),o=i.on;function r(){n.cover&&(o(gl,Jt(d,!0)),o([ki,mn,an],Jt(l,!0)))}function l(c){t.Slides.forEach(function(u){var p=Tr(u.container||u.slide,"img");p&&p.src&&d(c,p,u)})}function d(c,u,p){p.style("background",c?'center/cover no-repeat url("'+u.src+'")':"",!0),pr(u,c?"none":"")}return{mount:r,destroy:Jt(l,!1)}}var lg=10,cg=600,dg=.6,ug=1.5,pg=800;function mg(e,t,n){var i=tn(e),o=i.on,r=i.emit,l=e.state.set,d=t.Move,c=d.getPosition,u=d.getLimit,p=d.exceededLimit,x=d.translate,y=e.is(Lo),m,g,v=1;function b(){o(si,G),o([mn,an],X)}function E(T,N,q,$,I){var W=c();if(G(),q&&(!y||!p())){var O=t.Layout.sliderSize(),C=Rs(T)*O*ua(fn(T)/O)||0;T=d.toPosition(t.Controller.toDest(T%O))+C}var L=Xd(W,T,1);v=1,N=L?0:N||da(fn(T-W)/ug,pg),g=$,m=Ta(N,f,Jt(w,W,T,I),1),l(Sr),r(Ca),m.start()}function f(){l(Co),g&&g(),r(Ji)}function w(T,N,q,$){var I=c(),W=T+(N-T)*M($),O=(W-I)*v;x(I+O),y&&!q&&p()&&(v*=dg,fn(O)<lg&&E(u(p(!0)),cg,!1,g,!0))}function G(){m&&m.cancel()}function X(){m&&!m.isPaused()&&(G(),f())}function M(T){var N=n.easingFunc;return N?N(T):1-Math.pow(1-T,4)}return{mount:b,destroy:G,scroll:E,cancel:X}}var uo={passive:!1,capture:!0};function gg(e,t,n){var i=tn(e),o=i.on,r=i.emit,l=i.bind,d=i.unbind,c=e.state,u=t.Move,p=t.Scroll,x=t.Controller,y=t.Elements.track,m=t.Media.reduce,g=t.Direction,v=g.resolve,b=g.orient,E=u.getPosition,f=u.exceededLimit,w,G,X,M,T,N=!1,q,$,I;function W(){l(y,Ba,Ps,uo),l(y,ja,Ps,uo),l(y,bu,C,uo),l(y,"click",S,{capture:!0}),l(y,"dragstart",Qn),o([ki,mn],O)}function O(){var Y=n.drag;pe(!Y),M=Y==="free"}function C(Y){if(q=!1,!$){var ae=Ie(Y);we(Y.target)&&(ae||!Y.button)&&(x.isBusy()?Qn(Y,!0):(I=ae?y:window,T=c.is([Wo,Sr]),X=null,l(I,Ba,L,uo),l(I,ja,z,uo),u.cancel(),p.cancel(),K(Y)))}}function L(Y){if(c.is(na)||(c.set(na),r(Jd)),Y.cancelable)if(T){u.translate(w+ie(R(Y)));var ae=ce(Y)>Zl,se=N!==(N=f());(ae||se)&&K(Y),q=!0,r(Qd),Qn(Y)}else j(Y)&&(T=H(Y),Qn(Y))}function z(Y){c.is(na)&&(c.set(Co),r(eu)),T&&(k(Y),Qn(Y)),d(I,Ba,L),d(I,ja,z),T=!1}function S(Y){!$&&q&&Qn(Y,!0)}function K(Y){X=G,G=Y,w=E()}function k(Y){var ae=ne(Y),se=oe(ae),Re=n.rewind&&n.rewindByDrag;m(!1),M?x.scroll(se,0,n.snap):e.is(Ir)?x.go(b(Rs(ae))<0?Re?"<":"-":Re?">":"+"):e.is(Lo)&&N&&Re?x.go(f(!0)?">":"<"):x.go(x.toDest(se),!0),m(!0)}function H(Y){var ae=n.dragMinThreshold,se=lr(ae),Re=se&&ae.mouse||0,$e=(se?ae.touch:+ae)||10;return fn(R(Y))>(Ie(Y)?$e:Re)}function j(Y){return fn(R(Y))>fn(R(Y,!0))}function ne(Y){if(e.is(Do)||!N){var ae=ce(Y);if(ae&&ae<Zl)return R(Y)/ae}return 0}function oe(Y){return E()+Rs(Y)*Ti(fn(Y)*(n.flickPower||600),M?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function R(Y,ae){return le(Y,ae)-le(D(Y),ae)}function ce(Y){return Is(Y)-Is(D(Y))}function D(Y){return G===Y&&X||G}function le(Y,ae){return(Ie(Y)?Y.changedTouches[0]:Y)["page"+v(ae?"Y":"X")]}function ie(Y){return Y/(N&&e.is(Lo)?qm:1)}function we(Y){var ae=n.noDrag;return!cr(Y,"."+hu+", ."+Ea)&&(!ae||!cr(Y,ae))}function Ie(Y){return typeof TouchEvent<"u"&&Y instanceof TouchEvent}function xe(){return T}function pe(Y){$=Y}return{mount:W,disable:pe,isDragging:xe}}var hg={Spacebar:" ",Right:Ia,Left:Pa,Up:lu,Down:cu};function xl(e){return e=Ci(e)?e:e.key,hg[e]||e}var Jl="keydown";function fg(e,t,n){var i=tn(e),o=i.on,r=i.bind,l=i.unbind,d=e.root,c=t.Direction.resolve,u,p;function x(){y(),o(mn,m),o(mn,y),o(si,v)}function y(){var E=n.keyboard;E&&(u=E==="global"?window:d,r(u,Jl,b))}function m(){l(u,Jl)}function g(E){p=E}function v(){var E=p;p=!0,Od(function(){p=E})}function b(E){if(!p){var f=xl(E);f===c(Pa)?e.go("<"):f===c(Ia)&&e.go(">")}}return{mount:x,destroy:m,disable:g}}var rr=sl+"-lazy",ra=rr+"-srcset",yg="["+rr+"], ["+ra+"]";function vg(e,t,n){var i=tn(e),o=i.on,r=i.off,l=i.bind,d=i.emit,c=n.lazyLoad==="sequential",u=[Oo,Ji],p=[];function x(){n.lazyLoad&&(y(),o(an,y))}function y(){ai(p),m(),c?E():(r(u),o(u,g),g())}function m(){t.Slides.forEach(function(f){al(f.slide,yg).forEach(function(w){var G=En(w,rr),X=En(w,ra);if(G!==w.src||X!==w.srcset){var M=n.classes.spinner,T=w.parentElement,N=Tr(T,"."+M)||xo("span",M,T);p.push([w,f,N]),w.src||pr(w,"none")}})})}function g(){p=p.filter(function(f){var w=n.perPage*((n.preloadPages||1)+1)-1;return f[1].isWithin(e.index,w)?v(f):!0}),p.length||r(u)}function v(f){var w=f[0];Bn(f[1].slide,As),l(w,"load error",Jt(b,f)),Ft(w,"src",En(w,rr)),Ft(w,"srcset",En(w,ra)),jn(w,rr),jn(w,ra)}function b(f,w){var G=f[0],X=f[1];ni(X.slide,As),w.type!=="error"&&(Ki(f[2]),pr(G,""),d(gl,G,X),d(To)),c&&E()}function E(){p.length&&v(p.shift())}return{mount:x,destroy:Jt(ai,p),check:g}}function xg(e,t,n){var i=tn(e),o=i.on,r=i.emit,l=i.bind,d=t.Slides,c=t.Elements,u=t.Controller,p=u.hasFocus,x=u.getIndex,y=u.go,m=t.Direction.resolve,g=c.pagination,v=[],b,E;function f(){w(),o([mn,an,pa],f);var $=n.pagination;g&&pr(g,$?"":"none"),$&&(o([si,Ca,Ji],q),G(),q(),r(iu,{list:b,items:v},N(e.index)))}function w(){b&&(Ki(g?Ri(b.children):b),ni(b,E),ai(v),b=null),i.destroy()}function G(){var $=e.length,I=n.classes,W=n.i18n,O=n.perPage,C=p()?u.getEnd()+1:mr($/O);b=g||xo("ul",I.pagination,c.track.parentElement),Bn(b,E=Ma+"--"+T()),Ft(b,ii,"tablist"),Ft(b,Tn,W.select),Ft(b,fl,T()===Ra?"vertical":"");for(var L=0;L<C;L++){var z=xo("li",null,b),S=xo("button",{class:I.page,type:"button"},z),K=d.getIn(L).map(function(H){return H.slide.id}),k=!p()&&O>1?W.pageX:W.slideX;l(S,"click",Jt(X,L)),n.paginationKeyboard&&l(S,"keydown",Jt(M,L)),Ft(z,ii,"presentation"),Ft(S,ii,"tab"),Ft(S,Pr,K.join(" ")),Ft(S,Tn,ks(k,L+1)),Ft(S,bo,-1),v.push({li:z,button:S,page:L})}}function X($){y(">"+$,!0)}function M($,I){var W=v.length,O=xl(I),C=T(),L=-1;O===m(Ia,!1,C)?L=++$%W:O===m(Pa,!1,C)?L=(--$+W)%W:O==="Home"?L=0:O==="End"&&(L=W-1);var z=v[L];z&&(jd(z.button),y(">"+L),Qn(I,!0))}function T(){return n.paginationDirection||n.direction}function N($){return v[u.toPage($)]}function q(){var $=N(x(!0)),I=N(x());if($){var W=$.button;ni(W,Yi),jn(W,Xl),Ft(W,bo,-1)}if(I){var O=I.button;Bn(O,Yi),Ft(O,Xl,!0),Ft(O,bo,"")}r(ou,{list:b,items:v},$,I)}return{items:v,mount:f,destroy:w,getAt:N,update:q}}var bg=[" ","Enter"];function Sg(e,t,n){var i=n.isNavigation,o=n.slideFocus,r=[];function l(){e.splides.forEach(function(g){g.isParent||(u(e,g.splide),u(g.splide,e))}),i&&p()}function d(){r.forEach(function(g){g.destroy()}),ai(r)}function c(){d(),l()}function u(g,v){var b=tn(g);b.on(si,function(E,f,w){v.go(v.is(Do)?w:E)}),r.push(b)}function p(){var g=tn(e),v=g.on;v(cl,y),v(au,m),v([ki,mn],x),r.push(g),g.emit(ul,e.splides)}function x(){Ft(t.Elements.list,fl,n.direction===Ra?"vertical":"")}function y(g){e.go(g.index)}function m(g,v){ol(bg,xl(v))&&(y(g),Qn(v))}return{setup:Jt(t.Media.set,{slideFocus:wr(o)?i:o},!0),mount:l,destroy:d,remount:c}}function wg(e,t,n){var i=tn(e),o=i.bind,r=0;function l(){n.wheel&&o(t.Elements.track,"wheel",d,uo)}function d(u){if(u.cancelable){var p=u.deltaY,x=p<0,y=Is(u),m=n.wheelMinThreshold||0,g=n.wheelSleep||0;fn(p)>m&&y-r>g&&(e.go(x?"<":">"),r=y),c(x)&&Qn(u)}}function c(u){return!n.releaseWheel||e.state.is(Wo)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var $g=90;function Cg(e,t,n){var i=tn(e),o=i.on,r=t.Elements.track,l=n.live&&!n.isNavigation,d=xo("span",Bm),c=Ta($g,Jt(p,!1));function u(){l&&(y(!t.Autoplay.isPaused()),Ft(r,Kl,!0),d.textContent="…",o(pl,Jt(y,!0)),o(ml,Jt(y,!1)),o([Oo,Ji],Jt(p,!0)))}function p(m){Ft(r,Ul,m),m?(Cr(r,d),c.start()):(Ki(d),c.cancel())}function x(){jn(r,[ql,Kl,Ul]),Ki(d)}function y(m){l&&Ft(r,ql,m?"off":"polite")}return{mount:u,disable:y,destroy:x}}var Tg=Object.freeze({__proto__:null,Media:Am,Direction:Fm,Elements:Um,Slides:Ym,Layout:Zm,Clones:Qm,Move:eg,Controller:tg,Arrows:og,Autoplay:ag,Cover:sg,Scroll:mg,Drag:gg,Keyboard:fg,LazyLoad:vg,Pagination:xg,Sync:Sg,Wheel:wg,Live:Cg}),Lg={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"},Pg={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:Gm,i18n:Lg,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Ig(e,t,n){var i=t.Slides;function o(){tn(e).on([ki,an],r)}function r(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function l(d,c){i.style("transition","opacity "+n.speed+"ms "+n.easing),Od(c)}return{mount:o,start:l,cancel:Ps}}function Rg(e,t,n){var i=t.Move,o=t.Controller,r=t.Scroll,l=t.Elements.list,d=Jt(kn,l,"transition"),c;function u(){tn(e).bind(l,"transitionend",function(m){m.target===l&&c&&(x(),c())})}function p(m,g){var v=i.toPosition(m,!0),b=i.getPosition(),E=y(m);fn(v-b)>=1&&E>=1?n.useScroll?r.scroll(v,E,!1,g):(d("transform "+E+"ms "+n.easing),i.translate(v,!0),c=g):(i.jump(m),g())}function x(){d(""),r.cancel()}function y(m){var g=n.rewindSpeed;if(e.is(Lo)&&g){var v=o.getIndex(!0),b=o.getEnd();if(v===0&&m>=b||v>=b&&m===0)return g}return n.speed}return{mount:u,start:p,cancel:x}}var kg=(function(){function e(n,i){this.event=tn(),this.Components={},this.state=Em(go),this.splides=[],this._o={},this._E={};var o=Ci(n)?Gd(document,n):n;or(o,o+" is invalid."),this.root=o,i=bi({label:En(o,Tn)||"",labelledby:En(o,hl)||""},Pg,e.defaults,i||{});try{bi(i,JSON.parse(En(o,sl)))}catch{or(!1,"Invalid JSON")}this._o=Object.create(bi({},i))}var t=e.prototype;return t.mount=function(i,o){var r=this,l=this.state,d=this.Components;or(l.is([go,ca]),"Already mounted!"),l.set(go),this._C=d,this._T=o||this._T||(this.is(Ir)?Ig:Rg),this._E=i||this._E;var c=ur({},Tg,this._E,{Transition:this._T});return qi(c,function(u,p){var x=u(r,d,r._o);d[p]=x,x.setup&&x.setup()}),qi(d,function(u){u.mount&&u.mount()}),this.emit(ki),Bn(this.root,jm),l.set(Co),this.emit(Es),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(Co)&&(this._C.Sync.remount(),i.Components.Sync.remount()),this},t.go=function(i){return this._C.Controller.go(i),this},t.on=function(i,o){return this.event.on(i,o),this},t.off=function(i){return this.event.off(i),this},t.emit=function(i){var o;return(o=this.event).emit.apply(o,[i].concat(Ri(arguments,1))),this},t.add=function(i,o){return this._C.Slides.add(i,o),this},t.remove=function(i){return this._C.Slides.remove(i),this},t.is=function(i){return this._o.type===i},t.refresh=function(){return this.emit(an),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,r=this.state;return r.is(go)?tn(this).on(Es,this.destroy.bind(this,i)):(qi(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(dl),o.destroy(),i&&ai(this.splides),r.set(ca)),this},Lm(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})(),bl=kg;bl.defaults={};bl.STATES=Im;var Ql=[[ki,"onMounted"],[Es,"onReady"],[si,"onMove"],[Oo,"onMoved"],[cl,"onClick"],[Ud,"onActive"],[Kd,"onInactive"],[Yd,"onVisible"],[Zd,"onHidden"],[an,"onRefresh"],[mn,"onUpdated"],[To,"onResize"],[$a,"onResized"],[Jd,"onDrag"],[Qd,"onDragging"],[eu,"onDragged"],[Ca,"onScroll"],[Ji,"onScrolled"],[dl,"onDestroy"],[tu,"onArrowsMounted"],[nu,"onArrowsUpdated"],[iu,"onPaginationMounted"],[ou,"onPaginationUpdated"],[ul,"onNavigationMounted"],[pl,"onAutoplayPlay"],[ru,"onAutoplayPlaying"],[ml,"onAutoplayPause"],[gl,"onLazyLoadLoaded"]];function Sl(...e){return e.filter(Boolean).join(" ")}function ma(e){return e!==null&&typeof e=="object"}function Fs(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!Fs(n,t[i]));if(ma(e)&&ma(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!Fs(e[o],t[o]))}return e===t}function Eg(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function Mg(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 Ns(e,t){const n=e;return Mg(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():ma(i)?n[o]=Ns(ma(n[o])?n[o]:{},i):n[o]=i}),n}var Ag=({children:e,className:t,...n})=>s.createElement("div",{className:Sl("splide__track",t),...n},s.createElement("ul",{className:"splide__list"},e)),wl=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 bl(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Ns({},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&&!Fs(this.options,e)&&(this.splide.options=e,this.options=Ns({},e));const t=this.getSlides();Eg(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){Ql.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:Sl("splide",e),ref:this.splideRef,...this.omit(o,["options",...Ql.map(r=>r[1])])},n?s.createElement(Ag,null,i):i)}},$l=({children:e,className:t,...n})=>s.createElement("li",{className:Sl("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("react"),Lt=require("classnames"),F=require("./panelAvailability-D8c7cdbu.js"),Gn=require("react-dom");function Np(e){return e.type==="object"&&e.version===1}const _p="ControlSlider-module__wrapper___sHEkd",Hp="ControlSlider-module__hoverArrow___A-dOH",Wp="ControlSlider-module__sliderItem___QQSkR",Op="ControlSlider-module__sliderImage___9hRl-",Dp="ControlSlider-module__arrow___05ghY",zp="ControlSlider-module__arrowVertical___tBfVN",Bp="ControlSlider-module__nextArrow___-30Yc",jp="ControlSlider-module__arrowInner___aEra3",Vp="ControlSlider-module__arrowIcon___S4ztF",Gp="ControlSlider-module__arrowImg___2dwJW",Xp="ControlSlider-module__mirror___brd6U",qp="ControlSlider-module__pagination___bicLF",Up="ControlSlider-module__paginationInner___bT-P-",Kp="ControlSlider-module__paginationVertical___zYqKw",Yp="ControlSlider-module__paginationItem___nTRbk",Zp="ControlSlider-module__dot___p1Qun",Jp="ControlSlider-module__activeDot___LHFaj",Qp="ControlSlider-module__paginationInsideBottom___R3FWn",em="ControlSlider-module__paginationInsideTop___V-qb-",tm="ControlSlider-module__paginationOutsideBottom___14w8D",nm="ControlSlider-module__paginationOutsideTop___SCLqB",im="ControlSlider-module__paginationInsideLeft___yOBRZ",om="ControlSlider-module__paginationInsideRight___Rtt3o",rm="ControlSlider-module__paginationOutsideLeft___lahaw",am="ControlSlider-module__paginationOutsideRight___EtuQa",sm="ControlSlider-module__imgWrapper___UjEgB",lm="ControlSlider-module__captionBlock___dJ6-j",cm="ControlSlider-module__captionTextWrapper___HFlpf",dm="ControlSlider-module__captionText___uGBVc",um="ControlSlider-module__active___WZK4G",pm="ControlSlider-module__withPointerEvents___t-18M",mm="ControlSlider-module__topLeftAlignment___zjnGM",gm="ControlSlider-module__topCenterAlignment___gD1xW",hm="ControlSlider-module__topRightAlignment___NMapS",fm="ControlSlider-module__middleLeftAlignment___OnUrY",ym="ControlSlider-module__middleCenterAlignment___Tdkl0",vm="ControlSlider-module__middleRightAlignment___wEbfX",xm="ControlSlider-module__bottomLeftAlignment___cTP2-",bm="ControlSlider-module__bottomCenterAlignment___c54fB",Sm="ControlSlider-module__bottomRightAlignment___kEwrz",wm="ControlSlider-module__clickOverlay___DZA28",$m="ControlSlider-module__contain___pLyq7",Cm="ControlSlider-module__cover___KdDat",Ct={wrapper:_p,hoverArrow:Hp,sliderItem:Wp,sliderImage:Op,arrow:Dp,arrowVertical:zp,nextArrow:Bp,arrowInner:jp,arrowIcon:Vp,arrowImg:Gp,mirror:Xp,pagination:qp,paginationInner:Up,paginationVertical:Kp,paginationItem:Yp,dot:Zp,activeDot:Jp,paginationInsideBottom:Qp,paginationInsideTop:em,paginationOutsideBottom:tm,paginationOutsideTop:nm,paginationInsideLeft:im,paginationInsideRight:om,paginationOutsideLeft:rm,paginationOutsideRight:am,imgWrapper:sm,captionBlock:lm,captionTextWrapper:cm,captionText:dm,active:um,withPointerEvents:pm,topLeftAlignment:mm,topCenterAlignment:gm,topRightAlignment:hm,middleLeftAlignment:fm,middleCenterAlignment:ym,middleRightAlignment:vm,bottomLeftAlignment:xm,bottomCenterAlignment:bm,bottomRightAlignment:Sm,clickOverlay:wm,contain:$m,cover:Cm};function Tm(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 Lm(e,t,n){return t&&Tm(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Dl="(prefers-reduced-motion: reduce)",go=1,Pm=2,Co=3,Wo=4,Sr=5,na=6,ca=7,Im={CREATED:go,MOUNTED:Pm,IDLE:Co,MOVING:Wo,SCROLLING:Sr,DRAGGING:na,DESTROYED:ca};function si(e){e.length=0}function Ri(e,t,n){return Array.prototype.slice.call(e,t,n)}function Jt(e){return e.bind.apply(e,[null].concat(Ri(arguments,1)))}var Od=setTimeout,Ps=function(){};function zl(e){return requestAnimationFrame(e)}function wa(e,t){return typeof t===e}function lr(e){return!il(e)&&wa("object",e)}var nl=Array.isArray,Dd=Jt(wa,"function"),Ci=Jt(wa,"string"),wr=Jt(wa,"undefined");function il(e){return e===null}function zd(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function $r(e){return nl(e)?e:[e]}function Pn(e,t){$r(e).forEach(t)}function ol(e,t){return e.indexOf(t)>-1}function ia(e,t){return e.push.apply(e,$r(t)),e}function ni(e,t,n){e&&Pn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Bn(e,t){ni(e,Ci(t)?t.split(" "):t,!0)}function Cr(e,t){Pn(t,e.appendChild.bind(e))}function rl(e,t){Pn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function cr(e,t){return zd(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Bd(e,t){var n=e?Ri(e.children):[];return t?n.filter(function(i){return cr(i,t)}):n}function Tr(e,t){return t?Bd(e,t)[0]:e.firstElementChild}var dr=Object.keys;function qi(e,t,n){return e&&(n?dr(e).reverse():dr(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function ur(e){return Ri(arguments,1).forEach(function(t){qi(t,function(n,i){e[i]=t[i]})}),e}function bi(e){return Ri(arguments,1).forEach(function(t){qi(t,function(n,i){nl(n)?e[i]=n.slice():lr(n)?e[i]=bi({},lr(e[i])?e[i]:{},n):e[i]=n})}),e}function Bl(e,t){Pn(t||dr(e),function(n){delete e[n]})}function jn(e,t){Pn(e,function(n){Pn(t,function(i){n&&n.removeAttribute(i)})})}function Ft(e,t,n){lr(t)?qi(t,function(i,o){Ft(e,o,i)}):Pn(e,function(i){il(n)||n===""?jn(i,t):i.setAttribute(t,String(n))})}function xo(e,t,n){var i=document.createElement(e);return t&&(Ci(t)?Bn(i,t):Ft(i,t)),n&&Cr(n,i),i}function kn(e,t,n){if(wr(n))return getComputedStyle(e)[t];il(n)||(e.style[t]=""+n)}function pr(e,t){kn(e,"display",t)}function jd(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function En(e,t){return e.getAttribute(t)}function jl(e,t){return e&&e.classList.contains(t)}function $n(e){return e.getBoundingClientRect()}function Ki(e){Pn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Vd(e){return Tr(new DOMParser().parseFromString(e,"text/html").body)}function ei(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Gd(e,t){return e&&e.querySelector(t)}function al(e,t){return t?Ri(e.querySelectorAll(t)):[]}function ii(e,t){ni(e,t,!1)}function Is(e){return e.timeStamp}function Ni(e){return Ci(e)?e:e?e+"px":""}var Lr="splide",sl="data-"+Lr;function or(e,t){if(!e)throw new Error("["+Lr+"] "+(t||""))}var Ti=Math.min,da=Math.max,ua=Math.floor,mr=Math.ceil,fn=Math.abs;function Xd(e,t,n){return fn(e-t)<n}function oa(e,t,n,i){var o=Ti(t,n),r=da(t,n);return i?o<e&&e<r:o<=e&&e<=r}function co(e,t,n){var i=Ti(t,n),o=da(t,n);return Ti(da(i,e),o)}function Rs(e){return+(e>0)-+(e<0)}function ks(e,t){return Pn(t,function(n){e=e.replace("%s",""+n)}),e}function ll(e){return e<10?"0"+e:""+e}var Vl={};function Rm(e){return""+e+ll(Vl[e]=(Vl[e]||0)+1)}function qd(){var e=[];function t(l,c,d,u){o(l,c,function(p,y,v){var m="addEventListener"in p,g=m?p.removeEventListener.bind(p,y,d,u):p.removeListener.bind(p,d);m?p.addEventListener(y,d,u):p.addListener(d),e.push([p,y,v,d,g])})}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){Pn(l,function(u){u&&Pn(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]()}),si(e)}return{bind:t,unbind:n,dispatch:i,destroy:r}}var ki="mounted",Es="ready",li="move",Oo="moved",cl="click",Ud="active",Kd="inactive",Yd="visible",Zd="hidden",an="refresh",gn="updated",To="resize",$a="resized",Jd="drag",Qd="dragging",eu="dragged",Ca="scroll",Ji="scrolled",km="overflow",dl="destroy",tu="arrows:mounted",nu="arrows:updated",iu="pagination:mounted",ou="pagination:updated",ul="navigation:mounted",pl="autoplay:play",ru="autoplay:playing",ml="autoplay:pause",gl="lazyload:loaded",au="sk",su="sh",pa="ei";function tn(e){var t=e?e.event.bus:document.createDocumentFragment(),n=qd();function i(r,l){n.bind(t,$r(r).join(" "),function(c){l.apply(l,nl(c.detail)?c.detail:[])})}function o(r){n.dispatch(t,r,Ri(arguments,1))}return e&&e.event.on(dl,n.destroy),ur(n,{bus:t,on:i,off:Jt(n.unbind,t),emit:o})}function Ta(e,t,n,i){var o=Date.now,r,l=0,c,d=!0,u=0;function p(){if(!d){if(l=e?Ti((o()-r)/e,1):1,n&&n(l),l>=1&&(t(),r=o(),i&&++u>=i))return v();c=zl(p)}}function y(E){E||g(),r=o()-(E?l*e:0),d=!1,c=zl(p)}function v(){d=!0}function m(){r=o(),l=0,n&&n(l)}function g(){c&&cancelAnimationFrame(c),l=0,c=0,d=!0}function x(E){e=E}function b(){return d}return{start:y,rewind:m,pause:v,cancel:g,set:x,isPaused:b}}function Em(e){var t=e;function n(o){t=o}function i(o){return ol($r(o),t)}return{set:n,is:i}}function Mm(e,t){var n=Ta(0,e,null,1);return function(){n.isPaused()&&n.start()}}function Am(e,t,n){var i=e.state,o=n.breakpoints||{},r=n.reducedMotion||{},l=qd(),c=[];function d(){var g=n.mediaQuery==="min";dr(o).sort(function(x,b){return g?+x-+b:+b-+x}).forEach(function(x){p(o[x],"("+(g?"min":"max")+"-width:"+x+"px)")}),p(r,Dl),y()}function u(g){g&&l.destroy()}function p(g,x){var b=matchMedia(x);l.bind(b,"change",y),c.push([g,b])}function y(){var g=i.is(ca),x=n.direction,b=c.reduce(function(E,f){return bi(E,f[1].matches?f[0]:{})},{});Bl(n),m(b),n.destroy?e.destroy(n.destroy==="completely"):g?(u(!0),e.mount()):x!==n.direction&&e.refresh()}function v(g){matchMedia(Dl).matches&&(g?bi(n,r):Bl(n,dr(r)))}function m(g,x,b){bi(n,g),x&&bi(Object.getPrototypeOf(n),g),(b||!i.is(go))&&e.emit(gn,n)}return{setup:d,destroy:u,reduce:v,set:m}}var La="Arrow",Pa=La+"Left",Ia=La+"Right",lu=La+"Up",cu=La+"Down",Gl="rtl",Ra="ttb",Da={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[lu,Ia],ArrowRight:[cu,Pa]};function Fm(e,t,n){function i(r,l,c){c=c||n.direction;var d=c===Gl&&!l?1:c===Ra?0:-1;return Da[r]&&Da[r][d]||r.replace(/width|left|right/i,function(u,p){var y=Da[u.toLowerCase()][d]||u;return p>0?y.charAt(0).toUpperCase()+y.slice(1):y})}function o(r){return r*(n.direction===Gl?1:-1)}return{resolve:i,orient:o}}var oi="role",bo="tabindex",Nm="disabled",Mn="aria-",Pr=Mn+"controls",du=Mn+"current",Xl=Mn+"selected",Tn=Mn+"label",hl=Mn+"labelledby",uu=Mn+"hidden",fl=Mn+"orientation",gr=Mn+"roledescription",ql=Mn+"live",Ul=Mn+"busy",Kl=Mn+"atomic",yl=[oi,bo,Nm,Pr,du,Tn,hl,uu,fl,gr],Xn=Lr+"__",Ei="is-",za=Lr,Yl=Xn+"track",_m=Xn+"list",ka=Xn+"slide",pu=ka+"--clone",Hm=ka+"__container",vl=Xn+"arrows",Ea=Xn+"arrow",mu=Ea+"--prev",gu=Ea+"--next",Ma=Xn+"pagination",hu=Ma+"__page",Wm=Xn+"progress",Om=Wm+"__bar",Dm=Xn+"toggle",zm=Xn+"spinner",Bm=Xn+"sr",jm=Ei+"initialized",Yi=Ei+"active",fu=Ei+"prev",yu=Ei+"next",Ms=Ei+"visible",As=Ei+"loading",vu=Ei+"focus-in",xu=Ei+"overflow",Vm=[Yi,Ms,fu,yu,As,vu,xu],Gm={slide:ka,clone:pu,arrows:vl,arrow:Ea,prev:mu,next:gu,pagination:Ma,page:hu,spinner:zm};function Xm(e,t){if(Dd(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!cr(n,t);)n=n.parentElement;return n}var qm=5,Zl=200,bu="touchstart mousedown",Ba="touchmove mousemove",ja="touchend touchcancel mouseup click";function Um(e,t,n){var i=tn(e),o=i.on,r=i.bind,l=e.root,c=n.i18n,d={},u=[],p=[],y=[],v,m,g;function x(){w(),G(),f()}function b(){o(an,E),o(an,x),o(gn,f),r(document,bu+" keydown",function(L){g=L.type==="keydown"},{capture:!0}),r(l,"focusin",function(){ni(l,vu,!!g)})}function E(L){var A=yl.concat("style");si(u),ii(l,p),ii(v,y),jn([v,m],A),jn(l,L?A:["style",gr])}function f(){ii(l,p),ii(v,y),p=k(za),y=k(Yl),Bn(l,p),Bn(v,y),Ft(l,Tn,n.label),Ft(l,hl,n.labelledby)}function w(){v=X("."+Yl),m=Tr(v,"."+_m),or(v&&m,"A track/list element is missing."),ia(u,Bd(m,"."+ka+":not(."+pu+")")),qi({arrows:vl,pagination:Ma,prev:mu,next:gu,bar:Om,toggle:Dm},function(L,A){d[A]=X("."+L)}),ur(d,{root:l,track:v,list:m,slides:u})}function G(){var L=l.id||Rm(Lr),A=n.role;l.id=L,v.id=v.id||L+"-track",m.id=m.id||L+"-list",!En(l,oi)&&l.tagName!=="SECTION"&&A&&Ft(l,oi,A),Ft(l,gr,c.carousel),Ft(m,oi,"presentation")}function X(L){var A=Gd(l,L);return A&&Xm(A,"."+za)===l?A:void 0}function k(L){return[L+"--"+n.type,L+"--"+n.direction,n.drag&&L+"--draggable",n.isNavigation&&L+"--nav",L===za&&Yi]}return ur(d,{setup:x,mount:b,destroy:E})}var Lo="slide",Do="loop",Ir="fade";function Km(e,t,n,i){var o=tn(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,m=p.i18n,g=p.pagination,x=p.slideFocus,b=d.Direction.resolve,E=En(i,"style"),f=En(i,Tn),w=n>-1,G=Tr(i,"."+Hm),X;function k(){w||(i.id=u.id+"-slide"+ll(t+1),Ft(i,oi,g?"tabpanel":"group"),Ft(i,gr,m.slide),Ft(i,Tn,f||ks(m.slideLabel,[t+1,e.length]))),L()}function L(){c(i,"click",Jt(l,cl,K)),c(i,"keydown",Jt(l,au,K)),r([Oo,su,Ji],P),r(ul,U),v&&r(li,$)}function A(){X=!0,o.destroy(),ii(i,Vm),jn(i,yl),Ft(i,"style",E),Ft(i,Tn,f||"")}function U(){var R=e.splides.map(function(_){var j=_.splide.Components.Slides.getAt(t);return j?j.slide.id:""}).join(" ");Ft(i,Tn,ks(m.slideX,(w?n:t)+1)),Ft(i,Pr,R),Ft(i,oi,x?"button":""),x&&jn(i,gr)}function $(){X||P()}function P(){if(!X){var R=e.index;H(),W(),ni(i,fu,t===R-1),ni(i,yu,t===R+1)}}function H(){var R=T();R!==jl(i,Yi)&&(ni(i,Yi,R),Ft(i,du,y&&R||""),l(R?Ud:Kd,K))}function W(){var R=B(),_=!R&&(!T()||w);if(e.state.is([Wo,Sr])||Ft(i,uu,_||""),Ft(al(i,p.focusableNodes||""),bo,_?-1:""),x&&Ft(i,bo,_?-1:0),R!==jl(i,Ms)&&(ni(i,Ms,R),l(R?Yd:Zd,K)),!R&&document.activeElement===i){var j=d.Slides.getAt(e.index);j&&jd(j.slide)}}function C(R,_,j){kn(j&&G||i,R,_)}function T(){var R=e.index;return R===t||p.cloneStatus&&R===n}function B(){if(e.is(Ir))return T();var R=$n(d.Elements.track),_=$n(i),j=b("left",!0),oe=b("right",!0);return ua(R[j])<=mr(_[j])&&ua(_[oe])<=mr(R[oe])}function S(R,_){var j=fn(R-t);return!w&&(p.rewind||e.is(Do))&&(j=Ti(j,e.length-j)),j<=_}var K={index:t,slideIndex:n,slide:i,container:G,isClone:w,mount:k,destroy:A,update:P,style:C,isWithin:S};return K}function Ym(e,t,n){var i=tn(e),o=i.on,r=i.emit,l=i.bind,c=t.Elements,d=c.slides,u=c.list,p=[];function y(){v(),o(an,m),o(an,v)}function v(){d.forEach(function(P,H){x(P,H,-1)})}function m(){X(function(P){P.destroy()}),si(p)}function g(){X(function(P){P.update()})}function x(P,H,W){var C=Km(e,H,W,P);C.mount(),p.push(C),p.sort(function(T,B){return T.index-B.index})}function b(P){return P?k(function(H){return!H.isClone}):p}function E(P){var H=t.Controller,W=H.toIndex(P),C=H.hasFocus()?1:n.perPage;return k(function(T){return oa(T.index,W,W+C-1)})}function f(P){return k(P)[0]}function w(P,H){Pn(P,function(W){if(Ci(W)&&(W=Vd(W)),zd(W)){var C=d[H];C?rl(W,C):Cr(u,W),Bn(W,n.classes.slide),A(W,Jt(r,To))}}),r(an)}function G(P){Ki(k(P).map(function(H){return H.slide})),r(an)}function X(P,H){b(H).forEach(P)}function k(P){return p.filter(Dd(P)?P:function(H){return Ci(P)?cr(H.slide,P):ol($r(P),H.index)})}function L(P,H,W){X(function(C){C.style(P,H,W)})}function A(P,H){var W=al(P,"img"),C=W.length;C?W.forEach(function(T){l(T,"load error",function(){--C||H()})}):H()}function U(P){return P?d.length:p.length}function $(){return p.length>n.perPage}return{mount:y,destroy:m,update:g,register:x,get:b,getIn:E,getAt:f,add:w,remove:G,forEach:X,filter:k,style:L,getLength:U,isEnough:$}}function Zm(e,t,n){var i=tn(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,m=c.getAt,g=c.style,x,b,E;function f(){w(),r(window,"resize load",Mm(Jt(l,To))),o([gn,an],w),o(To,G)}function w(){x=n.direction===Ra,kn(p,"maxWidth",Ni(n.width)),kn(y,d("paddingLeft"),X(!1)),kn(y,d("paddingRight"),X(!0)),G(!0)}function G(K){var R=$n(p);(K||b.width!==R.width||b.height!==R.height)&&(kn(y,"height",k()),g(d("marginRight"),Ni(n.gap)),g("width",A()),g("height",U(),!0),b=R,l($a),E!==(E=S())&&(ni(p,xu,E),l(km,E)))}function X(K){var R=n.padding,_=d(K?"right":"left");return R&&Ni(R[_]||(lr(R)?0:R))||"0px"}function k(){var K="";return x&&(K=L(),or(K,"height or heightRatio is missing."),K="calc("+K+" - "+X(!1)+" - "+X(!0)+")"),K}function L(){return Ni(n.height||$n(v).width*n.heightRatio)}function A(){return n.autoWidth?null:Ni(n.fixedWidth)||(x?"":$())}function U(){return Ni(n.fixedHeight)||(x?n.autoHeight?null:$():L())}function $(){var K=Ni(n.gap);return"calc((100%"+(K&&" + "+K)+")/"+(n.perPage||1)+(K&&" - "+K)+")"}function P(){return $n(v)[d("width")]}function H(K,R){var _=m(K||0);return _?$n(_.slide)[d("width")]+(R?0:T()):0}function W(K,R){var _=m(K);if(_){var j=$n(_.slide)[d("right")],oe=$n(v)[d("left")];return fn(j-oe)+(R?0:T())}return 0}function C(K){return W(e.length-1)-W(0)+H(0,K)}function T(){var K=m(0);return K&&parseFloat(kn(K.slide,d("marginRight")))||0}function B(K){return parseFloat(kn(y,d("padding"+(K?"Right":"Left"))))||0}function S(){return e.is(Ir)||C(!0)>P()}return{mount:f,resize:G,listSize:P,slideSize:H,sliderSize:C,totalSize:W,getPadding:B,isOverflow:S}}var Jm=2;function Qm(e,t,n){var i=tn(e),o=i.on,r=t.Elements,l=t.Slides,c=t.Direction.resolve,d=[],u;function p(){o(an,y),o([gn,To],m),(u=b())&&(g(u),t.Layout.resize(!0))}function y(){v(),p()}function v(){Ki(d),si(d),i.destroy()}function m(){var E=b();u!==E&&(u<E||!E)&&i.emit(an)}function g(E){var f=l.get().slice(),w=f.length;if(w){for(;f.length<E;)ia(f,f);ia(f.slice(-E),f.slice(0,E)).forEach(function(G,X){var k=X<E,L=x(G.slide,X);k?rl(L,f[0].slide):Cr(r.list,L),ia(d,L),l.register(L,X-E+(k?0:w),G.index)})}}function x(E,f){var w=E.cloneNode(!0);return Bn(w,n.classes.clone),w.id=e.root.id+"-clone"+ll(f+1),w}function b(){var E=n.clones;if(!e.is(Do))E=0;else if(wr(E)){var f=n[c("fixedWidth")]&&t.Layout.slideSize(0),w=f&&mr($n(r.track)[c("width")]/f);E=w||n[c("autoWidth")]&&e.length||n.perPage*Jm}return E}return{mount:p,destroy:v}}function eg(e,t,n){var i=tn(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,m=t.Direction,g=m.resolve,x=m.orient,b=t.Elements,E=b.list,f=b.track,w;function G(){w=t.Transition,o([ki,$a,gn,an],X)}function X(){t.Controller.isBusy()||(t.Scroll.cancel(),L(e.index),t.Slides.update())}function k(_,j,oe,re){_!==j&&K(_>oe)&&(P(),A($(C(),_>oe),!0)),l(Wo),r(li,j,oe,_),w.start(j,function(){l(Co),r(Oo,j,oe,_),re&&re()})}function L(_){A(W(_,!0))}function A(_,j){if(!e.is(Ir)){var oe=j?_:U(_);kn(E,"transform","translate"+g("X")+"("+oe+"px)"),_!==oe&&r(su)}}function U(_){if(e.is(Do)){var j=H(_),oe=j>t.Controller.getEnd(),re=j<0;(re||oe)&&(_=$(_,oe))}return _}function $(_,j){var oe=_-S(j),re=v();return _-=x(re*(mr(fn(oe)/re)||1))*(j?1:-1),_}function P(){A(C(),!0),w.cancel()}function H(_){for(var j=t.Slides.get(),oe=0,re=1/0,O=0;O<j.length;O++){var ie=j[O].index,D=fn(W(ie,!0)-_);if(D<=re)re=D,oe=ie;else break}return oe}function W(_,j){var oe=x(p(_-1)-B(_));return j?T(oe):oe}function C(){var _=g("left");return $n(E)[_]-$n(f)[_]+x(u(!1))}function T(_){return n.trimSpace&&e.is(Lo)&&(_=co(_,0,x(v(!0)-y()))),_}function B(_){var j=n.focus;return j==="center"?(y()-d(_,!0))/2:+j*d(_)||0}function S(_){return W(_?t.Controller.getEnd():0,!!n.trimSpace)}function K(_){var j=x($(C(),_));return _?j>=0:j<=E[g("scrollWidth")]-$n(f)[g("width")]}function R(_,j){j=wr(j)?C():j;var oe=_!==!0&&x(j)<x(S(!1)),re=_!==!1&&x(j)>x(S(!0));return oe||re}return{mount:G,move:k,jump:L,translate:A,shift:$,cancel:P,toIndex:H,toPosition:W,getPosition:C,getLimit:S,exceededLimit:R,reposition:X}}function tg(e,t,n){var i=tn(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,m=n.omitEnd,g=e.is(Do),x=e.is(Lo),b=Jt(C,!1),E=Jt(C,!0),f=n.start||0,w,G=f,X,k,L;function A(){U(),o([gn,an,pa],U),o($a,$)}function U(){X=v(!0),k=n.perMove,L=n.perPage,w=K();var D=co(f,0,m?w:X-1);D!==f&&(f=D,l.reposition())}function $(){w!==K()&&r(pa)}function P(D,le,ee){if(!ie()){var ve=W(D),Ie=S(ve);Ie>-1&&(le||Ie!==f)&&(oe(Ie),l.move(ve,Ie,G,ee))}}function H(D,le,ee,ve){t.Scroll.scroll(D,le,ee,function(){var Ie=S(l.toIndex(c()));oe(m?Ti(Ie,w):Ie),ve&&ve()})}function W(D){var le=f;if(Ci(D)){var ee=D.match(/([+\-<>])(\d+)?/)||[],ve=ee[1],Ie=ee[2];ve==="+"||ve==="-"?le=T(f+ +(""+ve+(+Ie||1)),f):ve===">"?le=Ie?R(+Ie):b(!0):ve==="<"&&(le=E(!0))}else le=g?D:co(D,0,w);return le}function C(D,le){var ee=k||(O()?1:L),ve=T(f+ee*(D?-1:1),f,!(k||O()));return ve===-1&&x&&!Xd(c(),d(!D),1)?D?0:w:le?ve:S(ve)}function T(D,le,ee){if(y()||O()){var ve=B(D);ve!==D&&(le=D,D=ve,ee=!1),D<0||D>w?!k&&(oa(0,D,le,!0)||oa(w,le,D,!0))?D=R(_(D)):g?D=ee?D<0?-(X%L||L):X:D:n.rewind?D=D<0?w:0:D=-1:ee&&D!==le&&(D=R(_(le)+(D<le?-1:1)))}else D=-1;return D}function B(D){if(x&&n.trimSpace==="move"&&D!==f)for(var le=c();le===u(D,!0)&&oa(D,0,e.length-1,!n.rewind);)D<f?--D:++D;return D}function S(D){return g?(D+X)%X||0:D}function K(){for(var D=X-(O()||g&&k?1:L);m&&D-- >0;)if(u(X-1,!0)!==u(D,!0)){D++;break}return co(D,0,X-1)}function R(D){return co(O()?D:L*D,0,w)}function _(D){return O()?Ti(D,w):ua((D>=w?X-1:D)/L)}function j(D){var le=l.toIndex(D);return x?co(le,0,w):le}function oe(D){D!==f&&(G=f,f=D)}function re(D){return D?G:f}function O(){return!wr(n.focus)||n.isNavigation}function ie(){return e.state.is([Wo,Sr])&&!!n.waitForTransition}return{mount:A,go:P,scroll:H,getNext:b,getPrev:E,getAdjacent:C,getEnd:K,setIndex:oe,getIndex:re,toIndex:R,toPage:_,toDest:j,hasFocus:O,isBusy:ie}}var ng="http://www.w3.org/2000/svg",ig="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",Mr=40;function og(e,t,n){var i=tn(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,m=y,g=u.prev,x=u.next,b,E,f={};function w(){X(),o(gn,G)}function G(){k(),w()}function X(){var H=n.arrows;H&&!(g&&x)&&U(),g&&x&&(ur(f,{prev:g,next:x}),pr(m,H?"":"none"),Bn(m,E=vl+"--"+n.direction),H&&(L(),P(),Ft([g,x],Pr,v.id),l(tu,g,x)))}function k(){i.destroy(),ii(m,E),b?(Ki(y?[g,x]:m),g=x=null):jn([g,x],yl)}function L(){o([ki,Oo,an,Ji,pa],P),r(x,"click",Jt(A,">")),r(g,"click",Jt(A,"<"))}function A(H){p.go(H,!0)}function U(){m=y||xo("div",c.arrows),g=$(!0),x=$(!1),b=!0,Cr(m,[g,x]),!y&&rl(m,v)}function $(H){var W='<button class="'+c.arrow+" "+(H?c.prev:c.next)+'" type="button"><svg xmlns="'+ng+'" viewBox="0 0 '+Mr+" "+Mr+'" width="'+Mr+'" height="'+Mr+'" focusable="false"><path d="'+(n.arrowPath||ig)+'" />';return Vd(W)}function P(){if(g&&x){var H=e.index,W=p.getPrev(),C=p.getNext(),T=W>-1&&H<W?d.last:d.prev,B=C>-1&&H>C?d.first:d.next;g.disabled=W<0,x.disabled=C<0,Ft(g,Tn,T),Ft(x,Tn,B),l(nu,g,x,W,C)}}return{arrows:f,mount:w,destroy:k,update:P}}var rg=sl+"-interval";function ag(e,t,n){var i=tn(e),o=i.on,r=i.bind,l=i.emit,c=Ta(n.interval,e.go.bind(e,">"),L),d=c.isPaused,u=t.Elements,p=t.Elements,y=p.root,v=p.toggle,m=n.autoplay,g,x,b=m==="pause";function E(){m&&(f(),v&&Ft(v,Pr,u.track.id),b||w(),k())}function f(){n.pauseOnHover&&r(y,"mouseenter mouseleave",function(U){g=U.type==="mouseenter",X()}),n.pauseOnFocus&&r(y,"focusin focusout",function(U){x=U.type==="focusin",X()}),v&&r(v,"click",function(){b?w():G(!0)}),o([li,Ca,an],c.rewind),o(li,A)}function w(){d()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),x=g=b=!1,k(),l(pl))}function G(U){U===void 0&&(U=!0),b=!!U,k(),d()||(c.pause(),l(ml))}function X(){b||(g||x?G(!1):w())}function k(){v&&(ni(v,Yi,!b),Ft(v,Tn,n.i18n[b?"play":"pause"]))}function L(U){var $=u.bar;$&&kn($,"width",U*100+"%"),l(ru,U)}function A(U){var $=t.Slides.getAt(U);c.set($&&+En($.slide,rg)||n.interval)}return{mount:E,destroy:c.cancel,play:w,pause:G,isPaused:d}}function sg(e,t,n){var i=tn(e),o=i.on;function r(){n.cover&&(o(gl,Jt(c,!0)),o([ki,gn,an],Jt(l,!0)))}function l(d){t.Slides.forEach(function(u){var p=Tr(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),pr(u,d?"none":"")}return{mount:r,destroy:Jt(l,!1)}}var lg=10,cg=600,dg=.6,ug=1.5,pg=800;function mg(e,t,n){var i=tn(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(Lo),m,g,x=1;function b(){o(li,G),o([gn,an],X)}function E(L,A,U,$,P){var H=d();if(G(),U&&(!v||!p())){var W=t.Layout.sliderSize(),C=Rs(L)*W*ua(fn(L)/W)||0;L=c.toPosition(t.Controller.toDest(L%W))+C}var T=Xd(H,L,1);x=1,A=T?0:A||da(fn(L-H)/ug,pg),g=$,m=Ta(A,f,Jt(w,H,L,P),1),l(Sr),r(Ca),m.start()}function f(){l(Co),g&&g(),r(Ji)}function w(L,A,U,$){var P=d(),H=L+(A-L)*k($),W=(H-P)*x;y(P+W),v&&!U&&p()&&(x*=dg,fn(W)<lg&&E(u(p(!0)),cg,!1,g,!0))}function G(){m&&m.cancel()}function X(){m&&!m.isPaused()&&(G(),f())}function k(L){var A=n.easingFunc;return A?A(L):1-Math.pow(1-L,4)}return{mount:b,destroy:G,scroll:E,cancel:X}}var uo={passive:!1,capture:!0};function gg(e,t,n){var i=tn(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,m=t.Media.reduce,g=t.Direction,x=g.resolve,b=g.orient,E=u.getPosition,f=u.exceededLimit,w,G,X,k,L,A=!1,U,$,P;function H(){l(v,Ba,Ps,uo),l(v,ja,Ps,uo),l(v,bu,C,uo),l(v,"click",S,{capture:!0}),l(v,"dragstart",ei),o([ki,gn],W)}function W(){var Y=n.drag;pe(!Y),k=Y==="free"}function C(Y){if(U=!1,!$){var se=Ie(Y);ve(Y.target)&&(se||!Y.button)&&(y.isBusy()?ei(Y,!0):(P=se?v:window,L=d.is([Wo,Sr]),X=null,l(P,Ba,T,uo),l(P,ja,B,uo),u.cancel(),p.cancel(),K(Y)))}}function T(Y){if(d.is(na)||(d.set(na),r(Jd)),Y.cancelable)if(L){u.translate(w+ee(O(Y)));var se=ie(Y)>Zl,xe=A!==(A=f());(se||xe)&&K(Y),U=!0,r(Qd),ei(Y)}else j(Y)&&(L=_(Y),ei(Y))}function B(Y){d.is(na)&&(d.set(Co),r(eu)),L&&(R(Y),ei(Y)),c(P,Ba,T),c(P,ja,B),L=!1}function S(Y){!$&&U&&ei(Y,!0)}function K(Y){X=G,G=Y,w=E()}function R(Y){var se=oe(Y),xe=re(se),Se=n.rewind&&n.rewindByDrag;m(!1),k?y.scroll(xe,0,n.snap):e.is(Ir)?y.go(b(Rs(se))<0?Se?"<":"-":Se?">":"+"):e.is(Lo)&&A&&Se?y.go(f(!0)?">":"<"):y.go(y.toDest(xe),!0),m(!0)}function _(Y){var se=n.dragMinThreshold,xe=lr(se),Se=xe&&se.mouse||0,Ce=(xe?se.touch:+se)||10;return fn(O(Y))>(Ie(Y)?Ce:Se)}function j(Y){return fn(O(Y))>fn(O(Y,!0))}function oe(Y){if(e.is(Do)||!A){var se=ie(Y);if(se&&se<Zl)return O(Y)/se}return 0}function re(Y){return E()+Rs(Y)*Ti(fn(Y)*(n.flickPower||600),k?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function O(Y,se){return le(Y,se)-le(D(Y),se)}function ie(Y){return Is(Y)-Is(D(Y))}function D(Y){return G===Y&&X||G}function le(Y,se){return(Ie(Y)?Y.changedTouches[0]:Y)["page"+x(se?"Y":"X")]}function ee(Y){return Y/(A&&e.is(Lo)?qm:1)}function ve(Y){var se=n.noDrag;return!cr(Y,"."+hu+", ."+Ea)&&(!se||!cr(Y,se))}function Ie(Y){return typeof TouchEvent<"u"&&Y instanceof TouchEvent}function be(){return L}function pe(Y){$=Y}return{mount:H,disable:pe,isDragging:be}}var hg={Spacebar:" ",Right:Ia,Left:Pa,Up:lu,Down:cu};function xl(e){return e=Ci(e)?e:e.key,hg[e]||e}var Jl="keydown";function fg(e,t,n){var i=tn(e),o=i.on,r=i.bind,l=i.unbind,c=e.root,d=t.Direction.resolve,u,p;function y(){v(),o(gn,m),o(gn,v),o(li,x)}function v(){var E=n.keyboard;E&&(u=E==="global"?window:c,r(u,Jl,b))}function m(){l(u,Jl)}function g(E){p=E}function x(){var E=p;p=!0,Od(function(){p=E})}function b(E){if(!p){var f=xl(E);f===d(Pa)?e.go("<"):f===d(Ia)&&e.go(">")}}return{mount:y,destroy:m,disable:g}}var rr=sl+"-lazy",ra=rr+"-srcset",yg="["+rr+"], ["+ra+"]";function vg(e,t,n){var i=tn(e),o=i.on,r=i.off,l=i.bind,c=i.emit,d=n.lazyLoad==="sequential",u=[Oo,Ji],p=[];function y(){n.lazyLoad&&(v(),o(an,v))}function v(){si(p),m(),d?E():(r(u),o(u,g),g())}function m(){t.Slides.forEach(function(f){al(f.slide,yg).forEach(function(w){var G=En(w,rr),X=En(w,ra);if(G!==w.src||X!==w.srcset){var k=n.classes.spinner,L=w.parentElement,A=Tr(L,"."+k)||xo("span",k,L);p.push([w,f,A]),w.src||pr(w,"none")}})})}function g(){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];Bn(f[1].slide,As),l(w,"load error",Jt(b,f)),Ft(w,"src",En(w,rr)),Ft(w,"srcset",En(w,ra)),jn(w,rr),jn(w,ra)}function b(f,w){var G=f[0],X=f[1];ii(X.slide,As),w.type!=="error"&&(Ki(f[2]),pr(G,""),c(gl,G,X),c(To)),d&&E()}function E(){p.length&&x(p.shift())}return{mount:y,destroy:Jt(si,p),check:g}}function xg(e,t,n){var i=tn(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,m=t.Direction.resolve,g=d.pagination,x=[],b,E;function f(){w(),o([gn,an,pa],f);var $=n.pagination;g&&pr(g,$?"":"none"),$&&(o([li,Ca,Ji],U),G(),U(),r(iu,{list:b,items:x},A(e.index)))}function w(){b&&(Ki(g?Ri(b.children):b),ii(b,E),si(x),b=null),i.destroy()}function G(){var $=e.length,P=n.classes,H=n.i18n,W=n.perPage,C=p()?u.getEnd()+1:mr($/W);b=g||xo("ul",P.pagination,d.track.parentElement),Bn(b,E=Ma+"--"+L()),Ft(b,oi,"tablist"),Ft(b,Tn,H.select),Ft(b,fl,L()===Ra?"vertical":"");for(var T=0;T<C;T++){var B=xo("li",null,b),S=xo("button",{class:P.page,type:"button"},B),K=c.getIn(T).map(function(_){return _.slide.id}),R=!p()&&W>1?H.pageX:H.slideX;l(S,"click",Jt(X,T)),n.paginationKeyboard&&l(S,"keydown",Jt(k,T)),Ft(B,oi,"presentation"),Ft(S,oi,"tab"),Ft(S,Pr,K.join(" ")),Ft(S,Tn,ks(R,T+1)),Ft(S,bo,-1),x.push({li:B,button:S,page:T})}}function X($){v(">"+$,!0)}function k($,P){var H=x.length,W=xl(P),C=L(),T=-1;W===m(Ia,!1,C)?T=++$%H:W===m(Pa,!1,C)?T=(--$+H)%H:W==="Home"?T=0:W==="End"&&(T=H-1);var B=x[T];B&&(jd(B.button),v(">"+T),ei(P,!0))}function L(){return n.paginationDirection||n.direction}function A($){return x[u.toPage($)]}function U(){var $=A(y(!0)),P=A(y());if($){var H=$.button;ii(H,Yi),jn(H,Xl),Ft(H,bo,-1)}if(P){var W=P.button;Bn(W,Yi),Ft(W,Xl,!0),Ft(W,bo,"")}r(ou,{list:b,items:x},$,P)}return{items:x,mount:f,destroy:w,getAt:A,update:U}}var bg=[" ","Enter"];function Sg(e,t,n){var i=n.isNavigation,o=n.slideFocus,r=[];function l(){e.splides.forEach(function(g){g.isParent||(u(e,g.splide),u(g.splide,e))}),i&&p()}function c(){r.forEach(function(g){g.destroy()}),si(r)}function d(){c(),l()}function u(g,x){var b=tn(g);b.on(li,function(E,f,w){x.go(x.is(Do)?w:E)}),r.push(b)}function p(){var g=tn(e),x=g.on;x(cl,v),x(au,m),x([ki,gn],y),r.push(g),g.emit(ul,e.splides)}function y(){Ft(t.Elements.list,fl,n.direction===Ra?"vertical":"")}function v(g){e.go(g.index)}function m(g,x){ol(bg,xl(x))&&(v(g),ei(x))}return{setup:Jt(t.Media.set,{slideFocus:wr(o)?i:o},!0),mount:l,destroy:c,remount:d}}function wg(e,t,n){var i=tn(e),o=i.bind,r=0;function l(){n.wheel&&o(t.Elements.track,"wheel",c,uo)}function c(u){if(u.cancelable){var p=u.deltaY,y=p<0,v=Is(u),m=n.wheelMinThreshold||0,g=n.wheelSleep||0;fn(p)>m&&v-r>g&&(e.go(y?"<":">"),r=v),d(y)&&ei(u)}}function d(u){return!n.releaseWheel||e.state.is(Wo)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var $g=90;function Cg(e,t,n){var i=tn(e),o=i.on,r=t.Elements.track,l=n.live&&!n.isNavigation,c=xo("span",Bm),d=Ta($g,Jt(p,!1));function u(){l&&(v(!t.Autoplay.isPaused()),Ft(r,Kl,!0),c.textContent="…",o(pl,Jt(v,!0)),o(ml,Jt(v,!1)),o([Oo,Ji],Jt(p,!0)))}function p(m){Ft(r,Ul,m),m?(Cr(r,c),d.start()):(Ki(c),d.cancel())}function y(){jn(r,[ql,Kl,Ul]),Ki(c)}function v(m){l&&Ft(r,ql,m?"off":"polite")}return{mount:u,disable:v,destroy:y}}var Tg=Object.freeze({__proto__:null,Media:Am,Direction:Fm,Elements:Um,Slides:Ym,Layout:Zm,Clones:Qm,Move:eg,Controller:tg,Arrows:og,Autoplay:ag,Cover:sg,Scroll:mg,Drag:gg,Keyboard:fg,LazyLoad:vg,Pagination:xg,Sync:Sg,Wheel:wg,Live:Cg}),Lg={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"},Pg={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:Gm,i18n:Lg,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Ig(e,t,n){var i=t.Slides;function o(){tn(e).on([ki,an],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),Od(d)}return{mount:o,start:l,cancel:Ps}}function Rg(e,t,n){var i=t.Move,o=t.Controller,r=t.Scroll,l=t.Elements.list,c=Jt(kn,l,"transition"),d;function u(){tn(e).bind(l,"transitionend",function(m){m.target===l&&d&&(y(),d())})}function p(m,g){var x=i.toPosition(m,!0),b=i.getPosition(),E=v(m);fn(x-b)>=1&&E>=1?n.useScroll?r.scroll(x,E,!1,g):(c("transform "+E+"ms "+n.easing),i.translate(x,!0),d=g):(i.jump(m),g())}function y(){c(""),r.cancel()}function v(m){var g=n.rewindSpeed;if(e.is(Lo)&&g){var x=o.getIndex(!0),b=o.getEnd();if(x===0&&m>=b||x>=b&&m===0)return g}return n.speed}return{mount:u,start:p,cancel:y}}var kg=(function(){function e(n,i){this.event=tn(),this.Components={},this.state=Em(go),this.splides=[],this._o={},this._E={};var o=Ci(n)?Gd(document,n):n;or(o,o+" is invalid."),this.root=o,i=bi({label:En(o,Tn)||"",labelledby:En(o,hl)||""},Pg,e.defaults,i||{});try{bi(i,JSON.parse(En(o,sl)))}catch{or(!1,"Invalid JSON")}this._o=Object.create(bi({},i))}var t=e.prototype;return t.mount=function(i,o){var r=this,l=this.state,c=this.Components;or(l.is([go,ca]),"Already mounted!"),l.set(go),this._C=c,this._T=o||this._T||(this.is(Ir)?Ig:Rg),this._E=i||this._E;var d=ur({},Tg,this._E,{Transition:this._T});return qi(d,function(u,p){var y=u(r,c,r._o);c[p]=y,y.setup&&y.setup()}),qi(c,function(u){u.mount&&u.mount()}),this.emit(ki),Bn(this.root,jm),l.set(Co),this.emit(Es),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(Co)&&(this._C.Sync.remount(),i.Components.Sync.remount()),this},t.go=function(i){return this._C.Controller.go(i),this},t.on=function(i,o){return this.event.on(i,o),this},t.off=function(i){return this.event.off(i),this},t.emit=function(i){var o;return(o=this.event).emit.apply(o,[i].concat(Ri(arguments,1))),this},t.add=function(i,o){return this._C.Slides.add(i,o),this},t.remove=function(i){return this._C.Slides.remove(i),this},t.is=function(i){return this._o.type===i},t.refresh=function(){return this.emit(an),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,r=this.state;return r.is(go)?tn(this).on(Es,this.destroy.bind(this,i)):(qi(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(dl),o.destroy(),i&&si(this.splides),r.set(ca)),this},Lm(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})(),bl=kg;bl.defaults={};bl.STATES=Im;var Ql=[[ki,"onMounted"],[Es,"onReady"],[li,"onMove"],[Oo,"onMoved"],[cl,"onClick"],[Ud,"onActive"],[Kd,"onInactive"],[Yd,"onVisible"],[Zd,"onHidden"],[an,"onRefresh"],[gn,"onUpdated"],[To,"onResize"],[$a,"onResized"],[Jd,"onDrag"],[Qd,"onDragging"],[eu,"onDragged"],[Ca,"onScroll"],[Ji,"onScrolled"],[dl,"onDestroy"],[tu,"onArrowsMounted"],[nu,"onArrowsUpdated"],[iu,"onPaginationMounted"],[ou,"onPaginationUpdated"],[ul,"onNavigationMounted"],[pl,"onAutoplayPlay"],[ru,"onAutoplayPlaying"],[ml,"onAutoplayPause"],[gl,"onLazyLoadLoaded"]];function Sl(...e){return e.filter(Boolean).join(" ")}function ma(e){return e!==null&&typeof e=="object"}function Fs(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!Fs(n,t[i]));if(ma(e)&&ma(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!Fs(e[o],t[o]))}return e===t}function Eg(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function Mg(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 Ns(e,t){const n=e;return Mg(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():ma(i)?n[o]=Ns(ma(n[o])?n[o]:{},i):n[o]=i}),n}var Ag=({children:e,className:t,...n})=>s.createElement("div",{className:Sl("splide__track",t),...n},s.createElement("ul",{className:"splide__list"},e)),wl=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 bl(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Ns({},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&&!Fs(this.options,e)&&(this.splide.options=e,this.options=Ns({},e));const t=this.getSlides();Eg(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){Ql.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:Sl("splide",e),ref:this.splideRef,...this.omit(o,["options",...Ql.map(r=>r[1])])},n?s.createElement(Ag,null,i):i)}},$l=({children:e,className:t,...n})=>s.createElement("li",{className:Sl("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 Fg="RichTextRenderer-module__link___BWeZ2",Ng={link:Fg},_g=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(i=>/^\d/.test(i))},zo=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>_g(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function cn(e){const{color:t,...n}=e;return n}function Qt(e,t){var o,r,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:zo(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:_.scalingValue(e.letterSpacing,t),wordSpacing:_.scalingValue(e.wordSpacing,t),fontSize:_.scalingValue(n,t),lineHeight:i!==void 0?_.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 Su(e){return e!=null&&e.length?e.some(t=>t.type==="link"?Su(t.children):!!t.text):!1}const Zi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?a.jsx("a",{className:Ng.link,href:i.value,target:i.target,children:t(i.children)},o):a.jsx("span",{style:Hg(i),children:i.text},o));return a.jsx(a.Fragment,{children:e.map((n,i)=>{const o=n.children;return a.jsx("div",{children:Su(o)?t(o):" "},i)})})};function Hg(e){return{...e.fontFamily&&{fontFamily:zo(e.fontFamily)},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}const Wg="SvgImage-module__svg___q3xE-",Og="SvgImage-module__img___VsTm-",ec={svg:Wg,img:Og},Dg=e=>{const t=e.trim().toLowerCase();return!!(t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")||t.includes(".svg")||t.startsWith("blob:"))},zg=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,pn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[r,l]=s.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return s.useEffect(()=>{if(typeof window<"u"&&window.CSS){const d=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');l(d)}},[]),!Dg(e)||!r?a.jsx("img",{src:e,alt:"",className:Ct(ec.img,i),style:o}):a.jsx("span",{"data-supports-mask":r,className:Ct(ec.svg,i),style:{"--svg":zg(e),"--fill":t,"--hover-fill":n,...o??{}}})},Bg={"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 jg({settings:e,content:t,styles:n,isEditor:i}){const[o,r]=s.useState(null),{widthSettings:l,fontSettings:d,letterSpacing:c,textAlign:u,wordSpacing:p,fontSizeLineHeight:x,textAppearance:y,color:m}=n.imageCaption??{},[g,v]=s.useState(void 0),[b,E]=s.useState(null),[f,w]=s.useState(0),[G,X]=s.useState(0),{direction:M,transition:T,controls:N,pagination:q,imageCaption:$,triggers:I}=e,W=s.useRef(T.type),{x:O,y:C}=e.controls.offset,L=z=>{o&&o.go(z)};return s.useEffect(()=>{if(!b)return;const z=new ResizeObserver(S=>{if(!o)return;const[K]=S;v({width:Math.round(K.contentRect.width),height:Math.round(K.contentRect.height)})});return z.observe(b),()=>z.unobserve(b)},[b]),s.useEffect(()=>{!o||W.current===T.type||(X(z=>z+1),W.current=T.type)},[T.type]),a.jsx("div",{className:Ct($t.wrapper,{[$t.editor]:i}),ref:E,children:a.jsxs("div",{className:$t.sliderInner,style:{width:g?g.width:"100%",height:g?g.height:"100%",backgroundColor:T.backgroundColor&&T.type==="fade in"?T.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:Ct($t.captionBlock),children:a.jsx("div",{className:$t.captionTextWrapper,children:t.map((z,S)=>a.jsx("div",{className:Ct($t.captionText,Bg[$.alignment],{[$t.withPointerEvents]:S===f&&i,[$t.active]:S===f}),style:{fontFamily:zo(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:l.sizing==="auto"?"max-content":_.scalingValue(l.width,i),letterSpacing:_.scalingValue(c,i),wordSpacing:_.scalingValue(p,i),textAlign:u,fontSize:_.scalingValue(x.fontSize,i),lineHeight:_.scalingValue(x.lineHeight,i),textTransform:y.textTransform??"none",textDecoration:y.textDecoration??"none",fontVariant:y.fontVariant??"normal",color:m,transitionDuration:T.duration?`${Math.round(parseInt(T.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:_.scalingValue($.offset.y,i),left:_.scalingValue($.offset.x,i)},children:a.jsx(Zi,{content:z.imageCaption})})},S))})}),a.jsx(wl,{onMove:z=>{w(z.index)},ref:r,options:{arrows:!1,speed:T.duration?parseInt(T.duration):500,autoplay:I.autoPlay!==null,...I.autoPlay!==null&&{interval:parseInt(I.autoPlay)*1e3},direction:M==="horiz"||T.type==="fade in"?"ltr":"ttb",pagination:!1,drag:I.triggersList.drag,perPage:1,width:g?g.width:"100%",height:g?g.height:"100%",type:T.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((z,S)=>a.jsx($l,{children:a.jsx("div",{className:$t.sliderItem,children:a.jsx("div",{className:$t.imgWrapper,children:a.jsx("img",{className:Ct($t.sliderImage,{[$t.contain]:z.image.objectFit==="contain",[$t.cover]:z.image.objectFit==="cover"}),src:z.image.url,alt:z.image.name??""})})})},S))},G),N.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Ct($t.arrow,{[$t.arrowVertical]:M==="vert",[$t.hoverArrow]:N.show==="on hover"}),style:{color:N.color,"--arrow-hover-color":N.hover},children:a.jsxs("button",{onClick:()=>{L("-1")},className:$t.arrowInner,style:{transform:`translate(${_.scalingValue(O,i)}, ${_.scalingValue(C*(M==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${M==="horiz"?"0deg":"90deg"})`},children:[N.arrowsImgUrl&&a.jsx(pn,{url:N.arrowsImgUrl,fill:N.color,hoverFill:N.hover,className:Ct($t.arrowImg,$t.mirror)}),!N.arrowsImgUrl&&a.jsx(tc,{color:N.color,className:Ct($t.arrowIcon,$t.arrowImg,$t.mirror)})]})}),a.jsx("div",{className:Ct($t.arrow,$t.nextArrow,{[$t.arrowVertical]:M==="vert",[$t.hoverArrow]:N.show==="on hover"}),style:{color:N.color,"--arrow-hover-color":N.hover},children:a.jsxs("button",{className:$t.arrowInner,onClick:()=>L("+1"),style:{transform:`translate(${_.scalingValue(O*(M==="horiz"?-1:1),i)}, ${_.scalingValue(C,i)}) scale(${e.controls.scale/100}) rotate(${M==="horiz"?"0deg":"90deg"})`},children:[N.arrowsImgUrl&&a.jsx(pn,{url:N.arrowsImgUrl,fill:N.color,hoverFill:N.hover,className:$t.arrowImg}),!N.arrowsImgUrl&&a.jsx(tc,{color:N.color,className:Ct($t.arrowIcon,$t.arrowImg)})]})})]}),I.triggersList.click&&a.jsx("div",{className:$t.clickOverlay,onClick:()=>{o&&o.go("+1")}}),q.isActive&&a.jsx("div",{className:Ct($t.pagination,{[$t.paginationInsideBottom]:q.position==="inside-1"&&M==="horiz",[$t.paginationInsideTop]:q.position==="inside-2"&&M==="horiz",[$t.paginationOutsideBottom]:q.position==="outside-1"&&M==="horiz",[$t.paginationOutsideTop]:q.position==="outside-2"&&M==="horiz",[$t.paginationInsideLeft]:q.position==="inside-1"&&M==="vert",[$t.paginationInsideRight]:q.position==="inside-2"&&M==="vert",[$t.paginationOutsideLeft]:q.position==="outside-1"&&M==="vert",[$t.paginationOutsideRight]:q.position==="outside-2"&&M==="vert",[$t.paginationVertical]:M==="vert"}),children:a.jsx("div",{className:$t.paginationInner,style:{backgroundColor:q.colors[2],transform:`scale(${q.scale/100}) translate(${_.scalingValue(q.offset.x,i)}, ${_.scalingValue(q.offset.y,i)}) rotate(${M==="horiz"?"0deg":"90deg"})`},children:t.map((z,S)=>a.jsx("button",{onClick:()=>{o&&o.go(S)},className:Ct($t.paginationItem),children:a.jsx("div",{className:Ct($t.dot,{[$t.activeDot]:S===f}),style:{backgroundColor:S===f?q.colors[0]:q.colors[1],"--pagination-hover-color":q.hover}})},S))})})]})})}function tc({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 Vg={element:jg,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"inside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},Gg="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Xg="ImageRevealSlider-module__image___Qjt-e",qg="ImageRevealSlider-module__link___N-iLG",Ug="ImageRevealSlider-module__cursor___2U03d",io={imageRevealSlider:Gg,image:Xg,link:qg,cursor:Ug};function nc(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const r=i.width?Number.parseFloat(i.width):o.naturalWidth,l=o.naturalHeight/o.naturalWidth*r,d=r/2,c=l/2;if(e>=i.x-d&&e<=i.x+d&&t>=i.y-c&&t<=i.y+c)return!0}return!1}function Va(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Kg(e,t,n,i){let o,r;if(t==="custom"){o=n;const l=await Va(e);r=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await Va(e);r=l.height/l.width*o}else{const l=await Va(e);o=l.width,r=l.height}return{width:o,height:r,finalWidth:`${o}px`}}function Yg({settings:e,content:t,isEditor:n}){const[i,o]=s.useState(null),[r,l]=s.useState([]),[d,c]=s.useState(0),u=s.useRef(0),[p,x]=s.useState({x:0,y:0}),[y,m]=s.useState(1),[g,v]=s.useState("none"),b=s.useRef({x:0,y:0}),[E,f]=s.useState(!1),{sizeType:w,imageWidth:G,randomRangeImageWidth:X}=e.imageSize,{revealPosition:M,visible:T}=e.position,{cursorType:N,target:q,defaultCursorScale:$,defaultCursor:I,hoverCursorScale:W,hoverCursor:O}=e.cursor;s.useEffect(()=>{if(!i)return;const z=(k,H)=>{const j=i.getBoundingClientRect(),ne=k-j.left,oe=H-j.top;if(x({x:ne,y:oe}),N==="system"){v("none"),m(1);return}const R=ne,ce=oe,D=document.elementFromPoint(j.left+R,j.top+ce);if(D&&D.closest("a")){v("none"),m(1);return}const le=nc(R,ce,r)||q==="area"?{img:O??"none",scale:W}:{img:I??"none",scale:$};v(le.img),m(le.scale)},S=k=>{k.stopPropagation(),b.current={x:k.clientX,y:k.clientY},z(k.clientX,k.clientY)},K=()=>{E&&z(b.current.x,b.current.y)};return i.addEventListener("mousemove",S),window.addEventListener("scroll",K,!0),()=>{i.removeEventListener("mousemove",S),window.removeEventListener("scroll",K,!0)}},[i,E,p,N,q,O,I,W,$,r]),s.useEffect(()=>{E||(v("none"),m(0))},[E]);const C=async(z,S,K,k={})=>{const{width:H,height:j,finalWidth:ne}=await Kg(z.image.url,w,G,X);let oe=0,R=0;M==="same"?(oe=S/2,R=K/2):(oe=k.x??Math.random()*S,R=k.y??Math.random()*K);const ce=Math.min(Math.max(oe,H/2),S-H/2),D=Math.min(Math.max(R,j/2),K-j/2);return{id:u.current++,url:z.image.url,link:z.link,name:z.image.name,x:ce,y:D,width:ne}};s.useEffect(()=>{if(!i||t.length===0)return;const z=i.getBoundingClientRect(),S=z.width,K=z.height,k=[];(async()=>{const j=t[0],ne=await C(j,S,K);k.push(ne),l(k),c(1)})()},[w,G,X,M,i]),s.useEffect(()=>{T==="last One"&&l(z=>z.length>0?[z[z.length-1]]:[])},[T]);const L=async z=>{if(!i)return;const S=i.getBoundingClientRect(),K=z.clientX-S.left,k=z.clientY-S.top;if(q==="image"&&!nc(K,k,r))return;let H=0,j=0;M==="on Click"?(H=K,j=k):M==="same"?(H=S.width/2,j=S.height/2):(H=Math.random()*S.width,j=Math.random()*S.height);const ne=t[d],oe=await C(ne,S.width,S.height,{x:H,y:j});l(R=>T==="all"?[...R,oe]:[oe]),c(R=>R>=t.length-1?0:R+1)};return a.jsxs("div",{ref:o,onClick:L,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),className:io.imageRevealSlider,style:{cursor:g==="none"?"default":"none"},children:[r.map(z=>a.jsx("div",{className:io.wrapper,style:{top:`${z.y}px`,left:`${z.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:z.width??"auto",height:"auto",cursor:g==="none"?"default":"none"},children:q==="area"&&z.link?a.jsx("a",{href:z.link,target:"_blank",className:io.link,children:a.jsx("img",{src:z.url,alt:z.name,className:io.image},z.id)}):a.jsx("img",{src:z.url,alt:z.name,className:io.image},z.id)},z.id)),E&&a.jsx("div",{className:io.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${y})`,backgroundImage:`url('${g}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Zg={element:Yg,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:""}]}}}},Jg="LightBox-module__hidden___9s-9x",Qg="LightBox-module__heroImage___sTxNF",eh="LightBox-module__background___rm9ml",th="LightBox-module__editor___4ACaY",nh="LightBox-module__contentStyle___Bgnsq",ih="LightBox-module__imageStyle___tLIlB",oh="LightBox-module__imgWrapper___LuFUp",rh="LightBox-module__contain___8-yaS",ah="LightBox-module__cover___hNvOG",sh="LightBox-module__caption___b6L2I",lh="LightBox-module__captionTextInner___rCGNH",ch="LightBox-module__lightboxSplide___XFuWC",dh="LightBox-module__arrow___iz38X",uh="LightBox-module__arrowVertical___Zfz81",ph="LightBox-module__nextArrow___zkAQN",mh="LightBox-module__arrowInner___p48sW",gh="LightBox-module__arrowIcon___3VaFf",hh="LightBox-module__arrowImg___pNV88",fh="LightBox-module__mirror___pjeXc",yh="LightBox-module__thumbsWrapper___GB-nU",vh="LightBox-module__thumbsContainerVertical___wttk5",xh="LightBox-module__thumbsContainer___osSma",bh="LightBox-module__thumbsAlignStart___MO6tY",Sh="LightBox-module__thumbsAlignCenter___Q4sUx",wh="LightBox-module__thumbsAlignEnd___p4y9R",$h="LightBox-module__thumbItem___HvnF3",Ch="LightBox-module__closeButton___g2khP",Th="LightBox-module__fadeIn___0m5GW",Lh="LightBox-module__slideInLeft___gPYwC",Ph="LightBox-module__slideInRight___S-pPp",Ih="LightBox-module__slideInTop___DFdAj",Rh="LightBox-module__slideInBottom___m27kZ",kh="LightBox-module__fadeOut___55qBR",Eh="LightBox-module__slideOutLeft___NvU7P",Mh="LightBox-module__slideOutRight___SK7eC",Ah="LightBox-module__slideOutTop___Vgg0z",Fh="LightBox-module__slideOutBottom___nJ0Ef",Nh="LightBox-module__scaleSlide___vZriG",ct={hidden:Jg,heroImage:Qg,background:eh,editor:th,contentStyle:nh,imageStyle:ih,imgWrapper:oh,contain:rh,cover:ah,caption:sh,captionTextInner:lh,lightboxSplide:ch,arrow:dh,arrowVertical:uh,nextArrow:ph,arrowInner:mh,arrowIcon:gh,arrowImg:hh,mirror:fh,thumbsWrapper:yh,thumbsContainerVertical:vh,thumbsContainer:xh,thumbsAlignStart:bh,thumbsAlignCenter:Sh,thumbsAlignEnd:wh,thumbItem:$h,closeButton:Ch,fadeIn:Th,slideInLeft:Lh,slideInRight:Ph,slideInTop:Ih,slideInBottom:Rh,fadeOut:kh,slideOutLeft:Eh,slideOutRight:Mh,slideOutTop:Ah,slideOutBottom:Fh,scaleSlide:Nh},Ar=(e,t,n)=>{const i={},[o,r]=e.split("-");return o==="top"?(i.top="0",i.bottom="auto"):o==="middle"?(i.top="50%",i.bottom="auto"):o==="bottom"&&(i.top="auto",i.bottom="0"),r==="left"?(i.left="0",i.right="auto"):r==="center"?(i.left="50%",i.right="auto"):r==="right"&&(i.left="auto",i.right="0"),o==="middle"&&r==="center"?i.transform=`translate(calc(-50% + ${_.scalingValue(t.x,n)}), calc(-50% + ${_.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${_.scalingValue(t.x,n)}, calc(-50% + ${_.scalingValue(t.y,n)}))`:r==="center"?i.transform=`translate(calc(-50% + ${_.scalingValue(t.x,n)}), ${_.scalingValue(t.y,n)})`:i.transform=`translate(${_.scalingValue(t.x,n)}, ${_.scalingValue(t.y,n)})`,i};function wu(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 _h(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 $u(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,r=n/i;if(r>o){const d=e;return{renderedW:d,renderedH:d/r}}const l=t;return{renderedW:l*r,renderedH:l}}function Hh(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,r=n/i;if(r>o){const d=t;return{renderedW:d*r,renderedH:d}}const l=e;return{renderedW:l,renderedH:l/r}}function Cu(e,t,n,i,o){const{x:r,y:l}=_h(o);return{offsetX:r*(e-n),offsetY:l*(t-i)}}function Wh(e){const t=e.getBoundingClientRect(),n=t.width,i=t.height;if(!n||!i)return"center center";const o=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,r=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight,{objectFit:l,objectPosition:d}=window.getComputedStyle(e),c=l==="cover"?Hh:$u,{renderedW:u,renderedH:p}=c(n,i,o,r),{offsetX:x,offsetY:y}=Cu(n,i,u,p,d),m=(x+u/2)/n*100,g=(y+p/2)/i*100;return`${m}% ${g}%`}function Oh(e){return Wh(e)}function ga(e){const t=e.getBoundingClientRect(),n=wu(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),r=e.naturalWidth,l=e.naturalHeight,{renderedW:d,renderedH:c}=$u(i,o,r,l),u=window.getComputedStyle(e).objectPosition,{offsetX:p,offsetY:x}=Cu(i,o,d,c,u),y=t.left+n.left,m=t.top+n.top;return{x:p+y,y:x+m,width:d,height:c}}function ic(e){const t=e.getBoundingClientRect(),n=wu(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Dh(e,t){const n=(()=>{if(e==="fade in")return ct.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return ct.slideInLeft;case"right":return ct.slideInRight;case"top":return ct.slideInTop;case"bottom":return ct.slideInBottom;default:return ct.slideInRight}return ct.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return ct.fadeIn;if(e==="slide in")switch(t){case"left":return ct.slideInLeft;case"right":return ct.slideInRight;case"top":return ct.slideInTop;case"bottom":return ct.slideInBottom;default:return ct.slideInRight}return ct.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return ct.fadeOut;if(e==="slide in")switch(t){case"left":return ct.slideOutLeft;case"right":return ct.slideOutRight;case"top":return ct.slideOutTop;case"bottom":return ct.slideOutBottom;default:return ct.slideOutRight}return ct.fadeOut})(),r=(()=>{if(e==="fade in")return ct.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return ct.slideOutLeft;case"right":return ct.slideOutRight;case"top":return ct.slideOutTop;case"bottom":return ct.slideOutBottom;default:return ct.slideOutRight}return ct.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:r}}const zh=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:r,isPreviewMode:l})=>{const[d,c]=s.useState(!1),{url:u}=e.thumbnailBlock.cover;return s.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:u,alt:"Cover",className:ct.heroImage,onClick:()=>c(!0)}),a.jsx(Bh,{isOpen:d,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:r})]})},Bh=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:r,isEditor:l,metadata:d})=>{var Ce;const{widthSettings:c,fontSettings:u,letterSpacing:p,textAlign:x,wordSpacing:y,fontSizeLineHeight:m,textAppearance:g,color:v}=i.imageCaption??{},[b,E]=s.useState(0),[f,w]=s.useState(0),[G,X]=s.useState(!1),[M,T]=s.useState(!1),[N,q]=s.useState({}),$=s.useRef(null),I=s.useRef(null),W=s.useRef(null),O=s.useRef(!1),C=s.useRef(null),L=s.useRef(null),z=s.useRef(null),S=s.useRef(null),K=s.useRef(!1),k=s.useRef(null),[H,j]=s.useState(!1),{appear:ne,triggers:oe,slider:R,thumbnail:ce,controls:D,area:le,caption:ie,layout:we}=o.lightboxBlock,{appearClass:Ie,backdropAppearClass:xe,backdropDisappearClass:pe,disappearClass:Y}=Dh(ne.type,ne.direction),ae=(d==null?void 0:d.itemId)??null;s.useEffect(()=>{const h=()=>{setTimeout(()=>{var Z,te;(te=(Z=$.current)==null?void 0:Z.splide)==null||te.refresh()},16)},U=()=>{w(Z=>Z+1)};return window.addEventListener("ArticleEditor.Layout:change",h),window.addEventListener("ArticleEditor.ComponentContent:change",U),()=>{window.removeEventListener("ArticleEditor.Layout:change",h),window.removeEventListener("ArticleEditor.ComponentContent:change",U)}},[]),s.useEffect(()=>{if(!e||!ce.isActive){j(!1);return}const h=k.current;if(!h)return;const U=()=>{R.direction==="horiz"?j(h.scrollWidth>h.clientWidth):j(h.scrollHeight>h.clientHeight)};U();const Z=new ResizeObserver(U);return Z.observe(h),()=>Z.disconnect()},[e,ce.isActive,n.length,N,R.direction]);const se=s.useCallback(()=>{const h=window.matchMedia("(max-width: 768px)").matches,U=_.getColorAlpha(le.color);h&&!l&&U>.9&&(document.body.style.backgroundColor=""),X(!0),O.current=!0;const Z=te=>{te.target===C.current&&te.animationName&&(C.current&&L.current&&C.current.removeEventListener("animationend",L.current),L.current=null,O.current&&(O.current=!1,t()),X(!1))};C.current&&(L.current=Z,C.current.addEventListener("animationend",Z))},[t,le.color,l]),Re=(h,U,Z)=>{var te,me;if(h){if(oe.type==="click"&&oe.switch==="image")oe.repeat==="close"&&b===n.length-1?se():(te=$.current)==null||te.go("+1");else if(oe.type==="click"&&oe.switch==="50/50"){const B=h.getBoundingClientRect(),P=U-B.left,Q=Z-B.top,ee=B.width,de=B.height;let V;R.direction==="horiz"?V=P<ee/2?"-1":"+1":V=Q<de/2?"-1":"+1",(me=$.current)==null||me.go(V)}}},$e=h=>{if(K.current){K.current=!1;return}const U=n[b],Z=(U==null?void 0:U.image.objectFit)==="cover";let te,me;if("changedTouches"in h&&h.changedTouches.length>0)te=h.changedTouches[0].clientX,me=h.changedTouches[0].clientY;else if("clientX"in h)te=h.clientX,me=h.clientY;else return;let B;if(Z&&W.current){const P=ic(W.current);B=te>=P.left&&te<=P.right&&me>=P.top&&me<=P.bottom}else{const P=W.current?ga(W.current):null;if(!P){h.target===h.currentTarget&&se();return}B=te>=P.x&&te<=P.x+P.width&&me>=P.y&&me<=P.y+P.height}B?Re(W.current,te,me):se()},Me=h=>{const U=h.target;(U.classList.contains(ct.thumbsWrapper)||U.classList.contains(ct.thumbsContainer))&&$e(h)};s.useEffect(()=>{if(!e)return;const h=U=>{var Z,te;if(U.key==="Escape"){se();return}if(U.key==="ArrowRight"){E(me=>(me+1)%Math.max(n.length,1)),(Z=$.current)==null||Z.go("+1");return}U.key==="ArrowLeft"&&(E(me=>(me-1+Math.max(n.length,1))%Math.max(n.length,1)),(te=$.current)==null||te.go("-1"))};return window.addEventListener("keydown",h),()=>{window.removeEventListener("keydown",h)}},[e,se,n.length]),s.useEffect(()=>{if(e){if(E(0),w(U=>U+1),O.current=!1,X(!1),T(!1),q({}),!ae)return;const h=new CustomEvent("page-overlay",{detail:{itemId:ae}});window.dispatchEvent(h)}return()=>{C.current&&L.current&&(C.current.removeEventListener("animationend",L.current),L.current=null),T(!1)}},[e,ae]),s.useEffect(()=>{I.current!==null&&I.current!==R.type&&w(h=>h+1),I.current=R.type},[R.type]),s.useEffect(()=>{if(!e)return;const h=document.body.style.overflow,U=window.matchMedia("(max-width: 768px)").matches,Z=_.getColorAlpha(le.color);document.body.style.overflow="hidden",T(!1);const te=B=>{B.target===C.current&&!O.current&&B.animationName&&(U&&!l&&Z>.9&&(document.body.style.backgroundColor=le.color),T(!0),C.current&&z.current&&C.current.removeEventListener("animationend",z.current),z.current=null)};C.current&&(z.current=te,C.current.addEventListener("animationend",te));const me=B=>{const P=B.target;P&&(P.closest(`.${ct.thumbsWrapper}`)||P.closest(`.${ct.thumbsContainer}`))||R.type!=="slide"&&B.preventDefault()};return document.addEventListener("touchmove",me,{passive:!1}),()=>{document.body.style.overflow=h,document.removeEventListener("touchmove",me),C.current&&z.current&&(C.current.removeEventListener("animationend",z.current),z.current=null),T(!1)}},[e,l,le.color,R.type]),s.useEffect(()=>{if(!e)return;const h=U=>{var te,me;if(O.current){U.stopPropagation();return}if(K.current){K.current=!1;return}const Z=U.target;if(!(Z&&(Z.closest(`.${ct.thumbsContainer}`)||Z.closest(`.${ct.thumbItem}`)||Z.closest(`.${ct.arrow}`)||Z.closest(`.${ct.closeButton}`)||Z.closest(`.${ct.caption}`)))){if(R.type==="slide"&&oe.type==="drag"&&((me=(te=$.current)==null?void 0:te.splide)!=null&&me.root)){const B=$.current.splide.root;if(Z&&(B.contains(Z)||B===Z))return}if(U.touches.length===0&&U.changedTouches.length>0){const B=n[b],P=(B==null?void 0:B.image.objectFit)==="cover",Q=U.changedTouches[0];let ee;if(P&&W.current){const de=ic(W.current);ee=Q.clientX>=de.left&&Q.clientX<=de.right&&Q.clientY>=de.top&&Q.clientY<=de.bottom}else{const de=W.current?ga(W.current):null;if(!de)return;ee=Q.clientX>=de.x&&Q.clientX<=de.x+de.width&&Q.clientY>=de.y&&Q.clientY<=de.y+de.height}if(!ee){U.stopPropagation(),O.current=!0;const de=V=>{V.stopPropagation(),V.preventDefault(),document.removeEventListener("click",de,!0)};document.addEventListener("click",de,!0),se()}}}};return document.addEventListener("touchend",h,{passive:!0}),()=>{document.removeEventListener("touchend",h)}},[e,se,b,n]);const ve=(R.type==="scale"||R.type==="fade")&&R.direction==="vert"&&oe.type==="drag";s.useEffect(()=>{var V,Pe;if(!e||!ve||!((Pe=(V=$.current)==null?void 0:V.splide)!=null&&Pe.root))return;const h=$.current.splide.root,U=30,Z=(he,J)=>{if(S.current){const Ne=Math.abs(he-S.current.x),Be=Math.abs(J-S.current.y);(Ne>0||Be>0)&&(K.current=!0)}},te=he=>{S.current&&(he.preventDefault(),Z(he.clientX,he.clientY))},me=he=>{S.current&&he.touches.length>0&&(he.preventDefault(),Z(he.touches[0].clientX,he.touches[0].clientY))},B=(he,J)=>{if(!S.current||!$.current){S.current=null;return}const Ne=Math.abs(he-S.current.x),Be=Math.abs(J-S.current.y);Be>U&&Be>Ne&&$.current.go(J<S.current.y?"+1":"-1"),S.current=null},P=he=>{S.current&&B(he.clientX,he.clientY),document.removeEventListener("pointerup",P),document.removeEventListener("pointercancel",P),document.removeEventListener("pointermove",te)},Q=he=>{if(S.current){if(he.changedTouches.length>0){const J=he.changedTouches[0];B(J.clientX,J.clientY)}document.removeEventListener("touchend",Q),document.removeEventListener("touchcancel",Q),document.removeEventListener("touchmove",me)}},ee=he=>{S.current={x:he.clientX,y:he.clientY},K.current=!1,document.addEventListener("pointermove",te,{passive:!1}),document.addEventListener("pointerup",P),document.addEventListener("pointercancel",P)},de=he=>{he.touches.length>0&&(S.current={x:he.touches[0].clientX,y:he.touches[0].clientY},K.current=!1,document.addEventListener("touchmove",me,{passive:!1}),document.addEventListener("touchend",Q),document.addEventListener("touchcancel",Q))};return h.addEventListener("pointerdown",ee),h.addEventListener("touchstart",de),()=>{h.removeEventListener("pointerdown",ee),h.removeEventListener("touchstart",de),document.removeEventListener("pointermove",te),document.removeEventListener("pointerup",P),document.removeEventListener("pointercancel",P),document.removeEventListener("touchmove",me),document.removeEventListener("touchend",Q),document.removeEventListener("touchcancel",Q),S.current=null,K.current=!1}},[e,ve,f]);const be={backgroundColor:le.color,backdropFilter:`blur(${le.blur}px)`,animationDuration:`${parseInt(ne.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(r)?null:li.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:l?null:C,className:Ct(ct.background,G?pe:xe,{[ct.editor]:l},{[ct.hidden]:!e}),style:{...be,...M&&!l&&!G?{position:"absolute"}:{}}}),a.jsxs("div",{ref:l?C:null,className:Ct(ct.contentStyle,G?Y:Ie,{[ct.editor]:l},{[ct.hidden]:!e}),style:{animationDuration:`${parseInt(ne.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(wl,{onMove:h=>E(h.index),ref:$,className:ct.lightboxSplide,options:{arrows:!1,speed:R.duration?parseInt(R.duration):500,direction:R.direction==="horiz"||R.type==="fade"||R.type==="scale"?"ltr":"ttb",pagination:!1,drag:oe.type==="drag"&&!ve,perPage:1,width:"100%",height:"100%",type:R.type==="fade"||R.type==="scale"?"fade":"loop",padding:0,rewind:oe.repeat!=="close",start:0},style:{"--splide-speed":R.duration},children:n.map((h,U)=>{const Z=Ar(we.position,we.offset,l),te=`${_.scalingValue(we.padding.top,l)} ${_.scalingValue(we.padding.right,l)} ${_.scalingValue(we.padding.bottom,l)} ${_.scalingValue(we.padding.left,l)}`,me=R.type==="scale"?(()=>{const{transform:B,...P}=Z;return{...P,position:"absolute",padding:te,boxSizing:"border-box","--position-transform":B||"none"}})():{...Z,position:"absolute",padding:te,boxSizing:"border-box"};return a.jsx($l,{children:a.jsx("div",{className:ct.imgWrapper,onClick:$e,children:a.jsx("img",{ref:U===b?W:null,className:Ct(ct.imageStyle,{[ct.contain]:h.image.objectFit==="contain",[ct.cover]:h.image.objectFit==="cover",[ct.scaleSlide]:R.type==="scale"}),src:h.image.url,alt:h.image.name??"",style:{...me,pointerEvents:h.image.objectFit==="contain"?"none":"auto"}})})},U)})},f),D.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Ct(ct.arrow,{[ct.arrowVertical]:R.direction==="vert"}),style:{color:D.color,"--arrow-hover-color":D.hover},children:a.jsxs("button",{className:ct.arrowInner,style:{transform:`translate(${_.scalingValue(D.offset.x,l)}, ${_.scalingValue(D.offset.y*(R.direction==="horiz"?1:-1),l)}) scale(${D.scale}) rotate(${R.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var h;return(h=$.current)==null?void 0:h.go("-1")},"aria-label":"Previous",children:[D.arrowsImgUrl&&a.jsx(pn,{url:D.arrowsImgUrl,fill:D.color,hoverFill:D.hover,className:Ct(ct.arrowImg,ct.mirror)}),!D.arrowsImgUrl&&a.jsx(oc,{color:D.color,className:Ct(ct.arrowIcon,ct.arrowImg,ct.mirror)})]})}),a.jsx("div",{className:Ct(ct.arrow,ct.nextArrow,{[ct.arrowVertical]:R.direction==="vert"}),style:{color:D.color,"--arrow-hover-color":D.hover},children:a.jsxs("button",{className:ct.arrowInner,style:{transform:`translate(${_.scalingValue(D.offset.x*(R.direction==="horiz"?-1:1),l)}, ${_.scalingValue(D.offset.y,l)}) scale(${D.scale}) rotate(${R.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var h;return(h=$.current)==null?void 0:h.go("+1")},"aria-label":"Next",children:[D.arrowsImgUrl&&a.jsx(pn,{url:D.arrowsImgUrl,fill:D.color,hoverFill:D.hover,className:ct.arrowImg}),!D.arrowsImgUrl&&a.jsx(oc,{color:D.color,className:Ct(ct.arrowIcon,ct.arrowImg)})]})})]}),le.closeIconUrl&&(()=>{const h=Ar(le.closeIconAlign,le.closeIconOffset,l),U=`scale(${le.closeIconScale})`,Z=h.transform?`${h.transform} ${U}`:U;return a.jsx("button",{className:ct.closeButton,style:{...h,transform:Z},onClick:se,"aria-label":"Close lightbox",children:a.jsx(pn,{url:le.closeIconUrl,fill:le.closeIconColor??"#000000",hoverFill:le.closeIconHover??"#cccccc"})})})(),ie&&ie.isActive&&i.imageCaption&&((Ce=n[b])==null?void 0:Ce.imageCaption)&&a.jsx("div",{className:ct.caption,style:{...Ar(ie.alignment,ie.offset,l),fontFamily:zo(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:c.sizing==="auto"?"max-content":_.scalingValue(c.width,l),letterSpacing:_.scalingValue(p,l),wordSpacing:_.scalingValue(y,l),textAlign:x,fontSize:_.scalingValue(m.fontSize,l),lineHeight:_.scalingValue(m.lineHeight,l),textTransform:g.textTransform??"none",textDecoration:g.textDecoration??"none",fontVariant:g.fontVariant??"normal",color:v},onClick:h=>h.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:ct.captionTextInner,style:{"--link-color":ie.linkColor,"--link-hover-color":ie.linkHoverColor},children:a.jsx(Zi,{content:n[b].imageCaption})})}),ce.isActive&&(()=>{const[h,U]=ce.position.split("-"),Z=R.direction==="horiz"?`${h}-left`:ce.position,te=Ar(Z,ce.offset,l),me=()=>{if(R.direction==="horiz"){if(U==="left")return"flex-start";if(U==="center")return"center";if(U==="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:k,className:ct.thumbsWrapper,onClick:B=>Me(B),style:{position:l?"absolute":"fixed",...te,...R.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:Ct(ct.thumbsContainer,{[ct.thumbsContainerVertical]:R.direction==="vert",[ct.thumbsAlignStart]:ce.align==="start",[ct.thumbsAlignCenter]:ce.align==="center",[ct.thumbsAlignEnd]:ce.align==="end"}),style:{gap:_.scalingValue(ce.grid.gap,l),justifyContent:H?"flex-start":me()},children:n.map((B,P)=>{const Q=P===b,ee=N[P],V=ce.grid.size*(Q?ce.activeState.scale:1),Pe=()=>{if(ce.fit!=="fit")return{};if(!ee)return R.direction==="horiz"?{height:_.scalingValue(V,l)}:{width:_.scalingValue(V,l)};const he=ee.width/ee.height;if(R.direction==="horiz"){const J=V,Ne=J*he;return{width:_.scalingValue(Ne,l),height:_.scalingValue(J,l)}}else{const J=V,Ne=J/he;return{width:_.scalingValue(J,l),height:_.scalingValue(Ne,l)}}};return a.jsx("button",{className:ct.thumbItem,style:{...R.direction==="horiz"&&ce.fit!=="fit"?{height:_.scalingValue(V,l)}:{},...R.direction==="vert"&&ce.fit!=="fit"?{width:_.scalingValue(V,l)}:{},...ce.fit==="cover"?{width:_.scalingValue(V,l),height:_.scalingValue(V,l)}:{},...Pe(),transition:Q?"all 0.25s ease-out":"none",opacity:Q?ce.activeState.opacity/100:ce.opacity/100,"--thumb-hover":ce.activeState.opacity/100},onClick:he=>{var J;he.stopPropagation(),E(P),(J=$.current)==null||J.go(P)},onMouseEnter:()=>{var he;ce.triggers==="hov"&&((he=$.current)==null||he.go(P))},children:a.jsx("img",{src:B.image.url,alt:B.image.name??"",onLoad:he=>{const J=he.currentTarget;J.naturalWidth&&J.naturalHeight&&q(Ne=>({...Ne,[P]:{width:J.naturalWidth,height:J.naturalHeight}}))},style:{objectFit:ce.fit==="cover"?"cover":"contain",...ce.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ce.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${B.image.name}-${P}`)})})})})()]})]}),document.getElementById(r))};function oc({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 jh={element:zh,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Lightbox.png"},defaultSize:{d:{width:440,height:550},t:{width:235,height:293},m:{width:265,height:331}},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.url",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{url:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"slide in",duration:"1000ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.01,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:0,bottom:.06,left:0}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},linkColor:"#cccccc",linkHoverColor:"#cccccc"}}},m:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"horiz",duration:"1000ms"},thumbnail:{isActive:!0,position:"bottom-center",fit:"fit",align:"start",triggers:"hov",grid:{size:.1,gap:.05},offset:{x:.01,y:-.05},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.05,bottom:.06,left:.05}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}},t:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/2.jpg",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/3.jpg",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/4.jpg",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}};function Fr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Vh(e){return`
6
+ */const Fg="RichTextRenderer-module__link___BWeZ2",Ng={link:Fg},_g=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(i=>/^\d/.test(i))},zo=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>_g(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function dn(e){const{color:t,...n}=e;return n}function Qt(e,t){var o,r,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:zo(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing: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 Su(e){return e!=null&&e.length?e.some(t=>t.type==="link"?Su(t.children):!!t.text):!1}const Zi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?a.jsx("a",{className:Ng.link,href:i.value,target:i.target,children:t(i.children)},o):a.jsx("span",{style:Hg(i),children:i.text},o));return a.jsx(a.Fragment,{children:e.map((n,i)=>{const o=n.children;return a.jsx("div",{children:Su(o)?t(o):" "},i)})})};function Hg(e){return{...e.fontFamily&&{fontFamily:zo(e.fontFamily)},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}const Wg="SvgImage-module__svg___q3xE-",Og="SvgImage-module__img___VsTm-",ec={svg:Wg,img:Og},Dg=e=>{const t=e.trim().toLowerCase();return!!(t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")||t.includes(".svg")||t.startsWith("blob:"))},zg=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("")'));return s.useEffect(()=>{if(typeof window<"u"&&window.CSS){const c=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');l(c)}},[]),!Dg(e)||!r?a.jsx("img",{src:e,alt:"",className:Lt(ec.img,i),style:o}):a.jsx("span",{"data-supports-mask":r,className:Lt(ec.svg,i),style:{"--svg":zg(e),"--fill":t,"--hover-fill":n,...o??{}}})},Bg={"top-left":Ct.topLeftAlignment,"top-center":Ct.topCenterAlignment,"top-right":Ct.topRightAlignment,"middle-left":Ct.middleLeftAlignment,"middle-center":Ct.middleCenterAlignment,"middle-right":Ct.middleRightAlignment,"bottom-left":Ct.bottomLeftAlignment,"bottom-center":Ct.bottomCenterAlignment,"bottom-right":Ct.bottomRightAlignment};function jg({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:m}=n.imageCaption??{},[g,x]=s.useState(void 0),[b,E]=s.useState(null),[f,w]=s.useState(0),[G,X]=s.useState(0),{direction:k,transition:L,controls:A,pagination:U,imageCaption:$,triggers:P}=e,H=s.useRef(L.type),{x:W,y:C}=e.controls.offset,T=B=>{o&&o.go(B)};return s.useEffect(()=>{if(!b)return;const B=new ResizeObserver(S=>{if(!o)return;const[K]=S;x({width:Math.round(K.contentRect.width),height:Math.round(K.contentRect.height)})});return B.observe(b),()=>B.unobserve(b)},[b]),s.useEffect(()=>{!o||H.current===L.type||(X(B=>B+1),H.current=L.type)},[L.type]),a.jsx("div",{className:Lt(Ct.wrapper,{[Ct.editor]:i}),ref:E,children:a.jsxs("div",{className:Ct.sliderInner,style:{width:g?g.width:"100%",height:g?g.height:"100%",backgroundColor:L.backgroundColor&&L.type==="fade in"?L.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:Lt(Ct.captionBlock),children:a.jsx("div",{className:Ct.captionTextWrapper,children:t.map((B,S)=>a.jsx("div",{className:Lt(Ct.captionText,Bg[$.alignment],{[Ct.withPointerEvents]:S===f&&i,[Ct.active]:S===f}),style:{fontFamily:zo(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:m,transitionDuration:L.duration?`${Math.round(parseInt(L.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:Ct.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(Zi,{content:B.imageCaption})})},S))})}),a.jsx(wl,{onMove:B=>{w(B.index)},ref:r,options:{arrows:!1,speed:L.duration?parseInt(L.duration):500,autoplay:P.autoPlay!==null,...P.autoPlay!==null&&{interval:parseInt(P.autoPlay)*1e3},direction:k==="horiz"||L.type==="fade in"?"ltr":"ttb",pagination:!1,drag:P.triggersList.drag,perPage:1,width:g?g.width:"100%",height:g?g.height:"100%",type:L.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((B,S)=>a.jsx($l,{children:a.jsx("div",{className:Ct.sliderItem,children:a.jsx("div",{className:Ct.imgWrapper,children:a.jsx("img",{className:Lt(Ct.sliderImage,{[Ct.contain]:B.image.objectFit==="contain",[Ct.cover]:B.image.objectFit==="cover"}),src:B.image.url,alt:B.image.name??""})})})},S))},G),A.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Lt(Ct.arrow,{[Ct.arrowVertical]:k==="vert",[Ct.hoverArrow]:A.show==="on hover"}),style:{color:A.color,"--arrow-hover-color":A.hover},children:a.jsxs("button",{onClick:()=>{T("-1")},className:Ct.arrowInner,style:{transform:`translate(${F.scalingValue(W,i)}, ${F.scalingValue(C*(k==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${k==="horiz"?"0deg":"90deg"})`},children:[A.arrowsImgUrl&&a.jsx(mn,{url:A.arrowsImgUrl,fill:A.color,hoverFill:A.hover,className:Lt(Ct.arrowImg,Ct.mirror)}),!A.arrowsImgUrl&&a.jsx(tc,{color:A.color,className:Lt(Ct.arrowIcon,Ct.arrowImg,Ct.mirror)})]})}),a.jsx("div",{className:Lt(Ct.arrow,Ct.nextArrow,{[Ct.arrowVertical]:k==="vert",[Ct.hoverArrow]:A.show==="on hover"}),style:{color:A.color,"--arrow-hover-color":A.hover},children:a.jsxs("button",{className:Ct.arrowInner,onClick:()=>T("+1"),style:{transform:`translate(${F.scalingValue(W*(k==="horiz"?-1:1),i)}, ${F.scalingValue(C,i)}) scale(${e.controls.scale/100}) rotate(${k==="horiz"?"0deg":"90deg"})`},children:[A.arrowsImgUrl&&a.jsx(mn,{url:A.arrowsImgUrl,fill:A.color,hoverFill:A.hover,className:Ct.arrowImg}),!A.arrowsImgUrl&&a.jsx(tc,{color:A.color,className:Lt(Ct.arrowIcon,Ct.arrowImg)})]})})]}),P.triggersList.click&&a.jsx("div",{className:Ct.clickOverlay,onClick:()=>{o&&o.go("+1")}}),U.isActive&&a.jsx("div",{className:Lt(Ct.pagination,{[Ct.paginationInsideBottom]:U.position==="inside-1"&&k==="horiz",[Ct.paginationInsideTop]:U.position==="inside-2"&&k==="horiz",[Ct.paginationOutsideBottom]:U.position==="outside-1"&&k==="horiz",[Ct.paginationOutsideTop]:U.position==="outside-2"&&k==="horiz",[Ct.paginationInsideLeft]:U.position==="inside-1"&&k==="vert",[Ct.paginationInsideRight]:U.position==="inside-2"&&k==="vert",[Ct.paginationOutsideLeft]:U.position==="outside-1"&&k==="vert",[Ct.paginationOutsideRight]:U.position==="outside-2"&&k==="vert",[Ct.paginationVertical]:k==="vert"}),children:a.jsx("div",{className:Ct.paginationInner,style:{backgroundColor:U.colors[2],transform:`scale(${U.scale/100}) translate(${F.scalingValue(U.offset.x,i)}, ${F.scalingValue(U.offset.y,i)}) rotate(${k==="horiz"?"0deg":"90deg"})`},children:t.map((B,S)=>a.jsx("button",{onClick:()=>{o&&o.go(S)},className:Lt(Ct.paginationItem),children:a.jsx("div",{className:Lt(Ct.dot,{[Ct.activeDot]:S===f}),style:{backgroundColor:S===f?U.colors[0]:U.colors[1],"--pagination-hover-color":U.hover}})},S))})})]})})}function tc({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 Vg={element:jg,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"inside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},Gg="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Xg="ImageRevealSlider-module__image___Qjt-e",qg="ImageRevealSlider-module__link___N-iLG",Ug="ImageRevealSlider-module__cursor___2U03d",io={imageRevealSlider:Gg,image:Xg,link:qg,cursor:Ug};function nc(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const r=i.width?Number.parseFloat(i.width):o.naturalWidth,l=o.naturalHeight/o.naturalWidth*r,c=r/2,d=l/2;if(e>=i.x-c&&e<=i.x+c&&t>=i.y-d&&t<=i.y+d)return!0}return!1}function Va(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Kg(e,t,n,i){let o,r;if(t==="custom"){o=n;const l=await Va(e);r=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await Va(e);r=l.height/l.width*o}else{const l=await Va(e);o=l.width,r=l.height}return{width:o,height:r,finalWidth:`${o}px`}}function Yg({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,m]=s.useState(1),[g,x]=s.useState("none"),b=s.useRef({x:0,y:0}),[E,f]=s.useState(!1),{sizeType:w,imageWidth:G,randomRangeImageWidth:X}=e.imageSize,{revealPosition:k,visible:L}=e.position,{cursorType:A,target:U,defaultCursorScale:$,defaultCursor:P,hoverCursorScale:H,hoverCursor:W}=e.cursor;s.useEffect(()=>{if(!i)return;const B=(R,_)=>{const j=i.getBoundingClientRect(),oe=R-j.left,re=_-j.top;if(y({x:oe,y:re}),A==="system"){x("none"),m(1);return}const O=oe,ie=re,D=document.elementFromPoint(j.left+O,j.top+ie);if(D&&D.closest("a")){x("none"),m(1);return}const le=nc(O,ie,r)||U==="area"?{img:W??"none",scale:H}:{img:P??"none",scale:$};x(le.img),m(le.scale)},S=R=>{R.stopPropagation(),b.current={x:R.clientX,y:R.clientY},B(R.clientX,R.clientY)},K=()=>{E&&B(b.current.x,b.current.y)};return i.addEventListener("mousemove",S),window.addEventListener("scroll",K,!0),()=>{i.removeEventListener("mousemove",S),window.removeEventListener("scroll",K,!0)}},[i,E,p,A,U,W,P,H,$,r]),s.useEffect(()=>{E||(x("none"),m(0))},[E]);const C=async(B,S,K,R={})=>{const{width:_,height:j,finalWidth:oe}=await Kg(B.image.url,w,G,X);let re=0,O=0;k==="same"?(re=S/2,O=K/2):(re=R.x??Math.random()*S,O=R.y??Math.random()*K);const ie=Math.min(Math.max(re,_/2),S-_/2),D=Math.min(Math.max(O,j/2),K-j/2);return{id:u.current++,url:B.image.url,link:B.link,name:B.image.name,x:ie,y:D,width:oe}};s.useEffect(()=>{if(!i||t.length===0)return;const B=i.getBoundingClientRect(),S=B.width,K=B.height,R=[];(async()=>{const j=t[0],oe=await C(j,S,K);R.push(oe),l(R),d(1)})()},[w,G,X,k,i]),s.useEffect(()=>{L==="last One"&&l(B=>B.length>0?[B[B.length-1]]:[])},[L]);const T=async B=>{if(!i)return;const S=i.getBoundingClientRect(),K=B.clientX-S.left,R=B.clientY-S.top;if(U==="image"&&!nc(K,R,r))return;let _=0,j=0;k==="on Click"?(_=K,j=R):k==="same"?(_=S.width/2,j=S.height/2):(_=Math.random()*S.width,j=Math.random()*S.height);const oe=t[c],re=await C(oe,S.width,S.height,{x:_,y:j});l(O=>L==="all"?[...O,re]:[re]),d(O=>O>=t.length-1?0:O+1)};return a.jsxs("div",{ref:o,onClick:T,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),className:io.imageRevealSlider,style:{cursor:g==="none"?"default":"none"},children:[r.map(B=>a.jsx("div",{className:io.wrapper,style:{top:`${B.y}px`,left:`${B.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:B.width??"auto",height:"auto",cursor:g==="none"?"default":"none"},children:U==="area"&&B.link?a.jsx("a",{href:B.link,target:"_blank",className:io.link,children:a.jsx("img",{src:B.url,alt:B.name,className:io.image},B.id)}):a.jsx("img",{src:B.url,alt:B.name,className:io.image},B.id)},B.id)),E&&a.jsx("div",{className:io.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${v})`,backgroundImage:`url('${g}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Zg={element:Yg,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:""}]}}}},Jg="LightBox-module__hidden___9s-9x",Qg="LightBox-module__heroImage___sTxNF",eh="LightBox-module__background___rm9ml",th="LightBox-module__editor___4ACaY",nh="LightBox-module__contentStyle___Bgnsq",ih="LightBox-module__imageStyle___tLIlB",oh="LightBox-module__imgWrapper___LuFUp",rh="LightBox-module__contain___8-yaS",ah="LightBox-module__cover___hNvOG",sh="LightBox-module__caption___b6L2I",lh="LightBox-module__captionTextInner___rCGNH",ch="LightBox-module__lightboxSplide___XFuWC",dh="LightBox-module__arrow___iz38X",uh="LightBox-module__arrowVertical___Zfz81",ph="LightBox-module__nextArrow___zkAQN",mh="LightBox-module__arrowInner___p48sW",gh="LightBox-module__arrowIcon___3VaFf",hh="LightBox-module__arrowImg___pNV88",fh="LightBox-module__mirror___pjeXc",yh="LightBox-module__thumbsWrapper___GB-nU",vh="LightBox-module__thumbsContainerVertical___wttk5",xh="LightBox-module__thumbsContainer___osSma",bh="LightBox-module__thumbsAlignStart___MO6tY",Sh="LightBox-module__thumbsAlignCenter___Q4sUx",wh="LightBox-module__thumbsAlignEnd___p4y9R",$h="LightBox-module__thumbItem___HvnF3",Ch="LightBox-module__closeButton___g2khP",Th="LightBox-module__fadeIn___0m5GW",Lh="LightBox-module__slideInLeft___gPYwC",Ph="LightBox-module__slideInRight___S-pPp",Ih="LightBox-module__slideInTop___DFdAj",Rh="LightBox-module__slideInBottom___m27kZ",kh="LightBox-module__fadeOut___55qBR",Eh="LightBox-module__slideOutLeft___NvU7P",Mh="LightBox-module__slideOutRight___SK7eC",Ah="LightBox-module__slideOutTop___Vgg0z",Fh="LightBox-module__slideOutBottom___nJ0Ef",Nh="LightBox-module__scaleSlide___vZriG",at={hidden:Jg,heroImage:Qg,background:eh,editor:th,contentStyle:nh,imageStyle:ih,imgWrapper:oh,contain:rh,cover:ah,caption:sh,captionTextInner:lh,lightboxSplide:ch,arrow:dh,arrowVertical:uh,nextArrow:ph,arrowInner:mh,arrowIcon:gh,arrowImg:hh,mirror:fh,thumbsWrapper:yh,thumbsContainerVertical:vh,thumbsContainer:xh,thumbsAlignStart:bh,thumbsAlignCenter:Sh,thumbsAlignEnd:wh,thumbItem:$h,closeButton:Ch,fadeIn:Th,slideInLeft:Lh,slideInRight:Ph,slideInTop:Ih,slideInBottom:Rh,fadeOut:kh,slideOutLeft:Eh,slideOutRight:Mh,slideOutTop:Ah,slideOutBottom:Fh,scaleSlide:Nh},Ar=(e,t,n)=>{const i={},[o,r]=e.split("-");return o==="top"?(i.top="0",i.bottom="auto"):o==="middle"?(i.top="50%",i.bottom="auto"):o==="bottom"&&(i.top="auto",i.bottom="0"),r==="left"?(i.left="0",i.right="auto"):r==="center"?(i.left="50%",i.right="auto"):r==="right"&&(i.left="auto",i.right="0"),o==="middle"&&r==="center"?i.transform=`translate(calc(-50% + ${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 wu(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 _h(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 $u(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 Hh(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 Cu(e,t,n,i,o){const{x:r,y:l}=_h(o);return{offsetX:r*(e-n),offsetY:l*(t-i)}}function Wh(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"?Hh:$u,{renderedW:u,renderedH:p}=d(n,i,o,r),{offsetX:y,offsetY:v}=Cu(n,i,u,p,c),m=(y+u/2)/n*100,g=(v+p/2)/i*100;return`${m}% ${g}%`}function Oh(e){return Wh(e)}function ga(e){const t=e.getBoundingClientRect(),n=wu(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}=$u(i,o,r,l),u=window.getComputedStyle(e).objectPosition,{offsetX:p,offsetY:y}=Cu(i,o,c,d,u),v=t.left+n.left,m=t.top+n.top;return{x:p+v,y:y+m,width:c,height:d}}function ic(e){const t=e.getBoundingClientRect(),n=wu(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Dh(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 zh=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:r,isPreviewMode:l})=>{const[c,d]=s.useState(!1),{url:u}=e.thumbnailBlock.cover;return s.useEffect(()=>{o==="close"&&d(!1),o==="open"&&d(!0)},[o]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:u,alt:"Cover",className:at.heroImage,onClick:()=>d(!0)}),a.jsx(Bh,{isOpen:c,onClose:()=>d(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:r})]})},Bh=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:r,isEditor:l,metadata:c})=>{var Te;const{widthSettings:d,fontSettings:u,letterSpacing:p,textAlign:y,wordSpacing:v,fontSizeLineHeight:m,textAppearance:g,color:x}=i.imageCaption??{},[b,E]=s.useState(0),[f,w]=s.useState(0),[G,X]=s.useState(!1),[k,L]=s.useState(!1),[A,U]=s.useState({}),$=s.useRef(null),P=s.useRef(null),H=s.useRef(null),W=s.useRef(!1),C=s.useRef(null),T=s.useRef(null),B=s.useRef(null),S=s.useRef(null),K=s.useRef(!1),R=s.useRef(null),[_,j]=s.useState(!1),{appear:oe,triggers:re,slider:O,thumbnail:ie,controls:D,area:le,caption:ee,layout:ve}=o.lightboxBlock,{appearClass:Ie,backdropAppearClass:be,backdropDisappearClass:pe,disappearClass:Y}=Dh(oe.type,oe.direction),se=(c==null?void 0:c.itemId)??null;s.useEffect(()=>{const h=()=>{setTimeout(()=>{var Z,te;(te=(Z=$.current)==null?void 0:Z.splide)==null||te.refresh()},16)},q=()=>{w(Z=>Z+1)};return window.addEventListener("ArticleEditor.Layout:change",h),window.addEventListener("ArticleEditor.ComponentContent:change",q),()=>{window.removeEventListener("ArticleEditor.Layout:change",h),window.removeEventListener("ArticleEditor.ComponentContent:change",q)}},[]),s.useEffect(()=>{if(!e||!ie.isActive){j(!1);return}const h=R.current;if(!h)return;const q=()=>{O.direction==="horiz"?j(h.scrollWidth>h.clientWidth):j(h.scrollHeight>h.clientHeight)};q();const Z=new ResizeObserver(q);return Z.observe(h),()=>Z.disconnect()},[e,ie.isActive,n.length,A,O.direction]);const xe=s.useCallback(()=>{const h=window.matchMedia("(max-width: 768px)").matches,q=F.getColorAlpha(le.color);h&&!l&&q>.9&&(document.body.style.backgroundColor=""),X(!0),W.current=!0;const Z=te=>{te.target===C.current&&te.animationName&&(C.current&&T.current&&C.current.removeEventListener("animationend",T.current),T.current=null,W.current&&(W.current=!1,t()),X(!1))};C.current&&(T.current=Z,C.current.addEventListener("animationend",Z))},[t,le.color,l]),Se=(h,q,Z)=>{var te,ue;if(h){if(re.type==="click"&&re.switch==="image")re.repeat==="close"&&b===n.length-1?xe():(te=$.current)==null||te.go("+1");else if(re.type==="click"&&re.switch==="50/50"){const z=h.getBoundingClientRect(),I=q-z.left,Q=Z-z.top,ne=z.width,de=z.height;let V;O.direction==="horiz"?V=I<ne/2?"-1":"+1":V=Q<de/2?"-1":"+1",(ue=$.current)==null||ue.go(V)}}},Ce=h=>{if(K.current){K.current=!1;return}const q=n[b],Z=(q==null?void 0:q.image.objectFit)==="cover";let te,ue;if("changedTouches"in h&&h.changedTouches.length>0)te=h.changedTouches[0].clientX,ue=h.changedTouches[0].clientY;else if("clientX"in h)te=h.clientX,ue=h.clientY;else return;let z;if(Z&&H.current){const I=ic(H.current);z=te>=I.left&&te<=I.right&&ue>=I.top&&ue<=I.bottom}else{const I=H.current?ga(H.current):null;if(!I){h.target===h.currentTarget&&xe();return}z=te>=I.x&&te<=I.x+I.width&&ue>=I.y&&ue<=I.y+I.height}z?Se(H.current,te,ue):xe()},Ae=h=>{const q=h.target;(q.classList.contains(at.thumbsWrapper)||q.classList.contains(at.thumbsContainer))&&Ce(h)};s.useEffect(()=>{if(!e)return;const h=q=>{var Z,te;if(q.key==="Escape"){xe();return}if(q.key==="ArrowRight"){E(ue=>(ue+1)%Math.max(n.length,1)),(Z=$.current)==null||Z.go("+1");return}q.key==="ArrowLeft"&&(E(ue=>(ue-1+Math.max(n.length,1))%Math.max(n.length,1)),(te=$.current)==null||te.go("-1"))};return window.addEventListener("keydown",h),()=>{window.removeEventListener("keydown",h)}},[e,xe,n.length]),s.useEffect(()=>{if(e){if(E(0),w(q=>q+1),W.current=!1,X(!1),L(!1),U({}),!se)return;const h=new CustomEvent("page-overlay",{detail:{itemId:se}});window.dispatchEvent(h)}return()=>{C.current&&T.current&&(C.current.removeEventListener("animationend",T.current),T.current=null),L(!1)}},[e,se]),s.useEffect(()=>{P.current!==null&&P.current!==O.type&&w(h=>h+1),P.current=O.type},[O.type]),s.useEffect(()=>{if(!e)return;const h=document.body.style.overflow,q=window.matchMedia("(max-width: 768px)").matches,Z=F.getColorAlpha(le.color);document.body.style.overflow="hidden",L(!1);const te=z=>{z.target===C.current&&!W.current&&z.animationName&&(q&&!l&&Z>.9&&(document.body.style.backgroundColor=le.color),L(!0),C.current&&B.current&&C.current.removeEventListener("animationend",B.current),B.current=null)};C.current&&(B.current=te,C.current.addEventListener("animationend",te));const ue=z=>{const I=z.target;I&&(I.closest(`.${at.thumbsWrapper}`)||I.closest(`.${at.thumbsContainer}`))||O.type!=="slide"&&z.preventDefault()};return document.addEventListener("touchmove",ue,{passive:!1}),()=>{document.body.style.overflow=h,document.removeEventListener("touchmove",ue),C.current&&B.current&&(C.current.removeEventListener("animationend",B.current),B.current=null),L(!1)}},[e,l,le.color,O.type]),s.useEffect(()=>{if(!e)return;const h=q=>{var te,ue;if(W.current){q.stopPropagation();return}if(K.current){K.current=!1;return}const Z=q.target;if(!(Z&&(Z.closest(`.${at.thumbsContainer}`)||Z.closest(`.${at.thumbItem}`)||Z.closest(`.${at.arrow}`)||Z.closest(`.${at.closeButton}`)||Z.closest(`.${at.caption}`)))){if(O.type==="slide"&&re.type==="drag"&&((ue=(te=$.current)==null?void 0:te.splide)!=null&&ue.root)){const z=$.current.splide.root;if(Z&&(z.contains(Z)||z===Z))return}if(q.touches.length===0&&q.changedTouches.length>0){const z=n[b],I=(z==null?void 0:z.image.objectFit)==="cover",Q=q.changedTouches[0];let ne;if(I&&H.current){const de=ic(H.current);ne=Q.clientX>=de.left&&Q.clientX<=de.right&&Q.clientY>=de.top&&Q.clientY<=de.bottom}else{const de=H.current?ga(H.current):null;if(!de)return;ne=Q.clientX>=de.x&&Q.clientX<=de.x+de.width&&Q.clientY>=de.y&&Q.clientY<=de.y+de.height}if(!ne){q.stopPropagation(),W.current=!0;const de=V=>{V.stopPropagation(),V.preventDefault(),document.removeEventListener("click",de,!0)};document.addEventListener("click",de,!0),xe()}}}};return document.addEventListener("touchend",h,{passive:!0}),()=>{document.removeEventListener("touchend",h)}},[e,xe,b,n]);const fe=(O.type==="scale"||O.type==="fade")&&O.direction==="vert"&&re.type==="drag";s.useEffect(()=>{var V,Pe;if(!e||!fe||!((Pe=(V=$.current)==null?void 0:V.splide)!=null&&Pe.root))return;const h=$.current.splide.root,q=30,Z=(he,J)=>{if(S.current){const He=Math.abs(he-S.current.x),We=Math.abs(J-S.current.y);(He>0||We>0)&&(K.current=!0)}},te=he=>{S.current&&(he.preventDefault(),Z(he.clientX,he.clientY))},ue=he=>{S.current&&he.touches.length>0&&(he.preventDefault(),Z(he.touches[0].clientX,he.touches[0].clientY))},z=(he,J)=>{if(!S.current||!$.current){S.current=null;return}const He=Math.abs(he-S.current.x),We=Math.abs(J-S.current.y);We>q&&We>He&&$.current.go(J<S.current.y?"+1":"-1"),S.current=null},I=he=>{S.current&&z(he.clientX,he.clientY),document.removeEventListener("pointerup",I),document.removeEventListener("pointercancel",I),document.removeEventListener("pointermove",te)},Q=he=>{if(S.current){if(he.changedTouches.length>0){const J=he.changedTouches[0];z(J.clientX,J.clientY)}document.removeEventListener("touchend",Q),document.removeEventListener("touchcancel",Q),document.removeEventListener("touchmove",ue)}},ne=he=>{S.current={x:he.clientX,y:he.clientY},K.current=!1,document.addEventListener("pointermove",te,{passive:!1}),document.addEventListener("pointerup",I),document.addEventListener("pointercancel",I)},de=he=>{he.touches.length>0&&(S.current={x:he.touches[0].clientX,y:he.touches[0].clientY},K.current=!1,document.addEventListener("touchmove",ue,{passive:!1}),document.addEventListener("touchend",Q),document.addEventListener("touchcancel",Q))};return h.addEventListener("pointerdown",ne),h.addEventListener("touchstart",de),()=>{h.removeEventListener("pointerdown",ne),h.removeEventListener("touchstart",de),document.removeEventListener("pointermove",te),document.removeEventListener("pointerup",I),document.removeEventListener("pointercancel",I),document.removeEventListener("touchmove",ue),document.removeEventListener("touchend",Q),document.removeEventListener("touchcancel",Q),S.current=null,K.current=!1}},[e,fe,f]);const we={backgroundColor:le.color,backdropFilter:`blur(${le.blur}px)`,animationDuration:`${parseInt(oe.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(r)?null:Gn.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:l?null:C,className:Lt(at.background,G?pe:be,{[at.editor]:l},{[at.hidden]:!e}),style:{...we,...k&&!l&&!G?{position:"absolute"}:{}}}),a.jsxs("div",{ref:l?C:null,className:Lt(at.contentStyle,G?Y:Ie,{[at.editor]:l},{[at.hidden]:!e}),style:{animationDuration:`${parseInt(oe.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(wl,{onMove:h=>E(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:re.type==="drag"&&!fe,perPage:1,width:"100%",height:"100%",type:O.type==="fade"||O.type==="scale"?"fade":"loop",padding:0,rewind:re.repeat!=="close",start:0},style:{"--splide-speed":O.duration},children:n.map((h,q)=>{const Z=Ar(ve.position,ve.offset,l),te=`${F.scalingValue(ve.padding.top,l)} ${F.scalingValue(ve.padding.right,l)} ${F.scalingValue(ve.padding.bottom,l)} ${F.scalingValue(ve.padding.left,l)}`,ue=O.type==="scale"?(()=>{const{transform:z,...I}=Z;return{...I,position:"absolute",padding:te,boxSizing:"border-box","--position-transform":z||"none"}})():{...Z,position:"absolute",padding:te,boxSizing:"border-box"};return a.jsx($l,{children:a.jsx("div",{className:at.imgWrapper,onClick:Ce,children:a.jsx("img",{ref:q===b?H:null,className:Lt(at.imageStyle,{[at.contain]:h.image.objectFit==="contain",[at.cover]:h.image.objectFit==="cover",[at.scaleSlide]:O.type==="scale"}),src:h.image.url,alt:h.image.name??"",style:{...ue,pointerEvents:h.image.objectFit==="contain"?"none":"auto"}})})},q)})},f),D.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Lt(at.arrow,{[at.arrowVertical]:O.direction==="vert"}),style:{color:D.color,"--arrow-hover-color":D.hover},children:a.jsxs("button",{className:at.arrowInner,style:{transform:`translate(${F.scalingValue(D.offset.x,l)}, ${F.scalingValue(D.offset.y*(O.direction==="horiz"?1:-1),l)}) scale(${D.scale}) rotate(${O.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var h;return(h=$.current)==null?void 0:h.go("-1")},"aria-label":"Previous",children:[D.arrowsImgUrl&&a.jsx(mn,{url:D.arrowsImgUrl,fill:D.color,hoverFill:D.hover,className:Lt(at.arrowImg,at.mirror)}),!D.arrowsImgUrl&&a.jsx(oc,{color:D.color,className:Lt(at.arrowIcon,at.arrowImg,at.mirror)})]})}),a.jsx("div",{className:Lt(at.arrow,at.nextArrow,{[at.arrowVertical]:O.direction==="vert"}),style:{color:D.color,"--arrow-hover-color":D.hover},children:a.jsxs("button",{className:at.arrowInner,style:{transform:`translate(${F.scalingValue(D.offset.x*(O.direction==="horiz"?-1:1),l)}, ${F.scalingValue(D.offset.y,l)}) scale(${D.scale}) rotate(${O.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var h;return(h=$.current)==null?void 0:h.go("+1")},"aria-label":"Next",children:[D.arrowsImgUrl&&a.jsx(mn,{url:D.arrowsImgUrl,fill:D.color,hoverFill:D.hover,className:at.arrowImg}),!D.arrowsImgUrl&&a.jsx(oc,{color:D.color,className:Lt(at.arrowIcon,at.arrowImg)})]})})]}),le.closeIconUrl&&(()=>{const h=Ar(le.closeIconAlign,le.closeIconOffset,l),q=`scale(${le.closeIconScale})`,Z=h.transform?`${h.transform} ${q}`:q;return a.jsx("button",{className:at.closeButton,style:{...h,transform:Z},onClick:xe,"aria-label":"Close lightbox",children:a.jsx(mn,{url:le.closeIconUrl,fill:le.closeIconColor??"#000000",hoverFill:le.closeIconHover??"#cccccc"})})})(),ee&&ee.isActive&&i.imageCaption&&((Te=n[b])==null?void 0:Te.imageCaption)&&a.jsx("div",{className:at.caption,style:{...Ar(ee.alignment,ee.offset,l),fontFamily:zo(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(m.fontSize,l),lineHeight:F.scalingValue(m.lineHeight,l),textTransform:g.textTransform??"none",textDecoration:g.textDecoration??"none",fontVariant:g.fontVariant??"normal",color:x},onClick:h=>h.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:at.captionTextInner,style:{"--link-color":ee.linkColor,"--link-hover-color":ee.linkHoverColor},children:a.jsx(Zi,{content:n[b].imageCaption})})}),ie.isActive&&(()=>{const[h,q]=ie.position.split("-"),Z=O.direction==="horiz"?`${h}-left`:ie.position,te=Ar(Z,ie.offset,l),ue=()=>{if(O.direction==="horiz"){if(q==="left")return"flex-start";if(q==="center")return"center";if(q==="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:R,className:at.thumbsWrapper,onClick:z=>Ae(z),style:{position:l?"absolute":"fixed",...te,...O.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:Lt(at.thumbsContainer,{[at.thumbsContainerVertical]:O.direction==="vert",[at.thumbsAlignStart]:ie.align==="start",[at.thumbsAlignCenter]:ie.align==="center",[at.thumbsAlignEnd]:ie.align==="end"}),style:{gap:F.scalingValue(ie.grid.gap,l),justifyContent:_?"flex-start":ue()},children:n.map((z,I)=>{const Q=I===b,ne=A[I],V=ie.grid.size*(Q?ie.activeState.scale:1),Pe=()=>{if(ie.fit!=="fit")return{};if(!ne)return O.direction==="horiz"?{height:F.scalingValue(V,l)}:{width:F.scalingValue(V,l)};const he=ne.width/ne.height;if(O.direction==="horiz"){const J=V,He=J*he;return{width:F.scalingValue(He,l),height:F.scalingValue(J,l)}}else{const J=V,He=J/he;return{width:F.scalingValue(J,l),height:F.scalingValue(He,l)}}};return a.jsx("button",{className:at.thumbItem,style:{...O.direction==="horiz"&&ie.fit!=="fit"?{height:F.scalingValue(V,l)}:{},...O.direction==="vert"&&ie.fit!=="fit"?{width:F.scalingValue(V,l)}:{},...ie.fit==="cover"?{width:F.scalingValue(V,l),height:F.scalingValue(V,l)}:{},...Pe(),transition:Q?"all 0.25s ease-out":"none",opacity:Q?ie.activeState.opacity/100:ie.opacity/100,"--thumb-hover":ie.activeState.opacity/100},onClick:he=>{var J;he.stopPropagation(),E(I),(J=$.current)==null||J.go(I)},onMouseEnter:()=>{var he;ie.triggers==="hov"&&((he=$.current)==null||he.go(I))},children:a.jsx("img",{src:z.image.url,alt:z.image.name??"",onLoad:he=>{const J=he.currentTarget;J.naturalWidth&&J.naturalHeight&&U(He=>({...He,[I]:{width:J.naturalWidth,height:J.naturalHeight}}))},style:{objectFit:ie.fit==="cover"?"cover":"contain",...ie.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ie.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${z.image.name}-${I}`)})})})})()]})]}),document.getElementById(r))};function oc({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 jh={element:zh,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Lightbox.png"},defaultSize:{d:{width:440,height:550},t:{width:235,height:293},m:{width:265,height:331}},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.url",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{url:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"slide in",duration:"1000ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.01,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:0,bottom:.06,left:0}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},linkColor:"#cccccc",linkHoverColor:"#cccccc"}}},m:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"horiz",duration:"1000ms"},thumbnail:{isActive:!0,position:"bottom-center",fit:"fit",align:"start",triggers:"hov",grid:{size:.1,gap:.05},offset:{x:.01,y:-.05},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.05,bottom:.06,left:.05}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}},t:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/2.jpg",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/3.jpg",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/4.jpg",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}};function Fr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Vh(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 Gh({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:r}){const l=!!n,d=i&&t||!t,{prefix:c}=_.useScopedStyles(),{type:u="A",fieldsToShow:p=2,textareaRows:x=1,fields:y=[],buttonLabel:m,gap:g,fieldsGap:v,buttonCorners:b,buttonStroke:E,buttonPadding:f,isButtonFullWidth:w,inputCorners:G,inputStroke:X,inputPadding:M,inputColor:T,inputTextColor:N,inputBorderColor:q,placeholderColor:$,buttonColor:I,buttonTextColor:W,buttonBorderColor:O,labelTextColor:C,successColor:L,errorColor:z,fontFamily:S,inputFontSettings:K,inputFontSize:k,inputLineHeight:H,inputLetterSpacing:j,inputWordSpacing:ne,inputTextAppearance:oe,buttonFontSettings:R,buttonFontSize:ce,buttonLineHeight:D,buttonLetterSpacing:le,buttonWordSpacing:ie,buttonTextAppearance:we,labelFontSettings:Ie,labelFontSize:xe,labelLineHeight:pe,labelLetterSpacing:Y,labelWordSpacing:ae,labelTextAppearance:se,statusFontSettings:Re,statusFontSize:$e,statusLineHeight:Me,statusLetterSpacing:ve,statusWordSpacing:be,statusTextAppearance:Ce,successMessage:h,errorMessage:U,stateOverrides:Z}=e,te=u==="B",me=y.slice(0,Math.min(p,y.length)),B={fontSettings:{fontFamily:S,fontWeight:(K==null?void 0:K.fontWeight)??400,fontStyle:(K==null?void 0:K.fontStyle)??"normal"},fontSize:k??.01,lineHeight:H,letterSpacing:j??0,wordSpacing:ne??0,textAppearance:oe,color:N},P=cn(Qt(B,t)),Q=_.scalingValue(X??0,t),ee=qe=>_.scalingValue((H??k??.01)*qe+((M==null?void 0:M.top)??0)+((M==null?void 0:M.bottom)??0)+(u==="C"?X??0:(X??0)*2),t),de=ee(1),V=ee(Math.max(1,x)),Pe={...P,borderStyle:"solid",borderRadius:u==="C"?0:_.scalingValue(G??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:Q,borderLeftWidth:0}:{borderWidth:Q},paddingTop:_.scalingValue((M==null?void 0:M.top)??0,t),paddingRight:_.scalingValue((M==null?void 0:M.right)??0,t),paddingBottom:_.scalingValue((M==null?void 0:M.bottom)??0,t),paddingLeft:_.scalingValue((M==null?void 0:M.left)??0,t),height:de,minHeight:de},he={fontSettings:{fontFamily:S,fontWeight:(R==null?void 0:R.fontWeight)??400,fontStyle:(R==null?void 0:R.fontStyle)??"normal"},fontSize:ce??.01,lineHeight:D,letterSpacing:le??0,wordSpacing:ie??0,textAppearance:we,color:W},J=cn(Qt(he,t)),Ne=_.scalingValue(E??0,t),Be={fontSettings:{fontFamily:S,fontWeight:(Ie==null?void 0:Ie.fontWeight)??400,fontStyle:(Ie==null?void 0:Ie.fontStyle)??"normal"},fontSize:xe??.01,lineHeight:pe,letterSpacing:Y??0,wordSpacing:ae??0,textAppearance:se,color:C},at=Qt(Be,t),Ue={fontSettings:{fontFamily:S,fontWeight:(Re==null?void 0:Re.fontWeight)??400,fontStyle:(Re==null?void 0:Re.fontStyle)??"normal"},fontSize:$e??.01,lineHeight:Me,letterSpacing:ve??0,wordSpacing:be??0,textAppearance:Ce,color:L},nt=cn(Qt(Ue,t)),Ze=_.buildColorVars(c,{inputColor:T,inputTextColor:N,inputBorderColor:q,placeholderColor:$!=null&&$.trim()?$:"#cccccc",buttonColor:I,buttonTextColor:W,buttonBorderColor:O,labelTextColor:C,successColor:L,errorColor:z},Xh,qh,Z),[Xe,fe]=s.useState(()=>Object.fromEntries(me.map(qe=>[qe.name,""]))),[He,We]=s.useState("idle"),[Qe,ye]=s.useState(null),_e=r==="success"?"success":r==="error"?"error":He,Ge=r==="error"?U:Qe,et=r==="filled",mt=s.useMemo(()=>{if(!et)return Xe;let qe=null;for(const ut of me)(Xe[ut.name]??"").trim().length>0||(qe=qe??{...Xe},qe[ut.name]="Filled");return qe??Xe},[Xe,et,me]),rt=_e==="error"?_.getFormFieldValidationError(me,mt):null,Fe=`${r&&r!=="default"?`${c}-state-${r}`:""}`.trim(),Ke=o==null?void 0:o.submitUrl,it=(qe,ut)=>{fe(ge=>({...ge,[qe]:ut}))},De=async qe=>{if(qe.preventDefault(),!d)return;const ut=Object.fromEntries(me.map(ke=>{var ot;return[ke.name,((ot=Xe[ke.name])==null?void 0:ot.trim())??""]}).filter(([,ke])=>ke));if(!Ke){We("error"),ye("No integrations were found for this form.");return}if(Object.keys(ut).length===0)return;const ge=_.getFormFieldValidationError(me,Xe);if(ge){We("error"),ye(ge);return}We("submitting"),ye(null);try{const ke=await fetch(Ke,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ut)});if(!ke.ok){const ot=await ke.text();throw new Error(ot||`Request failed: ${ke.status}`)}We("success"),fe(Object.fromEntries(me.map(ot=>[ot.name,""])))}catch(ke){We("error"),ye(ke instanceof Error?ke.message:"Something went wrong")}};return a.jsxs("div",{className:`${c}-wrapper ${c}-type-${u} ${Fe}`.trim(),style:Ze,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Vh(c)}}),a.jsxs("form",{onSubmit:De,className:`${c}-form`,children:[a.jsx("div",{className:`${c}-fields`,children:me.map((qe,ut)=>a.jsxs(s.Fragment,{children:[ut>0&&a.jsx("div",{"data-controls":l?"fieldsGap":void 0,className:l?`${c}-control`:void 0,style:{height:_.scalingValue(v??0,t)}}),a.jsxs("div",{className:`${c}-field-group${te?` ${c}-labeled`:""}`,children:[te&&a.jsx("span",{className:`${c}-field-label`,style:at?{...at,lineHeight:at.fontSize}:void 0,children:qe.label||qe.name}),qe.type==="textarea"?a.jsx("textarea",{name:qe.name,autoComplete:"off",value:mt[qe.name]??"",onChange:ge=>it(qe.name,ge.target.value),placeholder:qe.placeholder,className:`${c}-input`,style:{...Pe,height:V,minHeight:V},rows:x,"data-filled":et||(mt[qe.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:qe.type==="phone"?"tel":qe.type==="email"?"email":"text",name:qe.name,autoComplete:"off",value:mt[qe.name]??"",onChange:ge=>it(qe.name,ge.target.value),placeholder:qe.placeholder,required:qe.isRequired??qe.type==="email",className:`${c}-input`,style:Pe,"data-filled":et||(mt[qe.name]??"").trim().length>0})]})]},ut))}),a.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${c}-control`:void 0,style:{height:_.scalingValue(g??0,t)}}),a.jsx("div",{className:`${c}-overlay-anchor`,children:a.jsx("button",{type:d?"submit":"button",className:`${c}-button`,style:{borderStyle:"solid",borderRadius:_.scalingValue(b??0,t),borderWidth:Ne,paddingTop:_.scalingValue((f==null?void 0:f.top)??0,t),paddingRight:_.scalingValue((f==null?void 0:f.right)??0,t),paddingBottom:_.scalingValue((f==null?void 0:f.bottom)??0,t),paddingLeft:_.scalingValue((f==null?void 0:f.left)??0,t),pointerEvents:d?"auto":void 0,...J,...w?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${c}-overlay-anchor`,style:w?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:He==="submitting"?"...":m})})})]}),_e==="success"&&a.jsx("p",{className:`${c}-success`,style:{...nt},children:h}),_e==="error"&&a.jsx("p",{className:`${c}-error`,style:{...nt},role:"alert",children:rt??Ge??U})]})}const Xh={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"},qh=["hover","focus","filled","success","error"],Uh=`import React, { useMemo, useState } from 'react';
158
+ `}function Gh({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:m,gap:g,fieldsGap:x,buttonCorners:b,buttonStroke:E,buttonPadding:f,isButtonFullWidth:w,inputCorners:G,inputStroke:X,inputPadding:k,inputColor:L,inputTextColor:A,inputBorderColor:U,placeholderColor:$,buttonColor:P,buttonTextColor:H,buttonBorderColor:W,labelTextColor:C,successColor:T,errorColor:B,fontFamily:S,inputFontSettings:K,inputFontSize:R,inputLineHeight:_,inputLetterSpacing:j,inputWordSpacing:oe,inputTextAppearance:re,buttonFontSettings:O,buttonFontSize:ie,buttonLineHeight:D,buttonLetterSpacing:le,buttonWordSpacing:ee,buttonTextAppearance:ve,labelFontSettings:Ie,labelFontSize:be,labelLineHeight:pe,labelLetterSpacing:Y,labelWordSpacing:se,labelTextAppearance:xe,statusFontSettings:Se,statusFontSize:Ce,statusLineHeight:Ae,statusLetterSpacing:fe,statusWordSpacing:we,statusTextAppearance:Te,successMessage:h,errorMessage:q,stateOverrides:Z}=e,te=u==="B",ue=v.slice(0,Math.min(p,v.length)),z={fontSettings:{fontFamily:S,fontWeight:(K==null?void 0:K.fontWeight)??400,fontStyle:(K==null?void 0:K.fontStyle)??"normal"},fontSize:R??.01,lineHeight:_,letterSpacing:j??0,wordSpacing:oe??0,textAppearance:re,color:A},I=dn(Qt(z,t)),Q=F.scalingValue(X??0,t),ne=Xe=>F.scalingValue((_??R??.01)*Xe+((k==null?void 0:k.top)??0)+((k==null?void 0:k.bottom)??0)+(u==="C"?X??0:(X??0)*2),t),de=ne(1),V=ne(Math.max(1,y)),Pe={...I,borderStyle:"solid",borderRadius:u==="C"?0:F.scalingValue(G??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:Q,borderLeftWidth:0}:{borderWidth:Q},paddingTop:F.scalingValue((k==null?void 0:k.top)??0,t),paddingRight:F.scalingValue((k==null?void 0:k.right)??0,t),paddingBottom:F.scalingValue((k==null?void 0:k.bottom)??0,t),paddingLeft:F.scalingValue((k==null?void 0:k.left)??0,t),height:de,minHeight:de},he={fontSettings:{fontFamily:S,fontWeight:(O==null?void 0:O.fontWeight)??400,fontStyle:(O==null?void 0:O.fontStyle)??"normal"},fontSize:ie??.01,lineHeight:D,letterSpacing:le??0,wordSpacing:ee??0,textAppearance:ve,color:H},J=dn(Qt(he,t)),He=F.scalingValue(E??0,t),We={fontSettings:{fontFamily:S,fontWeight:(Ie==null?void 0:Ie.fontWeight)??400,fontStyle:(Ie==null?void 0:Ie.fontStyle)??"normal"},fontSize:be??.01,lineHeight:pe,letterSpacing:Y??0,wordSpacing:se??0,textAppearance:xe,color:C},ot=Qt(We,t),qe={fontSettings:{fontFamily:S,fontWeight:(Se==null?void 0:Se.fontWeight)??400,fontStyle:(Se==null?void 0:Se.fontStyle)??"normal"},fontSize:Ce??.01,lineHeight:Ae,letterSpacing:fe??0,wordSpacing:we??0,textAppearance:Te,color:T},nt=dn(Qt(qe,t)),tt=F.buildColorVars(d,{inputColor:L,inputTextColor:A,inputBorderColor:U,placeholderColor:$!=null&&$.trim()?$:"#cccccc",buttonColor:P,buttonTextColor:H,buttonBorderColor:W,labelTextColor:C,successColor:T,errorColor:B},Xh,qh,Z),[Ve,ge]=s.useState(()=>Object.fromEntries(ue.map(Xe=>[Xe.name,""]))),[_e,je]=s.useState("idle"),[Ze,ye]=s.useState(null),Ne=r==="success"?"success":r==="error"?"error":_e,Ke=r==="error"?q:Ze,Qe=r==="filled",st=s.useMemo(()=>{if(!Qe)return Ve;let Xe=null;for(const lt of ue)(Ve[lt.name]??"").trim().length>0||(Xe=Xe??{...Ve},Xe[lt.name]="Filled");return Xe??Ve},[Ve,Qe,ue]),rt=Ne==="error"?F.getFormFieldValidationError(ue,st):null,Me=`${r&&r!=="default"?`${d}-state-${r}`:""}`.trim(),gt=o==null?void 0:o.submitUrl,ze=(Xe,lt)=>{ge(me=>({...me,[Xe]:lt}))},Oe=async Xe=>{if(Xe.preventDefault(),!c)return;const lt=Object.fromEntries(ue.map(Re=>{var it;return[Re.name,((it=Ve[Re.name])==null?void 0:it.trim())??""]}).filter(([,Re])=>Re));if(!gt){je("error"),ye("No integrations were found for this form.");return}if(Object.keys(lt).length===0)return;const me=F.getFormFieldValidationError(ue,Ve);if(me){je("error"),ye(me);return}je("submitting"),ye(null);try{const Re=await fetch(gt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(lt)});if(!Re.ok){const it=await Re.text();throw new Error(it||`Request failed: ${Re.status}`)}je("success"),ge(Object.fromEntries(ue.map(it=>[it.name,""])))}catch(Re){je("error"),ye(Re instanceof Error?Re.message:"Something went wrong")}};return a.jsxs("div",{className:`${d}-wrapper ${d}-type-${u} ${Me}`.trim(),style:tt,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Vh(d)}}),a.jsxs("form",{onSubmit:Oe,className:`${d}-form`,children:[a.jsx("div",{className:`${d}-fields`,children:ue.map((Xe,lt)=>a.jsxs(s.Fragment,{children:[lt>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${te?` ${d}-labeled`:""}`,children:[te&&a.jsx("span",{className:`${d}-field-label`,style:ot?{...ot,lineHeight:ot.fontSize}:void 0,children:Xe.label||Xe.name}),Xe.type==="textarea"?a.jsx("textarea",{name:Xe.name,autoComplete:"off",value:st[Xe.name]??"",onChange:me=>ze(Xe.name,me.target.value),placeholder:Xe.placeholder,className:`${d}-input`,style:{...Pe,height:V,minHeight:V},rows:y,"data-filled":Qe||(st[Xe.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:Xe.type==="phone"?"tel":Xe.type==="email"?"email":"text",name:Xe.name,autoComplete:"off",value:st[Xe.name]??"",onChange:me=>ze(Xe.name,me.target.value),placeholder:Xe.placeholder,required:Xe.isRequired??Xe.type==="email",className:`${d}-input`,style:Pe,"data-filled":Qe||(st[Xe.name]??"").trim().length>0})]})]},lt))}),a.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${d}-control`:void 0,style:{height:F.scalingValue(g??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,...J,...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:_e==="submitting"?"...":m})})})]}),Ne==="success"&&a.jsx("p",{className:`${d}-success`,style:{...nt},children:h}),Ne==="error"&&a.jsx("p",{className:`${d}-error`,style:{...nt},role:"alert",children:rt??Ke??q})]})}const Xh={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"},qh=["hover","focus","filled","success","error"],Uh=`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: ${_r(14)};
987
987
  color: var(--${e}-error-error-color, var(--${e}-error-color));
988
988
  }
989
- `}const ef=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:r}=_.useScopedStyles(),l=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:c,buttonLabel:u,fieldsToShow:p=1,fontFamily:x,inputFontSettings:y,inputFontSize:m,inputLineHeight:g,inputLetterSpacing:v,inputWordSpacing:b,inputTextAppearance:E,buttonFontSettings:f,buttonFontSize:w,buttonLineHeight:G,buttonLetterSpacing:X,buttonWordSpacing:M,buttonTextAppearance:T,statusFontSettings:N,statusFontSize:q,statusLineHeight:$,statusLetterSpacing:I,statusWordSpacing:W,statusTextAppearance:O,iconMaxWidth:C,minHeight:L,corners:z,stroke:S,stateOverrides:K,inputPadding:k,buttonPadding:H,successMessage:j="Thanks for subscribing!",errorMessage:ne="Please, fill all required fields."}=e,oe=d.slice(0,Math.min(p,d.length)),[R,ce]=s.useState(()=>Object.fromEntries(oe.map(he=>[he.name,""]))),[D,le]=s.useState("idle"),[ie,we]=s.useState(null),Ie=o==="success"?"success":o==="error"?"error":D,xe=o==="error"?ne:ie,pe=o==="filled",Y=s.useMemo(()=>{if(!pe)return R;let he=null;for(const J of oe)(R[J.name]??"").trim().length>0||(he=he??{...R},he[J.name]="Filled");return he??R},[pe,R,oe]),ae=Ie==="error"?_.getFormFieldValidationError(oe,Y):null,se=o&&o!=="default"?`${r}-state-${o}`:"",Re=oe.some(he=>(Y[he.name]??"").trim().length>0),$e=se!==`${r}-state-filled`&&Re?`${r}-state-filled`:"",Me=`${se} ${$e}`.trim(),ve=i==null?void 0:i.submitUrl,be=u??"",Ce=(c==null?void 0:c.icon)??"",h=(c==null?void 0:c.mode)==="On",U=be||"Submit",Z={fontSettings:{fontFamily:x,fontWeight:(y==null?void 0:y.fontWeight)??400,fontStyle:(y==null?void 0:y.fontStyle)??"normal"},fontSize:m??.01,lineHeight:g,letterSpacing:v??0,wordSpacing:b??0,textAppearance:E,color:e.inputTextColor??"#111111"},te={fontSettings:{fontFamily:x,fontWeight:(f==null?void 0:f.fontWeight)??400,fontStyle:(f==null?void 0:f.fontStyle)??"normal"},fontSize:w??.01,lineHeight:G,letterSpacing:X??0,wordSpacing:M??0,textAppearance:T,color:e.buttonTextColor??"#ffffff"},me={fontSettings:{fontFamily:x,fontWeight:(N==null?void 0:N.fontWeight)??400,fontStyle:(N==null?void 0:N.fontStyle)??"normal"},fontSize:q??.01,lineHeight:$,letterSpacing:I??0,wordSpacing:W??0,textAppearance:O,color:e.successColor??"#22c55e"},B=cn(Qt(Z,t)),P=cn(Qt(te,t)),Q=cn(Qt(me,t)),ee=_.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??(te==null?void 0:te.color)??"#ffffff"},tf,nf,K),de={borderRadius:_.scalingValue(z,t),borderWidth:_.scalingValue(S,t),borderStyle:"solid"},V={borderLeftWidth:_.scalingValue(S,t)},Pe=async he=>{if(he.preventDefault(),!l)return;const J=Object.fromEntries(oe.map(Be=>{var at;return[Be.name,((at=R[Be.name])==null?void 0:at.trim())??""]}).filter(([,Be])=>Be));if(!ve){le("error"),we("No integrations were found for this form.");return}if(Object.keys(J).length===0)return;const Ne=_.getFormFieldValidationError(oe,R);if(Ne){le("error"),we(Ne);return}le("submitting"),we(null);try{const Be=await fetch(ve,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(J)});if(!Be.ok){const at=await Be.text();throw new Error(at||`Request failed: ${Be.status}`)}le("success"),ce(Object.fromEntries(oe.map(at=>[at.name,""])))}catch(Be){le("error"),we(Be instanceof Error?Be.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${Me}`.trim(),style:ee,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Qh(r)}}),a.jsxs("form",{onSubmit:Pe,className:`${r}-form`,style:{...de,height:_.scalingValue(L,t),minHeight:_.scalingValue(L,t)},children:[a.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:oe.map(he=>a.jsx("input",{type:he.type==="email"?"email":he.type==="phone"?"tel":"text",name:he.name,autoComplete:"off",value:Y[he.name]??"",onChange:J=>ce(Ne=>({...Ne,[he.name]:J.target.value})),placeholder:he.placeholder,required:he.isRequired??he.type==="email",className:`${r}-input`,style:{...B,paddingRight:_.scalingValue(k.right,t),paddingLeft:_.scalingValue(k.left,t),paddingTop:_.scalingValue(k.top,t),paddingBottom:_.scalingValue(k.bottom,t)}},he.name))}),a.jsx("div",{className:`${r}-overlayAnchor`,children:a.jsx("button",{type:l?"submit":"button",className:`${r}-submitBtn`,"aria-label":U,style:{...P,...V,paddingRight:_.scalingValue(H.right,t),paddingLeft:_.scalingValue(H.left,t),paddingTop:_.scalingValue(H.top,t),paddingBottom:_.scalingValue(H.bottom,t),pointerEvents:l?"auto":void 0},children:D==="submitting"?"...":h?Ce&&a.jsx(pn,{url:Ce,className:`${r}-submitBtnIcon`,style:{maxWidth:_.scalingValue(C??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):be})})]}),Ie==="success"&&a.jsx("p",{className:`${r}-success`,style:{...Q},children:j}),Ie==="error"&&a.jsx("p",{className:`${r}-error`,style:{...Q},role:"alert",children:ae??xe??ne})]})},tf={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"},nf=["hover","focus","filled","success","error"],of=`import React, { useMemo, useState } from 'react';
989
+ `}const ef=({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:m,inputLineHeight:g,inputLetterSpacing:x,inputWordSpacing:b,inputTextAppearance:E,buttonFontSettings:f,buttonFontSize:w,buttonLineHeight:G,buttonLetterSpacing:X,buttonWordSpacing:k,buttonTextAppearance:L,statusFontSettings:A,statusFontSize:U,statusLineHeight:$,statusLetterSpacing:P,statusWordSpacing:H,statusTextAppearance:W,iconMaxWidth:C,minHeight:T,corners:B,stroke:S,stateOverrides:K,inputPadding:R,buttonPadding:_,successMessage:j="Thanks for subscribing!",errorMessage:oe="Please, fill all required fields."}=e,re=c.slice(0,Math.min(p,c.length)),[O,ie]=s.useState(()=>Object.fromEntries(re.map(he=>[he.name,""]))),[D,le]=s.useState("idle"),[ee,ve]=s.useState(null),Ie=o==="success"?"success":o==="error"?"error":D,be=o==="error"?oe:ee,pe=o==="filled",Y=s.useMemo(()=>{if(!pe)return O;let he=null;for(const J of re)(O[J.name]??"").trim().length>0||(he=he??{...O},he[J.name]="Filled");return he??O},[pe,O,re]),se=Ie==="error"?F.getFormFieldValidationError(re,Y):null,xe=o&&o!=="default"?`${r}-state-${o}`:"",Se=re.some(he=>(Y[he.name]??"").trim().length>0),Ce=xe!==`${r}-state-filled`&&Se?`${r}-state-filled`:"",Ae=`${xe} ${Ce}`.trim(),fe=i==null?void 0:i.submitUrl,we=u??"",Te=(d==null?void 0:d.icon)??"",h=(d==null?void 0:d.mode)==="On",q=we||"Submit",Z={fontSettings:{fontFamily:y,fontWeight:(v==null?void 0:v.fontWeight)??400,fontStyle:(v==null?void 0:v.fontStyle)??"normal"},fontSize:m??.01,lineHeight:g,letterSpacing:x??0,wordSpacing:b??0,textAppearance:E,color:e.inputTextColor??"#111111"},te={fontSettings:{fontFamily:y,fontWeight:(f==null?void 0:f.fontWeight)??400,fontStyle:(f==null?void 0:f.fontStyle)??"normal"},fontSize:w??.01,lineHeight:G,letterSpacing:X??0,wordSpacing:k??0,textAppearance:L,color:e.buttonTextColor??"#ffffff"},ue={fontSettings:{fontFamily:y,fontWeight:(A==null?void 0:A.fontWeight)??400,fontStyle:(A==null?void 0:A.fontStyle)??"normal"},fontSize:U??.01,lineHeight:$,letterSpacing:P??0,wordSpacing:H??0,textAppearance:W,color:e.successColor??"#22c55e"},z=dn(Qt(Z,t)),I=dn(Qt(te,t)),Q=dn(Qt(ue,t)),ne=F.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??(te==null?void 0:te.color)??"#ffffff"},tf,nf,K),de={borderRadius:F.scalingValue(B,t),borderWidth:F.scalingValue(S,t),borderStyle:"solid"},V={borderLeftWidth:F.scalingValue(S,t)},Pe=async he=>{if(he.preventDefault(),!l)return;const J=Object.fromEntries(re.map(We=>{var ot;return[We.name,((ot=O[We.name])==null?void 0:ot.trim())??""]}).filter(([,We])=>We));if(!fe){le("error"),ve("No integrations were found for this form.");return}if(Object.keys(J).length===0)return;const He=F.getFormFieldValidationError(re,O);if(He){le("error"),ve(He);return}le("submitting"),ve(null);try{const We=await fetch(fe,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(J)});if(!We.ok){const ot=await We.text();throw new Error(ot||`Request failed: ${We.status}`)}le("success"),ie(Object.fromEntries(re.map(ot=>[ot.name,""])))}catch(We){le("error"),ve(We instanceof Error?We.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${Ae}`.trim(),style:ne,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Qh(r)}}),a.jsxs("form",{onSubmit:Pe,className:`${r}-form`,style:{...de,height:F.scalingValue(T,t),minHeight:F.scalingValue(T,t)},children:[a.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:re.map(he=>a.jsx("input",{type:he.type==="email"?"email":he.type==="phone"?"tel":"text",name:he.name,autoComplete:"off",value:Y[he.name]??"",onChange:J=>ie(He=>({...He,[he.name]:J.target.value})),placeholder:he.placeholder,required:he.isRequired??he.type==="email",className:`${r}-input`,style:{...z,paddingRight:F.scalingValue(R.right,t),paddingLeft:F.scalingValue(R.left,t),paddingTop:F.scalingValue(R.top,t),paddingBottom:F.scalingValue(R.bottom,t)}},he.name))}),a.jsx("div",{className:`${r}-overlayAnchor`,children:a.jsx("button",{type:l?"submit":"button",className:`${r}-submitBtn`,"aria-label":q,style:{...I,...V,paddingRight:F.scalingValue(_.right,t),paddingLeft:F.scalingValue(_.left,t),paddingTop:F.scalingValue(_.top,t),paddingBottom:F.scalingValue(_.bottom,t),pointerEvents:l?"auto":void 0},children:D==="submitting"?"...":h?Te&&a.jsx(mn,{url:Te,className:`${r}-submitBtnIcon`,style:{maxWidth:F.scalingValue(C??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):we})})]}),Ie==="success"&&a.jsx("p",{className:`${r}-success`,style:{...Q},children:j}),Ie==="error"&&a.jsx("p",{className:`${r}-error`,style:{...Q},role:"alert",children:se??be??oe})]})},tf={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"},nf=["hover","focus","filled","success","error"],of=`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 uf=30,pf=20,Xa=3,mf=12,gf=32,hf=3,ff=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")},yf=(e,t)=>Array.from({length:t},()=>e).flat(),vf=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},Tu=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),rc=(e,t)=>{if(t<=0||e.children.length<t)return 0;const n=e.children[0],i=e.children[t-1];if(!n||!i)return 0;const o=getComputedStyle(e),r=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=i.getBoundingClientRect().right-n.getBoundingClientRect().left;if(l>0)return l;const d=Array.from({length:t},(u,p)=>e.children[p]),c=Tu(d);return c<=0?0:c+r*Math.max(0,t-1)},xf=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=Tu(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},bf=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},Sf=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>bf(i,e))},wf=e=>{if(e.type==="video")return!0;if(e.type==="image")return!1;const t=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url??"")},$f=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,Cf=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:r,imageHoverClass:l,isFirstSet:d,scaled:c,onFirstSetImageDone:u})=>{var W,O,C,L;const p=s.useRef(null),x=!!((W=e.image)!=null&&W.url&&wf(e.image));s.useLayoutEffect(()=>{d&&$f(p.current)&&(u==null||u())},[d,(O=e.image)==null?void 0:O.url,u]);const y=n.display==="cover",m=n.ratioValue??"1:1",g=n.reversed??!1,[v,b]=m.split(":").map(Number),w=(g?b:v)/(g?v:b),G=i/w,X=G>o?o:G,M=G>o?o*w:i,T=c(M),N=c(X),q={borderRadius:c(r)},$=y?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...q}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:c(i),maxHeight:c(o),objectFit:"contain",...q},I=((C=e.image)==null?void 0:C.url)&&(x?a.jsx("video",{ref:z=>{p.current=z},src:e.image.url,style:$,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto",onLoadedData:d?u:void 0,onError:d?u:void 0}):a.jsx("img",{ref:z=>{p.current=z},src:e.image.url,alt:((L=e.image)==null?void 0:L.name)??"",style:$,onLoad:d?u:void 0,onError:d?u:void 0}));return a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...y?{width:T}:{width:"max-content",maxWidth:c(i),minWidth:0}},children:a.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...y?{width:T,height:N,overflow:"hidden",...q}:{width:"max-content",maxWidth:c(i),height:c(o)}},children:I&&e.link?a.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:Ct(`${t}-marquee-link`,!y&&`${t}-marquee-link-contain`),children:I}):I})})},Tf=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=_.useScopedStyles(),[l,d]=s.useState(0),c=l>0?Math.round(l):0,u=s.useMemo(()=>df(r,c),[r,c]),{speed:p,direction:x,pauseOnHover:y,gap:m,imageMaxWidth:g,imageMaxHeight:v,hoverEffect:b,cornerRadius:E=0}=e,f=s.useMemo(()=>vf(e.imageFit),[e.imageFit]),w=(t==null?void 0:t.length)??0,G=!!o,X=!n||!!i,M=X&&b!=="off"&&b!=="randomize"?`${r}-image-hover-${b}`:void 0,T=n?!!i:!0,q=((t==null?void 0:t.length)??0)>0&&(T||!!n),$=Math.max(0,p)*uf,I=$e=>_.scalingValue($e,n??!1),W=s.useRef(null),O=s.useRef(null),C=s.useRef(null),[L,z]=s.useState(0),S=T&&y==="on",[K,k]=s.useState(!1),[H,j]=s.useState({}),ne=s.useRef(H);ne.current=H;const oe=s.useRef(null),R=s.useRef(0),ce=s.useRef(null),D=s.useMemo(()=>(t??[]).map($e=>{var Me;return((Me=$e.image)==null?void 0:Me.url)??""}).join("\0"),[t]),[le,ie]=s.useState(Xa),we=s.useMemo(()=>{const $e=t??[];return $e.length===0||!(T||!!n)?$e:yf($e,le)},[t,T,le,n]),Ie=s.useMemo(()=>(t??[]).filter($e=>{var Me;return!!((Me=$e.image)!=null&&Me.url)}).length,[t]),xe=q?hf:1;s.useLayoutEffect(()=>{R.current=0,j({}),oe.current=null,ie(Xa),d(0)},[D]),s.useEffect(()=>{if(!X||b!=="randomize")return;const $e=W.current;if(!$e)return;const Me=h=>{j(U=>{const Z=Array.from(h).filter(me=>me in U&&!Sf($e,me));if(Z.length===0)return U;const te={...U};return Z.forEach(me=>{delete te[me]}),te})},ve=new IntersectionObserver(h=>{const U=new Set;for(const Z of h){const te=Z.target.dataset.marqueeItemIndex,me=te!==void 0?Number(te):NaN;Number.isNaN(me)||U.add(me)}U.size>0&&Me(U)},{root:$e,threshold:0});Object.keys(H).forEach(h=>{const U=Number(h);$e.querySelectorAll(`[data-marquee-item-index="${U}"]`).forEach(Z=>ve.observe(Z))});const be={current:0},Ce=()=>{const h=Object.keys(ne.current);h.length!==0&&(Me(h.map(Number)),be.current=requestAnimationFrame(Ce))};return Object.keys(ne.current).length>0&&(be.current=requestAnimationFrame(Ce)),()=>{cancelAnimationFrame(be.current),ve.disconnect()}},[b,H,X]),s.useLayoutEffect(()=>{if(!q)return;const $e=W.current,Me=C.current;if(!$e||!Me)return;const ve={current:0},be=()=>{const U=$e.getBoundingClientRect().width||$e.offsetWidth,Z=xf(Me),te=oe.current,me=typeof te=="number"&&Math.abs(te-Z)<=.25;oe.current=Z;let B=le,P=0;if((T||n)&&w>0&&U>0){const de=rc(Me,w);if(de>=gf){P=de;const V=Math.min(mf,Math.max(Xa,Math.ceil(U/de)+1));B=V,V!==le&&ie(V)}}const ee=B!==le&&P>0?P*B:Z>0?Z:P>0?P*B:(()=>{const de=rc(Me,w);return de>0?de*B:0})();ee>0?d(de=>de<=0?ee:!me||Math.round(de)===Math.round(ee)?de:ee):!me&&l<=0&&(cancelAnimationFrame(ve.current),ve.current=requestAnimationFrame(be))},Ce=()=>{cancelAnimationFrame(ve.current),ve.current=requestAnimationFrame(be)};ce.current=Ce,Ce();const h=new ResizeObserver(Ce);return h.observe($e),h.observe(Me),()=>{ce.current=null,cancelAnimationFrame(ve.current),h.disconnect()}},[T,q,l,D,le,w,n]),s.useLayoutEffect(()=>{if(!q||c<=0)return;const $e=O.current;$e&&ff($e)},[q,c,x,$]),s.useLayoutEffect(()=>{if(!q||l<=0){z(0);return}const $e=O.current,Me=C.current;if(!$e||!Me)return;const ve=()=>{const Ce=$e.offsetHeight||$e.getBoundingClientRect().height,h=Array.from(Me.children).reduce((Z,te)=>Math.max(Z,te.offsetHeight||te.getBoundingClientRect().height),0),U=Ce>0?Ce:h;z(U>0?U:0)};ve();const be=new ResizeObserver(ve);return be.observe($e),be.observe(Me),()=>be.disconnect()},[q,xe,we,n,m,g,v,l,f,H]),s.useLayoutEffect(()=>{if(!n||!G||!q||typeof window>"u")return;const $e=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame($e)},[n,G,q,x,l,L,m,we]);const pe=()=>{S&&k(!0)},Y=()=>{S&&k(!1)},ae=s.useCallback(()=>{var $e;R.current=Math.min(Ie,R.current+1),($e=ce.current)==null||$e.call(ce)},[Ie]),se=s.useCallback(($e,Me)=>{j(ve=>{const be=ve[$e]??Me,Ce=(t??[]).filter(U=>U!==be);if(Ce.length===0)return ve;const h=Ce[Math.floor(Math.random()*Ce.length)];return{...ve,[$e]:h}})},[t]),Re=($e,Me,ve,be)=>{const Ce=X&&b==="randomize"&&f.display==="cover"?H[ve]??$e:$e,h=`max(${I(m)}, ${pf}px)`,U=`calc(-0.5 * (${h} + ${I(m)}))`;return a.jsxs("div",{className:`${r}-marquee-card`,"data-marquee-item-index":ve,onMouseEnter:X&&b==="randomize"&&f.display==="cover"?()=>se(ve,$e):void 0,children:[a.jsx(Cf,{item:Ce,prefix:r,imageFit:f,imageMaxWidth:g,imageMaxHeight:v,cornerRadius:E,imageHoverClass:M,isEditor:n,isFirstSet:be,scaled:I,onFirstSetImageDone:ae}),G&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${r}-gap-control`,style:{position:"absolute",top:0,right:U,width:h,height:"100%"}})]},`${Me}-${ve}`)};if(q){const $e=T?S&&K?"paused":"running":"paused",Me=c>0&&$>0?c/$*1e3:0,ve=`${Math.max(0,Me)/1e3}s`;return a.jsxs("div",{ref:W,className:Ct(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Marquee",style:L>0?{height:L}:void 0,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{ref:O,className:`${r}-marquee-track`,"data-direction":x,onMouseEnter:pe,onMouseLeave:Y,style:{WebkitAnimationDuration:ve,animationDuration:ve,WebkitAnimationPlayState:$e,animationPlayState:$e},children:Array.from({length:xe},(be,Ce)=>a.jsx("div",{ref:Ce===0?C:void 0,className:Ct(`${r}-marquee-row`,`${r}-marquee-set`),style:{gap:I(m),paddingRight:I(m)},"aria-hidden":Ce>0,children:we.map((h,U)=>Re(h,Ce,U,Ce===0&&U<w))},`set-${Ce}`))})]})}return a.jsxs("div",{ref:W,className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{className:Ct(`${r}-marquee-row`,`${r}-marquee-static`),style:{gap:I(m),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map(($e,Me)=>Re($e,0,Me))},"marquee-static")]})},Lf=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
1700
+ `}const uf=30,pf=20,Xa=3,mf=12,gf=32,hf=3,ff=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")},yf=(e,t)=>Array.from({length:t},()=>e).flat(),vf=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},Tu=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),rc=(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=Tu(c);return d<=0?0:d+r*Math.max(0,t-1)},xf=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=Tu(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},bf=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},Sf=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>bf(i,e))},wf=e=>{if(e.type==="video")return!0;if(e.type==="image")return!1;const t=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url??"")},$f=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,Cf=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:r,imageHoverClass:l,isFirstSet:c,scaled:d,onFirstSetImageDone:u})=>{var H,W,C,T;const p=s.useRef(null),y=!!((H=e.image)!=null&&H.url&&wf(e.image));s.useLayoutEffect(()=>{c&&$f(p.current)&&(u==null||u())},[c,(W=e.image)==null?void 0:W.url,u]);const v=n.display==="cover",m=n.ratioValue??"1:1",g=n.reversed??!1,[x,b]=m.split(":").map(Number),w=(g?b:x)/(g?x:b),G=i/w,X=G>o?o:G,k=G>o?o*w:i,L=d(k),A=d(X),U={borderRadius:d(r)},$=v?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...U}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:d(i),maxHeight:d(o),objectFit:"contain",...U},P=((C=e.image)==null?void 0:C.url)&&(y?a.jsx("video",{ref:B=>{p.current=B},src:e.image.url,style:$,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto",onLoadedData:c?u:void 0,onError:c?u:void 0}):a.jsx("img",{ref:B=>{p.current=B},src:e.image.url,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",...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:A,overflow:"hidden",...U}:{width:"max-content",maxWidth:d(i),height:d(o)}},children:P&&e.link?a.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:Lt(`${t}-marquee-link`,!v&&`${t}-marquee-link-contain`),children:P}):P})})},Tf=({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(()=>df(r,d),[r,d]),{speed:p,direction:y,pauseOnHover:v,gap:m,imageMaxWidth:g,imageMaxHeight:x,hoverEffect:b,cornerRadius:E=0}=e,f=s.useMemo(()=>vf(e.imageFit),[e.imageFit]),w=(t==null?void 0:t.length)??0,G=!!o,X=!n||!!i,k=X&&b!=="off"&&b!=="randomize"?`${r}-image-hover-${b}`:void 0,L=n?!!i:!0,U=((t==null?void 0:t.length)??0)>0&&(L||!!n),$=Math.max(0,p)*uf,P=Ce=>F.scalingValue(Ce,n??!1),H=s.useRef(null),W=s.useRef(null),C=s.useRef(null),[T,B]=s.useState(0),S=L&&v==="on",[K,R]=s.useState(!1),[_,j]=s.useState({}),oe=s.useRef(_);oe.current=_;const re=s.useRef(null),O=s.useRef(0),ie=s.useRef(null),D=s.useMemo(()=>(t??[]).map(Ce=>{var Ae;return((Ae=Ce.image)==null?void 0:Ae.url)??""}).join("\0"),[t]),[le,ee]=s.useState(Xa),ve=s.useMemo(()=>{const Ce=t??[];return Ce.length===0||!(L||!!n)?Ce:yf(Ce,le)},[t,L,le,n]),Ie=s.useMemo(()=>(t??[]).filter(Ce=>{var Ae;return!!((Ae=Ce.image)!=null&&Ae.url)}).length,[t]),be=U?hf:1;s.useLayoutEffect(()=>{O.current=0,j({}),re.current=null,ee(Xa),c(0)},[D]),s.useEffect(()=>{if(!X||b!=="randomize")return;const Ce=H.current;if(!Ce)return;const Ae=h=>{j(q=>{const Z=Array.from(h).filter(ue=>ue in q&&!Sf(Ce,ue));if(Z.length===0)return q;const te={...q};return Z.forEach(ue=>{delete te[ue]}),te})},fe=new IntersectionObserver(h=>{const q=new Set;for(const Z of h){const te=Z.target.dataset.marqueeItemIndex,ue=te!==void 0?Number(te):NaN;Number.isNaN(ue)||q.add(ue)}q.size>0&&Ae(q)},{root:Ce,threshold:0});Object.keys(_).forEach(h=>{const q=Number(h);Ce.querySelectorAll(`[data-marquee-item-index="${q}"]`).forEach(Z=>fe.observe(Z))});const we={current:0},Te=()=>{const h=Object.keys(oe.current);h.length!==0&&(Ae(h.map(Number)),we.current=requestAnimationFrame(Te))};return Object.keys(oe.current).length>0&&(we.current=requestAnimationFrame(Te)),()=>{cancelAnimationFrame(we.current),fe.disconnect()}},[b,_,X]),s.useLayoutEffect(()=>{if(!U)return;const Ce=H.current,Ae=C.current;if(!Ce||!Ae)return;const fe={current:0},we=()=>{const q=Ce.getBoundingClientRect().width||Ce.offsetWidth,Z=xf(Ae),te=re.current,ue=typeof te=="number"&&Math.abs(te-Z)<=.25;re.current=Z;let z=le,I=0;if((L||n)&&w>0&&q>0){const de=rc(Ae,w);if(de>=gf){I=de;const V=Math.min(mf,Math.max(Xa,Math.ceil(q/de)+1));z=V,V!==le&&ee(V)}}const ne=z!==le&&I>0?I*z:Z>0?Z:I>0?I*z:(()=>{const de=rc(Ae,w);return de>0?de*z:0})();ne>0?c(de=>de<=0?ne:!ue||Math.round(de)===Math.round(ne)?de:ne):!ue&&l<=0&&(cancelAnimationFrame(fe.current),fe.current=requestAnimationFrame(we))},Te=()=>{cancelAnimationFrame(fe.current),fe.current=requestAnimationFrame(we)};ie.current=Te,Te();const h=new ResizeObserver(Te);return h.observe(Ce),h.observe(Ae),()=>{ie.current=null,cancelAnimationFrame(fe.current),h.disconnect()}},[L,U,l,D,le,w,n]),s.useLayoutEffect(()=>{if(!U||d<=0)return;const Ce=W.current;Ce&&ff(Ce)},[U,d,y,$]),s.useLayoutEffect(()=>{if(!U||l<=0){B(0);return}const Ce=W.current,Ae=C.current;if(!Ce||!Ae)return;const fe=()=>{const Te=Ce.offsetHeight||Ce.getBoundingClientRect().height,h=Array.from(Ae.children).reduce((Z,te)=>Math.max(Z,te.offsetHeight||te.getBoundingClientRect().height),0),q=Te>0?Te:h;B(q>0?q:0)};fe();const we=new ResizeObserver(fe);return we.observe(Ce),we.observe(Ae),()=>we.disconnect()},[U,be,ve,n,m,g,x,l,f,_]),s.useLayoutEffect(()=>{if(!n||!G||!U||typeof window>"u")return;const Ce=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(Ce)},[n,G,U,y,l,T,m,ve]);const pe=()=>{S&&R(!0)},Y=()=>{S&&R(!1)},se=s.useCallback(()=>{var Ce;O.current=Math.min(Ie,O.current+1),(Ce=ie.current)==null||Ce.call(ie)},[Ie]),xe=s.useCallback((Ce,Ae)=>{j(fe=>{const we=fe[Ce]??Ae,Te=(t??[]).filter(q=>q!==we);if(Te.length===0)return fe;const h=Te[Math.floor(Math.random()*Te.length)];return{...fe,[Ce]:h}})},[t]),Se=(Ce,Ae,fe,we)=>{const Te=X&&b==="randomize"&&f.display==="cover"?_[fe]??Ce:Ce,h=`max(${P(m)}, ${pf}px)`,q=`calc(-0.5 * (${h} + ${P(m)}))`;return a.jsxs("div",{className:`${r}-marquee-card`,"data-marquee-item-index":fe,onMouseEnter:X&&b==="randomize"&&f.display==="cover"?()=>xe(fe,Ce):void 0,children:[a.jsx(Cf,{item:Te,prefix:r,imageFit:f,imageMaxWidth:g,imageMaxHeight:x,cornerRadius:E,imageHoverClass:k,isEditor:n,isFirstSet:we,scaled:P,onFirstSetImageDone:se}),G&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${r}-gap-control`,style:{position:"absolute",top:0,right:q,width:h,height:"100%"}})]},`${Ae}-${fe}`)};if(U){const Ce=L?S&&K?"paused":"running":"paused",Ae=d>0&&$>0?d/$*1e3:0,fe=`${Math.max(0,Ae)/1e3}s`;return a.jsxs("div",{ref:H,className:Lt(`${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:W,className:`${r}-marquee-track`,"data-direction":y,onMouseEnter:pe,onMouseLeave:Y,style:{WebkitAnimationDuration:fe,animationDuration:fe,WebkitAnimationPlayState:Ce,animationPlayState:Ce},children:Array.from({length:be},(we,Te)=>a.jsx("div",{ref:Te===0?C:void 0,className:Lt(`${r}-marquee-row`,`${r}-marquee-set`),style:{gap:P(m),paddingRight:P(m)},"aria-hidden":Te>0,children:ve.map((h,q)=>Se(h,Te,q,Te===0&&q<w))},`set-${Te}`))})]})}return a.jsxs("div",{ref:H,className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{className:Lt(`${r}-marquee-row`,`${r}-marquee-static`),style:{gap:P(m),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((Ce,Ae)=>Se(Ce,0,Ae))},"marquee-static")]})},Lf=`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';
@@ -2609,7 +2609,7 @@ ${o}
2609
2609
  left: -9999px;
2610
2610
  top: 0;
2611
2611
  }
2612
- `}const kf=30,qa=3,Ef=12,Mf=96,ac=3,_s=.72,Af=100,Ff=10,Nf=e=>e/Af,_f=e=>Math.max(0,e)/Ff,Hf=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")},Wf=(e,t)=>Array.from({length:t*e.length},(n,i)=>e[i%e.length]),oo={ctx:void 0},Of=()=>oo.ctx!==void 0?oo.ctx:typeof document>"u"?(oo.ctx=null,oo.ctx):(oo.ctx=document.createElement("canvas").getContext("2d"),oo.ctx),Df=(e,t,n,i)=>{e.style.transform=`translate3d(${t}px, ${n}px, 0) rotate(${i}deg)`},sc=e=>{e.style.transform=""},zf=e=>{if(!e||e==="none")return 0;try{return new DOMMatrixReadOnly(e).m41}catch{return 0}},Bf=(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)},Lu=96,Pu=(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,d=u=>Math.sqrt(1+(l*Math.cos(t*u))**2),c=i/n;return Array.from({length:n},(u,p)=>{const x=p*c,y=x+c;o[p+1]=y,r[p+1]=r[p]+(d(x)+d(y))*.5*c}),{wavelength:i,periodArc:r[n],x:o,s:r}},jf=(e,t)=>{const n=Pu(e,t,Lu);return!n||n.wavelength<=0?1:n.periodArc/n.wavelength},Vf=(e,t)=>{if(e.periodArc<=0)return t;const n=t<0?-1:1,i=Math.abs(t),o=Math.floor(i/e.periodArc),r=i-o*e.periodArc,{s:l,x:d}=e,c=(m,g)=>{if(g-m<=1)return[m,g];const v=m+g>>1;return l[v]<=r?c(v,g):c(m,v)},[u,p]=c(0,l.length-1),x=l[p]-l[u],y=x>0?(r-l[u])/x:0;return n*(o*e.wavelength+d[u]+(d[p]-d[u])*y)},Gf=(e,t,n,i,o=0)=>{const r=Math.max(0,n),l=e>0?2*Math.PI*r/e:0,d=g=>i+t*Math.sin(l*g),c=g=>t*l*Math.cos(l*g),u=-o,x=e+o-u,y=Math.max(4,Math.ceil(r*4*(x/Math.max(e,1)))),m=Array.from({length:y},(g,v)=>{const b=u+v/y*x,E=u+(v+1)/y*x,f=E-b,w=d(b),G=d(E),X=b+f/3,M=w+c(b)*f/3,T=E-f/3,N=G-c(E)*f/3;return`C${X.toFixed(2)} ${M.toFixed(2)} ${T.toFixed(2)} ${N.toFixed(2)} ${E.toFixed(2)} ${G.toFixed(2)}`});return[`M${u.toFixed(2)} ${d(u).toFixed(2)}`,...m].join(" ")},Xf=({item:e,prefix:t,textCss:n,capHeightPx:i,opticalOffsetY:o,imageGapPx:r,isCurve:l})=>{var m;const d=o!==0?{...n,transform:`translateY(${o}px)`}:n,c=i>0?{height:`${i}px`}:{fontSize:n.fontSize,height:`${_s}em`},u=((m=e.image)==null?void 0:m.url)&&a.jsx("img",{src:e.image.url,alt:e.image.name??"",className:`${t}-item-image`,style:c}),p=u&&(l?a.jsx("span",{className:`${t}-item-image-wrap`,"data-marquee-wave-node":!0,children:u}):u),x=l?a.jsx("span",{className:`${t}-text`,style:d,children:Array.from(e.text).map((g,v)=>a.jsx("span",{className:`${t}-glyph`,"data-marquee-wave-node":!0,children:a.jsx("span",{className:`${t}-glyph-inner`,children:g===" "?" ":g})},v))}):a.jsx("span",{className:`${t}-text`,style:d,children:e.text}),y=a.jsxs(a.Fragment,{children:[p,x]});return a.jsx("div",{className:`${t}-item`,"data-marquee-text-item":!0,style:{gap:r},children:e.link?a.jsx("a",{href:e.link,className:`${t}-item-link`,style:{gap:r},children:y}):y})},qf=({settings:e,content:t,isEditor:n,isPreviewMode:i})=>{const{prefix:o}=_.useScopedStyles(),[r,l]=s.useState(0),d=r>0?Math.round(r):0,{speed:c,direction:u,pauseOnHover:p,gap:x,layoutType:y,curveAmplitude:m,curveFrequency:g,textFontFamily:v,textFontSettings:b,textFontSize:E,textLineHeight:f,textLetterSpacing:w,textWordSpacing:G,textTextAppearance:X,textColor:M,backgroundColor:T,ribbonWidth:N}=e,q=N??f,$=y==="curve",I=Nf(m),W=_f(g),O=s.useMemo(()=>Rf(o,d,$),[o,d,$]),C=s.useMemo(()=>Qt({fontSettings:{fontFamily:v,fontWeight:b.fontWeight,fontStyle:b.fontStyle},letterSpacing:w,wordSpacing:G,fontSize:E,lineHeight:f,textAppearance:X,color:M},n),[v,b,w,G,E,f,X,M,n]),L=Oe=>_.scalingValue(Oe,n??!1),z=((t==null?void 0:t.length)??0)>0,S=n?!!i:!0,K=z&&(S||!!n),k=Math.max(0,c)*kf,H=S&&p==="on",[j,ne]=s.useState(!1),oe=S?H&&j?"paused":"running":"paused",R=oe==="running"&&k>0&&d>0,ce=d>0&&k>0?d/k*1e3:0,D=s.useRef(null),le=s.useRef(null),ie=s.useRef(null),we=s.useRef(null),Ie=s.useRef(null),xe=s.useRef(null),pe=s.useRef(R),Y=s.useRef(null),ae=s.useRef(null),se=s.useRef(I),Re=s.useRef(W);pe.current=R,se.current=I,Re.current=W;const[$e,Me]=s.useState(0),[ve,be]=s.useState(0),[Ce,h]=s.useState(0),[U,Z]=s.useState(0),[te,me]=s.useState(0),B=s.useMemo(()=>(t??[]).map(Oe=>{var Fe;return`${Oe.text}\0${((Fe=Oe.image)==null?void 0:Fe.url)??""}\0${Oe.link??""}`}).join("\0"),[t]),[P,Q]=s.useState(qa),ee=s.useMemo(()=>{const Oe=t??[];return Oe.length===0||!(S||n)?Oe:Wf(Oe,P)},[t,S,P,n]),de=K?ac:1;s.useLayoutEffect(()=>{Q(qa),l(0)},[B]),s.useLayoutEffect(()=>{var De;const Oe=xe.current;if(!Oe)return;const Fe=()=>{const qe=getComputedStyle(Oe),ut=parseFloat(qe.fontSize)||0;if(ut<=0)return;const ge=Of();if(!ge){Me(ut*_s),be(0);return}ge.font=`${qe.fontStyle} ${qe.fontWeight} ${ut}px ${qe.fontFamily}`;const ke=ge.measureText("H"),ot=ke.actualBoundingBoxAscent>0?ke.actualBoundingBoxAscent:ut*_s,gt=Math.max(0,ke.actualBoundingBoxDescent||0),je=ke.fontBoundingBoxAscent||0,vt=ke.fontBoundingBoxDescent||0;Me(kt=>Math.abs(kt-ot)>.5?ot:kt);const It=je>0||vt>0?(vt-gt-(je-ot))/2:0;be(kt=>Math.abs(kt-It)>.25?It:kt)};Fe();const Ke=typeof document<"u"?document.fonts:void 0;(De=Ke==null?void 0:Ke.ready)==null||De.then(Fe).catch(()=>{});const it=new ResizeObserver(Fe);return it.observe(Oe),()=>it.disconnect()},[C.fontFamily,C.fontWeight,C.fontStyle,C.fontSize,C.lineHeight]),s.useLayoutEffect(()=>{if(!K)return;const Oe=D.current,Fe=we.current;if(!Oe||!Fe)return;const Ke={id:0},it=()=>{const ge=Oe.offsetWidth||Oe.getBoundingClientRect().width,ke=Fe.offsetWidth||Fe.getBoundingClientRect().width;if(z&&ge>0&&ke>0){const ot=ke/P;if(ot>0){let gt=ge,je=Ef;if($){const It=ge*se.current,kt=Re.current,wt=kt>0?2*Math.PI*kt/ge:0,Dt=jf(It,wt);gt=Math.max(ge,Dt*ge/(ac-1)),je=Mf}const vt=Math.min(je,Math.max(qa,Math.ceil(gt/ot)+1));if(vt!==P){Q(vt);return}}}ke>0&&l(ke)},De=()=>{cancelAnimationFrame(Ke.id),Ke.id=requestAnimationFrame(it)};De();const qe=new ResizeObserver(De);qe.observe(Oe),qe.observe(Fe);const ut=()=>{document.hidden||De()};return document.addEventListener("visibilitychange",ut),window.addEventListener("pageshow",ut),window.addEventListener("focus",ut),()=>{cancelAnimationFrame(Ke.id),qe.disconnect(),document.removeEventListener("visibilitychange",ut),window.removeEventListener("pageshow",ut),window.removeEventListener("focus",ut)}},[K,B,P,z,$e,$,I,W]),s.useLayoutEffect(()=>{const Oe=Ie.current;if(!Oe)return;const Fe={id:0},Ke=()=>{const De=Oe.offsetHeight;De>0&&me(qe=>Math.abs(qe-De)>.5?De:qe)};Fe.id=requestAnimationFrame(Ke);const it=new ResizeObserver(()=>{cancelAnimationFrame(Fe.id),Fe.id=requestAnimationFrame(Ke)});return it.observe(Oe),()=>{cancelAnimationFrame(Fe.id),it.disconnect()}},[q,n]),s.useLayoutEffect(()=>{if(!$){h(0),Z(0);return}const Oe=D.current,Fe=we.current;if(!Oe||!Fe)return;const Ke={id:0},it=()=>{const qe=Oe.offsetWidth,ut=Fe.offsetHeight;qe>0&&Z(ge=>Math.abs(ge-qe)>.5?qe:ge),ut>0&&h(ge=>Math.abs(ge-ut)>.5?ut:ge)};Ke.id=requestAnimationFrame(it);const De=new ResizeObserver(()=>{cancelAnimationFrame(Ke.id),Ke.id=requestAnimationFrame(it)});return De.observe(Oe),De.observe(Fe),()=>{cancelAnimationFrame(Ke.id),De.disconnect()}},[$,B,$e,f,E,K]),s.useLayoutEffect(()=>{if(!K||d<=0)return;const Oe=ie.current;Oe&&Hf(Oe)},[K,d,u,k]),s.useLayoutEffect(()=>{if(!$||!z)return;const Oe=D.current;if(!Oe)return;const Fe={raf:0,cancelled:!1,lut:null,lutKey:"",itemsCache:[],cacheDirty:!0},Ke=()=>{for(const ot of Fe.itemsCache)for(const gt of ot.glyphs)sc(gt.inner)},it=()=>{const ot=le.current??Oe;Fe.itemsCache=Array.from(Oe.querySelectorAll("[data-marquee-text-item]"),gt=>{const je=[];return gt.querySelectorAll("[data-marquee-wave-node]").forEach(vt=>{const It=vt.firstElementChild;It&&je.push({inner:It,layoutLocalX:Bf(vt,ot)})}),{item:gt,glyphs:je}}),Fe.cacheDirty=!1},De=()=>{Fe.cacheDirty&&it();const gt=(le.current??Oe).offsetWidth||1,je=gt*se.current,vt=Re.current,It=2*Math.PI*vt/gt,kt=`${gt}|${je}|${It}`;if(kt!==Fe.lutKey&&(Fe.lutKey=kt,Fe.lut=Pu(je,It,Lu)),Math.abs(je)<=0||It<=0){Ke();return}const wt=ie.current,Dt=wt?zf(getComputedStyle(wt).transform):0,Bt=Oe.getBoundingClientRect(),Xt=Bt.left,qt=Bt.right,Lt=Fe.lut&&Fe.lut.wavelength>0?Math.max(0,(Fe.lut.periodArc/Fe.lut.wavelength-1)*gt):0;for(const{item:Ot,glyphs:nn}of Fe.itemsCache){const xt=Ot.getBoundingClientRect();if(xt.right<Xt||xt.left>qt+Lt){for(const Te of nn)sc(Te.inner);continue}for(const Te of nn){const Ve=Te.layoutLocalX+Dt,st=Fe.lut?Vf(Fe.lut,Ve):Ve,lt=It*st,bt=je*Math.sin(lt),Tt=je*It*Math.cos(lt),tt=Math.atan(Tt)*(180/Math.PI);Df(Te.inner,st-Ve,bt,tt)}}},qe=()=>{Fe.cancelled||(Fe.raf=0,De(),pe.current&&!document.hidden&&(Fe.raf=requestAnimationFrame(qe)))},ut=()=>{Fe.cancelled||Fe.raf||(Fe.raf=requestAnimationFrame(qe))},ge=()=>{Fe.cacheDirty=!0,De(),ut()};Y.current=ut,ae.current=ge,De(),ut();const ke=()=>{if(document.hidden){cancelAnimationFrame(Fe.raf),Fe.raf=0;return}cancelAnimationFrame(Fe.raf),Fe.raf=0,ge()};return document.addEventListener("visibilitychange",ke),window.addEventListener("pageshow",ke),window.addEventListener("focus",ke),()=>{Fe.cancelled=!0,Y.current=null,ae.current=null,cancelAnimationFrame(Fe.raf),document.removeEventListener("visibilitychange",ke),window.removeEventListener("pageshow",ke),window.removeEventListener("focus",ke),Ke()}},[$,z]),s.useLayoutEffect(()=>{var Oe;!$||!z||(Oe=ae.current)==null||Oe.call(ae)},[$,z,r,B,P,$e,I,W,U]),s.useLayoutEffect(()=>{var Oe;(Oe=Y.current)==null||Oe.call(Y)},[R,u]);const V=()=>{H&&ne(!0)},Pe=()=>{H&&ne(!1)},he=$?Math.abs(I)*100:0,J=L(q),Ne={minHeight:J,...$?{paddingTop:`${he}%`,paddingBottom:`${he}%`}:{}},Be={height:J,...$?{visibility:"hidden"}:{backgroundColor:T}},at={gap:L(x),minHeight:J},Ue=U*I,nt=Math.abs(Ue),Ze=te>0?te:Ce,Xe=Math.max(Ce,Ze),fe=nt+Xe/2,He=Math.max(Ze,1),We=$&&U>0&&Xe>0?Gf(U,Ue,W,fe,He):"",Qe=nt*2+Xe,ye=We?a.jsx("svg",{className:`${o}-curve-bg`,viewBox:`0 0 ${U} ${Qe}`,preserveAspectRatio:"none","aria-hidden":!0,children:a.jsx("path",{d:We,fill:"none",stroke:T,strokeWidth:Ze,strokeLinecap:"butt",strokeLinejoin:"round"})}):null,_e=a.jsx("div",{ref:Ie,className:`${o}-ribbon`,style:Be,"aria-hidden":!0}),Ge=(Oe,Fe,Ke)=>a.jsx(Xf,{item:Oe,prefix:o,textCss:C,capHeightPx:$e,opticalOffsetY:ve,imageGapPx:L(x),isCurve:$},`${Fe}-${Ke}`),et=a.jsx("span",{ref:xe,"aria-hidden":!0,className:`${o}-cap-ref`,style:C,children:"H"}),mt=`${Math.max(0,ce)/1e3}s`,rt=K?a.jsx("div",{ref:ie,className:`${o}-marquee-track`,"data-direction":u,onMouseEnter:V,onMouseLeave:Pe,style:{WebkitAnimationDuration:mt,animationDuration:mt,WebkitAnimationPlayState:oe,animationPlayState:oe},children:Array.from({length:de},(Oe,Fe)=>a.jsx("div",{ref:Fe===0?we:void 0,className:`${o}-marquee-set`,style:{...at,paddingRight:L(x)},"aria-hidden":Fe>0,children:ee.map((Ke,it)=>Ge(Ke,Fe,it))},`set-${Fe}`))}):a.jsx("div",{ref:we,className:Ct(`${o}-marquee-set`,`${o}-marquee-static`),style:at,children:t==null?void 0:t.map((Oe,Fe)=>Ge(Oe,0,Fe))});return a.jsxs("div",{ref:D,className:`${o}-wrapper`,"aria-label":"Marquee text",children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:O}}),et,a.jsxs("div",{ref:le,className:`${o}-marquee-wrapper`,style:Ne,children:[_e,ye,rt]})]})},Uf=`import { useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
2612
+ `}const kf=30,qa=3,Ef=12,Mf=96,ac=3,_s=.72,Af=100,Ff=10,Nf=e=>e/Af,_f=e=>Math.max(0,e)/Ff,Hf=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")},Wf=(e,t)=>Array.from({length:t*e.length},(n,i)=>e[i%e.length]),oo={ctx:void 0},Of=()=>oo.ctx!==void 0?oo.ctx:typeof document>"u"?(oo.ctx=null,oo.ctx):(oo.ctx=document.createElement("canvas").getContext("2d"),oo.ctx),Df=(e,t,n,i)=>{e.style.transform=`translate3d(${t}px, ${n}px, 0) rotate(${i}deg)`},sc=e=>{e.style.transform=""},zf=e=>{if(!e||e==="none")return 0;try{return new DOMMatrixReadOnly(e).m41}catch{return 0}},Bf=(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)},Lu=96,Pu=(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}},jf=(e,t)=>{const n=Pu(e,t,Lu);return!n||n.wavelength<=0?1:n.periodArc/n.wavelength},Vf=(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,g)=>{if(g-m<=1)return[m,g];const x=m+g>>1;return l[x]<=r?d(x,g):d(m,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)},Gf=(e,t,n,i,o=0)=>{const r=Math.max(0,n),l=e>0?2*Math.PI*r/e:0,c=g=>i+t*Math.sin(l*g),d=g=>t*l*Math.cos(l*g),u=-o,y=e+o-u,v=Math.max(4,Math.ceil(r*4*(y/Math.max(e,1)))),m=Array.from({length:v},(g,x)=>{const b=u+x/v*y,E=u+(x+1)/v*y,f=E-b,w=c(b),G=c(E),X=b+f/3,k=w+d(b)*f/3,L=E-f/3,A=G-d(E)*f/3;return`C${X.toFixed(2)} ${k.toFixed(2)} ${L.toFixed(2)} ${A.toFixed(2)} ${E.toFixed(2)} ${G.toFixed(2)}`});return[`M${u.toFixed(2)} ${c(u).toFixed(2)}`,...m].join(" ")},Xf=({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:`${_s}em`},u=((m=e.image)==null?void 0:m.url)&&a.jsx("img",{src:e.image.url,alt:e.image.name??"",className:`${t}-item-image`,style: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((g,x)=>a.jsx("span",{className:`${t}-glyph`,"data-marquee-wave-node":!0,children:a.jsx("span",{className:`${t}-glyph-inner`,children:g===" "?" ":g})},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})},qf=({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:m,curveFrequency:g,textFontFamily:x,textFontSettings:b,textFontSize:E,textLineHeight:f,textLetterSpacing:w,textWordSpacing:G,textTextAppearance:X,textColor:k,backgroundColor:L,ribbonWidth:A}=e,U=A??f,$=v==="curve",P=Nf(m),H=_f(g),W=s.useMemo(()=>Rf(o,c,$),[o,c,$]),C=s.useMemo(()=>Qt({fontSettings:{fontFamily:x,fontWeight:b.fontWeight,fontStyle:b.fontStyle},letterSpacing:w,wordSpacing:G,fontSize:E,lineHeight:f,textAppearance:X,color:k},n),[x,b,w,G,E,f,X,k,n]),T=De=>F.scalingValue(De,n??!1),B=((t==null?void 0:t.length)??0)>0,S=n?!!i:!0,K=B&&(S||!!n),R=Math.max(0,d)*kf,_=S&&p==="on",[j,oe]=s.useState(!1),re=S?_&&j?"paused":"running":"paused",O=re==="running"&&R>0&&c>0,ie=c>0&&R>0?c/R*1e3:0,D=s.useRef(null),le=s.useRef(null),ee=s.useRef(null),ve=s.useRef(null),Ie=s.useRef(null),be=s.useRef(null),pe=s.useRef(O),Y=s.useRef(null),se=s.useRef(null),xe=s.useRef(P),Se=s.useRef(H);pe.current=O,xe.current=P,Se.current=H;const[Ce,Ae]=s.useState(0),[fe,we]=s.useState(0),[Te,h]=s.useState(0),[q,Z]=s.useState(0),[te,ue]=s.useState(0),z=s.useMemo(()=>(t??[]).map(De=>{var Me;return`${De.text}\0${((Me=De.image)==null?void 0:Me.url)??""}\0${De.link??""}`}).join("\0"),[t]),[I,Q]=s.useState(qa),ne=s.useMemo(()=>{const De=t??[];return De.length===0||!(S||n)?De:Wf(De,I)},[t,S,I,n]),de=K?ac:1;s.useLayoutEffect(()=>{Q(qa),l(0)},[z]),s.useLayoutEffect(()=>{var Oe;const De=be.current;if(!De)return;const Me=()=>{const Xe=getComputedStyle(De),lt=parseFloat(Xe.fontSize)||0;if(lt<=0)return;const me=Of();if(!me){Ae(lt*_s),we(0);return}me.font=`${Xe.fontStyle} ${Xe.fontWeight} ${lt}px ${Xe.fontFamily}`;const Re=me.measureText("H"),it=Re.actualBoundingBoxAscent>0?Re.actualBoundingBoxAscent:lt*_s,ht=Math.max(0,Re.actualBoundingBoxDescent||0),Ge=Re.fontBoundingBoxAscent||0,St=Re.fontBoundingBoxDescent||0;Ae(kt=>Math.abs(kt-it)>.5?it:kt);const Pt=Ge>0||St>0?(St-ht-(Ge-it))/2:0;we(kt=>Math.abs(kt-Pt)>.25?Pt:kt)};Me();const gt=typeof document<"u"?document.fonts:void 0;(Oe=gt==null?void 0:gt.ready)==null||Oe.then(Me).catch(()=>{});const ze=new ResizeObserver(Me);return ze.observe(De),()=>ze.disconnect()},[C.fontFamily,C.fontWeight,C.fontStyle,C.fontSize,C.lineHeight]),s.useLayoutEffect(()=>{if(!K)return;const De=D.current,Me=ve.current;if(!De||!Me)return;const gt={id:0},ze=()=>{const me=De.offsetWidth||De.getBoundingClientRect().width,Re=Me.offsetWidth||Me.getBoundingClientRect().width;if(B&&me>0&&Re>0){const it=Re/I;if(it>0){let ht=me,Ge=Ef;if($){const Pt=me*xe.current,kt=Se.current,$t=kt>0?2*Math.PI*kt/me:0,jt=jf(Pt,$t);ht=Math.max(me,jt*me/(ac-1)),Ge=Mf}const St=Math.min(Ge,Math.max(qa,Math.ceil(ht/it)+1));if(St!==I){Q(St);return}}}Re>0&&l(Re)},Oe=()=>{cancelAnimationFrame(gt.id),gt.id=requestAnimationFrame(ze)};Oe();const Xe=new ResizeObserver(Oe);Xe.observe(De),Xe.observe(Me);const lt=()=>{document.hidden||Oe()};return document.addEventListener("visibilitychange",lt),window.addEventListener("pageshow",lt),window.addEventListener("focus",lt),()=>{cancelAnimationFrame(gt.id),Xe.disconnect(),document.removeEventListener("visibilitychange",lt),window.removeEventListener("pageshow",lt),window.removeEventListener("focus",lt)}},[K,z,I,B,Ce,$,P,H]),s.useLayoutEffect(()=>{const De=Ie.current;if(!De)return;const Me={id:0},gt=()=>{const Oe=De.offsetHeight;Oe>0&&ue(Xe=>Math.abs(Xe-Oe)>.5?Oe:Xe)};Me.id=requestAnimationFrame(gt);const ze=new ResizeObserver(()=>{cancelAnimationFrame(Me.id),Me.id=requestAnimationFrame(gt)});return ze.observe(De),()=>{cancelAnimationFrame(Me.id),ze.disconnect()}},[U,n]),s.useLayoutEffect(()=>{if(!$){h(0),Z(0);return}const De=D.current,Me=ve.current;if(!De||!Me)return;const gt={id:0},ze=()=>{const Xe=De.offsetWidth,lt=Me.offsetHeight;Xe>0&&Z(me=>Math.abs(me-Xe)>.5?Xe:me),lt>0&&h(me=>Math.abs(me-lt)>.5?lt:me)};gt.id=requestAnimationFrame(ze);const Oe=new ResizeObserver(()=>{cancelAnimationFrame(gt.id),gt.id=requestAnimationFrame(ze)});return Oe.observe(De),Oe.observe(Me),()=>{cancelAnimationFrame(gt.id),Oe.disconnect()}},[$,z,Ce,f,E,K]),s.useLayoutEffect(()=>{if(!K||c<=0)return;const De=ee.current;De&&Hf(De)},[K,c,u,R]),s.useLayoutEffect(()=>{if(!$||!B)return;const De=D.current;if(!De)return;const Me={raf:0,cancelled:!1,lut:null,lutKey:"",itemsCache:[],cacheDirty:!0},gt=()=>{for(const it of Me.itemsCache)for(const ht of it.glyphs)sc(ht.inner)},ze=()=>{const it=le.current??De;Me.itemsCache=Array.from(De.querySelectorAll("[data-marquee-text-item]"),ht=>{const Ge=[];return ht.querySelectorAll("[data-marquee-wave-node]").forEach(St=>{const Pt=St.firstElementChild;Pt&&Ge.push({inner:Pt,layoutLocalX:Bf(St,it)})}),{item:ht,glyphs:Ge}}),Me.cacheDirty=!1},Oe=()=>{Me.cacheDirty&&ze();const ht=(le.current??De).offsetWidth||1,Ge=ht*xe.current,St=Se.current,Pt=2*Math.PI*St/ht,kt=`${ht}|${Ge}|${Pt}`;if(kt!==Me.lutKey&&(Me.lutKey=kt,Me.lut=Pu(Ge,Pt,Lu)),Math.abs(Ge)<=0||Pt<=0){gt();return}const $t=ee.current,jt=$t?zf(getComputedStyle($t).transform):0,Bt=De.getBoundingClientRect(),Xt=Bt.left,qt=Bt.right,It=Me.lut&&Me.lut.wavelength>0?Math.max(0,(Me.lut.periodArc/Me.lut.wavelength-1)*ht):0;for(const{item:Dt,glyphs:on}of Me.itemsCache){const xt=Dt.getBoundingClientRect();if(xt.right<Xt||xt.left>qt+It){for(const ft of on)sc(ft.inner);continue}for(const ft of on){const Ee=ft.layoutLocalX+jt,et=Me.lut?Vf(Me.lut,Ee):Ee,Je=Pt*et,dt=Ge*Math.sin(Je),Tt=Ge*Pt*Math.cos(Je),vt=Math.atan(Tt)*(180/Math.PI);Df(ft.inner,et-Ee,dt,vt)}}},Xe=()=>{Me.cancelled||(Me.raf=0,Oe(),pe.current&&!document.hidden&&(Me.raf=requestAnimationFrame(Xe)))},lt=()=>{Me.cancelled||Me.raf||(Me.raf=requestAnimationFrame(Xe))},me=()=>{Me.cacheDirty=!0,Oe(),lt()};Y.current=lt,se.current=me,Oe(),lt();const Re=()=>{if(document.hidden){cancelAnimationFrame(Me.raf),Me.raf=0;return}cancelAnimationFrame(Me.raf),Me.raf=0,me()};return document.addEventListener("visibilitychange",Re),window.addEventListener("pageshow",Re),window.addEventListener("focus",Re),()=>{Me.cancelled=!0,Y.current=null,se.current=null,cancelAnimationFrame(Me.raf),document.removeEventListener("visibilitychange",Re),window.removeEventListener("pageshow",Re),window.removeEventListener("focus",Re),gt()}},[$,B]),s.useLayoutEffect(()=>{var De;!$||!B||(De=se.current)==null||De.call(se)},[$,B,r,z,I,Ce,P,H,q]),s.useLayoutEffect(()=>{var De;(De=Y.current)==null||De.call(Y)},[O,u]);const V=()=>{_&&oe(!0)},Pe=()=>{_&&oe(!1)},he=$?Math.abs(P)*100:0,J=T(U),He={minHeight:J,...$?{paddingTop:`${he}%`,paddingBottom:`${he}%`}:{}},We={height:J,...$?{visibility:"hidden"}:{backgroundColor:L}},ot={gap:T(y),minHeight:J},qe=q*P,nt=Math.abs(qe),tt=te>0?te:Te,Ve=Math.max(Te,tt),ge=nt+Ve/2,_e=Math.max(tt,1),je=$&&q>0&&Ve>0?Gf(q,qe,H,ge,_e):"",Ze=nt*2+Ve,ye=je?a.jsx("svg",{className:`${o}-curve-bg`,viewBox:`0 0 ${q} ${Ze}`,preserveAspectRatio:"none","aria-hidden":!0,children:a.jsx("path",{d:je,fill:"none",stroke:L,strokeWidth:tt,strokeLinecap:"butt",strokeLinejoin:"round"})}):null,Ne=a.jsx("div",{ref:Ie,className:`${o}-ribbon`,style:We,"aria-hidden":!0}),Ke=(De,Me,gt)=>a.jsx(Xf,{item:De,prefix:o,textCss:C,capHeightPx:Ce,opticalOffsetY:fe,imageGapPx:T(y),isCurve:$},`${Me}-${gt}`),Qe=a.jsx("span",{ref:be,"aria-hidden":!0,className:`${o}-cap-ref`,style:C,children:"H"}),st=`${Math.max(0,ie)/1e3}s`,rt=K?a.jsx("div",{ref:ee,className:`${o}-marquee-track`,"data-direction":u,onMouseEnter:V,onMouseLeave:Pe,style:{WebkitAnimationDuration:st,animationDuration:st,WebkitAnimationPlayState:re,animationPlayState:re},children:Array.from({length:de},(De,Me)=>a.jsx("div",{ref:Me===0?ve:void 0,className:`${o}-marquee-set`,style:{...ot,paddingRight:T(y)},"aria-hidden":Me>0,children:ne.map((gt,ze)=>Ke(gt,Me,ze))},`set-${Me}`))}):a.jsx("div",{ref:ve,className:Lt(`${o}-marquee-set`,`${o}-marquee-static`),style:ot,children:t==null?void 0:t.map((De,Me)=>Ke(De,0,Me))});return a.jsxs("div",{ref:D,className:`${o}-wrapper`,"aria-label":"Marquee text",children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:W}}),Qe,a.jsxs("div",{ref:le,className:`${o}-marquee-wrapper`,style:He,children:[Ne,ye,rt]})]})},Uf=`import { useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
2613
2613
  import cn from 'classnames';
2614
2614
  import { CommonComponentProps } from '../props';
2615
2615
  import { scalingValue } from '../utils/scalingValue';
@@ -3628,7 +3628,7 @@ type MarqueeTextProps = {
3628
3628
  pointer-events: auto;
3629
3629
  z-index: 10;
3630
3630
  }
3631
- `}const Qf=30,lc=2,ey=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}=_.useScopedStyles(),{align:l,speed:d,direction:c,pauseOnHover:u,gap:p,cardWidth:x,corners:y,stroke:m,strokeColor:g,bgColor:v,padding:b,logoMarginTop:E,logoWidth:f,logoHeight:w,captionMarginTop:G}=e,X=!!o,M=((t==null?void 0:t.length)??0)>0,T=d>0&&(!n||i),N=M&&(T||n),q=Math.max(0,d)*Qf,$=P=>_.scalingValue(P,n??!1),I=s.useRef(null),W=s.useRef(null),O=s.useRef(null),[C,L]=s.useState(0),[z,S]=s.useState(0),K=z>0?z:0,k=s.useMemo(()=>Jf(r,K),[r,K]),[H,j]=s.useState(0),ne=T&&u==="on",[oe,R]=s.useState(!1),ce=s.useRef(null),[D,le]=s.useState(0),[ie,we]=s.useState(0),Ie=s.useRef(null),xe=P=>{var ee,de,V,Pe,he;return{fontSettings:{fontFamily:(e==null?void 0:e[`${P}FontFamily`])??"Arial",fontWeight:((ee=e==null?void 0:e[`${P}FontSettings`])==null?void 0:ee.fontWeight)??400,fontStyle:((de=e==null?void 0:e[`${P}FontSettings`])==null?void 0:de.fontStyle)??"normal"},textAppearance:{textTransform:((V=e==null?void 0:e[`${P}TextAppearance`])==null?void 0:V.textTransform)??"none",textDecoration:((Pe=e==null?void 0:e[`${P}TextAppearance`])==null?void 0:Pe.textDecoration)??"none",fontVariant:((he=e==null?void 0:e[`${P}TextAppearance`])==null?void 0:he.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${P}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${P}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${P}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${P}LineHeight`])??.01,color:(e==null?void 0:e[`${P}Color`])??"#000000"}},pe=xe("text"),Y=xe("caption"),ae=s.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(P=>{var Q,ee;return(((Q=P.text)==null?void 0:Q.length)??0)>0||(((ee=P.caption)==null?void 0:ee.length)??0)>0}),[t]),se=s.useMemo(()=>!N||(t==null?void 0:t.length)===0?1:z<=0||C<=0?lc:Math.max(lc,Math.ceil(C/z)+1),[N,t==null?void 0:t.length,z,C]);s.useLayoutEffect(()=>{if(!N)return;const P=I.current,Q=O.current;if(!P||!Q)return;let ee=0;const de=()=>{const he=P.getBoundingClientRect().width,J=Q.getBoundingClientRect().width,Ne=Ie.current,Be=typeof Ne=="number"&&Math.abs(Ne-J)<=.25;if(Ie.current=J,L(he),typeof J=="number"&&J>0&&z<=0){S(J);return}Be&&J!==z?S(J):!Be&&z<=0&&(cancelAnimationFrame(ee),ee=requestAnimationFrame(de))},V=()=>{cancelAnimationFrame(ee),ee=requestAnimationFrame(de)};V();const Pe=new ResizeObserver(V);return Pe.observe(P),Pe.observe(Q),()=>{cancelAnimationFrame(ee),Pe.disconnect()}},[T,N,z]);const Re=K>0&&q>0?K/q*1e3:0,$e=`${Math.max(0,Re)/1e3}s`;s.useLayoutEffect(()=>{if(!N||K<=0)return;const P=W.current;P&&ey(P)},[N,K,c]),s.useLayoutEffect(()=>{if(!N){j(0);return}const P=O.current,Q=W.current;if(!P||!Q)return;const ee=()=>{let V=0;for(let Pe=0;Pe<P.children.length;Pe++){const J=P.children[Pe].firstElementChild;J&&(V=Math.max(V,J.offsetHeight))}V<=0&&(V=Q.offsetHeight),j(V>0?V:0)};ee();const de=new ResizeObserver(ee);return de.observe(P),de.observe(Q),()=>{de.disconnect()}},[N,se,t,n,p,x,b,m,y,f,w,D,ie]);const Me=()=>{ne&&R(!0)},ve=()=>{ne&&R(!1)},be=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((P,Q,ee,de)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:be,width:"100%"},children:[a.jsx("div",{"data-controls":X?de==null?void 0:de.controlsName:void 0,"data-controls-axis":X?"y":void 0,className:X?`${r}-control`:void 0,style:{height:$((de==null?void 0:de.marginTop)??0)}}),a.jsx("div",{...de!=null&&de.dataMeasureKind?{"data-testimonial-measure":de.dataMeasureKind}:{},style:{...Qt(P,n),textAlign:Ce,pointerEvents:"auto",...typeof(de==null?void 0:de.minHeightPx)=="number"&&de.minHeightPx>0?{minHeight:de.minHeightPx}:{}},children:a.jsx(Zi,{content:Q})})]},ee),[be,Ce,n,X,r,$]),U=s.useCallback((P,Q,ee)=>{var de,V,Pe;return a.jsxs("div",{style:{padding:`${$(b.top)} ${$(b.right)} ${$(b.bottom)} ${$(b.left)}`,width:$(x+m*2),height:"100%",borderRadius:$(y),border:`${$(m)} solid ${g}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${r}-cover`,style:{background:v}}),a.jsxs("div",{className:`${r}-elements-overlay`,style:{alignItems:be,textAlign:Ce},children:[P.text&&h(pe,P.text,"text",ee!=null&&ee.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(ee==null?void 0:ee.textMinHeightPx)=="number"&&ee.textMinHeightPx>0?{minHeightPx:ee.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:be,width:"100%"},children:[a.jsx("div",{"data-controls":X&&!(ee!=null&&ee.dataMeasureAttrs)?"logoMarginTop":void 0,className:X&&!(ee!=null&&ee.dataMeasureAttrs)?`${r}-control`:void 0,style:{height:$(E)}}),a.jsx("div",{style:{width:$(f),height:$(w)},children:((de=P.logo)==null?void 0:de.url)&&a.jsx("img",{src:P.logo.url,alt:((V=P.logo)==null?void 0:V.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Pe=P.logo)==null?void 0:Pe.objectFit)||"contain"}})})]}),P.caption&&h(Y,P.caption,"caption",{...ee!=null&&ee.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:G,...ee!=null&&ee.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(ee==null?void 0:ee.captionMinHeightPx)=="number"&&ee.captionMinHeightPx>0?{minHeightPx:ee.captionMinHeightPx}:{}})]})]},Q)},[v,G,Y,x,y,w,E,f,be,Ce,b.bottom,b.left,b.right,b.top,h,m,g,pe,n,X,r]),Z=s.useCallback(P=>{le(P.maxTextPx),we(P.maxCaptionPx)},[]);s.useLayoutEffect(()=>{if(!ae){Z({maxTextPx:0,maxCaptionPx:0});return}const P=ce.current;if(!P)return;const Q=()=>{_.readTestimonialTextMeasure(P,Z)};Q();const ee=new ResizeObserver(Q);return ee.observe(P),()=>{ee.disconnect()}},[ae,Z,t,U]);const te=ae?{textMinHeightPx:D,captionMinHeightPx:ie}:void 0,me=ae?a.jsx("div",{ref:ce,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((P,Q)=>U(P,`measure-${Q}`,{dataMeasureAttrs:!0}))}):null,B=(P,Q)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[U(P,`card-${Q}`,te),X&&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}})]},Q);if(N){const P=T?ne&&oe?"paused":"running":"paused";return a.jsxs("div",{ref:I,className:Ct(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...H>0?{height:H}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:k}}),me,a.jsx("div",{ref:W,className:`${r}-marquee-track`,"data-direction":c,onMouseEnter:Me,onMouseLeave:ve,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:$e,WebkitAnimationDuration:$e,animationPlayState:P,WebkitAnimationPlayState:P},children:Array.from({length:se},(Q,ee)=>a.jsx("div",{ref:ee===0?O:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:$(p),paddingRight:$(p)},"aria-hidden":ee>0,children:t==null?void 0:t.map((de,V)=>B(de,`${ee}-${V}`))},`set-${ee}`))})]})}return a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:k}}),me,a.jsx("div",{style:{gap:$(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((P,Q)=>B(P,Q))})]})},ny=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
3631
+ `}const Qf=30,lc=2,ey=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:m,strokeColor:g,bgColor:x,padding:b,logoMarginTop:E,logoWidth:f,logoHeight:w,captionMarginTop:G}=e,X=!!o,k=((t==null?void 0:t.length)??0)>0,L=c>0&&(!n||i),A=k&&(L||n),U=Math.max(0,c)*Qf,$=I=>F.scalingValue(I,n??!1),P=s.useRef(null),H=s.useRef(null),W=s.useRef(null),[C,T]=s.useState(0),[B,S]=s.useState(0),K=B>0?B:0,R=s.useMemo(()=>Jf(r,K),[r,K]),[_,j]=s.useState(0),oe=L&&u==="on",[re,O]=s.useState(!1),ie=s.useRef(null),[D,le]=s.useState(0),[ee,ve]=s.useState(0),Ie=s.useRef(null),be=I=>{var ne,de,V,Pe,he;return{fontSettings:{fontFamily:(e==null?void 0:e[`${I}FontFamily`])??"Arial",fontWeight:((ne=e==null?void 0:e[`${I}FontSettings`])==null?void 0:ne.fontWeight)??400,fontStyle:((de=e==null?void 0:e[`${I}FontSettings`])==null?void 0:de.fontStyle)??"normal"},textAppearance:{textTransform:((V=e==null?void 0:e[`${I}TextAppearance`])==null?void 0:V.textTransform)??"none",textDecoration:((Pe=e==null?void 0:e[`${I}TextAppearance`])==null?void 0:Pe.textDecoration)??"none",fontVariant:((he=e==null?void 0:e[`${I}TextAppearance`])==null?void 0:he.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${I}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${I}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${I}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${I}LineHeight`])??.01,color:(e==null?void 0:e[`${I}Color`])??"#000000"}},pe=be("text"),Y=be("caption"),se=s.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(I=>{var Q,ne;return(((Q=I.text)==null?void 0:Q.length)??0)>0||(((ne=I.caption)==null?void 0:ne.length)??0)>0}),[t]),xe=s.useMemo(()=>!A||(t==null?void 0:t.length)===0?1:B<=0||C<=0?lc:Math.max(lc,Math.ceil(C/B)+1),[A,t==null?void 0:t.length,B,C]);s.useLayoutEffect(()=>{if(!A)return;const I=P.current,Q=W.current;if(!I||!Q)return;let ne=0;const de=()=>{const he=I.getBoundingClientRect().width,J=Q.getBoundingClientRect().width,He=Ie.current,We=typeof He=="number"&&Math.abs(He-J)<=.25;if(Ie.current=J,T(he),typeof J=="number"&&J>0&&B<=0){S(J);return}We&&J!==B?S(J):!We&&B<=0&&(cancelAnimationFrame(ne),ne=requestAnimationFrame(de))},V=()=>{cancelAnimationFrame(ne),ne=requestAnimationFrame(de)};V();const Pe=new ResizeObserver(V);return Pe.observe(I),Pe.observe(Q),()=>{cancelAnimationFrame(ne),Pe.disconnect()}},[L,A,B]);const Se=K>0&&U>0?K/U*1e3:0,Ce=`${Math.max(0,Se)/1e3}s`;s.useLayoutEffect(()=>{if(!A||K<=0)return;const I=H.current;I&&ey(I)},[A,K,d]),s.useLayoutEffect(()=>{if(!A){j(0);return}const I=W.current,Q=H.current;if(!I||!Q)return;const ne=()=>{let V=0;for(let Pe=0;Pe<I.children.length;Pe++){const J=I.children[Pe].firstElementChild;J&&(V=Math.max(V,J.offsetHeight))}V<=0&&(V=Q.offsetHeight),j(V>0?V:0)};ne();const de=new ResizeObserver(ne);return de.observe(I),de.observe(Q),()=>{de.disconnect()}},[A,xe,t,n,p,y,b,m,v,f,w,D,ee]);const Ae=()=>{oe&&O(!0)},fe=()=>{oe&&O(!1)},we=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),Te=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]),h=s.useCallback((I,Q,ne,de)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:we,width:"100%"},children:[a.jsx("div",{"data-controls":X?de==null?void 0:de.controlsName:void 0,"data-controls-axis":X?"y":void 0,className:X?`${r}-control`:void 0,style:{height:$((de==null?void 0:de.marginTop)??0)}}),a.jsx("div",{...de!=null&&de.dataMeasureKind?{"data-testimonial-measure":de.dataMeasureKind}:{},style:{...Qt(I,n),textAlign:Te,pointerEvents:"auto",...typeof(de==null?void 0:de.minHeightPx)=="number"&&de.minHeightPx>0?{minHeight:de.minHeightPx}:{}},children:a.jsx(Zi,{content:Q})})]},ne),[we,Te,n,X,r,$]),q=s.useCallback((I,Q,ne)=>{var de,V,Pe;return a.jsxs("div",{style:{padding:`${$(b.top)} ${$(b.right)} ${$(b.bottom)} ${$(b.left)}`,width:$(y+m*2),height:"100%",borderRadius:$(v),border:`${$(m)} solid ${g}`,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:we,textAlign:Te},children:[I.text&&h(pe,I.text,"text",ne!=null&&ne.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(ne==null?void 0:ne.textMinHeightPx)=="number"&&ne.textMinHeightPx>0?{minHeightPx:ne.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:we,width:"100%"},children:[a.jsx("div",{"data-controls":X&&!(ne!=null&&ne.dataMeasureAttrs)?"logoMarginTop":void 0,className:X&&!(ne!=null&&ne.dataMeasureAttrs)?`${r}-control`:void 0,style:{height:$(E)}}),a.jsx("div",{style:{width:$(f),height:$(w)},children:((de=I.logo)==null?void 0:de.url)&&a.jsx("img",{src:I.logo.url,alt:((V=I.logo)==null?void 0:V.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Pe=I.logo)==null?void 0:Pe.objectFit)||"contain"}})})]}),I.caption&&h(Y,I.caption,"caption",{...ne!=null&&ne.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:G,...ne!=null&&ne.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(ne==null?void 0:ne.captionMinHeightPx)=="number"&&ne.captionMinHeightPx>0?{minHeightPx:ne.captionMinHeightPx}:{}})]})]},Q)},[x,G,Y,y,v,w,E,f,we,Te,b.bottom,b.left,b.right,b.top,h,m,g,pe,n,X,r]),Z=s.useCallback(I=>{le(I.maxTextPx),ve(I.maxCaptionPx)},[]);s.useLayoutEffect(()=>{if(!se){Z({maxTextPx:0,maxCaptionPx:0});return}const I=ie.current;if(!I)return;const Q=()=>{F.readTestimonialTextMeasure(I,Z)};Q();const ne=new ResizeObserver(Q);return ne.observe(I),()=>{ne.disconnect()}},[se,Z,t,q]);const te=se?{textMinHeightPx:D,captionMinHeightPx:ee}:void 0,ue=se?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((I,Q)=>q(I,`measure-${Q}`,{dataMeasureAttrs:!0}))}):null,z=(I,Q)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[q(I,`card-${Q}`,te),X&&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}})]},Q);if(A){const I=L?oe&&re?"paused":"running":"paused";return a.jsxs("div",{ref:P,className:Lt(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",..._>0?{height:_}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:R}}),ue,a.jsx("div",{ref:H,className:`${r}-marquee-track`,"data-direction":d,onMouseEnter:Ae,onMouseLeave:fe,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:Ce,WebkitAnimationDuration:Ce,animationPlayState:I,WebkitAnimationPlayState:I},children:Array.from({length:xe},(Q,ne)=>a.jsx("div",{ref:ne===0?W:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:$(p),paddingRight:$(p)},"aria-hidden":ne>0,children:t==null?void 0:t.map((de,V)=>z(de,`${ne}-${V}`))},`set-${ne}`))})]})}return a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:R}}),ue,a.jsx("div",{style:{gap:$(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((I,Q)=>z(I,Q))})]})},ny=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
3632
3632
  import cn from 'classnames';
3633
3633
  import { CommonComponentProps } from '../props';
3634
3634
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -4383,7 +4383,7 @@ type TestimonialsSettings = {
4383
4383
  width: 100%;
4384
4384
  height: 100%;
4385
4385
  }
4386
- `}const ay=3e3,sy=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=_.useScopedStyles(),l=t||[],{speed:d,align:c,width:u,imageMarginTop:p,textMarginTop:x,captionMarginTop:y,imageWidth:m,imageHeight:g,controlsWidth:v,controlsColor:b,controlsHoverColor:E}=e,f=d>0&&(!n||!!i),[w,G]=s.useState(0),[X,M]=s.useState(null),[T,N]=s.useState(!1),q=s.useRef(null),$=s.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),I=s.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);s.useEffect(()=>{G(0),M(null),N(!1)},[l.length]);const W=l[w],O=X===null?null:l[X],C=xe=>{var Y,ae,se,Re,$e;return{fontSettings:{fontFamily:(e==null?void 0:e[`${xe}FontFamily`])??"Arial",fontWeight:((Y=e==null?void 0:e[`${xe}FontSettings`])==null?void 0:Y.fontWeight)??400,fontStyle:((ae=e==null?void 0:e[`${xe}FontSettings`])==null?void 0:ae.fontStyle)??"normal"},textAppearance:{textTransform:((se=e==null?void 0:e[`${xe}TextAppearance`])==null?void 0:se.textTransform)??"none",textDecoration:((Re=e==null?void 0:e[`${xe}TextAppearance`])==null?void 0:Re.textDecoration)??"none",fontVariant:(($e=e==null?void 0:e[`${xe}TextAppearance`])==null?void 0:$e.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${xe}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${xe}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${xe}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${xe}WordSpacing`])??0,color:(e==null?void 0:e[`${xe}Color`])??"#000000"}},L=C("text"),z=C("caption"),S=l.length>1&&l.some(xe=>{var pe,Y;return(((pe=xe.text)==null?void 0:pe.length)??0)>0||(((Y=xe.caption)==null?void 0:Y.length)??0)>0}),K=s.useRef(null),[k,H]=s.useState(0),[j,ne]=s.useState(0),oe=e.controls??{mode:"Off",icon:null},R=l.length>1,ce=s.useCallback((xe,pe)=>!R||pe===xe?xe:(q.current&&window.clearTimeout(q.current),M(xe),N(!0),q.current=window.setTimeout(()=>{M(null),N(!1),q.current=null},300),pe),[R]),D=s.useCallback(()=>{R&&G(xe=>ce(xe,(xe-1+l.length)%l.length))},[R,ce,l.length]),le=s.useCallback(()=>{R&&G(xe=>ce(xe,(xe+1)%l.length))},[R,ce,l.length]);s.useEffect(()=>{if(!f||!R)return;const xe=Math.max(300,ay/d),pe=window.setInterval(()=>{G(Y=>ce(Y,(Y+1)%l.length))},xe);return()=>{window.clearInterval(pe)}},[f,R,ce,l.length,d]),s.useEffect(()=>()=>{q.current&&window.clearTimeout(q.current)},[]);const ie=(xe,pe)=>{var $e,Me,ve,be;const Y=pe==null?void 0:pe.textMinHeightPx,ae=pe==null?void 0:pe.captionMinHeightPx,se=pe==null?void 0:pe.dataMeasureAttrs,Re=o&&!(pe!=null&&pe.dataMeasureAttrs)&&!(pe!=null&&pe.hideControls);return a.jsxs(a.Fragment,{children:[xe.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":Re?"textMarginTop":void 0,className:Re?`${r}-control`:void 0,style:{height:_.scalingValue(x??0,n??!1)}}),a.jsx("div",{...se&&{"data-testimonial-measure":"text"},style:{...Qt(L,n),...Y&&Y>0?{minHeight:Y}:{},textAlign:I,pointerEvents:"auto"},children:a.jsx(Zi,{content:xe.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":Re?"imageMarginTop":void 0,className:Re?`${r}-control`:void 0,style:{height:_.scalingValue(p??0,n??!1)}}),a.jsx("div",{style:{width:_.scalingValue(m??0,n??!1),height:_.scalingValue(g??0,n??!1)},children:(($e=xe.image)==null?void 0:$e.url)&&a.jsx("img",{src:(Me=xe.image)==null?void 0:Me.url,alt:((ve=xe.image)==null?void 0:ve.name)??"",className:`${r}-icon`,style:{objectFit:((be=xe.image)==null?void 0:be.objectFit)||"contain"}})})]}),xe.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":Re?"captionMarginTop":void 0,className:Re?`${r}-control`:void 0,style:{height:_.scalingValue(y??0,n??!1)}}),a.jsx("div",{...se?{"data-testimonial-measure":"caption"}:{},style:{...Qt(z,n),...ae&&ae>0?{minHeight:ae}:{},textAlign:I,pointerEvents:"auto"},children:a.jsx(Zi,{content:xe.caption})})]})]})},we=s.useCallback(xe=>{H(xe.maxTextPx),ne(xe.maxCaptionPx)},[]);if(s.useLayoutEffect(()=>{if(!S){we({maxTextPx:0,maxCaptionPx:0});return}const xe=K.current;if(!xe)return;const pe=()=>{_.readTestimonialTextMeasure(xe,we)};pe();const Y=new ResizeObserver(pe);return Y.observe(xe),()=>{Y.disconnect()}},[S,we,t]),!W)return a.jsx(a.Fragment,{});const Ie=S?{textMinHeightPx:k,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:_.scalingValue(u??0,n??!1),alignItems:$},children:[S&&a.jsx("div",{ref:K,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((xe,pe)=>a.jsx("div",{style:{width:"100%"},children:ie(xe,{dataMeasureAttrs:!0})},pe))}),a.jsxs("div",{className:`${r}-fade-stack`,children:[O&&T&&a.jsx("div",{className:Ct(`${r}-fade-item-prev`,`${r}-fade-out`),children:ie(O,{...Ie,hideControls:!0})}),a.jsx("div",{className:Ct(`${r}-fade-item-current`,T?`${r}-fade-in`:void 0),children:ie(W,Ie)})]})]}),oe.mode==="On"&&a.jsxs("div",{className:`${r}-controls`,children:[a.jsx("div",{className:`${r}-arrow`,style:{width:_.scalingValue(v??.02,n??!1),height:_.scalingValue(v??.02,n??!1),"--arrow-hover-color":E},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:D,disabled:!R,"aria-label":"Previous testimonial",children:oe.icon&&a.jsx(pn,{url:oe.icon,fill:b,hoverFill:E,className:Ct(`${r}-arrow-img`,`${r}-mirror`)})})}),a.jsx("div",{className:Ct(`${r}-arrow`,`${r}-next-arrow`),style:{width:_.scalingValue(v??.02,n??!1),height:_.scalingValue(v??.02,n??!1),"--arrow-hover-color":E},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:le,disabled:!R,"aria-label":"Next testimonial",children:oe.icon&&a.jsx(pn,{url:oe.icon,fill:b,hoverFill:E,className:`${r}-arrow-img`})})})]})]})})},ly=`import cn from 'classnames';
4386
+ `}const ay=3e3,sy=({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:m,imageHeight:g,controlsWidth:x,controlsColor:b,controlsHoverColor:E}=e,f=c>0&&(!n||!!i),[w,G]=s.useState(0),[X,k]=s.useState(null),[L,A]=s.useState(!1),U=s.useRef(null),$=s.useMemo(()=>{switch(d){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[d]),P=s.useMemo(()=>{switch(d){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[d]);s.useEffect(()=>{G(0),k(null),A(!1)},[l.length]);const H=l[w],W=X===null?null:l[X],C=be=>{var Y,se,xe,Se,Ce;return{fontSettings:{fontFamily:(e==null?void 0:e[`${be}FontFamily`])??"Arial",fontWeight:((Y=e==null?void 0:e[`${be}FontSettings`])==null?void 0:Y.fontWeight)??400,fontStyle:((se=e==null?void 0:e[`${be}FontSettings`])==null?void 0:se.fontStyle)??"normal"},textAppearance:{textTransform:((xe=e==null?void 0:e[`${be}TextAppearance`])==null?void 0:xe.textTransform)??"none",textDecoration:((Se=e==null?void 0:e[`${be}TextAppearance`])==null?void 0:Se.textDecoration)??"none",fontVariant:((Ce=e==null?void 0:e[`${be}TextAppearance`])==null?void 0:Ce.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${be}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${be}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${be}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${be}WordSpacing`])??0,color:(e==null?void 0:e[`${be}Color`])??"#000000"}},T=C("text"),B=C("caption"),S=l.length>1&&l.some(be=>{var pe,Y;return(((pe=be.text)==null?void 0:pe.length)??0)>0||(((Y=be.caption)==null?void 0:Y.length)??0)>0}),K=s.useRef(null),[R,_]=s.useState(0),[j,oe]=s.useState(0),re=e.controls??{mode:"Off",icon:null},O=l.length>1,ie=s.useCallback((be,pe)=>!O||pe===be?be:(U.current&&window.clearTimeout(U.current),k(be),A(!0),U.current=window.setTimeout(()=>{k(null),A(!1),U.current=null},300),pe),[O]),D=s.useCallback(()=>{O&&G(be=>ie(be,(be-1+l.length)%l.length))},[O,ie,l.length]),le=s.useCallback(()=>{O&&G(be=>ie(be,(be+1)%l.length))},[O,ie,l.length]);s.useEffect(()=>{if(!f||!O)return;const be=Math.max(300,ay/c),pe=window.setInterval(()=>{G(Y=>ie(Y,(Y+1)%l.length))},be);return()=>{window.clearInterval(pe)}},[f,O,ie,l.length,c]),s.useEffect(()=>()=>{U.current&&window.clearTimeout(U.current)},[]);const ee=(be,pe)=>{var Ce,Ae,fe,we;const Y=pe==null?void 0:pe.textMinHeightPx,se=pe==null?void 0:pe.captionMinHeightPx,xe=pe==null?void 0:pe.dataMeasureAttrs,Se=o&&!(pe!=null&&pe.dataMeasureAttrs)&&!(pe!=null&&pe.hideControls);return a.jsxs(a.Fragment,{children:[be.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":Se?"textMarginTop":void 0,className:Se?`${r}-control`:void 0,style:{height:F.scalingValue(y??0,n??!1)}}),a.jsx("div",{...xe&&{"data-testimonial-measure":"text"},style:{...Qt(T,n),...Y&&Y>0?{minHeight:Y}:{},textAlign:P,pointerEvents:"auto"},children:a.jsx(Zi,{content:be.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":Se?"imageMarginTop":void 0,className:Se?`${r}-control`:void 0,style:{height:F.scalingValue(p??0,n??!1)}}),a.jsx("div",{style:{width:F.scalingValue(m??0,n??!1),height:F.scalingValue(g??0,n??!1)},children:((Ce=be.image)==null?void 0:Ce.url)&&a.jsx("img",{src:(Ae=be.image)==null?void 0:Ae.url,alt:((fe=be.image)==null?void 0:fe.name)??"",className:`${r}-icon`,style:{objectFit:((we=be.image)==null?void 0:we.objectFit)||"contain"}})})]}),be.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":Se?"captionMarginTop":void 0,className:Se?`${r}-control`:void 0,style:{height:F.scalingValue(v??0,n??!1)}}),a.jsx("div",{...xe?{"data-testimonial-measure":"caption"}:{},style:{...Qt(B,n),...se&&se>0?{minHeight:se}:{},textAlign:P,pointerEvents:"auto"},children:a.jsx(Zi,{content:be.caption})})]})]})},ve=s.useCallback(be=>{_(be.maxTextPx),oe(be.maxCaptionPx)},[]);if(s.useLayoutEffect(()=>{if(!S){ve({maxTextPx:0,maxCaptionPx:0});return}const be=K.current;if(!be)return;const pe=()=>{F.readTestimonialTextMeasure(be,ve)};pe();const Y=new ResizeObserver(pe);return Y.observe(be),()=>{Y.disconnect()}},[S,ve,t]),!H)return a.jsx(a.Fragment,{});const Ie=S?{textMinHeightPx:R,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:[S&&a.jsx("div",{ref:K,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((be,pe)=>a.jsx("div",{style:{width:"100%"},children:ee(be,{dataMeasureAttrs:!0})},pe))}),a.jsxs("div",{className:`${r}-fade-stack`,children:[W&&L&&a.jsx("div",{className:Lt(`${r}-fade-item-prev`,`${r}-fade-out`),children:ee(W,{...Ie,hideControls:!0})}),a.jsx("div",{className:Lt(`${r}-fade-item-current`,L?`${r}-fade-in`:void 0),children:ee(H,Ie)})]})]}),re.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":E},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:D,disabled:!O,"aria-label":"Previous testimonial",children:re.icon&&a.jsx(mn,{url:re.icon,fill:b,hoverFill:E,className:Lt(`${r}-arrow-img`,`${r}-mirror`)})})}),a.jsx("div",{className:Lt(`${r}-arrow`,`${r}-next-arrow`),style:{width:F.scalingValue(x??.02,n??!1),height:F.scalingValue(x??.02,n??!1),"--arrow-hover-color":E},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:le,disabled:!O,"aria-label":"Next testimonial",children:re.icon&&a.jsx(mn,{url:re.icon,fill:b,hoverFill:E,className:`${r}-arrow-img`})})})]})]})})},ly=`import cn from 'classnames';
4387
4387
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
4388
4388
  import { CommonComponentProps } from '../props';
4389
4389
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -4879,7 +4879,7 @@ type TestimonialsSettings = {
4879
4879
  icon?: string | null;
4880
4880
  };
4881
4881
  };
4882
- `,cy="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 18" width="10" height="18"><path fill="#000000" fill-rule="evenodd" d="M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z" transform="translate(5, 9) rotate(-90) translate(-5, -9)"/></svg>'),dc={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},dy={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Controls Default",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...dc.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:{...dc.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:cy},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{speed:1,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},t:{speed:1,width:.65,imageMarginTop:.026,captionMarginTop:.01,textMarginTop:0,textFontSize:.035,captionFontSize:.023,textLineHeight:.04,captionLineHeight:.029,imageWidth:.05,imageHeight:.05,controlsWidth:.026},d:{speed:1,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},layout:["__componentName__","speed","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","speed"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},uy={element:sy,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Single.png"},defaultSize:{d:{width:700},t:{width:700},m:{width:334}},schema:dy,sourceCode:ly,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function py(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function uc(e){return((e==null?void 0:e.trim().length)??0)>0}function Ua(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Ka(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:_.scalingValue((o-t)/2,i)}}function my(e){return`
4882
+ `,cy="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 18" width="10" height="18"><path fill="#000000" fill-rule="evenodd" d="M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z" transform="translate(5, 9) rotate(-90) translate(-5, -9)"/></svg>'),dc={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},dy={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Controls Default",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...dc.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:{...dc.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:cy},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{speed:1,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},t:{speed:1,width:.65,imageMarginTop:.026,captionMarginTop:.01,textMarginTop:0,textFontSize:.035,captionFontSize:.023,textLineHeight:.04,captionLineHeight:.029,imageWidth:.05,imageHeight:.05,controlsWidth:.026},d:{speed:1,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},layout:["__componentName__","speed","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","speed"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},uy={element:sy,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Single.png"},defaultSize:{d:{width:700},t:{width:700},m:{width:334}},schema:dy,sourceCode:ly,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function py(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function uc(e){return((e==null?void 0:e.trim().length)??0)>0}function Ua(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Ka(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 my(e){return`
4883
4883
  .${e}-wrapper {
4884
4884
  display: grid;
4885
4885
  align-items: start;
@@ -5226,7 +5226,7 @@ type TestimonialsSettings = {
5226
5226
  z-index: 2;
5227
5227
  width: 100%;
5228
5228
  }
5229
- `}function gy(){return Math.random()<.5?"ltr":"ttb"}function hy(e){const t=e.Components.Autoplay;t&&(t.pause(!1),t.play())}function fy(e){const t=gy();e.options.direction!==t&&(e.options={...e.options,direction:t}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{hy(e)})})}const Rn=500,yy=750,ui="cubic-bezier(0.22, 1, 0.36, 1)",vy=72,xy=50;function by(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 Sy(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function wy(e){const[t]=e.media;return t!=null&&t.url?t:null}function Iu(e){return!Array.isArray(e)||e.length===0?[]:by(e)?e.flatMap(t=>{const n=Sy(t);if(!n)return[];const i=wy(t);return[{displayMedia:n,lightboxMedia:i!=null&&i.url?i:null}]}):e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Ui(e){return e.type==="video"}function $y(e){const t=new Set,n=[];for(const i of e){const o=Iu(i.gallery);for(const r of o){const l=r.lightboxMedia;l!=null&&l.url&&!t.has(l.url)&&(t.add(l.url),n.push(l))}}return n}function Cy({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=>Ui(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function Ty(e){e.pause(),e.removeAttribute("src"),e.load()}function pc({media:e,className:t,style:n,onMediaClick:i}){return Ui(e)?a.jsx("video",{src:e.url,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):a.jsx("img",{src:e.url,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function mc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Ly(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 Py({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l}){return s.useEffect(()=>{const d=n.current;if(d)return()=>{Ty(d)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:r,onMouseMove:l,style:i})}function Iy({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:d,counterClassName:c,counterStyle:u}){const p=i==="cover",x=s.useRef(null),y=s.useRef(null),m=s.useRef(null),g=s.useRef(null),v=s.useRef(0),b=s.useRef(0),E=s.useRef("none"),f=s.useRef(!1),w=s.useRef(!1),G=s.useRef(null),X=s.useRef(0),M=s.useRef(null),T=s.useRef(!1),N=s.useRef(null),q=s.useRef(null),$=s.useRef(null),I=s.useRef(()=>{}),[W,O]=s.useState(null),[C,L]=s.useState(null),[z,S]=s.useState("opening"),[K,k]=s.useState(0),[H,j]=s.useState(0),[ne,oe]=s.useState(null),[R,ce]=s.useState(!1),[D,le]=s.useState(!1),[ie,we]=s.useState(!1),[Ie,xe]=s.useState(null),pe=s.useRef(n),Y=s.useRef(void 0),ae=t[n],se=ae?Ui(ae):!1,Re=H!==0||R,$e=ne!==null,Me=s.useCallback(ye=>{const _e=ye.currentTarget,Ge=_e instanceof HTMLVideoElement?{width:_e.videoWidth,height:_e.videoHeight}:{width:_e.naturalWidth,height:_e.naturalHeight};!Ge.width||!Ge.height||xe(Ge)},[]);s.useEffect(()=>{G.current=C},[C]),s.useEffect(()=>{const ye=x.current;if(!ye)return;const _e=()=>L(mc(ye));_e();const Ge=new ResizeObserver(_e);return Ge.observe(ye),()=>Ge.disconnect()},[]);const ve=s.useCallback(()=>{N.current!==null&&(window.clearTimeout(N.current),N.current=null)},[]),be=s.useCallback(()=>{const ye=q.current;q.current=null,ve(),M.current=null,T.current=!1,oe(null),ce(!1),j(0),X.current=0,le(!1),f.current=!1,b.current=0,E.current="none",ye===1?d():ye===-1&&l()},[ve,d,l]),Ce=s.useCallback(()=>{ve(),q.current=null,M.current=null,T.current=!1,oe(null),ce(!1),j(0),X.current=0},[ve]),h=s.useCallback(()=>{ve(),N.current=window.setTimeout(()=>{q.current!==null&&be()},Rn+32)},[ve,be]),U=s.useCallback((ye,_e)=>{var et;const Ge=((et=G.current)==null?void 0:et.width)??0;if(ve(),M.current=ye,oe(ye),T.current=!0,ce(!0),_e){q.current=ye;const mt=-ye*Ge;X.current=mt,j(mt),h();return}X.current=0,j(0),N.current=window.setTimeout(()=>{N.current=null,Ce()},Rn+32)},[ve,Ce,h]),Z=s.useCallback(ye=>{if(!(t.length<=1)){if(T.current){if(q.current===ye){$.current=ye,be();return}Ce()}ve(),M.current=ye,oe(ye),T.current=!1,ce(!1),X.current=0,j(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{U(ye,!0)})})}},[t.length,U,be,Ce,ve]);I.current=Z;const te=s.useCallback(ye=>{ye.propertyName!=="transform"||!T.current||q.current!==null&&be()},[be]),me=s.useCallback(()=>{const ye=y.current;if(!ye)return;const _e=mc(ye);!_e.width||!_e.height||O(_e)},[]);s.useEffect(()=>{me();const ye=y.current;if(!ye)return;const _e=new ResizeObserver(()=>me());return _e.observe(ye),()=>_e.disconnect()},[me]),s.useEffect(()=>{z==="opening"&&W&&S("open")},[z,W]),s.useEffect(()=>{if(z!=="closing")return;const ye=setTimeout(()=>r(),Rn);return()=>clearTimeout(ye)},[z,r]),s.useEffect(()=>()=>{ve()},[ve]),s.useLayoutEffect(()=>{pe.current===n&&Y.current===(ae==null?void 0:ae.url)||(ve(),q.current=null,oe(null),k(0),j(0),ce(!1),we(!1),le(!1),xe(null),v.current=0,b.current=0,E.current="none",f.current=!1,T.current=!1,X.current=0,M.current=null,g.current=null,w.current=!1,pe.current=n,Y.current=ae==null?void 0:ae.url)},[n,ae==null?void 0:ae.url,ve]),s.useLayoutEffect(()=>{const ye=$.current;ye!==null&&($.current=null,requestAnimationFrame(()=>{I.current(ye)}))},[n,ae==null?void 0:ae.url]),s.useEffect(()=>{if(z!=="open")return;let ye=null;const _e=()=>{ye&&(document.removeEventListener("click",ye,!0),ye=null)},Ge=()=>{_e(),ye=Fe=>{Fe.stopPropagation(),Fe.preventDefault(),_e()},document.addEventListener("click",ye,!0)},et=Fe=>{const Ke=Fe<0?1:-1;if(Math.abs(Fe)>xy&&t.length>1){U(Ke,!0);return}U(Ke,!1)},mt=Fe=>{if(Fe.touches.length!==1||T.current)return;const Ke=Fe.touches[0];w.current=!0,g.current={x:Ke.clientX,y:Ke.clientY},E.current="none",b.current=0,f.current=!1},rt=Fe=>{if(!g.current||Fe.touches.length!==1||T.current)return;const Ke=Fe.touches[0],it=Ke.clientX-g.current.x,De=Ke.clientY-g.current.y;if(E.current==="none"){if(Math.abs(it)<10&&Math.abs(De)<10)return;if(Math.abs(it)>Math.abs(De)){if(t.length<=1)return;E.current="horizontal"}else if(De>0)E.current="vertical";else return}if(E.current==="horizontal"){f.current=!0,le(!0),b.current=it;const qe=it<0?1:-1;M.current!==qe&&(M.current=qe,oe(qe)),X.current=it,j(it),Fe.preventDefault();return}E.current==="vertical"&&(f.current=!0,le(!0),v.current=De,k(De),Fe.preventDefault())},Oe=()=>{if(!g.current)return;const Fe=E.current,Ke=f.current;if(Ke&&Fe==="horizontal")et(b.current),Ge();else if(Ke&&Fe==="vertical")if(v.current>vy){const De=window.innerHeight;v.current=De,we(!0),k(De),S("closing")}else v.current=0,k(0),Ge();else Fe==="horizontal"&&Math.abs(b.current)>0&&(et(b.current),Ge());g.current=null,E.current="none",b.current=0,f.current=!1,le(!1)};return document.addEventListener("touchstart",mt,{passive:!0}),document.addEventListener("touchmove",rt,{passive:!1}),document.addEventListener("touchend",Oe),document.addEventListener("touchcancel",Oe),()=>{document.removeEventListener("touchstart",mt),document.removeEventListener("touchmove",rt),document.removeEventListener("touchend",Oe),document.removeEventListener("touchcancel",Oe),_e()}},[z,t.length,U]),s.useEffect(()=>{const ye=_e=>{_e.key==="Escape"&&(_e.preventDefault(),_e.stopPropagation(),z!=="closing"&&S("closing"))};return window.addEventListener("keydown",ye,!0),()=>window.removeEventListener("keydown",ye,!0)},[z]);const B=()=>{z!=="closing"&&S("closing")},P=z==="open",Q=z==="closing",ee=K>0?Math.max(0,1-K/500):1,de=K>0?Math.max(.35,1-K/500):1,V=W?p?W:Ly(W,Ie):null,Pe=ye=>{if(ye.stopPropagation(),w.current){w.current=!1;return}if(t.length<=1)return;const _e=V??ye.currentTarget.getBoundingClientRect(),Ge=ye.clientY-_e.top,et=Math.min(52,_e.height*.2);if(!(Ge>_e.height-et)){if(ye.clientX-_e.left<_e.width/2){Z(-1);return}Z(1)}},he=ye=>{if(t.length<=1)return;const _e=V??ye.currentTarget.getBoundingClientRect(),Ge=ye.clientX-_e.left,et=ye.clientY-_e.top,mt=Math.min(52,_e.height*.2);if(et>_e.height-mt){ye.currentTarget.style.cursor="default";return}ye.currentTarget.style.cursor=Ge<_e.width/2?"w-resize":"e-resize"},J={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",Be=H!==0||K>0?`translate(${H}px, ${K}px)`:void 0,at=D&&!R?"none":R?`transform ${Rn}ms ${ui}`:ie?`transform ${Rn}ms ${ui}, opacity ${Rn}ms ${ui}`:z==="opening"||Q?`opacity ${Rn}ms ${ui}`:"none",Ue={...J,transform:Be,opacity:K>0?de:z==="opening"||Q?0:1,transition:at,pointerEvents:"none"},nt={position:"absolute",top:((V==null?void 0:V.top)??0)-((C==null?void 0:C.top)??0),left:((V==null?void 0:V.left)??0)-((C==null?void 0:C.left)??0),width:V==null?void 0:V.width,height:V==null?void 0:V.height,objectFit:Ne,pointerEvents:se&&P&&!Re?"auto":"none",touchAction:se&&P?"none":void 0},Ze=(C==null?void 0:C.width)??0,Xe=$e?(n+ne+t.length)%t.length:null,fe=Xe!==null?t[Xe]:null,He={...J,transform:$e?`translateX(${ne*Ze+H}px)`:void 0,opacity:1,transition:R?`transform ${Rn}ms ${ui}`:"none",pointerEvents:"none"},We={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:"none"},Qe=V?{position:"fixed",top:V.top,height:V.height,width:V.width/2,zIndex:9999}:null;return a.jsxs("div",{ref:x,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:z==="open"?"none":void 0},onClick:B,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:P?ee:0,transition:D?"none":`opacity ${Rn}ms ${ui}`,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:y,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:P?1:0,transition:`opacity ${Rn}ms ${ui}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:y,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:P?1:0,transition:`opacity ${Rn}ms ${ui}`},children:t.length>1&&a.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),W&&C&&fe&&a.jsx("div",{style:He,onTransitionEnd:te,children:Ui(fe)?a.jsx("video",{src:fe.url,muted:!0,playsInline:!0,preload:"auto",style:We},`neighbor-${Xe}-${fe.url}`):a.jsx("img",{src:fe.url,alt:fe.name,style:We},`neighbor-${Xe}-${fe.url}`)}),W&&C&&ae&&a.jsx("div",{style:Ue,onTransitionEnd:te,children:se?a.jsx(Py,{src:ae.url,phase:z,mediaRef:m,mediaStyle:nt,onLoadedMetadata:Me,onClick:Pe,onMouseMove:he},`${n}-${ae.url}`):a.jsx("img",{ref:m,src:ae.url,alt:ae.name,onLoad:Me,style:nt},`${n}-${ae.url}`)}),P&&Qe&&t.length>1&&!se&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Qe,left:V.left,cursor:"w-resize",pointerEvents:D?"none":"auto"},onClick:ye=>{if(w.current){w.current=!1;return}ye.stopPropagation(),Z(-1)}}),a.jsx("div",{style:{...Qe,left:V.left+V.width/2,cursor:"e-resize",pointerEvents:D?"none":"auto"},onClick:ye=>{if(w.current){w.current=!1;return}ye.stopPropagation(),Z(1)}})]})]})}function Ry(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function ky({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:r,activeEvent:l,layoutId:d,portalId:c}){const{prefix:u}=_.useScopedStyles(),{type:p="a",gridLayout:x,textBoxWidth:y=100,verticalGap:m,entriesCount:g,lightbox:v,imageDisplay:b,imageCorners:E,lightboxImageDisplay:f,slider:w,sliderTiming:G,direction:X,transition:M,titleMarginTop:T,subtitleMarginTop:N,titleColor:q,subtitleColor:$,lightboxCounterColor:I,titleFontFamily:W,titleFontSettings:O,titleFontSize:C,titleLineHeight:L,titleLetterSpacing:z,titleWordSpacing:S,titleTextAppearance:K,subtitleFontFamily:k,subtitleFontSettings:H,subtitleFontSize:j,subtitleLineHeight:ne,subtitleLetterSpacing:oe,subtitleWordSpacing:R,subtitleTextAppearance:ce,lightboxCounterFontFamily:D,lightboxCounterFontSettings:le,lightboxCounterFontSize:ie,lightboxCounterLineHeight:we,lightboxCounterLetterSpacing:Ie,lightboxCounterWordSpacing:xe,lightboxCounterTextAppearance:pe,showText:Y="always",alignEntries:ae="off",align:se="top"}=e,Re={fontSettings:{fontFamily:W,fontWeight:(O==null?void 0:O.fontWeight)??400,fontStyle:(O==null?void 0:O.fontStyle)??"normal"},fontSize:C??.01,lineHeight:L,letterSpacing:z??0,wordSpacing:S??0,textAppearance:K,color:q},Me={...cn(Qt(Re,n))},ve={fontSettings:{fontFamily:k,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:j??.01,lineHeight:ne,letterSpacing:oe??0,wordSpacing:R??0,textAppearance:ce,color:$},Ce={...cn(Qt(ve,n))},h={fontSettings:{fontFamily:D,fontWeight:(le==null?void 0:le.fontWeight)??400,fontStyle:(le==null?void 0:le.fontStyle)??"normal"},fontSize:ie??.01,lineHeight:we,letterSpacing:Ie??0,wordSpacing:xe??0,textAppearance:pe,color:I},Z={...cn(Qt(h,n)),...Ka(ie,we,u,n)},te=Ua(C,L,`${u}-item-title`,`${u}-text-tight-leading`),me=Ua(j,ne,`${u}-item-subtitle`,`${u}-text-tight-leading`),B=Ka(C,L,u,n),P=Ka(j,ne,u,n),Q=Ua(ie,we,`${u}-lightbox-counter`,`${u}-text-tight-leading`),ee=_.buildColorVars(u,{titleColor:q,subtitleColor:$,lightboxCounterColor:I},Ey,My),Pe=`${l&&l!=="default"?`${u}-state-${l}`:""}${Y==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),he=g===0?1/0:g,J=(t??[]).slice(0,he),Ne=s.useMemo(()=>v==="on"?$y(J):[],[J,v]),Be=x.entryWidth??.2,at=(b==null?void 0:b.display)==="cover",Ue=(b==null?void 0:b.ratioValue)??"1:1",nt=(b==null?void 0:b.reversed)??!1,[Ze,Xe]=Ue.split(":").map(Number),We=`${nt?Xe:Ze} / ${nt?Ze:Xe}`,Qe=x.columnsCount,ye=_.scalingValue(Be??0,n),_e=ye,Ge=!at&&w!=="off",et=J.length%Qe||Qe,mt=et<Qe&&J.length>0,rt=J.length-et,Oe=mt?Math.floor((Qe-et)/2)+1:1,Fe=E?_.scalingValue(E,n):void 0,Ke={width:_e,...at?{aspectRatio:We,height:"auto",overflow:"hidden"}:{height:"auto"},...Fe?{borderRadius:Fe,overflow:"hidden"}:{}},it=`${u}-item-image-wrapper${Ge?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),De=p==="d"||p==="e"||p==="f",qe=ae==="on",ut=`calc(${_.scalingValue(Be??0,n)} * (${y} / 100))`,ge=_.scalingValue(Be*y/100,n),ke=at?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...Fe?{borderRadius:Fe}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...Fe?{borderRadius:Fe}:{}},[ot,gt]=s.useState(0),je=s.useRef(null),vt=M==="fade"||X==="horizontal"?"ltr":X==="vertical"?"ttb":"ltr";s.useEffect(()=>{const xt=je.current;if(!xt)return;const Te=new ResizeObserver(Ve=>{gt(Math.round(Ve[0].contentRect.width))});return Te.observe(xt),()=>Te.disconnect()},[]);const It=(()=>{const xt={...ee},Te=je.current?getComputedStyle(je.current).getPropertyValue("--cntrl-article-width").trim():"";return Te&&(xt["--cntrl-article-width"]=Te),xt})(),[kt,wt]=s.useState(!1),[Dt,Bt]=s.useState([]),[Xt,qt]=s.useState(0),Lt=v==="on"&&(!n||i),Ot=(xt,Te)=>{n&&!i||v!=="off"&&(Bt(xt),qt(Te),wt(!0))};s.useEffect(()=>{if(!kt||v!=="on"||typeof document>"u")return;const xt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=xt}},[kt,v]),s.useEffect(()=>{!n||i||wt(!1)},[n,i]);const nn=s.useMemo(()=>my(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:nn}}),v==="on"&&a.jsx(Cy,{mediaList:Ne}),a.jsx("div",{style:ee,children:a.jsx("div",{ref:je,className:`${u}-wrapper ${u}-type-${p}${qe?` ${u}-align-entries`:""} ${u}-image-align-${se} ${Pe}`.trim(),style:{gridTemplateColumns:`repeat(${Qe}, ${ye})`,rowGap:qe?0:_.scalingValue(m??0,n),columnGap:_.scalingValue(x.horizontalGap??0,n),width:_.scalingValue(x.wrapperWidth??0,n),...qe?{[`--${u}-align-entries-row-gap`]:_.scalingValue(m??0,n)}:{}},children:J.map((xt,Te)=>{var _t;const Ve=uc(xt.title),st=uc(xt.subtitle),lt=(((_t=xt.link)==null?void 0:_t.length)??0)>0&&v==="off"?xt.link:void 0,bt=Math.floor(Te/Qe)===Math.ceil(J.length/Qe)-1,Tt=mt&&Te>=rt?`${Oe+(Te-rt)}`:void 0,tt=De?a.jsxs("div",{className:`${u}-item-text-block`,children:[Ve&&a.jsx("p",{className:te,style:{width:ut,...Me,...B},children:xt.title}),Ve&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:_.scalingValue(T??0,n),width:ge}}),st&&a.jsx("p",{className:me,style:{width:ut,...Ce,...P},children:xt.subtitle}),st&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:_.scalingValue(N??0,n),width:ge}})]}):null,Rt=qe?a.jsxs("div",{className:`${u}-item-title-row`,children:[!De&&a.jsx("div",{"data-controls":o&&Ve?"titleMarginTop":void 0,className:o&&Ve?`${u}-control`:void 0,style:{height:Ve?_.scalingValue(T??0,n):0,width:ge}}),Ve&&a.jsx("p",{className:te,style:{width:ut,...Me,...B},children:xt.title}),De&&Ve&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:_.scalingValue(T??0,n),width:ge}})]}):null,Mt=qe?a.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!De&&a.jsx("div",{"data-controls":o&&st?"subtitleMarginTop":void 0,className:o&&st?`${u}-control`:void 0,style:{height:st?_.scalingValue(N??0,n):0,width:ge}}),st&&a.jsx("p",{className:me,style:{width:ut,...Ce,...P},children:xt.subtitle}),De&&st&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:_.scalingValue(N??0,n),width:ge}})]}):null,At=lt?a.jsxs("a",{href:lt,target:"_blank",className:`${u}-item-text-link`,children:[Rt,Mt]}):a.jsxs(a.Fragment,{children:[Rt,Mt]}),jt=Iu(xt.gallery),Ut=jt.filter(ht=>ht.lightboxMedia).map(ht=>ht.lightboxMedia),Et=a.jsx("div",{className:it,style:Ke,children:jt.length===0?null:w==="off"?(()=>{const{displayMedia:ht,lightboxMedia:A}=jt[0],Le=A?Ut.findIndex(Ae=>Ae.url===A.url):-1;return a.jsx(pc,{media:ht,className:`${u}-item-${Ui(ht)?"video":"image"}`.trim(),style:ke,onMediaClick:Lt&&Le>=0?()=>Ot(Ut,Le):void 0})})():a.jsxs(a.Fragment,{children:[Ge&&a.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:jt.map(({displayMedia:ht})=>Ui(ht)?a.jsx("video",{src:ht.url,muted:!0,playsInline:!0},`sizer-${ht.url}`):a.jsx("img",{src:ht.url,alt:""},`sizer-${ht.url}`))}),a.jsx(wl,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:G*1e3,width:"100%",height:"100%",speed:yy,type:M==="fade"?"fade":"loop",rewind:M==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:vt},onMoved:ht=>{X!=="random"||M==="fade"||fy(ht)},children:jt.map(({displayMedia:ht,lightboxMedia:A},Le)=>{const Ae=A?Ut.findIndex(ze=>ze.url===A.url):-1;return a.jsx($l,{children:a.jsx(pc,{media:ht,className:`${u}-item-${Ui(ht)?"video":"image"}`.trim(),style:ke,onMediaClick:Lt&&Ae>=0?()=>Ot(Ut,Ae):void 0})},Le)})},`${M}-${Be}-${X}-${G}-${ot}-${d}`)]})}),Nt=De?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":o&&Ve?"titleMarginTop":void 0,className:o&&Ve?`${u}-control`:void 0,style:{height:Ve?_.scalingValue(T??0,n):0,width:ge}}),a.jsx("p",{className:te,style:{width:ut,...Me,...B},children:xt.title}),a.jsx("div",{"data-controls":o&&st?"subtitleMarginTop":void 0,className:o&&st?`${u}-control`:void 0,style:{height:st?_.scalingValue(N??0,n):0,width:ge}}),a.jsx("p",{className:me,style:{width:ut,...Ce,...P},children:xt.subtitle})]});return a.jsx("div",{className:`${u}-item`.trim(),style:Tt&&!qe?{gridColumn:Tt}:void 0,children:a.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${qe&&bt?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(y??0)>100?`calc(${ye} * (${y} / 100))`:ye,...Tt&&qe?{gridColumn:Tt}:{}},children:qe?a.jsx(a.Fragment,{children:De?a.jsxs(a.Fragment,{children:[At,a.jsx("a",{href:lt,target:"_blank",className:`${u}-item-image-link`,children:Et})]}):a.jsxs(a.Fragment,{children:[a.jsx("a",{href:lt,target:"_blank",className:`${u}-item-image-link`,children:Et}),At]})}):lt?a.jsxs(a.Fragment,{children:[a.jsxs("a",{href:lt,target:"_blank",className:`${u}-item-image-link`,children:[tt,Et]}),!De&&a.jsx("a",{href:lt,target:"_blank",className:`${u}-item-text-link`,children:Nt})]}):a.jsxs(a.Fragment,{children:[tt,Et,Nt]})})},Te)})})}),(!n||i)&&kt&&typeof document<"u"&&v==="on"&&(()=>{const xt=(c?document.getElementById(c):null)??document.body;return li.createPortal(a.jsx("div",{style:It,"data-selection":"none",children:a.jsx(Iy,{prefix:u,items:Dt,index:Xt,imageDisplay:Ry(f),isEditor:n,onClose:()=>wt(!1),onPrev:()=>qt(Te=>(Te-1+Dt.length)%Dt.length),onNext:()=>qt(Te=>(Te+1)%Dt.length),counterClassName:Q,counterStyle:Z})}),xt)})()]})}const Ey={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},My=["hover","focus","filled","success","error"],Ay=`import { Splide, SplideSlide } from '@splidejs/react-splide';
5229
+ `}function gy(){return Math.random()<.5?"ltr":"ttb"}function hy(e){const t=e.Components.Autoplay;t&&(t.pause(!1),t.play())}function fy(e){const t=gy();e.options.direction!==t&&(e.options={...e.options,direction:t}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{hy(e)})})}const Rn=500,yy=750,ui="cubic-bezier(0.22, 1, 0.36, 1)",vy=72,xy=50;function by(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 Sy(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function wy(e){const[t]=e.media;return t!=null&&t.url?t:null}function Iu(e){return!Array.isArray(e)||e.length===0?[]:by(e)?e.flatMap(t=>{const n=Sy(t);if(!n)return[];const i=wy(t);return[{displayMedia:n,lightboxMedia:i!=null&&i.url?i:null}]}):e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Ui(e){return e.type==="video"}function $y(e){const t=new Set,n=[];for(const i of e){const o=Iu(i.gallery);for(const r of o){const l=r.lightboxMedia;l!=null&&l.url&&!t.has(l.url)&&(t.add(l.url),n.push(l))}}return n}function Cy({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=>Ui(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function Ty(e){e.pause(),e.removeAttribute("src"),e.load()}function pc({media:e,className:t,style:n,onMediaClick:i}){return Ui(e)?a.jsx("video",{src:e.url,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):a.jsx("img",{src:e.url,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function mc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Ly(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 Py({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l}){return s.useEffect(()=>{const c=n.current;if(c)return()=>{Ty(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 Iy({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),m=s.useRef(null),g=s.useRef(null),x=s.useRef(0),b=s.useRef(0),E=s.useRef("none"),f=s.useRef(!1),w=s.useRef(!1),G=s.useRef(null),X=s.useRef(0),k=s.useRef(null),L=s.useRef(!1),A=s.useRef(null),U=s.useRef(null),$=s.useRef(null),P=s.useRef(()=>{}),[H,W]=s.useState(null),[C,T]=s.useState(null),[B,S]=s.useState("opening"),[K,R]=s.useState(0),[_,j]=s.useState(0),[oe,re]=s.useState(null),[O,ie]=s.useState(!1),[D,le]=s.useState(!1),[ee,ve]=s.useState(!1),[Ie,be]=s.useState(null),pe=s.useRef(n),Y=s.useRef(void 0),se=t[n],xe=se?Ui(se):!1,Se=_!==0||O,Ce=oe!==null,Ae=s.useCallback(ye=>{const Ne=ye.currentTarget,Ke=Ne instanceof HTMLVideoElement?{width:Ne.videoWidth,height:Ne.videoHeight}:{width:Ne.naturalWidth,height:Ne.naturalHeight};!Ke.width||!Ke.height||be(Ke)},[]);s.useEffect(()=>{G.current=C},[C]),s.useEffect(()=>{const ye=y.current;if(!ye)return;const Ne=()=>T(mc(ye));Ne();const Ke=new ResizeObserver(Ne);return Ke.observe(ye),()=>Ke.disconnect()},[]);const fe=s.useCallback(()=>{A.current!==null&&(window.clearTimeout(A.current),A.current=null)},[]),we=s.useCallback(()=>{const ye=U.current;U.current=null,fe(),k.current=null,L.current=!1,re(null),ie(!1),j(0),X.current=0,le(!1),f.current=!1,b.current=0,E.current="none",ye===1?c():ye===-1&&l()},[fe,c,l]),Te=s.useCallback(()=>{fe(),U.current=null,k.current=null,L.current=!1,re(null),ie(!1),j(0),X.current=0},[fe]),h=s.useCallback(()=>{fe(),A.current=window.setTimeout(()=>{U.current!==null&&we()},Rn+32)},[fe,we]),q=s.useCallback((ye,Ne)=>{var Qe;const Ke=((Qe=G.current)==null?void 0:Qe.width)??0;if(fe(),k.current=ye,re(ye),L.current=!0,ie(!0),Ne){U.current=ye;const st=-ye*Ke;X.current=st,j(st),h();return}X.current=0,j(0),A.current=window.setTimeout(()=>{A.current=null,Te()},Rn+32)},[fe,Te,h]),Z=s.useCallback(ye=>{if(!(t.length<=1)){if(L.current){if(U.current===ye){$.current=ye,we();return}Te()}fe(),k.current=ye,re(ye),L.current=!1,ie(!1),X.current=0,j(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{q(ye,!0)})})}},[t.length,q,we,Te,fe]);P.current=Z;const te=s.useCallback(ye=>{ye.propertyName!=="transform"||!L.current||U.current!==null&&we()},[we]),ue=s.useCallback(()=>{const ye=v.current;if(!ye)return;const Ne=mc(ye);!Ne.width||!Ne.height||W(Ne)},[]);s.useEffect(()=>{ue();const ye=v.current;if(!ye)return;const Ne=new ResizeObserver(()=>ue());return Ne.observe(ye),()=>Ne.disconnect()},[ue]),s.useEffect(()=>{B==="opening"&&H&&S("open")},[B,H]),s.useEffect(()=>{if(B!=="closing")return;const ye=setTimeout(()=>r(),Rn);return()=>clearTimeout(ye)},[B,r]),s.useEffect(()=>()=>{fe()},[fe]),s.useLayoutEffect(()=>{pe.current===n&&Y.current===(se==null?void 0:se.url)||(fe(),U.current=null,re(null),R(0),j(0),ie(!1),ve(!1),le(!1),be(null),x.current=0,b.current=0,E.current="none",f.current=!1,L.current=!1,X.current=0,k.current=null,g.current=null,w.current=!1,pe.current=n,Y.current=se==null?void 0:se.url)},[n,se==null?void 0:se.url,fe]),s.useLayoutEffect(()=>{const ye=$.current;ye!==null&&($.current=null,requestAnimationFrame(()=>{P.current(ye)}))},[n,se==null?void 0:se.url]),s.useEffect(()=>{if(B!=="open")return;let ye=null;const Ne=()=>{ye&&(document.removeEventListener("click",ye,!0),ye=null)},Ke=()=>{Ne(),ye=Me=>{Me.stopPropagation(),Me.preventDefault(),Ne()},document.addEventListener("click",ye,!0)},Qe=Me=>{const gt=Me<0?1:-1;if(Math.abs(Me)>xy&&t.length>1){q(gt,!0);return}q(gt,!1)},st=Me=>{if(Me.touches.length!==1||L.current)return;const gt=Me.touches[0];w.current=!0,g.current={x:gt.clientX,y:gt.clientY},E.current="none",b.current=0,f.current=!1},rt=Me=>{if(!g.current||Me.touches.length!==1||L.current)return;const gt=Me.touches[0],ze=gt.clientX-g.current.x,Oe=gt.clientY-g.current.y;if(E.current==="none"){if(Math.abs(ze)<10&&Math.abs(Oe)<10)return;if(Math.abs(ze)>Math.abs(Oe)){if(t.length<=1)return;E.current="horizontal"}else if(Oe>0)E.current="vertical";else return}if(E.current==="horizontal"){f.current=!0,le(!0),b.current=ze;const Xe=ze<0?1:-1;k.current!==Xe&&(k.current=Xe,re(Xe)),X.current=ze,j(ze),Me.preventDefault();return}E.current==="vertical"&&(f.current=!0,le(!0),x.current=Oe,R(Oe),Me.preventDefault())},De=()=>{if(!g.current)return;const Me=E.current,gt=f.current;if(gt&&Me==="horizontal")Qe(b.current),Ke();else if(gt&&Me==="vertical")if(x.current>vy){const Oe=window.innerHeight;x.current=Oe,ve(!0),R(Oe),S("closing")}else x.current=0,R(0),Ke();else Me==="horizontal"&&Math.abs(b.current)>0&&(Qe(b.current),Ke());g.current=null,E.current="none",b.current=0,f.current=!1,le(!1)};return document.addEventListener("touchstart",st,{passive:!0}),document.addEventListener("touchmove",rt,{passive:!1}),document.addEventListener("touchend",De),document.addEventListener("touchcancel",De),()=>{document.removeEventListener("touchstart",st),document.removeEventListener("touchmove",rt),document.removeEventListener("touchend",De),document.removeEventListener("touchcancel",De),Ne()}},[B,t.length,q]),s.useEffect(()=>{const ye=Ne=>{Ne.key==="Escape"&&(Ne.preventDefault(),Ne.stopPropagation(),B!=="closing"&&S("closing"))};return window.addEventListener("keydown",ye,!0),()=>window.removeEventListener("keydown",ye,!0)},[B]);const z=()=>{B!=="closing"&&S("closing")},I=B==="open",Q=B==="closing",ne=K>0?Math.max(0,1-K/500):1,de=K>0?Math.max(.35,1-K/500):1,V=H?p?H:Ly(H,Ie):null,Pe=ye=>{if(ye.stopPropagation(),w.current){w.current=!1;return}if(t.length<=1)return;const Ne=V??ye.currentTarget.getBoundingClientRect(),Ke=ye.clientY-Ne.top,Qe=Math.min(52,Ne.height*.2);if(!(Ke>Ne.height-Qe)){if(ye.clientX-Ne.left<Ne.width/2){Z(-1);return}Z(1)}},he=ye=>{if(t.length<=1)return;const Ne=V??ye.currentTarget.getBoundingClientRect(),Ke=ye.clientX-Ne.left,Qe=ye.clientY-Ne.top,st=Math.min(52,Ne.height*.2);if(Qe>Ne.height-st){ye.currentTarget.style.cursor="default";return}ye.currentTarget.style.cursor=Ke<Ne.width/2?"w-resize":"e-resize"},J={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},He=p?"cover":"contain",We=_!==0||K>0?`translate(${_}px, ${K}px)`:void 0,ot=D&&!O?"none":O?`transform ${Rn}ms ${ui}`:ee?`transform ${Rn}ms ${ui}, opacity ${Rn}ms ${ui}`:B==="opening"||Q?`opacity ${Rn}ms ${ui}`:"none",qe={...J,transform:We,opacity:K>0?de:B==="opening"||Q?0:1,transition:ot,pointerEvents:"none"},nt={position:"absolute",top:((V==null?void 0:V.top)??0)-((C==null?void 0:C.top)??0),left:((V==null?void 0:V.left)??0)-((C==null?void 0:C.left)??0),width:V==null?void 0:V.width,height:V==null?void 0:V.height,objectFit:He,pointerEvents:xe&&I&&!Se?"auto":"none",touchAction:xe&&I?"none":void 0},tt=(C==null?void 0:C.width)??0,Ve=Ce?(n+oe+t.length)%t.length:null,ge=Ve!==null?t[Ve]:null,_e={...J,transform:Ce?`translateX(${oe*tt+_}px)`:void 0,opacity:1,transition:O?`transform ${Rn}ms ${ui}`:"none",pointerEvents:"none"},je={position:"absolute",top:((H==null?void 0:H.top)??0)-((C==null?void 0:C.top)??0),left:((H==null?void 0:H.left)??0)-((C==null?void 0:C.left)??0),width:H==null?void 0:H.width,height:H==null?void 0:H.height,objectFit:He,pointerEvents:"none"},Ze=V?{position:"fixed",top:V.top,height:V.height,width:V.width/2,zIndex:9999}:null;return a.jsxs("div",{ref:y,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:B==="open"?"none":void 0},onClick:z,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:I?ne:0,transition:D?"none":`opacity ${Rn}ms ${ui}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:p?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:v,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:I?1:0,transition:`opacity ${Rn}ms ${ui}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:v,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:I?1:0,transition:`opacity ${Rn}ms ${ui}`},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]})}),H&&C&&ge&&a.jsx("div",{style:_e,onTransitionEnd:te,children:Ui(ge)?a.jsx("video",{src:ge.url,muted:!0,playsInline:!0,preload:"auto",style:je},`neighbor-${Ve}-${ge.url}`):a.jsx("img",{src:ge.url,alt:ge.name,style:je},`neighbor-${Ve}-${ge.url}`)}),H&&C&&se&&a.jsx("div",{style:qe,onTransitionEnd:te,children:xe?a.jsx(Py,{src:se.url,phase:B,mediaRef:m,mediaStyle:nt,onLoadedMetadata:Ae,onClick:Pe,onMouseMove:he},`${n}-${se.url}`):a.jsx("img",{ref:m,src:se.url,alt:se.name,onLoad:Ae,style:nt},`${n}-${se.url}`)}),I&&Ze&&t.length>1&&!xe&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Ze,left:V.left,cursor:"w-resize",pointerEvents:D?"none":"auto"},onClick:ye=>{if(w.current){w.current=!1;return}ye.stopPropagation(),Z(-1)}}),a.jsx("div",{style:{...Ze,left:V.left+V.width/2,cursor:"e-resize",pointerEvents:D?"none":"auto"},onClick:ye=>{if(w.current){w.current=!1;return}ye.stopPropagation(),Z(1)}})]})]})}function Ry(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function ky({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:m,entriesCount:g,lightbox:x,imageDisplay:b,imageCorners:E,lightboxImageDisplay:f,slider:w,sliderTiming:G,direction:X,transition:k,titleMarginTop:L,subtitleMarginTop:A,titleColor:U,subtitleColor:$,lightboxCounterColor:P,titleFontFamily:H,titleFontSettings:W,titleFontSize:C,titleLineHeight:T,titleLetterSpacing:B,titleWordSpacing:S,titleTextAppearance:K,subtitleFontFamily:R,subtitleFontSettings:_,subtitleFontSize:j,subtitleLineHeight:oe,subtitleLetterSpacing:re,subtitleWordSpacing:O,subtitleTextAppearance:ie,lightboxCounterFontFamily:D,lightboxCounterFontSettings:le,lightboxCounterFontSize:ee,lightboxCounterLineHeight:ve,lightboxCounterLetterSpacing:Ie,lightboxCounterWordSpacing:be,lightboxCounterTextAppearance:pe,showText:Y="always",alignEntries:se="off",align:xe="top"}=e,Se={fontSettings:{fontFamily:H,fontWeight:(W==null?void 0:W.fontWeight)??400,fontStyle:(W==null?void 0:W.fontStyle)??"normal"},fontSize:C??.01,lineHeight:T,letterSpacing:B??0,wordSpacing:S??0,textAppearance:K,color:U},Ae={...dn(Qt(Se,n))},fe={fontSettings:{fontFamily:R,fontWeight:(_==null?void 0:_.fontWeight)??400,fontStyle:(_==null?void 0:_.fontStyle)??"normal"},fontSize:j??.01,lineHeight:oe,letterSpacing:re??0,wordSpacing:O??0,textAppearance:ie,color:$},Te={...dn(Qt(fe,n))},h={fontSettings:{fontFamily:D,fontWeight:(le==null?void 0:le.fontWeight)??400,fontStyle:(le==null?void 0:le.fontStyle)??"normal"},fontSize:ee??.01,lineHeight:ve,letterSpacing:Ie??0,wordSpacing:be??0,textAppearance:pe,color:P},Z={...dn(Qt(h,n)),...Ka(ee,ve,u,n)},te=Ua(C,T,`${u}-item-title`,`${u}-text-tight-leading`),ue=Ua(j,oe,`${u}-item-subtitle`,`${u}-text-tight-leading`),z=Ka(C,T,u,n),I=Ka(j,oe,u,n),Q=Ua(ee,ve,`${u}-lightbox-counter`,`${u}-text-tight-leading`),ne=F.buildColorVars(u,{titleColor:U,subtitleColor:$,lightboxCounterColor:P},Ey,My),Pe=`${l&&l!=="default"?`${u}-state-${l}`:""}${Y==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),he=g===0?1/0:g,J=(t??[]).slice(0,he),He=s.useMemo(()=>x==="on"?$y(J):[],[J,x]),We=y.entryWidth??.2,ot=(b==null?void 0:b.display)==="cover",qe=(b==null?void 0:b.ratioValue)??"1:1",nt=(b==null?void 0:b.reversed)??!1,[tt,Ve]=qe.split(":").map(Number),je=`${nt?Ve:tt} / ${nt?tt:Ve}`,Ze=y.columnsCount,ye=F.scalingValue(We??0,n),Ne=ye,Ke=!ot&&w!=="off",Qe=J.length%Ze||Ze,st=Qe<Ze&&J.length>0,rt=J.length-Qe,De=st?Math.floor((Ze-Qe)/2)+1:1,Me=E?F.scalingValue(E,n):void 0,gt={width:Ne,...ot?{aspectRatio:je,height:"auto",overflow:"hidden"}:{height:"auto"},...Me?{borderRadius:Me,overflow:"hidden"}:{}},ze=`${u}-item-image-wrapper${Ke?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),Oe=p==="d"||p==="e"||p==="f",Xe=se==="on",lt=`calc(${F.scalingValue(We??0,n)} * (${v} / 100))`,me=F.scalingValue(We*v/100,n),Re=ot?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...Me?{borderRadius:Me}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...Me?{borderRadius:Me}:{}},[it,ht]=s.useState(0),Ge=s.useRef(null),St=k==="fade"||X==="horizontal"?"ltr":X==="vertical"?"ttb":"ltr";s.useEffect(()=>{const xt=Ge.current;if(!xt)return;const ft=new ResizeObserver(Ee=>{ht(Math.round(Ee[0].contentRect.width))});return ft.observe(xt),()=>ft.disconnect()},[]);const Pt=(()=>{const xt={...ne},ft=Ge.current?getComputedStyle(Ge.current).getPropertyValue("--cntrl-article-width").trim():"";return ft&&(xt["--cntrl-article-width"]=ft),xt})(),[kt,$t]=s.useState(!1),[jt,Bt]=s.useState([]),[Xt,qt]=s.useState(0),It=x==="on"&&(!n||i),Dt=(xt,ft)=>{n&&!i||x!=="off"&&(Bt(xt),qt(ft),$t(!0))};s.useEffect(()=>{if(!kt||x!=="on"||typeof document>"u")return;const xt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=xt}},[kt,x]),s.useEffect(()=>{!n||i||$t(!1)},[n,i]);const on=s.useMemo(()=>my(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:on}}),x==="on"&&a.jsx(Cy,{mediaList:He}),a.jsx("div",{style:ne,children:a.jsx("div",{ref:Ge,className:`${u}-wrapper ${u}-type-${p}${Xe?` ${u}-align-entries`:""} ${u}-image-align-${xe} ${Pe}`.trim(),style:{gridTemplateColumns:`repeat(${Ze}, ${ye})`,rowGap:Xe?0:F.scalingValue(m??0,n),columnGap:F.scalingValue(y.horizontalGap??0,n),width:F.scalingValue(y.wrapperWidth??0,n),...Xe?{[`--${u}-align-entries-row-gap`]:F.scalingValue(m??0,n)}:{}},children:J.map((xt,ft)=>{var At;const Ee=uc(xt.title),et=uc(xt.subtitle),Je=(((At=xt.link)==null?void 0:At.length)??0)>0&&x==="off"?xt.link:void 0,dt=Math.floor(ft/Ze)===Math.ceil(J.length/Ze)-1,Tt=st&&ft>=rt?`${De+(ft-rt)}`:void 0,vt=Oe?a.jsxs("div",{className:`${u}-item-text-block`,children:[Ee&&a.jsx("p",{className:te,style:{width:lt,...Ae,...z},children:xt.title}),Ee&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:F.scalingValue(L??0,n),width:me}}),et&&a.jsx("p",{className:ue,style:{width:lt,...Te,...I},children:xt.subtitle}),et&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:F.scalingValue(A??0,n),width:me}})]}):null,ut=Xe?a.jsxs("div",{className:`${u}-item-title-row`,children:[!Oe&&a.jsx("div",{"data-controls":o&&Ee?"titleMarginTop":void 0,className:o&&Ee?`${u}-control`:void 0,style:{height:Ee?F.scalingValue(L??0,n):0,width:me}}),Ee&&a.jsx("p",{className:te,style:{width:lt,...Ae,...z},children:xt.title}),Oe&&Ee&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:F.scalingValue(L??0,n),width:me}})]}):null,_t=Xe?a.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!Oe&&a.jsx("div",{"data-controls":o&&et?"subtitleMarginTop":void 0,className:o&&et?`${u}-control`:void 0,style:{height:et?F.scalingValue(A??0,n):0,width:me}}),et&&a.jsx("p",{className:ue,style:{width:lt,...Te,...I},children:xt.subtitle}),Oe&&et&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:F.scalingValue(A??0,n),width:me}})]}):null,Mt=Je?a.jsxs("a",{href:Je,target:"_blank",className:`${u}-item-text-link`,children:[ut,_t]}):a.jsxs(a.Fragment,{children:[ut,_t]}),Ht=Iu(xt.gallery),Ut=Ht.filter(pt=>pt.lightboxMedia).map(pt=>pt.lightboxMedia),Et=a.jsx("div",{className:ze,style:gt,children:Ht.length===0?null:w==="off"?(()=>{const{displayMedia:pt,lightboxMedia:N}=Ht[0],Le=N?Ut.findIndex(Be=>Be.url===N.url):-1;return a.jsx(pc,{media:pt,className:`${u}-item-${Ui(pt)?"video":"image"}`.trim(),style:Re,onMediaClick:It&&Le>=0?()=>Dt(Ut,Le):void 0})})():a.jsxs(a.Fragment,{children:[Ke&&a.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Ht.map(({displayMedia:pt})=>Ui(pt)?a.jsx("video",{src:pt.url,muted:!0,playsInline:!0},`sizer-${pt.url}`):a.jsx("img",{src:pt.url,alt:""},`sizer-${pt.url}`))}),a.jsx(wl,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:G*1e3,width:"100%",height:"100%",speed:yy,type:k==="fade"?"fade":"loop",rewind:k==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:St},onMoved:pt=>{X!=="random"||k==="fade"||fy(pt)},children:Ht.map(({displayMedia:pt,lightboxMedia:N},Le)=>{const Be=N?Ut.findIndex(Fe=>Fe.url===N.url):-1;return a.jsx($l,{children:a.jsx(pc,{media:pt,className:`${u}-item-${Ui(pt)?"video":"image"}`.trim(),style:Re,onMediaClick:It&&Be>=0?()=>Dt(Ut,Be):void 0})},Le)})},`${k}-${We}-${X}-${G}-${it}-${c}`)]})}),Wt=Oe?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":o&&Ee?"titleMarginTop":void 0,className:o&&Ee?`${u}-control`:void 0,style:{height:Ee?F.scalingValue(L??0,n):0,width:me}}),a.jsx("p",{className:te,style:{width:lt,...Ae,...z},children:xt.title}),a.jsx("div",{"data-controls":o&&et?"subtitleMarginTop":void 0,className:o&&et?`${u}-control`:void 0,style:{height:et?F.scalingValue(A??0,n):0,width:me}}),a.jsx("p",{className:ue,style:{width:lt,...Te,...I},children:xt.subtitle})]});return a.jsx("div",{className:`${u}-item`.trim(),style:Tt&&!Xe?{gridColumn:Tt}:void 0,children:a.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${Xe&&dt?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(v??0)>100?`calc(${ye} * (${v} / 100))`:ye,...Tt&&Xe?{gridColumn:Tt}:{}},children:Xe?a.jsx(a.Fragment,{children:Oe?a.jsxs(a.Fragment,{children:[Mt,a.jsx("a",{href:Je,target:"_blank",className:`${u}-item-image-link`,children:Et})]}):a.jsxs(a.Fragment,{children:[a.jsx("a",{href:Je,target:"_blank",className:`${u}-item-image-link`,children:Et}),Mt]})}):Je?a.jsxs(a.Fragment,{children:[a.jsxs("a",{href:Je,target:"_blank",className:`${u}-item-image-link`,children:[vt,Et]}),!Oe&&a.jsx("a",{href:Je,target:"_blank",className:`${u}-item-text-link`,children:Wt})]}):a.jsxs(a.Fragment,{children:[vt,Et,Wt]})})},ft)})})}),(!n||i)&&kt&&typeof document<"u"&&x==="on"&&(()=>{const xt=(d?document.getElementById(d):null)??document.body;return Gn.createPortal(a.jsx("div",{style:Pt,"data-selection":"none",children:a.jsx(Iy,{prefix:u,items:jt,index:Xt,imageDisplay:Ry(f),isEditor:n,onClose:()=>$t(!1),onPrev:()=>qt(ft=>(ft-1+jt.length)%jt.length),onNext:()=>qt(ft=>(ft+1)%jt.length),counterClassName:Q,counterStyle:Z})}),xt)})()]})}const Ey={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},My=["hover","focus","filled","success","error"],Ay=`import { Splide, SplideSlide } from '@splidejs/react-splide';
5230
5230
  import '@splidejs/react-splide/css/core';
5231
5231
  import { CommonComponentProps } from '../props';
5232
5232
  import {
@@ -7279,7 +7279,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
7279
7279
  };
7280
7280
 
7281
7281
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
7282
- `,Ya={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Fy=["titleColor","subtitleColor","lightboxCounterColor"],Ny={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["gallery"]},default:[{title:"Earth-orbital mission",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Salton Sea from Above",subtitle:"Hasselblad 500 EL / Zeiss Sonnar 250 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module Pilot",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module 3 porch",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Command Module",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-10.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"CSM and Lunar Module LM",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"David R. Scott during EVA",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Fourth day of the mission",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-8.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Landing of the Spider1",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-9.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c","d","e","f"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},imageCorners:{type:"number",scope:"layout",title:"Round corners",min:0,display:{type:"numeric-input"}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Ya.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:{...Ya.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:{...Ya.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:[...Fy],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},_y={element:ky,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"subtitleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",subtitleFontSettings:"subtitleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"},schema:Ny,sourceCode:Ay},Hy=50,gc=10,Cl="cntrl-lightbox-journal",Aa=Cl,Hs=`${Cl}-`,Fa=e=>`${Cl}-${e}`,Tl=e=>e===Aa||e.startsWith(Hs),hc=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},fc=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=hc(t.get(Fa(e)));if(i)return i}const n=hc(t.get(Aa));if(n)return n;for(const[i]of t){if(!i.startsWith(Hs))continue;const o=i.slice(Hs.length);if(!/^\d+$/.test(o))continue;const r=Number.parseInt(o,10);if(Number.isFinite(r)&&r>=1)return r}return null},yc=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Ru=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{Tl(l)&&i.searchParams.delete(l)}),t?i.searchParams.set(Fa(t),String(e)):i.searchParams.set(Aa,String(e));const o=n?"replaceState":"pushState",r=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",r)},Wy=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===Fa(e)||i===Aa:Tl(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)}},ku=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(Fa(e)):[...t.keys()].some(n=>Tl(n))},Oy=(e,t)=>{if(ku(t)){if(e){window.history.back();return}Wy(t)}},Dy=20,zy=2,Za=e=>`max(${e}, ${Dy}px)`,Po=e=>((e==null?void 0:e.image)??[]).slice(0,zy),Eu=e=>e.reduce((t,n)=>t+Po(n).length,0),By=(e,t)=>{const n=e.slice(0,t).reduce((o,r)=>o+Po(r).length,1),i=Po(e[t]).length;return{start:n,end:n+i-1}},jy=(e,t)=>{const n=Eu(e),{start:i,end:o}=By(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},aa=(e,t)=>t==="B"?e.flatMap((n,i)=>Po(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Po(n)})),Vy=(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 jy(i,o)},vc=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Gy=(e,t,n)=>e==="B"?t.length>1:Eu(n)>1,Cn=.004,ei=.004,So={title1Width:.13,title2Width:.13,title3Width:.14},Si=(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},Io=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},d)=>{if(r<=0||d<=0)return{overflow:r,widths:[d,...l]};const c=Math.min(r,d);return{overflow:r-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},hr=(e,t)=>Io(e,t),hn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},wi=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Io(e.length,n),effective:hr(e.length,n)}},Mu=(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),Au=(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"],yt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Ll={title1:"1",title2:"2",title3:"3",count:"Count"},Pl=e=>[yt(e,"fontFamily"),yt(e,"fontSettings"),{type:"row",items:[yt(e,"fontSize"),yt(e,"lineHeight"),yt(e,"letterSpacing"),yt(e,"wordSpacing")]},yt(e,"textAlign"),yt(e,"textAppearance")],Xy=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Li.map(e=>[Ll[e],Pl(e)]))}),qy={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Uy={title1:.02,title2:.02,title3:.02,count:.017},ji=(e,t)=>{const n=i=>{const o=yt(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[qy[t]]}},Vi=(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??Uy[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Qt(i,n)};function Fu({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l}){const{title1Width:d,title2Width:c,title3Width:u,title1MarginLeft:p=0,title2MarginLeft:x=0,title3MarginLeft:y=0,titleRowMarginBottom:m=0,titleHeaderLayout:g="desktop",contentMarginTop:v=0,iconMarginRight:b=0,closeIcon:E=null,closeIconMaxWidth:f=0,closeIconColor:w="#000000",closeIconHoverColor:G="#cccccc"}=n,X=_.scalingValue(v,i),M=_.scalingValue(Math.max(v,ei),i),T=_.scalingValue(b,i),N=_.scalingValue(m,i),q=g==="mobile",$=Vi("title1",ji(n,"title1"),i),I=Vi("title2",ji(n,"title2"),i),W=Vi("title3",ji(n,"title3"),i),O=s.useMemo(()=>({title1Width:d??So.title1Width,title2Width:c??So.title2Width,title3Width:u??So.title3Width}),[d,c,u]),C=s.useMemo(()=>({title2MarginLeft:x,title3MarginLeft:y}),[x,y]),L=s.useMemo(()=>Si(e,t,$,I,W),[e,t,$,I,W]),z=s.useMemo(()=>L.map(V=>O[V.widthKey]),[L,O]),S=s.useMemo(()=>Io(L.length,z),[L.length,z]),K=s.useMemo(()=>hr(L.length,z),[L.length,z]),k=s.useMemo(()=>L.filter(V=>V.prefix==="title1"),[L]),H=s.useMemo(()=>L.filter(V=>V.prefix==="title2"||V.prefix==="title3"),[L]),j=s.useMemo(()=>wi(k,O),[k,O]),ne=s.useMemo(()=>wi(H,O),[H,O]),oe=!!(t.title1||t.title2||t.title3),R=E!==null;if(!(oe||R))return null;const D=(p??0)>0||o,le=(V,Pe)=>{const he=L.findIndex(Ne=>Ne.prefix===V.prefix);if(!q||Pe==="single-row")return{effectiveWidth:K[he]??0,resolvedWidth:S[he]??0,maxWidth:hn(he,S)};if(Pe==="two-row-top"){const Ne=k.findIndex(Be=>Be.prefix===V.prefix);return{effectiveWidth:j.effective[Ne]??0,resolvedWidth:j.resolved[Ne]??0,maxWidth:hn(Ne,j.resolved)}}const J=H.findIndex(Ne=>Ne.prefix===V.prefix);return{effectiveWidth:ne.effective[J]??0,resolvedWidth:ne.resolved[J]??0,maxWidth:hn(J,ne.resolved)}},ie=(V,Pe,he)=>{if(!q||he==="single-row"){const Ue=V.findIndex(fe=>fe.prefix===Pe.prefix),nt=V.map(fe=>O[fe.widthKey]),Ze=Io(V.length,nt);return{effectiveWidth:hr(V.length,nt)[Ue]??0,resolvedWidth:Ze[Ue]??0,maxWidth:hn(Ue,Ze)}}if(he==="two-row-top"){const Ue=V.filter(fe=>fe.prefix==="title1"),nt=Ue.findIndex(fe=>fe.prefix===Pe.prefix),{resolved:Ze,effective:Xe}=wi(Ue,O);return{effectiveWidth:Xe[nt]??0,resolvedWidth:Ze[nt]??0,maxWidth:hn(nt,Ze)}}const J=V.filter(Ue=>Ue.prefix==="title2"||Ue.prefix==="title3"),Ne=J.findIndex(Ue=>Ue.prefix===Pe.prefix),{resolved:Be,effective:at}=wi(J,O);return{effectiveWidth:at[Ne]??0,resolvedWidth:Be[Ne]??0,maxWidth:hn(Ne,Be)}},we=V=>Au(L,S,C,V)+(q?0:p??0),Ie=()=>q?0:p??0,xe=V=>H.slice(0,V).reduce((Pe,he,J)=>Pe+(he.marginLeftKey?C[he.marginLeftKey]??0:0)+(ne.resolved[J]??0),0),pe=V=>{const Pe=H[V];return xe(V)+(Pe.marginLeftKey?C[Pe.marginLeftKey]??0:0)+(ne.resolved[V]??0)},Y=(V,Pe,he)=>{const J=V.marginLeftKey?C[V.marginLeftKey]??0:0,{effectiveWidth:Ne,resolvedWidth:Be,maxWidth:at}=he??le(V,Pe),Ue=Math.max(J,ei),nt=o&&Pe==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":V.prefix,style:{width:_.scalingValue(Ne,i),...J>0?{marginLeft:_.scalingValue(J,i)}:{}},children:[a.jsx("p",{className:V.className,style:V.style,children:V.text}),nt&&V.marginLeftKey?a.jsx("div",{"data-controls":V.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Be),style:{position:"absolute",top:0,left:_.scalingValue(-J,i),width:_.scalingValue(Ue,i),height:"100%",pointerEvents:"auto"}}):null,nt?a.jsx("div",{"data-controls":V.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(at),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:_.scalingValue(-Cn/2,i),width:_.scalingValue(Cn,i),height:"100%",pointerEvents:"auto"}}):null]},V.className)},ae=(V="two-row")=>{const Pe=L.findIndex(Ne=>Ne.prefix==="title1"),he=Pe>=0?S[Pe]:O.title1Width,J=V==="two-row"&&o;return a.jsx("div",{...J?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(he)}:{},style:{width:_.scalingValue(p??0,i),flexShrink:0,alignSelf:"stretch",...J?{pointerEvents:"auto"}:{}}})},se=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:$,"aria-hidden":"true",children:" "}),Re=V=>{const Pe=Si(e,V,$,I,W);return a.jsx(a.Fragment,{children:Pe.map(he=>Y(he,"single-row",ie(Pe,he,"single-row")))})},$e=V=>{const Pe=Si(e,V,$,I,W),he=Pe.find(J=>J.prefix==="title1");return he?Y(he,"two-row-top",ie(Pe,he,"two-row-top")):null},Me=(V,Pe=!1)=>{const he=Si(e,V,$,I,W),J=he.filter(at=>at.prefix==="title2"||at.prefix==="title3"),Ne=o&&Pe;return J.length>0||Ne||(m??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[J.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[a.jsx("div",{className:`${e}-titles-stack`,children:J.map(at=>Y(at,"two-row-bottom",ie(he,at,"two-row-bottom")))}),Pe&&o?a.jsxs(a.Fragment,{children:[me(),B()]}):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:N,width:"100%",flexShrink:0,pointerEvents:Ne?"auto":"none"}}):null]}):null},ve=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:_.scalingValue(f??0,i),height:_.scalingValue(f??0,i),marginRight:T,"--close-icon-hover-color":G},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:V=>{V.stopPropagation(),l==null||l()},"aria-label":"Close",children:a.jsx(pn,{url:E??"",fill:w,hoverFill:i&&!r?w:G,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:T,height:"100%",pointerEvents:"auto"}})]}),be=()=>R?a.jsx("div",{className:`${e}-titles-row-header-controls`,children:ve()}):null,Ce=V=>a.jsx("div",{className:`${e}-titles-row-titles`,children:a.jsx("div",{className:`${e}-titles-stack`,children:V})}),h=V=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[R||oe?se():null,D?ae("two-row"):null,Ce(V),be()]}),U=(V,Pe=!1)=>a.jsxs(a.Fragment,{children:[h($e(V)),Me(V,Pe)]}),Z=()=>{const V=q?-1:L.findIndex(J=>J.prefix==="title1"),Pe=!q&&(o||(p??0)>0)?(()=>{const J=p??0,Ne=V>=0?S[V]:O.title1Width,Be=Math.max(J,ei);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:_.scalingValue(Be,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,he=L.flatMap((J,Ne)=>{if(!J.marginLeftKey)return[];const Be=C[J.marginLeftKey]??0,at=Mu(L,S,C,Ne)+Ie(),Ue=Math.max(Be,ei);return a.jsx("div",{"data-controls":J.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(S[Ne]),style:{position:"absolute",top:0,left:_.scalingValue(at,i),width:_.scalingValue(Ue,i),height:"100%",pointerEvents:"auto"}},J.marginLeftKey)});return Pe?[Pe,...he]:he},te=()=>L.map((V,Pe)=>{const he=hn(Pe,S),Ne=we(Pe)-Cn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":V.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(he),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:_.scalingValue(Ne,i),width:_.scalingValue(Cn,i),height:"100%",pointerEvents:"auto"}})},`${V.widthKey}-junction`)}),me=()=>H.flatMap((V,Pe)=>{if(!V.marginLeftKey)return[];const he=C[V.marginLeftKey]??0,J=xe(Pe),Ne=Math.max(he,ei),{resolvedWidth:Be}=le(V,"two-row-bottom");return a.jsx("div",{"data-controls":V.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Be),style:{position:"absolute",top:0,left:_.scalingValue(J,i),width:_.scalingValue(Ne,i),height:"100%",pointerEvents:"auto"}},V.marginLeftKey)}),B=()=>H.map((V,Pe)=>{const{maxWidth:he}=le(V,"two-row-bottom"),Ne=pe(Pe)-Cn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":V.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(he),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:_.scalingValue(Ne,i),width:_.scalingValue(Cn,i),height:"100%",pointerEvents:"auto"}})},`${V.widthKey}-junction`)}),P=()=>!o||q?null:a.jsxs(a.Fragment,{children:[Z(),te()]}),Q=!!(t.title2||t.title3||(m??0)>0||o),ee=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[R||oe?se():null,D?ae("single-row"):null,oe?Ce(Re(t)):a.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),be(),P()]}),de=()=>a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...Q?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:Q?void 0:{flex:"0 0 auto",height:"auto"},children:U(t,!0)}),P()]});return a.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:X,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:M,pointerEvents:"auto"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...q?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${q?` ${e}-lightbox-content-area-stacked`:""}`,children:a.jsx("div",{className:`${e}-text-bar-cell${q?` ${e}-text-bar-cell-stacked`:""}`,style:q?void 0:{flex:1,minWidth:0,width:"100%"},children:q?de():ee()})})})]})}function Ky(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Yy(e){return`
7282
+ `,Ya={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Fy=["titleColor","subtitleColor","lightboxCounterColor"],Ny={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["gallery"]},default:[{title:"Earth-orbital mission",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Salton Sea from Above",subtitle:"Hasselblad 500 EL / Zeiss Sonnar 250 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module Pilot",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module 3 porch",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Command Module",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-10.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"CSM and Lunar Module LM",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"David R. Scott during EVA",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Fourth day of the mission",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-8.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Landing of the Spider1",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-9.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c","d","e","f"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},imageCorners:{type:"number",scope:"layout",title:"Round corners",min:0,display:{type:"numeric-input"}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Ya.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:{...Ya.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:{...Ya.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:[...Fy],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},_y={element:ky,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"subtitleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",subtitleFontSettings:"subtitleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"},schema:Ny,sourceCode:Ay},Hy=50,gc=10,Cl="cntrl-lightbox-journal",Aa=Cl,Hs=`${Cl}-`,Fa=e=>`${Cl}-${e}`,Tl=e=>e===Aa||e.startsWith(Hs),hc=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},fc=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=hc(t.get(Fa(e)));if(i)return i}const n=hc(t.get(Aa));if(n)return n;for(const[i]of t){if(!i.startsWith(Hs))continue;const o=i.slice(Hs.length);if(!/^\d+$/.test(o))continue;const r=Number.parseInt(o,10);if(Number.isFinite(r)&&r>=1)return r}return null},yc=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Ru=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{Tl(l)&&i.searchParams.delete(l)}),t?i.searchParams.set(Fa(t),String(e)):i.searchParams.set(Aa,String(e));const o=n?"replaceState":"pushState",r=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",r)},Wy=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===Fa(e)||i===Aa:Tl(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)}},ku=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(Fa(e)):[...t.keys()].some(n=>Tl(n))},Oy=(e,t)=>{if(ku(t)){if(e){window.history.back();return}Wy(t)}},Dy=20,zy=2,Za=e=>`max(${e}, ${Dy}px)`,Po=e=>((e==null?void 0:e.image)??[]).slice(0,zy),Eu=e=>e.reduce((t,n)=>t+Po(n).length,0),By=(e,t)=>{const n=e.slice(0,t).reduce((o,r)=>o+Po(r).length,1),i=Po(e[t]).length;return{start:n,end:n+i-1}},jy=(e,t)=>{const n=Eu(e),{start:i,end:o}=By(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},aa=(e,t)=>t==="B"?e.flatMap((n,i)=>Po(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Po(n)})),Vy=(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 jy(i,o)},vc=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Gy=(e,t,n)=>e==="B"?t.length>1:Eu(n)>1,Cn=.004,ti=.004,So={title1Width:.13,title2Width:.13,title3Width:.14},Si=(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},Io=(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},hr=(e,t)=>Io(e,t),hn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},wi=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Io(e.length,n),effective:hr(e.length,n)}},Mu=(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),Au=(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)}`,Ll={title1:"1",title2:"2",title3:"3",count:"Count"},Pl=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")],Xy=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Li.map(e=>[Ll[e],Pl(e)]))}),qy={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Uy={title1:.02,title2:.02,title3:.02,count:.017},ji=(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[qy[t]]}},Vi=(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??Uy[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Qt(i,n)};function Fu({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:m=0,titleHeaderLayout:g="desktop",contentMarginTop:x=0,iconMarginRight:b=0,closeIcon:E=null,closeIconMaxWidth:f=0,closeIconColor:w="#000000",closeIconHoverColor:G="#cccccc"}=n,X=F.scalingValue(x,i),k=F.scalingValue(Math.max(x,ti),i),L=F.scalingValue(b,i),A=F.scalingValue(m,i),U=g==="mobile",$=Vi("title1",ji(n,"title1"),i),P=Vi("title2",ji(n,"title2"),i),H=Vi("title3",ji(n,"title3"),i),W=s.useMemo(()=>({title1Width:c??So.title1Width,title2Width:d??So.title2Width,title3Width:u??So.title3Width}),[c,d,u]),C=s.useMemo(()=>({title2MarginLeft:y,title3MarginLeft:v}),[y,v]),T=s.useMemo(()=>Si(e,t,$,P,H),[e,t,$,P,H]),B=s.useMemo(()=>T.map(V=>W[V.widthKey]),[T,W]),S=s.useMemo(()=>Io(T.length,B),[T.length,B]),K=s.useMemo(()=>hr(T.length,B),[T.length,B]),R=s.useMemo(()=>T.filter(V=>V.prefix==="title1"),[T]),_=s.useMemo(()=>T.filter(V=>V.prefix==="title2"||V.prefix==="title3"),[T]),j=s.useMemo(()=>wi(R,W),[R,W]),oe=s.useMemo(()=>wi(_,W),[_,W]),re=!!(t.title1||t.title2||t.title3),O=E!==null;if(!(re||O))return null;const D=(p??0)>0||o,le=(V,Pe)=>{const he=T.findIndex(He=>He.prefix===V.prefix);if(!U||Pe==="single-row")return{effectiveWidth:K[he]??0,resolvedWidth:S[he]??0,maxWidth:hn(he,S)};if(Pe==="two-row-top"){const He=R.findIndex(We=>We.prefix===V.prefix);return{effectiveWidth:j.effective[He]??0,resolvedWidth:j.resolved[He]??0,maxWidth:hn(He,j.resolved)}}const J=_.findIndex(He=>He.prefix===V.prefix);return{effectiveWidth:oe.effective[J]??0,resolvedWidth:oe.resolved[J]??0,maxWidth:hn(J,oe.resolved)}},ee=(V,Pe,he)=>{if(!U||he==="single-row"){const qe=V.findIndex(ge=>ge.prefix===Pe.prefix),nt=V.map(ge=>W[ge.widthKey]),tt=Io(V.length,nt);return{effectiveWidth:hr(V.length,nt)[qe]??0,resolvedWidth:tt[qe]??0,maxWidth:hn(qe,tt)}}if(he==="two-row-top"){const qe=V.filter(ge=>ge.prefix==="title1"),nt=qe.findIndex(ge=>ge.prefix===Pe.prefix),{resolved:tt,effective:Ve}=wi(qe,W);return{effectiveWidth:Ve[nt]??0,resolvedWidth:tt[nt]??0,maxWidth:hn(nt,tt)}}const J=V.filter(qe=>qe.prefix==="title2"||qe.prefix==="title3"),He=J.findIndex(qe=>qe.prefix===Pe.prefix),{resolved:We,effective:ot}=wi(J,W);return{effectiveWidth:ot[He]??0,resolvedWidth:We[He]??0,maxWidth:hn(He,We)}},ve=V=>Au(T,S,C,V)+(U?0:p??0),Ie=()=>U?0:p??0,be=V=>_.slice(0,V).reduce((Pe,he,J)=>Pe+(he.marginLeftKey?C[he.marginLeftKey]??0:0)+(oe.resolved[J]??0),0),pe=V=>{const Pe=_[V];return be(V)+(Pe.marginLeftKey?C[Pe.marginLeftKey]??0:0)+(oe.resolved[V]??0)},Y=(V,Pe,he)=>{const J=V.marginLeftKey?C[V.marginLeftKey]??0:0,{effectiveWidth:He,resolvedWidth:We,maxWidth:ot}=he??le(V,Pe),qe=Math.max(J,ti),nt=o&&Pe==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":V.prefix,style:{width:F.scalingValue(He,i),...J>0?{marginLeft:F.scalingValue(J,i)}:{}},children:[a.jsx("p",{className:V.className,style:V.style,children:V.text}),nt&&V.marginLeftKey?a.jsx("div",{"data-controls":V.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(We),style:{position:"absolute",top:0,left:F.scalingValue(-J,i),width:F.scalingValue(qe,i),height:"100%",pointerEvents:"auto"}}):null,nt?a.jsx("div",{"data-controls":V.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(-Cn/2,i),width:F.scalingValue(Cn,i),height:"100%",pointerEvents:"auto"}}):null]},V.className)},se=(V="two-row")=>{const Pe=T.findIndex(He=>He.prefix==="title1"),he=Pe>=0?S[Pe]:W.title1Width,J=V==="two-row"&&o;return a.jsx("div",{...J?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(he)}:{},style:{width:F.scalingValue(p??0,i),flexShrink:0,alignSelf:"stretch",...J?{pointerEvents:"auto"}:{}}})},xe=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:$,"aria-hidden":"true",children:" "}),Se=V=>{const Pe=Si(e,V,$,P,H);return a.jsx(a.Fragment,{children:Pe.map(he=>Y(he,"single-row",ee(Pe,he,"single-row")))})},Ce=V=>{const Pe=Si(e,V,$,P,H),he=Pe.find(J=>J.prefix==="title1");return he?Y(he,"two-row-top",ee(Pe,he,"two-row-top")):null},Ae=(V,Pe=!1)=>{const he=Si(e,V,$,P,H),J=he.filter(ot=>ot.prefix==="title2"||ot.prefix==="title3"),He=o&&Pe;return J.length>0||He||(m??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[J.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[a.jsx("div",{className:`${e}-titles-stack`,children:J.map(ot=>Y(ot,"two-row-bottom",ee(he,ot,"two-row-bottom")))}),Pe&&o?a.jsxs(a.Fragment,{children:[ue(),z()]}):null]}):null,(m??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:A,width:"100%",flexShrink:0,pointerEvents:He?"auto":"none"}}):null]}):null},fe=()=>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":G},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:V=>{V.stopPropagation(),l==null||l()},"aria-label":"Close",children:a.jsx(mn,{url:E??"",fill:w,hoverFill:i&&!r?w:G,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:L,height:"100%",pointerEvents:"auto"}})]}),we=()=>O?a.jsx("div",{className:`${e}-titles-row-header-controls`,children:fe()}):null,Te=V=>a.jsx("div",{className:`${e}-titles-row-titles`,children:a.jsx("div",{className:`${e}-titles-stack`,children:V})}),h=V=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[O||re?xe():null,D?se("two-row"):null,Te(V),we()]}),q=(V,Pe=!1)=>a.jsxs(a.Fragment,{children:[h(Ce(V)),Ae(V,Pe)]}),Z=()=>{const V=U?-1:T.findIndex(J=>J.prefix==="title1"),Pe=!U&&(o||(p??0)>0)?(()=>{const J=p??0,He=V>=0?S[V]:W.title1Width,We=Math.max(J,ti);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,he=T.flatMap((J,He)=>{if(!J.marginLeftKey)return[];const We=C[J.marginLeftKey]??0,ot=Mu(T,S,C,He)+Ie(),qe=Math.max(We,ti);return a.jsx("div",{"data-controls":J.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(S[He]),style:{position:"absolute",top:0,left:F.scalingValue(ot,i),width:F.scalingValue(qe,i),height:"100%",pointerEvents:"auto"}},J.marginLeftKey)});return Pe?[Pe,...he]:he},te=()=>T.map((V,Pe)=>{const he=hn(Pe,S),He=ve(Pe)-Cn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":V.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(he),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:F.scalingValue(He,i),width:F.scalingValue(Cn,i),height:"100%",pointerEvents:"auto"}})},`${V.widthKey}-junction`)}),ue=()=>_.flatMap((V,Pe)=>{if(!V.marginLeftKey)return[];const he=C[V.marginLeftKey]??0,J=be(Pe),He=Math.max(he,ti),{resolvedWidth:We}=le(V,"two-row-bottom");return a.jsx("div",{"data-controls":V.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(We),style:{position:"absolute",top:0,left:F.scalingValue(J,i),width:F.scalingValue(He,i),height:"100%",pointerEvents:"auto"}},V.marginLeftKey)}),z=()=>_.map((V,Pe)=>{const{maxWidth:he}=le(V,"two-row-bottom"),He=pe(Pe)-Cn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":V.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(he),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:F.scalingValue(He,i),width:F.scalingValue(Cn,i),height:"100%",pointerEvents:"auto"}})},`${V.widthKey}-junction`)}),I=()=>!o||U?null:a.jsxs(a.Fragment,{children:[Z(),te()]}),Q=!!(t.title2||t.title3||(m??0)>0||o),ne=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[O||re?xe():null,D?se("single-row"):null,re?Te(Se(t)):a.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),we(),I()]}),de=()=>a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...Q?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:Q?void 0:{flex:"0 0 auto",height:"auto"},children:q(t,!0)}),I()]});return a.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:X,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:k,pointerEvents:"auto"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...U?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${U?` ${e}-lightbox-content-area-stacked`:""}`,children:a.jsx("div",{className:`${e}-text-bar-cell${U?` ${e}-text-bar-cell-stacked`:""}`,style:U?void 0:{flex:1,minWidth:0,width:"100%"},children:U?de():ne()})})})]})}function Ky(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Yy(e){return`
7283
7283
  .${e}-wrapper {
7284
7284
  display: grid;
7285
7285
  align-items: start;
@@ -7599,7 +7599,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
7599
7599
  pointer-events: auto;
7600
7600
  flex-shrink: 0;
7601
7601
  }
7602
- `}const xc={url:"",name:"",objectFit:"cover"},_n=500,qo=650,xn="cubic-bezier(0.22, 1, 0.36, 1)",Zy=72,Jy=50,Qy=1e4,ev=650,tv=500;function nv(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 Nu(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=ga(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 iv(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?Nu(i,n):null}function ov(e){return e.reduce((t,n,i)=>{const o=Il(n.gallery),l=Rl(o).filter(d=>d.lightboxMedia).map(d=>d.lightboxMedia);return l.length===0||t.push({gridIndex:i,items:l,entry:{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}),t},[])}function tr(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 bc(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return tr(e,i,n)}const rv=.03;function _u(e){return e.width*rv}const Ja={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Hr(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Sc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function av(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Ws(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,d=o/r;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const c=r*l;return{width:c,height:r,left:i.left+(o-c)/2,top:i.top}}function sv(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Ws(e,t.width,t.height)}function lv(e,t){if(Bo(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function cv(e){const t=new Set,n=[];for(const i of e){const o=Il(i.gallery),r=Rl(o);for(const l of r)for(const d of[l.displayMedia,l.lightboxMedia])d!=null&&d.url&&!t.has(d.url)&&(t.add(d.url),n.push(d))}return n}function dv({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Bo(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function Ro(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:d}=n,c=_u(n);return t==="left"?{left:l+c-i,top:r,width:i,height:o}:{left:l+d-c,top:r,width:i,height:o}}function ha(e,t,n){const i=Ro(e,t,n);return{...i,left:2*i.left-e.left}}function uv(e,t,n){const{left:i,width:o}=n,r=_u(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 Hu(e,t,n,i){const o=Ro(e,"left",i),r=Ro(e,"right",i),l=ha(e,"left",i),d=ha(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function pv(e,t,n,i){const{start:o,end:r}=Hu(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function mv(e,t,n){const i=Ro(e,t,n),o=ha(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Wu(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 Il(e){if(!e)return;if(Wu(e))return e;if(!Array.isArray(e))return;const[t,n]=e,i=t!=null&&t.url?t:void 0,o=n!=null&&n.url?n:void 0;if(!(!i&&!o))return[{media:[o??i??xc,i??o??xc]}]}function gv(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function hv(e){const[t]=e.media;return t!=null&&t.url?t:null}function Rl(e){if(!Array.isArray(e)||e.length===0)return[];if(Wu(e)){const t=[];for(const n of e){const i=gv(n);if(!i)continue;const o=hv(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.url?o:null})}return t}return e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Bo(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function fv({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return Bo(e)?a.jsx("video",{src:e.url,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onClick:o}):a.jsx("img",{src:e.url,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function yv({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:r,onTransitionEnd:l}){const d=s.useRef(null);return s.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),a.jsx("div",{style:i,onTransitionEnd:l,children:a.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:r,onClick:c=>c.stopPropagation(),style:o},e)})}function Wr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Bo(e)?a.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.url,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.url,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function vv({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:p,layoutId:x,sourceRect:y,resolveCloseSourceRect:m,onClose:g,onPrev:v,onNext:b}){const E=s.useRef(null),f=s.useRef(null),w=s.useRef(null),G=s.useRef(new Map),[X,M]=s.useState(0),T=s.useRef(null),N=s.useRef(0),q=s.useRef(0),$=s.useRef("none"),I=s.useRef(!1),W=s.useRef(!1),O=s.useRef(!1),C=s.useRef(null),L=s.useRef(null),z=s.useRef(null),S=s.useRef(()=>{}),K=s.useRef(null),k=s.useRef(null),H=s.useRef(null),j=s.useRef(!1),[ne,oe]=s.useState(null),[R,ce]=s.useState(Ja),[D,le]=s.useState(0),[ie,we]=s.useState("opening"),[Ie,xe]=s.useState(0),[pe,Y]=s.useState(0),[ae,se]=s.useState(!1),[Re,$e]=s.useState(null),[Me,ve]=s.useState(null),[be,Ce]=s.useState(null),[h,U]=s.useState(!1),[Z,te]=s.useState(null),[me,B]=s.useState(!1),P=s.useRef(!1),[Q,ee]=s.useState(!1),[de,V]=s.useState(!1),Pe=s.useRef(n),he=s.useRef(void 0),J=t[n],Ne=J?Bo(J):!1,Be=pe!==0||ae,at=!l&&(!r||!!d),Ue=c&&!l,nt=u.length>1,Ze=s.useCallback((A,Le)=>t.length<=1?null:t[(A+Le+t.length)%t.length]??null,[t]),Xe=nt?tr(u,p,-1):Ze(n,-1),fe=nt?tr(u,p,1):Ze(n,1),He=Re===-1&&Be?nt&&Me!==null?tr(u,Me,-1):be!==null?Ze(be,-1):null:null,We=Re===1&&Be?nt&&Me!==null?tr(u,Me,1):be!==null?Ze(be,1):null:null,Qe=He&&He.url!==(Xe==null?void 0:Xe.url)?He:null,ye=We&&We.url!==(fe==null?void 0:fe.url)?We:null,_e=Xe&&Ue?(()=>{const A=nt?bc(u,p,-1):t.length>2?Ze((n-1+t.length)%t.length,-1):null;return A&&A.url!==Xe.url?A:null})():null,Ge=fe&&Ue?(()=>{const A=nt?bc(u,p,1):t.length>2?Ze((n+1)%t.length,1):null;return A&&A.url!==fe.url?A:null})():null,et=Qe??_e,mt=ye??Ge,rt=s.useCallback((A,Le,Ae)=>{if(!A||!Le||!Ae)return;const ze=G.current,pt=ze.get(A);(pt==null?void 0:pt.width)===Le&&(pt==null?void 0:pt.height)===Ae||(ze.set(A,{width:Le,height:Ae}),M(zt=>zt+1))},[]),Oe=s.useCallback(A=>{if(!(A!=null&&A.url))return null;const Le=G.current.get(A.url);return sv(f.current,Le)},[X,D]),Fe=s.useCallback(()=>{if(!J)return;const A=Oe(J);if(A){oe(A);return}const Le=f.current;Le&&oe(Sc(Le))},[J,Oe]),Ke=s.useCallback(A=>{if(nt){const Le=u.length;ve((p+A+Le)%Le),Ce(null);return}t.length>1&&(Ce((n+A+t.length)%t.length),ve(null))},[nt,u.length,p,t.length,n]),it=s.useCallback(A=>{O.current=A,se(A)},[]),De=s.useCallback(()=>{C.current!==null&&(window.clearTimeout(C.current),C.current=null)},[]),qe=s.useCallback(()=>{De(),C.current=window.setTimeout(()=>{De(),it(!1)},qo+32)},[De,it]),ut=s.useCallback(()=>{const A=E.current;if(!A){ce({left:0,top:0,width:typeof window<"u"?window.innerWidth:Ja.width,height:typeof window<"u"?window.innerHeight:Ja.height});return}const Le=A.getBoundingClientRect();ce({left:Le.left,top:Le.top,width:Le.width,height:Le.height})},[]),ge=s.useCallback((A,Le)=>{if(Be){if(Q&&!ae)return`translate(${pe}px, 0px)`;if(ae&&Re!==null){const Ae=Oe(A);if(!Ae)return;const{x:ze,y:pt}=pv(Ae,Le,Re,R);return`translate(${ze}px, ${pt}px)`}if(ae)return"translate(0px, 0px)"}},[Be,Q,ae,pe,Re,R,Oe]),ke=s.useCallback(()=>{const A=L.current;L.current=null,De(),it(!1),$e(null),ve(null),Ce(null),Y(0),ee(!1),I.current=!1,q.current=0,$.current="none",A===-1?v():A===1&&b()},[De,it,v,b]),ot=s.useCallback(()=>{De(),C.current=window.setTimeout(()=>{L.current!==null&&ke()},qo+32)},[De,ke]),gt=s.useCallback(()=>{De(),L.current=null,it(!1),$e(null),ve(null),Ce(null),Y(0),ee(!1),I.current=!1,q.current=0,$.current="none"},[De,it]),je=s.useCallback(A=>{if(!(!Ue||!ne)){if(O.current){if(L.current===A){z.current=A,ke();return}gt()}De(),Ke(A),L.current=A,$e(A),it(!0),ot()}},[Ue,ne,ke,gt,De,Ke,it,ot]);S.current=je;const vt=s.useCallback(()=>{K.current=null,j.current=!1,k.current!==null&&(window.clearInterval(k.current),k.current=null),H.current!==null&&(window.clearTimeout(H.current),H.current=null)},[]),It=s.useCallback(A=>{k.current!==null&&window.clearInterval(k.current);const Le=j.current?tv:ev;k.current=window.setInterval(()=>{S.current(A)},Le)},[]),kt=s.useCallback(A=>{K.current!==A&&(vt(),K.current=A,j.current=!1,S.current(A),It(A),H.current=window.setTimeout(()=>{H.current=null,K.current===A&&(j.current=!0,It(A))},Qy))},[vt,It]),wt=s.useCallback(()=>{const A=f.current;if(!A)return;const Le=J==null?void 0:J.url,Ae=Le?G.current.get(Le):void 0;if(Ae!=null&&Ae.width&&(Ae!=null&&Ae.height)){oe(Ws(A,Ae.width,Ae.height));return}const ze=w.current;if(ze&&Le&&(ze.src===Le||ze.currentSrc===Le)){const{width:zt,height:ft}=av(ze);if(zt&&ft){rt(Le,zt,ft),oe(Ws(A,zt,ft));return}}const pt=Sc(A);!pt.width||!pt.height||oe(pt)},[J==null?void 0:J.url,rt]),Dt=s.useCallback(A=>{if(w.current=A,!!A){if(A instanceof HTMLVideoElement){A.readyState>=1&&A.videoWidth>0&&wt();return}A.complete&&A.naturalWidth>0&&wt()}},[wt]),Bt=s.useCallback(()=>{ut(),wt(),le(A=>A+1)},[ut,wt]);s.useEffect(()=>{Bt();const A=f.current,Le=E.current,Ae=new ResizeObserver(()=>Bt());return A&&Ae.observe(A),Le&&Ae.observe(Le),window.addEventListener("resize",Bt),()=>{Ae.disconnect(),window.removeEventListener("resize",Bt)}},[Bt,n,x]),s.useLayoutEffect(()=>{if(!J)return;const A=w.current;if(A){if(A instanceof HTMLImageElement&&A.complete&&A.naturalWidth>0){wt();return}A instanceof HTMLVideoElement&&A.readyState>=1&&A.videoWidth>0&&wt()}},[J==null?void 0:J.url,n,wt]),s.useEffect(()=>{Fe()},[Fe,X]),s.useEffect(()=>{const A=new Set,Le=[],Ae=ze=>{!(ze!=null&&ze.url)||A.has(ze.url)||(A.add(ze.url),Le.push(ze))};t.forEach(Ae),u.forEach(ze=>ze.items.forEach(Ae)),Le.forEach(ze=>{G.current.has(ze.url)||lv(ze,rt)})},[t,u,rt]),s.useEffect(()=>{if(ie!=="opening"||!ne)return;if(!y){we("open");return}U(!1);const A=requestAnimationFrame(()=>{requestAnimationFrame(()=>{U(!0),we("open")})});return()=>cancelAnimationFrame(A)},[ie,ne,y]),s.useEffect(()=>{if(ie!=="closing")return;const A=setTimeout(()=>g(),_n);return()=>clearTimeout(A)},[ie,g]),s.useEffect(()=>()=>{De()},[De]),s.useLayoutEffect(()=>{Pe.current===n&&he.current===(J==null?void 0:J.url)||(De(),L.current=null,$e(null),ve(null),Ce(null),xe(0),Y(0),it(!1),V(!1),ee(!1),N.current=0,q.current=0,$.current="none",I.current=!1,T.current=null,W.current=!1,w.current=null,Fe(),Pe.current=n,he.current=J==null?void 0:J.url)},[n,J==null?void 0:J.url,it,De,Fe]),s.useLayoutEffect(()=>{const A=z.current;A!==null&&(z.current=null,requestAnimationFrame(()=>{S.current(A)}))},[n,p,J==null?void 0:J.url]),s.useLayoutEffect(()=>{if(ie==="opening"){P.current=!1,B(!1);return}if(ie!=="open"||P.current)return;if(!Xe&&!fe){P.current=!0;return}B(!1);const A=requestAnimationFrame(()=>{requestAnimationFrame(()=>{B(!0),P.current=!0})});return()=>cancelAnimationFrame(A)},[ie,Xe==null?void 0:Xe.url,fe==null?void 0:fe.url]),s.useEffect(()=>{if(ie!=="open")return;const A=()=>{const ft=St=>{St.stopPropagation(),St.preventDefault(),document.removeEventListener("click",ft,!0)};document.addEventListener("click",ft,!0)},Le=ft=>{const St=ft<0?1:-1;De(),Ke(St),L.current=St,$e(St),it(!0),ot()},Ae=ft=>{if(Math.abs(ft)>Jy&&Ue){Le(ft);return}L.current=null,$e(null),ve(null),Ce(null),it(!0),Y(0),qe()},ze=ft=>{if(ft.touches.length!==1||O.current)return;const St=ft.touches[0];W.current=!0,T.current={x:St.clientX,y:St.clientY},$.current="none",q.current=0,I.current=!1},pt=ft=>{if(!T.current||ft.touches.length!==1||O.current)return;const St=ft.touches[0],Kt=St.clientX-T.current.x,Ht=St.clientY-T.current.y;if($.current==="none"){if(Math.abs(Kt)<10&&Math.abs(Ht)<10)return;if(Math.abs(Kt)>Math.abs(Ht)){if(!Ue)return;$.current="horizontal"}else if(Ht>0){if(!at)return;$.current="vertical"}else return}if($.current==="horizontal"){I.current=!0,ee(!0),q.current=Kt,Y(Kt),ft.preventDefault();return}$.current==="vertical"&&(I.current=!0,ee(!0),N.current=Ht,xe(Ht),ft.preventDefault())},zt=()=>{if(!T.current)return;const ft=$.current,St=I.current;if(St&&ft==="horizontal")Ae(q.current),A();else if(St&&ft==="vertical"){const Kt=N.current;if(at&&Kt>Zy){const Ht=window.innerHeight;N.current=Ht,V(!0),xe(Ht),we("closing")}else N.current=0,xe(0);A()}else ft==="horizontal"&&Math.abs(q.current)>0&&(Ae(q.current),A());T.current=null,$.current="none",q.current=0,I.current=!1,ee(!1)};return document.addEventListener("touchstart",ze,{passive:!0}),document.addEventListener("touchmove",pt,{passive:!1}),document.addEventListener("touchend",zt),document.addEventListener("touchcancel",zt),()=>{document.removeEventListener("touchstart",ze),document.removeEventListener("touchmove",pt),document.removeEventListener("touchend",zt),document.removeEventListener("touchcancel",zt)}},[ie,Ue,it,qe,De,at,ot,Ke]);const Xt=s.useCallback(()=>{const A=(m==null?void 0:m())??y??null;A&&ne&&(te(A),U(!0)),we("closing")},[m,y,ne]);s.useEffect(()=>{const A=ze=>{if(ze.key==="Escape"){if(r&&d||ie==="closing")return;vt(),Xt();return}if(ze.key!=="ArrowLeft"&&ze.key!=="ArrowRight"||ie!=="open"||!Ue)return;ze.preventDefault();const pt=ze.key==="ArrowLeft"?-1:1;ze.repeat&&K.current===pt||kt(pt)},Le=ze=>{if(ze.key!=="ArrowLeft"&&ze.key!=="ArrowRight")return;const pt=ze.key==="ArrowLeft"?-1:1;K.current===pt&&vt()},Ae=()=>{vt()};return window.addEventListener("keydown",A),window.addEventListener("keyup",Le),window.addEventListener("blur",Ae),()=>{window.removeEventListener("keydown",A),window.removeEventListener("keyup",Le),window.removeEventListener("blur",Ae),vt()}},[ie,r,d,Xt,Ue,kt,vt]),s.useEffect(()=>{ie!=="open"&&vt()},[ie,vt]);const qt=()=>{ie==="closing"||l||Xt()},Lt=ie==="open",Ot=ie==="closing",nn=Ie>0?Math.max(0,1-Ie/500):1,xt=Ie>0?Math.max(.35,1-Ie/500):1,Te=s.useCallback(A=>{if(!(A.propertyName!=="transform"||!O.current)){if(L.current!==null){ke();return}De(),it(!1)}},[De,it,ke]),Ve=ie==="closing"?Z??y:y,st=Ve&&ne&&(ie==="opening"||Ot)?nv(Ve,ne):void 0,lt=Be&&J?ge(J,"center"):Ie>0?`translateY(${Ie}px)`:st,bt=ne?Hr(ne,R):null,Tt=!!(Ve&&ne),tt=Tt&&(ie==="closing"||ie==="open"&&h),Rt={position:"absolute",top:bt==null?void 0:bt.top,left:bt==null?void 0:bt.left,width:bt==null?void 0:bt.width,height:bt==null?void 0:bt.height,objectFit:"contain",transformOrigin:"top left",transform:lt,opacity:Ie>0?xt:Tt?1:ie==="opening"||Ot?0:1,transition:Q&&!ae?"none":ae?`transform ${qo}ms ${xn}`:de?`transform ${_n}ms ${xn}, opacity ${_n}ms ${xn}`:tt?`transform ${_n}ms ${xn}`:ie==="opening"||Ot?`opacity ${_n}ms ${xn}`:"none",pointerEvents:Ne&&Lt&&!Be?"auto":"none",touchAction:Ne&&Lt?"none":void 0,zIndex:1,overflow:Ne?"hidden":void 0},Mt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Lt&&!Be?"auto":"none"},At=(A,Le,Ae="adjacent")=>{const ze=Oe(A);if(!ze)return{display:"none"};const pt=Ae==="far"?Le==="left"?"far-left":"far-right":Le==="left"?"left-adjacent":"right-adjacent",{start:zt}=Re!==null?Hu(ze,pt,Re,R):{start:Ae==="far"?ha(ze,Le,R):Ro(ze,Le,R)},ft=Hr(zt,R),St=ge(A,pt),Kt=!Be&&Ae==="adjacent"&&Lt&&!me?mv(ze,Le,R):null,Ht=Ae==="far"&&Be&&Re===(Le==="left"?-1:1),sn=Q&&!ae?!1:ae,gn=Ae==="adjacent"&&Lt&&me&&!Be;return{position:"absolute",top:ft.top,left:ft.left,width:ft.width,height:ft.height,objectFit:"contain",transform:St??(Kt?`translate(${Kt.x}px, ${Kt.y}px)`:void 0),opacity:Ae==="far"?Lt&&Ht?1:0:Lt?1:0,transition:sn?Ae==="far"?`transform ${qo}ms ${xn}`:`transform ${qo}ms ${xn}, opacity ${_n}ms ${xn}`:gn?`transform ${_n}ms ${xn}`:ie==="opening"||Ot?`opacity ${_n}ms ${xn}`:"none",pointerEvents:"none",zIndex:1}},jt=(A,Le)=>{const Ae=Oe(A);return Ae?uv(Ro(Ae,Le,R),Le,R):null},Ut=A=>Le=>{if(!l){if(W.current){W.current=!1;return}Le.stopPropagation(),je(A)}},Et=Xe?jt(Xe,"left"):null,Nt=fe?jt(fe,"right"):null,_t=Et?Hr(Et,R):null,ht=Nt?Hr(Nt,R):null;return a.jsxs("div",{ref:E,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:ie==="open"?"none":void 0},onClick:qt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Lt?nn:0,transition:Q?"none":`opacity ${_n}ms ${xn}`,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:Lt?1:0,transition:Q?"none":`opacity ${_n}ms ${xn}`,pointerEvents:"none"},children:a.jsx(Fu,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,onClose:qt})})]}),Lt&&et&&a.jsx(Wr,{media:et,style:At(et,"left","far"),onMeasure:rt,onTransitionEnd:Te},`far-prev-${et.url}`),Lt&&Xe&&a.jsxs(a.Fragment,{children:[a.jsx(Wr,{media:Xe,style:At(Xe,"left"),onMeasure:rt,onTransitionEnd:Te},`prev-${Xe.url}`),_t&&a.jsx("div",{style:{position:"absolute",top:_t.top,left:_t.left,width:_t.width,height:_t.height,cursor:l||Q?"default":"pointer",pointerEvents:l||Q?"none":"auto",zIndex:3},onClick:Ut(-1)})]}),Lt&&fe&&a.jsxs(a.Fragment,{children:[a.jsx(Wr,{media:fe,style:At(fe,"right"),onMeasure:rt,onTransitionEnd:Te},`next-${fe.url}`),ht&&a.jsx("div",{style:{position:"absolute",top:ht.top,left:ht.left,width:ht.width,height:ht.height,cursor:l||Q?"default":"pointer",pointerEvents:l||Q?"none":"auto",zIndex:3},onClick:Ut(1)})]}),Lt&&mt&&a.jsx(Wr,{media:mt,style:At(mt,"right","far"),onMeasure:rt,onTransitionEnd:Te},`far-next-${mt.url}`),ne&&J&&(Ne?a.jsx(yv,{src:J.url,phase:ie,onMediaElement:Dt,wrapperStyle:Rt,videoStyle:Mt,onLoadedMetadata:wt,onTransitionEnd:Te},`${n}-${J.url}`):a.jsx("img",{ref:Dt,src:J.url,alt:J.name,onLoad:wt,onTransitionEnd:Te,style:Rt},`${n}-${J.url}`))]})}function xv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:d}=_.useScopedStyles(),{gridLayout:c,verticalGap:u,align:p="top",imageDisplay:x}=e,y=(x==null?void 0:x.display)==="cover",m=(x==null?void 0:x.ratioValue)??"1:1",g=(x==null?void 0:x.reversed)??!1,[v,b]=m.split(":").map(Number),w=`${g?b:v} / ${g?v:b}`,G=c.entryWidth??.2,X=c.columnsCount,M=_.scalingValue(G,n),T=_.scalingValue(c.horizontalGap??0,n),N=M,q=M,$={width:N,...y?{aspectRatio:w,height:"auto",overflow:"hidden"}:{height:"auto"}},I=y?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},W=s.useRef(null),[O,C]=s.useState(!1),[L,z]=s.useState([]),[S,K]=s.useState(0),[k,H]=s.useState(0),[j,ne]=s.useState(null),[oe,R]=s.useState({title1:"",title2:"",title3:""}),ce=(()=>{const be={},Ce=W.current?getComputedStyle(W.current).getPropertyValue("--cntrl-article-width").trim():"";return Ce&&(be["--cntrl-article-width"]=Ce),be})(),D=!n||i||o,le=s.useMemo(()=>Yy(d),[d]),ie=t??[],we=ie.length%X||X,Ie=we<X&&ie.length>0,xe=ie.length-we,pe=Ie?Math.floor((X-we)/2)+1:1,Y=s.useMemo(()=>ov(ie),[ie]),ae=s.useMemo(()=>cv(ie),[ie]),se=(be,Ce,h)=>{if(n&&!o&&!i)return;const U=Y.findIndex(te=>te.gridIndex===be);if(U<0)return;const Z=Y[U];H(U),z(Z.items),K(Ce),R(Z.entry),ne(h??null),C(!0)},Re=s.useCallback(()=>{C(!1),ne(null)},[]),$e=s.useCallback(()=>{const be=Y[k];return!be||!W.current?j:iv(W.current,be.gridIndex,y?"cover":"contain")??j},[Y,k,j,y]),Me=s.useCallback(be=>{if(Y.length>1){const Ce=Y.length,h=(k+be+Ce)%Ce,U=Y[h],Z=Math.min(S,U.items.length-1);H(h),z(U.items),K(Z),R(U.entry);return}K(Ce=>(Ce+be+L.length)%L.length)},[Y,k,S,L.length]),ve=Y.length>1||L.length>1;return s.useEffect(()=>{if(!O||typeof document>"u")return;const be=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=be}},[O]),s.useEffect(()=>{!n||o||i||C(!1)},[n,o,i]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:le}}),a.jsx(dv,{mediaList:ae}),a.jsx("div",{ref:W,className:`${d}-wrapper ${d}-align-entries ${d}-image-align-${p}`.trim(),style:{gridTemplateColumns:`repeat(${X}, ${M})`,rowGap:0,columnGap:T,width:_.scalingValue(c.wrapperWidth??0,n),[`--${d}-align-entries-row-gap`]:_.scalingValue(u??0,n)},children:ie.map((be,Ce)=>{const h=Il(be.gallery),U=Rl(h),Z=U.filter(ee=>ee.lightboxMedia).map(ee=>ee.lightboxMedia),te=Math.floor(Ce/X)===Math.ceil(ie.length/X)-1,me=Ie&&Ce>=xe?`${pe+(Ce-xe)}`:void 0,B=U[0],P=B!=null&&B.lightboxMedia?Z.findIndex(ee=>ee.url===B.lightboxMedia.url):-1,Q=a.jsx("div",{className:`${d}-item-image-wrapper`,style:$,children:U.length>0&&a.jsx(fv,{media:B.displayMedia,gridIndex:Ce,className:`${d}-item-${Bo(B.displayMedia)?"video":"image"}`.trim(),style:I,onMediaClick:D&&P>=0?ee=>se(Ce,P,Nu(ee.currentTarget,y?"cover":"contain")):void 0})});return a.jsx("div",{className:`${d}-item`,children:a.jsxs("div",{className:[o?`${d}-item-inner`:`${d}-item-inner-hidden`,te?`${d}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:M,...me?{gridColumn:me}:{}},children:[a.jsx("div",{className:`${d}-item-title-row`,children:a.jsx("div",{style:{height:0,width:q}})}),a.jsx("a",{className:`${d}-item-image-link`,children:Q}),a.jsx("div",{className:`${d}-item-subtitle-row`,children:a.jsx("div",{style:{height:0,width:q}})})]})},Ce)})}),O&&typeof document<"u"&&(()=>{const be=(l?document.getElementById(l):null)??document.body;return li.createPortal(a.jsx("div",{style:ce,"data-selection":"none",children:a.jsx(vv,{prefix:d,items:L,index:S,entry:oe,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:ve,lightboxEntries:Y,entryIdx:k,layoutId:r,sourceRect:j,resolveCloseSourceRect:$e,onClose:Re,onPrev:()=>Me(-1),onNext:()=>Me(1)})}),be)})()]})}const bv=`import { CommonComponentProps } from '../props';
7602
+ `}const xc={url:"",name:"",objectFit:"cover"},_n=500,qo=650,xn="cubic-bezier(0.22, 1, 0.36, 1)",Zy=72,Jy=50,Qy=1e4,ev=650,tv=500;function nv(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 Nu(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=ga(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 iv(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?Nu(i,n):null}function ov(e){return e.reduce((t,n,i)=>{const o=Il(n.gallery),l=Rl(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 tr(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 bc(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return tr(e,i,n)}const rv=.03;function _u(e){return e.width*rv}const Ja={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Hr(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Sc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function av(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Ws(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 sv(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Ws(e,t.width,t.height)}function lv(e,t){if(Bo(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function cv(e){const t=new Set,n=[];for(const i of e){const o=Il(i.gallery),r=Rl(o);for(const l of r)for(const c of[l.displayMedia,l.lightboxMedia])c!=null&&c.url&&!t.has(c.url)&&(t.add(c.url),n.push(c))}return n}function dv({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Bo(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function Ro(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:c}=n,d=_u(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 ha(e,t,n){const i=Ro(e,t,n);return{...i,left:2*i.left-e.left}}function uv(e,t,n){const{left:i,width:o}=n,r=_u(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 Hu(e,t,n,i){const o=Ro(e,"left",i),r=Ro(e,"right",i),l=ha(e,"left",i),c=ha(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 pv(e,t,n,i){const{start:o,end:r}=Hu(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function mv(e,t,n){const i=Ro(e,t,n),o=ha(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Wu(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 Il(e){if(!e)return;if(Wu(e))return e;if(!Array.isArray(e))return;const[t,n]=e,i=t!=null&&t.url?t:void 0,o=n!=null&&n.url?n:void 0;if(!(!i&&!o))return[{media:[o??i??xc,i??o??xc]}]}function gv(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function hv(e){const[t]=e.media;return t!=null&&t.url?t:null}function Rl(e){if(!Array.isArray(e)||e.length===0)return[];if(Wu(e)){const t=[];for(const n of e){const i=gv(n);if(!i)continue;const o=hv(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.url?o:null})}return t}return e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Bo(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function fv({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return Bo(e)?a.jsx("video",{src:e.url,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onClick:o}):a.jsx("img",{src:e.url,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function yv({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 Wr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Bo(e)?a.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.url,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.url,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function vv({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:m,onClose:g,onPrev:x,onNext:b}){const E=s.useRef(null),f=s.useRef(null),w=s.useRef(null),G=s.useRef(new Map),[X,k]=s.useState(0),L=s.useRef(null),A=s.useRef(0),U=s.useRef(0),$=s.useRef("none"),P=s.useRef(!1),H=s.useRef(!1),W=s.useRef(!1),C=s.useRef(null),T=s.useRef(null),B=s.useRef(null),S=s.useRef(()=>{}),K=s.useRef(null),R=s.useRef(null),_=s.useRef(null),j=s.useRef(!1),[oe,re]=s.useState(null),[O,ie]=s.useState(Ja),[D,le]=s.useState(0),[ee,ve]=s.useState("opening"),[Ie,be]=s.useState(0),[pe,Y]=s.useState(0),[se,xe]=s.useState(!1),[Se,Ce]=s.useState(null),[Ae,fe]=s.useState(null),[we,Te]=s.useState(null),[h,q]=s.useState(!1),[Z,te]=s.useState(null),[ue,z]=s.useState(!1),I=s.useRef(!1),[Q,ne]=s.useState(!1),[de,V]=s.useState(!1),Pe=s.useRef(n),he=s.useRef(void 0),J=t[n],He=J?Bo(J):!1,We=pe!==0||se,ot=!l&&(!r||!!c),qe=d&&!l,nt=u.length>1,tt=s.useCallback((N,Le)=>t.length<=1?null:t[(N+Le+t.length)%t.length]??null,[t]),Ve=nt?tr(u,p,-1):tt(n,-1),ge=nt?tr(u,p,1):tt(n,1),_e=Se===-1&&We?nt&&Ae!==null?tr(u,Ae,-1):we!==null?tt(we,-1):null:null,je=Se===1&&We?nt&&Ae!==null?tr(u,Ae,1):we!==null?tt(we,1):null:null,Ze=_e&&_e.url!==(Ve==null?void 0:Ve.url)?_e:null,ye=je&&je.url!==(ge==null?void 0:ge.url)?je:null,Ne=Ve&&qe?(()=>{const N=nt?bc(u,p,-1):t.length>2?tt((n-1+t.length)%t.length,-1):null;return N&&N.url!==Ve.url?N:null})():null,Ke=ge&&qe?(()=>{const N=nt?bc(u,p,1):t.length>2?tt((n+1)%t.length,1):null;return N&&N.url!==ge.url?N:null})():null,Qe=Ze??Ne,st=ye??Ke,rt=s.useCallback((N,Le,Be)=>{if(!N||!Le||!Be)return;const Fe=G.current,mt=Fe.get(N);(mt==null?void 0:mt.width)===Le&&(mt==null?void 0:mt.height)===Be||(Fe.set(N,{width:Le,height:Be}),k(Nt=>Nt+1))},[]),De=s.useCallback(N=>{if(!(N!=null&&N.url))return null;const Le=G.current.get(N.url);return sv(f.current,Le)},[X,D]),Me=s.useCallback(()=>{if(!J)return;const N=De(J);if(N){re(N);return}const Le=f.current;Le&&re(Sc(Le))},[J,De]),gt=s.useCallback(N=>{if(nt){const Le=u.length;fe((p+N+Le)%Le),Te(null);return}t.length>1&&(Te((n+N+t.length)%t.length),fe(null))},[nt,u.length,p,t.length,n]),ze=s.useCallback(N=>{W.current=N,xe(N)},[]),Oe=s.useCallback(()=>{C.current!==null&&(window.clearTimeout(C.current),C.current=null)},[]),Xe=s.useCallback(()=>{Oe(),C.current=window.setTimeout(()=>{Oe(),ze(!1)},qo+32)},[Oe,ze]),lt=s.useCallback(()=>{const N=E.current;if(!N){ie({left:0,top:0,width:typeof window<"u"?window.innerWidth:Ja.width,height:typeof window<"u"?window.innerHeight:Ja.height});return}const Le=N.getBoundingClientRect();ie({left:Le.left,top:Le.top,width:Le.width,height:Le.height})},[]),me=s.useCallback((N,Le)=>{if(We){if(Q&&!se)return`translate(${pe}px, 0px)`;if(se&&Se!==null){const Be=De(N);if(!Be)return;const{x:Fe,y:mt}=pv(Be,Le,Se,O);return`translate(${Fe}px, ${mt}px)`}if(se)return"translate(0px, 0px)"}},[We,Q,se,pe,Se,O,De]),Re=s.useCallback(()=>{const N=T.current;T.current=null,Oe(),ze(!1),Ce(null),fe(null),Te(null),Y(0),ne(!1),P.current=!1,U.current=0,$.current="none",N===-1?x():N===1&&b()},[Oe,ze,x,b]),it=s.useCallback(()=>{Oe(),C.current=window.setTimeout(()=>{T.current!==null&&Re()},qo+32)},[Oe,Re]),ht=s.useCallback(()=>{Oe(),T.current=null,ze(!1),Ce(null),fe(null),Te(null),Y(0),ne(!1),P.current=!1,U.current=0,$.current="none"},[Oe,ze]),Ge=s.useCallback(N=>{if(!(!qe||!oe)){if(W.current){if(T.current===N){B.current=N,Re();return}ht()}Oe(),gt(N),T.current=N,Ce(N),ze(!0),it()}},[qe,oe,Re,ht,Oe,gt,ze,it]);S.current=Ge;const St=s.useCallback(()=>{K.current=null,j.current=!1,R.current!==null&&(window.clearInterval(R.current),R.current=null),_.current!==null&&(window.clearTimeout(_.current),_.current=null)},[]),Pt=s.useCallback(N=>{R.current!==null&&window.clearInterval(R.current);const Le=j.current?tv:ev;R.current=window.setInterval(()=>{S.current(N)},Le)},[]),kt=s.useCallback(N=>{K.current!==N&&(St(),K.current=N,j.current=!1,S.current(N),Pt(N),_.current=window.setTimeout(()=>{_.current=null,K.current===N&&(j.current=!0,Pt(N))},Qy))},[St,Pt]),$t=s.useCallback(()=>{const N=f.current;if(!N)return;const Le=J==null?void 0:J.url,Be=Le?G.current.get(Le):void 0;if(Be!=null&&Be.width&&(Be!=null&&Be.height)){re(Ws(N,Be.width,Be.height));return}const Fe=w.current;if(Fe&&Le&&(Fe.src===Le||Fe.currentSrc===Le)){const{width:Nt,height:yt}=av(Fe);if(Nt&&yt){rt(Le,Nt,yt),re(Ws(N,Nt,yt));return}}const mt=Sc(N);!mt.width||!mt.height||re(mt)},[J==null?void 0:J.url,rt]),jt=s.useCallback(N=>{if(w.current=N,!!N){if(N instanceof HTMLVideoElement){N.readyState>=1&&N.videoWidth>0&&$t();return}N.complete&&N.naturalWidth>0&&$t()}},[$t]),Bt=s.useCallback(()=>{lt(),$t(),le(N=>N+1)},[lt,$t]);s.useEffect(()=>{Bt();const N=f.current,Le=E.current,Be=new ResizeObserver(()=>Bt());return N&&Be.observe(N),Le&&Be.observe(Le),window.addEventListener("resize",Bt),()=>{Be.disconnect(),window.removeEventListener("resize",Bt)}},[Bt,n,y]),s.useLayoutEffect(()=>{if(!J)return;const N=w.current;if(N){if(N instanceof HTMLImageElement&&N.complete&&N.naturalWidth>0){$t();return}N instanceof HTMLVideoElement&&N.readyState>=1&&N.videoWidth>0&&$t()}},[J==null?void 0:J.url,n,$t]),s.useEffect(()=>{Me()},[Me,X]),s.useEffect(()=>{const N=new Set,Le=[],Be=Fe=>{!(Fe!=null&&Fe.url)||N.has(Fe.url)||(N.add(Fe.url),Le.push(Fe))};t.forEach(Be),u.forEach(Fe=>Fe.items.forEach(Be)),Le.forEach(Fe=>{G.current.has(Fe.url)||lv(Fe,rt)})},[t,u,rt]),s.useEffect(()=>{if(ee!=="opening"||!oe)return;if(!v){ve("open");return}q(!1);const N=requestAnimationFrame(()=>{requestAnimationFrame(()=>{q(!0),ve("open")})});return()=>cancelAnimationFrame(N)},[ee,oe,v]),s.useEffect(()=>{if(ee!=="closing")return;const N=setTimeout(()=>g(),_n);return()=>clearTimeout(N)},[ee,g]),s.useEffect(()=>()=>{Oe()},[Oe]),s.useLayoutEffect(()=>{Pe.current===n&&he.current===(J==null?void 0:J.url)||(Oe(),T.current=null,Ce(null),fe(null),Te(null),be(0),Y(0),ze(!1),V(!1),ne(!1),A.current=0,U.current=0,$.current="none",P.current=!1,L.current=null,H.current=!1,w.current=null,Me(),Pe.current=n,he.current=J==null?void 0:J.url)},[n,J==null?void 0:J.url,ze,Oe,Me]),s.useLayoutEffect(()=>{const N=B.current;N!==null&&(B.current=null,requestAnimationFrame(()=>{S.current(N)}))},[n,p,J==null?void 0:J.url]),s.useLayoutEffect(()=>{if(ee==="opening"){I.current=!1,z(!1);return}if(ee!=="open"||I.current)return;if(!Ve&&!ge){I.current=!0;return}z(!1);const N=requestAnimationFrame(()=>{requestAnimationFrame(()=>{z(!0),I.current=!0})});return()=>cancelAnimationFrame(N)},[ee,Ve==null?void 0:Ve.url,ge==null?void 0:ge.url]),s.useEffect(()=>{if(ee!=="open")return;const N=()=>{const yt=wt=>{wt.stopPropagation(),wt.preventDefault(),document.removeEventListener("click",yt,!0)};document.addEventListener("click",yt,!0)},Le=yt=>{const wt=yt<0?1:-1;Oe(),gt(wt),T.current=wt,Ce(wt),ze(!0),it()},Be=yt=>{if(Math.abs(yt)>Jy&&qe){Le(yt);return}T.current=null,Ce(null),fe(null),Te(null),ze(!0),Y(0),Xe()},Fe=yt=>{if(yt.touches.length!==1||W.current)return;const wt=yt.touches[0];H.current=!0,L.current={x:wt.clientX,y:wt.clientY},$.current="none",U.current=0,P.current=!1},mt=yt=>{if(!L.current||yt.touches.length!==1||W.current)return;const wt=yt.touches[0],Kt=wt.clientX-L.current.x,zt=wt.clientY-L.current.y;if($.current==="none"){if(Math.abs(Kt)<10&&Math.abs(zt)<10)return;if(Math.abs(Kt)>Math.abs(zt)){if(!qe)return;$.current="horizontal"}else if(zt>0){if(!ot)return;$.current="vertical"}else return}if($.current==="horizontal"){P.current=!0,ne(!0),U.current=Kt,Y(Kt),yt.preventDefault();return}$.current==="vertical"&&(P.current=!0,ne(!0),A.current=zt,be(zt),yt.preventDefault())},Nt=()=>{if(!L.current)return;const yt=$.current,wt=P.current;if(wt&&yt==="horizontal")Be(U.current),N();else if(wt&&yt==="vertical"){const Kt=A.current;if(ot&&Kt>Zy){const zt=window.innerHeight;A.current=zt,V(!0),be(zt),ve("closing")}else A.current=0,be(0);N()}else yt==="horizontal"&&Math.abs(U.current)>0&&(Be(U.current),N());L.current=null,$.current="none",U.current=0,P.current=!1,ne(!1)};return document.addEventListener("touchstart",Fe,{passive:!0}),document.addEventListener("touchmove",mt,{passive:!1}),document.addEventListener("touchend",Nt),document.addEventListener("touchcancel",Nt),()=>{document.removeEventListener("touchstart",Fe),document.removeEventListener("touchmove",mt),document.removeEventListener("touchend",Nt),document.removeEventListener("touchcancel",Nt)}},[ee,qe,ze,Xe,Oe,ot,it,gt]);const Xt=s.useCallback(()=>{const N=(m==null?void 0:m())??v??null;N&&oe&&(te(N),q(!0)),ve("closing")},[m,v,oe]);s.useEffect(()=>{const N=Fe=>{if(Fe.key==="Escape"){if(r&&c||ee==="closing")return;St(),Xt();return}if(Fe.key!=="ArrowLeft"&&Fe.key!=="ArrowRight"||ee!=="open"||!qe)return;Fe.preventDefault();const mt=Fe.key==="ArrowLeft"?-1:1;Fe.repeat&&K.current===mt||kt(mt)},Le=Fe=>{if(Fe.key!=="ArrowLeft"&&Fe.key!=="ArrowRight")return;const mt=Fe.key==="ArrowLeft"?-1:1;K.current===mt&&St()},Be=()=>{St()};return window.addEventListener("keydown",N),window.addEventListener("keyup",Le),window.addEventListener("blur",Be),()=>{window.removeEventListener("keydown",N),window.removeEventListener("keyup",Le),window.removeEventListener("blur",Be),St()}},[ee,r,c,Xt,qe,kt,St]),s.useEffect(()=>{ee!=="open"&&St()},[ee,St]);const qt=()=>{ee==="closing"||l||Xt()},It=ee==="open",Dt=ee==="closing",on=Ie>0?Math.max(0,1-Ie/500):1,xt=Ie>0?Math.max(.35,1-Ie/500):1,ft=s.useCallback(N=>{if(!(N.propertyName!=="transform"||!W.current)){if(T.current!==null){Re();return}Oe(),ze(!1)}},[Oe,ze,Re]),Ee=ee==="closing"?Z??v:v,et=Ee&&oe&&(ee==="opening"||Dt)?nv(Ee,oe):void 0,Je=We&&J?me(J,"center"):Ie>0?`translateY(${Ie}px)`:et,dt=oe?Hr(oe,O):null,Tt=!!(Ee&&oe),vt=Tt&&(ee==="closing"||ee==="open"&&h),ut={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:Je,opacity:Ie>0?xt:Tt?1:ee==="opening"||Dt?0:1,transition:Q&&!se?"none":se?`transform ${qo}ms ${xn}`:de?`transform ${_n}ms ${xn}, opacity ${_n}ms ${xn}`:vt?`transform ${_n}ms ${xn}`:ee==="opening"||Dt?`opacity ${_n}ms ${xn}`:"none",pointerEvents:He&&It&&!We?"auto":"none",touchAction:He&&It?"none":void 0,zIndex:1,overflow:He?"hidden":void 0},_t={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:It&&!We?"auto":"none"},Mt=(N,Le,Be="adjacent")=>{const Fe=De(N);if(!Fe)return{display:"none"};const mt=Be==="far"?Le==="left"?"far-left":"far-right":Le==="left"?"left-adjacent":"right-adjacent",{start:Nt}=Se!==null?Hu(Fe,mt,Se,O):{start:Be==="far"?ha(Fe,Le,O):Ro(Fe,Le,O)},yt=Hr(Nt,O),wt=me(N,mt),Kt=!We&&Be==="adjacent"&&It&&!ue?mv(Fe,Le,O):null,zt=Be==="far"&&We&&Se===(Le==="left"?-1:1),sn=Q&&!se?!1:se,ln=Be==="adjacent"&&It&&ue&&!We;return{position:"absolute",top:yt.top,left:yt.left,width:yt.width,height:yt.height,objectFit:"contain",transform:wt??(Kt?`translate(${Kt.x}px, ${Kt.y}px)`:void 0),opacity:Be==="far"?It&&zt?1:0:It?1:0,transition:sn?Be==="far"?`transform ${qo}ms ${xn}`:`transform ${qo}ms ${xn}, opacity ${_n}ms ${xn}`:ln?`transform ${_n}ms ${xn}`:ee==="opening"||Dt?`opacity ${_n}ms ${xn}`:"none",pointerEvents:"none",zIndex:1}},Ht=(N,Le)=>{const Be=De(N);return Be?uv(Ro(Be,Le,O),Le,O):null},Ut=N=>Le=>{if(!l){if(H.current){H.current=!1;return}Le.stopPropagation(),Ge(N)}},Et=Ve?Ht(Ve,"left"):null,Wt=ge?Ht(ge,"right"):null,At=Et?Hr(Et,O):null,pt=Wt?Hr(Wt,O):null;return a.jsxs("div",{ref:E,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:ee==="open"?"none":void 0},onClick:qt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:It?on:0,transition:Q?"none":`opacity ${_n}ms ${xn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:f,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:It?1:0,transition:Q?"none":`opacity ${_n}ms ${xn}`,pointerEvents:"none"},children:a.jsx(Fu,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,onClose:qt})})]}),It&&Qe&&a.jsx(Wr,{media:Qe,style:Mt(Qe,"left","far"),onMeasure:rt,onTransitionEnd:ft},`far-prev-${Qe.url}`),It&&Ve&&a.jsxs(a.Fragment,{children:[a.jsx(Wr,{media:Ve,style:Mt(Ve,"left"),onMeasure:rt,onTransitionEnd:ft},`prev-${Ve.url}`),At&&a.jsx("div",{style:{position:"absolute",top:At.top,left:At.left,width:At.width,height:At.height,cursor:l||Q?"default":"pointer",pointerEvents:l||Q?"none":"auto",zIndex:3},onClick:Ut(-1)})]}),It&&ge&&a.jsxs(a.Fragment,{children:[a.jsx(Wr,{media:ge,style:Mt(ge,"right"),onMeasure:rt,onTransitionEnd:ft},`next-${ge.url}`),pt&&a.jsx("div",{style:{position:"absolute",top:pt.top,left:pt.left,width:pt.width,height:pt.height,cursor:l||Q?"default":"pointer",pointerEvents:l||Q?"none":"auto",zIndex:3},onClick:Ut(1)})]}),It&&st&&a.jsx(Wr,{media:st,style:Mt(st,"right","far"),onMeasure:rt,onTransitionEnd:ft},`far-next-${st.url}`),oe&&J&&(He?a.jsx(yv,{src:J.url,phase:ee,onMediaElement:jt,wrapperStyle:ut,videoStyle:_t,onLoadedMetadata:$t,onTransitionEnd:ft},`${n}-${J.url}`):a.jsx("img",{ref:jt,src:J.url,alt:J.name,onLoad:$t,onTransitionEnd:ft,style:ut},`${n}-${J.url}`))]})}function xv({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",m=(y==null?void 0:y.ratioValue)??"1:1",g=(y==null?void 0:y.reversed)??!1,[x,b]=m.split(":").map(Number),w=`${g?b:x} / ${g?x:b}`,G=d.entryWidth??.2,X=d.columnsCount,k=F.scalingValue(G,n),L=F.scalingValue(d.horizontalGap??0,n),A=k,U=k,$={width:A,...v?{aspectRatio:w,height:"auto",overflow:"hidden"}:{height:"auto"}},P=v?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},H=s.useRef(null),[W,C]=s.useState(!1),[T,B]=s.useState([]),[S,K]=s.useState(0),[R,_]=s.useState(0),[j,oe]=s.useState(null),[re,O]=s.useState({title1:"",title2:"",title3:""}),ie=(()=>{const we={},Te=H.current?getComputedStyle(H.current).getPropertyValue("--cntrl-article-width").trim():"";return Te&&(we["--cntrl-article-width"]=Te),we})(),D=!n||i||o,le=s.useMemo(()=>Yy(c),[c]),ee=t??[],ve=ee.length%X||X,Ie=ve<X&&ee.length>0,be=ee.length-ve,pe=Ie?Math.floor((X-ve)/2)+1:1,Y=s.useMemo(()=>ov(ee),[ee]),se=s.useMemo(()=>cv(ee),[ee]),xe=(we,Te,h)=>{if(n&&!o&&!i)return;const q=Y.findIndex(te=>te.gridIndex===we);if(q<0)return;const Z=Y[q];_(q),B(Z.items),K(Te),O(Z.entry),oe(h??null),C(!0)},Se=s.useCallback(()=>{C(!1),oe(null)},[]),Ce=s.useCallback(()=>{const we=Y[R];return!we||!H.current?j:iv(H.current,we.gridIndex,v?"cover":"contain")??j},[Y,R,j,v]),Ae=s.useCallback(we=>{if(Y.length>1){const Te=Y.length,h=(R+we+Te)%Te,q=Y[h],Z=Math.min(S,q.items.length-1);_(h),B(q.items),K(Z),O(q.entry);return}K(Te=>(Te+we+T.length)%T.length)},[Y,R,S,T.length]),fe=Y.length>1||T.length>1;return s.useEffect(()=>{if(!W||typeof document>"u")return;const we=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=we}},[W]),s.useEffect(()=>{!n||o||i||C(!1)},[n,o,i]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:le}}),a.jsx(dv,{mediaList:se}),a.jsx("div",{ref:H,className:`${c}-wrapper ${c}-align-entries ${c}-image-align-${p}`.trim(),style:{gridTemplateColumns:`repeat(${X}, ${k})`,rowGap:0,columnGap:L,width:F.scalingValue(d.wrapperWidth??0,n),[`--${c}-align-entries-row-gap`]:F.scalingValue(u??0,n)},children:ee.map((we,Te)=>{const h=Il(we.gallery),q=Rl(h),Z=q.filter(ne=>ne.lightboxMedia).map(ne=>ne.lightboxMedia),te=Math.floor(Te/X)===Math.ceil(ee.length/X)-1,ue=Ie&&Te>=be?`${pe+(Te-be)}`:void 0,z=q[0],I=z!=null&&z.lightboxMedia?Z.findIndex(ne=>ne.url===z.lightboxMedia.url):-1,Q=a.jsx("div",{className:`${c}-item-image-wrapper`,style:$,children:q.length>0&&a.jsx(fv,{media:z.displayMedia,gridIndex:Te,className:`${c}-item-${Bo(z.displayMedia)?"video":"image"}`.trim(),style:P,onMediaClick:D&&I>=0?ne=>xe(Te,I,Nu(ne.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`,te?`${c}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:k,...ue?{gridColumn:ue}:{}},children:[a.jsx("div",{className:`${c}-item-title-row`,children:a.jsx("div",{style:{height:0,width:U}})}),a.jsx("a",{className:`${c}-item-image-link`,children:Q}),a.jsx("div",{className:`${c}-item-subtitle-row`,children:a.jsx("div",{style:{height:0,width:U}})})]})},Te)})}),W&&typeof document<"u"&&(()=>{const we=(l?document.getElementById(l):null)??document.body;return Gn.createPortal(a.jsx("div",{style:ie,"data-selection":"none",children:a.jsx(vv,{prefix:c,items:T,index:S,entry:re,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:fe,lightboxEntries:Y,entryIdx:R,layoutId:r,sourceRect:j,resolveCloseSourceRect:Ce,onClose:Se,onPrev:()=>Ae(-1),onNext:()=>Ae(1)})}),we)})()]})}const bv=`import { CommonComponentProps } from '../props';
7603
7603
  import { scalingValue, useScopedStyles } from '../utils/index';
7604
7604
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
7605
7605
  import { createPortal } from 'react-dom';
@@ -9942,7 +9942,7 @@ export function Hive({
9942
9942
  </>
9943
9943
  );
9944
9944
  }
9945
- `,Sv="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),_i={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 wv(e){const t={};return t[yt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[yt(e,"fontSettings")]={..._i.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[yt(e,"fontSize")]={..._i.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[yt(e,"lineHeight")]={..._i.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[yt(e,"letterSpacing")]={..._i.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[yt(e,"wordSpacing")]={..._i.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[yt(e,"textAlign")]={..._i.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[yt(e,"textAppearance")]={..._i.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const ko=Li.filter(e=>e!=="count"),$v=ko.reduce((e,t)=>({...e,...wv(t)}),{}),Cv=ko.reduce((e,t)=>({...e,[yt(t,"fontFamily")]:"Arial",[yt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[yt(t,"letterSpacing")]:0,[yt(t,"wordSpacing")]:0,[yt(t,"textAlign")]:"left",[yt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Qa(e){return ko.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[yt(n,"fontSize")]=i),o!==void 0&&(t[yt(n,"lineHeight")]=o),t},{})}const Tv={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(ko.map(e=>[Ll[e],Pl(e)]))},Lv={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},Pv=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...Lv,gallery:[{media:[{url:`https://cdn.cntrl.site/component-assets/hive_${t}.jpg`,name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]});return e})(),Iv={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",max:1,display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:Pv},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"}},...$v},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:Sv,closeIconColor:"#000000",closeIconHoverColor:"#999999",...Cv},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,...Qa({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,...Qa({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,...Qa({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:[Tv]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},Rv={element:xv,id:"hive",name:"Catalogue",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/hive.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...ko.map(e=>({path:`${yt(e,"fontFamily")}`}))]},fontRelations:{...ko.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${yt(t,"fontFamily")}`}),{})},schema:Iv,sourceCode:bv};function kv(e){if(e.type==="video")return!0;if(e.type==="image")return!1;const t=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function Ev({media:e,className:t,style:n}){const i=s.useRef(null);return s.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const r=o.play();r&&r.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?a.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:t,src:e.url,alt:"",style:n})}function es(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Mv(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 $c(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 Cc(e,t,n,i,o,r,l){const d=_.scalingValue(r,l),c=_.scalingValue(0,l),u=e===0,p=e===t-1&&!o;return{borderTopWidth:u&&n?d:c,borderBottomWidth:!p||i?d:c}}function Av(e,t,n){const i=_.scalingValue(t,n),o=_.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Tc=10,Lc=10,Uo={positionEase:.14,rotationEase:.09,rotationFactor:2.5,maxRotation:20};function Fv(e,t,n){return Math.max(t,Math.min(n,e))}function ts(e,t,n){return e+(t-e)*n}function Nv(e,t,n,i){if(!t)return{x:0,y:0};const o=t.offsetWidth,l=t.offsetHeight/2;if(e==="cursor"&&n){const d=t.getBoundingClientRect();return{x:n.clientX-d.left+Tc,y:n.clientY-d.top+Tc}}switch(e){case"left":return{x:Lc+i/2,y:l};case"center":return{x:o/2,y:l};case"right":return{x:o-Lc-i/2,y:l};default:return{x:o/2,y:l}}}function _v(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,g=i.current;m&&(m.style.transform=`translate3d(${g.x}px, ${g.y}px, 0) translate(-50%, -50%) rotate(${g.rotation.toFixed(3)}deg)`)},[]),l=s.useCallback(()=>{o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)},[]),d=s.useCallback(()=>{const m=i.current;t?(m.x=ts(m.x,m.targetX,Uo.positionEase),m.y=ts(m.y,m.targetY,Uo.positionEase),m.rotation=ts(m.rotation,m.targetRotation,Uo.rotationEase)):(m.x=m.targetX,m.y=m.targetY,m.rotation=m.targetRotation),r();const g=Math.abs(m.x-m.targetX)<.4&&Math.abs(m.y-m.targetY)<.4,v=Math.abs(m.rotation-m.targetRotation)<.08;!g||!v?o.current=requestAnimationFrame(d):o.current=null},[r,t]),c=s.useCallback(()=>{o.current===null&&(o.current=requestAnimationFrame(d))},[d]),u=s.useCallback((m,g)=>{const v=i.current;v.targetX=m,v.targetY=g,v.targetRotation=0,v.x=m,v.y=g,v.rotation=0,v.lastX=m,v.hasLastX=!0,r(),t&&c()},[r,t,c]),p=s.useCallback((m,g)=>{if(!e)return;const v=i.current;if(t&&v.hasLastX){const b=m-v.lastX;v.targetRotation=Fv(b*Uo.rotationFactor,-20,Uo.maxRotation)}else v.targetRotation=0;if(v.lastX=m,v.hasLastX=!0,v.targetX=m,v.targetY=g,t){c();return}v.x=m,v.y=g,v.rotation=v.targetRotation,r()},[e,r,t,c]),x=s.useCallback(m=>{l(),i.current.hasLastX=!1,m==null||m()},[l]),y=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||y(),l),[e,y,l]),{anchorRef:n,onShow:u,onCursorMove:p,exit:x,reset:y}}function Hv(e){return`
9945
+ `,Sv="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),_i={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 wv(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")]={..._i.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSize")]={..._i.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[bt(e,"lineHeight")]={..._i.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[bt(e,"letterSpacing")]={..._i.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[bt(e,"wordSpacing")]={..._i.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[bt(e,"textAlign")]={..._i.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[bt(e,"textAppearance")]={..._i.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const ko=Li.filter(e=>e!=="count"),$v=ko.reduce((e,t)=>({...e,...wv(t)}),{}),Cv=ko.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 Qa(e){return ko.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 Tv={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(ko.map(e=>[Ll[e],Pl(e)]))},Lv={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},Pv=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...Lv,gallery:[{media:[{url:`https://cdn.cntrl.site/component-assets/hive_${t}.jpg`,name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]});return e})(),Iv={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",max:1,display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:Pv},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"}},...$v},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:Sv,closeIconColor:"#000000",closeIconHoverColor:"#999999",...Cv},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,...Qa({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,...Qa({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,...Qa({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:[Tv]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},Rv={element:xv,id:"hive",name:"Catalogue",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/hive.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...ko.map(e=>({path:`${bt(e,"fontFamily")}`}))]},fontRelations:{...ko.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${bt(t,"fontFamily")}`}),{})},schema:Iv,sourceCode:bv};function kv(e){if(e.type==="video")return!0;if(e.type==="image")return!1;const t=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function Ev({media:e,className:t,style:n}){const i=s.useRef(null);return s.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const r=o.play();r&&r.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?a.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:t,src:e.url,alt:"",style:n})}function es(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Mv(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 $c(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 Cc(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 Av(e,t,n){const i=F.scalingValue(t,n),o=F.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Tc=10,Lc=10,Uo={positionEase:.14,rotationEase:.09,rotationFactor:2.5,maxRotation:20};function Fv(e,t,n){return Math.max(t,Math.min(n,e))}function ts(e,t,n){return e+(t-e)*n}function Nv(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+Tc,y:n.clientY+Tc};switch(e){case"left":return{x:o.left+Lc+i/2,y:r};case"center":return{x:o.left+o.width/2,y:r};case"right":return{x:o.right-Lc-i/2,y:r};default:return{x:o.left+o.width/2,y:r}}}function _v(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,g=i.current;m&&(m.style.transform=`translate3d(${g.x}px, ${g.y}px, 0) translate(-50%, -50%) rotate(${g.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=ts(m.x,m.targetX,Uo.positionEase),m.y=ts(m.y,m.targetY,Uo.positionEase),m.rotation=ts(m.rotation,m.targetRotation,Uo.rotationEase)):(m.x=m.targetX,m.y=m.targetY,m.rotation=m.targetRotation),r();const g=Math.abs(m.x-m.targetX)<.4&&Math.abs(m.y-m.targetY)<.4,x=Math.abs(m.rotation-m.targetRotation)<.08;!g||!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,g)=>{const x=i.current;x.targetX=m,x.targetY=g,x.targetRotation=0,x.x=m,x.y=g,x.rotation=0,x.lastX=m,x.hasLastX=!0,r(),t&&d()},[r,t,d]),p=s.useCallback((m,g)=>{if(!e)return;const x=i.current;if(t&&x.hasLastX){const b=m-x.lastX;x.targetRotation=Fv(b*Uo.rotationFactor,-20,Uo.maxRotation)}else x.targetRotation=0;if(x.lastX=m,x.hasLastX=!0,x.targetX=m,x.targetY=g,t){d();return}x.x=m,x.y=g,x.rotation=x.targetRotation,r()},[e,r,t,d]),y=s.useCallback(m=>{l(),i.current.hasLastX=!1,m==null||m()},[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 Hv(e){return`
9946
9946
  .${e}-wrapper {
9947
9947
  display: grid;
9948
9948
  align-items: start;
@@ -9953,10 +9953,10 @@ export function Hive({
9953
9953
  }
9954
9954
 
9955
9955
  .${e}-hover-media-anchor {
9956
- position: absolute;
9956
+ position: fixed;
9957
9957
  left: 0;
9958
9958
  top: 0;
9959
- z-index: 10;
9959
+ z-index: 9997;
9960
9960
  pointer-events: none;
9961
9961
  will-change: transform;
9962
9962
  transform-origin: center center;
@@ -10318,7 +10318,8 @@ a.${e}-list-item {
10318
10318
  overflow-wrap: anywhere;
10319
10319
  word-break: break-word;
10320
10320
  }
10321
- `}const Pi=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],kl=["AColumn","BColumn","CColumn","DColumn","EColumn"],oi="cutLabel",fr=[...kl,oi],Na=["A","B","C","D","E"];function Ou(e){return`${e}ColumnVerticalAlign`}const Os=["Top","Center","Bottom"];function El(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Na.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Wv(e){const t=El(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Ov(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Na.includes(n)?n:null}function Du(e,t,n){const i=Ov(e);return i?i===t?!1:Wv(n[Ou(i)]):!0}function yr(e){const t=El(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Na.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Dv(e,t,n){if(zu(e,t,n))return yr(e);const i=yr(e);return i.kind==="baseline"?{kind:"top"}:i}function zv(e){const t=yr(e);return t.kind==="baseline"?{kind:"top"}:t}function zu(e,t,n){return Du(e,n,t)?yr(e).kind==="baseline":!1}function Bv(e){const t={};let n=!1;for(const i of Na){const o=Ou(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}Du(r,i,e)||(t[o]="Top",n=!0)}return n?t:null}function jv(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Vv(e){const t=yr(e).kind;return t==="baseline"?"center":t}function Gv(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function Pc(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Xv(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 ns(e,t,n,i){const o=e.titleEl;if(!o)return 0;const r=o.closest(`.${n}`);if(!r)return 0;const l=Xv(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+l;const d=r.getBoundingClientRect(),c=o.getBoundingClientRect().height;let u=0;return e.kind==="center"?u=(d.height-c)/2:e.kind==="bottom"&&(u=d.height-c),d.top-t+u+l}function qv(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 Uv(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Kv={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Gt(e,t){return`${e}${t.replace(/^text/,"Text")}`}const Yv={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Zv(e){return[Gt(e,"textFontFamily"),Gt(e,"textFontSettings"),{type:"row",items:[Gt(e,"textFontSize"),Gt(e,"textLineHeight"),Gt(e,"textLetterSpacing"),Gt(e,"textWordSpacing")]},Gt(e,"textTextAlign"),Gt(e,"textTextAppearance"),`${e}VerticalAlign`]}function Jv(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(fr.map(e=>[Yv[e],Zv(e)]))}}function fa(e,t){const n=i=>{const o=Gt(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===oi?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function Ic(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 cn(Qt(n,t))}function Rc(e,t,n,i){const o=fa(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<r?`${n} ${i}`:n}function kc(e,t,n,i){const o=fa(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=r?{}:{[`--${n}-title-leading-gap`]:_.scalingValue((r-l)/2,i)}}const Ln=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Eo=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],Mo=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Ao=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],Qv={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},e0=["hover","focus","filled","success","error"],Ec=.004,po=.004,is=po,Ml=50,vr=1440,xr=Ml/vr;function Bu(e){const t=typeof e=="number"&&e>0?e:vr;return Ml/t}function t0(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 vr}const ju={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function ar(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function n0(e,t=1){const n=t/e;return Object.fromEntries(Ln.map(i=>[i,n]))}function i0(){return Object.fromEntries([...Eo.map(e=>[e,0]),...Mo.map(e=>[e,0])])}function o0(){return Object.fromEntries(Ao.map(e=>[e,0]))}function Or(e){return Object.fromEntries(Ln.map(t=>[t,typeof e[t]=="number"?e[t]:ju[t]]))}function Vu(e,t,n){const i=e-xr,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 sa(e,t,n){const i=Al(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((r,l)=>r+l,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function r0(e,t,n){const i={};for(let o=0;o<e;o+=1){const r=Eo[o],l=Mo[o],d=typeof n[r]=="number"?n[r]:0,c=typeof n[l]=="number"?n[l]:0,u=Vu(t[o]??0,d,c);u.paddingLeft!==d&&(i[r]=u.paddingLeft),u.paddingRight!==c&&(i[l]=u.paddingRight)}return i}function Al(e,t,n){if(e<=0)return[];const i=Ln.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)+xr;if(t>=l)return i;const d=[...o];let c=l-t;for(let u=d.length-1;u>=0&&c>0;u-=1){const p=d[u]-xr;if(p<=0)continue;const x=Math.min(c,p);d[u]-=x,c-=x}return[...d,i[e-1]]}function a0(e,t,n){if(e<=1)return{};const i=Al(e,t,n),o={};for(let r=0;r<e-1;r+=1){const l=Ln[r];i[r]!==n[l]&&(o[l]=i[r])}return o}function Mc(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Pi]}function s0(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function l0(e,t,n,i){const o=Math.min(i,e.length,Ln.length),r={};for(let l=0;l<o;l+=1){const d=e[l],c=t.indexOf(d);if(c===-1)continue;const u=Ln[c],p=Eo[c],x=Mo[c],y=Ao[c],m=Ln[l],g=Eo[l],v=Mo[l],b=Ao[l],E=n[u],f=n[p],w=n[x],G=n[y];typeof E=="number"&&(r[m]=E),typeof f=="number"&&(r[g]=f),typeof w=="number"&&(r[v]=w),typeof G=="number"&&(r[b]=G)}return r}function Gu(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 c0(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=ar(e),r=e.type==="b"||e.type===void 0&&t.type==="b",l={...e,...n0(n,o),...i0()};if(r)for(const d of Ao)typeof t[d]=="number"&&(l[d]=t[d]);else Object.assign(l,o0());return Gu(e,l)?l:e}function d0(e,t,n){const i=Bv(e);i&&(e={...e,...i});const o=Bu(n==null?void 0:n.designWidth),r=e.columns,l=t.columns,d=ar(e),c=ar(t),u=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof r=="number"?r:typeof l=="number"?l:Pi.length,x=w=>{if(u)return w;const G=Or({...t,...w}),X=ar(w),M=sa(p,X,G),T=r0(p,M,{...t,...w});return Object.keys(T).length===0?w:{...w,...T}};if(typeof r=="number"&&r!==l)return e;const y=Mc(e),m=Mc(t);if(!s0(y,m))return x({...e,...l0(y,m,t,p)});if(d<c&&typeof p=="number"&&!u){const w=Or({...t,...e});return x({...e,...a0(p,d,w)})}if(u){const w=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,G=Math.max(0,(d-o)/2);return w>G?{...e,textPaddingLR:G}:e}const g=Or({...t,...e}),v=sa(p,c,Or(t)),E=sa(p,d,g).some((w,G)=>w<(v[G]??w)),f=Ln.some(w=>{const G=e[w],X=t[w];return typeof G=="number"&&typeof X=="number"&&G!==X});return E||f?x(e):e}function u0(e,t,n,i){const o=t.slice(0,e).reduce((l,d)=>l+d,0),r=n.slice(e+1,t.length-1).reduce((l,d)=>l+d,0);return Math.max(xr,i-o-r-xr)}function p0(e,t){return Math.random()*(t-e)+e}function m0(e){return Object.fromEntries(Ln.map(t=>[t,typeof e[t]=="number"?e[t]:ju[t]]))}function os(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function g0(e,t,n,i,o,r){return e.slice(0,t).map((l,d)=>{const c=Eo[d],u=Mo[d],p=Ao[d];return{key:l,textPrefix:Kv[l],widthKey:Ln[d],width:n[Ln[d]],paddingLeftKey:c,paddingRightKey:u,paddingBottomKey:p,paddingLeft:i[c],paddingRight:o[u],paddingBottom:r[p]}})}function h0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r,layoutId:l,onUpdateSettings:d}){const{prefix:c}=_.useScopedStyles(),u=!!o,{columns:p,type:x,wrapperWidth:y,entriesCount:m,cellMinHeight:g,dividerWidth:v,showVisibility:b,cut:E,showCut:f,cutCellMinHeight:w,cutLabel:G,imageSize:X,imageOnHover:M,imagePosition:T="cursor",imageInterpolation:N="on",entryHoverEffect:q,entryHoverShowOption:$,rowPaddingTop:I,rowPaddingBottom:W,rowPaddingTopB:O,columnsOrder:C,textPaddingLR:L,textColor:z,backgroundColor:S,dividerColor:K,textHoverColor:k,backgroundHoverColor:H,dividerHoverColor:j}=e,[ne,oe]=s.useState(void 0),[R,ce]=s.useState(null),D=s.useRef(null),le=M==="on"&&(!n||i),ie=T==="cursor",we=ie&&N==="on",{anchorRef:Ie,onShow:xe,onCursorMove:pe,exit:Y}=_v(!!(le&&R!==null),we),ae=(E??0)>0,se=x==="b",Re=s.useRef(null),$e=s.useRef(null),[Me,ve]=s.useState(null),[be,Ce]=s.useState(vr),h=Bu(be),U=Math.max(0,((y??0)-h)/2),Z=Math.min(L??0,U),te=Math.max(Z,po),me=((y??0)+h)/2;s.useLayoutEffect(()=>{if(!n){Ce(vr);return}const Te=()=>{Ce(t0(Re.current))};Te();const Ve=Re.current;if(!Ve)return;const st=new ResizeObserver(Te);st.observe(Ve);let lt=Ve;for(;lt&&!lt.style.getPropertyValue("--cntrl-article-width");)lt=lt.parentElement;return lt&&st.observe(lt),()=>st.disconnect()},[n,l]),s.useEffect(()=>{oe(void 0)},[E,f,t,m]),s.useEffect(()=>{n&&!i&&oe(void 0)},[n,i]);const B=_.buildColorVars(c,{textColor:z,backgroundColor:S,dividerColor:K,textHoverColor:k,backgroundHoverColor:H,dividerHoverColor:j},Qv,e0),P=r&&r!=="default"?`${c}-state-${r}`:"",ee=`${!n||i?q==="default"?`${c}-entry-hover-default`:q==="blinds"?`${c}-entry-hover-blinds`:q==="reveal"?`${c}-entry-hover-reveal`:"":""} ${P}`.trim(),de=q==="reveal"&&(!n||i),V=(b==null?void 0:b[0])??!1,Pe=(b==null?void 0:b[1])??!1,he=s.useRef(e),J=s.useRef(l);s.useEffect(()=>{if(!d||!n){he.current=e,J.current=l;return}if(J.current!==l){he.current=e,J.current=l;return}const Te=he.current;if(!(Te!==e))return;if(typeof Te.columns=="number"&&typeof e.columns=="number"&&Te.columns!==e.columns){he.current=e;return}const st=d0(e,Te,{designWidth:be});he.current=e,Gu(e,st)&&d(st)},[e,d,n,l,be]);const Ne=s.useMemo(()=>m0(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),Be=s.useMemo(()=>os(e,Eo),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),at=s.useMemo(()=>os(e,Mo),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Ue=s.useMemo(()=>os(e,Ao),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),nt=s.useMemo(()=>Array.isArray(C)&&C.length>0?C:[...Pi],[C]),Ze=s.useMemo(()=>g0(nt,p,Ne,Be,at,Ue),[nt,p,Ne,Be,at,Ue]),Xe=ar(e),fe=s.useMemo(()=>Ln.slice(0,p).map(Te=>Ne[Te]),[p,Ne]),He=s.useMemo(()=>Al(p,Xe,Ne),[p,Xe,Ne]),We=s.useMemo(()=>sa(p,Xe,Ne),[p,Xe,Ne]),Qe=s.useMemo(()=>Ze.map((Te,Ve)=>Vu(We[Ve]??0,Te.paddingLeft,Te.paddingRight)),[Ze,We]),ye=s.useMemo(()=>{const Te=m===0?1/0:m;return(t??[]).slice(0,Te).map((st,lt)=>({id:lt,cells:Object.fromEntries(Pi.map(bt=>[bt,st[bt]??""])),image:st.image,link:st.link}))},[t,m]),_e=ae?ne??E:ye.length,Ge=s.useMemo(()=>ae?ye.slice(0,_e):ye,[ye,ae,_e]),et=ae&&_e<ye.length,mt=Ge.length>1||et,rt=[V?`${c}-divider-top`:"",Pe||mt?`${c}-divider-bottom`:""].filter(Boolean).join(" "),Oe=!n||i,Fe=()=>{if(!Oe)return;const Te=ne??E;if(!f){oe(ye.length);return}oe(Math.min(Te+f,ye.length))},Ke=Te=>_.scalingValue(Te,n??!1),it=se?O??0:I??0,De=W??0,qe=g??0,ut=Math.max(De,is),ge=Cc(0,Ge.length,V,Pe,et,v??0,n??!1).borderTopWidth,ke=se?"rowPaddingTopB":"rowPaddingTop",ot=Ze[0],gt=Ze[Ze.length-1],je=Qe[0],vt=Qe[Qe.length-1],It=ot&&je?Math.max(je.paddingLeft,po):0,kt=gt&&vt?Math.max(vt.paddingRight,po):0,wt=Xe,Dt=(Te,Ve)=>Nv(T,Re.current,ie?Te:null,Ve),Bt=(Te,Ve)=>{if(!le)return;const st=Te.image;if(!(st!=null&&st.url)){Y(()=>ce(null));return}const lt=(X==null?void 0:X.min)??80,bt=(X==null?void 0:X.max)??320,Tt=(R==null?void 0:R.rowId)===Te.id,tt=Tt?R.widthPx:p0(lt,bt),{x:Rt,y:Mt}=Dt(Ve,tt);if(Tt&&ie){pe(Rt,Mt);return}ce({rowId:Te.id,url:st.url,objectFit:"contain",isVideo:kv(st),widthPx:tt}),D.current={x:Rt,y:Mt}},Xt=Te=>{if(!le||!R||!ie)return;const{x:Ve,y:st}=Dt(Te,R.widthPx);pe(Ve,st)},qt=()=>{R&&Y(()=>ce(null))},Lt=Te=>{de&&wc(Te,c),!(!le||!R)&&Y(()=>ce(null))},Ot=Te=>{de&&$c(Te,c)};s.useLayoutEffect(()=>{if(!R||!D.current)return;const{x:Te,y:Ve}=D.current;D.current=null,xe(Te,Ve)},[R==null?void 0:R.rowId,R==null?void 0:R.url,xe]),s.useLayoutEffect(()=>{if(!u||se){ve(null);return}const Te=$e.current,Ve=Te==null?void 0:Te.parentElement;if(!Te||!Ve){ve(null);return}const st=()=>{const bt=Te.querySelector("[data-list-row]");if(!bt){ve(null);return}const Tt=Ve.getBoundingClientRect(),tt=bt.getBoundingClientRect();ve(tt.top-Tt.top+tt.height/2)};st();const lt=new ResizeObserver(st);return lt.observe(Te),lt.observe(Ve),()=>lt.disconnect()},[u,se,Ge,it,De,qe,t,e,Ze,We,be,v,V,Pe,et]);const nn=s.useMemo(()=>!se&&kl.some(Te=>{const Ve=Te.charAt(0),st=e[`${Te}VerticalAlign`];return zu(st,e,Ve)}),[se,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);s.useLayoutEffect(()=>{var Rt;const Te=Re.current;if(!Te)return;const Ve=()=>{Te.querySelectorAll("[data-list-col]").forEach(Mt=>{Mt.style.transform="";const At=Mt.querySelector(`.${c}-list-col`);At&&(At.style.minHeight="",At.style.height="");const jt=Mt.querySelector(`.${c}-list-col-title`);jt&&(jt.style.transform="")})};if(se||!nn){Ve();return}const st=()=>{const Mt=Array.from(Te.querySelectorAll("[data-list-row]")),At=`${c}-list-col`,jt=`${c}-baseline-probe`;Mt.forEach(Ut=>{Ut.querySelectorAll("[data-list-col]").forEach(Et=>{Et.style.transform="";const Nt=Et.querySelector(`.${At}`);Nt&&(Nt.style.minHeight="",Nt.style.height="");const _t=Et.querySelector(`.${c}-list-col-title`);_t&&(_t.style.transform="")})}),Mt.forEach(Ut=>{const Et=Array.from(Ut.querySelectorAll("[data-list-col]"));qv(Ut,Et,At)}),Te.offsetHeight,Mt.forEach(Ut=>{const Et=Array.from(Ut.querySelectorAll("[data-list-col]")),Nt=Ut.getBoundingClientRect().top,_t=new Map,ht=Et.map(Ae=>{const ze=Ae.querySelector(`.${c}-list-col-title`),pt={el:Ae,titleEl:ze,letter:Ae.getAttribute("data-col-letter")??"",kind:Ae.getAttribute("data-valign")??"top",anchor:Ae.getAttribute("data-valign-anchor")};return _t.set(pt.letter,pt),pt}),A=new Map,Le=(Ae,ze)=>{const pt=A.get(Ae.letter);if(pt!==void 0)return pt;const zt=Ae.anchor?_t.get(Ae.anchor):void 0;if(Ae.kind!=="baseline"||!zt||ze.has(Ae.letter)){const sn=ns(Ae,Nt,At,jt);return A.set(Ae.letter,sn),sn}ze.add(Ae.letter);const ft=Le(zt,ze);ze.delete(Ae.letter);const St=ns(Ae,Nt,At,jt),Kt=ft-St;Uv(Ae.titleEl,Kt);const Ht=ns(Ae,Nt,At,jt);return A.set(Ae.letter,Ht),Ht};ht.forEach(Ae=>Le(Ae,new Set))})};let lt=null;const bt=()=>{lt===null&&(lt=requestAnimationFrame(()=>{lt=null,st()}))};st();const Tt=new ResizeObserver(()=>bt());Tt.observe(Te);let tt=!1;return typeof document<"u"&&((Rt=document.fonts)!=null&&Rt.ready)&&document.fonts.ready.then(()=>{tt||bt()}),()=>{tt=!0,lt!==null&&(cancelAnimationFrame(lt),lt=null),Tt.disconnect(),Ve()}},[nn,se,e,t,be,Ge,We]);const xt=s.useMemo(()=>Hv(c),[c]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:xt}}),a.jsx("div",{style:B,children:a.jsxs("div",{ref:Re,className:`${c}-wrapper ${ee}${rt?` ${rt}`:""}${se?` ${c}-type-b`:""}`.trim(),style:{width:_.scalingValue(y??0,n)},onMouseMove:le?Xt:void 0,onMouseLeave:le?qt:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[Ge.map((Te,Ve)=>{var Tt;const st=(((Tt=Te.link)==null?void 0:Tt.length)??0)>0,lt=st&&(!n||i)?"a":"div",bt=Cc(Ve,Ge.length,V,Pe,et,v??0,n??!1);return a.jsxs(lt,{ref:Ve===0?tt=>{$e.current=tt}:void 0,className:`${c}-list-item${st||$==="always"?` ${c}-list-item-has-link`:""}${et&&Ve===Ge.length-1?` ${c}-list-item-before-cut`:""}`,...st?{href:Te.link,target:"_blank"}:{},style:bt,onMouseEnter:tt=>{de&&(st||$==="always")&&wc(tt,c),le&&Bt(Te,tt)},onMouseLeave:tt=>{de&&(st||$==="always")&&$c(tt,c)},children:[it>0&&a.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ke(it)}}),a.jsxs("div",{className:`${c}-list-cols-row${se?"":` ${c}-list-cols-row-h`}${u&&Ve===0&&se?` ${c}-list-cols-row-controls`:""}`,...se?{}:{"data-list-row":""},style:se?void 0:{minHeight:Ke(qe)},children:[Ze.map((tt,Rt)=>{const Mt=Rt===Ze.length-1,At=Qe[Rt],jt=tt.paddingBottom,Ut=Mv(Te.cells[tt.key]),Et=se&&Ut&&jt>0,Nt=se?{minHeight:Ke(qe)}:{width:Ke(We[Rt])},_t=se?{paddingLeft:Ke(Z),paddingRight:Ke(Z)}:{paddingLeft:Ke(At.paddingLeft),paddingRight:Ke(At.paddingRight)},ht=tt.textPrefix.charAt(0),A=se?zv(e[`${tt.textPrefix}VerticalAlign`]):Dv(e[`${tt.textPrefix}VerticalAlign`],e,ht),Le=se&&Ut&&u&&Ve===0;return se&&!Ut?null:a.jsxs("div",{className:se?`${c}-list-col-wrap`:void 0,...se?{}:{"data-list-col":"","data-col-letter":ht,"data-valign":A.kind,...A.kind==="baseline"?{"data-valign-anchor":A.anchorLetter}:{}},children:[a.jsx("div",{className:`${c}-list-col${Mt?` ${c}-list-col-last`:""}`,style:{..._t,...Nt,...se?{justifyContent:Pc(A.kind)}:{}},"data-test":tt.width,children:a.jsx("span",{className:Rc(e,tt.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{...Ic(fa(e,tt.textPrefix),n),...kc(e,tt.textPrefix,c,n),...se?{}:jv(A.kind)},children:Te.cells[tt.key]??null})}),Et&&a.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ke(jt)}}),Le&&a.jsx("div",{"data-controls":tt.paddingBottomKey,"data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Ke(Math.max(jt,is))}})]},tt.key)}),u&&Ve===0&&se&&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(me),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:0,width:Ke(te),height:"100%"}}),a.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(me),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:Ke(Math.max(te,Xe-te)),width:Ke(te),height:"100%"}})]})]}),!se&&De>0&&a.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ke(De)}}),u&&Ve===0&&!se&&a.jsx("div",{"data-controls":"rowPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${c}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Ke(ut)}})]},Te.id)}),u&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":ke,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":se?"center":"left-y",className:`${c}-control-anchor`,style:{top:ge,left:0,width:"100%",height:Ke(Math.max(it,is))}})},"row-padding-handles"),u&&!se&&ot&&gt&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":ot.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(We[0]-((je==null?void 0:je.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Me??void 0,className:`${c}-control-anchor`,style:{top:0,left:0,width:Ke(It),height:"100%"}}),a.jsx("div",{"data-controls":gt.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(We[Ze.length-1]-((vt==null?void 0:vt.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Me??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ke(wt-kt),width:Ke(kt),height:"100%"}})]},"column-edge-padding-handles"),u&&!se&&Ze.slice(0,-1).map((Te,Ve)=>{const st=Ze[Ve+1],lt=He.slice(0,Ve+1).reduce((Mt,At)=>Mt+At,0),bt=Qe[Ve],Tt=Qe[Ve+1],tt=Math.max(bt.paddingRight,po),Rt=Math.max(Tt.paddingLeft,po);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":Te.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(We[Ve]-bt.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Me??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ke(lt-tt),width:Ke(tt),height:"100%"}}),a.jsx("div",{"data-controls":st.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(We[Ve+1]-Tt.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Me??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ke(lt),width:Ke(Rt),height:"100%"}})]},`${Te.paddingRightKey}-padding`)}),u&&!se&&Ze.slice(0,-1).map((Te,Ve)=>{const st=u0(Ve,He,fe,Xe),bt=He.slice(0,Ve+1).reduce((Tt,tt)=>Tt+tt,0)-Ec/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-min":String(Ml),"data-controls-max-fraction":String(st),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Ke(bt),width:Ke(Ec),height:"calc(100%)",pointerEvents:"auto"}})},`${Te.widthKey}-junction`)})]}),et&&(()=>{const Te=fa(e,oi),Ve=Vv(e.cutLabelVerticalAlign),st=Te.textTextAlign==="justify"||se;return a.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:Ke(w??0),cursor:Oe?"pointer":"default",...Av(Pe,v??0,n??!1)},onClick:Oe?Fe:void 0,onMouseEnter:de||le?Lt:void 0,onMouseLeave:de?Ot:void 0,children:a.jsx("div",{className:`${c}-list-cols-row`,style:{...se?{paddingLeft:Ke(Z),paddingRight:Ke(Z)}:{},justifyContent:Gv(Te.textTextAlign),alignItems:Pc(Ve)},children:a.jsx("span",{className:Rc(e,oi,`${c}-cut-label`,`${c}-text-tight-leading`),style:{...Ic(Te,n),...kc(e,oi,c,n),...st?{width:"100%"}:{}},children:G})})})})(),le&&R&&(()=>{const Te=`${R.widthPx}px`,Ve={width:Te,height:"auto",maxHeight:Te,objectFit:"contain"};return a.jsx("div",{ref:Ie,className:`${c}-hover-media-anchor`,children:a.jsx(Ev,{media:R,className:R.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:Ve},`${R.rowId}-${R.url}`)})})()]})})]})}const f0=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
10321
+ `}const Pi=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],kl=["AColumn","BColumn","CColumn","DColumn","EColumn"],ri="cutLabel",fr=[...kl,ri],Na=["A","B","C","D","E"];function Ou(e){return`${e}ColumnVerticalAlign`}const Os=["Top","Center","Bottom"];function El(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Na.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Wv(e){const t=El(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Ov(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Na.includes(n)?n:null}function Du(e,t,n){const i=Ov(e);return i?i===t?!1:Wv(n[Ou(i)]):!0}function yr(e){const t=El(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Na.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Dv(e,t,n){if(zu(e,t,n))return yr(e);const i=yr(e);return i.kind==="baseline"?{kind:"top"}:i}function zv(e){const t=yr(e);return t.kind==="baseline"?{kind:"top"}:t}function zu(e,t,n){return Du(e,n,t)?yr(e).kind==="baseline":!1}function Bv(e){const t={};let n=!1;for(const i of Na){const o=Ou(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}Du(r,i,e)||(t[o]="Top",n=!0)}return n?t:null}function jv(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Vv(e){const t=yr(e).kind;return t==="baseline"?"center":t}function Gv(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function Pc(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Xv(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 ns(e,t,n,i){const o=e.titleEl;if(!o)return 0;const r=o.closest(`.${n}`);if(!r)return 0;const l=Xv(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 qv(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 Uv(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Kv={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Gt(e,t){return`${e}${t.replace(/^text/,"Text")}`}const Yv={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Zv(e){return[Gt(e,"textFontFamily"),Gt(e,"textFontSettings"),{type:"row",items:[Gt(e,"textFontSize"),Gt(e,"textLineHeight"),Gt(e,"textLetterSpacing"),Gt(e,"textWordSpacing")]},Gt(e,"textTextAlign"),Gt(e,"textTextAppearance"),`${e}VerticalAlign`]}function Jv(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(fr.map(e=>[Yv[e],Zv(e)]))}}function fa(e,t){const n=i=>{const o=Gt(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===ri?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function Ic(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 dn(Qt(n,t))}function Rc(e,t,n,i){const o=fa(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<r?`${n} ${i}`:n}function kc(e,t,n,i){const o=fa(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 Ln=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Eo=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],Mo=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Ao=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],Qv={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},e0=["hover","focus","filled","success","error"],Ec=.004,po=.004,is=po,Ml=50,vr=1440,xr=Ml/vr;function Bu(e){const t=typeof e=="number"&&e>0?e:vr;return Ml/t}function t0(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 vr}const ju={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function ar(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function n0(e,t=1){const n=t/e;return Object.fromEntries(Ln.map(i=>[i,n]))}function i0(){return Object.fromEntries([...Eo.map(e=>[e,0]),...Mo.map(e=>[e,0])])}function o0(){return Object.fromEntries(Ao.map(e=>[e,0]))}function Or(e){return Object.fromEntries(Ln.map(t=>[t,typeof e[t]=="number"?e[t]:ju[t]]))}function Vu(e,t,n){const i=e-xr,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 sa(e,t,n){const i=Al(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((r,l)=>r+l,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function r0(e,t,n){const i={};for(let o=0;o<e;o+=1){const r=Eo[o],l=Mo[o],c=typeof n[r]=="number"?n[r]:0,d=typeof n[l]=="number"?n[l]:0,u=Vu(t[o]??0,c,d);u.paddingLeft!==c&&(i[r]=u.paddingLeft),u.paddingRight!==d&&(i[l]=u.paddingRight)}return i}function Al(e,t,n){if(e<=0)return[];const i=Ln.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)+xr;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]-xr;if(p<=0)continue;const y=Math.min(d,p);c[u]-=y,d-=y}return[...c,i[e-1]]}function a0(e,t,n){if(e<=1)return{};const i=Al(e,t,n),o={};for(let r=0;r<e-1;r+=1){const l=Ln[r];i[r]!==n[l]&&(o[l]=i[r])}return o}function Mc(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Pi]}function s0(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function l0(e,t,n,i){const o=Math.min(i,e.length,Ln.length),r={};for(let l=0;l<o;l+=1){const c=e[l],d=t.indexOf(c);if(d===-1)continue;const u=Ln[d],p=Eo[d],y=Mo[d],v=Ao[d],m=Ln[l],g=Eo[l],x=Mo[l],b=Ao[l],E=n[u],f=n[p],w=n[y],G=n[v];typeof E=="number"&&(r[m]=E),typeof f=="number"&&(r[g]=f),typeof w=="number"&&(r[x]=w),typeof G=="number"&&(r[b]=G)}return r}function Gu(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 c0(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=ar(e),r=e.type==="b"||e.type===void 0&&t.type==="b",l={...e,...n0(n,o),...i0()};if(r)for(const c of Ao)typeof t[c]=="number"&&(l[c]=t[c]);else Object.assign(l,o0());return Gu(e,l)?l:e}function d0(e,t,n){const i=Bv(e);i&&(e={...e,...i});const o=Bu(n==null?void 0:n.designWidth),r=e.columns,l=t.columns,c=ar(e),d=ar(t),u=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof r=="number"?r:typeof l=="number"?l:Pi.length,y=w=>{if(u)return w;const G=Or({...t,...w}),X=ar(w),k=sa(p,X,G),L=r0(p,k,{...t,...w});return Object.keys(L).length===0?w:{...w,...L}};if(typeof r=="number"&&r!==l)return e;const v=Mc(e),m=Mc(t);if(!s0(v,m))return y({...e,...l0(v,m,t,p)});if(c<d&&typeof p=="number"&&!u){const w=Or({...t,...e});return y({...e,...a0(p,c,w)})}if(u){const w=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,G=Math.max(0,(c-o)/2);return w>G?{...e,textPaddingLR:G}:e}const g=Or({...t,...e}),x=sa(p,d,Or(t)),E=sa(p,c,g).some((w,G)=>w<(x[G]??w)),f=Ln.some(w=>{const G=e[w],X=t[w];return typeof G=="number"&&typeof X=="number"&&G!==X});return E||f?y(e):e}function u0(e,t,n,i){const o=t.slice(0,e).reduce((l,c)=>l+c,0),r=n.slice(e+1,t.length-1).reduce((l,c)=>l+c,0);return Math.max(xr,i-o-r-xr)}function p0(e,t){return Math.random()*(t-e)+e}function m0(e){return Object.fromEntries(Ln.map(t=>[t,typeof e[t]=="number"?e[t]:ju[t]]))}function os(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function g0(e,t,n,i,o,r){return e.slice(0,t).map((l,c)=>{const d=Eo[c],u=Mo[c],p=Ao[c];return{key:l,textPrefix:Kv[l],widthKey:Ln[c],width:n[Ln[c]],paddingLeftKey:d,paddingRightKey:u,paddingBottomKey:p,paddingLeft:i[d],paddingRight:o[u],paddingBottom:r[p]}})}function h0({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:m,entriesCount:g,cellMinHeight:x,dividerWidth:b,showVisibility:E,cut:f,showCut:w,cutCellMinHeight:G,cutLabel:X,imageSize:k,imageOnHover:L,imagePosition:A="cursor",imageInterpolation:U="on",entryHoverEffect:$,entryHoverShowOption:P,rowPaddingTop:H,rowPaddingBottom:W,rowPaddingTopB:C,columnsOrder:T,textPaddingLR:B,textColor:S,backgroundColor:K,dividerColor:R,textHoverColor:_,backgroundHoverColor:j,dividerHoverColor:oe}=e,[re,O]=s.useState(void 0),[ie,D]=s.useState(null),le=s.useRef(null),ee=L==="on"&&(!n||i),ve=A==="cursor",Ie=ve&&U==="on",{anchorRef:be,onShow:pe,onCursorMove:Y,exit:se}=_v(!!(ee&&ie!==null),Ie),xe=(f??0)>0,Se=v==="b",Ce=s.useRef(null),Ae=s.useRef(null),[fe,we]=s.useState(null),[Te,h]=s.useState(vr),q=Bu(Te),Z=Math.max(0,((m??0)-q)/2),te=Math.min(B??0,Z),ue=Math.max(te,po),z=((m??0)+q)/2;s.useLayoutEffect(()=>{if(!n){h(vr);return}const Ee=()=>{h(t0(Ce.current))};Ee();const et=Ce.current;if(!et)return;const Je=new ResizeObserver(Ee);Je.observe(et);let dt=et;for(;dt&&!dt.style.getPropertyValue("--cntrl-article-width");)dt=dt.parentElement;return dt&&Je.observe(dt),()=>Je.disconnect()},[n,l]),s.useEffect(()=>{O(void 0)},[f,w,t,g]),s.useEffect(()=>{n&&!i&&O(void 0)},[n,i]);const I=F.buildColorVars(u,{textColor:S,backgroundColor:K,dividerColor:R,textHoverColor:_,backgroundHoverColor:j,dividerHoverColor:oe},Qv,e0),Q=r&&r!=="default"?`${u}-state-${r}`:"",de=`${!n||i?$==="default"?`${u}-entry-hover-default`:$==="blinds"?`${u}-entry-hover-blinds`:$==="reveal"?`${u}-entry-hover-reveal`:"":""} ${Q}`.trim(),V=$==="reveal"&&(!n||i),Pe=(E==null?void 0:E[0])??!1,he=(E==null?void 0:E[1])??!1,J=s.useRef(e),He=s.useRef(l);s.useEffect(()=>{if(!d||!n){J.current=e,He.current=l;return}if(He.current!==l){J.current=e,He.current=l;return}const Ee=J.current;if(!(Ee!==e))return;if(typeof Ee.columns=="number"&&typeof e.columns=="number"&&Ee.columns!==e.columns){J.current=e;return}const Je=d0(e,Ee,{designWidth:Te});J.current=e,Gu(e,Je)&&d(Je)},[e,d,n,l,Te]);const We=s.useMemo(()=>m0(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ot=s.useMemo(()=>os(e,Eo),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),qe=s.useMemo(()=>os(e,Mo),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),nt=s.useMemo(()=>os(e,Ao),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),tt=s.useMemo(()=>Array.isArray(T)&&T.length>0?T:[...Pi],[T]),Ve=s.useMemo(()=>g0(tt,y,We,ot,qe,nt),[tt,y,We,ot,qe,nt]),ge=ar(e),_e=s.useMemo(()=>Ln.slice(0,y).map(Ee=>We[Ee]),[y,We]),je=s.useMemo(()=>Al(y,ge,We),[y,ge,We]),Ze=s.useMemo(()=>sa(y,ge,We),[y,ge,We]),ye=s.useMemo(()=>Ve.map((Ee,et)=>Vu(Ze[et]??0,Ee.paddingLeft,Ee.paddingRight)),[Ve,Ze]),Ne=s.useMemo(()=>{const Ee=g===0?1/0:g;return(t??[]).slice(0,Ee).map((Je,dt)=>({id:dt,cells:Object.fromEntries(Pi.map(Tt=>[Tt,Je[Tt]??""])),image:Je.image,link:Je.link}))},[t,g]),Ke=xe?re??f:Ne.length,Qe=s.useMemo(()=>xe?Ne.slice(0,Ke):Ne,[Ne,xe,Ke]),st=xe&&Ke<Ne.length,rt=Qe.length>1||st,De=[Pe?`${u}-divider-top`:"",he||rt?`${u}-divider-bottom`:""].filter(Boolean).join(" "),Me=!n||i,gt=()=>{if(!Me)return;const Ee=re??f;if(!w){O(Ne.length);return}O(Math.min(Ee+w,Ne.length))},ze=Ee=>F.scalingValue(Ee,n??!1),Oe=Se?C??0:H??0,Xe=W??0,lt=x??0,me=Math.max(Xe,is),Re=Cc(0,Qe.length,Pe,he,st,b??0,n??!1).borderTopWidth,it=Se?"rowPaddingTopB":"rowPaddingTop",ht=Ve[0],Ge=Ve[Ve.length-1],St=ye[0],Pt=ye[ye.length-1],kt=ht&&St?Math.max(St.paddingLeft,po):0,$t=Ge&&Pt?Math.max(Pt.paddingRight,po):0,jt=ge,Bt=(Ee,et)=>Nv(A,Ce.current,ve?Ee:null,et),Xt=(Ee,et)=>{if(!ee)return;const Je=Ee.image;if(!(Je!=null&&Je.url)){se(()=>D(null));return}const dt=(k==null?void 0:k.min)??80,Tt=(k==null?void 0:k.max)??320,vt=(ie==null?void 0:ie.rowId)===Ee.id,ut=vt?ie.widthPx:p0(dt,Tt),{x:_t,y:Mt}=Bt(et,ut);if(vt&&ve){Y(_t,Mt);return}D({rowId:Ee.id,url:Je.url,objectFit:"contain",isVideo:kv(Je),widthPx:ut}),le.current={x:_t,y:Mt}},qt=Ee=>{if(!ee||!ie||!ve)return;const{x:et,y:Je}=Bt(Ee,ie.widthPx);Y(et,Je)},It=()=>{ie&&se(()=>D(null))},Dt=Ee=>{V&&wc(Ee,u),!(!ee||!ie)&&se(()=>D(null))},on=Ee=>{V&&$c(Ee,u)};s.useLayoutEffect(()=>{if(!ie||!le.current)return;const{x:Ee,y:et}=le.current;le.current=null,pe(Ee,et)},[ie==null?void 0:ie.rowId,ie==null?void 0:ie.url,pe]),s.useLayoutEffect(()=>{if(!p||Se){we(null);return}const Ee=Ae.current,et=Ee==null?void 0:Ee.parentElement;if(!Ee||!et){we(null);return}const Je=()=>{const Tt=Ee.querySelector("[data-list-row]");if(!Tt){we(null);return}const vt=et.getBoundingClientRect(),ut=Tt.getBoundingClientRect();we(ut.top-vt.top+ut.height/2)};Je();const dt=new ResizeObserver(Je);return dt.observe(Ee),dt.observe(et),()=>dt.disconnect()},[p,Se,Qe,Oe,Xe,lt,t,e,Ve,Ze,Te,b,Pe,he,st]);const xt=s.useMemo(()=>!Se&&kl.some(Ee=>{const et=Ee.charAt(0),Je=e[`${Ee}VerticalAlign`];return zu(Je,e,et)}),[Se,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);s.useLayoutEffect(()=>{var _t;const Ee=Ce.current;if(!Ee)return;const et=()=>{Ee.querySelectorAll("[data-list-col]").forEach(Mt=>{Mt.style.transform="";const Ht=Mt.querySelector(`.${u}-list-col`);Ht&&(Ht.style.minHeight="",Ht.style.height="");const Ut=Mt.querySelector(`.${u}-list-col-title`);Ut&&(Ut.style.transform="")})};if(Se||!xt){et();return}const Je=()=>{const Mt=Array.from(Ee.querySelectorAll("[data-list-row]")),Ht=`${u}-list-col`,Ut=`${u}-baseline-probe`;Mt.forEach(Et=>{Et.querySelectorAll("[data-list-col]").forEach(Wt=>{Wt.style.transform="";const At=Wt.querySelector(`.${Ht}`);At&&(At.style.minHeight="",At.style.height="");const pt=Wt.querySelector(`.${u}-list-col-title`);pt&&(pt.style.transform="")})}),Mt.forEach(Et=>{const Wt=Array.from(Et.querySelectorAll("[data-list-col]"));qv(Et,Wt,Ht)}),Ee.offsetHeight,Mt.forEach(Et=>{const Wt=Array.from(Et.querySelectorAll("[data-list-col]")),At=Et.getBoundingClientRect().top,pt=new Map,N=Wt.map(Fe=>{const mt=Fe.querySelector(`.${u}-list-col-title`),Nt={el:Fe,titleEl:mt,letter:Fe.getAttribute("data-col-letter")??"",kind:Fe.getAttribute("data-valign")??"top",anchor:Fe.getAttribute("data-valign-anchor")};return pt.set(Nt.letter,Nt),Nt}),Le=new Map,Be=(Fe,mt)=>{const Nt=Le.get(Fe.letter);if(Nt!==void 0)return Nt;const yt=Fe.anchor?pt.get(Fe.anchor):void 0;if(Fe.kind!=="baseline"||!yt||mt.has(Fe.letter)){const ln=ns(Fe,At,Ht,Ut);return Le.set(Fe.letter,ln),ln}mt.add(Fe.letter);const wt=Be(yt,mt);mt.delete(Fe.letter);const Kt=ns(Fe,At,Ht,Ut),zt=wt-Kt;Uv(Fe.titleEl,zt);const sn=ns(Fe,At,Ht,Ut);return Le.set(Fe.letter,sn),sn};N.forEach(Fe=>Be(Fe,new Set))})};let dt=null;const Tt=()=>{dt===null&&(dt=requestAnimationFrame(()=>{dt=null,Je()}))};Je();const vt=new ResizeObserver(()=>Tt());vt.observe(Ee);let ut=!1;return typeof document<"u"&&((_t=document.fonts)!=null&&_t.ready)&&document.fonts.ready.then(()=>{ut||Tt()}),()=>{ut=!0,dt!==null&&(cancelAnimationFrame(dt),dt=null),vt.disconnect(),et()}},[xt,Se,e,t,Te,Qe,Ze]);const ft=s.useMemo(()=>Hv(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ft}}),a.jsx("div",{style:I,children:a.jsxs("div",{ref:Ce,className:`${u}-wrapper ${de}${De?` ${De}`:""}${Se?` ${u}-type-b`:""}`.trim(),style:{width:F.scalingValue(m??0,n)},onMouseMove:ee?qt:void 0,onMouseLeave:ee?It:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[Qe.map((Ee,et)=>{var vt;const Je=(((vt=Ee.link)==null?void 0:vt.length)??0)>0,dt=Je&&(!n||i)?"a":"div",Tt=Cc(et,Qe.length,Pe,he,st,b??0,n??!1);return a.jsxs(dt,{ref:et===0?ut=>{Ae.current=ut}:void 0,className:`${u}-list-item${Je||P==="always"?` ${u}-list-item-has-link`:""}${st&&et===Qe.length-1?` ${u}-list-item-before-cut`:""}`,...Je?{href:Ee.link,target:"_blank"}:{},style:Tt,onMouseEnter:ut=>{V&&(Je||P==="always")&&wc(ut,u),ee&&Xt(Ee,ut)},onMouseLeave:ut=>{V&&(Je||P==="always")&&$c(ut,u)},children:[Oe>0&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:ze(Oe)}}),a.jsxs("div",{className:`${u}-list-cols-row${Se?"":` ${u}-list-cols-row-h`}${p&&et===0&&Se?` ${u}-list-cols-row-controls`:""}`,...Se?{}:{"data-list-row":""},style:Se?void 0:{minHeight:ze(lt)},children:[Ve.map((ut,_t)=>{const Mt=_t===Ve.length-1,Ht=ye[_t],Ut=ut.paddingBottom,Et=Mv(Ee.cells[ut.key]),Wt=Se&&Et&&Ut>0,At=Se?{minHeight:ze(lt)}:{width:ze(Ze[_t])},pt=Se?{paddingLeft:ze(te),paddingRight:ze(te)}:{paddingLeft:ze(Ht.paddingLeft),paddingRight:ze(Ht.paddingRight)},N=ut.textPrefix.charAt(0),Le=Se?zv(e[`${ut.textPrefix}VerticalAlign`]):Dv(e[`${ut.textPrefix}VerticalAlign`],e,N),Be=Se&&Et&&p&&et===0;return Se&&!Et?null:a.jsxs("div",{className:Se?`${u}-list-col-wrap`:void 0,...Se?{}:{"data-list-col":"","data-col-letter":N,"data-valign":Le.kind,...Le.kind==="baseline"?{"data-valign-anchor":Le.anchorLetter}:{}},children:[a.jsx("div",{className:`${u}-list-col${Mt?` ${u}-list-col-last`:""}`,style:{...pt,...At,...Se?{justifyContent:Pc(Le.kind)}:{}},"data-test":ut.width,children:a.jsx("span",{className:Rc(e,ut.textPrefix,`${u}-list-col-title`,`${u}-text-tight-leading`),style:{...Ic(fa(e,ut.textPrefix),n),...kc(e,ut.textPrefix,u,n),...Se?{}:jv(Le.kind)},children:Ee.cells[ut.key]??null})}),Wt&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:ze(Ut)}}),Be&&a.jsx("div",{"data-controls":ut.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:ze(Math.max(Ut,is))}})]},ut.key)}),p&&et===0&&Se&&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(z),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{top:0,left:0,width:ze(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(z),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{top:0,left:ze(Math.max(ue,ge-ue)),width:ze(ue),height:"100%"}})]})]}),!Se&&Xe>0&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:ze(Xe)}}),p&&et===0&&!Se&&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:ze(me)}})]},Ee.id)}),p&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":it,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":Se?"center":"left-y",className:`${u}-control-anchor`,style:{top:Re,left:0,width:"100%",height:ze(Math.max(Oe,is))}})},"row-padding-handles"),p&&!Se&&ht&&Ge&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":ht.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ze[0]-((St==null?void 0:St.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":fe??void 0,className:`${u}-control-anchor`,style:{top:0,left:0,width:ze(kt),height:"100%"}}),a.jsx("div",{"data-controls":Ge.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ze[Ve.length-1]-((Pt==null?void 0:Pt.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":fe??void 0,className:`${u}-control-anchor`,style:{top:0,left:ze(jt-$t),width:ze($t),height:"100%"}})]},"column-edge-padding-handles"),p&&!Se&&Ve.slice(0,-1).map((Ee,et)=>{const Je=Ve[et+1],dt=je.slice(0,et+1).reduce((Mt,Ht)=>Mt+Ht,0),Tt=ye[et],vt=ye[et+1],ut=Math.max(Tt.paddingRight,po),_t=Math.max(vt.paddingLeft,po);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":Ee.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ze[et]-Tt.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":fe??void 0,className:`${u}-control-anchor`,style:{top:0,left:ze(dt-ut),width:ze(ut),height:"100%"}}),a.jsx("div",{"data-controls":Je.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ze[et+1]-vt.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":fe??void 0,className:`${u}-control-anchor`,style:{top:0,left:ze(dt),width:ze(_t),height:"100%"}})]},`${Ee.paddingRightKey}-padding`)}),p&&!Se&&Ve.slice(0,-1).map((Ee,et)=>{const Je=u0(et,je,_e,ge),Tt=je.slice(0,et+1).reduce((vt,ut)=>vt+ut,0)-Ec/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Ee.widthKey,"data-controls-axis":"x","data-controls-min":String(Ml),"data-controls-max-fraction":String(Je),"data-controls-variant":"column-width",className:`${u}-col-resize-handle`,style:{position:"absolute",top:"0px",left:ze(Tt),width:ze(Ec),height:"calc(100%)",pointerEvents:"auto"}})},`${Ee.widthKey}-junction`)})]}),st&&(()=>{const Ee=fa(e,ri),et=Vv(e.cutLabelVerticalAlign),Je=Ee.textTextAlign==="justify"||Se;return a.jsx("button",{type:"button",className:`${u}-cut-item`,style:{minHeight:ze(G??0),cursor:Me?"pointer":"default",...Av(he,b??0,n??!1)},onClick:Me?gt:void 0,onMouseEnter:V||ee?Dt:void 0,onMouseLeave:V?on:void 0,children:a.jsx("div",{className:`${u}-list-cols-row`,style:{...Se?{paddingLeft:ze(te),paddingRight:ze(te)}:{},justifyContent:Gv(Ee.textTextAlign),alignItems:Pc(et)},children:a.jsx("span",{className:Rc(e,ri,`${u}-cut-label`,`${u}-text-tight-leading`),style:{...Ic(Ee,n),...kc(e,ri,u,n),...Je?{width:"100%"}:{}},children:X})})})})(),ee&&ie&&typeof document<"u"&&(()=>{const Ee=`${ie.widthPx}px`,et={width:Ee,height:"auto",maxHeight:Ee,objectFit:"contain"},Je=(c?document.getElementById(c):null)??document.body;return Gn.createPortal(a.jsx("div",{ref:be,className:`${u}-hover-media-anchor`,"data-selection":"none",children:a.jsx(Ev,{media:ie,className:ie.isVideo?`${u}-hover-video`:`${u}-hover-image`,style:et},`${ie.rowId}-${ie.url}`)}),Je)})()]})})]})}const f0=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
10322
+ import { createPortal } from 'react-dom';
10322
10323
  import { CommonComponentProps } from '../props';
10323
10324
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
10324
10325
  import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
@@ -10542,6 +10543,7 @@ type ListProps = {
10542
10543
  isPreviewMode?: boolean;
10543
10544
  isEditMode?: boolean;
10544
10545
  activeEvent: string | undefined;
10546
+ portalId?: string;
10545
10547
  onUpdateSettings?: (settings: ListSettings) => void;
10546
10548
  } & CommonComponentProps;
10547
10549
 
@@ -10632,27 +10634,25 @@ function getListHoverImagePosition(
10632
10634
  return { x: 0, y: 0 };
10633
10635
  }
10634
10636
 
10635
- const listWidth = container.offsetWidth;
10636
- const listHeight = container.offsetHeight;
10637
- const verticalCenterY = listHeight / 2;
10637
+ const rect = container.getBoundingClientRect();
10638
+ const verticalCenterY = rect.top + rect.height / 2;
10638
10639
 
10639
10640
  if (mode === 'cursor' && event) {
10640
- const rect = container.getBoundingClientRect();
10641
10641
  return {
10642
- x: event.clientX - rect.left + HOVER_IMAGE_CURSOR_OFFSET,
10643
- y: event.clientY - rect.top + HOVER_IMAGE_CURSOR_OFFSET,
10642
+ x: event.clientX + HOVER_IMAGE_CURSOR_OFFSET,
10643
+ y: event.clientY + HOVER_IMAGE_CURSOR_OFFSET,
10644
10644
  };
10645
10645
  }
10646
10646
 
10647
10647
  switch (mode) {
10648
10648
  case 'left':
10649
- return { x: HOVER_IMAGE_EDGE_PADDING + imageWidthPx / 2, y: verticalCenterY };
10649
+ return { x: rect.left + HOVER_IMAGE_EDGE_PADDING + imageWidthPx / 2, y: verticalCenterY };
10650
10650
  case 'center':
10651
- return { x: listWidth / 2, y: verticalCenterY };
10651
+ return { x: rect.left + rect.width / 2, y: verticalCenterY };
10652
10652
  case 'right':
10653
- return { x: listWidth - HOVER_IMAGE_EDGE_PADDING - imageWidthPx / 2, y: verticalCenterY };
10653
+ return { x: rect.right - HOVER_IMAGE_EDGE_PADDING - imageWidthPx / 2, y: verticalCenterY };
10654
10654
  default:
10655
- return { x: listWidth / 2, y: verticalCenterY };
10655
+ return { x: rect.left + rect.width / 2, y: verticalCenterY };
10656
10656
  }
10657
10657
  }
10658
10658
 
@@ -10810,10 +10810,10 @@ function getCSS(P: string): string {
10810
10810
  }
10811
10811
 
10812
10812
  .\${P}-hover-media-anchor {
10813
- position: absolute;
10813
+ position: fixed;
10814
10814
  left: 0;
10815
10815
  top: 0;
10816
- z-index: 10;
10816
+ z-index: 9997;
10817
10817
  pointer-events: none;
10818
10818
  will-change: transform;
10819
10819
  transform-origin: center center;
@@ -12301,7 +12301,7 @@ function buildListColumns(
12301
12301
  });
12302
12302
  }
12303
12303
 
12304
- export function List({ settings, content, isEditor, isPreviewMode, isEditMode, activeEvent, layoutId, onUpdateSettings }: ListProps) {
12304
+ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, activeEvent, layoutId, portalId, onUpdateSettings }: ListProps) {
12305
12305
  const { prefix: P } = useScopedStyles();
12306
12306
  const showControls = Boolean(isEditMode);
12307
12307
  const {
@@ -13381,7 +13381,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13381
13381
  </button>
13382
13382
  );
13383
13383
  })()}
13384
- {showHoverImage && hoverImage && (() => {
13384
+ {showHoverImage && hoverImage && typeof document !== 'undefined' && (() => {
13385
13385
  const hoverSize = \`\${hoverImage.widthPx}px\`;
13386
13386
  const hoverMediaStyle: React.CSSProperties = {
13387
13387
  width: hoverSize,
@@ -13389,16 +13389,18 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13389
13389
  maxHeight: hoverSize,
13390
13390
  objectFit: 'contain',
13391
13391
  };
13392
+ const portalTarget = (portalId ? document.getElementById(portalId) : null) ?? document.body;
13392
13393
 
13393
- return (
13394
- <div ref={anchorRef} className={\`\${P}-hover-media-anchor\`}>
13394
+ return createPortal(
13395
+ <div ref={anchorRef} className={\`\${P}-hover-media-anchor\`} data-selection="none">
13395
13396
  <ListHoverMedia
13396
13397
  key={\`\${hoverImage.rowId}-\${hoverImage.url}\`}
13397
13398
  media={hoverImage}
13398
13399
  className={hoverImage.isVideo ? \`\${P}-hover-video\` : \`\${P}-hover-image\`}
13399
13400
  style={hoverMediaStyle}
13400
13401
  />
13401
- </div>
13402
+ </div>,
13403
+ portalTarget,
13402
13404
  );
13403
13405
  })()}
13404
13406
  </div>
@@ -13406,7 +13408,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13406
13408
  </>
13407
13409
  );
13408
13410
  }
13409
- `,jo=["A","B","C","D","E"],Ac=[...Os,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],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"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function y0(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function Dr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function v0(){return Object.fromEntries(jo.map((e,t)=>{const n=Pi[t],i=`${e} column`;return[n,y0(i)]}))}function x0(){const e={};for(const t of jo)e[`${t}ColumnWidth`]=Dr(`${t} column width`),e[`${t}ColumnPaddingLeft`]=Dr(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=Dr(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=Dr(`${t} column padding bottom`);return e}function Fc(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Pi]};for(const r of jo)i[`${r}ColumnWidth`]=r==="A"?.0798:.32,i[`${r}ColumnPaddingLeft`]=0,i[`${r}ColumnPaddingRight`]=0,i[`${r}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function b0(e){const t={};if(e===oi)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Os]},enum:[...Os]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Ac],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Ac]}}return t[Gt(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Gt(e,"textFontSettings")]={...Hi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Gt(e,"textFontSize")]={...Hi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Gt(e,"textLineHeight")]={...Hi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Gt(e,"textLetterSpacing")]={...Hi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Gt(e,"textWordSpacing")]={...Hi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Gt(e,"textTextAlign")]={...Hi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Gt(e,"textTextAppearance")]={...Hi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const S0=fr.reduce((e,t)=>({...e,...b0(t)}),{});function w0(e){return{verticalAlign:e===oi?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===oi?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function $0(e,t={}){var n;return{...w0(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Nc=new Set(["textFontFamily","textFontSettings"]);function C0(e,t,n){const i=r=>n===void 0?!0:n==="common"?Nc.has(r):!Nc.has(r),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=El(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Gt(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Gt(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Gt(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Gt(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Gt(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Gt(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Gt(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Gt(e,"textTextAppearance")]=t.textTextAppearance),o}function la(e={},t){return fr.reduce((n,i)=>({...n,...C0(i,$0(i,e),t)}),{})}const T0=la(),L0=Jv();function Xu(e){return[Gt(e,"textFontFamily"),Gt(e,"textFontSettings"),Gt(e,"textFontSize"),Gt(e,"textLineHeight"),Gt(e,"textLetterSpacing"),Gt(e,"textWordSpacing"),Gt(e,"textTextAlign"),Gt(e,"textTextAppearance"),`${e}VerticalAlign`]}function P0(){const e=[];return kl.forEach((t,n)=>{const i=Pi[n],o=Xu(t);for(let r=1;r<Pi.length;r+=1){const l=[{name:"columns",value:r},...Array.from({length:r},(d,c)=>({name:`columnsOrder.${c}`,value:i,isNotEqual:!0}))];o.forEach(d=>{e.push({if:l,then:{name:`properties.${d}.display.visible`,value:!1}})})}}),e}const I0=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];Xu(oi);const R0=[...jo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],Wi=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg"}],k0=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:Wi[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:Wi[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:Wi[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:Wi[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:Wi[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:Wi[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:Wi[6],link:""}],E0=[...jo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],M0={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:{...v0(),image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:k0},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"}},...x0(),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"}},...S0,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",...T0,...la({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Fc({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},...la({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Fc({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},...la({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...P0(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...R0.map(e=>({if:{name:"type",value:"b"},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"a"},then:{name:"properties.rowPaddingTopB.display.visible",value:!1}},...jo.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}})),{if:{name:"imagePosition",value:"cursor",isNotEqual:!0},then:{name:"properties.imageInterpolation.display.enabled",value:!1}}],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imagePosition","imageInterpolation","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...E0]},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__",L0]}],paletteBookmark:{items:[...I0],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},A0={element:h0,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>c0(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme-list-default.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...fr.map(e=>({path:`${Gt(e,"textFontFamily")}`}))]},fontRelations:{...fr.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${Gt(t,"textFontFamily")}`}),{})},schema:M0,sourceCode:f0},_c=300,pi=.004,F0={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"},N0=["hover","focus","filled","success","error"];function _0(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Hc(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Wc(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:_.scalingValue((o-t)/2,i)}}function H0(e){return`
13411
+ `,jo=["A","B","C","D","E"],Ac=[...Os,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],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"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function y0(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function Dr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function v0(){return Object.fromEntries(jo.map((e,t)=>{const n=Pi[t],i=`${e} column`;return[n,y0(i)]}))}function x0(){const e={};for(const t of jo)e[`${t}ColumnWidth`]=Dr(`${t} column width`),e[`${t}ColumnPaddingLeft`]=Dr(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=Dr(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=Dr(`${t} column padding bottom`);return e}function Fc(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Pi]};for(const r of jo)i[`${r}ColumnWidth`]=r==="A"?.0798:.32,i[`${r}ColumnPaddingLeft`]=0,i[`${r}ColumnPaddingRight`]=0,i[`${r}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function b0(e){const t={};if(e===ri)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Os]},enum:[...Os]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Ac],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Ac]}}return t[Gt(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Gt(e,"textFontSettings")]={...Hi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Gt(e,"textFontSize")]={...Hi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Gt(e,"textLineHeight")]={...Hi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Gt(e,"textLetterSpacing")]={...Hi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Gt(e,"textWordSpacing")]={...Hi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Gt(e,"textTextAlign")]={...Hi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Gt(e,"textTextAppearance")]={...Hi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const S0=fr.reduce((e,t)=>({...e,...b0(t)}),{});function w0(e){return{verticalAlign:e===ri?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===ri?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function $0(e,t={}){var n;return{...w0(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Nc=new Set(["textFontFamily","textFontSettings"]);function C0(e,t,n){const i=r=>n===void 0?!0:n==="common"?Nc.has(r):!Nc.has(r),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=El(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Gt(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Gt(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Gt(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Gt(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Gt(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Gt(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Gt(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Gt(e,"textTextAppearance")]=t.textTextAppearance),o}function la(e={},t){return fr.reduce((n,i)=>({...n,...C0(i,$0(i,e),t)}),{})}const T0=la(),L0=Jv();function Xu(e){return[Gt(e,"textFontFamily"),Gt(e,"textFontSettings"),Gt(e,"textFontSize"),Gt(e,"textLineHeight"),Gt(e,"textLetterSpacing"),Gt(e,"textWordSpacing"),Gt(e,"textTextAlign"),Gt(e,"textTextAppearance"),`${e}VerticalAlign`]}function P0(){const e=[];return kl.forEach((t,n)=>{const i=Pi[n],o=Xu(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 I0=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];Xu(ri);const R0=[...jo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],Wi=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg"}],k0=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:Wi[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:Wi[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:Wi[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:Wi[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:Wi[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:Wi[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:Wi[6],link:""}],E0=[...jo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],M0={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:{...v0(),image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:k0},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"}},...x0(),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"}},...S0,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",...T0,...la({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Fc({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},...la({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Fc({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},...la({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...P0(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...R0.map(e=>({if:{name:"type",value:"b"},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"a"},then:{name:"properties.rowPaddingTopB.display.visible",value:!1}},...jo.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}})),{if:{name:"imagePosition",value:"cursor",isNotEqual:!0},then:{name:"properties.imageInterpolation.display.enabled",value:!1}}],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imagePosition","imageInterpolation","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...E0]},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__",L0]}],paletteBookmark:{items:[...I0],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},A0={element:h0,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>c0(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme-list-default.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...fr.map(e=>({path:`${Gt(e,"textFontFamily")}`}))]},fontRelations:{...fr.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${Gt(t,"textFontFamily")}`}),{})},schema:M0,sourceCode:f0},_c=300,pi=.004,F0={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"},N0=["hover","focus","filled","success","error"];function _0(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Hc(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Wc(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 H0(e){return`
13410
13412
  .${e}-wrapper {
13411
13413
  box-sizing: border-box;
13412
13414
  display: flex;
@@ -13571,7 +13573,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13571
13573
  pointer-events: none;
13572
13574
  z-index: 2;
13573
13575
  }
13574
- `}function Oc(e,t,n,i,o,r,l,d){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:r??0,textAppearance:l,color:d??"#000000"}}function W0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r}){const{prefix:l}=_.useScopedStyles(),d=o??!1,{wrapperWidth:c=1,cellMinHeight:u=0,dividerWidth:p=694e-6,dividerStyle:x="solid",entryHoverEffect:y="default",autoclose:m="off",icon:g,iconMaxWidth:v=.00833,iconPaddingRight:b=0,iconAnimation:E="rotate 45",questionColor:f="#000000",answerColor:w="#000000",dividerColor:G="#0000001F",iconColor:X="#000000",questionHoverColor:M="#666666",iconHoverColor:T="#666666",iconActiveColor:N="#000000",dividerHoverColor:q="#000000",questionFontFamily:$,questionFontSettings:I,questionFontSize:W,questionLineHeight:O,questionLetterSpacing:C,questionWordSpacing:L,questionTextAppearance:z,answerFontFamily:S,answerFontSettings:K,answerFontSize:k,answerLineHeight:H,answerLetterSpacing:j,answerWordSpacing:ne,answerTextAppearance:oe,questionPaddingLeft:R=0,questionPaddingTop:ce=0,questionPaddingBottom:D=0,answerPaddingLeft:le=0,answerPaddingRight:ie=0,answerPaddingTop:we=0,answerPaddingBottom:Ie=0}=e,xe=t??[],[pe,Y]=s.useState(()=>new Set),ae=!n||i;s.useEffect(()=>{Y(new Set)},[m]),s.useEffect(()=>{n&&!o&&!i&&Y(new Set)},[n,o,i]);const se=Qe=>_.scalingValue(Qe,n??!1),Re=Math.max(R,pi),$e=Math.max(ce,pi),Me=Math.max(D,pi),ve=Math.max(le,pi),be=Math.max(ie,pi),Ce=Math.max(we,pi),h=Math.max(Ie,pi),U=Math.max(0,(c??1)-b-v),Z=Math.max(0,(c??1)-ie),te=Math.max(0,(c??1)-le),me=Math.max(b,pi),B=Math.max(0,(c??1)-R-v),P=s.useMemo(()=>pe.size===0?0:Math.min(...pe),[pe]),Q=s.useCallback(Qe=>pe.has(Qe),[pe]),ee=ae&&y==="default"?`${l}-entry-hover-default`:"",de=g??"",V=de!=="",Pe=E.replace(/^rotate /,""),he=`${l}-icon-anim-${Pe}`,J=cn(Qt(Oc($,I,W,O,C,L,z,f),n)),Ne=cn(Qt(Oc(S,K,k,H,j,ne,oe,w),n)),Be=Hc(W,O,`${l}-question`,`${l}-text-tight-leading`),at=Hc(k,H,`${l}-answer-text`,`${l}-text-tight-leading`),Ue=Wc(W,O,l,n),nt=Wc(k,H,l,n),Ze=_.buildColorVars(l,{questionColor:f,answerColor:w,dividerColor:G,iconColor:X,questionHoverColor:M,iconHoverColor:T,iconActiveColor:N,dividerHoverColor:q},F0,N0),Xe=r&&r!=="default"?`${l}-state-${r}`:"",fe=s.useCallback(Qe=>{ae&&Y(ye=>{if(ye.has(Qe)){const Ge=new Set(ye);return Ge.delete(Qe),Ge}if(m==="on")return new Set([Qe]);const _e=new Set(ye);return _e.add(Qe),_e})},[ae,m]),He=s.useMemo(()=>H0(l),[l]),We={[`--${l}-divider-width`]:_.scalingValue(p,n??!1),[`--${l}-divider-style`]:x,[`--${l}-icon-max-width`]:_.scalingValue(v,n??!1),...u>0?{[`--${l}-question-min-height`]:_.scalingValue(u,n??!1)}:{}};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:He}}),a.jsx("div",{style:Ze,children:a.jsx("div",{className:Ct(`${l}-wrapper`,n&&!i&&`${l}-editor`,ee,Xe),style:{width:_.scalingValue(c,n??!1),maxWidth:"100%",...We},children:xe.map((Qe,ye)=>{var Oe;const _e=Q(ye),Ge=((Oe=Qe.question)==null?void 0:Oe.trim())??"",et=Qe.answer,mt=((et==null?void 0:et.length)??0)>0,rt=d&&ye===P;return a.jsxs("div",{className:Ct(`${l}-item`,_e&&`${l}-item-open`),"data-faq-item":"",children:[a.jsxs("div",{className:`${l}-question-controls`,children:[rt&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"questionPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:se($e)}}),a.jsx("div",{"data-controls":"questionPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(U),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:se(Re),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:se(me),height:"100%"}})]}),a.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":_e,style:{...J,...Ue,paddingLeft:se(R),paddingRight:se(b)},onClick:()=>fe(ye),children:[ce>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:se(ce)},"aria-hidden":"true"}),a.jsxs("span",{className:`${l}-question-row`,children:[a.jsx("span",{className:Be,children:Ge}),mt&&(V?a.jsx("span",{className:`${l}-icon ${l}-icon-custom ${he}`,"aria-hidden":"true",children:a.jsx(pn,{url:de,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 ${he}`,"aria-hidden":"true"}))]}),D>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:se(D)},"aria-hidden":"true"})]}),rt&&a.jsx("div",{"data-controls":"questionPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:se(Me)}})]}),mt&&et&&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:[rt&&_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:se(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(Z),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:se(ve),height:"100%"}}),a.jsx("div",{"data-controls":"answerPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(te),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:se(be),height:"100%"}})]}),we>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:se(we)}}),a.jsx("div",{className:`${l}-answer`,style:{...Ne,...nt,paddingLeft:se(le),paddingRight:se(ie)},children:a.jsx("div",{className:at,children:a.jsx(Zi,{content:et})})}),Ie>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:se(Ie)}}),rt&&_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:se(h)}})]})})})]},ye)})})})]})}const O0=`import { useCallback, useEffect, useMemo, useState } from 'react';
13576
+ `}function Oc(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 W0({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:m="off",icon:g,iconMaxWidth:x=.00833,iconPaddingRight:b=0,iconAnimation:E="rotate 45",questionColor:f="#000000",answerColor:w="#000000",dividerColor:G="#0000001F",iconColor:X="#000000",questionHoverColor:k="#666666",iconHoverColor:L="#666666",iconActiveColor:A="#000000",dividerHoverColor:U="#000000",questionFontFamily:$,questionFontSettings:P,questionFontSize:H,questionLineHeight:W,questionLetterSpacing:C,questionWordSpacing:T,questionTextAppearance:B,answerFontFamily:S,answerFontSettings:K,answerFontSize:R,answerLineHeight:_,answerLetterSpacing:j,answerWordSpacing:oe,answerTextAppearance:re,questionPaddingLeft:O=0,questionPaddingTop:ie=0,questionPaddingBottom:D=0,answerPaddingLeft:le=0,answerPaddingRight:ee=0,answerPaddingTop:ve=0,answerPaddingBottom:Ie=0}=e,be=t??[],[pe,Y]=s.useState(()=>new Set),se=!n||i;s.useEffect(()=>{Y(new Set)},[m]),s.useEffect(()=>{n&&!o&&!i&&Y(new Set)},[n,o,i]);const xe=Ze=>F.scalingValue(Ze,n??!1),Se=Math.max(O,pi),Ce=Math.max(ie,pi),Ae=Math.max(D,pi),fe=Math.max(le,pi),we=Math.max(ee,pi),Te=Math.max(ve,pi),h=Math.max(Ie,pi),q=Math.max(0,(d??1)-b-x),Z=Math.max(0,(d??1)-ee),te=Math.max(0,(d??1)-le),ue=Math.max(b,pi),z=Math.max(0,(d??1)-O-x),I=s.useMemo(()=>pe.size===0?0:Math.min(...pe),[pe]),Q=s.useCallback(Ze=>pe.has(Ze),[pe]),ne=se&&v==="default"?`${l}-entry-hover-default`:"",de=g??"",V=de!=="",Pe=E.replace(/^rotate /,""),he=`${l}-icon-anim-${Pe}`,J=dn(Qt(Oc($,P,H,W,C,T,B,f),n)),He=dn(Qt(Oc(S,K,R,_,j,oe,re,w),n)),We=Hc(H,W,`${l}-question`,`${l}-text-tight-leading`),ot=Hc(R,_,`${l}-answer-text`,`${l}-text-tight-leading`),qe=Wc(H,W,l,n),nt=Wc(R,_,l,n),tt=F.buildColorVars(l,{questionColor:f,answerColor:w,dividerColor:G,iconColor:X,questionHoverColor:k,iconHoverColor:L,iconActiveColor:A,dividerHoverColor:U},F0,N0),Ve=r&&r!=="default"?`${l}-state-${r}`:"",ge=s.useCallback(Ze=>{se&&Y(ye=>{if(ye.has(Ze)){const Ke=new Set(ye);return Ke.delete(Ze),Ke}if(m==="on")return new Set([Ze]);const Ne=new Set(ye);return Ne.add(Ze),Ne})},[se,m]),_e=s.useMemo(()=>H0(l),[l]),je={[`--${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:tt,children:a.jsx("div",{className:Lt(`${l}-wrapper`,n&&!i&&`${l}-editor`,ne,Ve),style:{width:F.scalingValue(d,n??!1),maxWidth:"100%",...je},children:be.map((Ze,ye)=>{var De;const Ne=Q(ye),Ke=((De=Ze.question)==null?void 0:De.trim())??"",Qe=Ze.answer,st=((Qe==null?void 0:Qe.length)??0)>0,rt=c&&ye===I;return a.jsxs("div",{className:Lt(`${l}-item`,Ne&&`${l}-item-open`),"data-faq-item":"",children:[a.jsxs("div",{className:`${l}-question-controls`,children:[rt&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"questionPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:xe(Ce)}}),a.jsx("div",{"data-controls":"questionPaddingLeft","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:xe(Se),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(z),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:xe(ue),height:"100%"}})]}),a.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":Ne,style:{...J,...qe,paddingLeft:xe(O),paddingRight:xe(b)},onClick:()=>ge(ye),children:[ie>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:xe(ie)},"aria-hidden":"true"}),a.jsxs("span",{className:`${l}-question-row`,children:[a.jsx("span",{className:We,children:Ke}),st&&(V?a.jsx("span",{className:`${l}-icon ${l}-icon-custom ${he}`,"aria-hidden":"true",children:a.jsx(mn,{url:de,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 ${he}`,"aria-hidden":"true"}))]}),D>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:xe(D)},"aria-hidden":"true"})]}),rt&&a.jsx("div",{"data-controls":"questionPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:xe(Ae)}})]}),st&&Qe&&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:[rt&&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:xe(Te)}}),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:xe(fe),height:"100%"}}),a.jsx("div",{"data-controls":"answerPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(te),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:xe(we),height:"100%"}})]}),ve>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:xe(ve)}}),a.jsx("div",{className:`${l}-answer`,style:{...He,...nt,paddingLeft:xe(le),paddingRight:xe(ee)},children:a.jsx("div",{className:ot,children:a.jsx(Zi,{content:Qe})})}),Ie>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:xe(Ie)}}),rt&&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:xe(h)}})]})})})]},ye)})})})]})}const O0=`import { useCallback, useEffect, useMemo, useState } from 'react';
13575
13577
  import cn from 'classnames';
13576
13578
  import { CommonComponentProps } from '../props';
13577
13579
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
@@ -14319,7 +14321,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
14319
14321
  </>
14320
14322
  );
14321
14323
  }
14322
- `;function mi(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Dc={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},D0=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],z0={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:{...Dc.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:{...Dc.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:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01M0GB8Z9EQFMGYA20F2J0ACA8.svg",iconAnimation:"rotate 45",questionColor:"#000000",answerColor:"#000000",dividerColor:"#000000",iconColor:"#000000",questionHoverColor:"#A60239",iconHoverColor:"#A60239",iconActiveColor:"#000000",dividerHoverColor:"#A60239",questionFontFamily:"Goudy Bookletter 1911",questionFontSettings:{fontWeight:400,fontStyle:"normal"},questionLetterSpacing:0,questionWordSpacing:0,questionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},answerFontFamily:"Goudy Bookletter 1911",answerFontSettings:{fontWeight:400,fontStyle:"normal"},answerLetterSpacing:0,answerWordSpacing:0,answerTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{wrapperWidth:1,cellMinHeight:0,dividerWidth:.008,iconMaxWidth:.0533,iconPaddingRight:.08,questionFontSize:.09066,questionLineHeight:.10133,questionLetterSpacing:-.00266,answerFontSize:.0533,answerLineHeight:.064,questionPaddingLeft:.0533,questionPaddingTop:.0533,questionPaddingBottom:.0533,answerPaddingLeft:.0533,answerPaddingRight:.16,answerPaddingTop:.0533,answerPaddingBottom:.0533},t:{wrapperWidth:.651041,cellMinHeight:0,dividerWidth:.00390625,iconMaxWidth:.02604166,iconPaddingRight:.0130208,questionFontSize:.0390625,questionLineHeight:.04427,questionLetterSpacing:-.00091145833,answerFontSize:.0234375,answerLineHeight:.026041,questionPaddingLeft:0,questionPaddingTop:.01302,questionPaddingBottom:.01302,answerPaddingLeft:.065104,answerPaddingRight:.09765625,answerPaddingTop:.026041,answerPaddingBottom:.026041},d:{wrapperWidth:.6388,cellMinHeight:0,dividerWidth:.002083,iconMaxWidth:.01388,iconPaddingRight:.01388,questionFontSize:.0333,questionLineHeight:.0333,questionLetterSpacing:-9e-4,answerFontSize:.01111,answerLineHeight:.01388,questionPaddingLeft:0,questionPaddingTop:.01111,questionPaddingBottom:.01111,answerPaddingLeft:.0625,answerPaddingRight:.1625,answerPaddingTop:0,answerPaddingBottom:.01111}},layout:["__componentName__","wrapperWidth","cellMinHeight","dividerWidth","dividerStyle","entryHoverEffect","autoclose","icon","iconMaxWidth","iconAnimation"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["wrapperWidth","cellMinHeight"]},{type:"row",title:"",items:["entryHoverEffect","autoclose"]},{type:"row",title:"Divider",items:["dividerWidth","dividerStyle"]},{type:"row",title:"Icon",items:["icon","iconMaxWidth"]},{type:"row",title:"",items:["iconAnimation"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Question",items:["questionFontFamily","questionFontSettings",{type:"row",items:["questionFontSize","questionLineHeight","questionLetterSpacing","questionWordSpacing"]},"questionTextAppearance"]},{type:"group",title:"Answer",items:["answerFontFamily","answerFontSettings",{type:"row",items:["answerFontSize","answerLineHeight","answerLetterSpacing","answerWordSpacing"]},"answerTextAppearance"]}]}],paletteBookmark:{items:[...D0],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},B0={element:W0,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:z0,sourceCode:O0},ri=e=>e.display==="cover",_a=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},zc=100,j0=.2,Bc=8,qu=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,r]=s.useState(0),[l,d]=s.useState(!1),c=s.useRef(null),u=s.useRef(0);u.current=o;const p=s.useMemo(()=>typeof window>"u"?zc:Math.max(zc,window.innerHeight*j0),[]),x=s.useCallback($=>Math.max(0,1-$/(p*1.5)),[p]),y=s.useCallback($=>Math.max(0,1-$/(p*.45)),[p]),m=s.useCallback($=>{const I=typeof window<"u"?window.innerHeight:800,W=Math.max(.88,1-$/I*.12);return`translateY(${$}px) scale(${W})`},[]),g=s.useCallback(()=>{c.current=null},[]),v=s.useCallback(()=>{d(!0),r(0),window.setTimeout(()=>d(!1),n),g()},[n,g]),b=s.useCallback(()=>{const $=typeof window<"u"?window.innerHeight:800;d(!0),r($),window.setTimeout(()=>{t(),g(),d(!1)},Math.min(n,200))},[n,t,g]),E=s.useCallback($=>{!e||l||$.pointerType==="touch"&&(i!=null&&i($.target)||(c.current={startX:$.clientX,startY:$.clientY,isLocked:null,pointerId:$.pointerId}))},[e,l,i]),f=s.useCallback($=>{const I=c.current;if(!e||!I||$.pointerType!=="touch"||I.pointerId!==$.pointerId)return;const W=$.clientX-I.startX,O=$.clientY-I.startY;if(I.isLocked===null){if(Math.abs(W)<Bc&&Math.abs(O)<Bc)return;if(O>0&&O>Math.abs(W))I.isLocked=!0,$.currentTarget.setPointerCapture($.pointerId);else{I.isLocked=!1,g();return}}if(!I.isLocked)return;$.preventDefault();const C=Math.max(0,O);u.current=C,r(C)},[e,g]),w=s.useCallback($=>{const I=c.current;if(!e||!I||$.pointerType!=="touch"||I.pointerId!==$.pointerId)return;const W=I.isLocked===!0;if($.currentTarget.hasPointerCapture($.pointerId)&&$.currentTarget.releasePointerCapture($.pointerId),!W){g();return}$.clientY-I.startY>=p?b():v()},[p,b,e,g,v]),G=s.useCallback($=>{w($)},[w]),X=s.useCallback($=>{w($)},[w]),M=o>0,T=l?`transform ${n}ms ease`:"none",N=l?`opacity ${n}ms ease`:"none",q=o>0||l;return{isSwipeDragging:M,backdropStyle:{opacity:x(o),transition:N},mediaAreaStyle:{transform:m(o),transition:T,touchAction:M?"none":void 0,willChange:M?"transform":void 0},overlayContentStyle:q?{opacity:y(o),transition:N}:void 0,swipeHandlers:e?{onPointerDown:E,onPointerMove:f,onPointerUp:G,onPointerCancel:X}:{},dismissAreaStyle:e?{touchAction:M?"none":"pan-x"}:void 0}},V0="[data-lightbox-scrollable]",Uu=()=>{s.useEffect(()=>{const e=window.scrollY,t=document.body.style.overflow,n=document.body.style.position,i=document.body.style.top,o=document.body.style.width,r=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const l=d=>{const c=d.target;c instanceof Element&&c.closest(V0)||d.preventDefault()};return document.addEventListener("touchmove",l,{passive:!1}),()=>{document.removeEventListener("touchmove",l),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=r,window.scrollTo({top:e,left:0,behavior:"instant"})}},[])},G0=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},X0=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},q0=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},U0=(e,t,n,{duration:i,easing:o,onComplete:r})=>{const l=e.scrollLeft,d=n-l,c=l-n,u=(g,v)=>{X0(t),e.scrollLeft=g,v&&(r==null||r())};if(Math.abs(d)<.5)return u(n,!0),()=>{};let p=!1,x=0;const y=()=>{t.removeEventListener("transitionend",m),clearTimeout(x)},m=g=>{g.target!==t||g.propertyName!=="transform"||p||(p=!0,y(),u(n,!0))};return t.addEventListener("transitionend",m),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${c}px, 0, 0)`,x=window.setTimeout(()=>{p||(p=!0,y(),u(n,!0))},i+64),()=>{p||(p=!0,y(),u(l-q0(t),!1))}},sr=300,K0=900,Y0=1500,Z0="cubic-bezier(0.16, 1, 0.3, 1)",J0=3e3,Q0=2,ex=16,tx=.05,nx=1,zr=.3,ix=50,ox=20,ro=.004,Fo=["title1","title2","title3"],rx={title1:"1",title2:"2",title3:"3"},ax={title1:"title1Color",title2:"title2Color",title3:"title3Color"},sx={title1:.02,title2:.02,title3:.02},Br=e=>`max(${e}, ${ox}px)`,lx=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]}},cx=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=lx(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Zt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,dx=e=>[Zt(e,"fontFamily"),Zt(e,"fontSettings"),{type:"row",items:[Zt(e,"fontSize"),Zt(e,"lineHeight"),Zt(e,"letterSpacing"),Zt(e,"wordSpacing")]},Zt(e,"textAlign"),Zt(e,"textAppearance")],ux=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Fo.map(e=>[rx[e],dx(e)]))}),Fl=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},d)=>{if(r<=0||d<=0)return{overflow:r,widths:[d,...l]};const c=Math.min(r,d);return{overflow:r-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},Ku=(e,t)=>Fl(e,t),jr=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},jc=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Fl(e.length,n),effective:Ku(e.length,n)}},px=(e,t,n,i,o,r,l)=>{const d=[];return t&&d.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&d.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:r,text:n}),i&&d.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:l,text:i}),d},rs=(e,t)=>{const n=i=>{const o=Zt(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[ax[t]]}},mx=(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),as=(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??sx[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Qt(i,n)},gx=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l})=>{const{backgroundColor:d,thumbnailSize:c,thumbnailGap:u,thumbnailMarginBottom:p,imageGap:x,closeIcon:y,closeIconMaxWidth:m,closeIconColor:g,closeIconHoverColor:v,thumbnailTrigger:b,thumbnailVisibility:E,thumbnailObjectFit:f,thumbnailActive:w,thumbnailActiveColor:G,title1Width:X,title2Width:M,title3Width:T,title1MarginLeft:N=0,title2MarginLeft:q=0,title3MarginLeft:$=0,titleRowMarginBottom:I=0,titleHeaderLayout:W="desktop",contentMarginTop:O,iconMarginLeft:C}=n,L=F=>_.scalingValue(F,i??!1),z=c??n.thumnailSize??.03,S=L(z),K=L(u),k=L(p??.02),H=L(x??0),j=L(O??0),ne=Br(j),oe=L(C??0),[R,ce]=s.useState(0),D=s.useRef(R);D.current=R;const le=t[R],{title1:ie,title2:we,title3:Ie}=cx(le),xe=as("title1",rs(n,"title1"),i),pe=as("title2",rs(n,"title2"),i),Y=as("title3",rs(n,"title3"),i),ae=W==="mobile",se=!o&&(!i||r),Re=se,$e=se,Me=se,ve=ri(f),be=ve?{"--image-aspect-ratio":_a(f)}:void 0,Ce=!!(ie||we||Ie),h=s.useMemo(()=>px(e,ie,we,Ie,xe,pe,Y),[e,R,ie,we,Ie,xe,pe,Y]),U=s.useMemo(()=>({title1Width:X,title2Width:M,title3Width:T}),[X,M,T]),Z=s.useMemo(()=>h.map(F=>U[F.widthKey]),[h,U]),te=s.useMemo(()=>Fl(h.length,Z),[h.length,Z]),me=s.useMemo(()=>Ku(h.length,Z),[h.length,Z]),B=s.useMemo(()=>h.filter(F=>F.prefix==="title1"),[h]),P=s.useMemo(()=>h.filter(F=>F.prefix==="title2"||F.prefix==="title3"),[h]),Q=s.useMemo(()=>jc(B,U),[B,U]),ee=s.useMemo(()=>jc(P,U),[P,U]),de=s.useCallback((F,re)=>{const ue=h.indexOf(F);if(!ae||re==="single-row")return{effectiveWidth:me[ue]??0,resolvedWidth:te[ue]??0,maxWidth:jr(ue,te)};if(re==="two-row-top"){const Ye=B.indexOf(F);return{effectiveWidth:Q.effective[Ye]??0,resolvedWidth:Q.resolved[Ye]??0,maxWidth:jr(Ye,Q.resolved)}}const Ee=P.indexOf(F);return{effectiveWidth:ee.effective[Ee]??0,resolvedWidth:ee.resolved[Ee]??0,maxWidth:jr(Ee,ee.resolved)}},[P,ee,me,te,h,B,Q,ae]),V=s.useCallback(F=>_.scalingValue(F,i??!1),[i]),Pe=V(I??0),he=s.useMemo(()=>({title1MarginLeft:N,title2MarginLeft:q,title3MarginLeft:$}),[N,q,$]),J=s.useCallback(F=>h.slice(0,F+1).reduce((re,ue,Ee)=>re+(ue!=null&&ue.marginLeftKey?he[ue.marginLeftKey]??0:0)+(te[Ee]??0),0)+(ae?0:N??0),[h,he,te,ae,N]),Ne=s.useCallback(()=>ae?0:N??0,[ae,N]),Be=s.useCallback(F=>P.slice(0,F).reduce((re,ue,Ee)=>re+(ue.marginLeftKey?he[ue.marginLeftKey]??0:0)+(ee.resolved[Ee]??0),0),[P,ee.resolved,he]),at=s.useCallback(F=>{const re=P[F];return Be(F)+(re.marginLeftKey?he[re.marginLeftKey]??0:0)+(ee.resolved[F]??0)},[P,ee.resolved,Be,he]),Ue=(F,re)=>{const ue=F.marginLeftKey?he[F.marginLeftKey]??0:0,{effectiveWidth:Ee,resolvedWidth:Ye,maxWidth:dt}=de(F,re),Pt=o&&re==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":F.prefix,style:{...re==="single-row"?{gridArea:F.prefix}:{},width:V(Ee),...ue>0?{marginLeft:V(ue)}:{}},children:[a.jsx("p",{className:F.className,style:F.style,children:F.text}),Pt&&F.marginLeftKey&&a.jsx("div",{"data-controls":F.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ye),style:{position:"absolute",top:0,left:V(-ue),width:`max(${V(ue)}, 10px)`,height:"100%",pointerEvents:"auto"}}),Pt&&a.jsx("div",{"data-controls":F.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(dt),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:V(-ro/2),width:V(ro),height:"100%",pointerEvents:"auto"}})]},F.className)},nt=()=>{const F=ae?-1:h.findIndex(Ee=>Ee.prefix==="title1"),re=!ae&&(o||(N??0)>0)?(()=>{const Ee=N??0,Ye=F>=0?te[F]:X??0;return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ye),style:{position:"absolute",top:0,left:0,width:`max(${V(Ee)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,ue=h.flatMap((Ee,Ye)=>{if(!Ee.marginLeftKey)return[];const dt=he[Ee.marginLeftKey]??0,Pt=mx(h,te,he,Ye)+Ne();return a.jsx("div",{"data-controls":Ee.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(te[Ye]),style:{position:"absolute",top:0,left:V(Pt),width:`max(${V(dt)}, 10px)`,height:"100%",pointerEvents:"auto"}},Ee.marginLeftKey)});return re?[re,...ue]:ue},Ze=()=>h.map((F,re)=>{const ue=jr(re,te),Ye=J(re)-ro/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":F.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ue),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:V(Ye),width:V(ro),height:"100%",pointerEvents:"auto"}})},`${F.widthKey}-junction`)}),Xe=()=>P.flatMap((F,re)=>{if(!F.marginLeftKey)return[];const ue=he[F.marginLeftKey]??0,Ee=Be(re),{resolvedWidth:Ye}=de(F,"two-row-bottom");return a.jsx("div",{"data-controls":F.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ye),style:{position:"absolute",top:0,left:V(Ee),width:`max(${V(ue)}, 10px)`,height:"100%",pointerEvents:"auto"}},F.marginLeftKey)}),fe=()=>P.map((F,re)=>{const{maxWidth:ue}=de(F,"two-row-bottom"),Ye=at(re)-ro/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":F.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ue),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:V(Ye),width:V(ro),height:"100%",pointerEvents:"auto"}})},`${F.widthKey}-junction`)}),He=s.useRef(null),We=s.useRef(null),Qe=s.useRef(null),ye=s.useRef(null),_e=s.useRef([]),Ge=s.useRef([]),et=s.useRef(0),mt=s.useRef(null),rt=s.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),Oe=s.useRef(null),Fe=s.useRef(null),Ke=s.useRef(0),it=s.useRef("forward"),De=s.useRef(0),qe=s.useRef(null),ut=s.useRef(!1),ge=t.length>1&&(!o||!!r),ke=ge?3:1,ot=s.useMemo(()=>Array.from({length:ke},()=>t).flat(),[t,ke]),[gt,je]=s.useState(!1),[vt,It]=s.useState(!1),[kt,wt]=s.useState(!0),Dt=s.useRef(null),Bt=s.useRef(null),Xt=s.useRef(!1),qt=s.useRef(!1),Lt=s.useRef(null),Ot=s.useRef(null),nn=Re&&!kt,xt=s.useCallback(()=>{Re&&(wt(!0),Ot.current&&clearTimeout(Ot.current),Ot.current=setTimeout(()=>{rt.current.isActive||wt(!1)},J0))},[Re]),Te=s.useCallback(()=>{o||qt.current||(qt.current=!0,It(!1),Lt.current=setTimeout(()=>{l()},sr))},[o,l]),Ve=()=>a.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":nn?"true":"false",style:{width:_.scalingValue(m??0,i),height:_.scalingValue(m??0,i),marginRight:oe,"--close-icon-hover-color":v},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Te,"aria-label":"Close",children:a.jsx(pn,{url:y,fill:g,hoverFill:i&&!r?g:v,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:oe,height:"100%",pointerEvents:"auto"}})]}),st=(F="two-row")=>a.jsx("div",{...F==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:V(N??0),flexShrink:0,...F==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...F==="two-row"&&o?{pointerEvents:"auto"}:{}}}),lt=()=>{const F=h.find(Ee=>Ee.prefix==="title1"),re=h.filter(Ee=>Ee.prefix==="title2"||Ee.prefix==="title3"),ue=re.length>0||o||(I??0)>0;return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`${e}-header-row-top`,children:[(N??0)>0||o?st():null,F&&Ue(F,"two-row-top"),y&&Ve()]}),ue?a.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[re.length>0?a.jsxs("div",{className:`${e}-header-row-bottom`,children:[re.map(Ee=>Ue(Ee,"two-row-bottom")),o&&a.jsxs(a.Fragment,{children:[Xe(),fe()]})]}):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]})},bt=()=>a.jsxs(a.Fragment,{children:[(N??0)>0||o?st("single-row"):null,h.map(F=>Ue(F,"single-row")),o?a.jsxs(a.Fragment,{children:[nt(),Ze()]}):null,y?Ve():null]}),Tt=s.useCallback(F=>!!(F.closest("[data-controls]")||F.closest(`.${e}-thumbnails`)||F.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:tt,backdropStyle:Rt,mediaAreaStyle:Mt,overlayContentStyle:At,swipeHandlers:jt,dismissAreaStyle:Ut}=qu({enabled:se??!1,onClose:Te,animMs:sr,isBlockedTarget:Tt}),Et=()=>{if(!ge||t.length===0)return et.current=0,0;const F=Ge.current[0],re=Ge.current[t.length];if(!F||!re)return et.current;const ue=re.offsetLeft-F.offsetLeft;return ue>0&&(et.current=ue),et.current},Nt=(F=!1)=>{if(!ge)return;const re=We.current,ue=Et();!re||ue<=0||ue<re.clientWidth*.25||(re.scrollLeft<=0?(re.scrollLeft+=ue,F&&(rt.current.scrollLeft+=ue),ut.current&&(De.current+=ue)):re.scrollLeft>=ue*2&&(re.scrollLeft-=ue,F&&(rt.current.scrollLeft-=ue),ut.current&&(De.current-=ue)))},_t=(F,re=(ue=>(ue=We.current)==null?void 0:ue.scrollLeft)()??0)=>{if(!ge)return F;let Ee=t.length+F,Ye=1/0;for(let dt=0;dt<ke;dt++){const Pt=dt*t.length+F,Wt=Ge.current[Pt];if(!Wt)continue;const rn=Math.abs(Wt.offsetLeft-re);rn<Ye&&(Ye=rn,Ee=Pt)}return Ee},ht=F=>{const re=We.current;return!F||!re?!1:F.offsetWidth>re.clientWidth+1},A=F=>{const re=We.current;if(!F||!re||!ht(F))return!1;const ue=F.offsetLeft,Ee=ue+F.offsetWidth;return re.scrollLeft>=ue-1&&re.scrollLeft+re.clientWidth<=Ee+1},Le=(F=(re=>(re=We.current)==null?void 0:re.scrollLeft)()??0)=>{for(let Ee=0;Ee<Ge.current.length;Ee+=1){const Ye=Ge.current[Ee];if(Ye&&A(Ye))return Ee}let ue={flatIndex:0,distance:1/0};return Ge.current.forEach((Ee,Ye)=>{if(!Ee)return;const dt=Math.abs(Ee.offsetLeft-F);dt<ue.distance&&(ue={flatIndex:Ye,distance:dt})}),ue.flatIndex},Ae=F=>{We.current&&Ge.current.forEach(re=>{re&&(re.style.scrollSnapAlign=ht(re)&&F==="backward"?"end":"start")})},ze=(F,re,ue)=>{const Ee=F-re,Ye=Le(re),dt=Ge.current[Ye];if(A(dt))return Le(F)%t.length;const Pt=Ge.current[Ye+1],Wt=dt?Pt?Pt.offsetLeft-dt.offsetLeft:dt.offsetWidth:0,rn=Wt>0?Ee>Wt*zr?1:Ee<-Wt*zr?-1:0:0;return rn===0?ue:ge?(ue+rn+t.length)%t.length:Math.max(0,Math.min(t.length-1,ue+rn))},pt=s.useCallback((F=!1)=>{if(E!=="on"||o)return;const re=ye.current,ue=D.current,Ee=_e.current[ue];if(!re||!Ee||re.scrollWidth<=re.clientWidth)return;const Ye=re.scrollLeft,dt=Ye+re.clientWidth,Pt=Ee.offsetLeft,Wt=Pt+Ee.offsetWidth;if(Pt>=Ye&&Wt<=dt)return;const rn=re.scrollWidth-re.clientWidth;let on=Ye;if(!F&&Dt.current===null){const Fn=_e.current[ue-1],ci=_e.current[ue+1],no=Fn?Ee.offsetLeft-Fn.offsetLeft:ci?ci.offsetLeft-Ee.offsetLeft:Ee.offsetWidth;Wt>dt?on+=no:Pt<Ye&&(on-=no)}else Wt>dt?on=Wt-re.clientWidth:on=Pt;re.scrollLeft=Math.max(0,Math.min(rn,on))},[o,E]),zt=s.useCallback((F=!1)=>{F&&(Xt.current=!0),Bt.current===null&&(Bt.current=requestAnimationFrame(()=>{Bt.current=null;const re=Xt.current;Xt.current=!1,pt(re)}))},[pt]),ft=s.useCallback(F=>{if(F===D.current)return;const re=D.current;D.current=F;const ue=Math.abs(F-re)>1,Ee=ge&&t.length>1&&(re===t.length-1&&F===0||re===0&&F===t.length-1);ce(F),zt(ue||Ee)},[t.length,ge,zt]),St=()=>{if(!We.current||t.length===0||Dt.current!==null||rt.current.isActive&&rt.current.hasMoved)return;const F=We.current.scrollLeft,re=Le(F)%t.length;re!==D.current&&ft(re)},Kt=()=>{Dt.current=null},Ht=F=>{const re=We.current;re&&(re.style.scrollSnapType=F?"":"none")},sn=()=>{var F;(F=Fe.current)==null||F.call(Fe),Fe.current=null},gn=()=>{qe.current!==null&&(cancelAnimationFrame(qe.current),qe.current=null),ut.current=!1},Xn=()=>{const F=We.current;if(!F){qe.current=null,ut.current=!1;return}const re=De.current-F.scrollLeft;if(Math.abs(re)<.5){F.scrollLeft=De.current,Nt(),St(),qe.current=null,ut.current=!1;return}F.scrollLeft+=re*tx,Nt(),St(),xt(),qe.current=requestAnimationFrame(Xn)},yn=()=>{const F=Qe.current;F&&(F.style.transition="",F.style.transform="",F.style.willChange="")},qn=(F,re,ue,Ee)=>{yn(),F.scrollLeft=re,Ke.current=F.scrollLeft,Nt(),ue!==void 0?(D.current=ue,ce(ue)):St(),Ht(!0),Ee==null||Ee()},Mi=(F,{behavior:re="smooth",activeIndex:ue,onComplete:Ee}={})=>{const Ye=We.current,dt=Qe.current;if(!Ye||!dt)return;if(gn(),sn(),Ht(!1),re==="auto"){qn(Ye,F,ue,Ee);return}const Pt=Math.abs(F-Ye.scrollLeft),Wt=G0(Pt,K0,Y0,Ye.clientWidth*.55);Fe.current=U0(Ye,dt,F,{duration:Wt,easing:Z0,onComplete:()=>{Fe.current=null,qn(Ye,F,ue,Ee)}})},Qi=(F="smooth")=>{const re=We.current;if(!re||t.length===0)return;const ue=Le()%t.length,Ee=_t(ue,re.scrollLeft),Ye=Ge.current[Ee];Ye&&Mi(Ye.offsetLeft,{behavior:F,activeIndex:ue})},Go=(F,re="smooth",ue,Ee)=>{const Ye=We.current;if(!Ye||t.length===0)return;const dt=(Ee??Ye.scrollLeft)-F,Pt=Le(F),Wt=Ge.current[Pt];if(A(Wt)){Ht(!0),St();return}const rn=Ge.current[Pt+1],on=Wt?rn?rn.offsetLeft-Wt.offsetLeft:Wt.offsetWidth:0;if((on>0?dt>on*zr?1:dt<-on*zr?-1:0:0)!==0){const kr=ue??Pt%t.length,Wa=ze(Ee??Ye.scrollLeft,F,kr);un(Wa,re);return}const ci=Ee??Ye.scrollLeft,no=Le(ci),Ai=Ge.current[no];if(Ai&&Math.abs(Ai.offsetLeft-ci)<1){Ht(!0),St();return}Qi("auto")},un=(F,re="smooth")=>{const ue=We.current;if(!ue||t.length===0)return;const Ee=_t(F,ue.scrollLeft),Ye=Ge.current[Ee];Ye&&(re==="smooth"?Dt.current=F:Dt.current=null,D.current=F,ce(F),zt(!0),Mi(Ye.offsetLeft,{behavior:re,activeIndex:F,onComplete:re==="smooth"?Kt:void 0}))},An=()=>{Oe.current&&(window.removeEventListener("pointerup",Oe.current),window.removeEventListener("pointercancel",Oe.current),Oe.current=null)},In=(F,re,ue,Ee,Ye)=>{const dt=ue-F,Pt=Ee-re,Wt=Math.abs(dt),rn=Math.abs(Pt);if(Wt<ix||Wt<=rn)return!1;const on=dt<0?1:-1,Fn=ge?(Ye+on+t.length)%t.length:Math.max(0,Math.min(t.length-1,Ye+on));return Fn===Ye?!1:(un(Fn),!0)},Un=F=>{if(!rt.current.isActive)return;An();const re=We.current;if(!re)return;const{scrollLeft:ue,startActiveIndex:Ee,hasMoved:Ye}=rt.current,dt=re.scrollLeft;Nt(!0),rt.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},je(!1),F!==void 0&&re.hasPointerCapture(F)&&re.releasePointerCapture(F),Ye?Go(ue,"smooth",Ee,dt):(Ht(!0),St()),xt()},eo=(F,re)=>{const ue=mt.current;mt.current=null,ue&&(In(ue.startX,ue.startY,F,re,ue.startActiveIndex),xt())},Xo=F=>{if(!$e)return;if(F.pointerType==="touch"){if(gn(),Ht(!0),Tt(F.target))return;mt.current={startX:F.clientX,startY:F.clientY,startActiveIndex:D.current};return}if(F.pointerType!=="mouse"||F.button!==0||Tt(F.target))return;const re=We.current;if(!re)return;gn(),sn(),yn(),Dt.current=null,rt.current={isActive:!0,startX:F.clientX,scrollLeft:re.scrollLeft,startActiveIndex:D.current,hasMoved:!1},Ht(!1),xt(),re.setPointerCapture(F.pointerId),An();const ue=Ee=>{Ee.pointerType==="mouse"&&Un(Ee.pointerId)};Oe.current=ue,window.addEventListener("pointerup",ue),window.addEventListener("pointercancel",ue)},to=F=>{if(!$e||F.pointerType!=="mouse")return;const re=We.current;if(!re||!rt.current.isActive)return;if(F.buttons===0){Un(F.pointerId);return}const ue=F.clientX-rt.current.startX;Math.abs(ue)>nx&&(rt.current.hasMoved=!0,je(!0)),rt.current.hasMoved&&(F.preventDefault(),re.scrollLeft=rt.current.scrollLeft-ue,Nt(!0),St(),xt())},Se=F=>{if($e){if(F.pointerType==="touch"){F.type==="pointerup"?eo(F.clientX,F.clientY):mt.current=null;return}F.pointerType==="mouse"&&Un(F.pointerId)}},Je=F=>{!$e||F.pointerType!=="mouse"||Un(F.pointerId)};return Uu(),s.useEffect(()=>{const F=requestAnimationFrame(()=>It(!0));return()=>{cancelAnimationFrame(F),sn(),An(),Bt.current!==null&&(cancelAnimationFrame(Bt.current),Bt.current=null),Lt.current&&clearTimeout(Lt.current),Ot.current&&clearTimeout(Ot.current)}},[]),s.useEffect(()=>{if(!Re){wt(!0);return}xt();const F=()=>xt();return document.addEventListener("pointermove",F,{passive:!0}),document.addEventListener("pointerdown",F,{passive:!0}),()=>{document.removeEventListener("pointermove",F),document.removeEventListener("pointerdown",F),Ot.current&&clearTimeout(Ot.current)}},[Re,xt]),s.useEffect(()=>{const F=re=>{re.key==="Escape"&&Te()};return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[Te]),s.useLayoutEffect(()=>{Et()},[H,t.length,ge]),s.useLayoutEffect(()=>{o||un(D.current,"auto")},[H,o]),s.useLayoutEffect(()=>{un(0,"auto")},[t.length,ge]),s.useEffect(()=>{const F=We.current;if(!F||o||!se)return;const re=ue=>{if(ue.preventDefault(),Math.abs(ue.deltaY)<=Math.abs(ue.deltaX))return;const Ee=ue.deltaMode===1?ex:ue.deltaMode===2?F.clientHeight:1,Ye=ue.deltaY*Ee*Q0;if(Ye!==0){if(sn(),ut.current||(ut.current=!0,De.current=F.scrollLeft,Dt.current=null,Ht(!1)),De.current+=Ye,!ge){const dt=F.scrollWidth-F.clientWidth;De.current=Math.max(0,Math.min(dt,De.current))}xt(),qe.current===null&&(qe.current=requestAnimationFrame(Xn))}};return F.addEventListener("wheel",re,{passive:!1}),()=>{F.removeEventListener("wheel",re),gn()}},[o,se,ge]),s.useEffect(()=>{const F=We.current;if(!F)return;const re=()=>{Nt(rt.current.isActive);const Ee=F.scrollLeft,Ye=Ee-Ke.current;Ke.current=Ee;const dt=et.current>0?et.current*.5:1/0;if(Ye!==0&&Math.abs(Ye)<dt){const Pt=Ye>0?"forward":"backward";Pt!==it.current&&(it.current=Pt,Ae(Pt))}rt.current.isActive&&rt.current.hasMoved||St()};F.addEventListener("scroll",re,{passive:!0});const ue=new ResizeObserver(()=>{Et(),Nt(rt.current.isActive),Ae(it.current),St()});return ue.observe(F),()=>{sn(),F.removeEventListener("scroll",re),ue.disconnect()}},[t.length,ge]),a.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{tt||Te()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:vt?1:0,transition:`opacity ${sr}ms ease`,pointerEvents:vt?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...Rt}}),a.jsxs("div",{ref:He,className:`${e}-lightbox-dismiss-area`,style:Ut,...jt,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:Mt,onClick:F=>F.stopPropagation(),children:a.jsx("div",{ref:We,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":$e&&t.length>0?"true":"false","data-mouse-dragging":gt?"true":"false",onPointerDown:Xo,onPointerMove:to,onPointerUp:Se,onPointerCancel:Se,onLostPointerCapture:Je,children:a.jsx("div",{ref:Qe,className:`${e}-lightbox-strip-track`,style:{gap:H},children:ot.map((F,re)=>{const ue=F.image.objectFit??"contain",Ee=re%t.length,Ye=Math.floor(re/t.length),dt=Br(H),Pt=`calc(-0.5 * (${dt} + ${H}))`;return a.jsxs("div",{ref:Wt=>Ge.current[re]=Wt,className:`${e}-strip-item`,style:{height:W==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[a.jsx("img",{src:F.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:ue}}),o&&Ee<t.length-1&&Ye===0&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Pt,width:dt,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Ye}-${F.image.url}-${Ee}`)})})})}),a.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":nn?"true":"false",style:At,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:ne,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${ae?` ${e}-lightbox-content-area-stacked`:""}`,children:(Ce||y)&&a.jsx("div",{className:`${e}-header ${ae?`${e}-header-two-row`:`${e}-header-single-row`}`,children:ae?lt():Ce||y?bt():null})})})]}),t.length>1&&E==="on"&&(()=>{const F=Br(k),re=`calc(-0.5 * (${k} + ${F}))`;return a.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:k},children:a.jsx("div",{ref:ye,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:ue=>ue.stopPropagation(),children:a.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":w,style:{gap:K,"--thumbnail-active-color":G},children:[t.map((ue,Ee)=>{const Ye=Br(K),dt=`calc(-0.5 * (${Ye} + ${K}))`;return a.jsxs("div",{ref:Pt=>{_e.current[Ee]=Pt},style:{position:"relative",flex:"0 0 auto"},children:[a.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":R===Ee?"true":"false",onClick:()=>se&&b==="click"&&un(Ee),onMouseEnter:()=>Me&&b==="hover"&&un(Ee),"aria-label":ue.image.name?`View ${ue.image.name}`:`View image ${Ee+1}`,"aria-current":R===Ee?"true":void 0,children:a.jsx("img",{className:`${e}-thumb-image${ve?` ${e}-thumb-image-cover`:""}`,src:ue.image.url,alt:"",draggable:!1,style:{...be,maxWidth:S,maxHeight:S,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:dt,width:Ye,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${ue.image.url}-${Ee}`)}),o&&a.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:re,height:F,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function hx(e){return`
14324
+ `;function mi(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Dc={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},D0=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],z0={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:{...Dc.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:{...Dc.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:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01M0GB8Z9EQFMGYA20F2J0ACA8.svg",iconAnimation:"rotate 45",questionColor:"#000000",answerColor:"#000000",dividerColor:"#000000",iconColor:"#000000",questionHoverColor:"#A60239",iconHoverColor:"#A60239",iconActiveColor:"#000000",dividerHoverColor:"#A60239",questionFontFamily:"Goudy Bookletter 1911",questionFontSettings:{fontWeight:400,fontStyle:"normal"},questionLetterSpacing:0,questionWordSpacing:0,questionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},answerFontFamily:"Goudy Bookletter 1911",answerFontSettings:{fontWeight:400,fontStyle:"normal"},answerLetterSpacing:0,answerWordSpacing:0,answerTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{wrapperWidth:1,cellMinHeight:0,dividerWidth:.008,iconMaxWidth:.0533,iconPaddingRight:.08,questionFontSize:.09066,questionLineHeight:.10133,questionLetterSpacing:-.00266,answerFontSize:.0533,answerLineHeight:.064,questionPaddingLeft:.0533,questionPaddingTop:.0533,questionPaddingBottom:.0533,answerPaddingLeft:.0533,answerPaddingRight:.16,answerPaddingTop:.0533,answerPaddingBottom:.0533},t:{wrapperWidth:.651041,cellMinHeight:0,dividerWidth:.00390625,iconMaxWidth:.02604166,iconPaddingRight:.0130208,questionFontSize:.0390625,questionLineHeight:.04427,questionLetterSpacing:-.00091145833,answerFontSize:.0234375,answerLineHeight:.026041,questionPaddingLeft:0,questionPaddingTop:.01302,questionPaddingBottom:.01302,answerPaddingLeft:.065104,answerPaddingRight:.09765625,answerPaddingTop:.026041,answerPaddingBottom:.026041},d:{wrapperWidth:.6388,cellMinHeight:0,dividerWidth:.002083,iconMaxWidth:.01388,iconPaddingRight:.01388,questionFontSize:.0333,questionLineHeight:.0333,questionLetterSpacing:-9e-4,answerFontSize:.01111,answerLineHeight:.01388,questionPaddingLeft:0,questionPaddingTop:.01111,questionPaddingBottom:.01111,answerPaddingLeft:.0625,answerPaddingRight:.1625,answerPaddingTop:0,answerPaddingBottom:.01111}},layout:["__componentName__","wrapperWidth","cellMinHeight","dividerWidth","dividerStyle","entryHoverEffect","autoclose","icon","iconMaxWidth","iconAnimation"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["wrapperWidth","cellMinHeight"]},{type:"row",title:"",items:["entryHoverEffect","autoclose"]},{type:"row",title:"Divider",items:["dividerWidth","dividerStyle"]},{type:"row",title:"Icon",items:["icon","iconMaxWidth"]},{type:"row",title:"",items:["iconAnimation"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Question",items:["questionFontFamily","questionFontSettings",{type:"row",items:["questionFontSize","questionLineHeight","questionLetterSpacing","questionWordSpacing"]},"questionTextAppearance"]},{type:"group",title:"Answer",items:["answerFontFamily","answerFontSettings",{type:"row",items:["answerFontSize","answerLineHeight","answerLetterSpacing","answerWordSpacing"]},"answerTextAppearance"]}]}],paletteBookmark:{items:[...D0],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},B0={element:W0,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:z0,sourceCode:O0},ai=e=>e.display==="cover",_a=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},zc=100,j0=.2,Bc=8,qu=({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"?zc:Math.max(zc,window.innerHeight*j0),[]),y=s.useCallback($=>Math.max(0,1-$/(p*1.5)),[p]),v=s.useCallback($=>Math.max(0,1-$/(p*.45)),[p]),m=s.useCallback($=>{const P=typeof window<"u"?window.innerHeight:800,H=Math.max(.88,1-$/P*.12);return`translateY(${$}px) scale(${H})`},[]),g=s.useCallback(()=>{d.current=null},[]),x=s.useCallback(()=>{c(!0),r(0),window.setTimeout(()=>c(!1),n),g()},[n,g]),b=s.useCallback(()=>{const $=typeof window<"u"?window.innerHeight:800;c(!0),r($),window.setTimeout(()=>{t(),g(),c(!1)},Math.min(n,200))},[n,t,g]),E=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 P=d.current;if(!e||!P||$.pointerType!=="touch"||P.pointerId!==$.pointerId)return;const H=$.clientX-P.startX,W=$.clientY-P.startY;if(P.isLocked===null){if(Math.abs(H)<Bc&&Math.abs(W)<Bc)return;if(W>0&&W>Math.abs(H))P.isLocked=!0,$.currentTarget.setPointerCapture($.pointerId);else{P.isLocked=!1,g();return}}if(!P.isLocked)return;$.preventDefault();const C=Math.max(0,W);u.current=C,r(C)},[e,g]),w=s.useCallback($=>{const P=d.current;if(!e||!P||$.pointerType!=="touch"||P.pointerId!==$.pointerId)return;const H=P.isLocked===!0;if($.currentTarget.hasPointerCapture($.pointerId)&&$.currentTarget.releasePointerCapture($.pointerId),!H){g();return}$.clientY-P.startY>=p?b():x()},[p,b,e,g,x]),G=s.useCallback($=>{w($)},[w]),X=s.useCallback($=>{w($)},[w]),k=o>0,L=l?`transform ${n}ms ease`:"none",A=l?`opacity ${n}ms ease`:"none",U=o>0||l;return{isSwipeDragging:k,backdropStyle:{opacity:y(o),transition:A},mediaAreaStyle:{transform:m(o),transition:L,touchAction:k?"none":void 0,willChange:k?"transform":void 0},overlayContentStyle:U?{opacity:v(o),transition:A}:void 0,swipeHandlers:e?{onPointerDown:E,onPointerMove:f,onPointerUp:G,onPointerCancel:X}:{},dismissAreaStyle:e?{touchAction:k?"none":"pan-x"}:void 0}},V0="[data-lightbox-scrollable]",Uu=()=>{s.useEffect(()=>{const e=window.scrollY,t=document.body.style.overflow,n=document.body.style.position,i=document.body.style.top,o=document.body.style.width,r=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const l=c=>{const d=c.target;d instanceof Element&&d.closest(V0)||c.preventDefault()};return document.addEventListener("touchmove",l,{passive:!1}),()=>{document.removeEventListener("touchmove",l),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=r,window.scrollTo({top:e,left:0,behavior:"instant"})}},[])},G0=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},X0=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},q0=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},U0=(e,t,n,{duration:i,easing:o,onComplete:r})=>{const l=e.scrollLeft,c=n-l,d=l-n,u=(g,x)=>{X0(t),e.scrollLeft=g,x&&(r==null||r())};if(Math.abs(c)<.5)return u(n,!0),()=>{};let p=!1,y=0;const v=()=>{t.removeEventListener("transitionend",m),clearTimeout(y)},m=g=>{g.target!==t||g.propertyName!=="transform"||p||(p=!0,v(),u(n,!0))};return t.addEventListener("transitionend",m),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${d}px, 0, 0)`,y=window.setTimeout(()=>{p||(p=!0,v(),u(n,!0))},i+64),()=>{p||(p=!0,v(),u(l-q0(t),!1))}},sr=300,K0=900,Y0=1500,Z0="cubic-bezier(0.16, 1, 0.3, 1)",J0=3e3,Q0=2,ex=16,tx=.05,nx=1,zr=.3,ix=50,ox=20,ro=.004,Fo=["title1","title2","title3"],rx={title1:"1",title2:"2",title3:"3"},ax={title1:"title1Color",title2:"title2Color",title3:"title3Color"},sx={title1:.02,title2:.02,title3:.02},Br=e=>`max(${e}, ${ox}px)`,lx=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]}},cx=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=lx(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Zt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,dx=e=>[Zt(e,"fontFamily"),Zt(e,"fontSettings"),{type:"row",items:[Zt(e,"fontSize"),Zt(e,"lineHeight"),Zt(e,"letterSpacing"),Zt(e,"wordSpacing")]},Zt(e,"textAlign"),Zt(e,"textAppearance")],ux=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Fo.map(e=>[rx[e],dx(e)]))}),Fl=(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},Ku=(e,t)=>Fl(e,t),jr=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},jc=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Fl(e.length,n),effective:Ku(e.length,n)}},px=(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},rs=(e,t)=>{const n=i=>{const o=Zt(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[ax[t]]}},mx=(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),as=(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??sx[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Qt(i,n)},gx=({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:m,closeIconColor:g,closeIconHoverColor:x,thumbnailTrigger:b,thumbnailVisibility:E,thumbnailObjectFit:f,thumbnailActive:w,thumbnailActiveColor:G,title1Width:X,title2Width:k,title3Width:L,title1MarginLeft:A=0,title2MarginLeft:U=0,title3MarginLeft:$=0,titleRowMarginBottom:P=0,titleHeaderLayout:H="desktop",contentMarginTop:W,iconMarginLeft:C}=n,T=M=>F.scalingValue(M,i??!1),B=d??n.thumnailSize??.03,S=T(B),K=T(u),R=T(p??.02),_=T(y??0),j=T(W??0),oe=Br(j),re=T(C??0),[O,ie]=s.useState(0),D=s.useRef(O);D.current=O;const le=t[O],{title1:ee,title2:ve,title3:Ie}=cx(le),be=as("title1",rs(n,"title1"),i),pe=as("title2",rs(n,"title2"),i),Y=as("title3",rs(n,"title3"),i),se=H==="mobile",xe=!o&&(!i||r),Se=xe,Ce=xe,Ae=xe,fe=ai(f),we=fe?{"--image-aspect-ratio":_a(f)}:void 0,Te=!!(ee||ve||Ie),h=s.useMemo(()=>px(e,ee,ve,Ie,be,pe,Y),[e,O,ee,ve,Ie,be,pe,Y]),q=s.useMemo(()=>({title1Width:X,title2Width:k,title3Width:L}),[X,k,L]),Z=s.useMemo(()=>h.map(M=>q[M.widthKey]),[h,q]),te=s.useMemo(()=>Fl(h.length,Z),[h.length,Z]),ue=s.useMemo(()=>Ku(h.length,Z),[h.length,Z]),z=s.useMemo(()=>h.filter(M=>M.prefix==="title1"),[h]),I=s.useMemo(()=>h.filter(M=>M.prefix==="title2"||M.prefix==="title3"),[h]),Q=s.useMemo(()=>jc(z,q),[z,q]),ne=s.useMemo(()=>jc(I,q),[I,q]),de=s.useCallback((M,ae)=>{const ce=h.indexOf(M);if(!se||ae==="single-row")return{effectiveWidth:ue[ce]??0,resolvedWidth:te[ce]??0,maxWidth:jr(ce,te)};if(ae==="two-row-top"){const Ue=z.indexOf(M);return{effectiveWidth:Q.effective[Ue]??0,resolvedWidth:Q.resolved[Ue]??0,maxWidth:jr(Ue,Q.resolved)}}const ke=I.indexOf(M);return{effectiveWidth:ne.effective[ke]??0,resolvedWidth:ne.resolved[ke]??0,maxWidth:jr(ke,ne.resolved)}},[I,ne,ue,te,h,z,Q,se]),V=s.useCallback(M=>F.scalingValue(M,i??!1),[i]),Pe=V(P??0),he=s.useMemo(()=>({title1MarginLeft:A,title2MarginLeft:U,title3MarginLeft:$}),[A,U,$]),J=s.useCallback(M=>h.slice(0,M+1).reduce((ae,ce,ke)=>ae+(ce!=null&&ce.marginLeftKey?he[ce.marginLeftKey]??0:0)+(te[ke]??0),0)+(se?0:A??0),[h,he,te,se,A]),He=s.useCallback(()=>se?0:A??0,[se,A]),We=s.useCallback(M=>I.slice(0,M).reduce((ae,ce,ke)=>ae+(ce.marginLeftKey?he[ce.marginLeftKey]??0:0)+(ne.resolved[ke]??0),0),[I,ne.resolved,he]),ot=s.useCallback(M=>{const ae=I[M];return We(M)+(ae.marginLeftKey?he[ae.marginLeftKey]??0:0)+(ne.resolved[M]??0)},[I,ne.resolved,We,he]),qe=(M,ae)=>{const ce=M.marginLeftKey?he[M.marginLeftKey]??0:0,{effectiveWidth:ke,resolvedWidth:Ue,maxWidth:ct}=de(M,ae),Rt=o&&ae==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":M.prefix,style:{...ae==="single-row"?{gridArea:M.prefix}:{},width:V(ke),...ce>0?{marginLeft:V(ce)}:{}},children:[a.jsx("p",{className:M.className,style:M.style,children:M.text}),Rt&&M.marginLeftKey&&a.jsx("div",{"data-controls":M.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ue),style:{position:"absolute",top:0,left:V(-ce),width:`max(${V(ce)}, 10px)`,height:"100%",pointerEvents:"auto"}}),Rt&&a.jsx("div",{"data-controls":M.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ct),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:V(-ro/2),width:V(ro),height:"100%",pointerEvents:"auto"}})]},M.className)},nt=()=>{const M=se?-1:h.findIndex(ke=>ke.prefix==="title1"),ae=!se&&(o||(A??0)>0)?(()=>{const ke=A??0,Ue=M>=0?te[M]:X??0;return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ue),style:{position:"absolute",top:0,left:0,width:`max(${V(ke)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,ce=h.flatMap((ke,Ue)=>{if(!ke.marginLeftKey)return[];const ct=he[ke.marginLeftKey]??0,Rt=mx(h,te,he,Ue)+He();return a.jsx("div",{"data-controls":ke.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(te[Ue]),style:{position:"absolute",top:0,left:V(Rt),width:`max(${V(ct)}, 10px)`,height:"100%",pointerEvents:"auto"}},ke.marginLeftKey)});return ae?[ae,...ce]:ce},tt=()=>h.map((M,ae)=>{const ce=jr(ae,te),Ue=J(ae)-ro/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(ce),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:V(Ue),width:V(ro),height:"100%",pointerEvents:"auto"}})},`${M.widthKey}-junction`)}),Ve=()=>I.flatMap((M,ae)=>{if(!M.marginLeftKey)return[];const ce=he[M.marginLeftKey]??0,ke=We(ae),{resolvedWidth:Ue}=de(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(Ue),style:{position:"absolute",top:0,left:V(ke),width:`max(${V(ce)}, 10px)`,height:"100%",pointerEvents:"auto"}},M.marginLeftKey)}),ge=()=>I.map((M,ae)=>{const{maxWidth:ce}=de(M,"two-row-bottom"),Ue=ot(ae)-ro/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(ce),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:V(Ue),width:V(ro),height:"100%",pointerEvents:"auto"}})},`${M.widthKey}-junction`)}),_e=s.useRef(null),je=s.useRef(null),Ze=s.useRef(null),ye=s.useRef(null),Ne=s.useRef([]),Ke=s.useRef([]),Qe=s.useRef(0),st=s.useRef(null),rt=s.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),De=s.useRef(null),Me=s.useRef(null),gt=s.useRef(0),ze=s.useRef("forward"),Oe=s.useRef(0),Xe=s.useRef(null),lt=s.useRef(!1),me=t.length>1&&(!o||!!r),Re=me?3:1,it=s.useMemo(()=>Array.from({length:Re},()=>t).flat(),[t,Re]),[ht,Ge]=s.useState(!1),[St,Pt]=s.useState(!1),[kt,$t]=s.useState(!0),jt=s.useRef(null),Bt=s.useRef(null),Xt=s.useRef(!1),qt=s.useRef(!1),It=s.useRef(null),Dt=s.useRef(null),on=Se&&!kt,xt=s.useCallback(()=>{Se&&($t(!0),Dt.current&&clearTimeout(Dt.current),Dt.current=setTimeout(()=>{rt.current.isActive||$t(!1)},J0))},[Se]),ft=s.useCallback(()=>{o||qt.current||(qt.current=!0,Pt(!1),It.current=setTimeout(()=>{l()},sr))},[o,l]),Ee=()=>a.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":on?"true":"false",style:{width:F.scalingValue(m??0,i),height:F.scalingValue(m??0,i),marginRight:re,"--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:v,fill:g,hoverFill:i&&!r?g: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:re,height:"100%",pointerEvents:"auto"}})]}),et=(M="two-row")=>a.jsx("div",{...M==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:V(A??0),flexShrink:0,...M==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...M==="two-row"&&o?{pointerEvents:"auto"}:{}}}),Je=()=>{const M=h.find(ke=>ke.prefix==="title1"),ae=h.filter(ke=>ke.prefix==="title2"||ke.prefix==="title3"),ce=ae.length>0||o||(P??0)>0;return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`${e}-header-row-top`,children:[(A??0)>0||o?et():null,M&&qe(M,"two-row-top"),v&&Ee()]}),ce?a.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[ae.length>0?a.jsxs("div",{className:`${e}-header-row-bottom`,children:[ae.map(ke=>qe(ke,"two-row-bottom")),o&&a.jsxs(a.Fragment,{children:[Ve(),ge()]})]}):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:[(A??0)>0||o?et("single-row"):null,h.map(M=>qe(M,"single-row")),o?a.jsxs(a.Fragment,{children:[nt(),tt()]}):null,v?Ee():null]}),Tt=s.useCallback(M=>!!(M.closest("[data-controls]")||M.closest(`.${e}-thumbnails`)||M.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:vt,backdropStyle:ut,mediaAreaStyle:_t,overlayContentStyle:Mt,swipeHandlers:Ht,dismissAreaStyle:Ut}=qu({enabled:xe??!1,onClose:ft,animMs:sr,isBlockedTarget:Tt}),Et=()=>{if(!me||t.length===0)return Qe.current=0,0;const M=Ke.current[0],ae=Ke.current[t.length];if(!M||!ae)return Qe.current;const ce=ae.offsetLeft-M.offsetLeft;return ce>0&&(Qe.current=ce),Qe.current},Wt=(M=!1)=>{if(!me)return;const ae=je.current,ce=Et();!ae||ce<=0||ce<ae.clientWidth*.25||(ae.scrollLeft<=0?(ae.scrollLeft+=ce,M&&(rt.current.scrollLeft+=ce),lt.current&&(Oe.current+=ce)):ae.scrollLeft>=ce*2&&(ae.scrollLeft-=ce,M&&(rt.current.scrollLeft-=ce),lt.current&&(Oe.current-=ce)))},At=(M,ae=(ce=>(ce=je.current)==null?void 0:ce.scrollLeft)()??0)=>{if(!me)return M;let ke=t.length+M,Ue=1/0;for(let ct=0;ct<Re;ct++){const Rt=ct*t.length+M,Ot=Ke.current[Rt];if(!Ot)continue;const rn=Math.abs(Ot.offsetLeft-ae);rn<Ue&&(Ue=rn,ke=Rt)}return ke},pt=M=>{const ae=je.current;return!M||!ae?!1:M.offsetWidth>ae.clientWidth+1},N=M=>{const ae=je.current;if(!M||!ae||!pt(M))return!1;const ce=M.offsetLeft,ke=ce+M.offsetWidth;return ae.scrollLeft>=ce-1&&ae.scrollLeft+ae.clientWidth<=ke+1},Le=(M=(ae=>(ae=je.current)==null?void 0:ae.scrollLeft)()??0)=>{for(let ke=0;ke<Ke.current.length;ke+=1){const Ue=Ke.current[ke];if(Ue&&N(Ue))return ke}let ce={flatIndex:0,distance:1/0};return Ke.current.forEach((ke,Ue)=>{if(!ke)return;const ct=Math.abs(ke.offsetLeft-M);ct<ce.distance&&(ce={flatIndex:Ue,distance:ct})}),ce.flatIndex},Be=M=>{je.current&&Ke.current.forEach(ae=>{ae&&(ae.style.scrollSnapAlign=pt(ae)&&M==="backward"?"end":"start")})},Fe=(M,ae,ce)=>{const ke=M-ae,Ue=Le(ae),ct=Ke.current[Ue];if(N(ct))return Le(M)%t.length;const Rt=Ke.current[Ue+1],Ot=ct?Rt?Rt.offsetLeft-ct.offsetLeft:ct.offsetWidth:0,rn=Ot>0?ke>Ot*zr?1:ke<-Ot*zr?-1:0:0;return rn===0?ce:me?(ce+rn+t.length)%t.length:Math.max(0,Math.min(t.length-1,ce+rn))},mt=s.useCallback((M=!1)=>{if(E!=="on"||o)return;const ae=ye.current,ce=D.current,ke=Ne.current[ce];if(!ae||!ke||ae.scrollWidth<=ae.clientWidth)return;const Ue=ae.scrollLeft,ct=Ue+ae.clientWidth,Rt=ke.offsetLeft,Ot=Rt+ke.offsetWidth;if(Rt>=Ue&&Ot<=ct)return;const rn=ae.scrollWidth-ae.clientWidth;let nn=Ue;if(!M&&jt.current===null){const Fn=Ne.current[ce-1],ci=Ne.current[ce+1],no=Fn?ke.offsetLeft-Fn.offsetLeft:ci?ci.offsetLeft-ke.offsetLeft:ke.offsetWidth;Ot>ct?nn+=no:Rt<Ue&&(nn-=no)}else Ot>ct?nn=Ot-ae.clientWidth:nn=Rt;ae.scrollLeft=Math.max(0,Math.min(rn,nn))},[o,E]),Nt=s.useCallback((M=!1)=>{M&&(Xt.current=!0),Bt.current===null&&(Bt.current=requestAnimationFrame(()=>{Bt.current=null;const ae=Xt.current;Xt.current=!1,mt(ae)}))},[mt]),yt=s.useCallback(M=>{if(M===D.current)return;const ae=D.current;D.current=M;const ce=Math.abs(M-ae)>1,ke=me&&t.length>1&&(ae===t.length-1&&M===0||ae===0&&M===t.length-1);ie(M),Nt(ce||ke)},[t.length,me,Nt]),wt=()=>{if(!je.current||t.length===0||jt.current!==null||rt.current.isActive&&rt.current.hasMoved)return;const M=je.current.scrollLeft,ae=Le(M)%t.length;ae!==D.current&&yt(ae)},Kt=()=>{jt.current=null},zt=M=>{const ae=je.current;ae&&(ae.style.scrollSnapType=M?"":"none")},sn=()=>{var M;(M=Me.current)==null||M.call(Me),Me.current=null},ln=()=>{Xe.current!==null&&(cancelAnimationFrame(Xe.current),Xe.current=null),lt.current=!1},qn=()=>{const M=je.current;if(!M){Xe.current=null,lt.current=!1;return}const ae=Oe.current-M.scrollLeft;if(Math.abs(ae)<.5){M.scrollLeft=Oe.current,Wt(),wt(),Xe.current=null,lt.current=!1;return}M.scrollLeft+=ae*tx,Wt(),wt(),xt(),Xe.current=requestAnimationFrame(qn)},yn=()=>{const M=Ze.current;M&&(M.style.transition="",M.style.transform="",M.style.willChange="")},Un=(M,ae,ce,ke)=>{yn(),M.scrollLeft=ae,gt.current=M.scrollLeft,Wt(),ce!==void 0?(D.current=ce,ie(ce)):wt(),zt(!0),ke==null||ke()},Mi=(M,{behavior:ae="smooth",activeIndex:ce,onComplete:ke}={})=>{const Ue=je.current,ct=Ze.current;if(!Ue||!ct)return;if(ln(),sn(),zt(!1),ae==="auto"){Un(Ue,M,ce,ke);return}const Rt=Math.abs(M-Ue.scrollLeft),Ot=G0(Rt,K0,Y0,Ue.clientWidth*.55);Me.current=U0(Ue,ct,M,{duration:Ot,easing:Z0,onComplete:()=>{Me.current=null,Un(Ue,M,ce,ke)}})},Qi=(M="smooth")=>{const ae=je.current;if(!ae||t.length===0)return;const ce=Le()%t.length,ke=At(ce,ae.scrollLeft),Ue=Ke.current[ke];Ue&&Mi(Ue.offsetLeft,{behavior:M,activeIndex:ce})},Go=(M,ae="smooth",ce,ke)=>{const Ue=je.current;if(!Ue||t.length===0)return;const ct=(ke??Ue.scrollLeft)-M,Rt=Le(M),Ot=Ke.current[Rt];if(N(Ot)){zt(!0),wt();return}const rn=Ke.current[Rt+1],nn=Ot?rn?rn.offsetLeft-Ot.offsetLeft:Ot.offsetWidth:0;if((nn>0?ct>nn*zr?1:ct<-nn*zr?-1:0:0)!==0){const kr=ce??Rt%t.length,Wa=Fe(ke??Ue.scrollLeft,M,kr);pn(Wa,ae);return}const ci=ke??Ue.scrollLeft,no=Le(ci),Ai=Ke.current[no];if(Ai&&Math.abs(Ai.offsetLeft-ci)<1){zt(!0),wt();return}Qi("auto")},pn=(M,ae="smooth")=>{const ce=je.current;if(!ce||t.length===0)return;const ke=At(M,ce.scrollLeft),Ue=Ke.current[ke];Ue&&(ae==="smooth"?jt.current=M:jt.current=null,D.current=M,ie(M),Nt(!0),Mi(Ue.offsetLeft,{behavior:ae,activeIndex:M,onComplete:ae==="smooth"?Kt:void 0}))},An=()=>{De.current&&(window.removeEventListener("pointerup",De.current),window.removeEventListener("pointercancel",De.current),De.current=null)},In=(M,ae,ce,ke,Ue)=>{const ct=ce-M,Rt=ke-ae,Ot=Math.abs(ct),rn=Math.abs(Rt);if(Ot<ix||Ot<=rn)return!1;const nn=ct<0?1:-1,Fn=me?(Ue+nn+t.length)%t.length:Math.max(0,Math.min(t.length-1,Ue+nn));return Fn===Ue?!1:(pn(Fn),!0)},Kn=M=>{if(!rt.current.isActive)return;An();const ae=je.current;if(!ae)return;const{scrollLeft:ce,startActiveIndex:ke,hasMoved:Ue}=rt.current,ct=ae.scrollLeft;Wt(!0),rt.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},Ge(!1),M!==void 0&&ae.hasPointerCapture(M)&&ae.releasePointerCapture(M),Ue?Go(ce,"smooth",ke,ct):(zt(!0),wt()),xt()},eo=(M,ae)=>{const ce=st.current;st.current=null,ce&&(In(ce.startX,ce.startY,M,ae,ce.startActiveIndex),xt())},Xo=M=>{if(!Ce)return;if(M.pointerType==="touch"){if(ln(),zt(!0),Tt(M.target))return;st.current={startX:M.clientX,startY:M.clientY,startActiveIndex:D.current};return}if(M.pointerType!=="mouse"||M.button!==0||Tt(M.target))return;const ae=je.current;if(!ae)return;ln(),sn(),yn(),jt.current=null,rt.current={isActive:!0,startX:M.clientX,scrollLeft:ae.scrollLeft,startActiveIndex:D.current,hasMoved:!1},zt(!1),xt(),ae.setPointerCapture(M.pointerId),An();const ce=ke=>{ke.pointerType==="mouse"&&Kn(ke.pointerId)};De.current=ce,window.addEventListener("pointerup",ce),window.addEventListener("pointercancel",ce)},to=M=>{if(!Ce||M.pointerType!=="mouse")return;const ae=je.current;if(!ae||!rt.current.isActive)return;if(M.buttons===0){Kn(M.pointerId);return}const ce=M.clientX-rt.current.startX;Math.abs(ce)>nx&&(rt.current.hasMoved=!0,Ge(!0)),rt.current.hasMoved&&(M.preventDefault(),ae.scrollLeft=rt.current.scrollLeft-ce,Wt(!0),wt(),xt())},$e=M=>{if(Ce){if(M.pointerType==="touch"){M.type==="pointerup"?eo(M.clientX,M.clientY):st.current=null;return}M.pointerType==="mouse"&&Kn(M.pointerId)}},Ye=M=>{!Ce||M.pointerType!=="mouse"||Kn(M.pointerId)};return Uu(),s.useEffect(()=>{const M=requestAnimationFrame(()=>Pt(!0));return()=>{cancelAnimationFrame(M),sn(),An(),Bt.current!==null&&(cancelAnimationFrame(Bt.current),Bt.current=null),It.current&&clearTimeout(It.current),Dt.current&&clearTimeout(Dt.current)}},[]),s.useEffect(()=>{if(!Se){$t(!0);return}xt();const M=()=>xt();return document.addEventListener("pointermove",M,{passive:!0}),document.addEventListener("pointerdown",M,{passive:!0}),()=>{document.removeEventListener("pointermove",M),document.removeEventListener("pointerdown",M),Dt.current&&clearTimeout(Dt.current)}},[Se,xt]),s.useEffect(()=>{const M=ae=>{ae.key==="Escape"&&ft()};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[ft]),s.useLayoutEffect(()=>{Et()},[_,t.length,me]),s.useLayoutEffect(()=>{o||pn(D.current,"auto")},[_,o]),s.useLayoutEffect(()=>{pn(0,"auto")},[t.length,me]),s.useEffect(()=>{const M=je.current;if(!M||o||!xe)return;const ae=ce=>{if(ce.preventDefault(),Math.abs(ce.deltaY)<=Math.abs(ce.deltaX))return;const ke=ce.deltaMode===1?ex:ce.deltaMode===2?M.clientHeight:1,Ue=ce.deltaY*ke*Q0;if(Ue!==0){if(sn(),lt.current||(lt.current=!0,Oe.current=M.scrollLeft,jt.current=null,zt(!1)),Oe.current+=Ue,!me){const ct=M.scrollWidth-M.clientWidth;Oe.current=Math.max(0,Math.min(ct,Oe.current))}xt(),Xe.current===null&&(Xe.current=requestAnimationFrame(qn))}};return M.addEventListener("wheel",ae,{passive:!1}),()=>{M.removeEventListener("wheel",ae),ln()}},[o,xe,me]),s.useEffect(()=>{const M=je.current;if(!M)return;const ae=()=>{Wt(rt.current.isActive);const ke=M.scrollLeft,Ue=ke-gt.current;gt.current=ke;const ct=Qe.current>0?Qe.current*.5:1/0;if(Ue!==0&&Math.abs(Ue)<ct){const Rt=Ue>0?"forward":"backward";Rt!==ze.current&&(ze.current=Rt,Be(Rt))}rt.current.isActive&&rt.current.hasMoved||wt()};M.addEventListener("scroll",ae,{passive:!0});const ce=new ResizeObserver(()=>{Et(),Wt(rt.current.isActive),Be(ze.current),wt()});return ce.observe(M),()=>{sn(),M.removeEventListener("scroll",ae),ce.disconnect()}},[t.length,me]),a.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{vt||ft()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:St?1:0,transition:`opacity ${sr}ms ease`,pointerEvents:St?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:c,...ut}}),a.jsxs("div",{ref:_e,className:`${e}-lightbox-dismiss-area`,style:Ut,...Ht,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:_t,onClick:M=>M.stopPropagation(),children:a.jsx("div",{ref:je,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":Ce&&t.length>0?"true":"false","data-mouse-dragging":ht?"true":"false",onPointerDown:Xo,onPointerMove:to,onPointerUp:$e,onPointerCancel:$e,onLostPointerCapture:Ye,children:a.jsx("div",{ref:Ze,className:`${e}-lightbox-strip-track`,style:{gap:_},children:it.map((M,ae)=>{const ce=M.image.objectFit??"contain",ke=ae%t.length,Ue=Math.floor(ae/t.length),ct=Br(_),Rt=`calc(-0.5 * (${ct} + ${_}))`;return a.jsxs("div",{ref:Ot=>Ke.current[ae]=Ot,className:`${e}-strip-item`,style:{height:H==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[a.jsx("img",{src:M.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:ce}}),o&&ke<t.length-1&&Ue===0&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Rt,width:ct,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Ue}-${M.image.url}-${ke}`)})})})}),a.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":on?"true":"false",style:Mt,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:oe,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:(Te||v)&&a.jsx("div",{className:`${e}-header ${se?`${e}-header-two-row`:`${e}-header-single-row`}`,children:se?Je():Te||v?dt():null})})})]}),t.length>1&&E==="on"&&(()=>{const M=Br(R),ae=`calc(-0.5 * (${R} + ${M}))`;return a.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:R},children:a.jsx("div",{ref:ye,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:ce=>ce.stopPropagation(),children:a.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":w,style:{gap:K,"--thumbnail-active-color":G},children:[t.map((ce,ke)=>{const Ue=Br(K),ct=`calc(-0.5 * (${Ue} + ${K}))`;return a.jsxs("div",{ref:Rt=>{Ne.current[ke]=Rt},style:{position:"relative",flex:"0 0 auto"},children:[a.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":O===ke?"true":"false",onClick:()=>xe&&b==="click"&&pn(ke),onMouseEnter:()=>Ae&&b==="hover"&&pn(ke),"aria-label":ce.image.name?`View ${ce.image.name}`:`View image ${ke+1}`,"aria-current":O===ke?"true":void 0,children:a.jsx("img",{className:`${e}-thumb-image${fe?` ${e}-thumb-image-cover`:""}`,src:ce.image.url,alt:"",draggable:!1,style:{...we,maxWidth:S,maxHeight:S,width:f.display==="cover"?"auto":"100%",height:"auto",objectFit:f.display==="cover"?"cover":"contain"}})}),o&&ke<t.length-1&&a.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:ct,width:Ue,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${ce.image.url}-${ke}`)}),o&&a.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:ae,height:M,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function hx(e){return`
14323
14325
  .${e}-wrapper {
14324
14326
  position: relative;
14325
14327
  width: 100%;
@@ -14704,7 +14706,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
14704
14706
  pointer-events: auto;
14705
14707
  z-index: 10;
14706
14708
  }
14707
- `}const fx=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r})=>{const{prefix:l}=_.useScopedStyles(),{cover:d,coverFit:c}=e,u=s.useRef(null),[p,x]=s.useState(!1),y=t??[],m=p&&y.length>0,g=()=>{y.length!==0&&x(!0)};return s.useEffect(()=>{!n||i||o||x(!1)},[n,i,o]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:u,className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:hx(l)}}),d&&a.jsx("div",{className:`${l}-cover ${ri(c)?`${l}-ratio-wrapper-cover`:`${l}-ratio-wrapper-fit`}`,onClick:()=>g(),style:{...ri(c)?{"--image-aspect-ratio":_a(c)}:{}},"aria-label":"Open image gallery",children:a.jsx("img",{className:`${l}-cover-image ${ri(c)?`${l}-cover-image-cover`:`${l}-cover-image-fit`}`,src:d,alt:"cover"})})]}),m&&typeof document<"u"&&(()=>{const v=(r?document.getElementById(r):null)??document.body;return li.createPortal(a.jsx(gx,{prefix:l,images:y,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>x(!1)}),v)})()]})},yx=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
14709
+ `}const fx=({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??[],m=p&&v.length>0,g=()=>{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:hx(l)}}),c&&a.jsx("div",{className:`${l}-cover ${ai(d)?`${l}-ratio-wrapper-cover`:`${l}-ratio-wrapper-fit`}`,onClick:()=>g(),style:{...ai(d)?{"--image-aspect-ratio":_a(d)}:{}},"aria-label":"Open image gallery",children:a.jsx("img",{className:`${l}-cover-image ${ai(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 Gn.createPortal(a.jsx(gx,{prefix:l,images:v,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>y(!1)}),x)})()]})},yx=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
14708
14710
  import { createPortal } from 'react-dom';
14709
14711
  import { CommonComponentProps } from '../props';
14710
14712
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -15250,7 +15252,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
15250
15252
  </>
15251
15253
  );
15252
15254
  };
15253
- `,vx="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),Oi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function xx(e){const t={};return t[Zt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Zt(e,"fontSettings")]={...Oi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Zt(e,"fontSize")]={...Oi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Zt(e,"lineHeight")]={...Oi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Zt(e,"letterSpacing")]={...Oi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Zt(e,"wordSpacing")]={...Oi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Zt(e,"textAlign")]={...Oi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Zt(e,"textAppearance")]={...Oi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const bx=Fo.reduce((e,t)=>({...e,...xx(t)}),{}),Sx=Fo.reduce((e,t)=>({...e,[Zt(t,"fontFamily")]:"Goudy Bookletter 1911",[Zt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Zt(t,"letterSpacing")]:0,[Zt(t,"wordSpacing")]:0,[Zt(t,"textAlign")]:"left",[Zt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ss(e){return Fo.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Zt(n,"fontSize")]=i),o!==void 0&&(t[Zt(n,"lineHeight")]=o),t},{})}const wx=ux(),$x={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"}},...bx,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},iconMarginLeft:{type:"number",scope:"layout",title:"Icon margin left",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:vx,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...Sx},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,...ss({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,...ss({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,...ss({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:[wx]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"}},title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"}]}},Cx={element:fx,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:$x,sourceCode:yx,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Fo.map(e=>({path:`${Zt(e,"fontFamily")}`}))]},fontRelations:{...Fo.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Zt(t,"fontFamily")}`}),{})}},Tx=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,initialSlideIndex:l=0,enableUrlSync:d=!1,journalItemId:c=null,onBeforeClose:u,onClose:p})=>{const{type:x,coverFit:y,backgroundColor:m,imageGap:g,maxWidth:v,maxHeight:b,textTransition:E,title1Width:f,title2Width:w,title3Width:G,title1MarginLeft:X=0,title2MarginLeft:M=0,title3MarginLeft:T=0,titleRowMarginBottom:N=0,titleHeaderLayout:q="single-row",countCloseGap:$=0,closeIcon:I,closeIconMaxWidth:W,closeIconColor:O,closeIconHoverColor:C,contentMarginTop:L=0,iconMarginRight:z=0}=n,S=s.useCallback(Se=>_.scalingValue(Se,i??!1),[i]),K=S(g??0),k=`${v}%`,H=`${b}%`,j=S($),ne=S(L),oe=S(z),R=Vi("title1",ji(n,"title1"),i),ce=Vi("title2",ji(n,"title2"),i),D=Vi("title3",ji(n,"title3"),i),le=Vi("count",ji(n,"count"),i),ie=q==="mobile",we=!i||!!r,Ie=!o&&(!i||!!r),xe=s.useMemo(()=>aa(t,x),[t,x]),[pe,Y]=s.useState(l),ae=xe[pe],se=ae==null?void 0:ae.entry,[Re,$e]=s.useState(!1),[Me,ve]=s.useState(null),[be,Ce]=s.useState(!1),[h,U]=s.useState(null),[Z,te]=s.useState(!1),[me,B]=s.useState(0),[P,Q]=s.useState(),[ee,de]=s.useState(),[V,Pe]=s.useState(null),he=s.useRef(null),J=s.useRef(0),Ne=s.useRef(0),Be=s.useRef(0),at=s.useRef(!1),Ue=s.useRef(null),nt=s.useRef(null),Ze=s.useRef(null),Xe=s.useRef(null),fe=s.useRef(null),He=s.useRef(null),We=s.useRef(null),Qe=s.useCallback(()=>{const Se=nt.current;if(!Se)return;const Je=Se.closest(`.${e}-lightbox-content-area`);if(!Je)return Se.getBoundingClientRect().width;const F=Array.from(Je.children).reduce((re,ue)=>!(ue instanceof HTMLElement)||ue.contains(Se)?re:re+ue.getBoundingClientRect().width,0);return Je.getBoundingClientRect().width-F},[e]),ye=s.useCallback(()=>{he.current&&(clearTimeout(he.current),he.current=null)},[]),_e=s.useCallback(Se=>{Se===J.current&&(U(null),te(!1))},[]),Ge=s.useCallback(()=>{o||at.current||(at.current=!0,u==null||u(),$e(!1),Ue.current=setTimeout(()=>{p()},300))},[o,u,p]),et=s.useCallback(Se=>!!(Se.closest("[data-controls]")||Se.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:mt,backdropStyle:rt,mediaAreaStyle:Oe,overlayContentStyle:Fe,swipeHandlers:Ke,dismissAreaStyle:it}=qu({enabled:Ie,onClose:Ge,animMs:300,isBlockedTarget:et}),De=s.useCallback(Se=>{d&&Ru(Se+1,c,!0)},[d,c]),qe=s.useCallback(Se=>{if(Se)return Se.getBoundingClientRect().height},[]),ut=s.useCallback(Se=>{if(xe.length===0)return;const Je=(Se%xe.length+xe.length)%xe.length;if(Je===pe)return;const F=xe[pe],re=xe[Je];J.current+=1;const ue=J.current,Ee=E==="fade"&&vc(F==null?void 0:F.entry)!==vc(re==null?void 0:re.entry),Ye=qe(Ze.current),dt=Ee?(()=>{const Wt=Qe();li.flushSync(()=>{Pe(re.entry)}),Ze.current&&Wt&&(Ze.current.style.width=`${Wt}px`);const rn=qe(Ze.current);return Ze.current&&(Ze.current.style.width=""),{measuredIncomingTitlesHeight:rn,incomingTitlesMeasureWidth:Wt}})():void 0,Pt=Math.max(Ye??0,(dt==null?void 0:dt.measuredIncomingTitlesHeight)??0)||void 0;B(ue),U(pe),te(!0),Y(Je),De(Je),Be.current=Je,Ee?(ye(),Pt&&Q(Pt),dt!=null&&dt.incomingTitlesMeasureWidth&&de(dt.incomingTitlesMeasureWidth),ve((F==null?void 0:F.entryIndex)??null),Ce(!0),Ne.current=re.entryIndex,he.current=setTimeout(()=>{ve(null),Ce(!1),Q(void 0),de(void 0),Pe(null),he.current=null},400)):(ye(),ve(null),Ce(!1),Q(void 0),de(void 0),Pe(null),Ne.current=re.entryIndex)},[pe,ye,Qe,qe,xe,De,E]),ge=s.useCallback(()=>{We.current=null},[]),ke=s.useCallback(Se=>{!we||xe.length<=1||Se.pointerType==="mouse"&&Se.button!==0||Se.target.closest("[data-controls]")||(We.current={startX:Se.clientX,startY:Se.clientY,pointerId:Se.pointerId})},[we,xe.length]),ot=s.useCallback(Se=>{var Wt;if(!we||xe.length<=1||Se.pointerType==="mouse"&&Se.button!==0)return;if(mt){ge();return}const Je=We.current;if(!Je||Je.pointerId!==Se.pointerId||(ge(),Se.target.closest("[data-controls]")))return;const re=Se.clientX-Je.startX,ue=Se.clientY-Je.startY,Ee=Math.abs(re),Ye=Math.abs(ue);if(Ee>=Hy&&Ee>Ye){ut(re>0?pe-1:pe+1);return}if(Ee>gc||Ye>gc)return;const dt=(Wt=Xe.current)==null?void 0:Wt.getBoundingClientRect(),Pt=dt?dt.left+dt.width/2:window.innerWidth/2;ut(Se.clientX<Pt?pe-1:pe+1)},[pe,we,ut,mt,ge,xe.length]),gt=s.useCallback(Se=>{const Je=We.current;(Je==null?void 0:Je.pointerId)===Se.pointerId&&ge()},[ge]);Uu(),s.useEffect(()=>{He.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const Se=requestAnimationFrame(()=>{$e(!0),requestAnimationFrame(()=>{fe.current?fe.current.focus():Xe.current&&Xe.current.focus()})});return()=>{cancelAnimationFrame(Se),Ue.current&&clearTimeout(Ue.current),he.current&&clearTimeout(he.current);const Je=He.current;Je&&document.contains(Je)&&Je.focus({preventScroll:!0})}},[]),s.useEffect(()=>{var Se;E!=="fade"&&(Ne.current=((Se=xe[pe])==null?void 0:Se.entryIndex)??0,ye(),ve(null),Ce(!1),Q(void 0),de(void 0))},[pe,ye,xe,E]),s.useEffect(()=>{const Se=Je=>{if(Je.key==="Escape"){Ge();return}if(Je.key==="ArrowLeft"&&xe.length>1){ut(pe-1);return}if(Je.key==="ArrowRight"&&xe.length>1){ut(pe+1);return}if(Je.key==="Tab"&&Xe.current){const F=Xe.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),re=Array.from(F).filter(dt=>!dt.closest('[aria-hidden="true"]'));if(re.length===0)return;const ue=re[0],Ee=re[re.length-1],Ye=document.activeElement;Je.shiftKey?(Ye===ue||!Xe.current.contains(Ye))&&(Je.preventDefault(),Ee.focus()):(Ye===Ee||!Xe.current.contains(Ye))&&(Je.preventDefault(),ue.focus())}};return window.addEventListener("keydown",Se),()=>window.removeEventListener("keydown",Se)},[ut,Ge,pe,xe.length]),s.useLayoutEffect(()=>{ye(),J.current=0,B(0),U(null),te(!1),ve(null),Ce(!1),Q(void 0),de(void 0),Pe(null),Y(Se=>{const Je=Math.max(0,xe.length-1);return Math.min(Se,Je)})},[ye,t.length,x,xe.length]),s.useLayoutEffect(()=>{var F;const Se=Math.max(0,xe.length-1),Je=Math.min(Math.max(0,l),Se);Be.current=Je,Ne.current=((F=xe[Je])==null?void 0:F.entryIndex)??0,Y(Je)},[l]);const je=Me!==null?t[Me]:null,vt=h!==null?xe[h]:null,It=(se==null?void 0:se.title1)||(se==null?void 0:se.title2)||(se==null?void 0:se.title3)||(je==null?void 0:je.title1)||(je==null?void 0:je.title2)||(je==null?void 0:je.title3),kt=Gy(x,xe,t),wt=I!==null,Dt=It||kt||wt,Bt=kt&&wt?{gap:j}:void 0,Xt=`${e}-titles-stack${ie?` ${e}-titles-stack-stacked`:""}`,qt=`${e}-titles-layer-out${ie?` ${e}-titles-layer-out-stacked`:""}`,Lt=`${e}-titles-layer-out`,Ot=(X??0)>0||o,nn=S(N),xt=s.useMemo(()=>({title1Width:f??So.title1Width,title2Width:w??So.title2Width,title3Width:G??So.title3Width}),[f,w,G]),Te=s.useMemo(()=>({title2MarginLeft:M,title3MarginLeft:T}),[M,T]),Ve=s.useMemo(()=>se?Si(e,se,R,ce,D):[],[e,se,R,ce,D]),st=s.useMemo(()=>Ve.map(Se=>xt[Se.widthKey]),[Ve,xt]),lt=s.useMemo(()=>Io(Ve.length,st),[Ve.length,st]),bt=s.useMemo(()=>hr(Ve.length,st),[Ve.length,st]),Tt=s.useMemo(()=>Ve.filter(Se=>Se.prefix==="title1"),[Ve]),tt=s.useMemo(()=>Ve.filter(Se=>Se.prefix==="title2"||Se.prefix==="title3"),[Ve]),Rt=s.useMemo(()=>wi(Tt,xt),[Tt,xt]),Mt=s.useMemo(()=>wi(tt,xt),[tt,xt]),At=s.useCallback((Se,Je)=>{const F=Ve.findIndex(ue=>ue.prefix===Se.prefix);if(!ie||Je==="single-row")return{effectiveWidth:bt[F]??0,resolvedWidth:lt[F]??0,maxWidth:hn(F,lt)};if(Je==="two-row-top"){const ue=Tt.findIndex(Ee=>Ee.prefix===Se.prefix);return{effectiveWidth:Rt.effective[ue]??0,resolvedWidth:Rt.resolved[ue]??0,maxWidth:hn(ue,Rt.resolved)}}const re=tt.findIndex(ue=>ue.prefix===Se.prefix);return{effectiveWidth:Mt.effective[re]??0,resolvedWidth:Mt.resolved[re]??0,maxWidth:hn(re,Mt.resolved)}},[Ve,tt,Mt,bt,lt,Tt,Rt,ie]),jt=s.useCallback(Se=>Au(Ve,lt,Te,Se)+(ie?0:X??0),[Ve,lt,Te,ie,X]),Ut=s.useCallback(()=>ie?0:X??0,[ie,X]),Et=s.useCallback(Se=>tt.slice(0,Se).reduce((Je,F,re)=>Je+(F.marginLeftKey?Te[F.marginLeftKey]??0:0)+(Mt.resolved[re]??0),0),[tt,Mt.resolved,Te]),Nt=s.useCallback(Se=>{const Je=tt[Se];return Et(Se)+(Je.marginLeftKey?Te[Je.marginLeftKey]??0:0)+(Mt.resolved[Se]??0)},[tt,Mt.resolved,Et,Te]),_t=s.useCallback((Se,Je,F)=>{if(!ie||F==="single-row"){const dt=Se.findIndex(on=>on.prefix===Je.prefix),Pt=Se.map(on=>xt[on.widthKey]),Wt=Io(Se.length,Pt);return{effectiveWidth:hr(Se.length,Pt)[dt]??0,resolvedWidth:Wt[dt]??0,maxWidth:hn(dt,Wt)}}if(F==="two-row-top"){const dt=Se.filter(on=>on.prefix==="title1"),Pt=dt.findIndex(on=>on.prefix===Je.prefix),{resolved:Wt,effective:rn}=wi(dt,xt);return{effectiveWidth:rn[Pt]??0,resolvedWidth:Wt[Pt]??0,maxWidth:hn(Pt,Wt)}}const re=Se.filter(dt=>dt.prefix==="title2"||dt.prefix==="title3"),ue=re.findIndex(dt=>dt.prefix===Je.prefix),{resolved:Ee,effective:Ye}=wi(re,xt);return{effectiveWidth:Ye[ue]??0,resolvedWidth:Ee[ue]??0,maxWidth:hn(ue,Ee)}},[xt,ie]),ht=(Se,Je,F)=>{const re=Se.marginLeftKey?Te[Se.marginLeftKey]??0:0,{effectiveWidth:ue,resolvedWidth:Ee,maxWidth:Ye}=F??At(Se,Je),dt=Math.max(re,ei),Pt=o&&Je==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":Se.prefix,style:{width:S(ue),...re>0?{marginLeft:S(re)}:{}},children:[a.jsx("p",{className:Se.className,style:Se.style,children:Se.text}),Pt&&Se.marginLeftKey?a.jsx("div",{"data-controls":Se.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ee),style:{position:"absolute",top:0,left:S(-re),width:S(dt),height:"100%",pointerEvents:"auto"}}):null,Pt?a.jsx("div",{"data-controls":Se.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ye),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:S(-Cn/2),width:S(Cn),height:"100%",pointerEvents:"auto"}}):null]},Se.className)},A=(Se="two-row")=>{const Je=Ve.findIndex(ue=>ue.prefix==="title1"),F=Je>=0?lt[Je]:xt.title1Width,re=Se==="two-row"&&o;return a.jsx("div",{...re?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(F)}:{},style:{width:S(X??0),flexShrink:0,alignSelf:"stretch",...re?{pointerEvents:"auto"}:{}}})},Le=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:R,"aria-hidden":"true",children:" "}),Ae=()=>a.jsx("span",{className:`${e}-entry-counter`,style:le,"aria-live":"polite","aria-atomic":"true",children:Vy(xe,pe,x,t)}),ze=()=>kt?o&&wt?a.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Ae(),a.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${Za(j)} + ${j}))`,width:Za(j),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Ae():null,pt=()=>!kt&&!wt?null:a.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Bt,children:[ze(),wt?St():null]}),zt=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[kt||It?Le():null,Ot?A("single-row"):null,Ht(se),a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),pt(),un()]}),ft=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[kt||It?Le():null,Ot?A("single-row"):null,a.jsxs("div",{className:`${e}-titles-row-titles`,style:be&&P?{minHeight:P}:void 0,children:[a.jsx("div",{ref:Ze,className:Xt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:yn(V||se)}),a.jsxs("div",{ref:nt,className:Xt,style:{position:be?"absolute":"relative",inset:be?0:void 0,width:"100%",...be&&ee?{width:ee,maxWidth:"100%"}:void 0},children:[je&&be?a.jsx("div",{className:`${qt} ${e}-titles-fade-out`,children:yn(je)}):null,a.jsx("div",{className:`${e}-titles-layer-in${be?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:yn(se)})]})]}),pt(),un()]}),St=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:_.scalingValue(W??0,i),height:_.scalingValue(W??0,i),marginRight:oe,"--close-icon-hover-color":C},children:[a.jsx("button",{ref:fe,type:"button",className:`${e}-close-icon-inner`,onClick:Ge,"aria-label":"Close",children:a.jsx(pn,{url:I??"",fill:O,hoverFill:i&&!r?O: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:oe,height:"100%",pointerEvents:"auto"}})]}),Kt=(Se,Je)=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[kt||It?Le():null,Ot?A("two-row"):null,Je!==void 0?a.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:Je},children:Se}):a.jsxs(a.Fragment,{children:[Se,a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),pt()]}),Ht=Se=>{if(!Se)return null;const Je=Si(e,Se,R,ce,D);return a.jsx(a.Fragment,{children:Je.map(F=>ht(F,"single-row",_t(Je,F,"single-row")))})},sn=Se=>{if(!Se)return null;const Je=Si(e,Se,R,ce,D),F=Je.find(re=>re.prefix==="title1");return F?ht(F,"two-row-top",_t(Je,F,"two-row-top")):null},gn=(Se,Je=!1)=>{const F=Se?Si(e,Se,R,ce,D):[],re=F.filter(Ye=>Ye.prefix==="title2"||Ye.prefix==="title3"),ue=o&&Je;return re.length>0||ue||(N??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[re.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[re.map(Ye=>ht(Ye,"two-row-bottom",_t(F,Ye,"two-row-bottom"))),Je&&o?a.jsxs(a.Fragment,{children:[Qi(),Go()]}):null]}):null,(N??0)>0||ue?a.jsx("div",{"data-controls":ue?"titleRowMarginBottom":void 0,"data-controls-axis":ue?"y":void 0,"data-controls-reverse":ue?"":void 0,className:ue?`${e}-control`:void 0,style:{height:nn,width:"100%",flexShrink:0,pointerEvents:ue?"auto":"none"}}):null]}):null},Xn=(Se,Je=!1)=>a.jsxs(a.Fragment,{children:[Kt(sn(Se)),gn(Se,Je)]}),yn=Se=>ie?a.jsx("div",{className:`${e}-titles-row-two-row`,children:Xn(Se)}):Se?a.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Ht(Se)}):null,qn=()=>{const Se=ie?-1:Ve.findIndex(re=>re.prefix==="title1"),Je=!ie&&(o||(X??0)>0)?(()=>{const re=X??0,ue=Se>=0?lt[Se]:xt.title1Width,Ee=Math.max(re,ei);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ue),style:{position:"absolute",top:0,left:0,width:S(Ee),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,F=Ve.flatMap((re,ue)=>{if(!re.marginLeftKey)return[];const Ee=Te[re.marginLeftKey]??0,Ye=Mu(Ve,lt,Te,ue)+Ut(),dt=Math.max(Ee,ei);return a.jsx("div",{"data-controls":re.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(lt[ue]),style:{position:"absolute",top:0,left:S(Ye),width:S(dt),height:"100%",pointerEvents:"auto"}},re.marginLeftKey)});return Je?[Je,...F]:F},Mi=()=>Ve.map((Se,Je)=>{const F=hn(Je,lt),ue=jt(Je)-Cn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Se.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(F),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:S(ue),width:S(Cn),height:"100%",pointerEvents:"auto"}})},`${Se.widthKey}-junction`)}),Qi=()=>tt.flatMap((Se,Je)=>{if(!Se.marginLeftKey)return[];const F=Te[Se.marginLeftKey]??0,re=Et(Je),ue=Math.max(F,ei),{resolvedWidth:Ee}=At(Se,"two-row-bottom");return a.jsx("div",{"data-controls":Se.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ee),style:{position:"absolute",top:0,left:S(re),width:S(ue),height:"100%",pointerEvents:"auto"}},Se.marginLeftKey)}),Go=()=>tt.map((Se,Je)=>{const{maxWidth:F}=At(Se,"two-row-bottom"),ue=Nt(Je)-Cn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Se.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(F),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:S(ue),width:S(Cn),height:"100%",pointerEvents:"auto"}})},`${Se.widthKey}-junction`)}),un=()=>!o||ie?null:a.jsxs(a.Fragment,{children:[qn(),Mi()]}),An=Se=>{const Je=!Se.objectFit&&ri(y);return{className:`${e}-slide-image-cell${Je?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:k,maxHeight:H,...Je?{"--image-aspect-ratio":_a(y)}:{}}}},In=Se=>Se.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":Se.objectFit}}:ri(y)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},Un=Se=>{if(Se.length===0)return null;const Je=Se.length>1,F=Za(K),re=`calc(-0.5 * (${F} + ${K}))`;if(Se.length===1){const ue=Se[0];return a.jsx("div",{...An(ue),children:a.jsx("img",{...In(ue),src:ue.url,alt:ue.name??"",draggable:!1})})}return a.jsx("div",{className:`${e}-slide-inner`,style:Je?{gap:K}:void 0,children:Se.map((ue,Ee)=>a.jsxs("div",{...An(ue),children:[a.jsx("img",{...In(ue),src:ue.url,alt:ue.name??"",draggable:!1}),o&&Je&&Ee<Se.length-1&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:re,width:F,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${ue.url}-${Ee}`))})},eo=!!(se!=null&&se.title2||se!=null&&se.title3||je!=null&&je.title2||je!=null&&je.title3||(N??0)>0||o),Xo=()=>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:Ze,className:Xt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Xn(V||se)}),a.jsxs("div",{ref:nt,className:`${e}-titles-row-two-row`,style:{...be&&P?{minHeight:P}:void 0,...be&&ee?{width:ee,maxWidth:"100%"}:void 0},children:[Kt(a.jsxs("div",{className:Xt,style:{position:be?"absolute":"relative",inset:be?0:void 0,width:"100%"},children:[je&&be?a.jsx("div",{className:`${Lt} ${e}-titles-fade-out`,children:sn(je)}):null,a.jsx("div",{className:`${e}-titles-layer-in${be?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:sn(se)})]}),be&&P?P:void 0),eo?a.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[je&&be?a.jsx("div",{className:`${qt} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:gn(je)}):null,a.jsx("div",{className:`${e}-titles-layer-in${be?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${ie?` ${e}-titles-layer-in-stacked`:""}`,children:gn(se,!0)})]}):null]})]}),to=()=>{const Se=eo;return a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...Se?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:Se?void 0:{flex:"0 0 auto",height:"auto"},children:Xn(se,!0)}),un()]})};return a.jsxs("div",{ref:Xe,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{mt||Ge()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:wt?void 0:-1,style:{opacity:Re?1:0,transition:"opacity 300ms ease",pointerEvents:Re?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:m,...rt}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:it,...Ke,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:Oe,onClick:Se=>Se.stopPropagation(),children:a.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":we&&xe.length>1?"true":"false",onPointerDown:we?ke:void 0,onPointerUp:we?ot:void 0,onPointerCancel:we?gt:void 0,children:a.jsxs("div",{className:`${e}-slide-stack`,children:[vt&&Z?a.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:Se=>{Se.target===Se.currentTarget&&_e(me)},children:a.jsx("div",{className:`${e}-slide-area`,children:Un(vt.images)})},`slide-out-${me}`):null,a.jsx("div",{className:`${e}-slide-layer-in${Z?` ${e}-slide-fade-in`:""}`,children:a.jsx("div",{className:`${e}-slide-area`,children:ae?Un(ae.images):null})},`slide-in-${me}-${pe}`)]})})}),a.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:Fe,children:[a.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:ne,width:"100%"}}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...ie?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${ie?` ${e}-lightbox-content-area-stacked`:""}`,children:Dt&&a.jsx("div",{className:`${e}-text-bar-cell${ie?` ${e}-text-bar-cell-stacked`:""}`,style:ie?void 0:{flex:1,minWidth:0,width:"100%"},children:ie?E==="fade"?Xo():to():E==="fade"?ft():zt()})})})]})]})]})};function Lx(e){return`
15255
+ `,vx="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),Oi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function xx(e){const t={};return t[Zt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Zt(e,"fontSettings")]={...Oi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Zt(e,"fontSize")]={...Oi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Zt(e,"lineHeight")]={...Oi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Zt(e,"letterSpacing")]={...Oi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Zt(e,"wordSpacing")]={...Oi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Zt(e,"textAlign")]={...Oi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Zt(e,"textAppearance")]={...Oi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const bx=Fo.reduce((e,t)=>({...e,...xx(t)}),{}),Sx=Fo.reduce((e,t)=>({...e,[Zt(t,"fontFamily")]:"Goudy Bookletter 1911",[Zt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Zt(t,"letterSpacing")]:0,[Zt(t,"wordSpacing")]:0,[Zt(t,"textAlign")]:"left",[Zt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ss(e){return Fo.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Zt(n,"fontSize")]=i),o!==void 0&&(t[Zt(n,"lineHeight")]=o),t},{})}const wx=ux(),$x={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"}},...bx,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},iconMarginLeft:{type:"number",scope:"layout",title:"Icon margin left",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:vx,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...Sx},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,...ss({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,...ss({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,...ss({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:[wx]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"}},title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"}]}},Cx={element:fx,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:$x,sourceCode:yx,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Fo.map(e=>({path:`${Zt(e,"fontFamily")}`}))]},fontRelations:{...Fo.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Zt(t,"fontFamily")}`}),{})}},Tx=({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:m,imageGap:g,maxWidth:x,maxHeight:b,textTransition:E,title1Width:f,title2Width:w,title3Width:G,title1MarginLeft:X=0,title2MarginLeft:k=0,title3MarginLeft:L=0,titleRowMarginBottom:A=0,titleHeaderLayout:U="single-row",countCloseGap:$=0,closeIcon:P,closeIconMaxWidth:H,closeIconColor:W,closeIconHoverColor:C,contentMarginTop:T=0,iconMarginRight:B=0}=n,S=s.useCallback($e=>F.scalingValue($e,i??!1),[i]),K=S(g??0),R=`${x}%`,_=`${b}%`,j=S($),oe=S(T),re=S(B),O=Vi("title1",ji(n,"title1"),i),ie=Vi("title2",ji(n,"title2"),i),D=Vi("title3",ji(n,"title3"),i),le=Vi("count",ji(n,"count"),i),ee=U==="mobile",ve=!i||!!r,Ie=!o&&(!i||!!r),be=s.useMemo(()=>aa(t,y),[t,y]),[pe,Y]=s.useState(l),se=be[pe],xe=se==null?void 0:se.entry,[Se,Ce]=s.useState(!1),[Ae,fe]=s.useState(null),[we,Te]=s.useState(!1),[h,q]=s.useState(null),[Z,te]=s.useState(!1),[ue,z]=s.useState(0),[I,Q]=s.useState(),[ne,de]=s.useState(),[V,Pe]=s.useState(null),he=s.useRef(null),J=s.useRef(0),He=s.useRef(0),We=s.useRef(0),ot=s.useRef(!1),qe=s.useRef(null),nt=s.useRef(null),tt=s.useRef(null),Ve=s.useRef(null),ge=s.useRef(null),_e=s.useRef(null),je=s.useRef(null),Ze=s.useCallback(()=>{const $e=nt.current;if(!$e)return;const Ye=$e.closest(`.${e}-lightbox-content-area`);if(!Ye)return $e.getBoundingClientRect().width;const M=Array.from(Ye.children).reduce((ae,ce)=>!(ce instanceof HTMLElement)||ce.contains($e)?ae:ae+ce.getBoundingClientRect().width,0);return Ye.getBoundingClientRect().width-M},[e]),ye=s.useCallback(()=>{he.current&&(clearTimeout(he.current),he.current=null)},[]),Ne=s.useCallback($e=>{$e===J.current&&(q(null),te(!1))},[]),Ke=s.useCallback(()=>{o||ot.current||(ot.current=!0,u==null||u(),Ce(!1),qe.current=setTimeout(()=>{p()},300))},[o,u,p]),Qe=s.useCallback($e=>!!($e.closest("[data-controls]")||$e.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:st,backdropStyle:rt,mediaAreaStyle:De,overlayContentStyle:Me,swipeHandlers:gt,dismissAreaStyle:ze}=qu({enabled:Ie,onClose:Ke,animMs:300,isBlockedTarget:Qe}),Oe=s.useCallback($e=>{c&&Ru($e+1,d,!0)},[c,d]),Xe=s.useCallback($e=>{if($e)return $e.getBoundingClientRect().height},[]),lt=s.useCallback($e=>{if(be.length===0)return;const Ye=($e%be.length+be.length)%be.length;if(Ye===pe)return;const M=be[pe],ae=be[Ye];J.current+=1;const ce=J.current,ke=E==="fade"&&vc(M==null?void 0:M.entry)!==vc(ae==null?void 0:ae.entry),Ue=Xe(tt.current),ct=ke?(()=>{const Ot=Ze();Gn.flushSync(()=>{Pe(ae.entry)}),tt.current&&Ot&&(tt.current.style.width=`${Ot}px`);const rn=Xe(tt.current);return tt.current&&(tt.current.style.width=""),{measuredIncomingTitlesHeight:rn,incomingTitlesMeasureWidth:Ot}})():void 0,Rt=Math.max(Ue??0,(ct==null?void 0:ct.measuredIncomingTitlesHeight)??0)||void 0;z(ce),q(pe),te(!0),Y(Ye),Oe(Ye),We.current=Ye,ke?(ye(),Rt&&Q(Rt),ct!=null&&ct.incomingTitlesMeasureWidth&&de(ct.incomingTitlesMeasureWidth),fe((M==null?void 0:M.entryIndex)??null),Te(!0),He.current=ae.entryIndex,he.current=setTimeout(()=>{fe(null),Te(!1),Q(void 0),de(void 0),Pe(null),he.current=null},400)):(ye(),fe(null),Te(!1),Q(void 0),de(void 0),Pe(null),He.current=ae.entryIndex)},[pe,ye,Ze,Xe,be,Oe,E]),me=s.useCallback(()=>{je.current=null},[]),Re=s.useCallback($e=>{!ve||be.length<=1||$e.pointerType==="mouse"&&$e.button!==0||$e.target.closest("[data-controls]")||(je.current={startX:$e.clientX,startY:$e.clientY,pointerId:$e.pointerId})},[ve,be.length]),it=s.useCallback($e=>{var Ot;if(!ve||be.length<=1||$e.pointerType==="mouse"&&$e.button!==0)return;if(st){me();return}const Ye=je.current;if(!Ye||Ye.pointerId!==$e.pointerId||(me(),$e.target.closest("[data-controls]")))return;const ae=$e.clientX-Ye.startX,ce=$e.clientY-Ye.startY,ke=Math.abs(ae),Ue=Math.abs(ce);if(ke>=Hy&&ke>Ue){lt(ae>0?pe-1:pe+1);return}if(ke>gc||Ue>gc)return;const ct=(Ot=Ve.current)==null?void 0:Ot.getBoundingClientRect(),Rt=ct?ct.left+ct.width/2:window.innerWidth/2;lt($e.clientX<Rt?pe-1:pe+1)},[pe,ve,lt,st,me,be.length]),ht=s.useCallback($e=>{const Ye=je.current;(Ye==null?void 0:Ye.pointerId)===$e.pointerId&&me()},[me]);Uu(),s.useEffect(()=>{_e.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const $e=requestAnimationFrame(()=>{Ce(!0),requestAnimationFrame(()=>{ge.current?ge.current.focus():Ve.current&&Ve.current.focus()})});return()=>{cancelAnimationFrame($e),qe.current&&clearTimeout(qe.current),he.current&&clearTimeout(he.current);const Ye=_e.current;Ye&&document.contains(Ye)&&Ye.focus({preventScroll:!0})}},[]),s.useEffect(()=>{var $e;E!=="fade"&&(He.current=(($e=be[pe])==null?void 0:$e.entryIndex)??0,ye(),fe(null),Te(!1),Q(void 0),de(void 0))},[pe,ye,be,E]),s.useEffect(()=>{const $e=Ye=>{if(Ye.key==="Escape"){Ke();return}if(Ye.key==="ArrowLeft"&&be.length>1){lt(pe-1);return}if(Ye.key==="ArrowRight"&&be.length>1){lt(pe+1);return}if(Ye.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"])'),ae=Array.from(M).filter(ct=>!ct.closest('[aria-hidden="true"]'));if(ae.length===0)return;const ce=ae[0],ke=ae[ae.length-1],Ue=document.activeElement;Ye.shiftKey?(Ue===ce||!Ve.current.contains(Ue))&&(Ye.preventDefault(),ke.focus()):(Ue===ke||!Ve.current.contains(Ue))&&(Ye.preventDefault(),ce.focus())}};return window.addEventListener("keydown",$e),()=>window.removeEventListener("keydown",$e)},[lt,Ke,pe,be.length]),s.useLayoutEffect(()=>{ye(),J.current=0,z(0),q(null),te(!1),fe(null),Te(!1),Q(void 0),de(void 0),Pe(null),Y($e=>{const Ye=Math.max(0,be.length-1);return Math.min($e,Ye)})},[ye,t.length,y,be.length]),s.useLayoutEffect(()=>{var M;const $e=Math.max(0,be.length-1),Ye=Math.min(Math.max(0,l),$e);We.current=Ye,He.current=((M=be[Ye])==null?void 0:M.entryIndex)??0,Y(Ye)},[l]);const Ge=Ae!==null?t[Ae]:null,St=h!==null?be[h]:null,Pt=(xe==null?void 0:xe.title1)||(xe==null?void 0:xe.title2)||(xe==null?void 0:xe.title3)||(Ge==null?void 0:Ge.title1)||(Ge==null?void 0:Ge.title2)||(Ge==null?void 0:Ge.title3),kt=Gy(y,be,t),$t=P!==null,jt=Pt||kt||$t,Bt=kt&&$t?{gap:j}:void 0,Xt=`${e}-titles-stack${ee?` ${e}-titles-stack-stacked`:""}`,qt=`${e}-titles-layer-out${ee?` ${e}-titles-layer-out-stacked`:""}`,It=`${e}-titles-layer-out`,Dt=(X??0)>0||o,on=S(A),xt=s.useMemo(()=>({title1Width:f??So.title1Width,title2Width:w??So.title2Width,title3Width:G??So.title3Width}),[f,w,G]),ft=s.useMemo(()=>({title2MarginLeft:k,title3MarginLeft:L}),[k,L]),Ee=s.useMemo(()=>xe?Si(e,xe,O,ie,D):[],[e,xe,O,ie,D]),et=s.useMemo(()=>Ee.map($e=>xt[$e.widthKey]),[Ee,xt]),Je=s.useMemo(()=>Io(Ee.length,et),[Ee.length,et]),dt=s.useMemo(()=>hr(Ee.length,et),[Ee.length,et]),Tt=s.useMemo(()=>Ee.filter($e=>$e.prefix==="title1"),[Ee]),vt=s.useMemo(()=>Ee.filter($e=>$e.prefix==="title2"||$e.prefix==="title3"),[Ee]),ut=s.useMemo(()=>wi(Tt,xt),[Tt,xt]),_t=s.useMemo(()=>wi(vt,xt),[vt,xt]),Mt=s.useCallback(($e,Ye)=>{const M=Ee.findIndex(ce=>ce.prefix===$e.prefix);if(!ee||Ye==="single-row")return{effectiveWidth:dt[M]??0,resolvedWidth:Je[M]??0,maxWidth:hn(M,Je)};if(Ye==="two-row-top"){const ce=Tt.findIndex(ke=>ke.prefix===$e.prefix);return{effectiveWidth:ut.effective[ce]??0,resolvedWidth:ut.resolved[ce]??0,maxWidth:hn(ce,ut.resolved)}}const ae=vt.findIndex(ce=>ce.prefix===$e.prefix);return{effectiveWidth:_t.effective[ae]??0,resolvedWidth:_t.resolved[ae]??0,maxWidth:hn(ae,_t.resolved)}},[Ee,vt,_t,dt,Je,Tt,ut,ee]),Ht=s.useCallback($e=>Au(Ee,Je,ft,$e)+(ee?0:X??0),[Ee,Je,ft,ee,X]),Ut=s.useCallback(()=>ee?0:X??0,[ee,X]),Et=s.useCallback($e=>vt.slice(0,$e).reduce((Ye,M,ae)=>Ye+(M.marginLeftKey?ft[M.marginLeftKey]??0:0)+(_t.resolved[ae]??0),0),[vt,_t.resolved,ft]),Wt=s.useCallback($e=>{const Ye=vt[$e];return Et($e)+(Ye.marginLeftKey?ft[Ye.marginLeftKey]??0:0)+(_t.resolved[$e]??0)},[vt,_t.resolved,Et,ft]),At=s.useCallback(($e,Ye,M)=>{if(!ee||M==="single-row"){const ct=$e.findIndex(nn=>nn.prefix===Ye.prefix),Rt=$e.map(nn=>xt[nn.widthKey]),Ot=Io($e.length,Rt);return{effectiveWidth:hr($e.length,Rt)[ct]??0,resolvedWidth:Ot[ct]??0,maxWidth:hn(ct,Ot)}}if(M==="two-row-top"){const ct=$e.filter(nn=>nn.prefix==="title1"),Rt=ct.findIndex(nn=>nn.prefix===Ye.prefix),{resolved:Ot,effective:rn}=wi(ct,xt);return{effectiveWidth:rn[Rt]??0,resolvedWidth:Ot[Rt]??0,maxWidth:hn(Rt,Ot)}}const ae=$e.filter(ct=>ct.prefix==="title2"||ct.prefix==="title3"),ce=ae.findIndex(ct=>ct.prefix===Ye.prefix),{resolved:ke,effective:Ue}=wi(ae,xt);return{effectiveWidth:Ue[ce]??0,resolvedWidth:ke[ce]??0,maxWidth:hn(ce,ke)}},[xt,ee]),pt=($e,Ye,M)=>{const ae=$e.marginLeftKey?ft[$e.marginLeftKey]??0:0,{effectiveWidth:ce,resolvedWidth:ke,maxWidth:Ue}=M??Mt($e,Ye),ct=Math.max(ae,ti),Rt=o&&Ye==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":$e.prefix,style:{width:S(ce),...ae>0?{marginLeft:S(ae)}:{}},children:[a.jsx("p",{className:$e.className,style:$e.style,children:$e.text}),Rt&&$e.marginLeftKey?a.jsx("div",{"data-controls":$e.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ke),style:{position:"absolute",top:0,left:S(-ae),width:S(ct),height:"100%",pointerEvents:"auto"}}):null,Rt?a.jsx("div",{"data-controls":$e.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ue),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:S(-Cn/2),width:S(Cn),height:"100%",pointerEvents:"auto"}}):null]},$e.className)},N=($e="two-row")=>{const Ye=Ee.findIndex(ce=>ce.prefix==="title1"),M=Ye>=0?Je[Ye]:xt.title1Width,ae=$e==="two-row"&&o;return a.jsx("div",{...ae?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(M)}:{},style:{width:S(X??0),flexShrink:0,alignSelf:"stretch",...ae?{pointerEvents:"auto"}:{}}})},Le=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:O,"aria-hidden":"true",children:" "}),Be=()=>a.jsx("span",{className:`${e}-entry-counter`,style:le,"aria-live":"polite","aria-atomic":"true",children:Vy(be,pe,y,t)}),Fe=()=>kt?o&&$t?a.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Be(),a.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${Za(j)} + ${j}))`,width:Za(j),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Be():null,mt=()=>!kt&&!$t?null:a.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Bt,children:[Fe(),$t?wt():null]}),Nt=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[kt||Pt?Le():null,Dt?N("single-row"):null,zt(xe),a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),mt(),pn()]}),yt=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[kt||Pt?Le():null,Dt?N("single-row"):null,a.jsxs("div",{className:`${e}-titles-row-titles`,style:we&&I?{minHeight:I}:void 0,children:[a.jsx("div",{ref:tt,className:Xt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:yn(V||xe)}),a.jsxs("div",{ref:nt,className:Xt,style:{position:we?"absolute":"relative",inset:we?0:void 0,width:"100%",...we&&ne?{width:ne,maxWidth:"100%"}:void 0},children:[Ge&&we?a.jsx("div",{className:`${qt} ${e}-titles-fade-out`,children:yn(Ge)}):null,a.jsx("div",{className:`${e}-titles-layer-in${we?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:yn(xe)})]})]}),mt(),pn()]}),wt=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:F.scalingValue(H??0,i),height:F.scalingValue(H??0,i),marginRight:re,"--close-icon-hover-color":C},children:[a.jsx("button",{ref:ge,type:"button",className:`${e}-close-icon-inner`,onClick:Ke,"aria-label":"Close",children:a.jsx(mn,{url:P??"",fill:W,hoverFill:i&&!r?W: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:re,height:"100%",pointerEvents:"auto"}})]}),Kt=($e,Ye)=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[kt||Pt?Le():null,Dt?N("two-row"):null,Ye!==void 0?a.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:Ye},children:$e}):a.jsxs(a.Fragment,{children:[$e,a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),mt()]}),zt=$e=>{if(!$e)return null;const Ye=Si(e,$e,O,ie,D);return a.jsx(a.Fragment,{children:Ye.map(M=>pt(M,"single-row",At(Ye,M,"single-row")))})},sn=$e=>{if(!$e)return null;const Ye=Si(e,$e,O,ie,D),M=Ye.find(ae=>ae.prefix==="title1");return M?pt(M,"two-row-top",At(Ye,M,"two-row-top")):null},ln=($e,Ye=!1)=>{const M=$e?Si(e,$e,O,ie,D):[],ae=M.filter(Ue=>Ue.prefix==="title2"||Ue.prefix==="title3"),ce=o&&Ye;return ae.length>0||ce||(A??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[ae.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[ae.map(Ue=>pt(Ue,"two-row-bottom",At(M,Ue,"two-row-bottom"))),Ye&&o?a.jsxs(a.Fragment,{children:[Qi(),Go()]}):null]}):null,(A??0)>0||ce?a.jsx("div",{"data-controls":ce?"titleRowMarginBottom":void 0,"data-controls-axis":ce?"y":void 0,"data-controls-reverse":ce?"":void 0,className:ce?`${e}-control`:void 0,style:{height:on,width:"100%",flexShrink:0,pointerEvents:ce?"auto":"none"}}):null]}):null},qn=($e,Ye=!1)=>a.jsxs(a.Fragment,{children:[Kt(sn($e)),ln($e,Ye)]}),yn=$e=>ee?a.jsx("div",{className:`${e}-titles-row-two-row`,children:qn($e)}):$e?a.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:zt($e)}):null,Un=()=>{const $e=ee?-1:Ee.findIndex(ae=>ae.prefix==="title1"),Ye=!ee&&(o||(X??0)>0)?(()=>{const ae=X??0,ce=$e>=0?Je[$e]:xt.title1Width,ke=Math.max(ae,ti);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ce),style:{position:"absolute",top:0,left:0,width:S(ke),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,M=Ee.flatMap((ae,ce)=>{if(!ae.marginLeftKey)return[];const ke=ft[ae.marginLeftKey]??0,Ue=Mu(Ee,Je,ft,ce)+Ut(),ct=Math.max(ke,ti);return a.jsx("div",{"data-controls":ae.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Je[ce]),style:{position:"absolute",top:0,left:S(Ue),width:S(ct),height:"100%",pointerEvents:"auto"}},ae.marginLeftKey)});return Ye?[Ye,...M]:M},Mi=()=>Ee.map(($e,Ye)=>{const M=hn(Ye,Je),ce=Ht(Ye)-Cn/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:S(ce),width:S(Cn),height:"100%",pointerEvents:"auto"}})},`${$e.widthKey}-junction`)}),Qi=()=>vt.flatMap(($e,Ye)=>{if(!$e.marginLeftKey)return[];const M=ft[$e.marginLeftKey]??0,ae=Et(Ye),ce=Math.max(M,ti),{resolvedWidth:ke}=Mt($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(ke),style:{position:"absolute",top:0,left:S(ae),width:S(ce),height:"100%",pointerEvents:"auto"}},$e.marginLeftKey)}),Go=()=>vt.map(($e,Ye)=>{const{maxWidth:M}=Mt($e,"two-row-bottom"),ce=Wt(Ye)-Cn/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:S(ce),width:S(Cn),height:"100%",pointerEvents:"auto"}})},`${$e.widthKey}-junction`)}),pn=()=>!o||ee?null:a.jsxs(a.Fragment,{children:[Un(),Mi()]}),An=$e=>{const Ye=!$e.objectFit&&ai(v);return{className:`${e}-slide-image-cell${Ye?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:R,maxHeight:_,...Ye?{"--image-aspect-ratio":_a(v)}:{}}}},In=$e=>$e.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":$e.objectFit}}:ai(v)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},Kn=$e=>{if($e.length===0)return null;const Ye=$e.length>1,M=Za(K),ae=`calc(-0.5 * (${M} + ${K}))`;if($e.length===1){const ce=$e[0];return a.jsx("div",{...An(ce),children:a.jsx("img",{...In(ce),src:ce.url,alt:ce.name??"",draggable:!1})})}return a.jsx("div",{className:`${e}-slide-inner`,style:Ye?{gap:K}:void 0,children:$e.map((ce,ke)=>a.jsxs("div",{...An(ce),children:[a.jsx("img",{...In(ce),src:ce.url,alt:ce.name??"",draggable:!1}),o&&Ye&&ke<$e.length-1&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:ae,width:M,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${ce.url}-${ke}`))})},eo=!!(xe!=null&&xe.title2||xe!=null&&xe.title3||Ge!=null&&Ge.title2||Ge!=null&&Ge.title3||(A??0)>0||o),Xo=()=>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:tt,className:Xt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:qn(V||xe)}),a.jsxs("div",{ref:nt,className:`${e}-titles-row-two-row`,style:{...we&&I?{minHeight:I}:void 0,...we&&ne?{width:ne,maxWidth:"100%"}:void 0},children:[Kt(a.jsxs("div",{className:Xt,style:{position:we?"absolute":"relative",inset:we?0:void 0,width:"100%"},children:[Ge&&we?a.jsx("div",{className:`${It} ${e}-titles-fade-out`,children:sn(Ge)}):null,a.jsx("div",{className:`${e}-titles-layer-in${we?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:sn(xe)})]}),we&&I?I:void 0),eo?a.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[Ge&&we?a.jsx("div",{className:`${qt} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:ln(Ge)}):null,a.jsx("div",{className:`${e}-titles-layer-in${we?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${ee?` ${e}-titles-layer-in-stacked`:""}`,children:ln(xe,!0)})]}):null]})]}),to=()=>{const $e=eo;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(xe,!0)}),pn()]})};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:$t?void 0:-1,style:{opacity:Se?1:0,transition:"opacity 300ms ease",pointerEvents:Se?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:m,...rt}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:ze,...gt,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":ve&&be.length>1?"true":"false",onPointerDown:ve?Re:void 0,onPointerUp:ve?it:void 0,onPointerCancel:ve?ht:void 0,children:a.jsxs("div",{className:`${e}-slide-stack`,children:[St&&Z?a.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:$e=>{$e.target===$e.currentTarget&&Ne(ue)},children:a.jsx("div",{className:`${e}-slide-area`,children:Kn(St.images)})},`slide-out-${ue}`):null,a.jsx("div",{className:`${e}-slide-layer-in${Z?` ${e}-slide-fade-in`:""}`,children:a.jsx("div",{className:`${e}-slide-area`,children:se?Kn(se.images):null})},`slide-in-${ue}-${pe}`)]})})}),a.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:Me,children:[a.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:oe,width:"100%"}}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...ee?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${ee?` ${e}-lightbox-content-area-stacked`:""}`,children:jt&&a.jsx("div",{className:`${e}-text-bar-cell${ee?` ${e}-text-bar-cell-stacked`:""}`,style:ee?void 0:{flex:1,minWidth:0,width:"100%"},children:ee?E==="fade"?Xo():to():E==="fade"?yt():Nt()})})})]})]})]})};function Lx(e){return`
15254
15256
  .${e}-wrapper {
15255
15257
  position: relative;
15256
15258
  width: 100%;
@@ -15772,7 +15774,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
15772
15774
  pointer-events: auto;
15773
15775
  z-index: 10;
15774
15776
  }
15775
- `}const Px=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r,metadata:l})=>{const{prefix:d}=_.useScopedStyles(),c=(l==null?void 0:l.itemId)??null,{cover:u,coverFit:p,type:x}=e,y=s.useRef(null),[m,g]=s.useState(!1),[v,b]=s.useState(0),E=s.useRef(!1),f=s.useRef(!1),w=s.useRef(!1),G=s.useMemo(()=>(t??[]).filter($=>Po($).length>0),[t]),X=m&&G.length>0,M=!n,T=s.useCallback(()=>{M&&(w.current=!0,Oy(f.current,c),f.current=!1)},[M,c]),N=($=0)=>{if(G.length===0||n&&!i&&!o)return;const I=aa(G,x),W=Math.max(0,Math.min($,I.length-1));if(b(W),M){const O=ku();Ru(W+1,c,O),f.current=!O}g(!0)},q=s.useCallback(()=>{g(!1),w.current=!1},[]);return s.useEffect(()=>{!n||i||o||g(!1)},[n,i,o]),s.useEffect(()=>{if(!M||typeof window>"u")return;const $=window.history.scrollRestoration;return window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration=$}},[M]),s.useEffect(()=>{if(!M||E.current)return;E.current=!0;const $=fc(c);if(!$)return;const I=yc($,aa(G,x).length);I<0||(b(I),g(!0))},[G,c,M,x]),s.useEffect(()=>{if(!M)return;const $=()=>{if(w.current){w.current=!1,g(!1);return}const I=fc(c);if(!I){g(!1);return}const W=yc(I,aa(G,x).length);if(W<0){g(!1);return}f.current=!1,b(W),g(!0)};return window.addEventListener("popstate",$),()=>window.removeEventListener("popstate",$)},[G,c,M,x]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:y,className:`${d}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Lx(d)}}),u?a.jsx("button",{type:"button",className:`${d}-cover ${ri(p)?`${d}-ratio-wrapper-cover`:`${d}-ratio-wrapper-fit`}`,onClick:()=>N(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...ri(p)?{"--image-aspect-ratio":_a(p)}:{}},"aria-label":"Open journal gallery",children:a.jsx("img",{className:`${d}-cover-image ${ri(p)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),X&&typeof document<"u"&&(()=>{const $=(r?document.getElementById(r):null)??document.body;return li.createPortal(a.jsx(Tx,{prefix:d,entries:G,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:v,enableUrlSync:M,journalItemId:c,onBeforeClose:T,onClose:q}),$)})()]})},Ix=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
15777
+ `}const Px=({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),[m,g]=s.useState(!1),[x,b]=s.useState(0),E=s.useRef(!1),f=s.useRef(!1),w=s.useRef(!1),G=s.useMemo(()=>(t??[]).filter($=>Po($).length>0),[t]),X=m&&G.length>0,k=!n,L=s.useCallback(()=>{k&&(w.current=!0,Oy(f.current,d),f.current=!1)},[k,d]),A=($=0)=>{if(G.length===0||n&&!i&&!o)return;const P=aa(G,y),H=Math.max(0,Math.min($,P.length-1));if(b(H),k){const W=ku();Ru(H+1,d,W),f.current=!W}g(!0)},U=s.useCallback(()=>{g(!1),w.current=!1},[]);return s.useEffect(()=>{!n||i||o||g(!1)},[n,i,o]),s.useEffect(()=>{if(!k||typeof window>"u")return;const $=window.history.scrollRestoration;return window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration=$}},[k]),s.useEffect(()=>{if(!k||E.current)return;E.current=!0;const $=fc(d);if(!$)return;const P=yc($,aa(G,y).length);P<0||(b(P),g(!0))},[G,d,k,y]),s.useEffect(()=>{if(!k)return;const $=()=>{if(w.current){w.current=!1,g(!1);return}const P=fc(d);if(!P){g(!1);return}const H=yc(P,aa(G,y).length);if(H<0){g(!1);return}f.current=!1,b(H),g(!0)};return window.addEventListener("popstate",$),()=>window.removeEventListener("popstate",$)},[G,d,k,y]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:v,className:`${c}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Lx(c)}}),u?a.jsx("button",{type:"button",className:`${c}-cover ${ai(p)?`${c}-ratio-wrapper-cover`:`${c}-ratio-wrapper-fit`}`,onClick:()=>A(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...ai(p)?{"--image-aspect-ratio":_a(p)}:{}},"aria-label":"Open journal gallery",children:a.jsx("img",{className:`${c}-cover-image ${ai(p)?`${c}-cover-image-cover`:`${c}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),X&&typeof document<"u"&&(()=>{const $=(r?document.getElementById(r):null)??document.body;return Gn.createPortal(a.jsx(Tx,{prefix:c,entries:G,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:x,enableUrlSync:k,journalItemId:d,onBeforeClose:L,onClose:U}),$)})()]})},Ix=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
15776
15778
  import { createPortal } from 'react-dom';
15777
15779
  import { CommonComponentProps } from '../props';
15778
15780
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -16537,7 +16539,7 @@ export type LightboxJournalSettings = {
16537
16539
  closeIconColor: string;
16538
16540
  closeIconHoverColor: string;
16539
16541
  };
16540
- `,Rx="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),Di={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function kx(e){const t={};return t[yt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[yt(e,"fontSettings")]={...Di.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[yt(e,"fontSize")]={...Di.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[yt(e,"lineHeight")]={...Di.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[yt(e,"letterSpacing")]={...Di.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[yt(e,"wordSpacing")]={...Di.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[yt(e,"textAlign")]={...Di.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[yt(e,"textAppearance")]={...Di.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Ex=Li.reduce((e,t)=>({...e,...kx(t)}),{}),Mx=Li.reduce((e,t)=>({...e,[yt(t,"fontFamily")]:"Goudy Bookletter 1911",[yt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[yt(t,"letterSpacing")]:0,[yt(t,"wordSpacing")]:0,[yt(t,"textAlign")]:"left",[yt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ls(e){return Li.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[yt(n,"fontSize")]=i),o!==void 0&&(t[yt(n,"lineHeight")]=o),t},{})}const Ax=Xy(),Fx={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["A","B"]},maxHeight:{type:"number",scope:"layout",title:"Max Height (%)",min:0,max:100,display:{type:"percentage-input"}},maxWidth:{type:"number",scope:"layout",title:"Max Width (%)",min:0,max:100,display:{type:"percentage-input"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control",visible:!1}},backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},textTransition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["none","fade"]}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},countCloseGap:{type:"number",scope:"layout",title:"Count / Close Gap",min:0,display:{type:"range-control"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},countColor:{type:"string",scope:"common",title:"Count Default",display:{type:"palette-color-picker"}},...Ex,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Rx,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...Mx,countFontFamily:"Arial"},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.08,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.04,...ls({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},t:{type:"A",imageGap:.05,maxHeight:80,maxWidth:40,closeIconMaxWidth:.03,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.16,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.03,...ls({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208,countFontSize:.0208,countLineHeight:.0208})},d:{type:"A",maxHeight:80,maxWidth:40,imageGap:.05,closeIconMaxWidth:.0125,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.02,...ls({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098,countFontSize:.008,countLineHeight:.0098})}},layout:["__componentName__","maxWidth","maxHeight","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","countCloseGap","contentMarginTop","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["type"]},{type:"row",title:"Image",items:["maxWidth","maxHeight"]},{type:"row",title:"Text",items:["textTransition"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover Image",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[Ax]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","countColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemWithoutImage:!0},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",max:2,display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}}},default:[{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"contain"}]}]}},Nx={element:Px,id:"lightbox-journal",name:"Journal",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:Fx,sourceCode:Ix,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Li.map(e=>({path:`${yt(e,"fontFamily")}`}))]},fontRelations:{...Li.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${yt(t,"fontFamily")}`}),{})}},_x={sizeType:"custom",value:700,min:400,max:700};function ya(e,t){return{widthPx:e,heightPx:e*t}}function Ds(e,t,n,i,o,r){return{x:Math.min(Math.max(e,o/2),n-o/2),y:Math.min(Math.max(t,r/2),i-r/2)}}function Vc(e,t,n,i){const{heightPx:o}=ya(n,i);return Ds(e/2,t/2,e,t,n,o)}function Yu(e,t,n){for(const i of n){const{heightPx:o}=ya(i.widthPx,i.aspectRatio),r=i.widthPx/2,l=o/2;if(e>=i.x-r&&e<=i.x+r&&t>=i.y-l&&t<=i.y+l)return!0}return!1}function Hx(e,t,n,i,o,r,l,d){if(o==="system")return"none";const c=i.getBoundingClientRect(),u=document.elementFromPoint(c.left+e,c.top+t);return u&&u.closest("a")?"none":Yu(e,t,n)||r==="area"?l??"none":d??"none"}function Gc(e,t,n){var d;const{sizeType:i,value:o,min:r,max:l}=t;return i==="custom"?o:i==="as is"?((d=n.get(e))==null?void 0:d.naturalWidth)??o:Math.round(Math.random()*(l-r)+r)}function Wx(e){return`
16542
+ `,Rx="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),Di={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function kx(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")]={...Di.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSize")]={...Di.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[bt(e,"lineHeight")]={...Di.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[bt(e,"letterSpacing")]={...Di.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[bt(e,"wordSpacing")]={...Di.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[bt(e,"textAlign")]={...Di.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[bt(e,"textAppearance")]={...Di.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Ex=Li.reduce((e,t)=>({...e,...kx(t)}),{}),Mx=Li.reduce((e,t)=>({...e,[bt(t,"fontFamily")]:"Goudy Bookletter 1911",[bt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[bt(t,"letterSpacing")]:0,[bt(t,"wordSpacing")]:0,[bt(t,"textAlign")]:"left",[bt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ls(e){return Li.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 Ax=Xy(),Fx={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["A","B"]},maxHeight:{type:"number",scope:"layout",title:"Max Height (%)",min:0,max:100,display:{type:"percentage-input"}},maxWidth:{type:"number",scope:"layout",title:"Max Width (%)",min:0,max:100,display:{type:"percentage-input"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control",visible:!1}},backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},textTransition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["none","fade"]}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},countCloseGap:{type:"number",scope:"layout",title:"Count / Close Gap",min:0,display:{type:"range-control"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},countColor:{type:"string",scope:"common",title:"Count Default",display:{type:"palette-color-picker"}},...Ex,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Rx,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...Mx,countFontFamily:"Arial"},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.08,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.04,...ls({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},t:{type:"A",imageGap:.05,maxHeight:80,maxWidth:40,closeIconMaxWidth:.03,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.16,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.03,...ls({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208,countFontSize:.0208,countLineHeight:.0208})},d:{type:"A",maxHeight:80,maxWidth:40,imageGap:.05,closeIconMaxWidth:.0125,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.02,...ls({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098,countFontSize:.008,countLineHeight:.0098})}},layout:["__componentName__","maxWidth","maxHeight","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","countCloseGap","contentMarginTop","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["type"]},{type:"row",title:"Image",items:["maxWidth","maxHeight"]},{type:"row",title:"Text",items:["textTransition"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover Image",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[Ax]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","countColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemWithoutImage:!0},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",max:2,display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}}},default:[{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"contain"}]}]}},Nx={element:Px,id:"lightbox-journal",name:"Journal",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:Fx,sourceCode:Ix,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Li.map(e=>({path:`${bt(e,"fontFamily")}`}))]},fontRelations:{...Li.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${bt(t,"fontFamily")}`}),{})}},_x={sizeType:"custom",value:700,min:400,max:700};function ya(e,t){return{widthPx:e,heightPx:e*t}}function Ds(e,t,n,i,o,r){return{x:Math.min(Math.max(e,o/2),n-o/2),y:Math.min(Math.max(t,r/2),i-r/2)}}function Vc(e,t,n,i){const{heightPx:o}=ya(n,i);return Ds(e/2,t/2,e,t,n,o)}function Yu(e,t,n){for(const i of n){const{heightPx:o}=ya(i.widthPx,i.aspectRatio),r=i.widthPx/2,l=o/2;if(e>=i.x-r&&e<=i.x+r&&t>=i.y-l&&t<=i.y+l)return!0}return!1}function Hx(e,t,n,i,o,r,l,c){if(o==="system")return"none";const d=i.getBoundingClientRect(),u=document.elementFromPoint(d.left+e,d.top+t);return u&&u.closest("a")?"none":Yu(e,t,n)||r==="area"?l??"none":c??"none"}function Gc(e,t,n){var c;const{sizeType:i,value:o,min:r,max:l}=t;return i==="custom"?o:i==="as is"?((c=n.get(e))==null?void 0:c.naturalWidth)??o:Math.round(Math.random()*(l-r)+r)}function Wx(e){return`
16541
16543
  .${e}-root {
16542
16544
  position: absolute;
16543
16545
  top: 0;
@@ -16572,7 +16574,7 @@ export type LightboxJournalSettings = {
16572
16574
  width: 32px;
16573
16575
  height: 32px;
16574
16576
  }
16575
- `}function Ox(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 Dx(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await Ox(i)]));return new Map(n)}function zx({settings:e,content:t=[],isEditor:n}){const{prefix:i}=_.useScopedStyles(),[o,r]=s.useState(null),[l,d]=s.useState([]),[c,u]=s.useState(0),p=s.useRef(0),[x,y]=s.useState({x:0,y:0}),[m,g]=s.useState("none"),v=s.useRef({x:0,y:0}),[b,E]=s.useState(!1),[f,w]=s.useState(!1),G=s.useRef(new Map),{imageSize:X=_x,cursor:M="system",target:T="area",position:N="random",visible:q="all",defaultCursor:$=null,hoverCursor:I=null}=e,W=t.filter(k=>{var H;return!!((H=k==null?void 0:k.image)!=null&&H.url)}),O=s.useMemo(()=>Wx(i),[i]),C=s.useCallback((k,H,j=l)=>{if(!o)return;const ne=o.getBoundingClientRect(),oe=k-ne.left,R=H-ne.top;y({x:oe,y:R}),g(Hx(oe,R,j,o,M,T,I,$))},[o,l,M,T,I,$]);s.useEffect(()=>{const k=[...W.map(j=>j.image.url),$,I].filter(j=>!!j);if(k.length===0){G.current=new Map,w(!0);return}let H=!1;return w(!1),Dx(k).then(j=>{H||(G.current=j,w(!0))}),()=>{H=!0}},[t,$,I]),s.useEffect(()=>{if(!o)return;const k=j=>{j.stopPropagation(),v.current={x:j.clientX,y:j.clientY},C(j.clientX,j.clientY)},H=()=>{b&&C(v.current.x,v.current.y)};return o.addEventListener("mousemove",k),window.addEventListener("scroll",H,!0),()=>{o.removeEventListener("mousemove",k),window.removeEventListener("scroll",H,!0)}},[o,b,C]),s.useEffect(()=>{!o||!b||C(v.current.x,v.current.y)},[l,o,b,C]),s.useEffect(()=>{b||g("none")},[b]);const L=(k,H,j,ne={})=>{var ie,we;if(!((ie=k==null?void 0:k.image)!=null&&ie.url))return null;const oe=((we=G.current.get(k.image.url))==null?void 0:we.aspectRatio)??1,R=Gc(k.image.url,X,G.current),{heightPx:ce}=ya(R,oe);let D=0,le=0;return N==="same"?{x:D,y:le}=Vc(H,j,R,oe):(D=ne.x??Math.random()*H,le=ne.y??Math.random()*j,{x:D,y:le}=Ds(D,le,H,j,R,ce)),{id:p.current++,url:k.image.url,link:k.link,name:k.image.name,x:D,y:le,xRatio:D/H,yRatio:le/j,aspectRatio:oe,widthPx:R}},z=()=>{if(!o)return;const k=o.getBoundingClientRect(),H=k.width,j=k.height;H===0||j===0||d(ne=>ne.length===0?ne:ne.map(oe=>{const R=X.sizeType==="random"?oe.widthPx:Gc(oe.url,X,G.current),{heightPx:ce}=ya(R,oe.aspectRatio);if(N==="same"){const{x:ie,y:we}=Vc(H,j,R,oe.aspectRatio);return{...oe,x:ie,y:we,widthPx:R}}const{x:D,y:le}=Ds(oe.xRatio*H,oe.yRatio*j,H,j,R,ce);return{...oe,x:D,y:le,widthPx:R}}))};s.useEffect(()=>{if(!o||W.length===0||!f)return;const k=o.getBoundingClientRect(),H=k.width,j=k.height,ne=L(W[0],H,j);ne&&(d([ne]),u(W.length>1?1:0))},[X,N,o,t,f]),s.useEffect(()=>{if(!o)return;z();const k=new ResizeObserver(z);return k.observe(o),window.addEventListener("resize",z),()=>{k.disconnect(),window.removeEventListener("resize",z)}},[o,N,X,l.length]),s.useEffect(()=>{q==="last One"&&d(k=>k.length>0?[k[k.length-1]]:[])},[q]);const S=k=>{if(!o||W.length===0||!f)return;const H=o.getBoundingClientRect(),j=k.clientX-H.left,ne=k.clientY-H.top;if(T==="image"&&!Yu(j,ne,l))return;let oe=0,R=0;N==="on Click"?(oe=j,R=ne):N==="same"?(oe=H.width/2,R=H.height/2):(oe=Math.random()*H.width,R=Math.random()*H.height);const ce=W[c%W.length],D=L(ce,H.width,H.height,{x:oe,y:R});if(!D)return;const le=q==="all"?[...l,D]:[D];d(le),u(ie=>(ie+1)%W.length),C(k.clientX,k.clientY,le)},K=M==="custom"&&m!=="none";return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:O}}),a.jsxs("div",{ref:r,onClick:S,onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),className:`${i}-root`,style:{cursor:K?"none":"default"},children:[l.map(k=>a.jsx("div",{className:`${i}-wrapper`,style:{top:`${k.y}px`,left:`${k.x}px`,width:`${k.widthPx}px`,cursor:K?"none":"default"},children:T==="area"&&k.link?a.jsx("a",{href:k.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:a.jsx("img",{src:k.url,alt:k.name,className:`${i}-image`})}):a.jsx("img",{src:k.url,alt:k.name,className:`${i}-image`})},k.id)),b&&K&&a.jsx("div",{className:`${i}-cursor`,style:{left:`${x.x}px`,top:`${x.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const Bx=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
16577
+ `}function Ox(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 Dx(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await Ox(i)]));return new Map(n)}function zx({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}),[m,g]=s.useState("none"),x=s.useRef({x:0,y:0}),[b,E]=s.useState(!1),[f,w]=s.useState(!1),G=s.useRef(new Map),{imageSize:X=_x,cursor:k="system",target:L="area",position:A="random",visible:U="all",defaultCursor:$=null,hoverCursor:P=null}=e,H=t.filter(R=>{var _;return!!((_=R==null?void 0:R.image)!=null&&_.url)}),W=s.useMemo(()=>Wx(i),[i]),C=s.useCallback((R,_,j=l)=>{if(!o)return;const oe=o.getBoundingClientRect(),re=R-oe.left,O=_-oe.top;v({x:re,y:O}),g(Hx(re,O,j,o,k,L,P,$))},[o,l,k,L,P,$]);s.useEffect(()=>{const R=[...H.map(j=>j.image.url),$,P].filter(j=>!!j);if(R.length===0){G.current=new Map,w(!0);return}let _=!1;return w(!1),Dx(R).then(j=>{_||(G.current=j,w(!0))}),()=>{_=!0}},[t,$,P]),s.useEffect(()=>{if(!o)return;const R=j=>{j.stopPropagation(),x.current={x:j.clientX,y:j.clientY},C(j.clientX,j.clientY)},_=()=>{b&&C(x.current.x,x.current.y)};return o.addEventListener("mousemove",R),window.addEventListener("scroll",_,!0),()=>{o.removeEventListener("mousemove",R),window.removeEventListener("scroll",_,!0)}},[o,b,C]),s.useEffect(()=>{!o||!b||C(x.current.x,x.current.y)},[l,o,b,C]),s.useEffect(()=>{b||g("none")},[b]);const T=(R,_,j,oe={})=>{var ee,ve;if(!((ee=R==null?void 0:R.image)!=null&&ee.url))return null;const re=((ve=G.current.get(R.image.url))==null?void 0:ve.aspectRatio)??1,O=Gc(R.image.url,X,G.current),{heightPx:ie}=ya(O,re);let D=0,le=0;return A==="same"?{x:D,y:le}=Vc(_,j,O,re):(D=oe.x??Math.random()*_,le=oe.y??Math.random()*j,{x:D,y:le}=Ds(D,le,_,j,O,ie)),{id:p.current++,url:R.image.url,link:R.link,name:R.image.name,x:D,y:le,xRatio:D/_,yRatio:le/j,aspectRatio:re,widthPx:O}},B=()=>{if(!o)return;const R=o.getBoundingClientRect(),_=R.width,j=R.height;_===0||j===0||c(oe=>oe.length===0?oe:oe.map(re=>{const O=X.sizeType==="random"?re.widthPx:Gc(re.url,X,G.current),{heightPx:ie}=ya(O,re.aspectRatio);if(A==="same"){const{x:ee,y:ve}=Vc(_,j,O,re.aspectRatio);return{...re,x:ee,y:ve,widthPx:O}}const{x:D,y:le}=Ds(re.xRatio*_,re.yRatio*j,_,j,O,ie);return{...re,x:D,y:le,widthPx:O}}))};s.useEffect(()=>{if(!o||H.length===0||!f)return;const R=o.getBoundingClientRect(),_=R.width,j=R.height,oe=T(H[0],_,j);oe&&(c([oe]),u(H.length>1?1:0))},[X,A,o,t,f]),s.useEffect(()=>{if(!o)return;B();const R=new ResizeObserver(B);return R.observe(o),window.addEventListener("resize",B),()=>{R.disconnect(),window.removeEventListener("resize",B)}},[o,A,X,l.length]),s.useEffect(()=>{U==="last One"&&c(R=>R.length>0?[R[R.length-1]]:[])},[U]);const S=R=>{if(!o||H.length===0||!f)return;const _=o.getBoundingClientRect(),j=R.clientX-_.left,oe=R.clientY-_.top;if(L==="image"&&!Yu(j,oe,l))return;let re=0,O=0;A==="on Click"?(re=j,O=oe):A==="same"?(re=_.width/2,O=_.height/2):(re=Math.random()*_.width,O=Math.random()*_.height);const ie=H[d%H.length],D=T(ie,_.width,_.height,{x:re,y:O});if(!D)return;const le=U==="all"?[...l,D]:[D];c(le),u(ee=>(ee+1)%H.length),C(R.clientX,R.clientY,le)},K=k==="custom"&&m!=="none";return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:W}}),a.jsxs("div",{ref:r,onClick:S,onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),className:`${i}-root`,style:{cursor:K?"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:K?"none":"default"},children:L==="area"&&R.link?a.jsx("a",{href:R.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:a.jsx("img",{src:R.url,alt:R.name,className:`${i}-image`})}):a.jsx("img",{src:R.url,alt:R.name,className:`${i}-image`})},R.id)),b&&K&&a.jsx("div",{className:`${i}-cursor`,style:{left:`${y.x}px`,top:`${y.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const Bx=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
16576
16578
  import { CommonComponentProps } from '../props';
16577
16579
  import { useScopedStyles } from '../utils/index';
16578
16580
 
@@ -17212,7 +17214,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
17212
17214
  display: block;
17213
17215
  pointer-events: none;
17214
17216
  }
17215
- `}function Ux(e){return e==="blur"?Xx:e==="greyscale"?Gx:0}function Ko(e,t=1,n=1){const i=Ux(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 Xc(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function Kx(e,t){return t<=1?0:(e-1+t)%t}function Yx(e,t=1){return!e||e.height===0?t:e.width/e.height}function Zx(e,t,n,i,o){if(e<=0||t<=0)return{widthPercent:i,heightPercent:o};const r=e*i/100,l=t*o/100;let d=r,c=d/n;return c>l&&(c=l,d=c*n),{widthPercent:d/e*100,heightPercent:c/t*100}}function qc(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 Zu(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function Uc(e,t,n){return{...Zu(e),[`--${n}-stage-scale`]:t}}function Jx(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 Qx({settings:e,content:t,isEditor:n,isPreviewMode:i}){var Ce,h,U,Z,te,me,B;const{prefix:o}=_.useScopedStyles(),r=s.useMemo(()=>qx(o),[o]),{imageSize:l,maxWidth:d,maxHeight:c,transition:u=1e3,bgImage:p="greyscale"}=e,x=t??[],y=Xc(x.length),[m,g]=s.useState(y.activeIndex),[v,b]=s.useState(y.backgroundIndex),[E,f]=s.useState(!1),[w,G]=s.useState(!1),[X,M]=s.useState(null),[T,N]=s.useState(null),[q,$]=s.useState(0),[I,W]=s.useState(1),[O,C]=s.useState("none"),[L,z]=s.useState("next"),[S,K]=s.useState({}),[k,H]=s.useState({width:0,height:0}),j=s.useRef(null),ne=s.useRef(null),oe=!n||!!i,R=l??60,ce=Math.max(10,Math.min(100,d??R)),D=Math.max(10,Math.min(100,c??R)),le=Math.max(100,u),ie=Ko(p),we=s.useCallback(P=>{const Q=Yx(P?S[P]:void 0);return Zx(k.width,k.height,Q,ce,D)},[k.height,k.width,S,D,ce]);s.useEffect(()=>{const P=ne.current;if(!P)return;const Q=new ResizeObserver(([ee])=>{const{width:de,height:V}=ee.contentRect;H({width:de,height:V})});return Q.observe(P),()=>Q.disconnect()},[]),s.useEffect(()=>{const P=(t??[]).map(Q=>{var ee;return(ee=Q.image)==null?void 0:ee.url}).filter(Q=>!!Q);Jx(P,(Q,ee)=>{K(de=>{var V,Pe;return((V=de[Q])==null?void 0:V.width)===ee.width&&((Pe=de[Q])==null?void 0:Pe.height)===ee.height?de:{...de,[Q]:ee}})})},[t]),s.useEffect(()=>{const{backgroundIndex:P,activeIndex:Q}=Xc(x.length);g(Q),b(P),f(!1),G(!1),M(null),N(null),$(0),W(1),C("none"),z("next")},[x.length,t]),s.useEffect(()=>()=>{j.current&&clearTimeout(j.current)},[]);const Ie=s.useCallback(P=>{var he,J,Ne,Be;if(!oe||E||x.length<=1)return;const Q=P==="next"?(m+1)%x.length:(m-1+x.length)%x.length,ee=we((J=(he=x[m])==null?void 0:he.image)==null?void 0:J.url),de=we((Be=(Ne=x[Q])==null?void 0:Ne.image)==null?void 0:Be.url),V=qc(k.width,k.height,ee),Pe=qc(k.width,k.height,de);j.current&&clearTimeout(j.current),z(P),G(!0),f(!0),P==="next"?(M(m),N(Q),$(0),W(1),C(Ko(p,0,1))):(b(Kx(Q,x.length)),M(Q),N(m),$(1),W(Pe),C(Ko(p,1,Pe))),requestAnimationFrame(()=>{G(!1),requestAnimationFrame(()=>{P==="next"?($(1),W(V),C(Ko(p,1,V))):($(0),W(1),C(Ko(p,0,1)))})}),j.current=setTimeout(()=>{P==="next"&&b(m),g(Q),M(null),N(null),f(!1)},le)},[m,p,k.height,k.width,we,E,oe,x,le]),xe=x[m],pe=v!==null?x[v]:null,Y=X!==null?x[X]:null,ae=T!==null?x[T]:null,se=x.length<=1?0:(m-1+x.length)%x.length,Re=x.length<=1?0:(m+1)%x.length,$e=we((Ce=xe==null?void 0:xe.image)==null?void 0:Ce.url),Me=we((h=Y==null?void 0:Y.image)==null?void 0:h.url),ve=we((U=ae==null?void 0:ae.image)==null?void 0:U.url),be={[`--${o}-transition-ms`]:`${le}ms`};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:r}}),a.jsxs("div",{ref:ne,className:Ct(`${o}-wrapper`,w&&`${o}-snap`,n&&!i&&`${o}-editor`),style:be,"aria-label":"Zoom gallery",children:[((Z=pe==null?void 0:pe.image)==null?void 0:Z.url)&&a.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:pe.image.url,alt:"",style:{filter:ie}})}),E&&((te=Y==null?void 0:Y.image)==null?void 0:te.url)&&a.jsx("div",{className:Ct(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${L}`),style:Uc(Me,I,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:Y.image.url,alt:"",style:{filter:O}})}),E&&((me=ae==null?void 0:ae.image)==null?void 0:me.url)&&a.jsx("div",{className:Ct(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${L}`),style:Uc(ve,q,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-image`,src:ae.image.url,alt:""})}),!E&&((B=xe==null?void 0:xe.image)==null?void 0:B.url)&&a.jsx("div",{className:Ct(`${o}-stage`,`${o}-foreground`),style:Zu($e),children:a.jsx("img",{className:`${o}-image`,src:xe.image.url,alt:xe.image.name??""})}),oe&&x.length>1&&!E&&a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:Ct(`${o}-nav`,`${o}-nav-prev`),onClick:()=>Ie("prev"),"aria-label":`Show previous image (${se+1} of ${x.length})`}),a.jsx("button",{type:"button",className:Ct(`${o}-nav`,`${o}-nav-next`),onClick:()=>Ie("next"),"aria-label":`Show next image (${Re+1} of ${x.length})`})]})]})]})}const eb=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17217
+ `}function Ux(e){return e==="blur"?Xx:e==="greyscale"?Gx:0}function Ko(e,t=1,n=1){const i=Ux(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 Xc(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function Kx(e,t){return t<=1?0:(e-1+t)%t}function Yx(e,t=1){return!e||e.height===0?t:e.width/e.height}function Zx(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 qc(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 Zu(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function Uc(e,t,n){return{...Zu(e),[`--${n}-stage-scale`]:t}}function Jx(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 Qx({settings:e,content:t,isEditor:n,isPreviewMode:i}){var Te,h,q,Z,te,ue,z;const{prefix:o}=F.useScopedStyles(),r=s.useMemo(()=>qx(o),[o]),{imageSize:l,maxWidth:c,maxHeight:d,transition:u=1e3,bgImage:p="greyscale"}=e,y=t??[],v=Xc(y.length),[m,g]=s.useState(v.activeIndex),[x,b]=s.useState(v.backgroundIndex),[E,f]=s.useState(!1),[w,G]=s.useState(!1),[X,k]=s.useState(null),[L,A]=s.useState(null),[U,$]=s.useState(0),[P,H]=s.useState(1),[W,C]=s.useState("none"),[T,B]=s.useState("next"),[S,K]=s.useState({}),[R,_]=s.useState({width:0,height:0}),j=s.useRef(null),oe=s.useRef(null),re=!n||!!i,O=l??60,ie=Math.max(10,Math.min(100,c??O)),D=Math.max(10,Math.min(100,d??O)),le=Math.max(100,u),ee=Ko(p),ve=s.useCallback(I=>{const Q=Yx(I?S[I]:void 0);return Zx(R.width,R.height,Q,ie,D)},[R.height,R.width,S,D,ie]);s.useEffect(()=>{const I=oe.current;if(!I)return;const Q=new ResizeObserver(([ne])=>{const{width:de,height:V}=ne.contentRect;_({width:de,height:V})});return Q.observe(I),()=>Q.disconnect()},[]),s.useEffect(()=>{const I=(t??[]).map(Q=>{var ne;return(ne=Q.image)==null?void 0:ne.url}).filter(Q=>!!Q);Jx(I,(Q,ne)=>{K(de=>{var V,Pe;return((V=de[Q])==null?void 0:V.width)===ne.width&&((Pe=de[Q])==null?void 0:Pe.height)===ne.height?de:{...de,[Q]:ne}})})},[t]),s.useEffect(()=>{const{backgroundIndex:I,activeIndex:Q}=Xc(y.length);g(Q),b(I),f(!1),G(!1),k(null),A(null),$(0),H(1),C("none"),B("next")},[y.length,t]),s.useEffect(()=>()=>{j.current&&clearTimeout(j.current)},[]);const Ie=s.useCallback(I=>{var he,J,He,We;if(!re||E||y.length<=1)return;const Q=I==="next"?(m+1)%y.length:(m-1+y.length)%y.length,ne=ve((J=(he=y[m])==null?void 0:he.image)==null?void 0:J.url),de=ve((We=(He=y[Q])==null?void 0:He.image)==null?void 0:We.url),V=qc(R.width,R.height,ne),Pe=qc(R.width,R.height,de);j.current&&clearTimeout(j.current),B(I),G(!0),f(!0),I==="next"?(k(m),A(Q),$(0),H(1),C(Ko(p,0,1))):(b(Kx(Q,y.length)),k(Q),A(m),$(1),H(Pe),C(Ko(p,1,Pe))),requestAnimationFrame(()=>{G(!1),requestAnimationFrame(()=>{I==="next"?($(1),H(V),C(Ko(p,1,V))):($(0),H(1),C(Ko(p,0,1)))})}),j.current=setTimeout(()=>{I==="next"&&b(m),g(Q),k(null),A(null),f(!1)},le)},[m,p,R.height,R.width,ve,E,re,y,le]),be=y[m],pe=x!==null?y[x]:null,Y=X!==null?y[X]:null,se=L!==null?y[L]:null,xe=y.length<=1?0:(m-1+y.length)%y.length,Se=y.length<=1?0:(m+1)%y.length,Ce=ve((Te=be==null?void 0:be.image)==null?void 0:Te.url),Ae=ve((h=Y==null?void 0:Y.image)==null?void 0:h.url),fe=ve((q=se==null?void 0:se.image)==null?void 0:q.url),we={[`--${o}-transition-ms`]:`${le}ms`};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:r}}),a.jsxs("div",{ref:oe,className:Lt(`${o}-wrapper`,w&&`${o}-snap`,n&&!i&&`${o}-editor`),style:we,"aria-label":"Zoom gallery",children:[((Z=pe==null?void 0:pe.image)==null?void 0:Z.url)&&a.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:pe.image.url,alt:"",style:{filter:ee}})}),E&&((te=Y==null?void 0:Y.image)==null?void 0:te.url)&&a.jsx("div",{className:Lt(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${T}`),style:Uc(Ae,P,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:Y.image.url,alt:"",style:{filter:W}})}),E&&((ue=se==null?void 0:se.image)==null?void 0:ue.url)&&a.jsx("div",{className:Lt(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${T}`),style:Uc(fe,U,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-image`,src:se.image.url,alt:""})}),!E&&((z=be==null?void 0:be.image)==null?void 0:z.url)&&a.jsx("div",{className:Lt(`${o}-stage`,`${o}-foreground`),style:Zu(Ce),children:a.jsx("img",{className:`${o}-image`,src:be.image.url,alt:be.image.name??""})}),re&&y.length>1&&!E&&a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:Lt(`${o}-nav`,`${o}-nav-prev`),onClick:()=>Ie("prev"),"aria-label":`Show previous image (${xe+1} of ${y.length})`}),a.jsx("button",{type:"button",className:Lt(`${o}-nav`,`${o}-nav-next`),onClick:()=>Ie("next"),"aria-label":`Show next image (${Se+1} of ${y.length})`})]})]})]})}const eb=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17216
17218
  import cn from 'classnames';
17217
17219
  import { CommonComponentProps } from '../props';
17218
17220
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -17731,7 +17733,7 @@ export function Scale({ settings, content, isEditor, isPreviewMode }: ScaleProps
17731
17733
  </>
17732
17734
  );
17733
17735
  }
17734
- `,tb={type:"object",version:1,settings:{sizing:"manual",properties:{maxWidth:{type:"number",scope:"common",title:"Max width (%)",display:{type:"percentage-input"},min:10,max:100},maxHeight:{type:"number",scope:"common",title:"Max height (%)",display:{type:"percentage-input"},min:10,max:100},transition:{type:"number",scope:"common",title:"Transition (ms)",display:{type:"common-numeric-input"},min:100,max:9999},bgImage:{type:"string",scope:"common",title:"BG image",display:{type:"toggle-cycle",enum:["greyscale","blur","as is"]}}},defaults:{maxWidth:60,maxHeight:60,transition:700,bgImage:"greyscale"},layout:["__componentName__","maxWidth","maxHeight","transition","bgImage"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["maxWidth","maxHeight"]},{type:"row",title:"",items:["transition","bgImage"]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input",isObjectFitEditable:!1}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:""}}]}},nb={element:Qx,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:tb,sourceCode:eb,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},ib={backgroundColor:"background-color",textColor:"text-color",borderColor:"border-color",iconColor:"icon-color",boxShadowColor:"box-shadow-color",innerBoxShadowColor:"inner-box-shadow-color"},ob=["hover","active"],cs={left:"flex-start",center:"center",right:"flex-end"};function rb(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY-i.top>i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function ab(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 sb(e){const t=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-box-shadow-color, transparent)`,n=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-inner-box-shadow-color, transparent)`,i=`${t}, ${n}`,o=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-hover-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,r=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-hover-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,l=`${o}, ${r}`,d=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-active-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,c=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-active-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,u=`${d}, ${c}`,p=`0 4px 12px rgba(0, 0, 0, 0.15), ${n}`,x=`.${e}-button:focus-visible, a:focus-visible .${e}-button`,y=`.${e}-button:hover, ${x}`,m=g=>`.${e}-hover-effect-${g}:hover, .${e}-hover-effect-${g}:focus-visible, a:focus-visible .${e}-hover-effect-${g}`;return`
17736
+ `,tb={type:"object",version:1,settings:{sizing:"manual",properties:{maxWidth:{type:"number",scope:"common",title:"Max width (%)",display:{type:"percentage-input"},min:10,max:100},maxHeight:{type:"number",scope:"common",title:"Max height (%)",display:{type:"percentage-input"},min:10,max:100},transition:{type:"number",scope:"common",title:"Transition (ms)",display:{type:"common-numeric-input"},min:100,max:9999},bgImage:{type:"string",scope:"common",title:"BG image",display:{type:"toggle-cycle",enum:["greyscale","blur","as is"]}}},defaults:{maxWidth:60,maxHeight:60,transition:700,bgImage:"greyscale"},layout:["__componentName__","maxWidth","maxHeight","transition","bgImage"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["maxWidth","maxHeight"]},{type:"row",title:"",items:["transition","bgImage"]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input",isObjectFitEditable:!1}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:""}}]}},nb={element:Qx,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:tb,sourceCode:eb,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},ib={backgroundColor:"background-color",textColor:"text-color",borderColor:"border-color",iconColor:"icon-color",boxShadowColor:"box-shadow-color",innerBoxShadowColor:"inner-box-shadow-color"},ob=["hover","active"],cs={left:"flex-start",center:"center",right:"flex-end"};function rb(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY-i.top>i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function ab(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 sb(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}`,m=g=>`.${e}-hover-effect-${g}:hover, .${e}-hover-effect-${g}:focus-visible, a:focus-visible .${e}-hover-effect-${g}`;return`
17735
17737
  .${e}-root {
17736
17738
  line-height: 0;
17737
17739
  }
@@ -17894,7 +17896,7 @@ a:focus-visible .${e}-hover-effect-content-roll .${e}-content-roll-layer-hover,
17894
17896
  transform: translateY(-50%);
17895
17897
  opacity: 1;
17896
17898
  }
17897
- ${y} {
17899
+ ${v} {
17898
17900
  background-color: var(--${e}-hover-background-color, var(--${e}-background-color));
17899
17901
  color: var(--${e}-hover-text-color, var(--${e}-text-color));
17900
17902
  border-color: var(--${e}-hover-border-color, var(--${e}-border-color));
@@ -17973,7 +17975,7 @@ a:active .${e}-button .${e}-icon-image,
17973
17975
  height: calc(1em * var(--${e}-icon-scale, 1));
17974
17976
  width: calc(1em * var(--${e}-icon-scale, 1));
17975
17977
  }
17976
- `}function ds(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 Kc(e,t,n="fill",i=100,o=0,r){if(!t)return null;const l=a.jsx(pn,{url:t,fill:`var(--${e}-icon-color)`,hoverFill:`var(--${e}-icon-color)`,className:`${e}-icon-image`});if(n==="inline")return a.jsx("span",{className:`${e}-icon ${e}-icon-inline`,style:{[`--${e}-icon-scale`]:i/100},"aria-hidden":"true",children:l});if(n==="fixed"&&o>0){const d=_.scalingValue(o,r);return a.jsx("span",{className:`${e}-icon`,style:{width:d,height:d},"aria-hidden":"true",children:l})}return a.jsx("span",{className:`${e}-icon ${e}-icon-fill`,"aria-hidden":"true",children:l})}function lb({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:r}=_.useScopedStyles(),l=s.useMemo(()=>sb(r),[r]),{type:d="a",label:c="Button",icon:u,alignment:p="center",alignA:x,order:y="text-icon",gap:m=0,iconSize:g=0,iconWidthC:v=0,dimensions:b=!1,padding:E={top:0,right:0,bottom:0,left:0},cornerRadius:f=0,boxShadow:w={top:0,left:0,right:0,bottom:0},boxShadowColor:G="rgba(0, 0, 0, 0)",innerBoxShadow:X={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:M="rgba(0, 0, 0, 0)",stroke:T=0,blur:N=0,backgroundColor:q="#000000",textColor:$="#ffffff",borderColor:I="#ffffff",iconColor:W="#ffffff",hoverEffect:O="none",fontFamily:C,fontSettings:L,fontSize:z,lineHeight:S,letterSpacing:K=0,wordSpacing:k=0,textAppearance:H,stateOverrides:j,minWidth:ne=0,minHeight:oe=0,width:R=0,height:ce=0}=e,D=_.buildColorVars(r,{backgroundColor:q,textColor:$,borderColor:I,iconColor:W,boxShadowColor:G,innerBoxShadowColor:M},ib,ob,j),le=i&&i!=="default"?`${r}-state-${i}`:"",ie=t&&!n?`${r}-editing`:"",we=O!=="none"&&(!t||n||i==="hover")?`${r}-hover-effect-${O}`:"",Ie=O==="reveal"||O==="swipe",xe=O==="content-roll",pe=O==="reveal"&&(!t||n),Y=b===!0,se=d==="a"?x??p:p,Re=d==="c",$e=d!=="b",Me={fontSettings:{fontFamily:C,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:z??.01,lineHeight:S,letterSpacing:K,wordSpacing:k,textAppearance:H,color:$},be={...$e?cn(Qt(Me,t)):{},[`--${r}-box-shadow-x`]:_.scalingValue(w.left,t),[`--${r}-box-shadow-y`]:_.scalingValue(w.top,t),[`--${r}-box-shadow-blur`]:_.scalingValue(w.right,t),[`--${r}-box-shadow-spread`]:_.scalingValue(w.bottom,t),[`--${r}-inner-box-shadow-x`]:_.scalingValue(X.left,t),[`--${r}-inner-box-shadow-y`]:_.scalingValue(X.top,t),[`--${r}-inner-box-shadow-blur`]:_.scalingValue(X.right,t),[`--${r}-inner-box-shadow-spread`]:_.scalingValue(X.bottom,t),[`--${r}-backdrop-blur`]:N>0?`blur(${_.scalingValue(N,t)})`:void 0,paddingTop:_.scalingValue(E.top,t),paddingRight:_.scalingValue(E.right,t),paddingBottom:_.scalingValue(E.bottom,t),paddingLeft:_.scalingValue(E.left,t),borderRadius:_.scalingValue(f,t),borderWidth:_.scalingValue(T,t),...Re?{}:{justifyContent:cs[se],textAlign:se},...Re&&!xe?{gap:_.scalingValue(m,t)}:{},...Y?{width:_.scalingValue(R,t),height:_.scalingValue(ce,t)}:{minWidth:_.scalingValue(ne,t),minHeight:_.scalingValue(oe,t),...Re?{width:"100%"}:{}}};let Ce;const h={display:"inline-flex",alignItems:"center",justifyContent:Re?cs[se]:cs[d==="a"?se:"center"],gap:Re?_.scalingValue(m,t):void 0,width:"100%",height:"100%",...d==="a"?{textAlign:se}:{}};if(d==="b"){const te=()=>Kc(r,u,g>0?"fixed":"fill",100,g,t);Ce=xe?ds(r,te,`${r}-icon-roll`,void 0,h):te()}else if(d==="c"){const te=()=>{const me=a.jsx("span",{className:`${r}-text`,style:{textAlign:se},children:c}),B=Kc(r,u,v>0?"fixed":"fill",100,v,t);return y==="icon-text"?a.jsxs(a.Fragment,{children:[B,me]}):a.jsxs(a.Fragment,{children:[me,B]})};Ce=xe?ds(r,te,`${r}-icon-text-roll`,void 0,h):te()}else Ce=xe?ds(r,()=>c,`${r}-label-roll`,void 0,h):Ie?a.jsx("span",{className:`${r}-button-inner`,children:c}):c;const U=pe?te=>rb(te,r):void 0,Z=pe?te=>ab(te,r):void 0;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),a.jsx("div",{className:`${r}-root`,style:D,children:a.jsx("div",{className:`${r}-wrapper ${le} ${ie}`.trim(),children:a.jsx("div",{className:`${r}-button ${we}`.trim(),style:be,onMouseEnter:U,onMouseLeave:Z,role:"button",tabIndex:o||t&&!n?void 0:0,children:Ce})})})]})}const cb=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
17978
+ `}function ds(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 Kc(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=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 lb({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:r}=F.useScopedStyles(),l=s.useMemo(()=>sb(r),[r]),{type:c="a",label:d="Button",icon:u,alignment:p="center",alignA:y,order:v="text-icon",gap:m=0,iconSize:g=0,iconWidthC:x=0,dimensions:b=!1,padding:E={top:0,right:0,bottom:0,left:0},cornerRadius:f=0,boxShadow:w={top:0,left:0,right:0,bottom:0},boxShadowColor:G="rgba(0, 0, 0, 0)",innerBoxShadow:X={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:k="rgba(0, 0, 0, 0)",stroke:L=0,blur:A=0,backgroundColor:U="#000000",textColor:$="#ffffff",borderColor:P="#ffffff",iconColor:H="#ffffff",hoverEffect:W="none",fontFamily:C,fontSettings:T,fontSize:B,lineHeight:S,letterSpacing:K=0,wordSpacing:R=0,textAppearance:_,stateOverrides:j,minWidth:oe=0,minHeight:re=0,width:O=0,height:ie=0}=e,D=F.buildColorVars(r,{backgroundColor:U,textColor:$,borderColor:P,iconColor:H,boxShadowColor:G,innerBoxShadowColor:k},ib,ob,j),le=i&&i!=="default"?`${r}-state-${i}`:"",ee=t&&!n?`${r}-editing`:"",ve=W!=="none"&&(!t||n||i==="hover")?`${r}-hover-effect-${W}`:"",Ie=W==="reveal"||W==="swipe",be=W==="content-roll",pe=W==="reveal"&&(!t||n),Y=b===!0,xe=c==="a"?y??p:p,Se=c==="c",Ce=c!=="b",Ae={fontSettings:{fontFamily:C,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:B??.01,lineHeight:S,letterSpacing:K,wordSpacing:R,textAppearance:_,color:$},we={...Ce?dn(Qt(Ae,t)):{},[`--${r}-box-shadow-x`]:F.scalingValue(w.left,t),[`--${r}-box-shadow-y`]:F.scalingValue(w.top,t),[`--${r}-box-shadow-blur`]:F.scalingValue(w.right,t),[`--${r}-box-shadow-spread`]:F.scalingValue(w.bottom,t),[`--${r}-inner-box-shadow-x`]:F.scalingValue(X.left,t),[`--${r}-inner-box-shadow-y`]:F.scalingValue(X.top,t),[`--${r}-inner-box-shadow-blur`]:F.scalingValue(X.right,t),[`--${r}-inner-box-shadow-spread`]:F.scalingValue(X.bottom,t),[`--${r}-backdrop-blur`]:A>0?`blur(${F.scalingValue(A,t)})`:void 0,paddingTop:F.scalingValue(E.top,t),paddingRight:F.scalingValue(E.right,t),paddingBottom:F.scalingValue(E.bottom,t),paddingLeft:F.scalingValue(E.left,t),borderRadius:F.scalingValue(f,t),borderWidth:F.scalingValue(L,t),...Se?{}:{justifyContent:cs[xe],textAlign:xe},...Se&&!be?{gap:F.scalingValue(m,t)}:{},...Y?{width:F.scalingValue(O,t),height:F.scalingValue(ie,t)}:{minWidth:F.scalingValue(oe,t),minHeight:F.scalingValue(re,t),...Se?{width:"100%"}:{}}};let Te;const h={display:"inline-flex",alignItems:"center",justifyContent:Se?cs[xe]:cs[c==="a"?xe:"center"],gap:Se?F.scalingValue(m,t):void 0,width:"100%",height:"100%",...c==="a"?{textAlign:xe}:{}};if(c==="b"){const te=()=>Kc(r,u,g>0?"fixed":"fill",100,g,t);Te=be?ds(r,te,`${r}-icon-roll`,void 0,h):te()}else if(c==="c"){const te=()=>{const ue=a.jsx("span",{className:`${r}-text`,style:{textAlign:xe},children:d}),z=Kc(r,u,x>0?"fixed":"fill",100,x,t);return v==="icon-text"?a.jsxs(a.Fragment,{children:[z,ue]}):a.jsxs(a.Fragment,{children:[ue,z]})};Te=be?ds(r,te,`${r}-icon-text-roll`,void 0,h):te()}else Te=be?ds(r,()=>d,`${r}-label-roll`,void 0,h):Ie?a.jsx("span",{className:`${r}-button-inner`,children:d}):d;const q=pe?te=>rb(te,r):void 0,Z=pe?te=>ab(te,r):void 0;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),a.jsx("div",{className:`${r}-root`,style:D,children:a.jsx("div",{className:`${r}-wrapper ${le} ${ee}`.trim(),children:a.jsx("div",{className:`${r}-button ${ve}`.trim(),style:we,onMouseEnter:q,onMouseLeave:Z,role:"button",tabIndex:o||t&&!n?void 0:0,children:Te})})})]})}const cb=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
17977
17979
  import { SvgImage } from '../helpers/SvgImage/SvgImage';
17978
17980
  import { CommonComponentProps } from '../props';
17979
17981
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
@@ -18803,7 +18805,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
18803
18805
  pointer-events: auto;
18804
18806
  flex-shrink: 0;
18805
18807
  }
18806
- `}const Hn=500,Yo=650,bn="cubic-bezier(0.22, 1, 0.36, 1)",hb=72,fb=50,yb=1e4,vb=650,xb=500;function bb(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 Ju(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=ga(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 Sb(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?Ju(i,n):null}function wb(e){return e.reduce((t,n,i)=>{var o;return(o=n.image)!=null&&o.url&&t.push({gridIndex:i,items:[n.image],entry:{title1:n.title??"",title2:n.subtitle??"",title3:n.caption??""}}),t},[])}function nr(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 Yc(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return nr(e,i,n)}const $b=.03;function Qu(e){return e.width*$b}const us={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Vr(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Zc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Cb(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function zs(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,d=o/r;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const c=r*l;return{width:c,height:r,left:i.left+(o-c)/2,top:i.top}}function Tb(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:zs(e,t.width,t.height)}function Lb(e,t){if(Ha(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function Pb(e){const t=new Set,n=[];for(const i of e){const o=i.image;!(o!=null&&o.url)||t.has(o.url)||(t.add(o.url),n.push(o))}return n}function Ib({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=>Ha(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function No(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:d}=n,c=Qu(n);return t==="left"?{left:l+c-i,top:r,width:i,height:o}:{left:l+d-c,top:r,width:i,height:o}}function va(e,t,n){const i=No(e,t,n);return{...i,left:2*i.left-e.left}}function Rb(e,t,n){const{left:i,width:o}=n,r=Qu(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 ep(e,t,n,i){const o=No(e,"left",i),r=No(e,"right",i),l=va(e,"left",i),d=va(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function kb(e,t,n,i){const{start:o,end:r}=ep(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function Eb(e,t,n){const i=No(e,t,n),o=va(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Ha(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function Mb({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:r,onTransitionEnd:l}){const d=s.useRef(null);return s.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),a.jsx("div",{style:i,onTransitionEnd:l,children:a.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:r,onClick:c=>c.stopPropagation(),style:o},e)})}function Gr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Ha(e)?a.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.url,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.url,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function Ab({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:p,layoutId:x,sourceRect:y,resolveCloseSourceRect:m,onClose:g,onPrev:v,onNext:b}){const E=s.useRef(null),f=s.useRef(null),w=s.useRef(null),G=s.useRef(new Map),[X,M]=s.useState(0),T=s.useRef(null),N=s.useRef(0),q=s.useRef(0),$=s.useRef("none"),I=s.useRef(!1),W=s.useRef(!1),O=s.useRef(!1),C=s.useRef(null),L=s.useRef(null),z=s.useRef(null),S=s.useRef(()=>{}),K=s.useRef(null),k=s.useRef(null),H=s.useRef(null),j=s.useRef(!1),[ne,oe]=s.useState(null),[R,ce]=s.useState(us),[D,le]=s.useState(0),[ie,we]=s.useState("opening"),[Ie,xe]=s.useState(0),[pe,Y]=s.useState(0),[ae,se]=s.useState(!1),[Re,$e]=s.useState(null),[Me,ve]=s.useState(null),[be,Ce]=s.useState(null),[h,U]=s.useState(!1),[Z,te]=s.useState(null),[me,B]=s.useState(!1),P=s.useRef(!1),[Q,ee]=s.useState(!1),[de,V]=s.useState(!1),Pe=s.useRef(n),he=s.useRef(void 0),J=t[n],Ne=J?Ha(J):!1,Be=pe!==0||ae,at=!l&&(!r||!!d),Ue=c&&!l,nt=u.length>1,Ze=s.useCallback((A,Le)=>t.length<=1?null:t[(A+Le+t.length)%t.length]??null,[t]),Xe=nt?nr(u,p,-1):Ze(n,-1),fe=nt?nr(u,p,1):Ze(n,1),He=Re===-1&&Be?nt&&Me!==null?nr(u,Me,-1):be!==null?Ze(be,-1):null:null,We=Re===1&&Be?nt&&Me!==null?nr(u,Me,1):be!==null?Ze(be,1):null:null,Qe=He&&He.url!==(Xe==null?void 0:Xe.url)?He:null,ye=We&&We.url!==(fe==null?void 0:fe.url)?We:null,_e=Xe&&Ue?(()=>{const A=nt?Yc(u,p,-1):t.length>2?Ze((n-1+t.length)%t.length,-1):null;return A&&A.url!==Xe.url?A:null})():null,Ge=fe&&Ue?(()=>{const A=nt?Yc(u,p,1):t.length>2?Ze((n+1)%t.length,1):null;return A&&A.url!==fe.url?A:null})():null,et=Qe??_e,mt=ye??Ge,rt=s.useCallback((A,Le,Ae)=>{if(!A||!Le||!Ae)return;const ze=G.current,pt=ze.get(A);(pt==null?void 0:pt.width)===Le&&(pt==null?void 0:pt.height)===Ae||(ze.set(A,{width:Le,height:Ae}),M(zt=>zt+1))},[]),Oe=s.useCallback(A=>{if(!(A!=null&&A.url))return null;const Le=G.current.get(A.url);return Tb(f.current,Le)},[X,D]),Fe=s.useCallback(()=>{if(!J)return;const A=Oe(J);if(A){oe(A);return}const Le=f.current;Le&&oe(Zc(Le))},[J,Oe]),Ke=s.useCallback(A=>{if(nt){const Le=u.length;ve((p+A+Le)%Le),Ce(null);return}t.length>1&&(Ce((n+A+t.length)%t.length),ve(null))},[nt,u.length,p,t.length,n]),it=s.useCallback(A=>{O.current=A,se(A)},[]),De=s.useCallback(()=>{C.current!==null&&(window.clearTimeout(C.current),C.current=null)},[]),qe=s.useCallback(()=>{De(),C.current=window.setTimeout(()=>{De(),it(!1)},Yo+32)},[De,it]),ut=s.useCallback(()=>{const A=E.current;if(!A){ce({left:0,top:0,width:typeof window<"u"?window.innerWidth:us.width,height:typeof window<"u"?window.innerHeight:us.height});return}const Le=A.getBoundingClientRect();ce({left:Le.left,top:Le.top,width:Le.width,height:Le.height})},[]),ge=s.useCallback((A,Le)=>{if(Be){if(Q&&!ae)return`translate(${pe}px, 0px)`;if(ae&&Re!==null){const Ae=Oe(A);if(!Ae)return;const{x:ze,y:pt}=kb(Ae,Le,Re,R);return`translate(${ze}px, ${pt}px)`}if(ae)return"translate(0px, 0px)"}},[Be,Q,ae,pe,Re,R,Oe]),ke=s.useCallback(()=>{const A=L.current;L.current=null,De(),it(!1),$e(null),ve(null),Ce(null),Y(0),ee(!1),I.current=!1,q.current=0,$.current="none",A===-1?v():A===1&&b()},[De,it,v,b]),ot=s.useCallback(()=>{De(),C.current=window.setTimeout(()=>{L.current!==null&&ke()},Yo+32)},[De,ke]),gt=s.useCallback(()=>{De(),L.current=null,it(!1),$e(null),ve(null),Ce(null),Y(0),ee(!1),I.current=!1,q.current=0,$.current="none"},[De,it]),je=s.useCallback(A=>{if(!(!Ue||!ne)){if(O.current){if(L.current===A){z.current=A,ke();return}gt()}De(),Ke(A),L.current=A,$e(A),it(!0),ot()}},[Ue,ne,ke,gt,De,Ke,it,ot]);S.current=je;const vt=s.useCallback(()=>{K.current=null,j.current=!1,k.current!==null&&(window.clearInterval(k.current),k.current=null),H.current!==null&&(window.clearTimeout(H.current),H.current=null)},[]),It=s.useCallback(A=>{k.current!==null&&window.clearInterval(k.current);const Le=j.current?xb:vb;k.current=window.setInterval(()=>{S.current(A)},Le)},[]),kt=s.useCallback(A=>{K.current!==A&&(vt(),K.current=A,j.current=!1,S.current(A),It(A),H.current=window.setTimeout(()=>{H.current=null,K.current===A&&(j.current=!0,It(A))},yb))},[vt,It]),wt=s.useCallback(()=>{const A=f.current;if(!A)return;const Le=J==null?void 0:J.url,Ae=Le?G.current.get(Le):void 0;if(Ae!=null&&Ae.width&&(Ae!=null&&Ae.height)){oe(zs(A,Ae.width,Ae.height));return}const ze=w.current;if(ze&&Le&&(ze.src===Le||ze.currentSrc===Le)){const{width:zt,height:ft}=Cb(ze);if(zt&&ft){rt(Le,zt,ft),oe(zs(A,zt,ft));return}}const pt=Zc(A);!pt.width||!pt.height||oe(pt)},[J==null?void 0:J.url,rt]),Dt=s.useCallback(A=>{if(w.current=A,!!A){if(A instanceof HTMLVideoElement){A.readyState>=1&&A.videoWidth>0&&wt();return}A.complete&&A.naturalWidth>0&&wt()}},[wt]),Bt=s.useCallback(()=>{ut(),wt(),le(A=>A+1)},[ut,wt]);s.useEffect(()=>{Bt();const A=f.current,Le=E.current,Ae=new ResizeObserver(()=>Bt());return A&&Ae.observe(A),Le&&Ae.observe(Le),window.addEventListener("resize",Bt),()=>{Ae.disconnect(),window.removeEventListener("resize",Bt)}},[Bt,n,x]),s.useLayoutEffect(()=>{if(!J)return;const A=w.current;if(A){if(A instanceof HTMLImageElement&&A.complete&&A.naturalWidth>0){wt();return}A instanceof HTMLVideoElement&&A.readyState>=1&&A.videoWidth>0&&wt()}},[J==null?void 0:J.url,n,wt]),s.useEffect(()=>{Fe()},[Fe,X]),s.useEffect(()=>{const A=new Set,Le=[],Ae=ze=>{!(ze!=null&&ze.url)||A.has(ze.url)||(A.add(ze.url),Le.push(ze))};t.forEach(Ae),u.forEach(ze=>ze.items.forEach(Ae)),Le.forEach(ze=>{G.current.has(ze.url)||Lb(ze,rt)})},[t,u,rt]),s.useEffect(()=>{if(ie!=="opening"||!ne)return;if(!y){we("open");return}U(!1);const A=requestAnimationFrame(()=>{requestAnimationFrame(()=>{U(!0),we("open")})});return()=>cancelAnimationFrame(A)},[ie,ne,y]),s.useEffect(()=>{if(ie!=="closing")return;const A=setTimeout(()=>g(),Hn);return()=>clearTimeout(A)},[ie,g]),s.useEffect(()=>()=>{De()},[De]),s.useLayoutEffect(()=>{Pe.current===n&&he.current===(J==null?void 0:J.url)||(De(),L.current=null,$e(null),ve(null),Ce(null),xe(0),Y(0),it(!1),V(!1),ee(!1),N.current=0,q.current=0,$.current="none",I.current=!1,T.current=null,W.current=!1,w.current=null,Fe(),Pe.current=n,he.current=J==null?void 0:J.url)},[n,J==null?void 0:J.url,it,De,Fe]),s.useLayoutEffect(()=>{const A=z.current;A!==null&&(z.current=null,requestAnimationFrame(()=>{S.current(A)}))},[n,p,J==null?void 0:J.url]),s.useLayoutEffect(()=>{if(ie==="opening"){P.current=!1,B(!1);return}if(ie!=="open"||P.current)return;if(!Xe&&!fe){P.current=!0;return}B(!1);const A=requestAnimationFrame(()=>{requestAnimationFrame(()=>{B(!0),P.current=!0})});return()=>cancelAnimationFrame(A)},[ie,Xe==null?void 0:Xe.url,fe==null?void 0:fe.url]),s.useEffect(()=>{if(ie!=="open")return;const A=()=>{const ft=St=>{St.stopPropagation(),St.preventDefault(),document.removeEventListener("click",ft,!0)};document.addEventListener("click",ft,!0)},Le=ft=>{const St=ft<0?1:-1;De(),Ke(St),L.current=St,$e(St),it(!0),ot()},Ae=ft=>{if(Math.abs(ft)>fb&&Ue){Le(ft);return}L.current=null,$e(null),ve(null),Ce(null),it(!0),Y(0),qe()},ze=ft=>{if(ft.touches.length!==1||O.current)return;const St=ft.touches[0];W.current=!0,T.current={x:St.clientX,y:St.clientY},$.current="none",q.current=0,I.current=!1},pt=ft=>{if(!T.current||ft.touches.length!==1||O.current)return;const St=ft.touches[0],Kt=St.clientX-T.current.x,Ht=St.clientY-T.current.y;if($.current==="none"){if(Math.abs(Kt)<10&&Math.abs(Ht)<10)return;if(Math.abs(Kt)>Math.abs(Ht)){if(!Ue)return;$.current="horizontal"}else if(Ht>0){if(!at)return;$.current="vertical"}else return}if($.current==="horizontal"){I.current=!0,ee(!0),q.current=Kt,Y(Kt),ft.preventDefault();return}$.current==="vertical"&&(I.current=!0,ee(!0),N.current=Ht,xe(Ht),ft.preventDefault())},zt=()=>{if(!T.current)return;const ft=$.current,St=I.current;if(St&&ft==="horizontal")Ae(q.current),A();else if(St&&ft==="vertical"){const Kt=N.current;if(at&&Kt>hb){const Ht=window.innerHeight;N.current=Ht,V(!0),xe(Ht),we("closing")}else N.current=0,xe(0);A()}else ft==="horizontal"&&Math.abs(q.current)>0&&(Ae(q.current),A());T.current=null,$.current="none",q.current=0,I.current=!1,ee(!1)};return document.addEventListener("touchstart",ze,{passive:!0}),document.addEventListener("touchmove",pt,{passive:!1}),document.addEventListener("touchend",zt),document.addEventListener("touchcancel",zt),()=>{document.removeEventListener("touchstart",ze),document.removeEventListener("touchmove",pt),document.removeEventListener("touchend",zt),document.removeEventListener("touchcancel",zt)}},[ie,Ue,it,qe,De,at,ot,Ke]);const Xt=s.useCallback(()=>{const A=(m==null?void 0:m())??y??null;A&&ne&&(te(A),U(!0)),we("closing")},[m,y,ne]);s.useEffect(()=>{const A=ze=>{if(ze.key==="Escape"){if(r&&d||ie==="closing")return;vt(),Xt();return}if(ze.key!=="ArrowLeft"&&ze.key!=="ArrowRight"||ie!=="open"||!Ue)return;ze.preventDefault();const pt=ze.key==="ArrowLeft"?-1:1;ze.repeat&&K.current===pt||kt(pt)},Le=ze=>{if(ze.key!=="ArrowLeft"&&ze.key!=="ArrowRight")return;const pt=ze.key==="ArrowLeft"?-1:1;K.current===pt&&vt()},Ae=()=>{vt()};return window.addEventListener("keydown",A),window.addEventListener("keyup",Le),window.addEventListener("blur",Ae),()=>{window.removeEventListener("keydown",A),window.removeEventListener("keyup",Le),window.removeEventListener("blur",Ae),vt()}},[ie,r,d,Xt,Ue,kt,vt]),s.useEffect(()=>{ie!=="open"&&vt()},[ie,vt]);const qt=()=>{ie==="closing"||l||Xt()},Lt=ie==="open",Ot=ie==="closing",nn=Ie>0?Math.max(0,1-Ie/500):1,xt=Ie>0?Math.max(.35,1-Ie/500):1,Te=s.useCallback(A=>{if(!(A.propertyName!=="transform"||!O.current)){if(L.current!==null){ke();return}De(),it(!1)}},[De,it,ke]),Ve=ie==="closing"?Z??y:y,st=Ve&&ne&&(ie==="opening"||Ot)?bb(Ve,ne):void 0,lt=Be&&J?ge(J,"center"):Ie>0?`translateY(${Ie}px)`:st,bt=ne?Vr(ne,R):null,Tt=!!(Ve&&ne),tt=Tt&&(ie==="closing"||ie==="open"&&h),Rt={position:"absolute",top:bt==null?void 0:bt.top,left:bt==null?void 0:bt.left,width:bt==null?void 0:bt.width,height:bt==null?void 0:bt.height,objectFit:"contain",transformOrigin:"top left",transform:lt,opacity:Ie>0?xt:Tt?1:ie==="opening"||Ot?0:1,transition:Q&&!ae?"none":ae?`transform ${Yo}ms ${bn}`:de?`transform ${Hn}ms ${bn}, opacity ${Hn}ms ${bn}`:tt?`transform ${Hn}ms ${bn}`:ie==="opening"||Ot?`opacity ${Hn}ms ${bn}`:"none",pointerEvents:Ne&&Lt&&!Be?"auto":"none",touchAction:Ne&&Lt?"none":void 0,zIndex:1,overflow:Ne?"hidden":void 0},Mt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Lt&&!Be?"auto":"none"},At=(A,Le,Ae="adjacent")=>{const ze=Oe(A);if(!ze)return{display:"none"};const pt=Ae==="far"?Le==="left"?"far-left":"far-right":Le==="left"?"left-adjacent":"right-adjacent",{start:zt}=Re!==null?ep(ze,pt,Re,R):{start:Ae==="far"?va(ze,Le,R):No(ze,Le,R)},ft=Vr(zt,R),St=ge(A,pt),Kt=!Be&&Ae==="adjacent"&&Lt&&!me?Eb(ze,Le,R):null,Ht=Ae==="far"&&Be&&Re===(Le==="left"?-1:1),sn=Q&&!ae?!1:ae,gn=Ae==="adjacent"&&Lt&&me&&!Be;return{position:"absolute",top:ft.top,left:ft.left,width:ft.width,height:ft.height,objectFit:"contain",transform:St??(Kt?`translate(${Kt.x}px, ${Kt.y}px)`:void 0),opacity:Ae==="far"?Lt&&Ht?1:0:Lt?1:0,transition:sn?Ae==="far"?`transform ${Yo}ms ${bn}`:`transform ${Yo}ms ${bn}, opacity ${Hn}ms ${bn}`:gn?`transform ${Hn}ms ${bn}`:ie==="opening"||Ot?`opacity ${Hn}ms ${bn}`:"none",pointerEvents:"none",zIndex:1}},jt=(A,Le)=>{const Ae=Oe(A);return Ae?Rb(No(Ae,Le,R),Le,R):null},Ut=A=>Le=>{if(!l){if(W.current){W.current=!1;return}Le.stopPropagation(),je(A)}},Et=Xe?jt(Xe,"left"):null,Nt=fe?jt(fe,"right"):null,_t=Et?Vr(Et,R):null,ht=Nt?Vr(Nt,R):null;return a.jsxs("div",{ref:E,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:ie==="open"?"none":void 0},onClick:qt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Lt?nn:0,transition:Q?"none":`opacity ${Hn}ms ${bn}`,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:Lt?1:0,transition:Q?"none":`opacity ${Hn}ms ${bn}`,pointerEvents:"none"},children:a.jsx(Fu,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,onClose:qt})})]}),Lt&&et&&a.jsx(Gr,{media:et,style:At(et,"left","far"),onMeasure:rt,onTransitionEnd:Te},`far-prev-${et.url}`),Lt&&Xe&&a.jsxs(a.Fragment,{children:[a.jsx(Gr,{media:Xe,style:At(Xe,"left"),onMeasure:rt,onTransitionEnd:Te},`prev-${Xe.url}`),_t&&a.jsx("div",{style:{position:"absolute",top:_t.top,left:_t.left,width:_t.width,height:_t.height,cursor:l||Q?"default":"pointer",pointerEvents:l||Q?"none":"auto",zIndex:3},onClick:Ut(-1)})]}),Lt&&fe&&a.jsxs(a.Fragment,{children:[a.jsx(Gr,{media:fe,style:At(fe,"right"),onMeasure:rt,onTransitionEnd:Te},`next-${fe.url}`),ht&&a.jsx("div",{style:{position:"absolute",top:ht.top,left:ht.left,width:ht.width,height:ht.height,cursor:l||Q?"default":"pointer",pointerEvents:l||Q?"none":"auto",zIndex:3},onClick:Ut(1)})]}),Lt&&mt&&a.jsx(Gr,{media:mt,style:At(mt,"right","far"),onMeasure:rt,onTransitionEnd:Te},`far-next-${mt.url}`),ne&&J&&(Ne?a.jsx(Mb,{src:J.url,phase:ie,onMediaElement:Dt,wrapperStyle:Rt,videoStyle:Mt,onLoadedMetadata:wt,onTransitionEnd:Te},`${n}-${J.url}`):a.jsx("img",{ref:Dt,src:J.url,alt:J.name,onLoad:wt,onTransitionEnd:Te,style:Rt},`${n}-${J.url}`))]})}const Fb=20,Nb=.18;function _b(e){return`
18808
+ `}const Hn=500,Yo=650,bn="cubic-bezier(0.22, 1, 0.36, 1)",hb=72,fb=50,yb=1e4,vb=650,xb=500;function bb(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 Ju(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=ga(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 Sb(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?Ju(i,n):null}function wb(e){return e.reduce((t,n,i)=>{var o;return(o=n.image)!=null&&o.url&&t.push({gridIndex:i,items:[n.image],entry:{title1:n.title??"",title2:n.subtitle??"",title3:n.caption??""}}),t},[])}function nr(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 Yc(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return nr(e,i,n)}const $b=.03;function Qu(e){return e.width*$b}const us={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Vr(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Zc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Cb(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function zs(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 Tb(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:zs(e,t.width,t.height)}function Lb(e,t){if(Ha(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function Pb(e){const t=new Set,n=[];for(const i of e){const o=i.image;!(o!=null&&o.url)||t.has(o.url)||(t.add(o.url),n.push(o))}return n}function Ib({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=>Ha(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function No(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:c}=n,d=Qu(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 va(e,t,n){const i=No(e,t,n);return{...i,left:2*i.left-e.left}}function Rb(e,t,n){const{left:i,width:o}=n,r=Qu(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 ep(e,t,n,i){const o=No(e,"left",i),r=No(e,"right",i),l=va(e,"left",i),c=va(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 kb(e,t,n,i){const{start:o,end:r}=ep(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function Eb(e,t,n){const i=No(e,t,n),o=va(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Ha(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function Mb({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 Gr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Ha(e)?a.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.url,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.url,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function Ab({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:m,onClose:g,onPrev:x,onNext:b}){const E=s.useRef(null),f=s.useRef(null),w=s.useRef(null),G=s.useRef(new Map),[X,k]=s.useState(0),L=s.useRef(null),A=s.useRef(0),U=s.useRef(0),$=s.useRef("none"),P=s.useRef(!1),H=s.useRef(!1),W=s.useRef(!1),C=s.useRef(null),T=s.useRef(null),B=s.useRef(null),S=s.useRef(()=>{}),K=s.useRef(null),R=s.useRef(null),_=s.useRef(null),j=s.useRef(!1),[oe,re]=s.useState(null),[O,ie]=s.useState(us),[D,le]=s.useState(0),[ee,ve]=s.useState("opening"),[Ie,be]=s.useState(0),[pe,Y]=s.useState(0),[se,xe]=s.useState(!1),[Se,Ce]=s.useState(null),[Ae,fe]=s.useState(null),[we,Te]=s.useState(null),[h,q]=s.useState(!1),[Z,te]=s.useState(null),[ue,z]=s.useState(!1),I=s.useRef(!1),[Q,ne]=s.useState(!1),[de,V]=s.useState(!1),Pe=s.useRef(n),he=s.useRef(void 0),J=t[n],He=J?Ha(J):!1,We=pe!==0||se,ot=!l&&(!r||!!c),qe=d&&!l,nt=u.length>1,tt=s.useCallback((N,Le)=>t.length<=1?null:t[(N+Le+t.length)%t.length]??null,[t]),Ve=nt?nr(u,p,-1):tt(n,-1),ge=nt?nr(u,p,1):tt(n,1),_e=Se===-1&&We?nt&&Ae!==null?nr(u,Ae,-1):we!==null?tt(we,-1):null:null,je=Se===1&&We?nt&&Ae!==null?nr(u,Ae,1):we!==null?tt(we,1):null:null,Ze=_e&&_e.url!==(Ve==null?void 0:Ve.url)?_e:null,ye=je&&je.url!==(ge==null?void 0:ge.url)?je:null,Ne=Ve&&qe?(()=>{const N=nt?Yc(u,p,-1):t.length>2?tt((n-1+t.length)%t.length,-1):null;return N&&N.url!==Ve.url?N:null})():null,Ke=ge&&qe?(()=>{const N=nt?Yc(u,p,1):t.length>2?tt((n+1)%t.length,1):null;return N&&N.url!==ge.url?N:null})():null,Qe=Ze??Ne,st=ye??Ke,rt=s.useCallback((N,Le,Be)=>{if(!N||!Le||!Be)return;const Fe=G.current,mt=Fe.get(N);(mt==null?void 0:mt.width)===Le&&(mt==null?void 0:mt.height)===Be||(Fe.set(N,{width:Le,height:Be}),k(Nt=>Nt+1))},[]),De=s.useCallback(N=>{if(!(N!=null&&N.url))return null;const Le=G.current.get(N.url);return Tb(f.current,Le)},[X,D]),Me=s.useCallback(()=>{if(!J)return;const N=De(J);if(N){re(N);return}const Le=f.current;Le&&re(Zc(Le))},[J,De]),gt=s.useCallback(N=>{if(nt){const Le=u.length;fe((p+N+Le)%Le),Te(null);return}t.length>1&&(Te((n+N+t.length)%t.length),fe(null))},[nt,u.length,p,t.length,n]),ze=s.useCallback(N=>{W.current=N,xe(N)},[]),Oe=s.useCallback(()=>{C.current!==null&&(window.clearTimeout(C.current),C.current=null)},[]),Xe=s.useCallback(()=>{Oe(),C.current=window.setTimeout(()=>{Oe(),ze(!1)},Yo+32)},[Oe,ze]),lt=s.useCallback(()=>{const N=E.current;if(!N){ie({left:0,top:0,width:typeof window<"u"?window.innerWidth:us.width,height:typeof window<"u"?window.innerHeight:us.height});return}const Le=N.getBoundingClientRect();ie({left:Le.left,top:Le.top,width:Le.width,height:Le.height})},[]),me=s.useCallback((N,Le)=>{if(We){if(Q&&!se)return`translate(${pe}px, 0px)`;if(se&&Se!==null){const Be=De(N);if(!Be)return;const{x:Fe,y:mt}=kb(Be,Le,Se,O);return`translate(${Fe}px, ${mt}px)`}if(se)return"translate(0px, 0px)"}},[We,Q,se,pe,Se,O,De]),Re=s.useCallback(()=>{const N=T.current;T.current=null,Oe(),ze(!1),Ce(null),fe(null),Te(null),Y(0),ne(!1),P.current=!1,U.current=0,$.current="none",N===-1?x():N===1&&b()},[Oe,ze,x,b]),it=s.useCallback(()=>{Oe(),C.current=window.setTimeout(()=>{T.current!==null&&Re()},Yo+32)},[Oe,Re]),ht=s.useCallback(()=>{Oe(),T.current=null,ze(!1),Ce(null),fe(null),Te(null),Y(0),ne(!1),P.current=!1,U.current=0,$.current="none"},[Oe,ze]),Ge=s.useCallback(N=>{if(!(!qe||!oe)){if(W.current){if(T.current===N){B.current=N,Re();return}ht()}Oe(),gt(N),T.current=N,Ce(N),ze(!0),it()}},[qe,oe,Re,ht,Oe,gt,ze,it]);S.current=Ge;const St=s.useCallback(()=>{K.current=null,j.current=!1,R.current!==null&&(window.clearInterval(R.current),R.current=null),_.current!==null&&(window.clearTimeout(_.current),_.current=null)},[]),Pt=s.useCallback(N=>{R.current!==null&&window.clearInterval(R.current);const Le=j.current?xb:vb;R.current=window.setInterval(()=>{S.current(N)},Le)},[]),kt=s.useCallback(N=>{K.current!==N&&(St(),K.current=N,j.current=!1,S.current(N),Pt(N),_.current=window.setTimeout(()=>{_.current=null,K.current===N&&(j.current=!0,Pt(N))},yb))},[St,Pt]),$t=s.useCallback(()=>{const N=f.current;if(!N)return;const Le=J==null?void 0:J.url,Be=Le?G.current.get(Le):void 0;if(Be!=null&&Be.width&&(Be!=null&&Be.height)){re(zs(N,Be.width,Be.height));return}const Fe=w.current;if(Fe&&Le&&(Fe.src===Le||Fe.currentSrc===Le)){const{width:Nt,height:yt}=Cb(Fe);if(Nt&&yt){rt(Le,Nt,yt),re(zs(N,Nt,yt));return}}const mt=Zc(N);!mt.width||!mt.height||re(mt)},[J==null?void 0:J.url,rt]),jt=s.useCallback(N=>{if(w.current=N,!!N){if(N instanceof HTMLVideoElement){N.readyState>=1&&N.videoWidth>0&&$t();return}N.complete&&N.naturalWidth>0&&$t()}},[$t]),Bt=s.useCallback(()=>{lt(),$t(),le(N=>N+1)},[lt,$t]);s.useEffect(()=>{Bt();const N=f.current,Le=E.current,Be=new ResizeObserver(()=>Bt());return N&&Be.observe(N),Le&&Be.observe(Le),window.addEventListener("resize",Bt),()=>{Be.disconnect(),window.removeEventListener("resize",Bt)}},[Bt,n,y]),s.useLayoutEffect(()=>{if(!J)return;const N=w.current;if(N){if(N instanceof HTMLImageElement&&N.complete&&N.naturalWidth>0){$t();return}N instanceof HTMLVideoElement&&N.readyState>=1&&N.videoWidth>0&&$t()}},[J==null?void 0:J.url,n,$t]),s.useEffect(()=>{Me()},[Me,X]),s.useEffect(()=>{const N=new Set,Le=[],Be=Fe=>{!(Fe!=null&&Fe.url)||N.has(Fe.url)||(N.add(Fe.url),Le.push(Fe))};t.forEach(Be),u.forEach(Fe=>Fe.items.forEach(Be)),Le.forEach(Fe=>{G.current.has(Fe.url)||Lb(Fe,rt)})},[t,u,rt]),s.useEffect(()=>{if(ee!=="opening"||!oe)return;if(!v){ve("open");return}q(!1);const N=requestAnimationFrame(()=>{requestAnimationFrame(()=>{q(!0),ve("open")})});return()=>cancelAnimationFrame(N)},[ee,oe,v]),s.useEffect(()=>{if(ee!=="closing")return;const N=setTimeout(()=>g(),Hn);return()=>clearTimeout(N)},[ee,g]),s.useEffect(()=>()=>{Oe()},[Oe]),s.useLayoutEffect(()=>{Pe.current===n&&he.current===(J==null?void 0:J.url)||(Oe(),T.current=null,Ce(null),fe(null),Te(null),be(0),Y(0),ze(!1),V(!1),ne(!1),A.current=0,U.current=0,$.current="none",P.current=!1,L.current=null,H.current=!1,w.current=null,Me(),Pe.current=n,he.current=J==null?void 0:J.url)},[n,J==null?void 0:J.url,ze,Oe,Me]),s.useLayoutEffect(()=>{const N=B.current;N!==null&&(B.current=null,requestAnimationFrame(()=>{S.current(N)}))},[n,p,J==null?void 0:J.url]),s.useLayoutEffect(()=>{if(ee==="opening"){I.current=!1,z(!1);return}if(ee!=="open"||I.current)return;if(!Ve&&!ge){I.current=!0;return}z(!1);const N=requestAnimationFrame(()=>{requestAnimationFrame(()=>{z(!0),I.current=!0})});return()=>cancelAnimationFrame(N)},[ee,Ve==null?void 0:Ve.url,ge==null?void 0:ge.url]),s.useEffect(()=>{if(ee!=="open")return;const N=()=>{const yt=wt=>{wt.stopPropagation(),wt.preventDefault(),document.removeEventListener("click",yt,!0)};document.addEventListener("click",yt,!0)},Le=yt=>{const wt=yt<0?1:-1;Oe(),gt(wt),T.current=wt,Ce(wt),ze(!0),it()},Be=yt=>{if(Math.abs(yt)>fb&&qe){Le(yt);return}T.current=null,Ce(null),fe(null),Te(null),ze(!0),Y(0),Xe()},Fe=yt=>{if(yt.touches.length!==1||W.current)return;const wt=yt.touches[0];H.current=!0,L.current={x:wt.clientX,y:wt.clientY},$.current="none",U.current=0,P.current=!1},mt=yt=>{if(!L.current||yt.touches.length!==1||W.current)return;const wt=yt.touches[0],Kt=wt.clientX-L.current.x,zt=wt.clientY-L.current.y;if($.current==="none"){if(Math.abs(Kt)<10&&Math.abs(zt)<10)return;if(Math.abs(Kt)>Math.abs(zt)){if(!qe)return;$.current="horizontal"}else if(zt>0){if(!ot)return;$.current="vertical"}else return}if($.current==="horizontal"){P.current=!0,ne(!0),U.current=Kt,Y(Kt),yt.preventDefault();return}$.current==="vertical"&&(P.current=!0,ne(!0),A.current=zt,be(zt),yt.preventDefault())},Nt=()=>{if(!L.current)return;const yt=$.current,wt=P.current;if(wt&&yt==="horizontal")Be(U.current),N();else if(wt&&yt==="vertical"){const Kt=A.current;if(ot&&Kt>hb){const zt=window.innerHeight;A.current=zt,V(!0),be(zt),ve("closing")}else A.current=0,be(0);N()}else yt==="horizontal"&&Math.abs(U.current)>0&&(Be(U.current),N());L.current=null,$.current="none",U.current=0,P.current=!1,ne(!1)};return document.addEventListener("touchstart",Fe,{passive:!0}),document.addEventListener("touchmove",mt,{passive:!1}),document.addEventListener("touchend",Nt),document.addEventListener("touchcancel",Nt),()=>{document.removeEventListener("touchstart",Fe),document.removeEventListener("touchmove",mt),document.removeEventListener("touchend",Nt),document.removeEventListener("touchcancel",Nt)}},[ee,qe,ze,Xe,Oe,ot,it,gt]);const Xt=s.useCallback(()=>{const N=(m==null?void 0:m())??v??null;N&&oe&&(te(N),q(!0)),ve("closing")},[m,v,oe]);s.useEffect(()=>{const N=Fe=>{if(Fe.key==="Escape"){if(r&&c||ee==="closing")return;St(),Xt();return}if(Fe.key!=="ArrowLeft"&&Fe.key!=="ArrowRight"||ee!=="open"||!qe)return;Fe.preventDefault();const mt=Fe.key==="ArrowLeft"?-1:1;Fe.repeat&&K.current===mt||kt(mt)},Le=Fe=>{if(Fe.key!=="ArrowLeft"&&Fe.key!=="ArrowRight")return;const mt=Fe.key==="ArrowLeft"?-1:1;K.current===mt&&St()},Be=()=>{St()};return window.addEventListener("keydown",N),window.addEventListener("keyup",Le),window.addEventListener("blur",Be),()=>{window.removeEventListener("keydown",N),window.removeEventListener("keyup",Le),window.removeEventListener("blur",Be),St()}},[ee,r,c,Xt,qe,kt,St]),s.useEffect(()=>{ee!=="open"&&St()},[ee,St]);const qt=()=>{ee==="closing"||l||Xt()},It=ee==="open",Dt=ee==="closing",on=Ie>0?Math.max(0,1-Ie/500):1,xt=Ie>0?Math.max(.35,1-Ie/500):1,ft=s.useCallback(N=>{if(!(N.propertyName!=="transform"||!W.current)){if(T.current!==null){Re();return}Oe(),ze(!1)}},[Oe,ze,Re]),Ee=ee==="closing"?Z??v:v,et=Ee&&oe&&(ee==="opening"||Dt)?bb(Ee,oe):void 0,Je=We&&J?me(J,"center"):Ie>0?`translateY(${Ie}px)`:et,dt=oe?Vr(oe,O):null,Tt=!!(Ee&&oe),vt=Tt&&(ee==="closing"||ee==="open"&&h),ut={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:Je,opacity:Ie>0?xt:Tt?1:ee==="opening"||Dt?0:1,transition:Q&&!se?"none":se?`transform ${Yo}ms ${bn}`:de?`transform ${Hn}ms ${bn}, opacity ${Hn}ms ${bn}`:vt?`transform ${Hn}ms ${bn}`:ee==="opening"||Dt?`opacity ${Hn}ms ${bn}`:"none",pointerEvents:He&&It&&!We?"auto":"none",touchAction:He&&It?"none":void 0,zIndex:1,overflow:He?"hidden":void 0},_t={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:It&&!We?"auto":"none"},Mt=(N,Le,Be="adjacent")=>{const Fe=De(N);if(!Fe)return{display:"none"};const mt=Be==="far"?Le==="left"?"far-left":"far-right":Le==="left"?"left-adjacent":"right-adjacent",{start:Nt}=Se!==null?ep(Fe,mt,Se,O):{start:Be==="far"?va(Fe,Le,O):No(Fe,Le,O)},yt=Vr(Nt,O),wt=me(N,mt),Kt=!We&&Be==="adjacent"&&It&&!ue?Eb(Fe,Le,O):null,zt=Be==="far"&&We&&Se===(Le==="left"?-1:1),sn=Q&&!se?!1:se,ln=Be==="adjacent"&&It&&ue&&!We;return{position:"absolute",top:yt.top,left:yt.left,width:yt.width,height:yt.height,objectFit:"contain",transform:wt??(Kt?`translate(${Kt.x}px, ${Kt.y}px)`:void 0),opacity:Be==="far"?It&&zt?1:0:It?1:0,transition:sn?Be==="far"?`transform ${Yo}ms ${bn}`:`transform ${Yo}ms ${bn}, opacity ${Hn}ms ${bn}`:ln?`transform ${Hn}ms ${bn}`:ee==="opening"||Dt?`opacity ${Hn}ms ${bn}`:"none",pointerEvents:"none",zIndex:1}},Ht=(N,Le)=>{const Be=De(N);return Be?Rb(No(Be,Le,O),Le,O):null},Ut=N=>Le=>{if(!l){if(H.current){H.current=!1;return}Le.stopPropagation(),Ge(N)}},Et=Ve?Ht(Ve,"left"):null,Wt=ge?Ht(ge,"right"):null,At=Et?Vr(Et,O):null,pt=Wt?Vr(Wt,O):null;return a.jsxs("div",{ref:E,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:ee==="open"?"none":void 0},onClick:qt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:It?on:0,transition:Q?"none":`opacity ${Hn}ms ${bn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:f,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:It?1:0,transition:Q?"none":`opacity ${Hn}ms ${bn}`,pointerEvents:"none"},children:a.jsx(Fu,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,onClose:qt})})]}),It&&Qe&&a.jsx(Gr,{media:Qe,style:Mt(Qe,"left","far"),onMeasure:rt,onTransitionEnd:ft},`far-prev-${Qe.url}`),It&&Ve&&a.jsxs(a.Fragment,{children:[a.jsx(Gr,{media:Ve,style:Mt(Ve,"left"),onMeasure:rt,onTransitionEnd:ft},`prev-${Ve.url}`),At&&a.jsx("div",{style:{position:"absolute",top:At.top,left:At.left,width:At.width,height:At.height,cursor:l||Q?"default":"pointer",pointerEvents:l||Q?"none":"auto",zIndex:3},onClick:Ut(-1)})]}),It&&ge&&a.jsxs(a.Fragment,{children:[a.jsx(Gr,{media:ge,style:Mt(ge,"right"),onMeasure:rt,onTransitionEnd:ft},`next-${ge.url}`),pt&&a.jsx("div",{style:{position:"absolute",top:pt.top,left:pt.left,width:pt.width,height:pt.height,cursor:l||Q?"default":"pointer",pointerEvents:l||Q?"none":"auto",zIndex:3},onClick:Ut(1)})]}),It&&st&&a.jsx(Gr,{media:st,style:Mt(st,"right","far"),onMeasure:rt,onTransitionEnd:ft},`far-next-${st.url}`),oe&&J&&(He?a.jsx(Mb,{src:J.url,phase:ee,onMediaElement:jt,wrapperStyle:ut,videoStyle:_t,onLoadedMetadata:$t,onTransitionEnd:ft},`${n}-${J.url}`):a.jsx("img",{ref:jt,src:J.url,alt:J.name,onLoad:$t,onTransitionEnd:ft,style:ut},`${n}-${J.url}`))]})}const Fb=20,Nb=.18;function _b(e){return`
18807
18809
  .${e}-wrapper {
18808
18810
  box-sizing: border-box;
18809
18811
  max-width: 100%;
@@ -18891,7 +18893,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
18891
18893
  pointer-events: auto;
18892
18894
  }
18893
18895
  ${gb(e)}
18894
- `}function Hb(e){const{imageDisplay:t}=e??{},n=(t==null?void 0:t.ratioValue)??"1:1",i=(t==null?void 0:t.reversed)??!1,[o,r]=n.split(":").map(Number),l=i?r:o,d=i?o:r;return d>0?l/d:1}function Wb(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 Ob(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:_.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:_.scalingValue(i*Nb,n??!1),[`--${t}-image-aspect`]:Hb(e)}}function Db(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 Qt(n,t)}function zb(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 Bb(e,t,n,i,o,r){if(!(!e||!t))return l=>{var c;const d=((c=l.currentTarget.closest(`.${i}-item`))==null?void 0:c.querySelector(`[data-waterfall-index="${n}"]`))??(l.currentTarget instanceof HTMLImageElement||l.currentTarget instanceof HTMLVideoElement?l.currentTarget:null);r(n,d?Ju(d,o):void 0)}}function jb({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:d}=_.useScopedStyles(),c=s.useMemo(()=>_b(d),[d]),u=t??[],p=(e==null?void 0:e.type)??"a",x=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,y=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,m=_.scalingValue(y,n??!1),g=`max(${m}, ${Fb}px)`,{objectFitMode:v,imageStyle:b}=zb(e),E=Db(e,n),f=s.useRef(null),[w,G]=s.useState(!1),[X,M]=s.useState([]),[T,N]=s.useState(0),[q,$]=s.useState(0),[I,W]=s.useState(null),[O,C]=s.useState({title1:"",title2:"",title3:""}),L=(!n||i)&&!w,z=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},S=z.sizeType??"none",K=L&&S!=="none"?`${d}-item-image-hover-${S}`:void 0,k=(z.value??120)/100,H=s.useCallback(pe=>{!pe||S!=="scale"||(pe.style.transformOrigin=Oh(pe))},[S]),j=s.useCallback(pe=>{if(pe){if(v==="contain"){const Y=Wb(pe);if(Y){const ae=pe.closest(`.${d}-item-image`);ae instanceof HTMLElement&&ae.style.setProperty(`--${d}-item-media-aspect`,String(Y))}}H(pe)}},[d,H,v]),ne={width:_.scalingValue(x,n??!1),...E,...Ob(e,d,n),[`--${d}-image-hover-scale`]:String(k)},oe=(()=>{const pe={},Y=f.current?getComputedStyle(f.current).getPropertyValue("--cntrl-article-width").trim():"";return Y&&(pe["--cntrl-article-width"]=Y),pe})(),R=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),ce=s.useMemo(()=>wb(u),[u]),D=s.useMemo(()=>Pb(u),[u]),le=(pe,Y)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const ae=ce.findIndex(Re=>Re.gridIndex===pe);if(ae<0)return;const se=ce[ae];$(ae),M(se.items),N(0),C(se.entry),W(Y??null),G(!0)},ie=s.useCallback(()=>{G(!1),W(null)},[]),we=s.useCallback(()=>{const pe=ce[q];return!pe||!f.current?I:Sb(f.current,pe.gridIndex,v)??I},[ce,q,I,v]),Ie=s.useCallback(pe=>{if(ce.length>1){const Y=ce.length,ae=(q+pe+Y)%Y,se=ce[ae];$(ae),M(se.items),N(0),C(se.entry);return}N(Y=>(Y+pe+X.length)%X.length)},[ce,q,X.length]),xe=ce.length>1||X.length>1;return s.useEffect(()=>{if(!w||typeof document>"u")return;const pe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=pe}},[w]),s.useEffect(()=>{!n||o||i||G(!1)},[n,o,i]),s.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&G(!1)},[e==null?void 0:e.lightbox]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),a.jsx(Ib,{mediaList:D}),a.jsx("div",{ref:f,className:`${d}-wrapper ${d}-type-${p}`,style:ne,children:u.map((pe,Y)=>{var Re,$e;const ae=!!((Re=pe.image)!=null&&Re.url),se=Bb(!!R,ae,Y,d,v,le);return a.jsxs("div",{className:`${d}-item`,children:[pe.title?a.jsx("span",{className:`${d}-item-title`,onClick:se,style:se?{cursor:"pointer"}:void 0,children:pe.title}):null,($e=pe.image)!=null&&$e.url?a.jsx("span",{className:[`${d}-item-image`,v==="contain"?`${d}-item-image-fit`:void 0,K].filter(Boolean).join(" "),children:pe.image.type==="video"?a.jsx("video",{ref:j,src:pe.image.url,"data-waterfall-index":Y,style:b,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:se,onLoadedData:Me=>j(Me.currentTarget)}):a.jsx("img",{ref:j,src:pe.image.url,alt:pe.image.name??"","data-waterfall-index":Y,style:b,onClick:se,onLoad:Me=>j(Me.currentTarget)})}):null,Y<u.length-1&&a.jsx("div",{className:`${d}-item-gap-host`,style:{width:m},children:o&&!w&&a.jsx("div",{"data-controls":"horizontalGap","data-controls-axis":"x","data-controls-min":"0",className:`${d}-item-gap-control`,style:{left:"50%",transform:"translateX(-50%)",width:g,height:"100%"}})})]},Y)})}),w&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const pe=(l?document.getElementById(l):null)??document.body;return li.createPortal(a.jsx("div",{style:oe,"data-selection":"none",children:a.jsx(Ab,{prefix:d,items:X,index:T,entry:O,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:xe,lightboxEntries:ce,entryIdx:q,layoutId:r,sourceRect:I,resolveCloseSourceRect:we,onClose:ie,onPrev:()=>Ie(-1),onNext:()=>Ie(1)})}),pe)})()]})}const Vb=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
18896
+ `}function Hb(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 Wb(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 Ob(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*Nb,n??!1),[`--${t}-image-aspect`]:Hb(e)}}function Db(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 Qt(n,t)}function zb(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 Bb(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?Ju(c,o):void 0)}}function jb({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:c}=F.useScopedStyles(),d=s.useMemo(()=>_b(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,m=F.scalingValue(v,n??!1),g=`max(${m}, ${Fb}px)`,{objectFitMode:x,imageStyle:b}=zb(e),E=Db(e,n),f=s.useRef(null),[w,G]=s.useState(!1),[X,k]=s.useState([]),[L,A]=s.useState(0),[U,$]=s.useState(0),[P,H]=s.useState(null),[W,C]=s.useState({title1:"",title2:"",title3:""}),T=(!n||i)&&!w,B=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},S=B.sizeType??"none",K=T&&S!=="none"?`${c}-item-image-hover-${S}`:void 0,R=(B.value??120)/100,_=s.useCallback(pe=>{!pe||S!=="scale"||(pe.style.transformOrigin=Oh(pe))},[S]),j=s.useCallback(pe=>{if(pe){if(x==="contain"){const Y=Wb(pe);if(Y){const se=pe.closest(`.${c}-item-image`);se instanceof HTMLElement&&se.style.setProperty(`--${c}-item-media-aspect`,String(Y))}}_(pe)}},[c,_,x]),oe={width:F.scalingValue(y,n??!1),...E,...Ob(e,c,n),[`--${c}-image-hover-scale`]:String(R)},re=(()=>{const pe={},Y=f.current?getComputedStyle(f.current).getPropertyValue("--cntrl-article-width").trim():"";return Y&&(pe["--cntrl-article-width"]=Y),pe})(),O=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),ie=s.useMemo(()=>wb(u),[u]),D=s.useMemo(()=>Pb(u),[u]),le=(pe,Y)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const se=ie.findIndex(Se=>Se.gridIndex===pe);if(se<0)return;const xe=ie[se];$(se),k(xe.items),A(0),C(xe.entry),H(Y??null),G(!0)},ee=s.useCallback(()=>{G(!1),H(null)},[]),ve=s.useCallback(()=>{const pe=ie[U];return!pe||!f.current?P:Sb(f.current,pe.gridIndex,x)??P},[ie,U,P,x]),Ie=s.useCallback(pe=>{if(ie.length>1){const Y=ie.length,se=(U+pe+Y)%Y,xe=ie[se];$(se),k(xe.items),A(0),C(xe.entry);return}A(Y=>(Y+pe+X.length)%X.length)},[ie,U,X.length]),be=ie.length>1||X.length>1;return s.useEffect(()=>{if(!w||typeof document>"u")return;const pe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=pe}},[w]),s.useEffect(()=>{!n||o||i||G(!1)},[n,o,i]),s.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&G(!1)},[e==null?void 0:e.lightbox]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),a.jsx(Ib,{mediaList:D}),a.jsx("div",{ref:f,className:`${c}-wrapper ${c}-type-${p}`,style:oe,children:u.map((pe,Y)=>{var Se,Ce;const se=!!((Se=pe.image)!=null&&Se.url),xe=Bb(!!O,se,Y,c,x,le);return a.jsxs("div",{className:`${c}-item`,children:[pe.title?a.jsx("span",{className:`${c}-item-title`,onClick:xe,style:xe?{cursor:"pointer"}:void 0,children:pe.title}):null,(Ce=pe.image)!=null&&Ce.url?a.jsx("span",{className:[`${c}-item-image`,x==="contain"?`${c}-item-image-fit`:void 0,K].filter(Boolean).join(" "),children:pe.image.type==="video"?a.jsx("video",{ref:j,src:pe.image.url,"data-waterfall-index":Y,style:b,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:xe,onLoadedData:Ae=>j(Ae.currentTarget)}):a.jsx("img",{ref:j,src:pe.image.url,alt:pe.image.name??"","data-waterfall-index":Y,style:b,onClick:xe,onLoad:Ae=>j(Ae.currentTarget)})}):null,Y<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:g,height:"100%"}})})]},Y)})}),w&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const pe=(l?document.getElementById(l):null)??document.body;return Gn.createPortal(a.jsx("div",{style:re,"data-selection":"none",children:a.jsx(Ab,{prefix:c,items:X,index:L,entry:W,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:be,lightboxEntries:ie,entryIdx:U,layoutId:r,sourceRect:P,resolveCloseSourceRect:ve,onClose:ee,onPrev:()=>Ie(-1),onNext:()=>Ie(1)})}),pe)})()]})}const Vb=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
18895
18897
  import type React from 'react';
18896
18898
  import { createPortal } from 'react-dom';
18897
18899
  import { CommonComponentProps } from '../props';
@@ -19405,7 +19407,7 @@ export function Waterfall({
19405
19407
  </>
19406
19408
  );
19407
19409
  }
19408
- `,Gb="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),yi={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 Xb(e){const t={};return t[yt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[yt(e,"fontSettings")]={...yi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[yt(e,"fontSize")]={...yi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[yt(e,"lineHeight")]={...yi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[yt(e,"letterSpacing")]={...yi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[yt(e,"wordSpacing")]={...yi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[yt(e,"textAlign")]={...yi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[yt(e,"textAppearance")]={...yi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const _o=Li.filter(e=>e!=="count"),qb=_o.reduce((e,t)=>({...e,...Xb(t)}),{}),Ub=_o.reduce((e,t)=>({...e,[yt(t,"fontFamily")]:"Arial",[yt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[yt(t,"letterSpacing")]:0,[yt(t,"wordSpacing")]:0,[yt(t,"textAlign")]:"left",[yt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ps(e){return _o.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[yt(n,"fontSize")]=i),o!==void 0&&(t[yt(n,"lineHeight")]=o),t},{})}const Kb={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(_o.map(e=>[Ll[e],Pl(e)]))},Xr={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},Yb=[{title:"Salton Sea from Above",...Xr,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",objectFit:"cover"}},{title:"Lunar Module Pilot",...Xr,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...Xr,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",objectFit:"cover"}},{title:"David R. Scott During EVA",...Xr,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",objectFit:"cover"}}],Zb={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},caption:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"cover",type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}},required:["image"]},default:Yb},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:{...yi.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"]}}},...qb},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:Gb,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...Ub},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,...ps({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,...ps({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,...ps({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:[Kb]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},Jb={element:jb,id:"waterfall",name:"Waterfall",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/waterfall.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},..._o.map(e=>({path:`${yt(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",..._o.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${yt(t,"fontFamily")}`}),{})},schema:Zb,sourceCode:Vb},wo=500,tp="cubic-bezier(0.25, 1, 0.5, 1)",Qb=300,eS=5,tS=.15,nS=.4,iS=100,ao=100,Jc={color:"#000000",hover:"#cccccc"},Zo={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},oS={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}},ms={offset:{x:0,y:0},linkColor:"#cccccc"},Qc={sizeType:"drag",value:3},rS="left";function aS(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.02,lineHeight:(e==null?void 0:e.titleLineHeight)??.02,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,textAlign:rS,color:(e==null?void 0:e.titleColor)??"#000000"};return Qt(n,t)}function so(e,t,n){return`${e}: ${_.scalingValue(t/1440,n)};`}function ir(e,t){return t<=0?0:(e%t+t)%t}function sS(e,t,n,i){if(!i)return{position:ir(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 lS(e,t){const n=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);return t?n.m41:n.m42}function cS(e,t){const n=document.createElement("div");n.className=t,n.setAttribute("aria-hidden","true"),e.appendChild(n);const i=(p,x)=>{n.style.transform=`translate(${p}px, ${x}px)`;const y=n.getBoundingClientRect();return{x:y.left,y:y.top}},o=i(0,0),r=i(ao,0),l=i(0,ao);e.removeChild(n);const d={x:(r.x-o.x)/ao,y:(r.y-o.y)/ao},c={x:(l.x-o.x)/ao,y:(l.y-o.y)/ao},u=d.x*c.y-c.x*d.y;return{ex:d,ey:c,det:u}}function dS(e,t,n){const{ex:i,ey:o,det:r}=e;return{x:(t*o.y-n*o.x)/r,y:(i.x*n-i.y*t)/r}}function uS(e,t){return`
19410
+ `,Gb="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),yi={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 Xb(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")]={...yi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSize")]={...yi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[bt(e,"lineHeight")]={...yi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[bt(e,"letterSpacing")]={...yi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[bt(e,"wordSpacing")]={...yi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[bt(e,"textAlign")]={...yi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[bt(e,"textAppearance")]={...yi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const _o=Li.filter(e=>e!=="count"),qb=_o.reduce((e,t)=>({...e,...Xb(t)}),{}),Ub=_o.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 ps(e){return _o.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 Kb={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(_o.map(e=>[Ll[e],Pl(e)]))},Xr={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},Yb=[{title:"Salton Sea from Above",...Xr,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",objectFit:"cover"}},{title:"Lunar Module Pilot",...Xr,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...Xr,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",objectFit:"cover"}},{title:"David R. Scott During EVA",...Xr,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",objectFit:"cover"}}],Zb={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},caption:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"cover",type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}},required:["image"]},default:Yb},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:{...yi.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"]}}},...qb},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:Gb,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...Ub},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,...ps({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,...ps({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,...ps({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:[Kb]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},Jb={element:jb,id:"waterfall",name:"Waterfall",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/waterfall.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},..._o.map(e=>({path:`${bt(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",..._o.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${bt(t,"fontFamily")}`}),{})},schema:Zb,sourceCode:Vb},wo=500,tp="cubic-bezier(0.25, 1, 0.5, 1)",Qb=300,eS=5,tS=.15,nS=.4,iS=100,ao=100,Jc={color:"#000000",hover:"#cccccc"},Zo={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},oS={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}},ms={offset:{x:0,y:0},linkColor:"#cccccc"},Qc={sizeType:"drag",value:3},rS="left";function aS(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.02,lineHeight:(e==null?void 0:e.titleLineHeight)??.02,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,textAlign:rS,color:(e==null?void 0:e.titleColor)??"#000000"};return Qt(n,t)}function so(e,t,n){return`${e}: ${F.scalingValue(t/1440,n)};`}function ir(e,t){return t<=0?0:(e%t+t)%t}function sS(e,t,n,i){if(!i)return{position:ir(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 lS(e,t){const n=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);return t?n.m41:n.m42}function cS(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(ao,0),l=i(0,ao);e.removeChild(n);const c={x:(r.x-o.x)/ao,y:(r.y-o.y)/ao},d={x:(l.x-o.x)/ao,y:(l.y-o.y)/ao},u=c.x*d.y-d.x*c.y;return{ex:c,ey:d,det:u}}function dS(e,t,n){const{ex:i,ey:o,det:r}=e;return{x:(t*o.y-n*o.x)/r,y:(i.x*n-i.y*t)/r}}function uS(e,t){return`
19409
19411
  .${e}-wrapper {
19410
19412
  position: relative;
19411
19413
  width: 100%;
@@ -19675,7 +19677,7 @@ export function Waterfall({
19675
19677
  from { clip-path: inset(100% 0 0 0); }
19676
19678
  to { clip-path: inset(0 0 0 0); }
19677
19679
  }
19678
- `}function pS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o}){const{prefix:r}=_.useScopedStyles(),l=aS(e,n),d=t??[],c=d.length,u=(e==null?void 0:e.trigger)??Qc,p=u.sizeType??"drag",x=u.value??Qc.value,y=(e==null?void 0:e.direction)??"horizontal",m=(e==null?void 0:e.transition)??"slide",g=(e==null?void 0:e.nav)??"classic",v=(e==null?void 0:e.navSize)??"m",b=oS[v],E=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,f=fe=>_.scalingValue(fe*E,n),w=(e==null?void 0:e.show)??"always",G=(e==null?void 0:e.controls)??null,X=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,M=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,T=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,N=(e==null?void 0:e.controlsColor)??Jc.color,q=(e==null?void 0:e.controlsHoverColor)??Jc.hover,$=(e==null?void 0:e.navColor)??Zo.colors.inactive,I=(e==null?void 0:e.navPaginationColor)??Zo.colors.pagination,W=(e==null?void 0:e.navBackgroundColor)??Zo.colors.background,O=(e==null?void 0:e.linkColor)??ms.linkColor,C=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,L=y==="horizontal",z=p==="click",S=p==="drag",K=p==="auto"&&(!n||!!i),k=!n,H=m==="slide",j=g==="classic",ne=w!=="never"&&X>0,oe=w==="on hover",R=_.scalingValue(X,n),ce={width:R,height:R,maxWidth:R},D=H&&c>1,[le,ie]=s.useState(0),[we,Ie]=s.useState(D?1:0),[xe,pe]=s.useState(!1),[Y,ae]=s.useState(!1),[se,Re]=s.useState(!1),[$e,Me]=s.useState(0),[ve,be]=s.useState(!1),[Ce,h]=s.useState(!1),U=s.useRef(!1),Z=s.useRef(we);Z.current=we;const te=s.useRef(null),me=s.useRef(0),B=s.useRef(null),P=s.useRef(null),Q=s.useRef(null),ee=s.useRef(null),de=s.useCallback(fe=>{U.current=fe,pe(fe)},[]),V=s.useCallback(fe=>{if(c<2||fe===0)return;const He=fe>0?1:-1,We=Math.abs(fe);if(be(!0),de(!0),!H){ie(mt=>ir(mt+fe,c));return}let Qe=Z.current;const ye=D&&(Qe===0||Qe===c+1),_e=ye?le+1:null;ye&&(Qe=le+1);let Ge=We;for(;Ge>0;){const mt=sS(Qe,He,c,D);if(Qe=mt.position,Ge-=1,mt.hitBoundary){me.current=Ge*He;break}}const et=We-Ge;if(et>0&&ie(mt=>ir(mt+et*He,c)),Z.current=Qe,_e!==null){if(Z.current=_e,Qe===_e){ae(!0),Ie(Qe);return}te.current=Qe,ae(!0),Ie(_e);return}ae(!1),Ie(Qe)},[le,c,D,H,de]),Pe=s.useCallback(fe=>{V(fe)},[V]),he=s.useCallback(fe=>{if(c<2)return;const He=ir(fe,c);if(!(He===le&&!U.current)&&(be(!0),de(!0),ie(He),H)){const We=He+(D?1:0);te.current=null,me.current=0,Z.current=We,ae(!1),Ie(We)}},[le,c,D,H,de]);s.useEffect(()=>{if(!xe)return;const fe=window.setTimeout(()=>{if(D&&(we===0||we===c+1)){te.current=null,ae(!0),Ie(le+1);return}de(!1)},wo);return()=>window.clearTimeout(fe)},[le,c,D,xe,de,we]),s.useEffect(()=>{if(!Y)return;let fe=0;const He=requestAnimationFrame(()=>{fe=requestAnimationFrame(()=>{const We=te.current;te.current=null;const Qe=me.current;if(me.current=0,ae(!1),We!==null){Z.current=We,Ie(We);return}if(Qe!==0){V(Qe);return}de(!1)})});return()=>{cancelAnimationFrame(He),cancelAnimationFrame(fe)}},[V,de,Y]);const J=`${D}:${c}`,Ne=s.useRef(J);s.useEffect(()=>{if(Ne.current===J)return;Ne.current=J;const fe=c>0?Math.min(le,c-1):0;Q.current=null,ee.current=null,Re(!1),Me(0),ie(fe),ae(!0),Ie(fe+(D?1:0))},[le,c,D,J]),s.useEffect(()=>{if(!ve)return;const fe=window.setTimeout(()=>be(!1),Qb);return()=>window.clearTimeout(fe)},[ve,le]),s.useEffect(()=>{if(!K||c<2)return;const fe=Math.max(x,.1)*1e3,He=window.setInterval(()=>{k&&Ce||Pe(1)},fe);return()=>window.clearInterval(He)},[x,c,Pe,K,Ce,k]);const Be=s.useCallback(fe=>{const He=Q.current;if(!He||He.pointerId!==fe.pointerId)return;Q.current=null,ee.current=null;const We=B.current;if(We!=null&&We.hasPointerCapture(fe.pointerId)&&We.releasePointerCapture(fe.pointerId),!He.isActive){H&&Me(0);return}const ye=!(fe.timeStamp-He.lastTime>iS)&&Math.abs(He.velocity)>nS,_e=He.size>0&&Math.abs(He.offset-He.baseOffset)>He.size*tS;if(Re(!1),!ye&&!_e){Me(0);return}const Ge=_e?He.offset-He.baseOffset:He.velocity;let et=1;_e&&He.size>0&&(et=Math.max(1,Math.round(Math.abs(Ge)/He.size))),Me(0),V(Ge<0?et:-et)},[V,H]);s.useEffect(()=>{const fe=He=>{ee.current===null||He.pointerId!==ee.current||Be(He)};return window.addEventListener("pointerup",fe),window.addEventListener("pointercancel",fe),()=>{window.removeEventListener("pointerup",fe),window.removeEventListener("pointercancel",fe)}},[Be]);const at=fe=>{const He=B.current;if(!S||c<2||!He||fe.pointerType==="mouse"&&fe.button!==0)return;te.current=null,me.current=0,U.current&&de(!1);let We=0;const Qe=P.current;if(H&&Qe){const ye=L?Qe.offsetWidth:Qe.offsetHeight;if(ye>0){const _e=lS(Qe,L);let Ge=Z.current;D&&(Ge===0||Ge===c+1)?(Ge=le+1,Z.current=Ge,ae(!0),Ie(Ge),We=0):We=_e+Ge*ye,Me(We)}}He.setPointerCapture(fe.pointerId),ee.current=fe.pointerId,Q.current={pointerId:fe.pointerId,startClientX:fe.clientX,startClientY:fe.clientY,axes:cS(He,`${r}-axis-probe`),size:L?He.offsetWidth:He.offsetHeight,isActive:!1,baseOffset:We,offset:We,lastTime:fe.timeStamp,velocity:0}},Ue=fe=>{const He=Q.current;if(!He||He.pointerId!==fe.pointerId)return;if(fe.pointerType==="mouse"&&fe.buttons===0){Be(fe);return}const We=fe.clientX-He.startClientX,Qe=fe.clientY-He.startClientY,ye=He.axes?dS(He.axes,We,Qe):{x:We,y:Qe},_e=L?ye.x:ye.y,Ge=L?ye.y:ye.x,et=He.baseOffset+_e;if(!He.isActive){if(Math.max(Math.abs(_e),Math.abs(Ge))<eS)return;if(Math.abs(Ge)>Math.abs(_e)){const rt=B.current;rt!=null&&rt.hasPointerCapture(He.pointerId)&&rt.releasePointerCapture(He.pointerId),Q.current=null,ee.current=null,H&&Me(0);return}He.isActive=!0,Re(!0)}const mt=fe.timeStamp-He.lastTime;mt>0&&(He.velocity=(et-He.offset)/mt,He.lastTime=fe.timeStamp),He.offset=et,H&&Me(et)},nt=fe=>{Be(fe)},Ze=L?`translate3d(calc(${-we*100}% + ${$e}px), 0, 0)`:`translate3d(0, calc(${-we*100}% + ${$e}px), 0)`,Xe=D?[d[c-1],...d,d[0]]:d;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:uS(r,n)}}),a.jsxs("div",{className:Ct(`${r}-wrapper`,{[`${r}-transition-reveal`]:m==="reveal",[`${r}-transition-reveal-vertical`]:m==="reveal"&&!L}),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`]:S,[`${r}-track-draggable-vertical`]:S&&!L}),onPointerDown:at,onPointerMove:Ue,onPointerUp:nt,onPointerCancel:nt,onLostPointerCapture:fe=>{ee.current===fe.pointerId&&Be(fe)},children:a.jsx("div",{ref:P,className:Ct(`${r}-list`,{[`${r}-list-slide`]:H,[`${r}-list-slide-vertical`]:H&&!L,[`${r}-list-fade`]:!H}),style:H?{transform:Ze,transition:se||Y?"none":`transform ${wo}ms ${tp}`}:void 0,children:Xe.map((fe,He)=>{const We=D?ir(He-1,c):He,ye=D&&(He===0||He===c+1)?`clone-${He===0?"start":"end"}`:`slide-${We}`;return a.jsx("div",{className:Ct(`${r}-slide`,{[`${r}-is-active`]:!H&&We===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`]:fe.image.objectFit==="contain",[`${r}-cover`]:fe.image.objectFit==="cover"}),src:fe.image.url,alt:fe.image.name??"",draggable:!1})})})},ye)})})}),ne&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Ct(`${r}-arrow`,{[`${r}-arrow-prev`]:L,[`${r}-arrow-prev-vertical`]:!L,[`${r}-hover-arrow`]:oe}),style:{color:N,"--arrow-hover-color":q,...ce},children:a.jsxs("button",{onClick:fe=>{fe.stopPropagation(),Pe(-1)},className:`${r}-arrow-inner`,style:{transform:`translate(${_.scalingValue(M,n)}, ${_.scalingValue(T*(L?1:-1),n)}) rotate(${L?"0deg":"90deg"})`},children:[G&&a.jsx(pn,{url:G,fill:N,hoverFill:q,className:Ct(`${r}-arrow-img`,`${r}-mirror`),style:ce}),!G&&a.jsx(ed,{color:N,className:Ct(`${r}-arrow-icon`,`${r}-arrow-img`,`${r}-mirror`)})]})}),a.jsx("div",{className:Ct(`${r}-arrow`,{[`${r}-arrow-next`]:L,[`${r}-arrow-next-vertical`]:!L,[`${r}-hover-arrow`]:oe}),style:{color:N,"--arrow-hover-color":q,...ce},children:a.jsxs("button",{className:`${r}-arrow-inner`,onClick:fe=>{fe.stopPropagation(),Pe(1)},style:{transform:`translate(${_.scalingValue(M*(L?-1:1),n)}, ${_.scalingValue(T,n)}) rotate(${L?"0deg":"90deg"})`},children:[G&&a.jsx(pn,{url:G,fill:N,hoverFill:q,className:`${r}-arrow-img`,style:ce}),!G&&a.jsx(ed,{color:N,className:Ct(`${r}-arrow-icon`,`${r}-arrow-img`)})]})})]}),z&&a.jsx("div",{className:`${r}-click-overlay`,onClick:()=>Pe(1)}),j&&a.jsx("div",{className:Ct(`${r}-pagination`,{[`${r}-pagination-inside-bottom`]:L,[`${r}-pagination-inside-left`]:!L}),style:L?{bottom:f(b.inset)}:{left:f(b.inset)},children:a.jsx("div",{className:Ct(`${r}-pagination-inner`,{[`${r}-pagination-vertical`]:!L,[`${r}-animate-dots`]:ve}),style:{backgroundColor:W,gap:f(b.gapInactive-b.activeDot+b.dot),...L?{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(${_.scalingValue(Zo.offset.x,n)}, ${_.scalingValue(Zo.offset.y,n)})`},children:d.map((fe,He)=>{const We=He===le,Qe=We?b.activeDot:b.dot;return a.jsx("button",{onClick:()=>he(He),className:`${r}-pagination-item`,style:{width:f(b.activeDot)},children:a.jsx("div",{className:`${r}-dot`,style:{backgroundColor:We?I:$,width:f(Qe)}})},He)})},`${v}-${y}`)})]}),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:_.scalingValue(C,n)}}),a.jsx("div",{className:`${r}-caption-text-wrapper`,children:d.map((fe,He)=>a.jsx("div",{className:Ct(`${r}-caption-text`,{[`${r}-with-pointer-events`]:He===le&&n,[`${r}-active`]:He===le}),style:{...l,width:"max-content",transitionDuration:`${Math.round(wo/2)}ms`},children:a.jsx("div",{className:`${r}-caption-text-inner`,style:{"--link-color":O,"--link-hover-color":O,position:"relative",top:_.scalingValue(ms.offset.y,n),left:_.scalingValue(ms.offset.x,n)},children:a.jsx(Zi,{content:fe.imageCaption})})},He))})]})]})]})}function ed({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 mS=`import React, { useCallback, useEffect, useRef, useState } from 'react';
19680
+ `}function pS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o}){const{prefix:r}=F.useScopedStyles(),l=aS(e,n),c=t??[],d=c.length,u=(e==null?void 0:e.trigger)??Qc,p=u.sizeType??"drag",y=u.value??Qc.value,v=(e==null?void 0:e.direction)??"horizontal",m=(e==null?void 0:e.transition)??"slide",g=(e==null?void 0:e.nav)??"classic",x=(e==null?void 0:e.navSize)??"m",b=oS[x],E=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,f=ge=>F.scalingValue(ge*E,n),w=(e==null?void 0:e.show)??"always",G=(e==null?void 0:e.controls)??null,X=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,k=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,L=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,A=(e==null?void 0:e.controlsColor)??Jc.color,U=(e==null?void 0:e.controlsHoverColor)??Jc.hover,$=(e==null?void 0:e.navColor)??Zo.colors.inactive,P=(e==null?void 0:e.navPaginationColor)??Zo.colors.pagination,H=(e==null?void 0:e.navBackgroundColor)??Zo.colors.background,W=(e==null?void 0:e.linkColor)??ms.linkColor,C=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,T=v==="horizontal",B=p==="click",S=p==="drag",K=p==="auto"&&(!n||!!i),R=!n,_=m==="slide",j=g==="classic",oe=w!=="never"&&X>0,re=w==="on hover",O=F.scalingValue(X,n),ie={width:O,height:O,maxWidth:O},D=_&&d>1,[le,ee]=s.useState(0),[ve,Ie]=s.useState(D?1:0),[be,pe]=s.useState(!1),[Y,se]=s.useState(!1),[xe,Se]=s.useState(!1),[Ce,Ae]=s.useState(0),[fe,we]=s.useState(!1),[Te,h]=s.useState(!1),q=s.useRef(!1),Z=s.useRef(ve);Z.current=ve;const te=s.useRef(null),ue=s.useRef(0),z=s.useRef(null),I=s.useRef(null),Q=s.useRef(null),ne=s.useRef(null),de=s.useCallback(ge=>{q.current=ge,pe(ge)},[]),V=s.useCallback(ge=>{if(d<2||ge===0)return;const _e=ge>0?1:-1,je=Math.abs(ge);if(we(!0),de(!0),!_){ee(st=>ir(st+ge,d));return}let Ze=Z.current;const ye=D&&(Ze===0||Ze===d+1),Ne=ye?le+1:null;ye&&(Ze=le+1);let Ke=je;for(;Ke>0;){const st=sS(Ze,_e,d,D);if(Ze=st.position,Ke-=1,st.hitBoundary){ue.current=Ke*_e;break}}const Qe=je-Ke;if(Qe>0&&ee(st=>ir(st+Qe*_e,d)),Z.current=Ze,Ne!==null){if(Z.current=Ne,Ze===Ne){se(!0),Ie(Ze);return}te.current=Ze,se(!0),Ie(Ne);return}se(!1),Ie(Ze)},[le,d,D,_,de]),Pe=s.useCallback(ge=>{V(ge)},[V]),he=s.useCallback(ge=>{if(d<2)return;const _e=ir(ge,d);if(!(_e===le&&!q.current)&&(we(!0),de(!0),ee(_e),_)){const je=_e+(D?1:0);te.current=null,ue.current=0,Z.current=je,se(!1),Ie(je)}},[le,d,D,_,de]);s.useEffect(()=>{if(!be)return;const ge=window.setTimeout(()=>{if(D&&(ve===0||ve===d+1)){te.current=null,se(!0),Ie(le+1);return}de(!1)},wo);return()=>window.clearTimeout(ge)},[le,d,D,be,de,ve]),s.useEffect(()=>{if(!Y)return;let ge=0;const _e=requestAnimationFrame(()=>{ge=requestAnimationFrame(()=>{const je=te.current;te.current=null;const Ze=ue.current;if(ue.current=0,se(!1),je!==null){Z.current=je,Ie(je);return}if(Ze!==0){V(Ze);return}de(!1)})});return()=>{cancelAnimationFrame(_e),cancelAnimationFrame(ge)}},[V,de,Y]);const J=`${D}:${d}`,He=s.useRef(J);s.useEffect(()=>{if(He.current===J)return;He.current=J;const ge=d>0?Math.min(le,d-1):0;Q.current=null,ne.current=null,Se(!1),Ae(0),ee(ge),se(!0),Ie(ge+(D?1:0))},[le,d,D,J]),s.useEffect(()=>{if(!fe)return;const ge=window.setTimeout(()=>we(!1),Qb);return()=>window.clearTimeout(ge)},[fe,le]),s.useEffect(()=>{if(!K||d<2)return;const ge=Math.max(y,.1)*1e3,_e=window.setInterval(()=>{R&&Te||Pe(1)},ge);return()=>window.clearInterval(_e)},[y,d,Pe,K,Te,R]);const We=s.useCallback(ge=>{const _e=Q.current;if(!_e||_e.pointerId!==ge.pointerId)return;Q.current=null,ne.current=null;const je=z.current;if(je!=null&&je.hasPointerCapture(ge.pointerId)&&je.releasePointerCapture(ge.pointerId),!_e.isActive){_&&Ae(0);return}const ye=!(ge.timeStamp-_e.lastTime>iS)&&Math.abs(_e.velocity)>nS,Ne=_e.size>0&&Math.abs(_e.offset-_e.baseOffset)>_e.size*tS;if(Se(!1),!ye&&!Ne){Ae(0);return}const Ke=Ne?_e.offset-_e.baseOffset:_e.velocity;let Qe=1;Ne&&_e.size>0&&(Qe=Math.max(1,Math.round(Math.abs(Ke)/_e.size))),Ae(0),V(Ke<0?Qe:-Qe)},[V,_]);s.useEffect(()=>{const ge=_e=>{ne.current===null||_e.pointerId!==ne.current||We(_e)};return window.addEventListener("pointerup",ge),window.addEventListener("pointercancel",ge),()=>{window.removeEventListener("pointerup",ge),window.removeEventListener("pointercancel",ge)}},[We]);const ot=ge=>{const _e=z.current;if(!S||d<2||!_e||ge.pointerType==="mouse"&&ge.button!==0)return;te.current=null,ue.current=0,q.current&&de(!1);let je=0;const Ze=I.current;if(_&&Ze){const ye=T?Ze.offsetWidth:Ze.offsetHeight;if(ye>0){const Ne=lS(Ze,T);let Ke=Z.current;D&&(Ke===0||Ke===d+1)?(Ke=le+1,Z.current=Ke,se(!0),Ie(Ke),je=0):je=Ne+Ke*ye,Ae(je)}}_e.setPointerCapture(ge.pointerId),ne.current=ge.pointerId,Q.current={pointerId:ge.pointerId,startClientX:ge.clientX,startClientY:ge.clientY,axes:cS(_e,`${r}-axis-probe`),size:T?_e.offsetWidth:_e.offsetHeight,isActive:!1,baseOffset:je,offset:je,lastTime:ge.timeStamp,velocity:0}},qe=ge=>{const _e=Q.current;if(!_e||_e.pointerId!==ge.pointerId)return;if(ge.pointerType==="mouse"&&ge.buttons===0){We(ge);return}const je=ge.clientX-_e.startClientX,Ze=ge.clientY-_e.startClientY,ye=_e.axes?dS(_e.axes,je,Ze):{x:je,y:Ze},Ne=T?ye.x:ye.y,Ke=T?ye.y:ye.x,Qe=_e.baseOffset+Ne;if(!_e.isActive){if(Math.max(Math.abs(Ne),Math.abs(Ke))<eS)return;if(Math.abs(Ke)>Math.abs(Ne)){const rt=z.current;rt!=null&&rt.hasPointerCapture(_e.pointerId)&&rt.releasePointerCapture(_e.pointerId),Q.current=null,ne.current=null,_&&Ae(0);return}_e.isActive=!0,Se(!0)}const st=ge.timeStamp-_e.lastTime;st>0&&(_e.velocity=(Qe-_e.offset)/st,_e.lastTime=ge.timeStamp),_e.offset=Qe,_&&Ae(Qe)},nt=ge=>{We(ge)},tt=T?`translate3d(calc(${-ve*100}% + ${Ce}px), 0, 0)`:`translate3d(0, calc(${-ve*100}% + ${Ce}px), 0)`,Ve=D?[c[d-1],...c,c[0]]:c;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:uS(r,n)}}),a.jsxs("div",{className:Lt(`${r}-wrapper`,{[`${r}-transition-reveal`]:m==="reveal",[`${r}-transition-reveal-vertical`]:m==="reveal"&&!T}),onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),children:[a.jsxs("div",{className:`${r}-slider-inner`,style:{backgroundColor:"transparent"},children:[a.jsx("div",{ref:z,className:Lt(`${r}-track`,{[`${r}-track-draggable`]:S,[`${r}-track-draggable-vertical`]:S&&!T}),onPointerDown:ot,onPointerMove:qe,onPointerUp:nt,onPointerCancel:nt,onLostPointerCapture:ge=>{ne.current===ge.pointerId&&We(ge)},children:a.jsx("div",{ref:I,className:Lt(`${r}-list`,{[`${r}-list-slide`]:_,[`${r}-list-slide-vertical`]:_&&!T,[`${r}-list-fade`]:!_}),style:_?{transform:tt,transition:xe||Y?"none":`transform ${wo}ms ${tp}`}:void 0,children:Ve.map((ge,_e)=>{const je=D?ir(_e-1,d):_e,ye=D&&(_e===0||_e===d+1)?`clone-${_e===0?"start":"end"}`:`slide-${je}`;return a.jsx("div",{className:Lt(`${r}-slide`,{[`${r}-is-active`]:!_&&je===le}),children:a.jsx("div",{className:`${r}-slider-item`,children:a.jsx("div",{className:`${r}-img-wrapper`,children:a.jsx("img",{className:Lt(`${r}-slider-image`,{[`${r}-contain`]:ge.image.objectFit==="contain",[`${r}-cover`]:ge.image.objectFit==="cover"}),src:ge.image.url,alt:ge.image.name??"",draggable:!1})})})},ye)})})}),oe&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Lt(`${r}-arrow`,{[`${r}-arrow-prev`]:T,[`${r}-arrow-prev-vertical`]:!T,[`${r}-hover-arrow`]:re}),style:{color:A,"--arrow-hover-color":U,...ie},children:a.jsxs("button",{onClick:ge=>{ge.stopPropagation(),Pe(-1)},className:`${r}-arrow-inner`,style:{transform:`translate(${F.scalingValue(k,n)}, ${F.scalingValue(L*(T?1:-1),n)}) rotate(${T?"0deg":"90deg"})`},children:[G&&a.jsx(mn,{url:G,fill:A,hoverFill:U,className:Lt(`${r}-arrow-img`,`${r}-mirror`),style:ie}),!G&&a.jsx(ed,{color:A,className:Lt(`${r}-arrow-icon`,`${r}-arrow-img`,`${r}-mirror`)})]})}),a.jsx("div",{className:Lt(`${r}-arrow`,{[`${r}-arrow-next`]:T,[`${r}-arrow-next-vertical`]:!T,[`${r}-hover-arrow`]:re}),style:{color:A,"--arrow-hover-color":U,...ie},children:a.jsxs("button",{className:`${r}-arrow-inner`,onClick:ge=>{ge.stopPropagation(),Pe(1)},style:{transform:`translate(${F.scalingValue(k*(T?-1:1),n)}, ${F.scalingValue(L,n)}) rotate(${T?"0deg":"90deg"})`},children:[G&&a.jsx(mn,{url:G,fill:A,hoverFill:U,className:`${r}-arrow-img`,style:ie}),!G&&a.jsx(ed,{color:A,className:Lt(`${r}-arrow-icon`,`${r}-arrow-img`)})]})})]}),B&&a.jsx("div",{className:`${r}-click-overlay`,onClick:()=>Pe(1)}),j&&a.jsx("div",{className:Lt(`${r}-pagination`,{[`${r}-pagination-inside-bottom`]:T,[`${r}-pagination-inside-left`]:!T}),style:T?{bottom:f(b.inset)}:{left:f(b.inset)},children:a.jsx("div",{className:Lt(`${r}-pagination-inner`,{[`${r}-pagination-vertical`]:!T,[`${r}-animate-dots`]:fe}),style:{backgroundColor:H,gap:f(b.gapInactive-b.activeDot+b.dot),...T?{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((ge,_e)=>{const je=_e===le,Ze=je?b.activeDot:b.dot;return a.jsx("button",{onClick:()=>he(_e),className:`${r}-pagination-item`,style:{width:f(b.activeDot)},children:a.jsx("div",{className:`${r}-dot`,style:{backgroundColor:je?P:$,width:f(Ze)}})},_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(C,n)}}),a.jsx("div",{className:`${r}-caption-text-wrapper`,children:c.map((ge,_e)=>a.jsx("div",{className:Lt(`${r}-caption-text`,{[`${r}-with-pointer-events`]:_e===le&&n,[`${r}-active`]:_e===le}),style:{...l,width:"max-content",transitionDuration:`${Math.round(wo/2)}ms`},children:a.jsx("div",{className:`${r}-caption-text-inner`,style:{"--link-color":W,"--link-hover-color":W,position:"relative",top:F.scalingValue(ms.offset.y,n),left:F.scalingValue(ms.offset.x,n)},children:a.jsx(Zi,{content:ge.imageCaption})})},_e))})]})]})]})}function ed({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 mS=`import React, { useCallback, useEffect, useRef, useState } from 'react';
19679
19681
  import cn from 'classnames';
19680
19682
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
19681
19683
  import { scalingValue } from '../utils/scalingValue';
@@ -20856,7 +20858,7 @@ function ArrowIcon({ color, className }: { color: string, className: string }) {
20856
20858
  </svg>
20857
20859
  );
20858
20860
  }
20859
- `,gS={type:"object",version:1,settings:{sizing:"manual",properties:{trigger:{type:"object",scope:"common",title:"Trigger",display:{type:"toggle-cycle-numeric-input",enum:["click","drag","auto"],inputs:{click:"none",drag:"none",auto:"single"},defaultValue:3,showDash:!1},min:1,max:5,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical"]}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["slide","fade in","reveal"]}},nav:{type:"string",scope:"common",title:"Nav",display:{type:"toggle-cycle",enum:["classic","no"]}},navSize:{type:"string",scope:"layout",title:"Nav Size",display:{type:"toggle-cycle",enum:["s","m","l"]}},navUnit:{type:"number",scope:"layout",title:"",display:{type:"numeric-input",visible:!1},min:0,max:1},controls:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},controlsMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},show:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","on hover","never"]}},paddingX:{type:"number",scope:"layout",title:"Padding X",display:{type:"numeric-input"},min:-9999,max:9999},paddingY:{type:"number",scope:"layout",title:"Padding Y",display:{type:"numeric-input"},min:-9999,max:9999},controlsColor:{type:"string",scope:"common",title:"Controls Default",display:{type:"palette-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"palette-color-picker"}},navColor:{type:"string",scope:"common",title:"Dot Nav",display:{type:"palette-color-picker"}},navPaginationColor:{type:"string",scope:"common",title:"Active Nav",display:{type:"palette-color-picker"}},navBackgroundColor:{type:"string",scope:"common",title:"BG Nav",display:{type:"palette-color-picker"}},linkColor:{type:"string",scope:"common",title:"Link Default",display:{type:"palette-color-picker"}},titleColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{type:"object",scope:"common",title:"",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}}},defaults:{trigger:{sizeType:"drag",value:3,min:1,max:5},direction:"horizontal",transition:"slide",nav:"classic",controls:null,show:"always",controlsColor:"#000000",controlsHoverColor:"#3F3F3F",navColor:"#A4A4A4",navPaginationColor:"#FFFFFF",navBackgroundColor:"#000000",linkColor:"#2E12F0",titleColor:"#000000",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{controlsMaxWidth:30/1440,paddingX:0,paddingY:0,captionMarginTop:10/1440,titleFontSize:16/1440,titleLineHeight:16/1440,navSize:"m",navUnit:1/1440},t:{controlsMaxWidth:30/768,paddingX:-10/768,paddingY:0,captionMarginTop:10/768,titleFontSize:16/768,titleLineHeight:16/768,navSize:"m",navUnit:1/768},m:{controlsMaxWidth:30/375,paddingX:-14/375,paddingY:0,captionMarginTop:10/375,titleFontSize:16/375,titleLineHeight:16/375,navSize:"m",navUnit:1/375}},displayRules:[{if:{name:"show",value:"never"},then:{name:"properties.controlsColor.display.visible",value:!1}},{if:{name:"show",value:"never"},then:{name:"properties.controlsHoverColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navPaginationColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navBackgroundColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navSize.display.visible",value:!1}}],layout:["__componentName__","trigger","direction","transition","nav","navSize","controls","controlsMaxWidth","show","paddingX","paddingY","captionMarginTop","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["trigger","direction"]},{type:"row",title:"",items:["transition","nav"]},{type:"row",title:"",items:["navSize"]},{type:"group",title:"Controls",items:[{type:"row",title:"",items:["controls","controlsMaxWidth"]},{type:"row",title:"",items:["paddingX","paddingY"]},{type:"row",title:"",items:["show"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]}]}],paletteBookmark:{items:["controlsColor","controlsHoverColor","navPaginationColor","navColor","navBackgroundColor","titleColor","linkColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Earth-orbital mission"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Salton Sea from Above"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module Pilot"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module 3 porch"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Command Module"}]}]}]}},hS={element:pS,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:gS,sourceCode:mS,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily"}},mo=300/1440,fS=8/1440,Jn=.004;function yS(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function gs(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function hs(e,t,n,i,o="title-leading-gap"){const r=e??.01;return t===void 0||t>=r?{}:{[`--${n}-${o}`]:_.scalingValue((r-t)/2,i)}}function vS(e){return`
20861
+ `,gS={type:"object",version:1,settings:{sizing:"manual",properties:{trigger:{type:"object",scope:"common",title:"Trigger",display:{type:"toggle-cycle-numeric-input",enum:["click","drag","auto"],inputs:{click:"none",drag:"none",auto:"single"},defaultValue:3,showDash:!1},min:1,max:5,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical"]}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["slide","fade in","reveal"]}},nav:{type:"string",scope:"common",title:"Nav",display:{type:"toggle-cycle",enum:["classic","no"]}},navSize:{type:"string",scope:"layout",title:"Nav Size",display:{type:"toggle-cycle",enum:["s","m","l"]}},navUnit:{type:"number",scope:"layout",title:"",display:{type:"numeric-input",visible:!1},min:0,max:1},controls:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},controlsMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},show:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","on hover","never"]}},paddingX:{type:"number",scope:"layout",title:"Padding X",display:{type:"numeric-input"},min:-9999,max:9999},paddingY:{type:"number",scope:"layout",title:"Padding Y",display:{type:"numeric-input"},min:-9999,max:9999},controlsColor:{type:"string",scope:"common",title:"Controls Default",display:{type:"palette-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"palette-color-picker"}},navColor:{type:"string",scope:"common",title:"Dot Nav",display:{type:"palette-color-picker"}},navPaginationColor:{type:"string",scope:"common",title:"Active Nav",display:{type:"palette-color-picker"}},navBackgroundColor:{type:"string",scope:"common",title:"BG Nav",display:{type:"palette-color-picker"}},linkColor:{type:"string",scope:"common",title:"Link Default",display:{type:"palette-color-picker"}},titleColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{type:"object",scope:"common",title:"",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}}},defaults:{trigger:{sizeType:"drag",value:3,min:1,max:5},direction:"horizontal",transition:"slide",nav:"classic",controls:null,show:"always",controlsColor:"#000000",controlsHoverColor:"#3F3F3F",navColor:"#A4A4A4",navPaginationColor:"#FFFFFF",navBackgroundColor:"#000000",linkColor:"#2E12F0",titleColor:"#000000",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{controlsMaxWidth:30/1440,paddingX:0,paddingY:0,captionMarginTop:10/1440,titleFontSize:16/1440,titleLineHeight:16/1440,navSize:"m",navUnit:1/1440},t:{controlsMaxWidth:30/768,paddingX:-10/768,paddingY:0,captionMarginTop:10/768,titleFontSize:16/768,titleLineHeight:16/768,navSize:"m",navUnit:1/768},m:{controlsMaxWidth:30/375,paddingX:-14/375,paddingY:0,captionMarginTop:10/375,titleFontSize:16/375,titleLineHeight:16/375,navSize:"m",navUnit:1/375}},displayRules:[{if:{name:"show",value:"never"},then:{name:"properties.controlsColor.display.visible",value:!1}},{if:{name:"show",value:"never"},then:{name:"properties.controlsHoverColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navPaginationColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navBackgroundColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navSize.display.visible",value:!1}}],layout:["__componentName__","trigger","direction","transition","nav","navSize","controls","controlsMaxWidth","show","paddingX","paddingY","captionMarginTop","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["trigger","direction"]},{type:"row",title:"",items:["transition","nav"]},{type:"row",title:"",items:["navSize"]},{type:"group",title:"Controls",items:[{type:"row",title:"",items:["controls","controlsMaxWidth"]},{type:"row",title:"",items:["paddingX","paddingY"]},{type:"row",title:"",items:["show"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]}]}],paletteBookmark:{items:["controlsColor","controlsHoverColor","navPaginationColor","navColor","navBackgroundColor","titleColor","linkColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Earth-orbital mission"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Salton Sea from Above"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module Pilot"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module 3 porch"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Command Module"}]}]}]}},hS={element:pS,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:gS,sourceCode:mS,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily"}},mo=300/1440,fS=8/1440,Qn=.004;function yS(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function gs(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function hs(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 vS(e){return`
20860
20862
  .${e}-wrapper {
20861
20863
  box-sizing: border-box;
20862
20864
  display: flex;
@@ -21096,7 +21098,7 @@ function ArrowIcon({ color, className }: { color: string, className: string }) {
21096
21098
  width: var(--cntrl-article-width, 100vw) !important;
21097
21099
  height: var(--cntrl-viewport-height, 100vh) !important;
21098
21100
  }
21099
- `}const np={"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 xS(e){return e in np}function bS(e){if(e&&xS(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 Nl(e){return np[e]}const SS="rgba(28,31,34,0.9)",Yn=500,zi="cubic-bezier(0.22, 1, 0.36, 1)",wS=72,$S=50,CS={titleColor:"title-color",descriptionColor:"description-color",lightboxCounterColor:"lightbox-counter-color"},TS=[];function LS(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 PS(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function IS(e){const[t]=e.media;return t!=null&&t.url?t:null}function RS(e){if(!Array.isArray(e)||e.length===0)return[];if(LS(e)){const t=[];for(const n of e){const i=PS(n);if(!i)continue;const o=IS(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.url?o:null})}return t}return e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Bs(e){return e.type==="video"}function kS(e){e.pause(),e.removeAttribute("src"),e.load()}function qr(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function ES(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}const MS=1140/1440;function AS(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 FS(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 NS(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function _S({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l,onTransitionEnd:d}){return s.useEffect(()=>{const c=n.current;if(c)return()=>{kS(c)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:r,onMouseMove:l,onTransitionEnd:d,style:i})}function HS({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:d,counterClassName:c,counterStyle:u,backgroundColor:p}){const x=i==="cover",y=s.useRef(null),m=s.useRef(null),g=s.useRef(null),v=s.useRef(0),b=s.useRef(0),E=s.useRef("none"),f=s.useRef(!1),w=s.useRef(!1),G=s.useRef(!1),X=s.useRef(null),[M,T]=s.useState(null),[N,q]=s.useState("opening"),[$,I]=s.useState(0),[W,O]=s.useState(0),[C,L]=s.useState(!1),[z,S]=s.useState(!1),[K,k]=s.useState(!1),H=s.useRef(n),j=t[n],ne=j?Bs(j):!1,oe=W!==0||C,R=s.useCallback(ve=>{G.current=ve,L(ve)},[]),ce=s.useCallback(()=>{X.current!==null&&(window.clearTimeout(X.current),X.current=null)},[]),D=s.useCallback(()=>{ce(),X.current=window.setTimeout(()=>{ce(),R(!1)},Yn+32)},[ce,R]),le=s.useCallback(()=>{const ve=y.current,be=m.current;if(!ve)return;const Ce=ve.getBoundingClientRect(),h=Ce.width,U=Ce.height;if(!h||!U)return;if(i==="cover"){T({width:h,height:U,left:Ce.left,top:Ce.top});return}if(!be){T(qr(ve));return}const{width:Z,height:te}=ES(be);if(!Z||!te){T(qr(ve));return}const me=Z/te,B=h/U;if(me>B){const P=h/me;T({width:h,height:P,left:Ce.left,top:Ce.top+(U-P)/2})}else{const P=U*me;T({width:P,height:U,left:Ce.left+(h-P)/2,top:Ce.top})}},[i]);s.useEffect(()=>{le();const ve=y.current;if(!ve)return;const be=new ResizeObserver(()=>le());return be.observe(ve),()=>be.disconnect()},[le,n]),s.useEffect(()=>{N==="opening"&&M&&q("open")},[N,M]),s.useEffect(()=>{if(N!=="closing")return;const ve=setTimeout(()=>r(),Yn);return()=>clearTimeout(ve)},[N,r]),s.useEffect(()=>()=>{ce()},[ce]),s.useLayoutEffect(()=>{if(H.current===n)return;ce(),I(0),O(0),R(!1),k(!1),S(!1),v.current=0,b.current=0,E.current="none",f.current=!1,g.current=null,w.current=!1;const ve=y.current;ve&&T(qr(ve)),H.current=n},[n,R,ce]),s.useEffect(()=>{if(N!=="open")return;let ve=null;const be=()=>{ve&&(document.removeEventListener("click",ve,!0),ve=null)},Ce=()=>{be(),ve=B=>{B.stopPropagation(),B.preventDefault(),be()},document.addEventListener("click",ve,!0)},h=B=>{ce(),G.current=!1,L(!1),O(0),S(!1),f.current=!1,b.current=0,E.current="none";const P=y.current;P&&T(qr(P)),B<0?d():l()},U=B=>{if(Math.abs(B)>$S&&t.length>1){h(B);return}R(!0),O(0),D()},Z=B=>{if(B.touches.length!==1||G.current)return;const P=B.touches[0];w.current=!0,g.current={x:P.clientX,y:P.clientY},E.current="none",b.current=0,f.current=!1},te=B=>{if(!g.current||B.touches.length!==1||G.current)return;const P=B.touches[0],Q=P.clientX-g.current.x,ee=P.clientY-g.current.y;if(E.current==="none"){if(Math.abs(Q)<10&&Math.abs(ee)<10)return;if(Math.abs(Q)>Math.abs(ee)){if(t.length<=1)return;E.current="horizontal"}else if(ee>0)E.current="vertical";else return}if(E.current==="horizontal"){f.current=!0,S(!0),b.current=Q,O(Q),B.preventDefault();return}E.current==="vertical"&&(f.current=!0,S(!0),v.current=ee,I(ee),B.preventDefault())},me=()=>{if(!g.current)return;const B=E.current,P=f.current;if(P&&B==="horizontal")U(b.current),Ce();else if(P&&B==="vertical")if(v.current>wS){const ee=window.innerHeight;v.current=ee,k(!0),I(ee),q("closing")}else v.current=0,I(0),Ce();else B==="horizontal"&&Math.abs(b.current)>0&&(U(b.current),Ce());g.current=null,E.current="none",b.current=0,f.current=!1,S(!1)};return document.addEventListener("touchstart",Z,{passive:!0}),document.addEventListener("touchmove",te,{passive:!1}),document.addEventListener("touchend",me),document.addEventListener("touchcancel",me),()=>{document.removeEventListener("touchstart",Z),document.removeEventListener("touchmove",te),document.removeEventListener("touchend",me),document.removeEventListener("touchcancel",me),be()}},[N,t.length,d,l,R,D,ce]),s.useEffect(()=>{const ve=be=>{be.key==="Escape"&&(be.preventDefault(),be.stopPropagation(),N!=="closing"&&q("closing"))};return window.addEventListener("keydown",ve,!0),()=>window.removeEventListener("keydown",ve,!0)},[N]);const ie=()=>{N!=="closing"&&q("closing")},we=N==="open",Ie=N==="closing",xe=$>0?Math.max(0,1-$/500):1,pe=$>0?Math.max(.35,1-$/500):1,Y=ve=>{if(ve.stopPropagation(),w.current){w.current=!1;return}if(t.length<=1)return;const be=ve.currentTarget.getBoundingClientRect(),Ce=ve.clientY-be.top,h=Math.min(52,be.height*.2);if(!(Ce>be.height-h)){if(ve.clientX-be.left<be.width/2){l();return}d()}},ae=ve=>{if(t.length<=1)return;const be=ve.currentTarget.getBoundingClientRect(),Ce=ve.clientX-be.left,h=ve.clientY-be.top,U=Math.min(52,be.height*.2);if(h>be.height-U){ve.currentTarget.style.cursor="default";return}ve.currentTarget.style.cursor=Ce<be.width/2?"w-resize":"e-resize"},se=s.useCallback(ve=>{ve.propertyName!=="transform"||!G.current||(ce(),R(!1))},[ce,R]),Re=oe?`translateX(${W}px)`:$>0?`translateY(${$}px)`:void 0,$e={position:"fixed",top:M==null?void 0:M.top,left:M==null?void 0:M.left,width:M==null?void 0:M.width,height:M==null?void 0:M.height,objectFit:i==="cover"?"cover":"contain",transform:Re,opacity:$>0?pe:N==="opening"||Ie?0:1,transition:z&&!C?"none":C?`transform ${Yn}ms ${zi}`:K?`transform ${Yn}ms ${zi}, opacity ${Yn}ms ${zi}`:N==="opening"||Ie?`opacity ${Yn}ms ${zi}`:"none",pointerEvents:ne&&we&&!oe?"auto":"none",touchAction:ne&&we?"none":void 0,zIndex:9998},Me=M?{position:"fixed",top:M.top,height:M.height,width:M.width/2,zIndex:9999}:null;return a.jsxs("div",{className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:N==="open"?"none":void 0},onClick:ie,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:p,opacity:we?xe:0,transition:z?"none":`opacity ${Yn}ms ${zi}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:x?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:y,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:we?1:0,transition:`opacity ${Yn}ms ${zi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:y,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:we?1:0,transition:`opacity ${Yn}ms ${zi}`},children:t.length>1&&a.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),M&&j&&(ne?a.jsx(_S,{src:j.url,phase:N,mediaRef:m,mediaStyle:$e,onLoadedMetadata:le,onClick:Y,onMouseMove:ae,onTransitionEnd:se},`${n}-${j.url}`):a.jsx("img",{ref:m,src:j.url,alt:j.name,onLoad:le,onTransitionEnd:se,style:$e},`${n}-${j.url}`)),we&&Me&&t.length>1&&!ne&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Me,left:M.left,cursor:"w-resize",pointerEvents:oe?"none":"auto"},onClick:ve=>{if(w.current){w.current=!1;return}ve.stopPropagation(),l()}}),a.jsx("div",{style:{...Me,left:M.left+M.width/2,cursor:"e-resize",pointerEvents:oe?"none":"auto"},onClick:ve=>{if(w.current){w.current=!1;return}ve.stopPropagation(),d()}})]})]})}function td({P:e,media:t,imgWidth:n,cornerRadius:i,fillGalleryWidth:o,imageDisplay:r,isEditor:l,galleryPaddingBetween:d=0,showPaddingAfter:c=!1,showControls:u=!1,onMediaClick:p}){const x=`${e}-gallery-${Bs(t)?"video":"image"}`,y=r.display==="cover",m=FS(r),g=N=>_.scalingValue(N,l??!1),v=n??mo,b=o?{width:"100%",maxWidth:"100%"}:{width:g(v),maxWidth:"100%"},E=i?{borderRadius:g(i)}:{},f={...b,...y?{aspectRatio:m,height:"auto",overflow:"hidden"}:{},...E},w={...y?{display:"block",width:"100%",height:"100%",objectFit:"cover",maxWidth:"100%"}:{display:"block",maxWidth:"100%",height:"auto",width:o?"100%":g(v)},...p?{cursor:"pointer",pointerEvents:"auto"}:{},...y?{}:E},X={className:x,style:w,onClick:p?N=>{N.stopPropagation(),p()}:void 0},M=Math.max(d,Jn),T=Bs(t)?a.jsx("video",{...X,src:t.url,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):a.jsx("img",{...X,src:t.url,alt:t.name??""});return a.jsxs("div",{className:`${e}-gallery-item`,children:[y?a.jsx("div",{style:f,children:T}):T,c&&d>0&&a.jsx("div",{className:`${e}-padding-handle`,style:{height:g(d)},"aria-hidden":"true"}),u&&c&&a.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:g(M)}})]})}function WS({P:e,layoutType:t,galleryWidthStyle:n,galleryPaddingRight:i,galleryPaddingLeft:o,galleryPaddingRightWidth:r,galleryPaddingLeftWidth:l,galleryPaddingMaxFraction:d,showControls:c,scaled:u,children:p}){const x=t==="a"?i:t==="c"?o:0,y=x>0||c;return a.jsxs("div",{className:`${e}-gallery-controls`,children:[t==="c"&&y&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(x)},"aria-hidden":"true"}),c&&t==="c"&&a.jsx("div",{"data-controls":"galleryPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(d),className:`${e}-control-anchor`,style:{top:0,left:0,width:u(l),height:"100%"}}),a.jsx("div",{className:`${e}-gallery`,style:n,children:p}),t==="a"&&y&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(x)},"aria-hidden":"true"}),c&&t==="a"&&a.jsx("div",{"data-controls":"galleryPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(d),className:`${e}-control-anchor`,style:{top:0,right:0,width:u(r),height:"100%"}})]})}function OS(e){switch(e){case"fade":case"retype":case"scroll":return e;case"default":return"scroll";default:return"scroll"}}function Ur({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 nd({P:e,controlKey:t,scaled:n,width:i,maxFraction:o,side:r,paired:l,anchorStyle:d}){return a.jsx("div",{"data-controls":t,...l?{"data-controls-paired":""}:{},"data-controls-axis":"x","data-controls-variant":"column-padding",...r==="right"?{"data-controls-reverse":""}:{},"data-controls-min":"0","data-controls-max-fraction":String(o),className:`${e}-control-anchor`,style:{top:0,...r==="left"?{left:0}:{right:0},width:n(i),height:"100%",...d}})}function fs({P:e,title:t,description:n,position:i,titleRef:o,titleClassName:r,titleContainerStyle:l,titleTextBoxStyle:d,titleStyle:c,descriptionClassName:u,descriptionStyle:p,descriptionPadding:x,showTextBoxOutline:y=!1,showDescriptionPaddingControl:m=!1,descriptionPaddingPaired:g=!1,topPaddingControl:v,bottomPaddingControl:b}){const E=s.useRef(null),[f,w]=s.useState(0),G=t??"",X=n??"",M=X.length>0,{horizontal:T,vertical:N}=Nl(i),q=N==="center"||N==="bottom",$=N==="bottom";s.useLayoutEffect(()=>{if(!q)return;const C=E.current;if(!C||typeof ResizeObserver>"u")return;const L=()=>w(C.offsetHeight);L();const z=new ResizeObserver(L);return z.observe(C),()=>z.disconnect()},[G,X,q]);const I=a.jsx("span",{className:`${e}-title-text`,style:c,children:G}),W=M?a.jsx("span",{className:u,style:p,children:X}):null,O=M?a.jsx("div",{className:`${e}-title-texts-gap`,style:{height:x},children:m&&a.jsx("div",{"data-controls":"titleDescriptionPadding",...g?{"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=>{E.current=C,o(C)},className:[r,`${e}-title-h-${T}`,`${e}-title-v-${N}`].join(" "),style:{...q?{[`--${e}-title-height`]:`${f}px`}:{},...l},children:a.jsxs("div",{className:`${e}-title-text-stack`,style:d,children:[v,a.jsx("div",{className:y?`${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:[W,O,I]}):a.jsxs(a.Fragment,{children:[I,O,W]})})}),b]})})}const id=45;function od(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 DS(e){const t=od(e,"--cntrl-viewport-height",window.innerHeight),n=od(e,"--cntrl-article-top",0);return{top:n,height:t,centerY:n+t/2}}function zS(e,t,n){const{vertical:i}=Nl(t),{top:o,height:r,centerY:l}=DS(n);if(i==="top"){const c=n&&parseFloat(getComputedStyle(n).top)||o;return Math.abs(e.top-c)}if(i==="bottom")return Math.abs(e.bottom-(o+r));const d=e.top+e.height/2;return Math.abs(d-l)}function BS(e,t,n){const i=Array.from({length:t},(l,d)=>{const c=e.current[d];if(!c)return 0;const u=c.getBoundingClientRect(),p=zS(u,n,c);return Math.exp(-(p*p)/(2*id*id))});let o=0,r=-1;return i.forEach((l,d)=>{l>r&&(r=l,o=d)}),{opacities:i,dominantIndex:o}}function jS(e,t,n){const i=s.useRef([]),[{opacities:o,dominantIndex:r},l]=s.useState(()=>({opacities:Array.from({length:e},(c,u)=>u===0?1:0),dominantIndex:0}));return s.useLayoutEffect(()=>{if(!t||e===0){l({opacities:Array.from({length:e},()=>1),dominantIndex:0});return}let c=0;const u=()=>{l(BS(i,e,n))},p=()=>{c||(c=window.requestAnimationFrame(()=>{c=0,u()}))};return u(),window.addEventListener("scroll",p,{passive:!0}),window.addEventListener("resize",p,{passive:!0}),()=>{c&&window.cancelAnimationFrame(c),window.removeEventListener("scroll",p),window.removeEventListener("resize",p)}},[t,e,n]),{setTitleRef:c=>u=>{i.current[c]=u},opacities:o,dominantIndex:r}}function rd(e,t){const[n,i]=s.useState(e),o=s.useRef(e);return s.useEffect(()=>{if(!t){o.current=e,i(e);return}const r=Array.from(o.current),l=Array.from(e),d=Math.max(r.length,l.length);if(d===0||o.current===e)return;let c=0;const u=window.setInterval(()=>{c+=1;const p=[...l.slice(0,c),...r.slice(c)].join("");o.current=p,i(p),c>=d&&window.clearInterval(u)},70);return()=>window.clearInterval(u)},[t,e]),n}function VS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,portalId:r}){var bt,Tt;const{prefix:l}=_.useScopedStyles(),d=s.useMemo(()=>vS(l),[l]),c=t??[],u=(e==null?void 0:e.wrapperWidth)??1,p=(e==null?void 0:e.type)??"a",x=(e==null?void 0:e.imgWidth)??mo,y=(e==null?void 0:e.titleWidth)??MS,m=AS(e==null?void 0:e.imageDisplay),g=(e==null?void 0:e.cornerRadius)??fS,v=bS(e==null?void 0:e.position),{horizontal:b,vertical:E}=Nl(v),f=(e==null?void 0:e.titleTopPadding)??0,w=(e==null?void 0:e.titleBottomPadding)??0,G=(e==null?void 0:e.titleLeftPadding)??0,X=(e==null?void 0:e.titleRightPadding)??0,M=(e==null?void 0:e.titleDescriptionPadding)??0,T=OS(e==null?void 0:e.transition),N=(e==null?void 0:e.lightbox)??"on",q=p==="b",$=T==="fade"||T==="retype",{setTitleRef:I,dominantIndex:W}=jS(c.length,$,v),O=((bt=c[W])==null?void 0:bt.title)??"",C=((Tt=c[W])==null?void 0:Tt.description)??"",L=rd(O,T==="retype"),z=rd(C,T==="retype"),S=T==="fade"||T==="retype",K=T==="retype"?L:O,k=T==="retype"?z:C,H=q?void 0:{width:_.scalingValue(x,n??!1)},j=N==="on"&&(!n||i||o),ne=o??!1,oe=(e==null?void 0:e.galleryPaddingRight)??0,R=(e==null?void 0:e.galleryPaddingLeft)??0,ce=(e==null?void 0:e.galleryPaddingBetween)??0,D=tt=>_.scalingValue(tt,n??!1),ie={width:D(y)},we=p==="a"?oe:R,Ie=q?{width:"100%"}:{width:`calc(100% - ${D(x)} - ${D(we)})`,...p==="c"?{marginLeft:"auto"}:{}},xe=Math.max(oe,Jn),pe=Math.max(R,Jn),Y=Math.max(ce,Jn),ae=Math.max(f,Jn),se=Math.max(w,Jn),Re=Math.max(G,Jn),$e=Math.max(X,Jn),Me=Math.max(M,Jn),ve=Math.max(0,(u??1)-(x??mo)),be=p==="a"?Math.max(0,(u??1)-(x??mo)-oe):p==="c"?Math.max(0,(u??1)-(x??mo)-R):p==="b"?u??1:1,Ce=ne&&E==="top",h=ne&&E==="bottom",U=ne&&b==="left",Z=ne&&b==="right",te=c.length>1,me=q?void 0:D((p==="c"?R:oe)+(x??mo)),B=p==="c"&&me?{left:me}:void 0,P=p==="a"&&me?{right:me}:void 0,Q=q?{left:0,width:"100%"}:p==="a"?{right:D(oe),width:D(x)}:{left:D(R),width:D(x)},{titleColor:ee,titleFontFamily:de,titleFontSettings:V,titleFontSize:Pe,titleLineHeight:he,titleLetterSpacing:J,titleWordSpacing:Ne,titleAlign:Be,titleTextAppearance:at,descriptionColor:Ue,descriptionFontFamily:nt,descriptionFontSettings:Ze,descriptionFontSize:Xe,descriptionLineHeight:fe,descriptionLetterSpacing:He,descriptionWordSpacing:We,descriptionAlign:Qe,descriptionTextAppearance:ye,lightboxCounterColor:_e,lightboxCounterFontFamily:Ge,lightboxCounterFontSettings:et,lightboxCounterFontSize:mt,lightboxCounterLineHeight:rt,lightboxCounterLetterSpacing:Oe,lightboxCounterWordSpacing:Fe,lightboxCounterTextAppearance:Ke}=e??{},it={fontSettings:{fontFamily:de,fontWeight:(V==null?void 0:V.fontWeight)??400,fontStyle:(V==null?void 0:V.fontStyle)??"normal"},fontSize:Pe??.01,lineHeight:he,letterSpacing:J??0,wordSpacing:Ne??0,textAlign:Be??"left",textAppearance:at,color:ee??"#000000"},qe=cn(Qt(it,n)),ut=ie,ge={...hs(Pe,he,l,n),...hs(Xe,fe,l,n,"description-leading-gap")},ke=gs(Pe,he,`${l}-title`,`${l}-text-tight-leading`),ot={fontSettings:{fontFamily:nt,fontWeight:(Ze==null?void 0:Ze.fontWeight)??400,fontStyle:(Ze==null?void 0:Ze.fontStyle)??"normal"},fontSize:Xe??.01,lineHeight:fe,letterSpacing:He??0,wordSpacing:We??0,textAlign:Qe??"left",textAppearance:ye,color:Ue??"#000000"},gt=cn(Qt(ot,n)),je=gs(Xe,fe,`${l}-description-text`,`${l}-description-tight-leading`),vt=D(ne?Me:M),It={fontSettings:{fontFamily:Ge,fontWeight:(et==null?void 0:et.fontWeight)??400,fontStyle:(et==null?void 0:et.fontStyle)??"normal"},fontSize:mt??.01,lineHeight:rt,letterSpacing:Oe??0,wordSpacing:Fe??0,textAppearance:Ke,color:_e??"#DEDDDD"},wt={...cn(Qt(It,n)),...hs(mt,rt,l,n)},Dt=gs(mt,rt,`${l}-lightbox-counter`,`${l}-text-tight-leading`),Bt=_.buildColorVars(l,{titleColor:ee??"#000000",descriptionColor:Ue??"#000000",lightboxCounterColor:_e??"#DEDDDD"},CS,TS),Xt=s.useRef(null),[qt,Lt]=s.useState(!1),[Ot,nn]=s.useState([]),[xt,Te]=s.useState(0),Ve=s.useCallback((tt,Rt)=>{j&&(nn(tt),Te(Rt),Lt(!0))},[j]),st=s.useCallback(()=>{Lt(!1)},[]),lt=s.useMemo(()=>{const tt={...Bt},Rt=Xt.current?getComputedStyle(Xt.current).getPropertyValue("--cntrl-article-width").trim():"";return Rt&&(tt["--cntrl-article-width"]=Rt),tt},[Bt,qt]);return s.useEffect(()=>{if(!qt||N!=="on"||typeof document>"u")return;const tt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=tt}},[qt,N]),s.useEffect(()=>{!n||o||i||Lt(!1)},[n,o,i]),s.useEffect(()=>{N==="off"&&Lt(!1)},[N]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),a.jsx("div",{style:Bt,children:a.jsxs("div",{ref:Xt,className:`${l}-wrapper`,style:{width:_.scalingValue(u,n??!1),[`--${l}-title-top-padding`]:E==="top"?D(f):void 0,[`--${l}-title-bottom-padding`]:E==="bottom"?D(w):void 0,[`--${l}-title-left-padding`]:b==="left"?D(G):void 0,[`--${l}-title-right-padding`]:b==="right"?D(X):void 0},children:[S&&a.jsx("div",{className:`${l}-single-title-layer`,children:a.jsx(fs,{P:l,title:K,description:k,position:v,titleRef:()=>{},titleClassName:`${ke} ${l}-single-title`,titleContainerStyle:{...ge,...Ie},titleTextBoxStyle:ut,titleStyle:qe,descriptionClassName:je,descriptionStyle:gt,descriptionPadding:vt,showTextBoxOutline:ne,showDescriptionPaddingControl:ne,topPaddingControl:Ce?Ur({P:l,controlKey:"titleTopPadding",scaled:D,height:ae,paired:!1,side:"top"}):void 0,bottomPaddingControl:h?Ur({P:l,controlKey:"titleBottomPadding",scaled:D,height:se,paired:!1,side:"bottom"}):void 0})}),c.map((tt,Rt)=>{const Mt=RS(tt.gallery),At=Rt<c.length-1,jt=Mt.filter(Et=>Et.lightboxMedia).map(Et=>Et.lightboxMedia),Ut={P:l,position:v,titleRef:I(Rt),titleClassName:ke,titleContainerStyle:ge,titleTextBoxStyle:S?{maxWidth:"100%"}:ut,titleStyle:qe,descriptionClassName:je,descriptionStyle:gt,descriptionPadding:vt,showTextBoxOutline:ne&&!S,showDescriptionPaddingControl:ne&&!S,descriptionPaddingPaired:te,topPaddingControl:Ce&&!S?Ur({P:l,controlKey:"titleTopPadding",scaled:D,height:ae,paired:te,side:"top"}):void 0,bottomPaddingControl:h&&!S?Ur({P:l,controlKey:"titleBottomPadding",scaled:D,height:se,paired:te,side:"bottom"}):void 0};return a.jsxs("div",{"data-item-index":Rt,className:`${l}-item ${l}-item-${p}`,style:{paddingBottom:At?D(ce):void 0},children:[U&&nd({P:l,controlKey:"titleLeftPadding",scaled:D,width:Re,maxFraction:be,side:"left",paired:te,anchorStyle:B}),Z&&nd({P:l,controlKey:"titleRightPadding",scaled:D,width:$e,maxFraction:be,side:"right",paired:te,anchorStyle:P}),ne&&At&&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:D(Y),...Q}}),q?a.jsxs("div",{className:`${l}-gallery`,children:[a.jsx("div",{className:`${l}-gallery-media`,children:Mt.map(({displayMedia:Et,lightboxMedia:Nt},_t)=>{const ht=Nt?jt.findIndex(A=>A.url===Nt.url):-1;return a.jsx(td,{P:l,media:Et,imgWidth:x||void 0,cornerRadius:g||void 0,imageDisplay:m,isEditor:n,galleryPaddingBetween:ce,showPaddingAfter:_t<Mt.length-1,showControls:ne,onMediaClick:j&&ht>=0?()=>Ve(jt,ht):void 0},`${Et.url}-${_t}`)})}),a.jsx("div",{className:`${l}-title-layer`,children:a.jsx(fs,{...Ut,title:S?"":tt.title,description:S?"":tt.description})})]}):a.jsxs(a.Fragment,{children:[a.jsx(fs,{...Ut,title:S?"":tt.title,description:S?"":tt.description}),Mt.length>0&&a.jsx(WS,{P:l,layoutType:p,galleryWidthStyle:H,galleryPaddingRight:oe,galleryPaddingLeft:R,galleryPaddingRightWidth:xe,galleryPaddingLeftWidth:pe,galleryPaddingMaxFraction:ve,showControls:ne,scaled:D,children:Mt.map(({displayMedia:Et,lightboxMedia:Nt},_t)=>{const ht=Nt?jt.findIndex(A=>A.url===Nt.url):-1;return a.jsx(td,{P:l,media:Et,cornerRadius:g||void 0,fillGalleryWidth:!0,imageDisplay:m,isEditor:n,galleryPaddingBetween:ce,showPaddingAfter:_t<Mt.length-1,showControls:ne,onMediaClick:j&&ht>=0?()=>Ve(jt,ht):void 0},`${Et.url}-${_t}`)})})]})]},Rt)})]})}),qt&&N==="on"&&typeof document<"u"&&e&&(()=>{const tt=(r?document.getElementById(r):null)??document.body;return li.createPortal(a.jsx("div",{style:lt,"data-selection":"none",children:a.jsx(HS,{prefix:l,items:Ot,index:xt,imageDisplay:NS(e.lightboxImageDisplay),isEditor:n,onClose:st,onPrev:()=>Te(Rt=>(Rt-1+Ot.length)%Ot.length),onNext:()=>Te(Rt=>(Rt+1)%Ot.length),counterClassName:Dt,counterStyle:wt,backgroundColor:e.backgroundColor??SS})}),tt)})()]})}const GS=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
21101
+ `}const np={"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 xS(e){return e in np}function bS(e){if(e&&xS(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 Nl(e){return np[e]}const SS="rgba(28,31,34,0.9)",Zn=500,zi="cubic-bezier(0.22, 1, 0.36, 1)",wS=72,$S=50,CS={titleColor:"title-color",descriptionColor:"description-color",lightboxCounterColor:"lightbox-counter-color"},TS=[];function LS(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 PS(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function IS(e){const[t]=e.media;return t!=null&&t.url?t:null}function RS(e){if(!Array.isArray(e)||e.length===0)return[];if(LS(e)){const t=[];for(const n of e){const i=PS(n);if(!i)continue;const o=IS(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.url?o:null})}return t}return e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Bs(e){return e.type==="video"}function kS(e){e.pause(),e.removeAttribute("src"),e.load()}function qr(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function ES(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}const MS=1140/1440;function AS(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 FS(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 NS(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function _S({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()=>{kS(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 HS({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),m=s.useRef(null),g=s.useRef(null),x=s.useRef(0),b=s.useRef(0),E=s.useRef("none"),f=s.useRef(!1),w=s.useRef(!1),G=s.useRef(!1),X=s.useRef(null),[k,L]=s.useState(null),[A,U]=s.useState("opening"),[$,P]=s.useState(0),[H,W]=s.useState(0),[C,T]=s.useState(!1),[B,S]=s.useState(!1),[K,R]=s.useState(!1),_=s.useRef(n),j=t[n],oe=j?Bs(j):!1,re=H!==0||C,O=s.useCallback(fe=>{G.current=fe,T(fe)},[]),ie=s.useCallback(()=>{X.current!==null&&(window.clearTimeout(X.current),X.current=null)},[]),D=s.useCallback(()=>{ie(),X.current=window.setTimeout(()=>{ie(),O(!1)},Zn+32)},[ie,O]),le=s.useCallback(()=>{const fe=v.current,we=m.current;if(!fe)return;const Te=fe.getBoundingClientRect(),h=Te.width,q=Te.height;if(!h||!q)return;if(i==="cover"){L({width:h,height:q,left:Te.left,top:Te.top});return}if(!we){L(qr(fe));return}const{width:Z,height:te}=ES(we);if(!Z||!te){L(qr(fe));return}const ue=Z/te,z=h/q;if(ue>z){const I=h/ue;L({width:h,height:I,left:Te.left,top:Te.top+(q-I)/2})}else{const I=q*ue;L({width:I,height:q,left:Te.left+(h-I)/2,top:Te.top})}},[i]);s.useEffect(()=>{le();const fe=v.current;if(!fe)return;const we=new ResizeObserver(()=>le());return we.observe(fe),()=>we.disconnect()},[le,n]),s.useEffect(()=>{A==="opening"&&k&&U("open")},[A,k]),s.useEffect(()=>{if(A!=="closing")return;const fe=setTimeout(()=>r(),Zn);return()=>clearTimeout(fe)},[A,r]),s.useEffect(()=>()=>{ie()},[ie]),s.useLayoutEffect(()=>{if(_.current===n)return;ie(),P(0),W(0),O(!1),R(!1),S(!1),x.current=0,b.current=0,E.current="none",f.current=!1,g.current=null,w.current=!1;const fe=v.current;fe&&L(qr(fe)),_.current=n},[n,O,ie]),s.useEffect(()=>{if(A!=="open")return;let fe=null;const we=()=>{fe&&(document.removeEventListener("click",fe,!0),fe=null)},Te=()=>{we(),fe=z=>{z.stopPropagation(),z.preventDefault(),we()},document.addEventListener("click",fe,!0)},h=z=>{ie(),G.current=!1,T(!1),W(0),S(!1),f.current=!1,b.current=0,E.current="none";const I=v.current;I&&L(qr(I)),z<0?c():l()},q=z=>{if(Math.abs(z)>$S&&t.length>1){h(z);return}O(!0),W(0),D()},Z=z=>{if(z.touches.length!==1||G.current)return;const I=z.touches[0];w.current=!0,g.current={x:I.clientX,y:I.clientY},E.current="none",b.current=0,f.current=!1},te=z=>{if(!g.current||z.touches.length!==1||G.current)return;const I=z.touches[0],Q=I.clientX-g.current.x,ne=I.clientY-g.current.y;if(E.current==="none"){if(Math.abs(Q)<10&&Math.abs(ne)<10)return;if(Math.abs(Q)>Math.abs(ne)){if(t.length<=1)return;E.current="horizontal"}else if(ne>0)E.current="vertical";else return}if(E.current==="horizontal"){f.current=!0,S(!0),b.current=Q,W(Q),z.preventDefault();return}E.current==="vertical"&&(f.current=!0,S(!0),x.current=ne,P(ne),z.preventDefault())},ue=()=>{if(!g.current)return;const z=E.current,I=f.current;if(I&&z==="horizontal")q(b.current),Te();else if(I&&z==="vertical")if(x.current>wS){const ne=window.innerHeight;x.current=ne,R(!0),P(ne),U("closing")}else x.current=0,P(0),Te();else z==="horizontal"&&Math.abs(b.current)>0&&(q(b.current),Te());g.current=null,E.current="none",b.current=0,f.current=!1,S(!1)};return document.addEventListener("touchstart",Z,{passive:!0}),document.addEventListener("touchmove",te,{passive:!1}),document.addEventListener("touchend",ue),document.addEventListener("touchcancel",ue),()=>{document.removeEventListener("touchstart",Z),document.removeEventListener("touchmove",te),document.removeEventListener("touchend",ue),document.removeEventListener("touchcancel",ue),we()}},[A,t.length,c,l,O,D,ie]),s.useEffect(()=>{const fe=we=>{we.key==="Escape"&&(we.preventDefault(),we.stopPropagation(),A!=="closing"&&U("closing"))};return window.addEventListener("keydown",fe,!0),()=>window.removeEventListener("keydown",fe,!0)},[A]);const ee=()=>{A!=="closing"&&U("closing")},ve=A==="open",Ie=A==="closing",be=$>0?Math.max(0,1-$/500):1,pe=$>0?Math.max(.35,1-$/500):1,Y=fe=>{if(fe.stopPropagation(),w.current){w.current=!1;return}if(t.length<=1)return;const we=fe.currentTarget.getBoundingClientRect(),Te=fe.clientY-we.top,h=Math.min(52,we.height*.2);if(!(Te>we.height-h)){if(fe.clientX-we.left<we.width/2){l();return}c()}},se=fe=>{if(t.length<=1)return;const we=fe.currentTarget.getBoundingClientRect(),Te=fe.clientX-we.left,h=fe.clientY-we.top,q=Math.min(52,we.height*.2);if(h>we.height-q){fe.currentTarget.style.cursor="default";return}fe.currentTarget.style.cursor=Te<we.width/2?"w-resize":"e-resize"},xe=s.useCallback(fe=>{fe.propertyName!=="transform"||!G.current||(ie(),O(!1))},[ie,O]),Se=re?`translateX(${H}px)`:$>0?`translateY(${$}px)`:void 0,Ce={position:"fixed",top:k==null?void 0:k.top,left:k==null?void 0:k.left,width:k==null?void 0:k.width,height:k==null?void 0:k.height,objectFit:i==="cover"?"cover":"contain",transform:Se,opacity:$>0?pe:A==="opening"||Ie?0:1,transition:B&&!C?"none":C?`transform ${Zn}ms ${zi}`:K?`transform ${Zn}ms ${zi}, opacity ${Zn}ms ${zi}`:A==="opening"||Ie?`opacity ${Zn}ms ${zi}`:"none",pointerEvents:oe&&ve&&!re?"auto":"none",touchAction:oe&&ve?"none":void 0,zIndex:9998},Ae=k?{position:"fixed",top:k.top,height:k.height,width:k.width/2,zIndex:9999}:null;return a.jsxs("div",{className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:A==="open"?"none":void 0},onClick:ee,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:p,opacity:ve?be:0,transition:B?"none":`opacity ${Zn}ms ${zi}`,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:ve?1:0,transition:`opacity ${Zn}ms ${zi}`,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:ve?1:0,transition:`opacity ${Zn}ms ${zi}`},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]})}),k&&j&&(oe?a.jsx(_S,{src:j.url,phase:A,mediaRef:m,mediaStyle:Ce,onLoadedMetadata:le,onClick:Y,onMouseMove:se,onTransitionEnd:xe},`${n}-${j.url}`):a.jsx("img",{ref:m,src:j.url,alt:j.name,onLoad:le,onTransitionEnd:xe,style:Ce},`${n}-${j.url}`)),ve&&Ae&&t.length>1&&!oe&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Ae,left:k.left,cursor:"w-resize",pointerEvents:re?"none":"auto"},onClick:fe=>{if(w.current){w.current=!1;return}fe.stopPropagation(),l()}}),a.jsx("div",{style:{...Ae,left:k.left+k.width/2,cursor:"e-resize",pointerEvents:re?"none":"auto"},onClick:fe=>{if(w.current){w.current=!1;return}fe.stopPropagation(),c()}})]})]})}function td({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-${Bs(t)?"video":"image"}`,v=r.display==="cover",m=FS(r),g=A=>F.scalingValue(A,l??!1),x=n??mo,b=o?{width:"100%",maxWidth:"100%"}:{width:g(x),maxWidth:"100%"},E=i?{borderRadius:g(i)}:{},f={...b,...v?{aspectRatio:m,height:"auto",overflow:"hidden"}:{},...E},w={...v?{display:"block",width:"100%",height:"100%",objectFit:"cover",maxWidth:"100%"}:{display:"block",maxWidth:"100%",height:"auto",width:o?"100%":g(x)},...p?{cursor:"pointer",pointerEvents:"auto"}:{},...v?{}:E},X={className:y,style:w,onClick:p?A=>{A.stopPropagation(),p()}:void 0},k=Math.max(c,Qn),L=Bs(t)?a.jsx("video",{...X,src:t.url,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):a.jsx("img",{...X,src:t.url,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:g(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:g(k)}})]})}function WS({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 OS(e){switch(e){case"fade":case"retype":case"scroll":return e;case"default":return"scroll";default:return"scroll"}}function Ur({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 nd({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 fs({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:m=!1,descriptionPaddingPaired:g=!1,topPaddingControl:x,bottomPaddingControl:b}){const E=s.useRef(null),[f,w]=s.useState(0),G=t??"",X=n??"",k=X.length>0,{horizontal:L,vertical:A}=Nl(i),U=A==="center"||A==="bottom",$=A==="bottom";s.useLayoutEffect(()=>{if(!U)return;const C=E.current;if(!C||typeof ResizeObserver>"u")return;const T=()=>w(C.offsetHeight);T();const B=new ResizeObserver(T);return B.observe(C),()=>B.disconnect()},[G,X,U]);const P=a.jsx("span",{className:`${e}-title-text`,style:d,children:G}),H=k?a.jsx("span",{className:u,style:p,children:X}):null,W=k?a.jsx("div",{className:`${e}-title-texts-gap`,style:{height:y},children:m&&a.jsx("div",{"data-controls":"titleDescriptionPadding",...g?{"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=>{E.current=C,o(C)},className:[r,`${e}-title-h-${L}`,`${e}-title-v-${A}`].join(" "),style:{...U?{[`--${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:[H,W,P]}):a.jsxs(a.Fragment,{children:[P,W,H]})})}),b]})})}const id=45;function od(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 DS(e){const t=od(e,"--cntrl-viewport-height",window.innerHeight),n=od(e,"--cntrl-article-top",0);return{top:n,height:t,centerY:n+t/2}}function zS(e,t,n){const{vertical:i}=Nl(t),{top:o,height:r,centerY:l}=DS(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 BS(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=zS(u,n,d);return Math.exp(-(p*p)/(2*id*id))});let o=0,r=-1;return i.forEach((l,c)=>{l>r&&(r=l,o=c)}),{opacities:i,dominantIndex:o}}function jS(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(BS(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 rd(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 VS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,portalId:r}){var dt,Tt;const{prefix:l}=F.useScopedStyles(),c=s.useMemo(()=>vS(l),[l]),d=t??[],u=(e==null?void 0:e.wrapperWidth)??1,p=(e==null?void 0:e.type)??"a",y=(e==null?void 0:e.imgWidth)??mo,v=(e==null?void 0:e.titleWidth)??MS,m=AS(e==null?void 0:e.imageDisplay),g=(e==null?void 0:e.cornerRadius)??fS,x=bS(e==null?void 0:e.position),{horizontal:b,vertical:E}=Nl(x),f=(e==null?void 0:e.titleTopPadding)??0,w=(e==null?void 0:e.titleBottomPadding)??0,G=(e==null?void 0:e.titleLeftPadding)??0,X=(e==null?void 0:e.titleRightPadding)??0,k=(e==null?void 0:e.titleDescriptionPadding)??0,L=OS(e==null?void 0:e.transition),A=(e==null?void 0:e.lightbox)??"on",U=p==="b",$=L==="fade"||L==="retype",{setTitleRef:P,dominantIndex:H}=jS(d.length,$,x),W=((dt=d[H])==null?void 0:dt.title)??"",C=((Tt=d[H])==null?void 0:Tt.description)??"",T=rd(W,L==="retype"),B=rd(C,L==="retype"),S=L==="fade"||L==="retype",K=L==="retype"?T:W,R=L==="retype"?B:C,_=U?void 0:{width:F.scalingValue(y,n??!1)},j=A==="on"&&(!n||i||o),oe=o??!1,re=(e==null?void 0:e.galleryPaddingRight)??0,O=(e==null?void 0:e.galleryPaddingLeft)??0,ie=(e==null?void 0:e.galleryPaddingBetween)??0,D=vt=>F.scalingValue(vt,n??!1),ee={width:D(v)},ve=p==="a"?re:O,Ie=U?{width:"100%"}:{width:`calc(100% - ${D(y)} - ${D(ve)})`,...p==="c"?{marginLeft:"auto"}:{}},be=Math.max(re,Qn),pe=Math.max(O,Qn),Y=Math.max(ie,Qn),se=Math.max(f,Qn),xe=Math.max(w,Qn),Se=Math.max(G,Qn),Ce=Math.max(X,Qn),Ae=Math.max(k,Qn),fe=Math.max(0,(u??1)-(y??mo)),we=p==="a"?Math.max(0,(u??1)-(y??mo)-re):p==="c"?Math.max(0,(u??1)-(y??mo)-O):p==="b"?u??1:1,Te=oe&&E==="top",h=oe&&E==="bottom",q=oe&&b==="left",Z=oe&&b==="right",te=d.length>1,ue=U?void 0:D((p==="c"?O:re)+(y??mo)),z=p==="c"&&ue?{left:ue}:void 0,I=p==="a"&&ue?{right:ue}:void 0,Q=U?{left:0,width:"100%"}:p==="a"?{right:D(re),width:D(y)}:{left:D(O),width:D(y)},{titleColor:ne,titleFontFamily:de,titleFontSettings:V,titleFontSize:Pe,titleLineHeight:he,titleLetterSpacing:J,titleWordSpacing:He,titleAlign:We,titleTextAppearance:ot,descriptionColor:qe,descriptionFontFamily:nt,descriptionFontSettings:tt,descriptionFontSize:Ve,descriptionLineHeight:ge,descriptionLetterSpacing:_e,descriptionWordSpacing:je,descriptionAlign:Ze,descriptionTextAppearance:ye,lightboxCounterColor:Ne,lightboxCounterFontFamily:Ke,lightboxCounterFontSettings:Qe,lightboxCounterFontSize:st,lightboxCounterLineHeight:rt,lightboxCounterLetterSpacing:De,lightboxCounterWordSpacing:Me,lightboxCounterTextAppearance:gt}=e??{},ze={fontSettings:{fontFamily:de,fontWeight:(V==null?void 0:V.fontWeight)??400,fontStyle:(V==null?void 0:V.fontStyle)??"normal"},fontSize:Pe??.01,lineHeight:he,letterSpacing:J??0,wordSpacing:He??0,textAlign:We??"left",textAppearance:ot,color:ne??"#000000"},Xe=dn(Qt(ze,n)),lt=ee,me={...hs(Pe,he,l,n),...hs(Ve,ge,l,n,"description-leading-gap")},Re=gs(Pe,he,`${l}-title`,`${l}-text-tight-leading`),it={fontSettings:{fontFamily:nt,fontWeight:(tt==null?void 0:tt.fontWeight)??400,fontStyle:(tt==null?void 0:tt.fontStyle)??"normal"},fontSize:Ve??.01,lineHeight:ge,letterSpacing:_e??0,wordSpacing:je??0,textAlign:Ze??"left",textAppearance:ye,color:qe??"#000000"},ht=dn(Qt(it,n)),Ge=gs(Ve,ge,`${l}-description-text`,`${l}-description-tight-leading`),St=D(oe?Ae:k),Pt={fontSettings:{fontFamily:Ke,fontWeight:(Qe==null?void 0:Qe.fontWeight)??400,fontStyle:(Qe==null?void 0:Qe.fontStyle)??"normal"},fontSize:st??.01,lineHeight:rt,letterSpacing:De??0,wordSpacing:Me??0,textAppearance:gt,color:Ne??"#DEDDDD"},$t={...dn(Qt(Pt,n)),...hs(st,rt,l,n)},jt=gs(st,rt,`${l}-lightbox-counter`,`${l}-text-tight-leading`),Bt=F.buildColorVars(l,{titleColor:ne??"#000000",descriptionColor:qe??"#000000",lightboxCounterColor:Ne??"#DEDDDD"},CS,TS),Xt=s.useRef(null),[qt,It]=s.useState(!1),[Dt,on]=s.useState([]),[xt,ft]=s.useState(0),Ee=s.useCallback((vt,ut)=>{j&&(on(vt),ft(ut),It(!0))},[j]),et=s.useCallback(()=>{It(!1)},[]),Je=s.useMemo(()=>{const vt={...Bt},ut=Xt.current?getComputedStyle(Xt.current).getPropertyValue("--cntrl-article-width").trim():"";return ut&&(vt["--cntrl-article-width"]=ut),vt},[Bt,qt]);return s.useEffect(()=>{if(!qt||A!=="on"||typeof document>"u")return;const vt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=vt}},[qt,A]),s.useEffect(()=>{!n||o||i||It(!1)},[n,o,i]),s.useEffect(()=>{A==="off"&&It(!1)},[A]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),a.jsx("div",{style:Bt,children:a.jsxs("div",{ref:Xt,className:`${l}-wrapper`,style:{width:F.scalingValue(u,n??!1),[`--${l}-title-top-padding`]:E==="top"?D(f):void 0,[`--${l}-title-bottom-padding`]:E==="bottom"?D(w):void 0,[`--${l}-title-left-padding`]:b==="left"?D(G):void 0,[`--${l}-title-right-padding`]:b==="right"?D(X):void 0},children:[S&&a.jsx("div",{className:`${l}-single-title-layer`,children:a.jsx(fs,{P:l,title:K,description:R,position:x,titleRef:()=>{},titleClassName:`${Re} ${l}-single-title`,titleContainerStyle:{...me,...Ie},titleTextBoxStyle:lt,titleStyle:Xe,descriptionClassName:Ge,descriptionStyle:ht,descriptionPadding:St,showTextBoxOutline:oe,showDescriptionPaddingControl:oe,topPaddingControl:Te?Ur({P:l,controlKey:"titleTopPadding",scaled:D,height:se,paired:!1,side:"top"}):void 0,bottomPaddingControl:h?Ur({P:l,controlKey:"titleBottomPadding",scaled:D,height:xe,paired:!1,side:"bottom"}):void 0})}),d.map((vt,ut)=>{const _t=RS(vt.gallery),Mt=ut<d.length-1,Ht=_t.filter(Et=>Et.lightboxMedia).map(Et=>Et.lightboxMedia),Ut={P:l,position:x,titleRef:P(ut),titleClassName:Re,titleContainerStyle:me,titleTextBoxStyle:S?{maxWidth:"100%"}:lt,titleStyle:Xe,descriptionClassName:Ge,descriptionStyle:ht,descriptionPadding:St,showTextBoxOutline:oe&&!S,showDescriptionPaddingControl:oe&&!S,descriptionPaddingPaired:te,topPaddingControl:Te&&!S?Ur({P:l,controlKey:"titleTopPadding",scaled:D,height:se,paired:te,side:"top"}):void 0,bottomPaddingControl:h&&!S?Ur({P:l,controlKey:"titleBottomPadding",scaled:D,height:xe,paired:te,side:"bottom"}):void 0};return a.jsxs("div",{"data-item-index":ut,className:`${l}-item ${l}-item-${p}`,style:{paddingBottom:Mt?D(ie):void 0},children:[q&&nd({P:l,controlKey:"titleLeftPadding",scaled:D,width:Se,maxFraction:we,side:"left",paired:te,anchorStyle:z}),Z&&nd({P:l,controlKey:"titleRightPadding",scaled:D,width:Ce,maxFraction:we,side:"right",paired:te,anchorStyle:I}),oe&&Mt&&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:D(Y),...Q}}),U?a.jsxs("div",{className:`${l}-gallery`,children:[a.jsx("div",{className:`${l}-gallery-media`,children:_t.map(({displayMedia:Et,lightboxMedia:Wt},At)=>{const pt=Wt?Ht.findIndex(N=>N.url===Wt.url):-1;return a.jsx(td,{P:l,media:Et,imgWidth:y||void 0,cornerRadius:g||void 0,imageDisplay:m,isEditor:n,galleryPaddingBetween:ie,showPaddingAfter:At<_t.length-1,showControls:oe,onMediaClick:j&&pt>=0?()=>Ee(Ht,pt):void 0},`${Et.url}-${At}`)})}),a.jsx("div",{className:`${l}-title-layer`,children:a.jsx(fs,{...Ut,title:S?"":vt.title,description:S?"":vt.description})})]}):a.jsxs(a.Fragment,{children:[a.jsx(fs,{...Ut,title:S?"":vt.title,description:S?"":vt.description}),_t.length>0&&a.jsx(WS,{P:l,layoutType:p,galleryWidthStyle:_,galleryPaddingRight:re,galleryPaddingLeft:O,galleryPaddingRightWidth:be,galleryPaddingLeftWidth:pe,galleryPaddingMaxFraction:fe,showControls:oe,scaled:D,children:_t.map(({displayMedia:Et,lightboxMedia:Wt},At)=>{const pt=Wt?Ht.findIndex(N=>N.url===Wt.url):-1;return a.jsx(td,{P:l,media:Et,cornerRadius:g||void 0,fillGalleryWidth:!0,imageDisplay:m,isEditor:n,galleryPaddingBetween:ie,showPaddingAfter:At<_t.length-1,showControls:oe,onMediaClick:j&&pt>=0?()=>Ee(Ht,pt):void 0},`${Et.url}-${At}`)})})]})]},ut)})]})}),qt&&A==="on"&&typeof document<"u"&&e&&(()=>{const vt=(r?document.getElementById(r):null)??document.body;return Gn.createPortal(a.jsx("div",{style:Je,"data-selection":"none",children:a.jsx(HS,{prefix:l,items:Dt,index:xt,imageDisplay:NS(e.lightboxImageDisplay),isEditor:n,onClose:et,onPrev:()=>ft(ut=>(ut-1+Dt.length)%Dt.length),onNext:()=>ft(ut=>(ut+1)%Dt.length),counterClassName:jt,counterStyle:$t,backgroundColor:e.backgroundColor??SS})}),vt)})()]})}const GS=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
21100
21102
  import { createPortal } from 'react-dom';
21101
21103
  import type React from 'react';
21102
21104
  import { CommonComponentProps } from '../props';
@@ -23439,10 +23441,10 @@ export function Mercury({
23439
23441
  object-position: center;
23440
23442
  }
23441
23443
  ${t}
23442
- `}function Rr(e){return Number(e.toFixed(4))}function sd(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 ys(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 uw(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 pw(e){const[t,n]=e.ratioValue.split(":").map(Number),i=e.reversed?n:t;return(e.reversed?t:n)/i}function mw(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.name??"")||/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url??"")}function rp(e,t){return(1-e)/(1-e*Math.cos(t))}function gw(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)*rp(e,i)))}return t||1}function hw(e,t){return e?1:1+op*(.35+t)}function fw(e,t,n,i){const o=t*hw(n,i);return Math.max(0,(e-o)/2)}function ap(e,t,n){const i=rp(e,n);return{offset:Math.sin(n)*i/t,scale:i}}function sp(e,t,n){return e/2+t*n}function yw(e,t,n){return e(t-n/2)}function vw(e,t){return e*t}function lp(e){return Math.round(e*1e3)}function cp(e,t,n){const i=Math.cos(e),o=Math.cos(cw*Math.PI/2);if(i>=o)return n;const r=(i+1)/(o+1);return Rr(t+(n-t)*r)}function dp(e){return cp(e,rw,aw)}function xw(e){return cp(e,sw,lw)}function up(e,t){if(!t)return"none";const n=xw(e);return n<=0?"none":`blur(${n}px)`}function bw(e,t,n,i,o,r,l,d){const{offset:c,scale:u}=ap(i,o,r*Math.PI*2),p=r*Math.PI*2,x=sp(t,n,c),y=Rr(u),m=`calc(${e(x)} - var(--helix-base-w) * ${y} / 2)`,g=`calc(var(--helix-base-w) * ${y})`,v=l?`height: calc(var(--helix-base-h) * ${y});`:"";return`left: ${m}; width: ${g}; ${v} z-index: ${lp(u)}; transform: translateY(-50%); opacity: ${dp(p)}; filter: ${up(p,d)};`}function Sw(e,t,n,i,o,r,l,d){const c=[];for(let u=0;u<=ad;u+=1){const p=u/ad;c.push(` ${Rr(p*100)}% { ${bw(t,n,i,o,r,p,l,d)} }`)}return`@keyframes ${e}-orbit {
23443
- ${c.join(`
23444
+ `}function Rr(e){return Number(e.toFixed(4))}function sd(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 ys(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 uw(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 pw(e){const[t,n]=e.ratioValue.split(":").map(Number),i=e.reversed?n:t;return(e.reversed?t:n)/i}function mw(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.name??"")||/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url??"")}function rp(e,t){return(1-e)/(1-e*Math.cos(t))}function gw(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)*rp(e,i)))}return t||1}function hw(e,t){return e?1:1+op*(.35+t)}function fw(e,t,n,i){const o=t*hw(n,i);return Math.max(0,(e-o)/2)}function ap(e,t,n){const i=rp(e,n);return{offset:Math.sin(n)*i/t,scale:i}}function sp(e,t,n){return e/2+t*n}function yw(e,t,n){return e(t-n/2)}function vw(e,t){return e*t}function lp(e){return Math.round(e*1e3)}function cp(e,t,n){const i=Math.cos(e),o=Math.cos(cw*Math.PI/2);if(i>=o)return n;const r=(i+1)/(o+1);return Rr(t+(n-t)*r)}function dp(e){return cp(e,rw,aw)}function xw(e){return cp(e,sw,lw)}function up(e,t){if(!t)return"none";const n=xw(e);return n<=0?"none":`blur(${n}px)`}function bw(e,t,n,i,o,r,l,c){const{offset:d,scale:u}=ap(i,o,r*Math.PI*2),p=r*Math.PI*2,y=sp(t,n,d),v=Rr(u),m=`calc(${e(y)} - var(--helix-base-w) * ${v} / 2)`,g=`calc(var(--helix-base-w) * ${v})`,x=l?`height: calc(var(--helix-base-h) * ${v});`:"";return`left: ${m}; width: ${g}; ${x} z-index: ${lp(u)}; transform: translateY(-50%); opacity: ${dp(p)}; filter: ${up(p,c)};`}function Sw(e,t,n,i,o,r,l,c){const d=[];for(let u=0;u<=ad;u+=1){const p=u/ad;d.push(` ${Rr(p*100)}% { ${bw(t,n,i,o,r,p,l,c)} }`)}return`@keyframes ${e}-orbit {
23445
+ ${d.join(`
23444
23446
  `)}
23445
- }`}function pp(e,t){return(e%t+t)%t}function ww(e,t){return _l(e,t)/t}function _l(e,t){return pp(e,t)}function $w(e,t){return Math.floor(e/t)}function Cw(e,t,n,i){return $w(e,t)*n+_l(e,t)*i}function Tw(e,t,n){const i=n==="left"?1-e:e;return`${Rr(-i*t)}s`}function ld(e){const t=Math.sin(e*12.9898)*43758.5453;return t-Math.floor(t)}function mp(e){const t=e%1;return t<0?t+1:t}function Lw(e,t,n){const i=t/ip,o=n==="left"?-e*i:e*i;return mp(o)}function Pw({settings:e,content:t,isEditor:n,isPreviewMode:i}){const{prefix:o}=_.useScopedStyles(),r=s.useRef(null),l=ys((e==null?void 0:e.width)??(e==null?void 0:e.spread)??(e==null?void 0:e.wrapperWidth),ZS),d=ys(e==null?void 0:e.imageWidth,JS),c=ys(e==null?void 0:e.turnHeight,QS),u=sd(e==null?void 0:e.itemsPerTurn,ew,3,40),p=sd(e==null?void 0:e.turns,tw,1,30),x=Math.min(ow,Math.max(0,nw)),y=Math.min(1,Math.max(0,iw)),m=Math.max(0,(e==null?void 0:e.speed)??ip),g=(e==null?void 0:e.direction)==="left"?"left":"right",v=(e==null?void 0:e.playback)==="scroll"?"scroll":"autoplay",b=(e==null?void 0:e.cornerRadius)??0,E=(e==null?void 0:e.blur)!=="off",f=s.useMemo(()=>uw(e==null?void 0:e.imageDisplay),[e==null?void 0:e.imageDisplay]),w=f.display==="cover",G=oe=>_.scalingValue(oe,n??!1),X=s.useMemo(()=>gw(x),[x]),M=s.useMemo(()=>fw(l,d,w,y),[l,d,w,y]),T=s.useMemo(()=>dw(o,Sw(o,G,l,M,x,X,w,E)),[o,l,M,x,X,w,E,n]),N=s.useMemo(()=>(t??[]).filter(oe=>{var R;return!!((R=oe.image)!=null&&R.url)}),[t]),q=c/u,$=d*pw(f),I=Math.min(KS,p*u),W=YS*u,O=I+W*2,L=Math.max(0,p-1)*c+(u-1)*q,z=m>0,S=v==="scroll"&&z,K=v==="autoplay"&&z&&(n?!!i:!0),[k,H]=s.useState(0);s.useEffect(()=>{if(!S)return;const oe=r.current;if(!oe)return;const R=()=>{const D=oe.getBoundingClientRect(),le=window.innerHeight||document.documentElement.clientHeight,ie=le+D.height;ie<=0||H(Math.min(1,Math.max(0,(le-D.top)/ie)))};R(),window.addEventListener("scroll",R,{passive:!0}),window.addEventListener("resize",R);const ce=new ResizeObserver(R);return ce.observe(oe),()=>{window.removeEventListener("scroll",R),window.removeEventListener("resize",R),ce.disconnect()}},[S]);const j=S?Lw(k,m,g):0,ne=z&&v==="autoplay"?360/(m*US):0;return N.length===0?a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:T}}),a.jsx("div",{className:`${o}-wrapper`,style:{width:G(l),marginInline:"auto"}})]}):a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:T}}),a.jsx("div",{ref:r,className:`${o}-wrapper`,style:{width:G(l),height:G(L),marginInline:"auto"},children:Array.from({length:O},(oe,R)=>{const ce=R-W,le=N[pp(ce,N.length)].image,ie=_l(ce,u),we=ww(ce,u),Ie=S?mp(we+j):we,xe=Cw(ce,u,c,q),pe=y===0?0:(ld(ie+7.3)-.5)*y*q,Y=w?1:1+(ld(ie+3.1)-.5)*2*op*(.35+y),ae=Ie*Math.PI*2,{offset:se,scale:Re}=ap(x,X,ae),$e=d*Y,Me=vw($e,Re),ve=sp(l,M,se),be={"--helix-base-w":G($e),...w?{"--helix-base-h":G($)}:{}},Ce={top:G(xe+pe),transform:"translateY(-50%)",...be,...K?{animationDuration:`${Rr(ne)}s`,animationDelay:Tw(we,ne,g),animationDirection:g==="left"?"reverse":"normal"}:{left:yw(G,ve,Me),width:G(Me),...w?{height:G($*Re)}:{},zIndex:lp(Re),opacity:dp(ae),filter:up(ae,E)}},h=b>0?{borderRadius:G(b)}:{},U=w?{...h,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"}:h,Z=mw(le)?a.jsx("video",{className:`${o}-media`,style:U,src:le.url,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:`${o}-media`,style:U,src:le.url,alt:le.name??"",loading:"lazy",decoding:"async"});return a.jsx("div",{className:K?`${o}-item`:`${o}-item ${o}-item-static`,style:Ce,children:w?a.jsx("div",{className:`${o}-cover`,style:h,children:Z}):Z},`${p}-${u}-${ce}`)})})]})}const Iw=`import { useEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
23447
+ }`}function pp(e,t){return(e%t+t)%t}function ww(e,t){return _l(e,t)/t}function _l(e,t){return pp(e,t)}function $w(e,t){return Math.floor(e/t)}function Cw(e,t,n,i){return $w(e,t)*n+_l(e,t)*i}function Tw(e,t,n){const i=n==="left"?1-e:e;return`${Rr(-i*t)}s`}function ld(e){const t=Math.sin(e*12.9898)*43758.5453;return t-Math.floor(t)}function mp(e){const t=e%1;return t<0?t+1:t}function Lw(e,t,n){const i=t/ip,o=n==="left"?-e*i:e*i;return mp(o)}function Pw({settings:e,content:t,isEditor:n,isPreviewMode:i}){const{prefix:o}=F.useScopedStyles(),r=s.useRef(null),l=ys((e==null?void 0:e.width)??(e==null?void 0:e.spread)??(e==null?void 0:e.wrapperWidth),ZS),c=ys(e==null?void 0:e.imageWidth,JS),d=ys(e==null?void 0:e.turnHeight,QS),u=sd(e==null?void 0:e.itemsPerTurn,ew,3,40),p=sd(e==null?void 0:e.turns,tw,1,30),y=Math.min(ow,Math.max(0,nw)),v=Math.min(1,Math.max(0,iw)),m=Math.max(0,(e==null?void 0:e.speed)??ip),g=(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,E=(e==null?void 0:e.blur)!=="off",f=s.useMemo(()=>uw(e==null?void 0:e.imageDisplay),[e==null?void 0:e.imageDisplay]),w=f.display==="cover",G=re=>F.scalingValue(re,n??!1),X=s.useMemo(()=>gw(y),[y]),k=s.useMemo(()=>fw(l,c,w,v),[l,c,w,v]),L=s.useMemo(()=>dw(o,Sw(o,G,l,k,y,X,w,E)),[o,l,k,y,X,w,E,n]),A=s.useMemo(()=>(t??[]).filter(re=>{var O;return!!((O=re.image)!=null&&O.url)}),[t]),U=d/u,$=c*pw(f),P=Math.min(KS,p*u),H=YS*u,W=P+H*2,T=Math.max(0,p-1)*d+(u-1)*U,B=m>0,S=x==="scroll"&&B,K=x==="autoplay"&&B&&(n?!!i:!0),[R,_]=s.useState(0);s.useEffect(()=>{if(!S)return;const re=r.current;if(!re)return;const O=()=>{const D=re.getBoundingClientRect(),le=window.innerHeight||document.documentElement.clientHeight,ee=le+D.height;ee<=0||_(Math.min(1,Math.max(0,(le-D.top)/ee)))};O(),window.addEventListener("scroll",O,{passive:!0}),window.addEventListener("resize",O);const ie=new ResizeObserver(O);return ie.observe(re),()=>{window.removeEventListener("scroll",O),window.removeEventListener("resize",O),ie.disconnect()}},[S]);const j=S?Lw(R,m,g):0,oe=B&&x==="autoplay"?360/(m*US):0;return A.length===0?a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:L}}),a.jsx("div",{className:`${o}-wrapper`,style:{width:G(l),marginInline:"auto"}})]}):a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:L}}),a.jsx("div",{ref:r,className:`${o}-wrapper`,style:{width:G(l),height:G(T),marginInline:"auto"},children:Array.from({length:W},(re,O)=>{const ie=O-H,le=A[pp(ie,A.length)].image,ee=_l(ie,u),ve=ww(ie,u),Ie=S?mp(ve+j):ve,be=Cw(ie,u,d,U),pe=v===0?0:(ld(ee+7.3)-.5)*v*U,Y=w?1:1+(ld(ee+3.1)-.5)*2*op*(.35+v),se=Ie*Math.PI*2,{offset:xe,scale:Se}=ap(y,X,se),Ce=c*Y,Ae=vw(Ce,Se),fe=sp(l,k,xe),we={"--helix-base-w":G(Ce),...w?{"--helix-base-h":G($)}:{}},Te={top:G(be+pe),transform:"translateY(-50%)",...we,...K?{animationDuration:`${Rr(oe)}s`,animationDelay:Tw(ve,oe,g),animationDirection:g==="left"?"reverse":"normal"}:{left:yw(G,fe,Ae),width:G(Ae),...w?{height:G($*Se)}:{},zIndex:lp(Se),opacity:dp(se),filter:up(se,E)}},h=b>0?{borderRadius:G(b)}:{},q=w?{...h,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"}:h,Z=mw(le)?a.jsx("video",{className:`${o}-media`,style:q,src:le.url,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:`${o}-media`,style:q,src:le.url,alt:le.name??"",loading:"lazy",decoding:"async"});return a.jsx("div",{className:K?`${o}-item`:`${o}-item ${o}-item-static`,style:Te,children:w?a.jsx("div",{className:`${o}-cover`,style:h,children:Z}):Z},`${p}-${u}-${ie}`)})})]})}const Iw=`import { useEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
23446
23448
  import { CommonComponentProps } from '../props';
23447
23449
  import { scalingValue } from '../utils/scalingValue';
23448
23450
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -23980,7 +23982,7 @@ export function Helix({
23980
23982
  </>
23981
23983
  );
23982
23984
  }
23983
- `,Rw=["https://cdn.cntrl.site/component-assets/Helix-default-1.png","https://cdn.cntrl.site/component-assets/Helix-default-2.png","https://cdn.cntrl.site/component-assets/Helix-default-3.png","https://cdn.cntrl.site/component-assets/Helix-default-4.png","https://cdn.cntrl.site/component-assets/Helix-default-5.png"],kw={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]}}}}},default:Rw.map(e=>({image:{url:e,name:""}}))},settings:{sizing:"auto auto",properties:{width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},turnHeight:{type:"number",scope:"layout",title:"Turn height",display:{type:"numeric-input"},min:0,max:9999},itemsPerTurn:{type:"number",scope:"common",title:"Per turn",display:{type:"common-numeric-input"},min:3,max:40},turns:{type:"number",scope:"common",title:"Turns",display:{type:"common-numeric-input"},min:1,max:30},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},playback:{type:"string",scope:"common",title:"Playback",display:{type:"toggle-cycle",enum:["autoplay","scroll"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},blur:{type:"string",scope:"common",title:"Blur",display:{type:"toggle-cycle",enum:["on","off"]}}},defaults:{itemsPerTurn:14,turns:3,direction:"right",playback:"autoplay",blur:"off",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1}},layoutDefaults:{d:{defaultPaddingTop:30/1440,width:800/1440,imageWidth:160/1440,turnHeight:380/1440,speed:2.2,cornerRadius:0},m:{defaultPaddingTop:10/375,width:320/375,imageWidth:75/375,turnHeight:310/375,speed:2.8,cornerRadius:0},t:{defaultPaddingTop:20/768,width:620/768,imageWidth:100/768,turnHeight:280/768,speed:2.8,cornerRadius:0}},layout:["__componentName__","width","imageWidth","turnHeight","itemsPerTurn","turns","playback","speed","direction","imageDisplay","cornerRadius","blur"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",items:["direction","speed"]},{type:"row",items:["width"]},{type:"row",items:["imageWidth","turnHeight"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",items:["itemsPerTurn","turns"]},{type:"row",items:["playback","blur"]}]}]},Ew={element:Pw,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:kw,sourceCode:Iw,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Sn=300,en=300,Mw=8/1440,ho=.004,Aw=50,Fw=1440,Gi=Aw/Fw;function Nw(e){if(e==="default"||e==="compact"||e==="open")return e;if(e==="onScroll")return"compact"}function _w(e){return e==="center"||e==="right"?e:"left"}function Hw(e){return e==="left"||e==="right"?e:"center"}function Ww(e,t,n){const i=_.scalingValue(t,n);return e==="center"?`translateX(calc(-50% + ${i}))`:`translateX(${i})`}function Ow(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 gp(e,t){const n=(Ow(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 Dw(e,t,n){switch(gp(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 zw(e,t){switch(gp(e.showIn,t)){case"default and compact":return!1;default:return!0}}function Bw(e,t){if(!e)return"";const n=t==null?void 0:t.find(i=>i.id===e);return n?n.slug===""?"/":`/${n.slug}`:e.startsWith("/")||e.startsWith("#")||/^[a-z][a-z\d+\-.]*:/i.test(e)?e:t?`/${e}`:e}function cd(e){const t=(e??"").toLowerCase();return t==="blank"||t==="_blank"||t.includes("new")}function hp(e){const t=e.link;if(t&&typeof t=="object"){const i=cd(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=cd(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 js(e,t){const n=e.label||"Link",i=hp(e);if(i.type==="url")return{label:n,href:i.value,target:i.target};if(i.type==="anchor"){const d=i.value.replace(/^#/,"");return{label:n,href:d?`#${d}`:"",target:i.target}}const o=Bw(i.value,t),r=(i.anchor??"").replace(/^#/,""),l=r?o?`${o}#${r}`:`#${r}`:o;return{label:n,href:l,target:i.target}}const xi=24,vi=xi*.125,fp=xi*.125,vs=(xi-(3*vi+2*fp))/2,dd=vi+fp;function jw({className:e,lineClassName:t}){return a.jsxs("svg",{className:e,viewBox:`0 0 ${xi} ${xi}`,"aria-hidden":"true",children:[a.jsx("rect",{className:`${t} ${t}-top`,x:"0",y:vs,width:xi,height:vi,rx:vi/2}),a.jsx("rect",{className:`${t} ${t}-mid`,x:"0",y:vs+dd,width:xi,height:vi,rx:vi/2}),a.jsx("rect",{className:`${t} ${t}-bot`,x:"0",y:vs+2*dd,width:xi,height:vi,rx:vi/2})]})}function Vw(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Gw(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:_.scalingValue((o-t)/2,i)}}function ud(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 pd(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:{...cn(Qt(i,n)),...Gw(t.fontSize,t.lineHeight,e,n)},className:Vw(t.fontSize,t.lineHeight,`${e}-link-text`,`${e}-text-tight-leading`)}}function md(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 gd(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 yp(e){const n=Math.max(Gi,e.fontSize??Gi),{start:i,end:o}=gd(e.textPaddingTop,e.textPaddingBottom,1,n),{start:r,end:l}=gd(e.textPaddingLeft,e.textPaddingRight,1,Gi);return{effectivePaddingLeft:r,effectivePaddingRight:l,effectivePaddingTop:i,effectivePaddingBottom:o,panelSize:1}}function Xw(e){if(e==="center"||e==="center-center")return{horizontalAlign:"center",verticalAlign:"center"};const[t,n]=e.split("-");return{horizontalAlign:t,verticalAlign:n}}function qw(e){return e.position?Xw(e.position):{horizontalAlign:e.horizontalAlign??"left",verticalAlign:e.verticalAlign??"top"}}function Uw(e,t){return e.textPaddingLeft!==t.textPaddingLeft||e.textPaddingRight!==t.textPaddingRight||e.textPaddingTop!==t.textPaddingTop||e.textPaddingBottom!==t.textPaddingBottom}const Kw=[["onScrollIconColor","compactIconColor"],["onScrollCloseButtonColor","compactCloseButtonColor"],["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 vp(e){var o,r;const t=e,n={};for(const[l,d]of Kw)e[d]!==void 0||t[l]===void 0||(n[d]=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 hd(e){var o,r,l,d,c,u,p,x,y,m,g,v,b,E,f,w,G,X;e=vp(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 M=((r=(o=e.stateOverrides)==null?void 0:o.open)==null?void 0:r.openLinkColor)??((d=(l=e.stateOverrides)==null?void 0:l.open)==null?void 0:d.linkColor)??e.linkColor;M!==void 0&&(n.openLinkColor=M)}if(e.compactIconColor===void 0){const M=((u=(c=e.stateOverrides)==null?void 0:c.compact)==null?void 0:u.iconColor)??e.iconColor;M!==void 0&&(n.compactIconColor=M)}if(e.compactCloseButtonColor===void 0){const M=((x=(p=e.stateOverrides)==null?void 0:p.compact)==null?void 0:x.closeButtonColor)??e.closeButtonColor;M!==void 0&&(n.compactCloseButtonColor=M)}if(e.compactLinkColor===void 0){const M=((m=(y=e.stateOverrides)==null?void 0:y.compact)==null?void 0:m.linkColor)??e.linkColor;M!==void 0&&(n.compactLinkColor=M)}if(e.compactLogoColor===void 0){const M=((v=(g=e.stateOverrides)==null?void 0:g.compact)==null?void 0:v.logoColor)??e.logoColor;M!==void 0&&(n.compactLogoColor=M)}if(e.openLogoColor===void 0){const M=((E=(b=e.stateOverrides)==null?void 0:b.open)==null?void 0:E.logoColor)??e.logoColor;M!==void 0&&(n.openLogoColor=M)}if(e.compactBackgroundColor===void 0){const M=((w=(f=e.stateOverrides)==null?void 0:f.compact)==null?void 0:w.backgroundColor)??((X=(G=t.stateOverrides)==null?void 0:G.compact)==null?void 0:X.panelColor)??t.compactPanelColor??t.onScrollPanelColor??e.backgroundColor??n.backgroundColor;M!==void 0&&(n.compactBackgroundColor=M)}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=(M,T)=>{if(e[M]!==void 0)return;const N=e[T];N!==void 0&&(n[M]=N)};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 Yw(e,t){const n=yp({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 Zw(e,t){return{paddingLeft:_.scalingValue(e.effectivePaddingLeft,t),paddingRight:_.scalingValue(e.effectivePaddingRight,t),paddingTop:_.scalingValue(e.effectivePaddingTop,t),paddingBottom:_.scalingValue(e.effectivePaddingBottom,t)}}function Jw(e,t,n,i){const o=Math.max(Gi,n??Gi),r=Math.max(t.effectivePaddingTop,ho),l=Math.max(t.effectivePaddingBottom,ho),d=Math.max(0,t.panelSize-t.effectivePaddingBottom-o),c=Math.max(0,t.panelSize-t.effectivePaddingTop-o),u=Math.max(t.effectivePaddingLeft,ho),p=Math.max(t.effectivePaddingRight,ho),x=Math.max(0,t.panelSize-t.effectivePaddingRight-Gi),y=Math.max(0,t.panelSize-t.effectivePaddingLeft-Gi);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(d),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(c),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(x),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(y),className:`${e}-control-anchor`,style:{top:0,right:0,width:i(p),height:"100%"}})]})}const Qw={iconColor:"icon-color",closeButtonColor:"close-button-color",linkColor:"link-color",openLinkColor:"menu-link-color",compactIconColor:"compact-icon-color",compactCloseButtonColor:"compact-close-button-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"},e$=["hover","open"],t$={top:"flex-start",center:"center",bottom:"flex-end"},n$={left:"flex-start",center:"center",right:"flex-end"};function i$(e){return`
23985
+ `,Rw=["https://cdn.cntrl.site/component-assets/Helix-default-1.png","https://cdn.cntrl.site/component-assets/Helix-default-2.png","https://cdn.cntrl.site/component-assets/Helix-default-3.png","https://cdn.cntrl.site/component-assets/Helix-default-4.png","https://cdn.cntrl.site/component-assets/Helix-default-5.png"],kw={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]}}}}},default:Rw.map(e=>({image:{url:e,name:""}}))},settings:{sizing:"auto auto",properties:{width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},turnHeight:{type:"number",scope:"layout",title:"Turn height",display:{type:"numeric-input"},min:0,max:9999},itemsPerTurn:{type:"number",scope:"common",title:"Per turn",display:{type:"common-numeric-input"},min:3,max:40},turns:{type:"number",scope:"common",title:"Turns",display:{type:"common-numeric-input"},min:1,max:30},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},playback:{type:"string",scope:"common",title:"Playback",display:{type:"toggle-cycle",enum:["autoplay","scroll"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},blur:{type:"string",scope:"common",title:"Blur",display:{type:"toggle-cycle",enum:["on","off"]}}},defaults:{itemsPerTurn:14,turns:3,direction:"right",playback:"autoplay",blur:"off",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1}},layoutDefaults:{d:{defaultPaddingTop:30/1440,width:800/1440,imageWidth:160/1440,turnHeight:380/1440,speed:2.2,cornerRadius:0},m:{defaultPaddingTop:10/375,width:320/375,imageWidth:75/375,turnHeight:310/375,speed:2.8,cornerRadius:0},t:{defaultPaddingTop:20/768,width:620/768,imageWidth:100/768,turnHeight:280/768,speed:2.8,cornerRadius:0}},layout:["__componentName__","width","imageWidth","turnHeight","itemsPerTurn","turns","playback","speed","direction","imageDisplay","cornerRadius","blur"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",items:["direction","speed"]},{type:"row",items:["width"]},{type:"row",items:["imageWidth","turnHeight"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",items:["itemsPerTurn","turns"]},{type:"row",items:["playback","blur"]}]}]},Ew={element:Pw,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:kw,sourceCode:Iw,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Sn=300,en=300,Mw=8/1440,ho=.004,Aw=50,Fw=1440,Gi=Aw/Fw;function Nw(e){if(e==="default"||e==="compact"||e==="open")return e;if(e==="onScroll")return"compact"}function _w(e){return e==="center"||e==="right"?e:"left"}function Hw(e){return e==="left"||e==="right"?e:"center"}function Ww(e,t,n){const i=F.scalingValue(t,n);return e==="center"?`translateX(calc(-50% + ${i}))`:`translateX(${i})`}function Ow(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 gp(e,t){const n=(Ow(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 Dw(e,t,n){switch(gp(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 zw(e,t){switch(gp(e.showIn,t)){case"default and compact":return!1;default:return!0}}function Bw(e,t){if(!e)return"";const n=t==null?void 0:t.find(i=>i.id===e);return n?n.slug===""?"/":`/${n.slug}`:e.startsWith("/")||e.startsWith("#")||/^[a-z][a-z\d+\-.]*:/i.test(e)?e:t?`/${e}`:e}function cd(e){const t=(e??"").toLowerCase();return t==="blank"||t==="_blank"||t.includes("new")}function hp(e){const t=e.link;if(t&&typeof t=="object"){const i=cd(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=cd(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 js(e,t){const n=e.label||"Link",i=hp(e);if(i.type==="url")return{label:n,href:i.value,target:i.target};if(i.type==="anchor"){const c=i.value.replace(/^#/,"");return{label:n,href:c?`#${c}`:"",target:i.target}}const o=Bw(i.value,t),r=(i.anchor??"").replace(/^#/,""),l=r?o?`${o}#${r}`:`#${r}`:o;return{label:n,href:l,target:i.target}}const xi=24,vi=xi*.125,fp=xi*.125,vs=(xi-(3*vi+2*fp))/2,dd=vi+fp;function jw({className:e,lineClassName:t}){return a.jsxs("svg",{className:e,viewBox:`0 0 ${xi} ${xi}`,"aria-hidden":"true",children:[a.jsx("rect",{className:`${t} ${t}-top`,x:"0",y:vs,width:xi,height:vi,rx:vi/2}),a.jsx("rect",{className:`${t} ${t}-mid`,x:"0",y:vs+dd,width:xi,height:vi,rx:vi/2}),a.jsx("rect",{className:`${t} ${t}-bot`,x:"0",y:vs+2*dd,width:xi,height:vi,rx:vi/2})]})}function Vw(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Gw(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 ud(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 pd(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:{...dn(Qt(i,n)),...Gw(t.fontSize,t.lineHeight,e,n)},className:Vw(t.fontSize,t.lineHeight,`${e}-link-text`,`${e}-text-tight-leading`)}}function md(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 gd(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 yp(e){const n=Math.max(Gi,e.fontSize??Gi),{start:i,end:o}=gd(e.textPaddingTop,e.textPaddingBottom,1,n),{start:r,end:l}=gd(e.textPaddingLeft,e.textPaddingRight,1,Gi);return{effectivePaddingLeft:r,effectivePaddingRight:l,effectivePaddingTop:i,effectivePaddingBottom:o,panelSize:1}}function Xw(e){if(e==="center"||e==="center-center")return{horizontalAlign:"center",verticalAlign:"center"};const[t,n]=e.split("-");return{horizontalAlign:t,verticalAlign:n}}function qw(e){return e.position?Xw(e.position):{horizontalAlign:e.horizontalAlign??"left",verticalAlign:e.verticalAlign??"top"}}function Uw(e,t){return e.textPaddingLeft!==t.textPaddingLeft||e.textPaddingRight!==t.textPaddingRight||e.textPaddingTop!==t.textPaddingTop||e.textPaddingBottom!==t.textPaddingBottom}const Kw=[["onScrollIconColor","compactIconColor"],["onScrollCloseButtonColor","compactCloseButtonColor"],["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 vp(e){var o,r;const t=e,n={};for(const[l,c]of Kw)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 hd(e){var o,r,l,c,d,u,p,y,v,m,g,x,b,E,f,w,G,X;e=vp(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 k=((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;k!==void 0&&(n.openLinkColor=k)}if(e.compactIconColor===void 0){const k=((u=(d=e.stateOverrides)==null?void 0:d.compact)==null?void 0:u.iconColor)??e.iconColor;k!==void 0&&(n.compactIconColor=k)}if(e.compactCloseButtonColor===void 0){const k=((y=(p=e.stateOverrides)==null?void 0:p.compact)==null?void 0:y.closeButtonColor)??e.closeButtonColor;k!==void 0&&(n.compactCloseButtonColor=k)}if(e.compactLinkColor===void 0){const k=((m=(v=e.stateOverrides)==null?void 0:v.compact)==null?void 0:m.linkColor)??e.linkColor;k!==void 0&&(n.compactLinkColor=k)}if(e.compactLogoColor===void 0){const k=((x=(g=e.stateOverrides)==null?void 0:g.compact)==null?void 0:x.logoColor)??e.logoColor;k!==void 0&&(n.compactLogoColor=k)}if(e.openLogoColor===void 0){const k=((E=(b=e.stateOverrides)==null?void 0:b.open)==null?void 0:E.logoColor)??e.logoColor;k!==void 0&&(n.openLogoColor=k)}if(e.compactBackgroundColor===void 0){const k=((w=(f=e.stateOverrides)==null?void 0:f.compact)==null?void 0:w.backgroundColor)??((X=(G=t.stateOverrides)==null?void 0:G.compact)==null?void 0:X.panelColor)??t.compactPanelColor??t.onScrollPanelColor??e.backgroundColor??n.backgroundColor;k!==void 0&&(n.compactBackgroundColor=k)}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=(k,L)=>{if(e[k]!==void 0)return;const A=e[L];A!==void 0&&(n[k]=A)};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 Yw(e,t){const n=yp({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 Zw(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 Jw(e,t,n,i){const o=Math.max(Gi,n??Gi),r=Math.max(t.effectivePaddingTop,ho),l=Math.max(t.effectivePaddingBottom,ho),c=Math.max(0,t.panelSize-t.effectivePaddingBottom-o),d=Math.max(0,t.panelSize-t.effectivePaddingTop-o),u=Math.max(t.effectivePaddingLeft,ho),p=Math.max(t.effectivePaddingRight,ho),y=Math.max(0,t.panelSize-t.effectivePaddingRight-Gi),v=Math.max(0,t.panelSize-t.effectivePaddingLeft-Gi);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 Qw={iconColor:"icon-color",closeButtonColor:"close-button-color",linkColor:"link-color",openLinkColor:"menu-link-color",compactIconColor:"compact-icon-color",compactCloseButtonColor:"compact-close-button-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"},e$=["hover","open"],t$={top:"flex-start",center:"center",bottom:"flex-end"},n$={left:"flex-start",center:"center",right:"flex-end"};function i$(e){return`
23984
23986
  .${e}-root {
23985
23987
  position: relative;
23986
23988
  display: block;
@@ -24548,7 +24550,7 @@ export function Helix({
24548
24550
  word-spacing ${en}ms ease,
24549
24551
  padding ${en}ms ease;
24550
24552
  }
24551
- `}function o$(e){return`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`}function r$(e){const t=e.trim().toLowerCase();return t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")?!0:t.includes(".svg")}function a$(e){const t=r$(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 s$(e){const t=e.indexOf("#");if(t===-1)return"";try{return decodeURIComponent(e.slice(t+1))}catch{return e.slice(t+1)}}function l$(e){if(!e||e.startsWith("#"))return!0;try{return new URL(e,window.location.href).pathname===window.location.pathname}catch{return!1}}function fd(e){if(!e)return!1;const t=document.getElementById(e),n=document.querySelector(`[data-section-id="${CSS.escape(e)}"]`),i=t??n;return i instanceof HTMLElement?(i.scrollIntoView({behavior:"smooth",block:"start"}),!0):!1}function c$(e,t,n={}){const{isEditor:i,isPreviewMode:o,item:r,pages:l,onLinkNavigate:d}=n,c=e.currentTarget.getAttribute("href")??"",u=s$(c),p=e.currentTarget.target==="_blank";if(r&&d){e.preventDefault(),e.stopPropagation();const x=js(r,l),y=hp(r);d({mode:y.type==="url"?"url":"page",href:x.href||c,page:y.type==="page"?y.value:void 0,url:y.type==="url"?y.value:void 0,anchor:y.type==="anchor"?y.value.replace(/^#/,""):(y.anchor??"").replace(/^#/,""),target:x.target}),t();return}if(i){e.preventDefault(),fd(u),t();return}!p&&u&&l$(c)&&fd(u)&&e.preventDefault(),t()}const d$=["--cntrl-article-width","--cntrl-article-top","--cntrl-article-left","--cntrl-viewport-height"];function u$(e){let t=e;for(;t;){if(getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim())return t;t=t.parentElement}return e}function p$(e){const t={},n=u$(e);if(!n)return t;const i=getComputedStyle(n);for(const o of d$){const r=i.getPropertyValue(o).trim();r&&(t[o]=r)}return t}function yd(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 m$({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,activeEvent:o,currentState:r,isSwitchClone:l=!1,unavailableStates:d=[],layoutId:c,pages:u,onLinkNavigate:p,onUpdateSettings:x,onOpenChange:y}){const{prefix:m}=_.useScopedStyles(),g=s.useRef(null),v=s.useRef(null),b=s.useRef(0),E=s.useRef(null),f=s.useRef(c),w=s.useMemo(()=>i$(m),[m]),[G,X]=s.useState(!1),[M,T]=s.useState(!1),[N,q]=s.useState(!1),$=Nw(r),I=s.useMemo(()=>new Set(d),[d]),W=Vt=>!!(Vt&&I.has(Vt)),C=!!(t&&!i&&$==="open"&&!W("open"))||!(t&&!i)&&G,L=!W("compact")&&!W("onScroll"),z=!t||!!i&&!n,S=o&&o!=="default"?o:void 0,K=L&&$==="compact"?"compact":"default",[k,H]=s.useState(K),[j,ne]=s.useState(!1),oe=!n;K!==k&&(H(K),oe&&ne(!0));const R=vp(e),{logo:ce,logoMaxHeight:D=120/1440,logoPosition:le="left",panelHeight:ie=60/1440,backgroundColor:we="#b3b3b3",logoColor:Ie="#000000",position:xe,horizontalAlign:pe,verticalAlign:Y,iconColor:ae="#000000",showIcon:se="on",iconSize:Re=16/1440,linkColor:$e="#000000",openLinkColor:Me="#000000",compactIconColor:ve="#000000",compactCloseButtonColor:be="#000000",compactLinkColor:Ce="#000000",compactLogoColor:h="#000000",compactBackgroundColor:U="#ffffff",compactLogoMaxHeight:Z=120/1440,compactLogoPosition:te,compactPanelHeight:me=60/1440,compactShowIcon:B="on",compactIconSize:P=16/1440,compactNavTextWidth:Q,compactNavTextPosition:ee,compactNavTextOffset:de,compactNavGap:V,compactNavPaddingLeft:Pe=10/1440,compactNavPaddingRight:he=10/1440,compactFontFamily:J,compactFontSettings:Ne,compactFontSize:Be,compactLineHeight:at,compactLetterSpacing:Ue=0,compactWordSpacing:nt=0,compactTextAlign:Ze="left",compactTextAppearance:Xe,openLogoColor:fe="#000000",menuBackgroundColor:He="#ffffff",overlayColor:We="rgba(0, 0, 0, 0.45)",closeButtonColor:Qe="#000000",effect:ye="fade",textWidth:_e=280/1440,navTextWidth:Ge,navTextPosition:et="center",navTextOffset:mt=0,gap:rt=0,navGap:Oe,navPaddingLeft:Fe=10/1440,navPaddingRight:Ke=10/1440,textPaddingLeft:it=10/1440,textPaddingRight:De=10/1440,textPaddingTop:qe=10/1440,textPaddingBottom:ut=10/1440,fontFamily:ge,fontSettings:ke,fontSize:ot,lineHeight:gt,letterSpacing:je=0,wordSpacing:vt=0,textAlign:It="left",textAppearance:kt,openFontFamily:wt,openFontSettings:Dt,openFontSize:Bt,openLineHeight:Xt,openLetterSpacing:qt,openWordSpacing:Lt,openTextAlign:Ot,openTextAppearance:nn,stateOverrides:xt,link:Te}=R,{horizontalAlign:Ve,verticalAlign:st}=qw({position:xe,horizontalAlign:pe,verticalAlign:Y}),lt=K==="compact",bt=lt?Z:D,Tt=_w(lt?te:le),tt=lt?me:ie,Rt=lt?P:Re,Mt=lt?Q:Ge,At=Hw(lt?ee:et),jt=(lt?de:mt)??0,Ut=lt?V:Oe,Et=lt?Pe:Fe,Nt=lt?he:Ke,_t=Mt??_e,ht=C||(lt?B:se)!=="off",A=_.buildColorVars(m,{iconColor:ae,closeButtonColor:Qe,linkColor:$e,openLinkColor:Me,compactIconColor:ve,compactCloseButtonColor:be,compactLinkColor:Ce,compactLogoColor:h,compactBackgroundColor:U,openLogoColor:fe,menuBackgroundColor:He,overlayColor:We,backgroundColor:we,logoColor:Ie},Qw,e$,xt),Le=ud(lt?{fontFamily:J,fontSettings:Ne,fontSize:Be,lineHeight:at,letterSpacing:Ue,wordSpacing:nt,textAlign:Ze,textAppearance:Xe}:{fontFamily:ge,fontSettings:ke,fontSize:ot,lineHeight:gt,letterSpacing:je,wordSpacing:vt,textAlign:It,textAppearance:kt}),Ae=ud({fontFamily:wt,fontSettings:Dt,fontSize:Bt,lineHeight:Xt,letterSpacing:qt,wordSpacing:Lt,textAlign:Ot,textAppearance:nn},Le),ze=pd(m,Le,t),pt=pd(m,Ae,t),zt={...pt.css,whiteSpace:"pre-wrap"},ft=pt.className,St=Vt=>_.scalingValue(Vt,t),Kt=Ut??rt,Ht=Math.max(Et,ho),sn=Math.max(Nt,ho),gn=Math.max(0,1-Rt),Xn=Math.max(0,1-Rt),yn=n??!1,qn=yn&&!C,Mi=s.useMemo(()=>yp({textPaddingLeft:it,textPaddingRight:De,textPaddingTop:qe,textPaddingBottom:ut,fontSize:Ae.fontSize}),[it,De,qe,ut,Ae.fontSize]),Qi=Vt=>{const Yt=a.jsx("span",{className:ft,style:zt,children:md(Vt)});return yd(m,Yt,_e,yn,St)},Go={...Zw(Mi,t),alignItems:n$[Ve],justifyContent:t$[st]},un=s.useRef(e),An=s.useRef(c);s.useEffect(()=>{if(!x||!t){un.current=e,An.current=c;return}if(An.current!==c){un.current=e,An.current=c;const Fi=hd(e);Fi!==e&&x(Fi);return}const Vt=hd(e),Yt=un.current,vn=Yt!==e,Nn=vn?Yw(Vt,Yt):Vt;un.current=e;const Kn=Vt!==e,di=vn&&Uw(Vt,Nn);!Kn&&!di||x(Nn)},[e,x,t,c]);const In=_.scalingValue(Rt,t),Un={width:In,height:In,minWidth:In,minHeight:In,maxWidth:In,maxHeight:In},eo={...ze.css,textDecoration:"none"},Xo=ze.className,to=(ce==null?void 0:ce.mode)!=="Off",Se=(ce==null?void 0:ce.icon)??"",Je=a$(Se),F=St(Math.min(bt,tt)),ue=!!(to&&Se&&Tt==="right")?"left":"right",Ee=Array.isArray(Te)?Te:[],Ye=[K!=="default"?`${m}-state-${K}`:"",$==="open"?`${m}-state-open`:"",S&&S!==K&&S!==$?`${m}-state-${S}`:""].filter(Boolean).join(" "),dt=t&&!i?`${m}-editor`:"",Pt=z?`${m}-interactive`:"",Wt=oe&&(K!==k||j)?`${m}-nav-state-anim`:"",rn=C?`${m}-open`:"",on=s.useMemo(()=>p$(g.current),[M,C,c]),Fn=()=>{X(!1)},ci=(Vt,Yt)=>{c$(Vt,Fn,{isEditor:t,isPreviewMode:i,item:Yt,pages:u,onLinkNavigate:p})},no=()=>{t&&!i||X(Vt=>!Vt)},Ai=()=>{E.current!==null&&(window.clearTimeout(E.current),E.current=null)};s.useEffect(()=>{if(!j)return;const Vt=window.setTimeout(()=>{ne(!1)},en);return()=>window.clearTimeout(Vt)},[j,K]),s.useEffect(()=>{if(C){Ai(),T(!0);return}return b.current+=1,q(!1),Ai(),E.current=window.setTimeout(()=>{E.current=null,T(!1)},Sn),Ai},[C]),s.useLayoutEffect(()=>{f.current!==c&&(f.current=c,b.current+=1,Ai(),X(!1),q(!1),T(!1))},[c]),s.useLayoutEffect(()=>{var vn;if(!M||!C)return;const Vt=b.current+1;b.current=Vt,q(!1),(vn=v.current)==null||vn.offsetHeight;const Yt=requestAnimationFrame(()=>{b.current===Vt&&q(!0)});return()=>{cancelAnimationFrame(Yt)}},[M,C]),s.useEffect(()=>{y==null||y(C)},[C,y]),s.useEffect(()=>{if(!C)return;const Vt=Yt=>{Yt.key==="Escape"&&(t&&i||Fn())};return window.addEventListener("keydown",Vt),()=>window.removeEventListener("keydown",Vt)},[C,t,i]),s.useEffect(()=>{t&&!i&&$!=="open"&&X(!1)},[t,i,$]),s.useEffect(()=>{i&&X(!1)},[i]);const kr=yn&&C,Wa=Vt=>Ee.filter(Yt=>zw(Yt,c)).map((Yt,vn)=>{const{label:Nn,href:Kn,target:di}=js(Yt,u),Fi=Kn?a.jsx("a",{href:Kn,target:di,rel:di==="_blank"?"noopener noreferrer":void 0,className:`${Vt} ${m}-has-href`,onClick:Oa=>ci(Oa,Yt),children:Qi(Nn)}):a.jsx("span",{className:Vt,children:Qi(Nn)});return a.jsxs(s.Fragment,{children:[vn>0&&a.jsx("div",{"data-controls":kr?"gap":void 0,"data-controls-axis":"y",className:kr?`${m}-gap-control`:void 0,style:{height:St(rt)}}),Fi]},vn)}),Rp=M?a.jsxs("div",{ref:v,"data-selection":"none",className:[`${m}-lightbox`,`${m}-full-lightbox ${m}-effect-${ye}`,N?`${m}-lightbox-active`:"",`${m}-lightbox-editor`,n?`${m}-lightbox-edit-mode`:"",Pt,Ye].filter(Boolean).join(" "),style:{...A,...on},"aria-hidden":!N,children:[a.jsx("button",{type:"button",className:`${m}-backdrop`,onClick:Fn,"aria-label":"Close menu"}),a.jsxs("nav",{className:`${m}-panel`,style:Go,"aria-label":"Menu",children:[yn&&Jw(m,Mi,Ae.fontSize,St),Wa(`${m}-link`)]})]}):null,kp=()=>a.jsx("button",{type:"button",className:`${m}-toggle`,onClick:no,"aria-expanded":C,"aria-label":C?"Close menu":"Open menu",children:a.jsx(jw,{className:`${m}-icon`,lineClassName:`${m}-icon-line`})}),Er=Vt=>{const Yt=Vt==="left",vn=Yt?Et:Nt,Nn=Yt?Ht:sn,Kn=Yt?gn:Xn,di=lt?Yt?"compactNavPaddingLeft":"compactNavPaddingRight":Yt?"navPaddingLeft":"navPaddingRight";return a.jsx("div",{className:Yt?`${m}-nav-padding-left`:`${m}-nav-padding-right`,style:{width:St(vn),flexShrink:0},children:qn?a.jsx("div",{"data-controls":di,"data-controls-axis":"x","data-controls-variant":"column-padding",...Yt?{}:{"data-controls-reverse":""},"data-controls-min":"0","data-controls-max-fraction":String(Kn),className:`${m}-control-anchor`,style:{top:0,[Yt?"left":"right"]:0,width:St(Nn),height:"100%"}}):null})},Ep=(Vt,Yt)=>{const{label:vn,href:Nn,target:Kn}=js(Vt,u),di=a.jsx("span",{className:Xo,style:eo,children:md(vn)}),Fi=yd(m,di,_t,qn,St),Oa=Nn?a.jsx("a",{href:Nn,target:Kn,rel:Kn==="_blank"?"noopener noreferrer":void 0,className:`${m}-nav-link ${m}-has-href`,onClick:Fp=>ci(Fp,Vt),children:Fi}):a.jsx("span",{className:`${m}-nav-link`,children:Fi});return a.jsxs(s.Fragment,{children:[Yt>0&&a.jsx("div",{"data-controls":qn?lt?"compactNavGap":"navGap":void 0,"data-controls-axis":"x",className:qn?`${m}-gap-control ${m}-nav-gap-control`:`${m}-nav-gap-control}`,style:{width:St(Kt),flexShrink:0}}),Oa]},Yt)},Mp={...A,height:_.scalingValue(tt,t),minHeight:_.scalingValue(tt,t),[`--${m}-panel-height`]:_.scalingValue(tt,t)},Ap=l&&K==="default"&&$!=="open"&&!i?St(ie+Mw):"0px";return a.jsxs("div",{ref:g,className:`${m}-root ${Ye} ${dt} ${Pt} ${Wt}`.trim(),style:{width:"100%",height:"100%",lineHeight:0,fontSize:0,marginTop:Ap,...A},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:w}}),a.jsx("div",{className:`${m}-nav-slide`,children:a.jsxs("div",{className:`${m}-nav-bar`,style:Mp,children:[to&&Se?a.jsxs("div",{className:`${m}-nav-logo ${m}-nav-logo-${Tt}`,children:[Tt==="left"?Er("left"):null,a.jsxs("div",{className:`${m}-nav-logo-inner${Je?` ${m}-nav-logo-tinted`:""}`,style:{height:F,...Je?{[`--${m}-logo-image`]:o$(Se)}:{}},children:[a.jsx("img",{src:Se,alt:"",className:`${m}-nav-logo-img`}),Je?a.jsx("span",{className:`${m}-nav-logo-tint`,"aria-hidden":"true"}):null]}),Tt==="right"?Er("right"):null]}):null,a.jsx("nav",{className:`${m}-nav-links ${m}-nav-links-${At}`,style:{transform:Ww(At,jt,t)},"aria-label":"Navigation",children:a.jsx("div",{className:`${m}-nav-links-inner`,children:Ee.filter(Vt=>Dw(Vt,K,c)).map((Vt,Yt)=>Ep(Vt,Yt))})})]})}),Rp,a.jsxs("div",{className:`${m}-nav-toggle-wrap ${m}-nav-toggle-wrap-${ue}`,children:[ue==="left"?Er("left"):null,ht?a.jsx("div",{className:`${m}-root ${rn}`.trim(),style:Un,children:kp()}):null,ue==="right"?Er("right"):null]})]})}const g$=`import { Fragment, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
24553
+ `}function o$(e){return`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`}function r$(e){const t=e.trim().toLowerCase();return t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")?!0:t.includes(".svg")}function a$(e){const t=r$(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 s$(e){const t=e.indexOf("#");if(t===-1)return"";try{return decodeURIComponent(e.slice(t+1))}catch{return e.slice(t+1)}}function l$(e){if(!e||e.startsWith("#"))return!0;try{return new URL(e,window.location.href).pathname===window.location.pathname}catch{return!1}}function fd(e){if(!e)return!1;const t=document.getElementById(e),n=document.querySelector(`[data-section-id="${CSS.escape(e)}"]`),i=t??n;return i instanceof HTMLElement?(i.scrollIntoView({behavior:"smooth",block:"start"}),!0):!1}function c$(e,t,n={}){const{isEditor:i,isPreviewMode:o,item:r,pages:l,onLinkNavigate:c}=n,d=e.currentTarget.getAttribute("href")??"",u=s$(d),p=e.currentTarget.target==="_blank";if(r&&c){e.preventDefault(),e.stopPropagation();const y=js(r,l),v=hp(r);c({mode:v.type==="url"?"url":"page",href:y.href||d,page:v.type==="page"?v.value:void 0,url:v.type==="url"?v.value:void 0,anchor:v.type==="anchor"?v.value.replace(/^#/,""):(v.anchor??"").replace(/^#/,""),target:y.target}),t();return}if(i){e.preventDefault(),fd(u),t();return}!p&&u&&l$(d)&&fd(u)&&e.preventDefault(),t()}const d$=["--cntrl-article-width","--cntrl-article-top","--cntrl-article-left","--cntrl-viewport-height"];function u$(e){let t=e;for(;t;){if(getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim())return t;t=t.parentElement}return e}function p$(e){const t={},n=u$(e);if(!n)return t;const i=getComputedStyle(n);for(const o of d$){const r=i.getPropertyValue(o).trim();r&&(t[o]=r)}return t}function yd(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 m$({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}){const{prefix:m}=F.useScopedStyles(),g=s.useRef(null),x=s.useRef(null),b=s.useRef(0),E=s.useRef(null),f=s.useRef(d),w=s.useMemo(()=>i$(m),[m]),[G,X]=s.useState(!1),[k,L]=s.useState(!1),[A,U]=s.useState(!1),$=Nw(r),P=s.useMemo(()=>new Set(c),[c]),H=Vt=>!!(Vt&&P.has(Vt)),C=!!(t&&!i&&$==="open"&&!H("open"))||!(t&&!i)&&G,T=!H("compact")&&!H("onScroll"),B=!t||!!i&&!n,S=o&&o!=="default"?o:void 0,K=T&&$==="compact"?"compact":"default",[R,_]=s.useState(K),[j,oe]=s.useState(!1),re=!n;K!==R&&(_(K),re&&oe(!0));const O=vp(e),{logo:ie,logoMaxHeight:D=120/1440,logoPosition:le="left",panelHeight:ee=60/1440,backgroundColor:ve="#b3b3b3",logoColor:Ie="#000000",position:be,horizontalAlign:pe,verticalAlign:Y,iconColor:se="#000000",showIcon:xe="on",iconSize:Se=16/1440,linkColor:Ce="#000000",openLinkColor:Ae="#000000",compactIconColor:fe="#000000",compactCloseButtonColor:we="#000000",compactLinkColor:Te="#000000",compactLogoColor:h="#000000",compactBackgroundColor:q="#ffffff",compactLogoMaxHeight:Z=120/1440,compactLogoPosition:te,compactPanelHeight:ue=60/1440,compactShowIcon:z="on",compactIconSize:I=16/1440,compactNavTextWidth:Q,compactNavTextPosition:ne,compactNavTextOffset:de,compactNavGap:V,compactNavPaddingLeft:Pe=10/1440,compactNavPaddingRight:he=10/1440,compactFontFamily:J,compactFontSettings:He,compactFontSize:We,compactLineHeight:ot,compactLetterSpacing:qe=0,compactWordSpacing:nt=0,compactTextAlign:tt="left",compactTextAppearance:Ve,openLogoColor:ge="#000000",menuBackgroundColor:_e="#ffffff",overlayColor:je="rgba(0, 0, 0, 0.45)",closeButtonColor:Ze="#000000",effect:ye="fade",textWidth:Ne=280/1440,navTextWidth:Ke,navTextPosition:Qe="center",navTextOffset:st=0,gap:rt=0,navGap:De,navPaddingLeft:Me=10/1440,navPaddingRight:gt=10/1440,textPaddingLeft:ze=10/1440,textPaddingRight:Oe=10/1440,textPaddingTop:Xe=10/1440,textPaddingBottom:lt=10/1440,fontFamily:me,fontSettings:Re,fontSize:it,lineHeight:ht,letterSpacing:Ge=0,wordSpacing:St=0,textAlign:Pt="left",textAppearance:kt,openFontFamily:$t,openFontSettings:jt,openFontSize:Bt,openLineHeight:Xt,openLetterSpacing:qt,openWordSpacing:It,openTextAlign:Dt,openTextAppearance:on,stateOverrides:xt,link:ft}=O,{horizontalAlign:Ee,verticalAlign:et}=qw({position:be,horizontalAlign:pe,verticalAlign:Y}),Je=K==="compact",dt=Je?Z:D,Tt=_w(Je?te:le),vt=Je?ue:ee,ut=Je?I:Se,_t=Je?Q:Ke,Mt=Hw(Je?ne:Qe),Ht=(Je?de:st)??0,Ut=Je?V:De,Et=Je?Pe:Me,Wt=Je?he:gt,At=_t??Ne,pt=C||(Je?z:xe)!=="off",N=F.buildColorVars(m,{iconColor:se,closeButtonColor:Ze,linkColor:Ce,openLinkColor:Ae,compactIconColor:fe,compactCloseButtonColor:we,compactLinkColor:Te,compactLogoColor:h,compactBackgroundColor:q,openLogoColor:ge,menuBackgroundColor:_e,overlayColor:je,backgroundColor:ve,logoColor:Ie},Qw,e$,xt),Le=ud(Je?{fontFamily:J,fontSettings:He,fontSize:We,lineHeight:ot,letterSpacing:qe,wordSpacing:nt,textAlign:tt,textAppearance:Ve}:{fontFamily:me,fontSettings:Re,fontSize:it,lineHeight:ht,letterSpacing:Ge,wordSpacing:St,textAlign:Pt,textAppearance:kt}),Be=ud({fontFamily:$t,fontSettings:jt,fontSize:Bt,lineHeight:Xt,letterSpacing:qt,wordSpacing:It,textAlign:Dt,textAppearance:on},Le),Fe=pd(m,Le,t),mt=pd(m,Be,t),Nt={...mt.css,whiteSpace:"pre-wrap"},yt=mt.className,wt=Vt=>F.scalingValue(Vt,t),Kt=Ut??rt,zt=Math.max(Et,ho),sn=Math.max(Wt,ho),ln=Math.max(0,1-ut),qn=Math.max(0,1-ut),yn=n??!1,Un=yn&&!C,Mi=s.useMemo(()=>yp({textPaddingLeft:ze,textPaddingRight:Oe,textPaddingTop:Xe,textPaddingBottom:lt,fontSize:Be.fontSize}),[ze,Oe,Xe,lt,Be.fontSize]),Qi=Vt=>{const Yt=a.jsx("span",{className:yt,style:Nt,children:md(Vt)});return yd(m,Yt,Ne,yn,wt)},Go={...Zw(Mi,t),alignItems:n$[Ee],justifyContent:t$[et]},pn=s.useRef(e),An=s.useRef(d);s.useEffect(()=>{if(!y||!t){pn.current=e,An.current=d;return}if(An.current!==d){pn.current=e,An.current=d;const Fi=hd(e);Fi!==e&&y(Fi);return}const Vt=hd(e),Yt=pn.current,vn=Yt!==e,Nn=vn?Yw(Vt,Yt):Vt;pn.current=e;const Yn=Vt!==e,di=vn&&Uw(Vt,Nn);!Yn&&!di||y(Nn)},[e,y,t,d]);const In=F.scalingValue(ut,t),Kn={width:In,height:In,minWidth:In,minHeight:In,maxWidth:In,maxHeight:In},eo={...Fe.css,textDecoration:"none"},Xo=Fe.className,to=(ie==null?void 0:ie.mode)!=="Off",$e=(ie==null?void 0:ie.icon)??"",Ye=a$($e),M=wt(Math.min(dt,vt)),ce=!!(to&&$e&&Tt==="right")?"left":"right",ke=Array.isArray(ft)?ft:[],Ue=[K!=="default"?`${m}-state-${K}`:"",$==="open"?`${m}-state-open`:"",S&&S!==K&&S!==$?`${m}-state-${S}`:""].filter(Boolean).join(" "),ct=t&&!i?`${m}-editor`:"",Rt=B?`${m}-interactive`:"",Ot=re&&(K!==R||j)?`${m}-nav-state-anim`:"",rn=C?`${m}-open`:"",nn=s.useMemo(()=>p$(g.current),[k,C,d]),Fn=()=>{X(!1)},ci=(Vt,Yt)=>{c$(Vt,Fn,{isEditor:t,isPreviewMode:i,item:Yt,pages:u,onLinkNavigate:p})},no=()=>{t&&!i||X(Vt=>!Vt)},Ai=()=>{E.current!==null&&(window.clearTimeout(E.current),E.current=null)};s.useEffect(()=>{if(!j)return;const Vt=window.setTimeout(()=>{oe(!1)},en);return()=>window.clearTimeout(Vt)},[j,K]),s.useEffect(()=>{if(C){Ai(),L(!0);return}return b.current+=1,U(!1),Ai(),E.current=window.setTimeout(()=>{E.current=null,L(!1)},Sn),Ai},[C]),s.useLayoutEffect(()=>{f.current!==d&&(f.current=d,b.current+=1,Ai(),X(!1),U(!1),L(!1))},[d]),s.useLayoutEffect(()=>{var vn;if(!k||!C)return;const Vt=b.current+1;b.current=Vt,U(!1),(vn=x.current)==null||vn.offsetHeight;const Yt=requestAnimationFrame(()=>{b.current===Vt&&U(!0)});return()=>{cancelAnimationFrame(Yt)}},[k,C]),s.useEffect(()=>{v==null||v(C)},[C,v]),s.useEffect(()=>{if(!C)return;const Vt=Yt=>{Yt.key==="Escape"&&(t&&i||Fn())};return window.addEventListener("keydown",Vt),()=>window.removeEventListener("keydown",Vt)},[C,t,i]),s.useEffect(()=>{t&&!i&&$!=="open"&&X(!1)},[t,i,$]),s.useEffect(()=>{i&&X(!1)},[i]);const kr=yn&&C,Wa=Vt=>ke.filter(Yt=>zw(Yt,d)).map((Yt,vn)=>{const{label:Nn,href:Yn,target:di}=js(Yt,u),Fi=Yn?a.jsx("a",{href:Yn,target:di,rel:di==="_blank"?"noopener noreferrer":void 0,className:`${Vt} ${m}-has-href`,onClick:Oa=>ci(Oa,Yt),children:Qi(Nn)}):a.jsx("span",{className:Vt,children:Qi(Nn)});return a.jsxs(s.Fragment,{children:[vn>0&&a.jsx("div",{"data-controls":kr?"gap":void 0,"data-controls-axis":"y",className:kr?`${m}-gap-control`:void 0,style:{height:wt(rt)}}),Fi]},vn)}),Rp=k?a.jsxs("div",{ref:x,"data-selection":"none",className:[`${m}-lightbox`,`${m}-full-lightbox ${m}-effect-${ye}`,A?`${m}-lightbox-active`:"",`${m}-lightbox-editor`,n?`${m}-lightbox-edit-mode`:"",Rt,Ue].filter(Boolean).join(" "),style:{...N,...nn},"aria-hidden":!A,children:[a.jsx("button",{type:"button",className:`${m}-backdrop`,onClick:Fn,"aria-label":"Close menu"}),a.jsxs("nav",{className:`${m}-panel`,style:Go,"aria-label":"Menu",children:[yn&&Jw(m,Mi,Be.fontSize,wt),Wa(`${m}-link`)]})]}):null,kp=()=>a.jsx("button",{type:"button",className:`${m}-toggle`,onClick:no,"aria-expanded":C,"aria-label":C?"Close menu":"Open menu",children:a.jsx(jw,{className:`${m}-icon`,lineClassName:`${m}-icon-line`})}),Er=Vt=>{const Yt=Vt==="left",vn=Yt?Et:Wt,Nn=Yt?zt:sn,Yn=Yt?ln:qn,di=Je?Yt?"compactNavPaddingLeft":"compactNavPaddingRight":Yt?"navPaddingLeft":"navPaddingRight";return a.jsx("div",{className:Yt?`${m}-nav-padding-left`:`${m}-nav-padding-right`,style:{width:wt(vn),flexShrink:0},children:Un?a.jsx("div",{"data-controls":di,"data-controls-axis":"x","data-controls-variant":"column-padding",...Yt?{}:{"data-controls-reverse":""},"data-controls-min":"0","data-controls-max-fraction":String(Yn),className:`${m}-control-anchor`,style:{top:0,[Yt?"left":"right"]:0,width:wt(Nn),height:"100%"}}):null})},Ep=(Vt,Yt)=>{const{label:vn,href:Nn,target:Yn}=js(Vt,u),di=a.jsx("span",{className:Xo,style:eo,children:md(vn)}),Fi=yd(m,di,At,Un,wt),Oa=Nn?a.jsx("a",{href:Nn,target:Yn,rel:Yn==="_blank"?"noopener noreferrer":void 0,className:`${m}-nav-link ${m}-has-href`,onClick:Fp=>ci(Fp,Vt),children:Fi}):a.jsx("span",{className:`${m}-nav-link`,children:Fi});return a.jsxs(s.Fragment,{children:[Yt>0&&a.jsx("div",{"data-controls":Un?Je?"compactNavGap":"navGap":void 0,"data-controls-axis":"x",className:Un?`${m}-gap-control ${m}-nav-gap-control`:`${m}-nav-gap-control}`,style:{width:wt(Kt),flexShrink:0}}),Oa]},Yt)},Mp={...N,height:F.scalingValue(vt,t),minHeight:F.scalingValue(vt,t),[`--${m}-panel-height`]:F.scalingValue(vt,t)},Ap=l&&K==="default"&&$!=="open"&&!i?wt(ee+Mw):"0px";return a.jsxs("div",{ref:g,className:`${m}-root ${Ue} ${ct} ${Rt} ${Ot}`.trim(),style:{width:"100%",height:"100%",lineHeight:0,fontSize:0,marginTop:Ap,...N},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:w}}),a.jsx("div",{className:`${m}-nav-slide`,children:a.jsxs("div",{className:`${m}-nav-bar`,style:Mp,children:[to&&$e?a.jsxs("div",{className:`${m}-nav-logo ${m}-nav-logo-${Tt}`,children:[Tt==="left"?Er("left"):null,a.jsxs("div",{className:`${m}-nav-logo-inner${Ye?` ${m}-nav-logo-tinted`:""}`,style:{height:M,...Ye?{[`--${m}-logo-image`]:o$($e)}:{}},children:[a.jsx("img",{src:$e,alt:"",className:`${m}-nav-logo-img`}),Ye?a.jsx("span",{className:`${m}-nav-logo-tint`,"aria-hidden":"true"}):null]}),Tt==="right"?Er("right"):null]}):null,a.jsx("nav",{className:`${m}-nav-links ${m}-nav-links-${Mt}`,style:{transform:Ww(Mt,Ht,t)},"aria-label":"Navigation",children:a.jsx("div",{className:`${m}-nav-links-inner`,children:ke.filter(Vt=>Dw(Vt,K,d)).map((Vt,Yt)=>Ep(Vt,Yt))})})]})}),Rp,a.jsxs("div",{className:`${m}-nav-toggle-wrap ${m}-nav-toggle-wrap-${ce}`,children:[ce==="left"?Er("left"):null,pt?a.jsx("div",{className:`${m}-root ${rn}`.trim(),style:Kn,children:kp()}):null,ce==="right"?Er("right"):null]})]})}const g$=`import { Fragment, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
24552
24554
  import { CommonComponentProps } from '../props';
24553
24555
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
24554
24556
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -26847,7 +26849,7 @@ export function Burger({
26847
26849
  </div>
26848
26850
  );
26849
26851
  }
26850
- `;function Qo(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Bi={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 fi(e,t){return e?`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`:t}function Hl(e){return{[fi(e,"fontFamily")]:{type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},[fi(e,"fontSettings")]:{...Bi.fontSettings,scope:"common",title:""},[fi(e,"fontSize")]:{...Bi.fontSize,scope:"layout",title:""},[fi(e,"lineHeight")]:{...Bi.lineHeight,scope:"layout",title:""},[fi(e,"letterSpacing")]:{...Bi.letterSpacing,scope:"layout",title:""},[fi(e,"wordSpacing")]:{...Bi.wordSpacing,scope:"layout",title:""},[fi(e,"textAlign")]:{...Bi.textAlign,scope:"layout",title:""},[fi(e,"textAppearance")]:{...Bi.textAppearance,scope:"layout",title:""}}}const h$=Hl(""),f$=Hl("open"),y$=Hl("compact"),v$=["__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"],x$=["__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"],b$=["__componentName__",{type:"row",items:["textWidth","effect"]},"position","openFontFamily","openFontSettings",{type:"row",items:["openFontSize","openLineHeight","openLetterSpacing","openWordSpacing"]},"openTextAlign","openTextAppearance"],Zn={textTransform:"none",textDecoration:"none",fontVariant:"normal"},xs={fontWeight:400,fontStyle:"normal"},Kr={d:"Always",t:"Open Only",m:"Open Only"},S$=["left-top","center-top","right-top","left-center","center","right-center","left-bottom","center-bottom","right-bottom"],w$=["iconColor","logoColor","closeButtonColor","linkColor","backgroundColor"],$$={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:"Link Default",titleByState:{default:"Link Default",hover:"Link 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"}},compactCloseButtonColor:{type:"string",scope:"common",title:"Close Default",titleByState:{compact:"Close Default","compact-hover":"Close Hover"},display:{type:"palette-color-picker"}},compactLinkColor:{type:"string",scope:"common",title:"Link Default",titleByState:{compact:"Link Default","compact-hover":"Link 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:"Link Default",titleByState:{open:"Link Default","open-hover":"Link 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:{default:"Close Default",hover:"Close Hover",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"]}},textWidth:{type:"number",scope:"layout",title:"Text 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:[...S$]}},stateOverrides:{type:"object",scope:"common"},gap:Qo("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:Qo("Text padding left"),textPaddingRight:Qo("Text padding right"),textPaddingTop:Qo("Text padding top"),textPaddingBottom:Qo("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}},...h$,...f$,...y$},defaults:{link:[{link:{type:"page",value:"",target:"self"},label:"Home",showIn:Kr},{link:{type:"page",value:"",target:"self"},label:"Works",showIn:Kr},{link:{type:"page",value:"",target:"self"},label:"About",showIn:Kr},{link:{type:"page",value:"",target:"self"},label:"Contact",showIn:Kr}],logo:{mode:"On",icon:"https://cdn.cntrl.site/component-assets/hamburger-logo.svg"},backgroundColor:"#ffffff",logoColor:"#000000",iconColor:"#000000",linkColor:"#000000",openLinkColor:"#000000",compactIconColor:"#000000",compactCloseButtonColor:"#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:xs,textAlign:"left",openFontFamily:"Goudy Bookletter 1911",openFontSettings:xs,openTextAlign:"left",compactFontFamily:"Goudy Bookletter 1911",compactFontSettings:xs,compactTextAlign:"left",stateOverrides:{hover:{linkColor:"#666666",iconColor:"#666666",logoColor:"#666666",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:"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,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:Zn,openFontSize:34/375,openLineHeight:20/375,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:Zn,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:Zn},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,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:Zn,openFontSize:75/768,openLineHeight:20/768,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:Zn,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:Zn},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,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:Zn,textAlign:"center",openFontSize:90/1440,openLineHeight:16/1440,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:Zn,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:Zn,compactTextAlign:"center"}},layout:["__componentName__","link","logo","logoMaxHeight","logoPosition","panelHeight","backgroundColor","logoColor","iconColor","showIcon","iconSize","linkColor","openLinkColor","compactShowIcon","compactIconColor","compactCloseButtonColor","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:v$},{id:"compact",icon:"compact",title:"Compact",tooltip:"Compact State",layout:x$,availableWhen:{navigationPosition:["switch"]}},{id:"open",icon:"open",title:"Open",tooltip:"Open State",layout:b$},{id:"links",icon:"content",title:"Links",tooltip:"Link Settings",layout:["__componentName__","link"]}],paletteBookmark:{items:[...w$],panelIds:["default","compact","open"],stateItems:{default:["iconColor","logoColor","closeButtonColor","linkColor","backgroundColor"],hover:["iconColor","logoColor","closeButtonColor","linkColor"],compact:["compactIconColor","compactLogoColor","compactCloseButtonColor","compactLinkColor","compactBackgroundColor"],"compact-hover":["compactIconColor","compactLogoColor","compactCloseButtonColor","compactLinkColor"],open:["closeButtonColor","openLogoColor","openLinkColor","menuBackgroundColor","overlayColor"],"open-hover":["closeButtonColor","openLogoColor","openLinkColor"]}},states:["default","hover"],statePanels:["default","compact","open"]},C$={element:m$,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:$$,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"}},vd=120,xd=3,T$=.12,Wl={x:0,y:0,width:100,height:100};function $o(e,t){return e.map(n=>n.map(i=>({x:(i.x-t.x)/t.width,y:(i.y-t.y)/t.height})))}function xa(e){return e<0?0:e>1?1:e}function bd(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 L$(e,t){let n=1/0,i=1/0,o=-1/0,r=-1/0;for(const c of e)for(const u of c){const p=u.x*t.width,x=u.y*t.height;p<n&&(n=p),p>o&&(o=p),x<i&&(i=x),x>r&&(r=x)}const l=o-n,d=r-i;return!isFinite(l)||!isFinite(d)||l<=0||d<=0?null:{x:n,y:i,width:l,height:d}}function P$(e){return e.map(([t,n])=>({x:t,y:n}))}function bs(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const d of e)for(const c of d)c.x<t&&(t=c.x),c.x>i&&(i=c.x),c.y<n&&(n=c.y),c.y>o&&(o=c.y);const r=i-t,l=o-n;return!isFinite(r)||!isFinite(l)||r<=0||l<=0?e:e.map(d=>d.map(c=>({x:(c.x-t)/r,y:(c.y-n)/l})))}function I$(e,t){const n=[];for(const o of e)for(let r=0;r<o.length;r+=1){const l=o[r],d=o[(r+1)%o.length];(l.y<=t&&d.y>t||d.y<=t&&l.y>t)&&n.push(l.x+(t-l.y)/(d.y-l.y)*(d.x-l.x))}n.sort((o,r)=>o-r);const i=[];for(let o=0;o+1<n.length;o+=2){const r=xa(n[o]),l=xa(n[o+1]);l>r&&i.push({x0:r,x1:l})}return R$(i)}function R$(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 k$(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 E$(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 M$(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 A$(e,t,n,i){let o=null;for(let r=0;r<xd;r+=1){const l=xa(t+(n-t)*r/Math.max(1,xd-1)),d=I$(e,l),c=i==="avoid"?E$(d):d;if(o=o===null?c:k$(o,c),o.length===0)return[]}return o??[]}function Sd(e,t="stretch",n=Wl){const i=e.trim();if(!i)return null;if(/^[Mm]/.test(i)){const l=Ii(i),d=br(l);if(d.length)return t==="viewbox"?$o(d,n):bs(d);if(typeof document>"u")return null;const c=i.split(/(?=[Mm])/).map(x=>x.trim()).filter(Boolean),u=document.createElementNS("http://www.w3.org/2000/svg","svg"),p=[];for(const x of c){const y=document.createElementNS("http://www.w3.org/2000/svg","path");y.setAttribute("d",x),u.appendChild(y);let m=0;try{m=y.getTotalLength()}catch{m=0}if(!m)continue;const g=[];for(let v=0;v<vd;v+=1){const b=y.getPointAtLength(v/vd*m);g.push({x:b.x,y:b.y})}p.push(g)}return p.length?t==="viewbox"?$o(p,n):bs(p):null}const o=i.split(/[\s,]+/).map(Number).filter(l=>!Number.isNaN(l));if(o.length<6)return null;const r=[];for(let l=0;l+1<o.length;l+=2)r.push({x:o[l],y:o[l+1]});return t==="viewbox"?$o([r],n):bs([r])}const Ol={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"},Vs="0 0 100 100",ba=100,Gs=16,F$=12,N$=16,Ss=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,_$=/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g,wd=Math.PI/4,H$=8,W$=Math.PI/18,O$=8,fo=24,yo=[];function D$(){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 ws(e,t){return ln(e,n=>({x:(n.x-t.x)/t.width,y:(n.y-t.y)/t.height}))}function z$(e){const t=$i(e),n=t.maxX-t.minX,i=t.maxY-t.minY;return!isFinite(n)||!isFinite(i)||n<=0||i<=0?e:ln(e,o=>({x:(o.x-t.minX)/n,y:(o.y-t.minY)/i}))}function B$(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 ln(e,r=>({x:(i+r.x*n)/t.width,y:(o+r.y*n)/t.height}))}function $d(e,t,n,i,o,r){let l=[];if(t&&t.length)l=ws(t,i);else{const d=e.trim();if(d&&/^[Mm]/.test(d)){const c=Ii(d);c.length&&(l=n==="viewbox"?ws(c,i):z$(c))}if(!l.length){const c=o!=="custom"?Ol[o]:void 0;c?l=ws(Ii(c),Wl):l=D$()}}return o==="circle"?B$(l,r):l}function Cd(e,t){return!(t.width>0)||!(t.height>0)||!e.length?"":Ho(ln(e,n=>({x:n.x*t.width,y:n.y*t.height})))}function Xs(e){const t=e==="rectangle"||e==="custom"?void 0:Ol[e];return t?$o(br(Ii(t)),Wl):[P$([[0,0],[1,0],[1,1],[0,1]])]}function j$(e){const t=e.match(_$);return t?t.map(Number).filter(n=>!Number.isNaN(n)):[]}function wn(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function qs(e,t){return{x:t.x*2-e.x,y:t.y*2-e.y}}function dn(e){return{x:e.x,y:e.y}}function V$(e){return{p:dn(e.p),in:e.in?dn(e.in):null,out:e.out?dn(e.out):null}}function zn(e){return e.map(t=>({closed:t.closed,nodes:t.nodes.map(V$)}))}function ln(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 Td(e,t,n,i=n){return ln(e,o=>({x:t.x+(o.x-t.x)*n,y:t.y+(o.y-t.y)*i}))}function G$(e,t,n,i,o,r,l){let d=Math.abs(t),c=Math.abs(n);if(!d||!c||e.x===l.x&&e.y===l.y)return[{c1:dn(e),c2:dn(l),p:dn(l)}];const u=i*Math.PI/180,p=Math.cos(u),x=Math.sin(u),y=(e.x-l.x)/2,m=(e.y-l.y)/2,g=p*y+x*m,v=-x*y+p*m,b=g*g/(d*d)+v*v/(c*c);if(b>1){const K=Math.sqrt(b);d*=K,c*=K}const E=o===r?-1:1,f=d*d*v*v+c*c*g*g,w=Math.max(0,d*d*c*c-f),G=f===0?0:E*Math.sqrt(w/f),X=G*d*v/c,M=-G*c*g/d,T=p*X-x*M+(e.x+l.x)/2,N=x*X+p*M+(e.y+l.y)/2,q=Math.atan2((v-M)/c,(g-X)/d);let I=Math.atan2((-v-M)/c,(-g-X)/d)-q;!r&&I>0&&(I-=Math.PI*2),r&&I<0&&(I+=Math.PI*2);const W=Math.max(1,Math.ceil(Math.abs(I)/(Math.PI/2))),O=I/W,C=4/3*Math.tan(O/4),L=(K,k)=>({x:T+p*d*K-x*c*k,y:N+x*d*K+p*c*k}),z=[];let S=q;for(let K=0;K<W;K+=1){const k=S+O,H=Math.cos(S),j=Math.sin(S),ne=Math.cos(k),oe=Math.sin(k);z.push({c1:L(H-C*j,j+C*H),c2:L(ne+C*oe,oe-C*ne),p:K===W-1?dn(l):L(ne,oe)}),S=k}return z}function Ii(e){const t=(e??"").trim();if(!t)return[];const n=[];let i=[],o=!1,r={x:0,y:0},l={x:0,y:0},d=null,c=null;const u=()=>{if(o&&i.length>2){const m=i[0],g=i[i.length-1];Math.abs(m.p.x-g.p.x)<1e-6&&Math.abs(m.p.y-g.p.y)<1e-6&&(m.in=g.in??m.in,i.pop())}i.length>1&&n.push({nodes:i,closed:o}),i=[],o=!1},p=(m,g)=>{i.push({p:m,in:Vn(g??null,m),out:null}),r=m},x=m=>{if(!i.length)return;const g=i[i.length-1];g.out=Vn(m,g.p)};Ss.lastIndex=0;let y=Ss.exec(t);for(;y!==null;){const m=y[1],g=m.toUpperCase(),v=m!==g,b=j$(y[2]),E=f=>v?{x:r.x+b[f],y:r.y+b[f+1]}:{x:b[f],y:b[f+1]};if(g==="Z")o=!0,u(),r=dn(l),d=null,c=null;else if(g==="M"){for(let f=0;f+1<b.length;f+=2){const w=E(f);f===0&&(u(),l=dn(w)),p(w)}d=null,c=null}else if(g==="L"){for(let f=0;f+1<b.length;f+=2)p(E(f));d=null,c=null}else if(g==="H"){for(const f of b)p({x:v?r.x+f:f,y:r.y});d=null,c=null}else if(g==="V"){for(const f of b)p({x:r.x,y:v?r.y+f:f});d=null,c=null}else if(g==="C"){for(let f=0;f+5<b.length;f+=6){const w=E(f),G=E(f+2),X=E(f+4);x(w),p(X,G),d=G}c=null}else if(g==="S"){for(let f=0;f+3<b.length;f+=4){const w=d?qs(d,r):dn(r),G=E(f),X=E(f+2);x(w),p(X,G),d=G}c=null}else if(g==="Q")for(let f=0;f+3<b.length;f+=4){const w=E(f),G=E(f+2);x(wn(r,w,2/3)),p(G,wn(G,w,2/3)),c=w,d=null}else if(g==="T")for(let f=0;f+1<b.length;f+=2){const w=c?qs(c,r):dn(r),G=E(f);x(wn(r,w,2/3)),p(G,wn(G,w,2/3)),c=w,d=null}else if(g==="A")for(let f=0;f+6<b.length;f+=7){const w=v?{x:r.x+b[f+5],y:r.y+b[f+6]}:{x:b[f+5],y:b[f+6]};for(const G of G$(r,b[f],b[f+1],b[f+2],b[f+3]!==0,b[f+4]!==0,w))x(G.c1),p(G.p,G.c2);d=null,c=null}y=Ss.exec(t)}return u(),n}function On(e){return`${Number(e.toFixed(2))}`}function Vn(e,t){return!e||Math.abs(e.x-t.x)<1e-6&&Math.abs(e.y-t.y)<1e-6?null:e}function xp(e){return!!(Vn(e.in,e.p)||Vn(e.out,e.p))}function Vo(e,t){return!Vn(e.out,e.p)&&!Vn(t.in,t.p)}function Ld(e,t){if(Vo(e,t))return`L${On(t.p.x)},${On(t.p.y)}`;const n=Vn(e.out,e.p)??e.p,i=Vn(t.in,t.p)??t.p;return`C${On(n.x)},${On(n.y)} ${On(i.x)},${On(i.y)} ${On(t.p.x)},${On(t.p.y)}`}function Ho(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const[i,...o]=n.nodes;t.push(`M${On(i.p.x)},${On(i.p.y)}`);let r=i;for(const l of o)t.push(Ld(r,l)),r=l;if(n.closed){const l=Ld(r,i);l.charAt(0)==="C"&&t.push(l),t.push("Z")}}return t.join(" ")}function bp(e){const t=[];for(let n=0;n+1<e.nodes.length;n+=1)t.push({from:e.nodes[n],to:e.nodes[n+1],index:n});if(e.closed&&e.nodes.length>2){const n=e.nodes.length-1;t.push({from:e.nodes[n],to:e.nodes[0],index:n})}return t}function Us(e,t,n){if(Vo(e,t))return wn(e.p,t.p,n);const i=e.out??e.p,o=t.in??t.p,r=1-n,l=r*r*r,d=3*r*r*n,c=3*r*n*n,u=n*n*n;return{x:l*e.p.x+d*i.x+c*o.x+u*t.p.x,y:l*e.p.y+d*i.y+c*o.y+u*t.p.y}}function br(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const i=[];for(const o of bp(n)){if(Vo(o.from,o.to)){i.push(dn(o.from.p));continue}for(let r=0;r<Gs;r+=1)i.push(Us(o.from,o.to,r/Gs))}n.closed||i.push(dn(n.nodes[n.nodes.length-1].p)),i.length>2&&t.push(i)}return t}function $i(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const r of br(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 X$(e){const t=$i(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 Sp(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 wp(e){return e.filter(t=>t.length>2).map(t=>{if(t.length<=F$)return{closed:!0,nodes:t.map(r=>({p:dn(r),in:null,out:null}))};const n=Math.max(1,Math.round(t.length/N$)),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:dn(r),...Sp(i[(l-1+o)%o],r,i[(l+1)%o])}))}})}function $p(e,t,n=1){if(!e.length)return!1;const i=$i(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),d=Math.max(n,t.height*.5);return i.minX<t.x-l||i.minY<t.y-d||i.maxX>t.x+t.width+l||i.maxY>t.y+t.height+d}function q$(e,t,n,i,o,r,l){const d=t.width>0?n.width/t.width:1,c=t.height>0?n.height/t.height:1;return!(r>0)||!(l>0)||!(d>0)||!(c>0)?e:ln(e,u=>{const p=i+(u.x-t.x)*r,x=o+(u.y-t.y)*l;return{x:t.x+p/d,y:t.y+x/c}})}function U$(e,t){if(!e.length)return e;const n=$i(e),i=n.maxX-n.minX,o=n.maxY-n.minY;if(!(i>0)||!(o>0)||n.minX>=t.x-1e-6&&n.minY>=t.y-1e-6&&n.maxX<=t.x+t.width+1e-6&&n.maxY<=t.y+t.height+1e-6)return e;const l=Math.min(t.width/i,t.height/o),d=t.x+(t.width-i*l)/2,c=t.y+(t.height-o*l)/2;return ln(e,u=>({x:d+(u.x-n.minX)*l,y:c+(u.y-n.minY)*l}))}function Cp(e){const t={x:0,y:0,width:ba,height:ba},n=e!=="custom"?Ol[e]:void 0,i=n?ln(Ii(n),r=>({x:r.x/100*t.width+t.x,y:r.y/100*t.height+t.y})):ln(wp(Xs("rectangle")),r=>({x:r.x*t.width+t.x,y:r.y*t.height+t.y})),o=U$(i,t);return{shape:e,customPath:Ho(o),pathFit:"viewbox",pathViewBox:Vs}}function Yr(e,t){return t>0?Math.round(e/t)*t:e}function K$(e,t,n,i){var u;const o=(u=e[t])==null?void 0:u.nodes[n];if(!o)return e;const r=i.x-o.p.x,l=i.y-o.p.y,d=zn(e),c=d[t].nodes[n];return c.p={x:o.p.x+r,y:o.p.y+l},c.in&&(c.in={x:c.in.x+r,y:c.in.y+l}),c.out&&(c.out={x:c.out.x+r,y:c.out.y+l}),d}function Pd(e,t,n,i){var r;if(!t.length)return e;const o=zn(e);for(const{contour:l,node:d}of t){const c=(r=o[l])==null?void 0:r.nodes[d];c&&(c.p={x:c.p.x+n,y:c.p.y+i},c.in&&(c.in={x:c.in.x+n,y:c.in.y+i}),c.out&&(c.out={x:c.out.x+n,y:c.out.y+i}))}return o}function Y$(e,t){const n=new Map;for(const{contour:o,node:r}of t){const l=n.get(o)??[];l.push(r),n.set(o,l)}let i=e;return n.forEach((o,r)=>{const l=[...o].sort((d,c)=>c-d);for(const d of l)i=Tp(i,r,d)}),i}function Z$(e,t,n,i,o,r){var u;if(!((u=e[t])==null?void 0:u.nodes[n]))return e;const d=zn(e),c=d[t].nodes[n];if(c[i]=dn(o),r){const p=i==="in"?"out":"in";c[p]=qs(o,c.p)}return d}function J$(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 Q$(e,t,n,i){const o=e[t];if(!o)return{contours:e,nodeIndex:-1};const r=o.nodes[n],l=o.nodes[(n+1)%o.nodes.length];if(!r||!l)return{contours:e,nodeIndex:-1};const d=zn(e),c=d[t].nodes,u=n+1;if(Vo(r,l))return c.splice(u,0,{p:wn(r.p,l.p,i),in:null,out:null}),{contours:d,nodeIndex:u};const p=r.out??r.p,x=l.in??l.p,y=wn(r.p,p,i),m=wn(p,x,i),g=wn(x,l.p,i),v=wn(y,m,i),b=wn(m,g,i),E=wn(v,b,i),f=(n+1)%o.nodes.length;return c[n].out=y,c[f].in=g,c.splice(u,0,{p:E,in:v,out:b}),{contours:d,nodeIndex:u}}function Tp(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 Id(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,d=l[n],c=l.length,u=(n-1+c)%c,p=(n+1)%c,x=!!Vn(l[u].out,l[u].p),y=!!Vn(l[p].in,l[p].p);if(xp(d)||x||y)return d.in=null,d.out=null,l[u].out=null,l[p].in=null,r;const m=Sp(l[u].p,d.p,l[p].p);return d.in=m.in,d.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)),d={x:t.x+i*l,y:t.y+o*l};return{t:l,distance:Math.hypot(e.x-d.x,e.y-d.y),point:d}}function Rd(e,t){let n=null;return e.forEach((i,o)=>{for(const r of bp(i)){const l=Vo(r.from,r.to)?1:Gs;for(let d=0;d<l;d+=1){const c=d/l,u=(d+1)/l,p=eC(t,Us(r.from,r.to,c),Us(r.from,r.to,u));(!n||p.distance<n.distance)&&(n={contour:o,segment:r.index,t:c+(u-c)*p.t,distance:p.distance,point:p.point})}}}),n}function tC(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(d=>Math.abs(d-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 Ed(e,t,n,i,o){const r=i(t)[n];let l=null,d=1/0;for(const c of e){const u=n==="x"?{x:c.value,y:t.y}:{x:t.x,y:c.value},p=Math.abs(i(u)[n]-r);p>o||l&&p>=d||(l=c,d=p)}return l}function nC(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 iC(e){const t=Math.PI*2;return((e+Math.PI)%t+t)%t-Math.PI}function Ks(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 oC(e,t){const n=Ks(e,t);return n?{kind:"align",a:{x:e.x-n.x*fo,y:e.y-n.y*fo},b:{x:t.x+n.x*fo,y:t.y+n.y*fo}}:{kind:"align",a:e,b:t}}function Ys(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 Md(e,t,n,i,o){if(e.axis===null)return oC(n,o(e.from??n));const r=t==="x"?{x:e.axis,y:0}:{x:0,y:e.axis};return Ys(o(r)[t],t,i)}function rC(e,t,n,i,o){const r=[],l=o(e);return t&&e.x===t.value&&r.push(Md(t,"x",l,i,o)),n&&e.y===n.value&&r.push(Md(n,"y",l,i,o)),r}function aC(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 Ks(i(l),r);const d=e.nodes.length,c=t+(n==="in"?1:-1);if(!e.closed&&(c<0||c>=d))return null;const u=e.nodes[(c+d)%d];if(!u)return null;const p=(n==="in"?u.in:u.out)??u.p;return Ks(i(p),r)}function sC(e,t,n,i,o,r,l){const d=r(t),c=r(e),u=c.x-d.x,p=c.y-d.y,x=Math.hypot(u,p);if(x<1e-6)return{point:e,guides:yo};const y=Math.atan2(p,u),m=Math.round(y/wd)*wd;let g=o?m:null,v=!1;if(!o){const M=[];n&&M.push({angle:Math.atan2(n.y,n.x),smooth:!0}),M.push({angle:m,smooth:!1});for(const T of M){const N=iC(T.angle-y);if(!(Math.abs(N)>W$)&&!(Math.abs(Math.sin(N))*x>H$)){g=T.angle,v=T.smooth;break}}}const b=i!==null&&i>0&&Math.abs(x-i)<=O$;if(g===null&&!b)return{point:e,guides:yo};const E=g??y,f=b?i:x,w={x:Math.cos(E),y:Math.sin(E)},G=f+(g===null?0:fo),X=b?f:v?fo:0;return{point:l({x:d.x+w.x*f,y:d.y+w.y*f}),guides:[{kind:"angle",a:{x:d.x-w.x*X,y:d.y-w.y*X},b:{x:d.x+w.x*G,y:d.y+w.y*G}}]}}const Zs=.1,Js=8,lC=4,Ad=10,Sa=(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}}},Lp=e=>{switch(e){case"nw":return"se";case"ne":return"sw";case"se":return"nw";case"sw":return"ne"}},Qs=(e,t)=>{const n=Sa(e,t),i=t==="nw"||t==="sw"?-1:1,o=t==="nw"||t==="ne"?-1:1;return{x:n.x+i*Ad,y:n.y+o*Ad}},el=(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),Xi=(e,t,n)=>{const i=el(e,t)*n;return{width:t.width*i,height:t.height*i}},Dn=(e,t,n)=>(e-t)*n,vo=(e,t,n,i)=>{const o=e-t;if(Math.abs(o)<1e-6)return .5;const r=n/o;return(i==null?void 0:i.clamp)===!1?r:Math.abs(o)<lC?.5:xa(r)},cC=(e,t,n,i,o,r)=>{const l=Xi(e,n,r),d=e.x+Dn(e.width,l.width,i),c=e.y+Dn(e.height,l.height,o),u=el(e,n),p=el(t,n),x=Math.min(Js,Math.max(Zs,p>0?r*(u/p):r)),y=Xi(t,n,x);return{focalX:vo(t.width,y.width,d-t.x,{clamp:!1}),focalY:vo(t.height,y.height,c-t.y,{clamp:!1}),scale:x}},Fd=1.08,Zr=14,Jr=8;function dC({P:e,box:t,bounds:n,natural:i,imageUrl:o,maskPath:r,stage:l,onStageChange:d,focalX:c,focalY:u,scale:p,onChange:x,onCommit:y}){const m=s.useRef(null),g=`pretext-image-ghost-${s.useId().replace(/:/g,"")}`,v=s.useRef(null),b=s.useRef(null),E=s.useRef({focalX:c,focalY:u,scale:p});E.current={focalX:c,focalY:u,scale:p};const f=l==="image";s.useEffect(()=>{var O;f&&((O=m.current)==null||O.focus({preventScroll:!0}))},[f]);const w=s.useCallback((O,C)=>{var z;const L=(z=m.current)==null?void 0:z.getBoundingClientRect();return!L||L.width<=0||L.height<=0?{x:0,y:0}:{x:(O-L.left)/L.width*t.width,y:(C-L.top)/L.height*t.height}},[t.width,t.height]),G=O=>{var L,z;if(!i)return;O.stopPropagation(),O.preventDefault(),(L=m.current)==null||L.focus({preventScroll:!0});const C=Xi(n,i,p);v.current={pointerId:O.pointerId,origin:w(O.clientX,O.clientY),startX:Dn(n.width,C.width,c),startY:Dn(n.height,C.height,u),width:C.width,height:C.height,moved:!1},(z=m.current)==null||z.setPointerCapture(O.pointerId)},X=(O,C)=>{var ne,oe;if(!i)return;O.stopPropagation(),O.preventDefault(),(ne=m.current)==null||ne.focus({preventScroll:!0});const L=Xi(n,i,p),z=Dn(n.width,L.width,c),S=Dn(n.height,L.height,u),K={minX:z,minY:S,maxX:z+L.width,maxY:S+L.height},k=Sa(K,Lp(C)),H=Sa(K,C),j=Math.hypot(H.x-k.x,H.y-k.y);!isFinite(j)||j<=0||(b.current={pointerId:O.pointerId,anchor:k,startDistance:j,startScale:p,startX:z,startY:S,moved:!1},(oe=m.current)==null||oe.setPointerCapture(O.pointerId))},M=O=>{if(!i)return;const C=b.current;if(C&&O.pointerId===C.pointerId){O.stopPropagation(),O.preventDefault();const z=w(O.clientX,O.clientY),S={x:z.x-n.x,y:z.y-n.y},K=Math.hypot(S.x-C.anchor.x,S.y-C.anchor.y),k=Math.min(Js,Math.max(Zs,C.startScale*(K/C.startDistance)));if(!C.moved&&Math.abs(k-C.startScale)<1e-4)return;C.moved=!0;const H=k/C.startScale,j=C.anchor.x+(C.startX-C.anchor.x)*H,ne=C.anchor.y+(C.startY-C.anchor.y)*H,oe=Xi(n,i,k);x({focalX:vo(n.width,oe.width,j),focalY:vo(n.height,oe.height,ne),scale:k});return}const L=v.current;if(L&&O.pointerId===L.pointerId){O.stopPropagation(),O.preventDefault();const z=w(O.clientX,O.clientY),S=z.x-L.origin.x,K=z.y-L.origin.y;if(!L.moved&&S===0&&K===0)return;L.moved=!0,x({focalX:vo(n.width,L.width,L.startX+S),focalY:vo(n.height,L.height,L.startY+K),scale:p})}},T=O=>{var z,S;const C=v.current;if(C&&O.pointerId===C.pointerId){v.current=null,O.stopPropagation(),(z=m.current)!=null&&z.hasPointerCapture(C.pointerId)&&m.current.releasePointerCapture(C.pointerId),C.moved&&y(E.current);return}const L=b.current;L&&O.pointerId===L.pointerId&&(b.current=null,O.stopPropagation(),(S=m.current)!=null&&S.hasPointerCapture(L.pointerId)&&m.current.releasePointerCapture(L.pointerId),L.moved&&y(E.current))},N=O=>{if(O.key==="Escape"){O.stopPropagation(),d("none");return}if(O.key==="="||O.key==="+"||O.key==="-"||O.key==="_"){O.preventDefault(),O.stopPropagation();const C=O.key==="="||O.key==="+",L=Math.min(Js,Math.max(Zs,p*(C?Fd:1/Fd))),z={focalX:c,focalY:u,scale:L};x(z),y(z)}},q=["nw","ne","se","sw"],$={minX:n.x,minY:n.y,maxX:n.x+n.width,maxY:n.y+n.height},I=s.useMemo(()=>{const O=i??{width:n.width,height:n.height},C=Xi(n,O,p);return!(C.width>0)||!(C.height>0)?null:{x:n.x+Dn(n.width,C.width,c),y:n.y+Dn(n.height,C.height,u),width:C.width,height:C.height}},[i,n.x,n.y,n.width,n.height,c,u,p]),W=I?{minX:I.x,minY:I.y,maxX:I.x+I.width,maxY:I.y+I.height}:$;return a.jsxs("svg",{ref:m,className:`${e}-editor${f?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:N,onPointerMove:M,onPointerUp:T,onPointerCancel:T,onLostPointerCapture:T,"data-pretext-image-editor":!0,children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>d("none")}),f&&o&&I&&r&&a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsxs("mask",{id:g,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(#${g})`}),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:G}),q.map(O=>{const C=Qs(W,O),L=O==="ne"||O==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:C.x-Jr/2,y:C.y-Jr/2,width:Jr,height:Jr}),a.jsx("rect",{className:`${e}-editor-scale-grab${L?` ${e}-editor-scale-grab-nesw`:""}`,x:C.x-Zr/2,y:C.y-Zr/2,width:Zr,height:Zr,onPointerDown:z=>X(z,O)})]},O)})]})]})}const tl=10,uC=tl*2,Wn=7,pC=4,lo=9,mC=3.5,Nd=1.08,gC=.05,Qr=14,hC=1,ea=14,ta=8;function fC({P:e,box:t,viewBox:n,contours:i,snap:o,stretchToBox:r,uniformStretch:l=!1,stage:d,onStageChange:c,onSelectionChange:u,onChange:p,onCommit:x}){const y=s.useRef(null),m=s.useRef(null),g=s.useRef(i);g.current=i;const v=s.useRef(null),b=s.useRef(null),E=s.useRef(null),f=s.useRef(null),[w,G]=s.useState([]),[X,M]=s.useState(yo),[T,N]=s.useState(null),q=s.useCallback(h=>{M(U=>nC(U,h)?U:h)},[]),$=d==="shape";s.useEffect(()=>{var h;$&&((h=y.current)==null||h.focus({preventScroll:!0}))},[$]),s.useEffect(()=>{$||G(h=>h.length?[]:h)},[$]);const I=w.length>0;s.useEffect(()=>{u==null||u(I)},[I,u]),s.useEffect(()=>()=>u==null?void 0:u(!1),[u]);const W=n.width>0?t.width/n.width:1,O=n.height>0?t.height/n.height:1,C=Math.min(W,O),L=r&&l?C:W,z=r&&l?C:O,S=r&&l?(t.width-n.width*C)/2:0,K=r&&l?(t.height-n.height*C)/2:0,k=s.useCallback(h=>r?{x:S+(h.x-n.x)*L,y:K+(h.y-n.y)*z}:{x:h.x-n.x,y:h.y-n.y},[r,n,L,z,S,K]),H=s.useCallback(h=>r?{x:n.x+(L>0?(h.x-S)/L:0),y:n.y+(z>0?(h.y-K)/z:0)}:{x:n.x+h.x,y:n.y+h.y},[r,n,L,z,S,K]),j=s.useMemo(()=>H({x:t.width/2,y:t.height/2}),[H,t.width,t.height]),ne=s.useCallback((h,U)=>{var te;const Z=(te=y.current)==null?void 0:te.getBoundingClientRect();if(!Z||Z.width<=0||Z.height<=0)return{x:0,y:0};if(r){const me=(h-Z.left)/Z.width*t.width,B=(U-Z.top)/Z.height*t.height;return{x:n.x+(L>0?(me-S)/L:0),y:n.y+(z>0?(B-K)/z:0)}}return{x:n.x+(h-Z.left),y:n.y+(U-Z.top)}},[r,n,t.width,t.height,L,z,S,K]),oe=s.useCallback((h,U)=>{var te;const Z=(te=y.current)==null?void 0:te.getBoundingClientRect();return!Z||Z.width<=0||Z.height<=0?{x:0,y:0}:{x:(h-Z.left)/Z.width*t.width,y:(U-Z.top)/Z.height*t.height}},[t.width,t.height]),R=s.useCallback((h,U)=>{const Z=l&&!(U!=null&&U.preserveShape)?q$(h,n,t,S,K,L,z):h;x(Z,U)},[x,l,n,t,S,K,L,z]),ce=s.useCallback(()=>{N(null)},[]),D=s.useCallback((h,U,Z)=>{if(!Z||v.current||b.current||E.current||f.current){ce();return}const te=oe(h,U),me=ln(g.current,k);for(const V of me)for(const Pe of V.nodes)if(Math.hypot(Pe.p.x-te.x,Pe.p.y-te.y)<=lo){ce();return}const B=Rd(me,te);if(!B||B.distance>tl){ce();return}const P=me[B.contour],Q=P==null?void 0:P.nodes[B.segment],ee=P==null?void 0:P.nodes[(B.segment+1)%((P==null?void 0:P.nodes.length)??1)],de=!!(Q&&ee&&!Vo(Q,ee));N(V=>V&&V.curved===de&&Math.hypot(V.point.x-B.point.x,V.point.y-B.point.y)<.25?V:{point:B.point,curved:de})},[oe,k,ce]),le=h=>{var Be;const U=h.metaKey||h.ctrlKey,Z=E.current;if(Z&&h.pointerId===Z.pointerId){if(h.stopPropagation(),h.preventDefault(),Z.startDistance<=0)return;const at=ne(h.clientX,h.clientY),Ue=Math.hypot(at.x-Z.origin.x,at.y-Z.origin.y),nt=Math.max(gC,Ue/Z.startDistance);if(!Z.moved&&Math.abs(nt-1)<1e-4)return;Z.moved=!0,p(Td(Z.startContours,Z.origin,nt));return}const te=b.current;if(te&&h.pointerId===te.pointerId){h.stopPropagation(),h.preventDefault();const at=ne(h.clientX,h.clientY),{bbox:Ue}=te,nt=Ue.maxX-Ue.minX,Ze=Ue.maxY-Ue.minY,Xe=at.x-te.origin.x,fe=at.y-te.origin.y;let He=Xe,We=fe;if(isFinite(nt)&&isFinite(Ze))if(r){let ye=n.x,_e=n.x+n.width,Ge=n.y,et=n.y+n.height;l&&(L>0&&(ye=n.x+(0-S)/L,_e=n.x+(t.width-S)/L),z>0&&(Ge=n.y+(0-K)/z,et=n.y+(t.height-K)/z));const mt=Math.min(ye,_e-nt),rt=Math.max(ye,_e-nt),Oe=Math.min(Ge,et-Ze),Fe=Math.max(Ge,et-Ze),Ke=Math.min(rt,Math.max(mt,Ue.minX+Xe)),it=Math.min(Fe,Math.max(Oe,Ue.minY+fe));He=Ke-Ue.minX,We=it-Ue.minY}else{const ye=Ue.minX-n.x,_e=Ue.minY-n.y,Ge=Math.min(0,t.width-nt),et=Math.max(0,t.width-nt),mt=Math.min(0,t.height-Ze),rt=Math.max(0,t.height-Ze),Oe=Math.min(et,Math.max(Ge,ye+Xe)),Fe=Math.min(rt,Math.max(mt,_e+fe));He=Oe-ye,We=Fe-_e}const Qe=[];if(!U&&isFinite(nt)&&isFinite(Ze)){const ye=k({x:Ue.minX+nt/2+He,y:Ue.minY+Ze/2+We}),_e={x:t.width/2,y:t.height/2};Math.abs(ye.x-_e.x)<=Qr&&(He=j.x-Ue.minX-nt/2,Qe.push(Ys(_e.x,"x",t))),Math.abs(ye.y-_e.y)<=Qr&&(We=j.y-Ue.minY-Ze/2,Qe.push(Ys(_e.y,"y",t)))}if(!te.moved&&He===0&&We===0)return;te.moved=!0,q(Qe.length?Qe:yo),p(ln(te.startContours,ye=>({x:ye.x+He,y:ye.y+We})),{carryImage:!0});return}const me=f.current;if(me&&h.pointerId===me.pointerId){h.stopPropagation(),h.preventDefault();const at=ne(h.clientX,h.clientY);let Ue=at.x-me.origin.x,nt=at.y-me.origin.y;if(h.shiftKey&&(Math.abs(Ue)>Math.abs(nt)?nt=0:Ue=0),!me.moved&&Ue===0&&nt===0)return;me.moved=!0,p(Pd(me.startContours,me.selection,Ue,nt));return}const B=v.current;if(!B||h.pointerId!==B.pointerId){D(h.clientX,h.clientY,w.length>0||$);return}ce(),h.stopPropagation(),h.preventDefault();const P=ne(h.clientX,h.clientY);if(B.kind==="anchor"){const at={x:B.anchor.x+(P.x-B.origin.x),y:B.anchor.y+(P.y-B.origin.y)},Ue=U?[]:tC(g.current,{contour:B.contour,node:B.node}),nt=U||!B.center?[]:[B.center],Ze=Ed(kd(Ue,nt.map(He=>He.x),"x"),at,"x",k,Qr),Xe=Ed(kd(Ue,nt.map(He=>He.y),"y"),at,"y",k,Qr),fe=U?at:{x:(Ze==null?void 0:Ze.value)??Yr(at.x,o),y:(Xe==null?void 0:Xe.value)??Yr(at.y,o)};if(h.shiftKey&&(Math.abs(fe.x-B.anchor.x)>Math.abs(fe.y-B.anchor.y)?fe.y=B.anchor.y:fe.x=B.anchor.x),!B.moved&&fe.x===B.anchor.x&&fe.y===B.anchor.y)return;B.moved=!0,q(rC(fe,Ze,Xe,t,k)),p(K$(g.current,B.contour,B.node,fe));return}const Q=(Be=g.current[B.contour])==null?void 0:Be.nodes[B.node],ee=B.mirror&&!h.altKey,de=ee||U?null:B.kind==="in"?Q==null?void 0:Q.out:Q==null?void 0:Q.in,V=Q?k(Q.p):null,Pe=de?k(de):null,he=Q&&(!U||h.shiftKey)?sC(P,Q.p,ee||U?null:aC(g.current[B.contour],B.node,B.kind,k),V&&Pe?Math.hypot(Pe.x-V.x,Pe.y-V.y):null,h.shiftKey,k,H):{point:P,guides:yo},J=he.guides.length?he.point:U?P:{x:Yr(P.x,o),y:Yr(P.y,o)},Ne=B.kind==="in"?Q==null?void 0:Q.in:Q==null?void 0:Q.out;!B.moved&&Ne&&J.x===Ne.x&&J.y===Ne.y||(B.moved=!0,q(he.guides),p(Z$(g.current,B.contour,B.node,B.kind,J,ee)))},ie=h=>{q(yo);const U=E.current;if(U&&h.pointerId===U.pointerId){E.current=null,h.stopPropagation();const de=y.current;de!=null&&de.hasPointerCapture(U.pointerId)&&de.releasePointerCapture(U.pointerId),U.moved&&R(g.current,{preserveShape:!0});return}const Z=b.current;if(Z&&h.pointerId===Z.pointerId){b.current=null,h.stopPropagation();const de=y.current;de!=null&&de.hasPointerCapture(Z.pointerId)&&de.releasePointerCapture(Z.pointerId),Z.moved?R(g.current,{preserveShape:!0}):G([]);return}const te=f.current;if(te&&h.pointerId===te.pointerId){f.current=null,h.stopPropagation();const de=y.current;de!=null&&de.hasPointerCapture(te.pointerId)&&de.releasePointerCapture(te.pointerId),te.moved&&R(g.current);return}const me=v.current;if(!me||h.pointerId!==me.pointerId)return;v.current=null,h.stopPropagation();const B=y.current;B!=null&&B.hasPointerCapture(me.pointerId)&&B.releasePointerCapture(me.pointerId);const P=Math.hypot(h.clientX-me.clientOrigin.x,h.clientY-me.clientOrigin.y);if(me.moved||P>pC){me.moved&&R(g.current);return}if(!me.toggleOnRelease||h.type!=="pointerup")return;const ee=Id(g.current,me.contour,me.node);ee!==g.current&&(p(ee),R(ee))},we=h=>{h.stopPropagation()},Ie=h=>{var U,Z;h.stopPropagation(),h.preventDefault(),ce(),(U=y.current)==null||U.focus({preventScroll:!0}),b.current={pointerId:h.pointerId,origin:ne(h.clientX,h.clientY),startContours:zn(i),bbox:$i(i),moved:!1},(Z=y.current)==null||Z.setPointerCapture(h.pointerId)},xe=(h,U)=>{var P,Q;h.stopPropagation(),h.preventDefault(),ce(),(P=y.current)==null||P.focus({preventScroll:!0}),G([]),c("shape");const Z=$i(i),te=Sa(Z,Lp(U)),me=Qs(Z,U),B=Math.hypot(me.x-te.x,me.y-te.y);!isFinite(B)||B<=0||(E.current={pointerId:h.pointerId,corner:U,origin:te,startDistance:B,startContours:zn(i),moved:!1},(Q=y.current)==null||Q.setPointerCapture(h.pointerId))},pe=(h,U,Z,te)=>{var P,Q,ee,de;h.stopPropagation(),h.preventDefault(),ce(),(P=y.current)==null||P.focus({preventScroll:!0});const me=(Q=i[Z])==null?void 0:Q.nodes[te];if(!me)return;if(h.altKey){const V=U==="anchor"?Tp(i,Z,te):J$(i,Z,te,U);if(V===i)return;G(U==="anchor"?[]:[{contour:Z,node:te}]),p(V),R(V);return}const B=h.metaKey||h.ctrlKey;if(U==="anchor"&&h.shiftKey&&!B){G(V=>V.some(Pe=>Pe.contour===Z&&Pe.node===te)?V.filter(Pe=>!(Pe.contour===Z&&Pe.node===te)):[...V,{contour:Z,node:te}]);return}if(U==="anchor"&&!B&&w.length>1&&w.some(V=>V.contour===Z&&V.node===te)){f.current={pointerId:h.pointerId,origin:ne(h.clientX,h.clientY),startContours:zn(i),selection:w,moved:!1},(ee=y.current)==null||ee.setPointerCapture(h.pointerId);return}G([{contour:Z,node:te}]),v.current={kind:U,contour:Z,node:te,pointerId:h.pointerId,origin:ne(h.clientX,h.clientY),clientOrigin:{x:h.clientX,y:h.clientY},anchor:me.p,center:X$(i),mirror:U!=="anchor"&&!!(me.in&&me.out),toggleOnRelease:B,moved:!1},(de=y.current)==null||de.setPointerCapture(h.pointerId)},Y=h=>{h.stopPropagation(),h.preventDefault(),ce();const U=ln(i,k),Z=Rd(U,oe(h.clientX,h.clientY));if(!Z||Z.distance>tl)return;const{contours:te,nodeIndex:me}=Q$(i,Z.contour,Z.segment,Z.t);me<0||(G([{contour:Z.contour,node:me}]),p(te),R(te))},ae=h=>{if(h.key==="="||h.key==="+"||h.key==="-"||h.key==="_"){h.preventDefault(),h.stopPropagation();const B=$i(i);if(!isFinite(B.minX)||!isFinite(B.maxX))return;const P={x:(B.minX+B.maxX)/2,y:(B.minY+B.maxY)/2},ee=h.key==="="||h.key==="+"?Nd:1/Nd,de=Td(i,P,ee);p(de),R(de,{preserveShape:!0});return}if(h.key==="Escape"){h.stopPropagation(),G([]),c("none");return}if(!w.length)return;if(h.key==="Backspace"||h.key==="Delete"){h.preventDefault(),h.stopPropagation();const B=Y$(i,w);if(B===i)return;G([]),p(B),R(B);return}const U=o>0?o:hC,Z=h.shiftKey?U*10:U,te={ArrowLeft:[-Z,0],ArrowRight:[Z,0],ArrowUp:[0,-Z],ArrowDown:[0,Z]}[h.key];if(!te)return;h.preventDefault(),h.stopPropagation();const me=Pd(i,w,te[0],te[1]);p(me),R(me)},se=s.useMemo(()=>Ho(ln(i,k)),[i,k]),Re=s.useMemo(()=>$i(i),[i]),$e=k({x:Re.minX,y:Re.minY}),Me={width:k({x:Re.maxX,y:Re.minY}).x-$e.x,height:k({x:Re.minX,y:Re.maxY}).y-$e.y},ve=$&&w.length===0&&isFinite(Re.minX)&&isFinite(Re.maxX)&&Re.maxX>Re.minX&&Re.maxY>Re.minY,be=w.length>0||$,Ce=be;return a.jsxs("svg",{ref:y,className:`${e}-editor${be?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:ae,onPointerDown:()=>{var h;return(h=y.current)==null?void 0:h.focus({preventScroll:!0})},onPointerMove:le,onPointerLeave:ce,onPointerUp:ie,onPointerCancel:ie,onLostPointerCapture:ie,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:()=>{G([]),c("none")},onClick:Y}),Ce&&a.jsx("path",{className:`${e}-editor-outline`,d:se}),Ce&&X.map((h,U)=>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}-${U}`)),a.jsx("path",{ref:m,className:`${e}-editor-body`,d:se,fillRule:"evenodd",onPointerDown:Ie,onClick:Y}),Ce&&a.jsx("path",{className:`${e}-editor-hit`,d:se,style:{strokeWidth:uC},onClick:Y}),Ce&&T&&a.jsx("rect",{className:`${e}-editor-add-preview`,x:T.point.x-Wn/2,y:T.point.y-Wn/2,width:Wn,height:Wn,rx:T.curved?Wn/2:0}),Ce&&i.map((h,U)=>h.nodes.map((Z,te)=>{const me=w.some(P=>P.contour===U&&P.node===te),B=k(Z.p);return a.jsxs("g",{children:[me&&w.length===1&&["in","out"].map(P=>{const Q=Z[P];if(!Q)return null;const ee=k(Q);return a.jsxs("g",{children:[a.jsx("line",{className:`${e}-editor-handle-line`,x1:B.x,y1:B.y,x2:ee.x,y2:ee.y}),a.jsx("circle",{className:`${e}-editor-handle`,cx:ee.x,cy:ee.y,r:mC}),a.jsx("circle",{className:`${e}-editor-grab`,cx:ee.x,cy:ee.y,r:lo,onPointerDown:de=>pe(de,P,U,te),onClick:we})]},P)}),a.jsx("rect",{className:`${e}-editor-anchor${me?` ${e}-editor-anchor-selected`:""}`,x:B.x-Wn/2,y:B.y-Wn/2,width:Wn,height:Wn,rx:xp(Z)?Wn/2:0}),a.jsx("rect",{className:`${e}-editor-grab`,x:B.x-lo,y:B.y-lo,width:lo*2,height:lo*2,onPointerDown:P=>pe(P,"anchor",U,te),onClick:we,onDoubleClick:P=>{P.stopPropagation(),P.preventDefault();const Q=Id(i,U,te);p(Q),R(Q)}})]},`${U}-${te}`)})),ve&&a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:$e.x,y:$e.y,width:Me.width,height:Me.height}),["nw","ne","se","sw"].map(h=>{const U=k(Qs(Re,h)),Z=h==="ne"||h==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:U.x-ta/2,y:U.y-ta/2,width:ta,height:ta}),a.jsx("rect",{className:`${e}-editor-scale-grab${Z?` ${e}-editor-scale-grab-nesw`:""}`,x:U.x-ea/2,y:U.y-ea/2,width:ea,height:ea,onPointerDown:te=>xe(te,h),onClick:we})]},h)})]})]})}const yC=4e3,vC=/^(?:https?:|mailto:|tel:)/i;function Pp(e){return!!e&&typeof e=="object"&&e.type==="link"}function xC(e){if(!e)return;const t=e.replace(/\s+/g,"");if(!(/^[a-z][a-z0-9+.-]*:/i.test(t)&&!vC.test(t)))return t}function bC(e){const t=[];return e.forEach((n,i)=>{const o=(r,l,d)=>{for(const c of r){if(Pp(c)){o(c.children??[],xC(c.value),c.target);continue}const u=c,p=(u==null?void 0:u.text)??"";if(p.trim())for(const x of p.split(/\s+/))x&&t.push({text:x,leaf:u,href:l,target:d,para:i})}};o((n==null?void 0:n.children)??[])}),t}function _d(e){return{...e.fontFamily&&{fontFamily:zo(e.fontFamily)},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}function SC(e){return e.map(t=>{const n=[],i=o=>{for(const r of o){if(Pp(r)){i(r.children??[]);continue}n.push((r==null?void 0:r.text)??"")}};return i((t==null?void 0:t.children)??[]),n.join("")})}function wC(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 d=1/0,c=-1/0,u=1/0,p=-1/0;for(const m of l){const g=m.x*n,v=m.y*i;g<d&&(d=g),g>c&&(c=g),v<u&&(u=v),v>p&&(p=v)}const x=(d+c)/2,y=(u+p)/2;return l.map(m=>{const g=m.x*n,v=m.y*i,b=g-x,E=v-y,f=Math.sqrt(b*b+E*E);if(f<1e-6)return m;const G=Math.max(0,f+r*t)/f;return{x:(x+b*G)/n,y:(y+E*G)/i}})})}const $s=2,Cs=2;function $C(e,t,n,i,o){if(e.kind!=="whole")return null;const r=t[e.originalIndex],l=e.token.text;if(!r||l.length<$s+Cs)return null;const d=Math.min(r.length-Cs,l.length-Cs);let c=-1;for(let u=d;u>=$s;u-=1)if(r[u-1]*i+o*i<=n){c=u;break}return c<$s?null:{fragmentText:`${l.slice(0,c)}-`,remainderText:l.slice(c),fragmentWidth:r[c-1]+o,remainderWidth:Math.max(0,e.width-r[c-1])}}function Hd(e){const{tokens:t,widths:n,rings:i,mode:o,align:r,scale:l,width:d,height:c,allowOverflow:u,capInset:p,capLines:x}=e,y=!!e.hyphenate,m=e.charWidths??[],g=e.hyphenWidth??0,v=e.lineHeight*l,b=e.spaceWidth*l,E=Math.max(0,e.shapeMargin??0),f=[],w=t.map((L,z)=>({token:L,originalIndex:z,width:n[z],kind:"whole"}));if(!w.length||d<=0||v<=0)return{segments:f,placed:0,height:0,capLeft:0,capTop:0,renderTokens:t};const G=Math.max(1,b*.5),X=v*T$,M=wC(i,E,d,c,o);let T=0,N=0,q=0,$=w[0].token.para,I=0,W=0,O=null;for(;T<w.length&&q<yC;){const L=N+v>c;if(L&&!u)break;const z=w[T].token.para;if(z>$+1){N+=v*(z-$-1),$=z-1,q+=1;continue}let S=L?[{x0:0,x1:d}]:A$(M,(N+X)/c,(N+v-X)/c,o).map(k=>({x0:k.x0*d,x1:k.x1*d}));p>0&&x>0&&!L&&S.length&&(O===null&&(O=q,I=S[0].x0,W=N),q-O<x&&(S=M$(S,{x0:I,x1:I+p})));const K=S.reduce((k,H)=>Math.max(k,H.x1-H.x0),0);for(const k of S){const H=k.x1-k.x0;if(H<G)continue;if(T>=w.length||w[T].token.para!==z)break;const j=T;let ne=0;for(;T<w.length&&w[T].token.para===z;){const oe=w[T],R=T===j,ce=oe.width*l,D=R?ce:b+ce;if(ne+D<=H){ne+=D,T+=1;continue}if(R&&H>=K-.5&&ce>d-.5){ne+=D,T+=1;continue}if(y){const ie=H-ne-(R?0:b),we=$C(oe,m,ie,l,g);if(we){const Ie={token:{...oe.token,text:we.fragmentText},originalIndex:oe.originalIndex,width:we.fragmentWidth,kind:"fragment"},xe={token:{...oe.token,text:we.remainderText},originalIndex:oe.originalIndex,width:we.remainderWidth,kind:"remainder"};w.splice(T,1,Ie,xe),ne+=(R?0:b)+we.fragmentWidth*l,T+=1}}break}if(T>j){const oe=T>=w.length||w[T].token.para!==z;f.push({top:N,left:k.x0,width:H,from:j,to:T,justify:r==="justify"&&!oe})}if(T>=w.length||w[T].token.para!==z)break}$=z,N+=v,q+=1}let C=0;if(T>0){const L=w[T-1];C=L.kind==="fragment"?L.originalIndex:L.originalIndex+1}return{segments:f,placed:C,height:f.length?N:0,capLeft:I,capTop:W,renderTokens:w.map(L=>L.token)}}const CC=.12,TC=2,LC=10,Ts=.25,PC=e=>{const t=e.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}},IC=(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,RC=(e,t)=>{const[n,i]=s.useState(null);return s.useEffect(()=>{if(!e||!t){i(null);return}let o=0,r=null;const l=()=>{const d=PC(e);(!r||!IC(r,d))&&(r=d,i(d)),o=requestAnimationFrame(l)};return l(),()=>cancelAnimationFrame(o)},[e,t]),n},Ls=(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})))},er=typeof window>"u"?s.useEffect:s.useLayoutEffect;function kC(){return typeof document>"u"?null:document.body}function EC({P:e,item:t,shape:n,customPath:i,pathFit:o,viewBox:r,mode:l,align:d,allowOverflow:c,fitEnabled:u,scale:p,onFitScale:x,padding:y,hyphenate:m,showOverflowIndicator:g,dropCapLines:v,dropCapSize:b,showGuides:E,typography:f,imageUrl:w,imageFocalX:G,imageFocalY:X,imageScale:M,imageCustomPath:T,pathDragActive:N,pathCarryImage:q,onCarryImageConsumed:$,pathEditor:I,imageEditor:W}){var qe,ut;const O=`pretext-shape-image-${s.useId().replace(/:/g,"")}`,[C,L]=s.useState(null),z=s.useRef(null),[S,K]=s.useState({width:0,height:0}),[k,H]=s.useState(0),[j,ne]=s.useState(null),[oe,R]=s.useState(0),[ce,D]=s.useState("none");s.useEffect(()=>{!I&&!W&&D("none")},[I,W]);const[le,ie]=s.useState(null);s.useEffect(()=>{if(!w||typeof Image>"u"){ie(null);return}let ge=!1;const ke=new Image;return ke.onload=()=>{ge||ie({width:ke.naturalWidth,height:ke.naturalHeight})},ke.src=w,()=>{ge=!0}},[w]);const we=s.useMemo(()=>Array.isArray(t==null?void 0:t.text)?t.text:[],[t]),Ie=s.useMemo(()=>bC(we),[we]),xe=s.useMemo(()=>SC(we),[we]),pe=v>0&&b>1?((ut=(qe=Ie[0])==null?void 0:qe.text)==null?void 0:ut.charAt(0))??"":"",Y=(I==null?void 0:I.contours)??null,ae=s.useMemo(()=>{let ge=[];if(Y){const ke=br(Y);ke.length&&(ge=$o(ke,r))}if(!ge.length){const ke=i.trim(),ot=ke?Sd(ke,o,r):null;ot&&ot.length?ge=ot:ge=Xs(n==="custom"?"rectangle":n)}return n==="circle"?Ls(ge,S):ge},[Y,n,i,o,r,S.width,S.height]),se=I==null?void 0:I.onConvert,Re=(I==null?void 0:I.needsConversion)??!1,$e=s.useMemo(()=>{if(n==="circle")return!1;const ge=Y??(i.trim()?Ii(i):null);return!!(ge&&$p(ge,r))},[Y,i,r,n]),[Me,ve]=s.useState(null);er(()=>{if(!$e){Me&&ve(null);return}!Me&&S.width>0&&S.height>0&&ve({width:S.width,height:S.height})},[$e,S.width,S.height,Me]);const be=s.useMemo(()=>{if(!$e||S.width<=0||S.height<=0)return ae;const ge=Me??S,ke=r.width/ge.width,ot=r.height/ge.height;return ae.map(gt=>gt.map(je=>({x:je.x*ke,y:je.y*ot})))},[ae,$e,Me,r.width,r.height,S.width,S.height]),Ce=s.useMemo(()=>{if(Y){const gt=br(Y);if(gt.length){const je=$o(gt,r);return n==="circle"?Ls(je,S):je}}const ge=T.trim(),ke=ge?Sd(ge,o,r):null,ot=ke&&ke.length?ke:Xs(n==="custom"?"rectangle":n);return n==="circle"?Ls(ot,S):ot},[Y,n,T,o,r,S.width,S.height]),h=s.useMemo(()=>{if(!$e||S.width<=0||S.height<=0)return Ce;const ge=Me??S,ke=r.width/ge.width,ot=r.height/ge.height;return Ce.map(gt=>gt.map(je=>({x:je.x*ke,y:je.y*ot})))},[Ce,$e,Me,r.width,r.height,S.width,S.height]),U=s.useRef(null),Z=s.useRef(!1);s.useEffect(()=>{if(!(!se||S.width<=0||S.height<=0)){if($e){if(U.current===i)return;const ge=Y??(i.trim()?Ii(i):null);if(!(ge!=null&&ge.length))return;const ke=ln(ge,ot=>({x:r.x+(ot.x-r.x)/S.width*r.width,y:r.y+(ot.y-r.y)/S.height*r.height}));U.current=Ho(ke),se(ke);return}!Re||!ae.length||Z.current||(Z.current=!0,se(ln(wp(ae),ge=>({x:ge.x*ba,y:ge.y*ba}))))}},[Re,$e,se,ae,Y,i,r,S.width,S.height]);const te=s.useCallback(()=>{const ge=C;if(!ge)return;const ke=ge.getBoundingClientRect(),ot=parseFloat(window.getComputedStyle(ge).paddingTop)||0;H(je=>Math.abs(je-ot)<.5?je:ot);const gt={width:ke.width,height:ke.height};K(je=>Math.abs(je.width-gt.width)<.5&&Math.abs(je.height-gt.height)<.5?je:gt)},[C]);er(()=>{const ge=C;if(!ge||typeof ResizeObserver>"u")return;te();const ke=new ResizeObserver(te);return ke.observe(ge),()=>ke.disconnect()},[C,te]),er(()=>{te()},[y,te]),s.useEffect(()=>{const ge=typeof document<"u"?document.fonts:void 0;ge!=null&&ge.ready&&ge.ready.then(()=>{R(ke=>ke+1)})},[]),er(()=>{const ge=z.current;if(!ge)return;if(!Ie.length){ne(null);return}const ke=[],ot=document.createDocumentFragment();for(const ht of Ie){const A=document.createElement("span");Object.assign(A.style,_d(ht.leaf)),A.textContent=ht.text,ot.appendChild(A),ke.push(A)}const gt=document.createElement("span");gt.textContent=" ",ot.appendChild(gt);const je=document.createElement("span");je.textContent="-",ot.appendChild(je);const vt=pe||"H",It=document.createElement("span");It.textContent=vt,It.style.lineHeight="1",ot.appendChild(It),ge.replaceChildren(ot);const kt=window.getComputedStyle(ge),wt=parseFloat(kt.fontSize)||16,Dt=parseFloat(kt.lineHeight),Bt=Number.isNaN(Dt)?wt*1.2:Dt,Xt=Math.max(Bt,wt),qt=document.createElement("span");qt.textContent=vt,qt.style.lineHeight=`${Xt}px`;const Lt=document.createElement("span");Lt.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",qt.appendChild(Lt),ge.appendChild(qt);const Ot=qt.getBoundingClientRect().top,nn=Lt.getBoundingClientRect().top,xt=Math.max(1,nn-Ot);qt.remove();let Te=xt*.8;const st=document.createElement("canvas").getContext("2d"),lt=ht=>`${kt.fontStyle} ${kt.fontWeight} ${ht}px ${kt.fontFamily}`;if(st){st.font=lt(wt);const ht=st.measureText(vt).actualBoundingBoxAscent;ht>0&&(Te=ht)}const bt=b>1?(b-1)*Xt+Te:Te;let Tt=wt*(bt/Te);if(st){st.font=lt(Tt);const ht=st.measureText(vt).actualBoundingBoxAscent;ht>0&&(Tt=Tt*(bt/ht))}It.style.fontSize=`${Tt}px`,It.style.lineHeight=`${Tt}px`;const tt=document.createElement("span");tt.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",It.appendChild(tt);const Rt=Math.max(1,tt.getBoundingClientRect().top-It.getBoundingClientRect().top);tt.remove();const At=(b-1)*Xt+xt-Rt,jt=ke.map(ht=>ht.getBoundingClientRect().width),Ut=gt.getBoundingClientRect().width,Et=je.getBoundingClientRect().width,Nt=pe?It.getBoundingClientRect().width:0,_t=m?ke.map(ht=>{const A=ht.firstChild;if(!(A instanceof Text)||A.data.length<4)return;const Le=document.createRange(),Ae=ht.getBoundingClientRect().left,ze=[];for(let pt=1;pt<=A.data.length;pt+=1)Le.setStart(A,0),Le.setEnd(A,pt),ze.push(Le.getBoundingClientRect().right-Ae);return ze}):[];ge.replaceChildren(),ne({widths:jt,spaceWidth:Ut,dashWidth:Et,charWidths:_t,lineHeight:Xt,capWidth:Nt,dropCapFontSize:Tt,dropCapTopAdjust:At})},[Ie,f,pe,v,b,oe,S.width,m]);const me=j&&pe?j.capWidth+j.lineHeight*CC:0,B=Math.max(v,Math.ceil(b)),P=s.useMemo(()=>{if(!j||!Ie.length||S.width<=0||S.height<=0||!u)return 1;const ge=gt=>Hd({tokens:Ie,widths:j.widths,spaceWidth:j.spaceWidth,lineHeight:j.lineHeight,width:S.width,height:S.height,rings:be,mode:l,align:d,scale:gt,allowOverflow:!1,capInset:me*gt,capLines:pe?B:0,hyphenate:m,charWidths:j.charWidths,hyphenWidth:j.dashWidth,shapeMargin:k});if(ge(1).placed>=Ie.length)return 1;if(ge(Ts).placed<Ie.length)return Ts;let ke=Ts,ot=1;for(let gt=0;gt<LC;gt+=1){const je=(ke+ot)/2;ge(je).placed>=Ie.length?ke=je:ot=je}return ke},[j,Ie,S.width,S.height,be,l,d,u,me,pe,B,m,k]);s.useEffect(()=>{x(P)},[P,x]);const Q=u?Math.min(p,P):1,ee=s.useMemo(()=>!j||!Ie.length||S.width<=0||S.height<=0?{segments:[],placed:0,height:0,capLeft:0,capTop:0,renderTokens:Ie}:Hd({tokens:Ie,widths:j.widths,spaceWidth:j.spaceWidth,lineHeight:j.lineHeight,width:S.width,height:S.height,rings:be,mode:l,align:d,scale:Q,allowOverflow:c,capInset:me*Q,capLines:pe?B:0,hyphenate:m,charWidths:j.charWidths,hyphenWidth:j.dashWidth,shapeMargin:k}),[j,Ie,S.width,S.height,be,l,d,Q,c,me,pe,B,m,k]),de=g&&Ie.length>0&&ee.placed<Ie.length,V=j?j.dropCapFontSize*Q:0,Pe=j?j.dropCapTopAdjust*Q:0,he=d==="justify"?"left":d,J=j?j.lineHeight*Q:0,Ne=ee.segments.length?ee.segments[ee.segments.length-1]:null,Be=Ne?{top:Ne.top+J,left:Ne.left+Ne.width/2}:{top:S.height,left:S.width/2},at=!!(I&&Y&&S.width>0&&S.height>0),Ue=!!W,nt=(at||Ue)&&S.width>0&&S.height>0,Ze=RC(C,nt),Xe=nt&&Ze?kC():null,fe=s.useRef(!1),He=s.useCallback(ge=>{fe.current=ge},[]);s.useEffect(()=>{if(!at&&!Ue)return;const ge=ke=>{const ot=C;if(!ot)return;const gt=ot.getBoundingClientRect();ke.clientX>=gt.left&&ke.clientX<=gt.right&&ke.clientY>=gt.top&&ke.clientY<=gt.bottom&&(ke.preventDefault(),ke.stopPropagation(),D(vt=>vt==="shape"&&fe.current?vt:vt==="shape"&&Ue?"image":at?"shape":"image"))};return document.addEventListener("dblclick",ge,!0),()=>document.removeEventListener("dblclick",ge,!0)},[at,Ue,C]);const We=s.useMemo(()=>w&&S.width>0&&S.height>0?L$(h,S):null,[w,h,S.width,S.height]),Qe=s.useRef(null),ye=(()=>{const ge=Qe.current;return q||!W||!le||!We||!ge||T===ge.customPath||ge.shape!==n&&n!=="custom"?null:cC(ge.bounds,We,le,ge.focalX,ge.focalY,ge.scale)})();er(()=>{if(N||!W||!le||!We)return;const ge=Qe.current,ke=!!(ge&&T!==ge.customPath);ke&&ye&&W.onCommit(ye),ke&&q&&($==null||$()),Qe.current={rings:h,bounds:We,focalX:(ye==null?void 0:ye.focalX)??G,focalY:(ye==null?void 0:ye.focalY)??X,scale:(ye==null?void 0:ye.scale)??M,customPath:T,shape:n}},[N,q,T,n,h,We,W,le,G,X,M,ye,$]);const _e=Qe.current,Ge=!!(N&&!q&&_e&&!ye),et=Ge&&_e?_e.focalX:(ye==null?void 0:ye.focalX)??G,mt=Ge&&_e?_e.focalY:(ye==null?void 0:ye.focalY)??X,rt=Ge&&_e?_e.scale:(ye==null?void 0:ye.scale)??M,Oe=Ge&&_e?_e.bounds:We,Fe=s.useMemo(()=>{if(!(S.width>0)||!(S.height>0))return"";let ge=$d(i,Y,o,r,n,S);if($e){const ke=Me??S,ot=r.width/ke.width,gt=r.height/ke.height;ge=ln(ge,je=>({x:je.x*ot,y:je.y*gt}))}return Cd(ge,S)||bd(be,S)},[i,Y,o,r,n,S.width,S.height,$e,Me,be]),Ke=s.useMemo(()=>{if(!w||!(S.width>0)||!(S.height>0))return"";let ge=$d(T,Y,o,r,n,S);if($e){const ke=Me??S,ot=r.width/ke.width,gt=r.height/ke.height;ge=ln(ge,je=>({x:je.x*ot,y:je.y*gt}))}return Cd(ge,S)||bd(h,S)},[w,T,Y,o,r,n,S.width,S.height,$e,Me,h]),it=`${O}-clip`,De=s.useMemo(()=>{if(!Oe)return null;const ge=le??{width:Oe.width,height:Oe.height},ke=Xi(Oe,ge,rt);return{x:Dn(Oe.width,ke.width,et),y:Dn(Oe.height,ke.height,mt),width:ke.width,height:ke.height}},[Oe,le,et,mt,rt]);return a.jsxs("div",{className:`${e}-column`,style:{padding:y},ref:L,children:[Fe?a.jsxs("svg",{className:`${e}-shape-fill`,style:{top:0,left:0,width:S.width,height:S.height},viewBox:`0 0 ${S.width} ${S.height}`,preserveAspectRatio:"none","aria-hidden":!0,children:[a.jsx("path",{className:`${e}-shape-fill-path`,d:Fe,fillRule:"evenodd"}),w&&Ke&&Oe&&De?a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsx("clipPath",{id:it,clipPathUnits:"userSpaceOnUse",children:a.jsx("path",{d:Ke,fillRule:"evenodd"})})}),a.jsx("image",{href:w,x:Oe.x+De.x,y:Oe.y+De.y,width:De.width,height:De.height,preserveAspectRatio:"none",clipPath:`url(#${it})`})]}):null]}):null,a.jsxs("div",{className:`${e}-flow${c?"":` ${e}-clip`}`,style:{...f,["--"+e+"-fit"]:Q,top:0,left:0,width:S.width,height:S.height},children:[a.jsx("div",{className:`${e}-measure`,ref:z,style:f,"aria-hidden":!0}),ee.segments.map((ge,ke)=>{const ot=ee.renderTokens.slice(ge.from,ge.to),gt=ke===0;return a.jsx("div",{className:`${e}-line${ge.justify?` ${e}-line-justify`:""}`,"aria-hidden":!0,style:{top:`${ge.top}px`,left:`${ge.left}px`,width:`${ge.width}px`,textAlign:ge.justify?void 0:he},children:ot.map((je,vt)=>{const kt=pe&&gt&&ge.from===0&&vt===0?je.text.slice(1):je.text,wt=_d(je.leaf),Dt=je.href?a.jsx("a",{className:`${e}-link`,href:je.href,target:je.target,rel:je.target?"noopener noreferrer":void 0,style:wt,children:kt}):a.jsx("span",{style:wt,children:kt});return a.jsxs("span",{children:[!ge.justify&&vt>0?" ":null,Dt]},vt)})},`${ge.from}-${ge.to}-${ke}`)}),E&&!Y&&a.jsx("svg",{className:`${e}-guides`,viewBox:"0 0 1 1",preserveAspectRatio:"none","aria-hidden":!0,children:be.map((ge,ke)=>a.jsx("polygon",{points:ge.map(ot=>`${ot.x},${ot.y}`).join(" ")},ke))})]}),pe&&j&&a.jsx("div",{className:`${e}-drop-cap`,"aria-hidden":!0,style:{...f,top:`${ee.capTop+Pe}px`,left:`${ee.capLeft}px`,fontSize:`${V}px`,lineHeight:`${V}px`},children:pe}),Xe&&Ze&&(Y&&I||W)&&li.createPortal(a.jsxs("div",{"data-selection":"none",style:{position:"fixed",top:Ze.top,left:Ze.left,width:Ze.width,height:Ze.height,zIndex:TC,pointerEvents:"none"},children:[Y&&I&&a.jsx(fC,{P:e,box:{width:Ze.width,height:Ze.height},viewBox:r,contours:Y,snap:I.snap,stretchToBox:!$e,uniformStretch:n==="circle",stage:ce,onStageChange:D,onSelectionChange:He,onChange:I.onChange,onCommit:I.onCommit}),W&&Oe&&a.jsx(dC,{P:e,box:{width:Ze.width,height:Ze.height},bounds:Oe,natural:le,imageUrl:w,maskPath:Ke,stage:ce,onStageChange:D,focalX:et,focalY:mt,scale:rt,onChange:W.onChange,onCommit:W.onCommit})]}),Xe),a.jsx("div",{className:`${e}-a11y`,children:xe.map((ge,ke)=>a.jsx("p",{children:ge},ke))}),de&&a.jsxs("svg",{className:`${e}-overflow-icon`,width:"33",height:"24",viewBox:"0 0 33 24",style:{top:Be.top,left:Be.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 Ip=["diamond","parallelogram","vase","circle","shield","bobbin","custom"],MC={x:0,y:0,width:100,height:100},AC=e=>{const t=(e??"").trim().split(/[\s,]+/).map(Number).filter(n=>!Number.isNaN(n));return t.length<4||t[2]<=0||t[3]<=0?MC:{x:t[0],y:t[1],width:t[2],height:t[3]}},FC=e=>`
26852
+ `;function Qo(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Bi={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 fi(e,t){return e?`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`:t}function Hl(e){return{[fi(e,"fontFamily")]:{type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},[fi(e,"fontSettings")]:{...Bi.fontSettings,scope:"common",title:""},[fi(e,"fontSize")]:{...Bi.fontSize,scope:"layout",title:""},[fi(e,"lineHeight")]:{...Bi.lineHeight,scope:"layout",title:""},[fi(e,"letterSpacing")]:{...Bi.letterSpacing,scope:"layout",title:""},[fi(e,"wordSpacing")]:{...Bi.wordSpacing,scope:"layout",title:""},[fi(e,"textAlign")]:{...Bi.textAlign,scope:"layout",title:""},[fi(e,"textAppearance")]:{...Bi.textAppearance,scope:"layout",title:""}}}const h$=Hl(""),f$=Hl("open"),y$=Hl("compact"),v$=["__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"],x$=["__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"],b$=["__componentName__",{type:"row",items:["textWidth","effect"]},"position","openFontFamily","openFontSettings",{type:"row",items:["openFontSize","openLineHeight","openLetterSpacing","openWordSpacing"]},"openTextAlign","openTextAppearance"],Jn={textTransform:"none",textDecoration:"none",fontVariant:"normal"},xs={fontWeight:400,fontStyle:"normal"},Kr={d:"Always",t:"Open Only",m:"Open Only"},S$=["left-top","center-top","right-top","left-center","center","right-center","left-bottom","center-bottom","right-bottom"],w$=["iconColor","logoColor","closeButtonColor","linkColor","backgroundColor"],$$={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:"Link Default",titleByState:{default:"Link Default",hover:"Link 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"}},compactCloseButtonColor:{type:"string",scope:"common",title:"Close Default",titleByState:{compact:"Close Default","compact-hover":"Close Hover"},display:{type:"palette-color-picker"}},compactLinkColor:{type:"string",scope:"common",title:"Link Default",titleByState:{compact:"Link Default","compact-hover":"Link 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:"Link Default",titleByState:{open:"Link Default","open-hover":"Link 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:{default:"Close Default",hover:"Close Hover",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"]}},textWidth:{type:"number",scope:"layout",title:"Text 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:[...S$]}},stateOverrides:{type:"object",scope:"common"},gap:Qo("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:Qo("Text padding left"),textPaddingRight:Qo("Text padding right"),textPaddingTop:Qo("Text padding top"),textPaddingBottom:Qo("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}},...h$,...f$,...y$},defaults:{link:[{link:{type:"page",value:"",target:"self"},label:"Home",showIn:Kr},{link:{type:"page",value:"",target:"self"},label:"Works",showIn:Kr},{link:{type:"page",value:"",target:"self"},label:"About",showIn:Kr},{link:{type:"page",value:"",target:"self"},label:"Contact",showIn:Kr}],logo:{mode:"On",icon:"https://cdn.cntrl.site/component-assets/hamburger-logo.svg"},backgroundColor:"#ffffff",logoColor:"#000000",iconColor:"#000000",linkColor:"#000000",openLinkColor:"#000000",compactIconColor:"#000000",compactCloseButtonColor:"#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:xs,textAlign:"left",openFontFamily:"Goudy Bookletter 1911",openFontSettings:xs,openTextAlign:"left",compactFontFamily:"Goudy Bookletter 1911",compactFontSettings:xs,compactTextAlign:"left",stateOverrides:{hover:{linkColor:"#666666",iconColor:"#666666",logoColor:"#666666",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:"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,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,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,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","compactCloseButtonColor","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:v$},{id:"compact",icon:"compact",title:"Compact",tooltip:"Compact State",layout:x$,availableWhen:{navigationPosition:["switch"]}},{id:"open",icon:"open",title:"Open",tooltip:"Open State",layout:b$},{id:"links",icon:"content",title:"Links",tooltip:"Link Settings",layout:["__componentName__","link"]}],paletteBookmark:{items:[...w$],panelIds:["default","compact","open"],stateItems:{default:["iconColor","logoColor","closeButtonColor","linkColor","backgroundColor"],hover:["iconColor","logoColor","closeButtonColor","linkColor"],compact:["compactIconColor","compactLogoColor","compactCloseButtonColor","compactLinkColor","compactBackgroundColor"],"compact-hover":["compactIconColor","compactLogoColor","compactCloseButtonColor","compactLinkColor"],open:["closeButtonColor","openLogoColor","openLinkColor","menuBackgroundColor","overlayColor"],"open-hover":["closeButtonColor","openLogoColor","openLinkColor"]}},states:["default","hover"],statePanels:["default","compact","open"]},C$={element:m$,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:$$,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"}},vd=120,xd=3,T$=.12,Wl={x:0,y:0,width:100,height:100};function $o(e,t){return e.map(n=>n.map(i=>({x:(i.x-t.x)/t.width,y:(i.y-t.y)/t.height})))}function xa(e){return e<0?0:e>1?1:e}function bd(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 L$(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 P$(e){return e.map(([t,n])=>({x:t,y:n}))}function bs(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 I$(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=xa(n[o]),l=xa(n[o+1]);l>r&&i.push({x0:r,x1:l})}return R$(i)}function R$(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 k$(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 E$(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 M$(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 A$(e,t,n,i){let o=null;for(let r=0;r<xd;r+=1){const l=xa(t+(n-t)*r/Math.max(1,xd-1)),c=I$(e,l),d=i==="avoid"?E$(c):c;if(o=o===null?d:k$(o,d),o.length===0)return[]}return o??[]}function Sd(e,t="stretch",n=Wl){const i=e.trim();if(!i)return null;if(/^[Mm]/.test(i)){const l=Ii(i),c=br(l);if(c.length)return t==="viewbox"?$o(c,n):bs(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 m=0;try{m=v.getTotalLength()}catch{m=0}if(!m)continue;const g=[];for(let x=0;x<vd;x+=1){const b=v.getPointAtLength(x/vd*m);g.push({x:b.x,y:b.y})}p.push(g)}return p.length?t==="viewbox"?$o(p,n):bs(p):null}const o=i.split(/[\s,]+/).map(Number).filter(l=>!Number.isNaN(l));if(o.length<6)return null;const r=[];for(let l=0;l+1<o.length;l+=2)r.push({x:o[l],y:o[l+1]});return t==="viewbox"?$o([r],n):bs([r])}const Ol={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"},Vs="0 0 100 100",ba=100,Gs=16,F$=12,N$=16,Ss=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,_$=/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g,wd=Math.PI/4,H$=8,W$=Math.PI/18,O$=8,fo=24,yo=[];function D$(){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 ws(e,t){return cn(e,n=>({x:(n.x-t.x)/t.width,y:(n.y-t.y)/t.height}))}function z$(e){const t=$i(e),n=t.maxX-t.minX,i=t.maxY-t.minY;return!isFinite(n)||!isFinite(i)||n<=0||i<=0?e:cn(e,o=>({x:(o.x-t.minX)/n,y:(o.y-t.minY)/i}))}function B$(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 cn(e,r=>({x:(i+r.x*n)/t.width,y:(o+r.y*n)/t.height}))}function $d(e,t,n,i,o,r){let l=[];if(t&&t.length)l=ws(t,i);else{const c=e.trim();if(c&&/^[Mm]/.test(c)){const d=Ii(c);d.length&&(l=n==="viewbox"?ws(d,i):z$(d))}if(!l.length){const d=o!=="custom"?Ol[o]:void 0;d?l=ws(Ii(d),Wl):l=D$()}}return o==="circle"?B$(l,r):l}function Cd(e,t){return!(t.width>0)||!(t.height>0)||!e.length?"":Ho(cn(e,n=>({x:n.x*t.width,y:n.y*t.height})))}function Xs(e){const t=e==="rectangle"||e==="custom"?void 0:Ol[e];return t?$o(br(Ii(t)),Wl):[P$([[0,0],[1,0],[1,1],[0,1]])]}function j$(e){const t=e.match(_$);return t?t.map(Number).filter(n=>!Number.isNaN(n)):[]}function wn(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function qs(e,t){return{x:t.x*2-e.x,y:t.y*2-e.y}}function un(e){return{x:e.x,y:e.y}}function V$(e){return{p:un(e.p),in:e.in?un(e.in):null,out:e.out?un(e.out):null}}function zn(e){return e.map(t=>({closed:t.closed,nodes:t.nodes.map(V$)}))}function cn(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 Td(e,t,n,i=n){return cn(e,o=>({x:t.x+(o.x-t.x)*n,y:t.y+(o.y-t.y)*i}))}function G$(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:un(e),c2:un(l),p:un(l)}];const u=i*Math.PI/180,p=Math.cos(u),y=Math.sin(u),v=(e.x-l.x)/2,m=(e.y-l.y)/2,g=p*v+y*m,x=-y*v+p*m,b=g*g/(c*c)+x*x/(d*d);if(b>1){const K=Math.sqrt(b);c*=K,d*=K}const E=o===r?-1:1,f=c*c*x*x+d*d*g*g,w=Math.max(0,c*c*d*d-f),G=f===0?0:E*Math.sqrt(w/f),X=G*c*x/d,k=-G*d*g/c,L=p*X-y*k+(e.x+l.x)/2,A=y*X+p*k+(e.y+l.y)/2,U=Math.atan2((x-k)/d,(g-X)/c);let P=Math.atan2((-x-k)/d,(-g-X)/c)-U;!r&&P>0&&(P-=Math.PI*2),r&&P<0&&(P+=Math.PI*2);const H=Math.max(1,Math.ceil(Math.abs(P)/(Math.PI/2))),W=P/H,C=4/3*Math.tan(W/4),T=(K,R)=>({x:L+p*c*K-y*d*R,y:A+y*c*K+p*d*R}),B=[];let S=U;for(let K=0;K<H;K+=1){const R=S+W,_=Math.cos(S),j=Math.sin(S),oe=Math.cos(R),re=Math.sin(R);B.push({c1:T(_-C*j,j+C*_),c2:T(oe+C*re,re-C*oe),p:K===H-1?un(l):T(oe,re)}),S=R}return B}function Ii(e){const t=(e??"").trim();if(!t)return[];const n=[];let i=[],o=!1,r={x:0,y:0},l={x:0,y:0},c=null,d=null;const u=()=>{if(o&&i.length>2){const m=i[0],g=i[i.length-1];Math.abs(m.p.x-g.p.x)<1e-6&&Math.abs(m.p.y-g.p.y)<1e-6&&(m.in=g.in??m.in,i.pop())}i.length>1&&n.push({nodes:i,closed:o}),i=[],o=!1},p=(m,g)=>{i.push({p:m,in:Vn(g??null,m),out:null}),r=m},y=m=>{if(!i.length)return;const g=i[i.length-1];g.out=Vn(m,g.p)};Ss.lastIndex=0;let v=Ss.exec(t);for(;v!==null;){const m=v[1],g=m.toUpperCase(),x=m!==g,b=j$(v[2]),E=f=>x?{x:r.x+b[f],y:r.y+b[f+1]}:{x:b[f],y:b[f+1]};if(g==="Z")o=!0,u(),r=un(l),c=null,d=null;else if(g==="M"){for(let f=0;f+1<b.length;f+=2){const w=E(f);f===0&&(u(),l=un(w)),p(w)}c=null,d=null}else if(g==="L"){for(let f=0;f+1<b.length;f+=2)p(E(f));c=null,d=null}else if(g==="H"){for(const f of b)p({x:x?r.x+f:f,y:r.y});c=null,d=null}else if(g==="V"){for(const f of b)p({x:r.x,y:x?r.y+f:f});c=null,d=null}else if(g==="C"){for(let f=0;f+5<b.length;f+=6){const w=E(f),G=E(f+2),X=E(f+4);y(w),p(X,G),c=G}d=null}else if(g==="S"){for(let f=0;f+3<b.length;f+=4){const w=c?qs(c,r):un(r),G=E(f),X=E(f+2);y(w),p(X,G),c=G}d=null}else if(g==="Q")for(let f=0;f+3<b.length;f+=4){const w=E(f),G=E(f+2);y(wn(r,w,2/3)),p(G,wn(G,w,2/3)),d=w,c=null}else if(g==="T")for(let f=0;f+1<b.length;f+=2){const w=d?qs(d,r):un(r),G=E(f);y(wn(r,w,2/3)),p(G,wn(G,w,2/3)),d=w,c=null}else if(g==="A")for(let f=0;f+6<b.length;f+=7){const w=x?{x:r.x+b[f+5],y:r.y+b[f+6]}:{x:b[f+5],y:b[f+6]};for(const G of G$(r,b[f],b[f+1],b[f+2],b[f+3]!==0,b[f+4]!==0,w))y(G.c1),p(G.p,G.c2);c=null,d=null}v=Ss.exec(t)}return u(),n}function On(e){return`${Number(e.toFixed(2))}`}function Vn(e,t){return!e||Math.abs(e.x-t.x)<1e-6&&Math.abs(e.y-t.y)<1e-6?null:e}function xp(e){return!!(Vn(e.in,e.p)||Vn(e.out,e.p))}function Vo(e,t){return!Vn(e.out,e.p)&&!Vn(t.in,t.p)}function Ld(e,t){if(Vo(e,t))return`L${On(t.p.x)},${On(t.p.y)}`;const n=Vn(e.out,e.p)??e.p,i=Vn(t.in,t.p)??t.p;return`C${On(n.x)},${On(n.y)} ${On(i.x)},${On(i.y)} ${On(t.p.x)},${On(t.p.y)}`}function Ho(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const[i,...o]=n.nodes;t.push(`M${On(i.p.x)},${On(i.p.y)}`);let r=i;for(const l of o)t.push(Ld(r,l)),r=l;if(n.closed){const l=Ld(r,i);l.charAt(0)==="C"&&t.push(l),t.push("Z")}}return t.join(" ")}function bp(e){const t=[];for(let n=0;n+1<e.nodes.length;n+=1)t.push({from:e.nodes[n],to:e.nodes[n+1],index:n});if(e.closed&&e.nodes.length>2){const n=e.nodes.length-1;t.push({from:e.nodes[n],to:e.nodes[0],index:n})}return t}function Us(e,t,n){if(Vo(e,t))return wn(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 br(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const i=[];for(const o of bp(n)){if(Vo(o.from,o.to)){i.push(un(o.from.p));continue}for(let r=0;r<Gs;r+=1)i.push(Us(o.from,o.to,r/Gs))}n.closed||i.push(un(n.nodes[n.nodes.length-1].p)),i.length>2&&t.push(i)}return t}function $i(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const r of br(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 X$(e){const t=$i(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 Sp(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 wp(e){return e.filter(t=>t.length>2).map(t=>{if(t.length<=F$)return{closed:!0,nodes:t.map(r=>({p:un(r),in:null,out:null}))};const n=Math.max(1,Math.round(t.length/N$)),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:un(r),...Sp(i[(l-1+o)%o],r,i[(l+1)%o])}))}})}function $p(e,t,n=1){if(!e.length)return!1;const i=$i(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 q$(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:cn(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 U$(e,t){if(!e.length)return e;const n=$i(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 cn(e,u=>({x:c+(u.x-n.minX)*l,y:d+(u.y-n.minY)*l}))}function Cp(e){const t={x:0,y:0,width:ba,height:ba},n=e!=="custom"?Ol[e]:void 0,i=n?cn(Ii(n),r=>({x:r.x/100*t.width+t.x,y:r.y/100*t.height+t.y})):cn(wp(Xs("rectangle")),r=>({x:r.x*t.width+t.x,y:r.y*t.height+t.y})),o=U$(i,t);return{shape:e,customPath:Ho(o),pathFit:"viewbox",pathViewBox:Vs}}function Yr(e,t){return t>0?Math.round(e/t)*t:e}function K$(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 Pd(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 Y$(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=Tp(i,r,c)}),i}function Z$(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]=un(o),r){const p=i==="in"?"out":"in";d[p]=qs(o,d.p)}return c}function J$(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 Q$(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(Vo(r,l))return d.splice(u,0,{p:wn(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=wn(r.p,p,i),m=wn(p,y,i),g=wn(y,l.p,i),x=wn(v,m,i),b=wn(m,g,i),E=wn(x,b,i),f=(n+1)%o.nodes.length;return d[n].out=v,d[f].in=g,d.splice(u,0,{p:E,in:x,out:b}),{contours:c,nodeIndex:u}}function Tp(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 Id(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=!!Vn(l[u].out,l[u].p),v=!!Vn(l[p].in,l[p].p);if(xp(c)||y||v)return c.in=null,c.out=null,l[u].out=null,l[p].in=null,r;const m=Sp(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 Rd(e,t){let n=null;return e.forEach((i,o)=>{for(const r of bp(i)){const l=Vo(r.from,r.to)?1:Gs;for(let c=0;c<l;c+=1){const d=c/l,u=(c+1)/l,p=eC(t,Us(r.from,r.to,d),Us(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 tC(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 Ed(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 nC(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 iC(e){const t=Math.PI*2;return((e+Math.PI)%t+t)%t-Math.PI}function Ks(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 oC(e,t){const n=Ks(e,t);return n?{kind:"align",a:{x:e.x-n.x*fo,y:e.y-n.y*fo},b:{x:t.x+n.x*fo,y:t.y+n.y*fo}}:{kind:"align",a:e,b:t}}function Ys(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 Md(e,t,n,i,o){if(e.axis===null)return oC(n,o(e.from??n));const r=t==="x"?{x:e.axis,y:0}:{x:0,y:e.axis};return Ys(o(r)[t],t,i)}function rC(e,t,n,i,o){const r=[],l=o(e);return t&&e.x===t.value&&r.push(Md(t,"x",l,i,o)),n&&e.y===n.value&&r.push(Md(n,"y",l,i,o)),r}function aC(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 Ks(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 Ks(i(p),r)}function sC(e,t,n,i,o,r,l){const c=r(t),d=r(e),u=d.x-c.x,p=d.y-c.y,y=Math.hypot(u,p);if(y<1e-6)return{point:e,guides:yo};const v=Math.atan2(p,u),m=Math.round(v/wd)*wd;let g=o?m:null,x=!1;if(!o){const k=[];n&&k.push({angle:Math.atan2(n.y,n.x),smooth:!0}),k.push({angle:m,smooth:!1});for(const L of k){const A=iC(L.angle-v);if(!(Math.abs(A)>W$)&&!(Math.abs(Math.sin(A))*y>H$)){g=L.angle,x=L.smooth;break}}}const b=i!==null&&i>0&&Math.abs(y-i)<=O$;if(g===null&&!b)return{point:e,guides:yo};const E=g??v,f=b?i:y,w={x:Math.cos(E),y:Math.sin(E)},G=f+(g===null?0:fo),X=b?f:x?fo: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*X,y:c.y-w.y*X},b:{x:c.x+w.x*G,y:c.y+w.y*G}}]}}const Zs=.1,Js=8,lC=4,Ad=10,Sa=(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}}},Lp=e=>{switch(e){case"nw":return"se";case"ne":return"sw";case"se":return"nw";case"sw":return"ne"}},Qs=(e,t)=>{const n=Sa(e,t),i=t==="nw"||t==="sw"?-1:1,o=t==="nw"||t==="ne"?-1:1;return{x:n.x+i*Ad,y:n.y+o*Ad}},el=(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),Xi=(e,t,n)=>{const i=el(e,t)*n;return{width:t.width*i,height:t.height*i}},Dn=(e,t,n)=>(e-t)*n,vo=(e,t,n,i)=>{const o=e-t;if(Math.abs(o)<1e-6)return .5;const r=n/o;return(i==null?void 0:i.clamp)===!1?r:Math.abs(o)<lC?.5:xa(r)},cC=(e,t,n,i,o,r)=>{const l=Xi(e,n,r),c=e.x+Dn(e.width,l.width,i),d=e.y+Dn(e.height,l.height,o),u=el(e,n),p=el(t,n),y=Math.min(Js,Math.max(Zs,p>0?r*(u/p):r)),v=Xi(t,n,y);return{focalX:vo(t.width,v.width,c-t.x,{clamp:!1}),focalY:vo(t.height,v.height,d-t.y,{clamp:!1}),scale:y}},Fd=1.08,Zr=14,Jr=8;function dC({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 m=s.useRef(null),g=`pretext-image-ghost-${s.useId().replace(/:/g,"")}`,x=s.useRef(null),b=s.useRef(null),E=s.useRef({focalX:d,focalY:u,scale:p});E.current={focalX:d,focalY:u,scale:p};const f=l==="image";s.useEffect(()=>{var W;f&&((W=m.current)==null||W.focus({preventScroll:!0}))},[f]);const w=s.useCallback((W,C)=>{var B;const T=(B=m.current)==null?void 0:B.getBoundingClientRect();return!T||T.width<=0||T.height<=0?{x:0,y:0}:{x:(W-T.left)/T.width*t.width,y:(C-T.top)/T.height*t.height}},[t.width,t.height]),G=W=>{var T,B;if(!i)return;W.stopPropagation(),W.preventDefault(),(T=m.current)==null||T.focus({preventScroll:!0});const C=Xi(n,i,p);x.current={pointerId:W.pointerId,origin:w(W.clientX,W.clientY),startX:Dn(n.width,C.width,d),startY:Dn(n.height,C.height,u),width:C.width,height:C.height,moved:!1},(B=m.current)==null||B.setPointerCapture(W.pointerId)},X=(W,C)=>{var oe,re;if(!i)return;W.stopPropagation(),W.preventDefault(),(oe=m.current)==null||oe.focus({preventScroll:!0});const T=Xi(n,i,p),B=Dn(n.width,T.width,d),S=Dn(n.height,T.height,u),K={minX:B,minY:S,maxX:B+T.width,maxY:S+T.height},R=Sa(K,Lp(C)),_=Sa(K,C),j=Math.hypot(_.x-R.x,_.y-R.y);!isFinite(j)||j<=0||(b.current={pointerId:W.pointerId,anchor:R,startDistance:j,startScale:p,startX:B,startY:S,moved:!1},(re=m.current)==null||re.setPointerCapture(W.pointerId))},k=W=>{if(!i)return;const C=b.current;if(C&&W.pointerId===C.pointerId){W.stopPropagation(),W.preventDefault();const B=w(W.clientX,W.clientY),S={x:B.x-n.x,y:B.y-n.y},K=Math.hypot(S.x-C.anchor.x,S.y-C.anchor.y),R=Math.min(Js,Math.max(Zs,C.startScale*(K/C.startDistance)));if(!C.moved&&Math.abs(R-C.startScale)<1e-4)return;C.moved=!0;const _=R/C.startScale,j=C.anchor.x+(C.startX-C.anchor.x)*_,oe=C.anchor.y+(C.startY-C.anchor.y)*_,re=Xi(n,i,R);y({focalX:vo(n.width,re.width,j),focalY:vo(n.height,re.height,oe),scale:R});return}const T=x.current;if(T&&W.pointerId===T.pointerId){W.stopPropagation(),W.preventDefault();const B=w(W.clientX,W.clientY),S=B.x-T.origin.x,K=B.y-T.origin.y;if(!T.moved&&S===0&&K===0)return;T.moved=!0,y({focalX:vo(n.width,T.width,T.startX+S),focalY:vo(n.height,T.height,T.startY+K),scale:p})}},L=W=>{var B,S;const C=x.current;if(C&&W.pointerId===C.pointerId){x.current=null,W.stopPropagation(),(B=m.current)!=null&&B.hasPointerCapture(C.pointerId)&&m.current.releasePointerCapture(C.pointerId),C.moved&&v(E.current);return}const T=b.current;T&&W.pointerId===T.pointerId&&(b.current=null,W.stopPropagation(),(S=m.current)!=null&&S.hasPointerCapture(T.pointerId)&&m.current.releasePointerCapture(T.pointerId),T.moved&&v(E.current))},A=W=>{if(W.key==="Escape"){W.stopPropagation(),c("none");return}if(W.key==="="||W.key==="+"||W.key==="-"||W.key==="_"){W.preventDefault(),W.stopPropagation();const C=W.key==="="||W.key==="+",T=Math.min(Js,Math.max(Zs,p*(C?Fd:1/Fd))),B={focalX:d,focalY:u,scale:T};y(B),v(B)}},U=["nw","ne","se","sw"],$={minX:n.x,minY:n.y,maxX:n.x+n.width,maxY:n.y+n.height},P=s.useMemo(()=>{const W=i??{width:n.width,height:n.height},C=Xi(n,W,p);return!(C.width>0)||!(C.height>0)?null:{x:n.x+Dn(n.width,C.width,d),y:n.y+Dn(n.height,C.height,u),width:C.width,height:C.height}},[i,n.x,n.y,n.width,n.height,d,u,p]),H=P?{minX:P.x,minY:P.y,maxX:P.x+P.width,maxY:P.y+P.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:A,onPointerMove:k,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&&P&&r&&a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsxs("mask",{id:g,maskUnits:"userSpaceOnUse",x:P.x,y:P.y,width:P.width,height:P.height,children:[a.jsx("rect",{x:P.x,y:P.y,width:P.width,height:P.height,fill:"#FFFFFF"}),a.jsx("path",{d:r,fillRule:"evenodd",fill:"#000000"})]})}),a.jsx("image",{className:`${e}-editor-ghost`,href:o??void 0,x:P.x,y:P.y,width:P.width,height:P.height,preserveAspectRatio:"none",mask:`url(#${g})`}),a.jsx("rect",{className:`${e}-editor-image-bounds`,x:P.x,y:P.y,width:P.width,height:P.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:G}),U.map(W=>{const C=Qs(H,W),T=W==="ne"||W==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:C.x-Jr/2,y:C.y-Jr/2,width:Jr,height:Jr}),a.jsx("rect",{className:`${e}-editor-scale-grab${T?` ${e}-editor-scale-grab-nesw`:""}`,x:C.x-Zr/2,y:C.y-Zr/2,width:Zr,height:Zr,onPointerDown:B=>X(B,W)})]},W)})]})]})}const tl=10,uC=tl*2,Wn=7,pC=4,lo=9,mC=3.5,Nd=1.08,gC=.05,Qr=14,hC=1,ea=14,ta=8;function fC({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),m=s.useRef(null),g=s.useRef(i);g.current=i;const x=s.useRef(null),b=s.useRef(null),E=s.useRef(null),f=s.useRef(null),[w,G]=s.useState([]),[X,k]=s.useState(yo),[L,A]=s.useState(null),U=s.useCallback(h=>{k(q=>nC(q,h)?q:h)},[]),$=c==="shape";s.useEffect(()=>{var h;$&&((h=v.current)==null||h.focus({preventScroll:!0}))},[$]),s.useEffect(()=>{$||G(h=>h.length?[]:h)},[$]);const P=w.length>0;s.useEffect(()=>{u==null||u(P)},[P,u]),s.useEffect(()=>()=>u==null?void 0:u(!1),[u]);const H=n.width>0?t.width/n.width:1,W=n.height>0?t.height/n.height:1,C=Math.min(H,W),T=r&&l?C:H,B=r&&l?C:W,S=r&&l?(t.width-n.width*C)/2:0,K=r&&l?(t.height-n.height*C)/2:0,R=s.useCallback(h=>r?{x:S+(h.x-n.x)*T,y:K+(h.y-n.y)*B}:{x:h.x-n.x,y:h.y-n.y},[r,n,T,B,S,K]),_=s.useCallback(h=>r?{x:n.x+(T>0?(h.x-S)/T:0),y:n.y+(B>0?(h.y-K)/B:0)}:{x:n.x+h.x,y:n.y+h.y},[r,n,T,B,S,K]),j=s.useMemo(()=>_({x:t.width/2,y:t.height/2}),[_,t.width,t.height]),oe=s.useCallback((h,q)=>{var te;const Z=(te=v.current)==null?void 0:te.getBoundingClientRect();if(!Z||Z.width<=0||Z.height<=0)return{x:0,y:0};if(r){const ue=(h-Z.left)/Z.width*t.width,z=(q-Z.top)/Z.height*t.height;return{x:n.x+(T>0?(ue-S)/T:0),y:n.y+(B>0?(z-K)/B:0)}}return{x:n.x+(h-Z.left),y:n.y+(q-Z.top)}},[r,n,t.width,t.height,T,B,S,K]),re=s.useCallback((h,q)=>{var te;const Z=(te=v.current)==null?void 0:te.getBoundingClientRect();return!Z||Z.width<=0||Z.height<=0?{x:0,y:0}:{x:(h-Z.left)/Z.width*t.width,y:(q-Z.top)/Z.height*t.height}},[t.width,t.height]),O=s.useCallback((h,q)=>{const Z=l&&!(q!=null&&q.preserveShape)?q$(h,n,t,S,K,T,B):h;y(Z,q)},[y,l,n,t,S,K,T,B]),ie=s.useCallback(()=>{A(null)},[]),D=s.useCallback((h,q,Z)=>{if(!Z||x.current||b.current||E.current||f.current){ie();return}const te=re(h,q),ue=cn(g.current,R);for(const V of ue)for(const Pe of V.nodes)if(Math.hypot(Pe.p.x-te.x,Pe.p.y-te.y)<=lo){ie();return}const z=Rd(ue,te);if(!z||z.distance>tl){ie();return}const I=ue[z.contour],Q=I==null?void 0:I.nodes[z.segment],ne=I==null?void 0:I.nodes[(z.segment+1)%((I==null?void 0:I.nodes.length)??1)],de=!!(Q&&ne&&!Vo(Q,ne));A(V=>V&&V.curved===de&&Math.hypot(V.point.x-z.point.x,V.point.y-z.point.y)<.25?V:{point:z.point,curved:de})},[re,R,ie]),le=h=>{var We;const q=h.metaKey||h.ctrlKey,Z=E.current;if(Z&&h.pointerId===Z.pointerId){if(h.stopPropagation(),h.preventDefault(),Z.startDistance<=0)return;const ot=oe(h.clientX,h.clientY),qe=Math.hypot(ot.x-Z.origin.x,ot.y-Z.origin.y),nt=Math.max(gC,qe/Z.startDistance);if(!Z.moved&&Math.abs(nt-1)<1e-4)return;Z.moved=!0,p(Td(Z.startContours,Z.origin,nt));return}const te=b.current;if(te&&h.pointerId===te.pointerId){h.stopPropagation(),h.preventDefault();const ot=oe(h.clientX,h.clientY),{bbox:qe}=te,nt=qe.maxX-qe.minX,tt=qe.maxY-qe.minY,Ve=ot.x-te.origin.x,ge=ot.y-te.origin.y;let _e=Ve,je=ge;if(isFinite(nt)&&isFinite(tt))if(r){let ye=n.x,Ne=n.x+n.width,Ke=n.y,Qe=n.y+n.height;l&&(T>0&&(ye=n.x+(0-S)/T,Ne=n.x+(t.width-S)/T),B>0&&(Ke=n.y+(0-K)/B,Qe=n.y+(t.height-K)/B));const st=Math.min(ye,Ne-nt),rt=Math.max(ye,Ne-nt),De=Math.min(Ke,Qe-tt),Me=Math.max(Ke,Qe-tt),gt=Math.min(rt,Math.max(st,qe.minX+Ve)),ze=Math.min(Me,Math.max(De,qe.minY+ge));_e=gt-qe.minX,je=ze-qe.minY}else{const ye=qe.minX-n.x,Ne=qe.minY-n.y,Ke=Math.min(0,t.width-nt),Qe=Math.max(0,t.width-nt),st=Math.min(0,t.height-tt),rt=Math.max(0,t.height-tt),De=Math.min(Qe,Math.max(Ke,ye+Ve)),Me=Math.min(rt,Math.max(st,Ne+ge));_e=De-ye,je=Me-Ne}const Ze=[];if(!q&&isFinite(nt)&&isFinite(tt)){const ye=R({x:qe.minX+nt/2+_e,y:qe.minY+tt/2+je}),Ne={x:t.width/2,y:t.height/2};Math.abs(ye.x-Ne.x)<=Qr&&(_e=j.x-qe.minX-nt/2,Ze.push(Ys(Ne.x,"x",t))),Math.abs(ye.y-Ne.y)<=Qr&&(je=j.y-qe.minY-tt/2,Ze.push(Ys(Ne.y,"y",t)))}if(!te.moved&&_e===0&&je===0)return;te.moved=!0,U(Ze.length?Ze:yo),p(cn(te.startContours,ye=>({x:ye.x+_e,y:ye.y+je})),{carryImage:!0});return}const ue=f.current;if(ue&&h.pointerId===ue.pointerId){h.stopPropagation(),h.preventDefault();const ot=oe(h.clientX,h.clientY);let qe=ot.x-ue.origin.x,nt=ot.y-ue.origin.y;if(h.shiftKey&&(Math.abs(qe)>Math.abs(nt)?nt=0:qe=0),!ue.moved&&qe===0&&nt===0)return;ue.moved=!0,p(Pd(ue.startContours,ue.selection,qe,nt));return}const z=x.current;if(!z||h.pointerId!==z.pointerId){D(h.clientX,h.clientY,w.length>0||$);return}ie(),h.stopPropagation(),h.preventDefault();const I=oe(h.clientX,h.clientY);if(z.kind==="anchor"){const ot={x:z.anchor.x+(I.x-z.origin.x),y:z.anchor.y+(I.y-z.origin.y)},qe=q?[]:tC(g.current,{contour:z.contour,node:z.node}),nt=q||!z.center?[]:[z.center],tt=Ed(kd(qe,nt.map(_e=>_e.x),"x"),ot,"x",R,Qr),Ve=Ed(kd(qe,nt.map(_e=>_e.y),"y"),ot,"y",R,Qr),ge=q?ot:{x:(tt==null?void 0:tt.value)??Yr(ot.x,o),y:(Ve==null?void 0:Ve.value)??Yr(ot.y,o)};if(h.shiftKey&&(Math.abs(ge.x-z.anchor.x)>Math.abs(ge.y-z.anchor.y)?ge.y=z.anchor.y:ge.x=z.anchor.x),!z.moved&&ge.x===z.anchor.x&&ge.y===z.anchor.y)return;z.moved=!0,U(rC(ge,tt,Ve,t,R)),p(K$(g.current,z.contour,z.node,ge));return}const Q=(We=g.current[z.contour])==null?void 0:We.nodes[z.node],ne=z.mirror&&!h.altKey,de=ne||q?null:z.kind==="in"?Q==null?void 0:Q.out:Q==null?void 0:Q.in,V=Q?R(Q.p):null,Pe=de?R(de):null,he=Q&&(!q||h.shiftKey)?sC(I,Q.p,ne||q?null:aC(g.current[z.contour],z.node,z.kind,R),V&&Pe?Math.hypot(Pe.x-V.x,Pe.y-V.y):null,h.shiftKey,R,_):{point:I,guides:yo},J=he.guides.length?he.point:q?I:{x:Yr(I.x,o),y:Yr(I.y,o)},He=z.kind==="in"?Q==null?void 0:Q.in:Q==null?void 0:Q.out;!z.moved&&He&&J.x===He.x&&J.y===He.y||(z.moved=!0,U(he.guides),p(Z$(g.current,z.contour,z.node,z.kind,J,ne)))},ee=h=>{U(yo);const q=E.current;if(q&&h.pointerId===q.pointerId){E.current=null,h.stopPropagation();const de=v.current;de!=null&&de.hasPointerCapture(q.pointerId)&&de.releasePointerCapture(q.pointerId),q.moved&&O(g.current,{preserveShape:!0});return}const Z=b.current;if(Z&&h.pointerId===Z.pointerId){b.current=null,h.stopPropagation();const de=v.current;de!=null&&de.hasPointerCapture(Z.pointerId)&&de.releasePointerCapture(Z.pointerId),Z.moved?O(g.current,{preserveShape:!0}):G([]);return}const te=f.current;if(te&&h.pointerId===te.pointerId){f.current=null,h.stopPropagation();const de=v.current;de!=null&&de.hasPointerCapture(te.pointerId)&&de.releasePointerCapture(te.pointerId),te.moved&&O(g.current);return}const ue=x.current;if(!ue||h.pointerId!==ue.pointerId)return;x.current=null,h.stopPropagation();const z=v.current;z!=null&&z.hasPointerCapture(ue.pointerId)&&z.releasePointerCapture(ue.pointerId);const I=Math.hypot(h.clientX-ue.clientOrigin.x,h.clientY-ue.clientOrigin.y);if(ue.moved||I>pC){ue.moved&&O(g.current);return}if(!ue.toggleOnRelease||h.type!=="pointerup")return;const ne=Id(g.current,ue.contour,ue.node);ne!==g.current&&(p(ne),O(ne))},ve=h=>{h.stopPropagation()},Ie=h=>{var q,Z;h.stopPropagation(),h.preventDefault(),ie(),(q=v.current)==null||q.focus({preventScroll:!0}),b.current={pointerId:h.pointerId,origin:oe(h.clientX,h.clientY),startContours:zn(i),bbox:$i(i),moved:!1},(Z=v.current)==null||Z.setPointerCapture(h.pointerId)},be=(h,q)=>{var I,Q;h.stopPropagation(),h.preventDefault(),ie(),(I=v.current)==null||I.focus({preventScroll:!0}),G([]),d("shape");const Z=$i(i),te=Sa(Z,Lp(q)),ue=Qs(Z,q),z=Math.hypot(ue.x-te.x,ue.y-te.y);!isFinite(z)||z<=0||(E.current={pointerId:h.pointerId,corner:q,origin:te,startDistance:z,startContours:zn(i),moved:!1},(Q=v.current)==null||Q.setPointerCapture(h.pointerId))},pe=(h,q,Z,te)=>{var I,Q,ne,de;h.stopPropagation(),h.preventDefault(),ie(),(I=v.current)==null||I.focus({preventScroll:!0});const ue=(Q=i[Z])==null?void 0:Q.nodes[te];if(!ue)return;if(h.altKey){const V=q==="anchor"?Tp(i,Z,te):J$(i,Z,te,q);if(V===i)return;G(q==="anchor"?[]:[{contour:Z,node:te}]),p(V),O(V);return}const z=h.metaKey||h.ctrlKey;if(q==="anchor"&&h.shiftKey&&!z){G(V=>V.some(Pe=>Pe.contour===Z&&Pe.node===te)?V.filter(Pe=>!(Pe.contour===Z&&Pe.node===te)):[...V,{contour:Z,node:te}]);return}if(q==="anchor"&&!z&&w.length>1&&w.some(V=>V.contour===Z&&V.node===te)){f.current={pointerId:h.pointerId,origin:oe(h.clientX,h.clientY),startContours:zn(i),selection:w,moved:!1},(ne=v.current)==null||ne.setPointerCapture(h.pointerId);return}G([{contour:Z,node:te}]),x.current={kind:q,contour:Z,node:te,pointerId:h.pointerId,origin:oe(h.clientX,h.clientY),clientOrigin:{x:h.clientX,y:h.clientY},anchor:ue.p,center:X$(i),mirror:q!=="anchor"&&!!(ue.in&&ue.out),toggleOnRelease:z,moved:!1},(de=v.current)==null||de.setPointerCapture(h.pointerId)},Y=h=>{h.stopPropagation(),h.preventDefault(),ie();const q=cn(i,R),Z=Rd(q,re(h.clientX,h.clientY));if(!Z||Z.distance>tl)return;const{contours:te,nodeIndex:ue}=Q$(i,Z.contour,Z.segment,Z.t);ue<0||(G([{contour:Z.contour,node:ue}]),p(te),O(te))},se=h=>{if(h.key==="="||h.key==="+"||h.key==="-"||h.key==="_"){h.preventDefault(),h.stopPropagation();const z=$i(i);if(!isFinite(z.minX)||!isFinite(z.maxX))return;const I={x:(z.minX+z.maxX)/2,y:(z.minY+z.maxY)/2},ne=h.key==="="||h.key==="+"?Nd:1/Nd,de=Td(i,I,ne);p(de),O(de,{preserveShape:!0});return}if(h.key==="Escape"){h.stopPropagation(),G([]),d("none");return}if(!w.length)return;if(h.key==="Backspace"||h.key==="Delete"){h.preventDefault(),h.stopPropagation();const z=Y$(i,w);if(z===i)return;G([]),p(z),O(z);return}const q=o>0?o:hC,Z=h.shiftKey?q*10:q,te={ArrowLeft:[-Z,0],ArrowRight:[Z,0],ArrowUp:[0,-Z],ArrowDown:[0,Z]}[h.key];if(!te)return;h.preventDefault(),h.stopPropagation();const ue=Pd(i,w,te[0],te[1]);p(ue),O(ue)},xe=s.useMemo(()=>Ho(cn(i,R)),[i,R]),Se=s.useMemo(()=>$i(i),[i]),Ce=R({x:Se.minX,y:Se.minY}),Ae={width:R({x:Se.maxX,y:Se.minY}).x-Ce.x,height:R({x:Se.minX,y:Se.maxY}).y-Ce.y},fe=$&&w.length===0&&isFinite(Se.minX)&&isFinite(Se.maxX)&&Se.maxX>Se.minX&&Se.maxY>Se.minY,we=w.length>0||$,Te=we;return a.jsxs("svg",{ref:v,className:`${e}-editor${we?` ${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:ie,onPointerUp:ee,onPointerCancel:ee,onLostPointerCapture:ee,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:()=>{G([]),d("none")},onClick:Y}),Te&&a.jsx("path",{className:`${e}-editor-outline`,d:xe}),Te&&X.map((h,q)=>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}-${q}`)),a.jsx("path",{ref:m,className:`${e}-editor-body`,d:xe,fillRule:"evenodd",onPointerDown:Ie,onClick:Y}),Te&&a.jsx("path",{className:`${e}-editor-hit`,d:xe,style:{strokeWidth:uC},onClick:Y}),Te&&L&&a.jsx("rect",{className:`${e}-editor-add-preview`,x:L.point.x-Wn/2,y:L.point.y-Wn/2,width:Wn,height:Wn,rx:L.curved?Wn/2:0}),Te&&i.map((h,q)=>h.nodes.map((Z,te)=>{const ue=w.some(I=>I.contour===q&&I.node===te),z=R(Z.p);return a.jsxs("g",{children:[ue&&w.length===1&&["in","out"].map(I=>{const Q=Z[I];if(!Q)return null;const ne=R(Q);return a.jsxs("g",{children:[a.jsx("line",{className:`${e}-editor-handle-line`,x1:z.x,y1:z.y,x2:ne.x,y2:ne.y}),a.jsx("circle",{className:`${e}-editor-handle`,cx:ne.x,cy:ne.y,r:mC}),a.jsx("circle",{className:`${e}-editor-grab`,cx:ne.x,cy:ne.y,r:lo,onPointerDown:de=>pe(de,I,q,te),onClick:ve})]},I)}),a.jsx("rect",{className:`${e}-editor-anchor${ue?` ${e}-editor-anchor-selected`:""}`,x:z.x-Wn/2,y:z.y-Wn/2,width:Wn,height:Wn,rx:xp(Z)?Wn/2:0}),a.jsx("rect",{className:`${e}-editor-grab`,x:z.x-lo,y:z.y-lo,width:lo*2,height:lo*2,onPointerDown:I=>pe(I,"anchor",q,te),onClick:ve,onDoubleClick:I=>{I.stopPropagation(),I.preventDefault();const Q=Id(i,q,te);p(Q),O(Q)}})]},`${q}-${te}`)})),fe&&a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:Ce.x,y:Ce.y,width:Ae.width,height:Ae.height}),["nw","ne","se","sw"].map(h=>{const q=R(Qs(Se,h)),Z=h==="ne"||h==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:q.x-ta/2,y:q.y-ta/2,width:ta,height:ta}),a.jsx("rect",{className:`${e}-editor-scale-grab${Z?` ${e}-editor-scale-grab-nesw`:""}`,x:q.x-ea/2,y:q.y-ea/2,width:ea,height:ea,onPointerDown:te=>be(te,h),onClick:ve})]},h)})]})]})}const yC=4e3,vC=/^(?:https?:|mailto:|tel:)/i;function Pp(e){return!!e&&typeof e=="object"&&e.type==="link"}function xC(e){if(!e)return;const t=e.replace(/\s+/g,"");if(!(/^[a-z][a-z0-9+.-]*:/i.test(t)&&!vC.test(t)))return t}function bC(e){const t=[];return e.forEach((n,i)=>{const o=(r,l,c)=>{for(const d of r){if(Pp(d)){o(d.children??[],xC(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 _d(e){return{...e.fontFamily&&{fontFamily:zo(e.fontFamily)},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}function SC(e){return e.map(t=>{const n=[],i=o=>{for(const r of o){if(Pp(r)){i(r.children??[]);continue}n.push((r==null?void 0:r.text)??"")}};return i((t==null?void 0:t.children)??[]),n.join("")})}function wC(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 g=m.x*n,x=m.y*i;g<c&&(c=g),g>d&&(d=g),x<u&&(u=x),x>p&&(p=x)}const y=(c+d)/2,v=(u+p)/2;return l.map(m=>{const g=m.x*n,x=m.y*i,b=g-y,E=x-v,f=Math.sqrt(b*b+E*E);if(f<1e-6)return m;const G=Math.max(0,f+r*t)/f;return{x:(y+b*G)/n,y:(v+E*G)/i}})})}const $s=2,Cs=2;function $C(e,t,n,i,o){if(e.kind!=="whole")return null;const r=t[e.originalIndex],l=e.token.text;if(!r||l.length<$s+Cs)return null;const c=Math.min(r.length-Cs,l.length-Cs);let d=-1;for(let u=c;u>=$s;u-=1)if(r[u-1]*i+o*i<=n){d=u;break}return d<$s?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 Hd(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,m=e.charWidths??[],g=e.hyphenWidth??0,x=e.lineHeight*l,b=e.spaceWidth*l,E=Math.max(0,e.shapeMargin??0),f=[],w=t.map((T,B)=>({token:T,originalIndex:B,width:n[B],kind:"whole"}));if(!w.length||c<=0||x<=0)return{segments:f,placed:0,height:0,capLeft:0,capTop:0,renderTokens:t};const G=Math.max(1,b*.5),X=x*T$,k=wC(i,E,c,d,o);let L=0,A=0,U=0,$=w[0].token.para,P=0,H=0,W=null;for(;L<w.length&&U<yC;){const T=A+x>d;if(T&&!u)break;const B=w[L].token.para;if(B>$+1){A+=x*(B-$-1),$=B-1,U+=1;continue}let S=T?[{x0:0,x1:c}]:A$(k,(A+X)/d,(A+x-X)/d,o).map(R=>({x0:R.x0*c,x1:R.x1*c}));p>0&&y>0&&!T&&S.length&&(W===null&&(W=U,P=S[0].x0,H=A),U-W<y&&(S=M$(S,{x0:P,x1:P+p})));const K=S.reduce((R,_)=>Math.max(R,_.x1-_.x0),0);for(const R of S){const _=R.x1-R.x0;if(_<G)continue;if(L>=w.length||w[L].token.para!==B)break;const j=L;let oe=0;for(;L<w.length&&w[L].token.para===B;){const re=w[L],O=L===j,ie=re.width*l,D=O?ie:b+ie;if(oe+D<=_){oe+=D,L+=1;continue}if(O&&_>=K-.5&&ie>c-.5){oe+=D,L+=1;continue}if(v){const ee=_-oe-(O?0:b),ve=$C(re,m,ee,l,g);if(ve){const Ie={token:{...re.token,text:ve.fragmentText},originalIndex:re.originalIndex,width:ve.fragmentWidth,kind:"fragment"},be={token:{...re.token,text:ve.remainderText},originalIndex:re.originalIndex,width:ve.remainderWidth,kind:"remainder"};w.splice(L,1,Ie,be),oe+=(O?0:b)+ve.fragmentWidth*l,L+=1}}break}if(L>j){const re=L>=w.length||w[L].token.para!==B;f.push({top:A,left:R.x0,width:_,from:j,to:L,justify:r==="justify"&&!re})}if(L>=w.length||w[L].token.para!==B)break}$=B,A+=x,U+=1}let C=0;if(L>0){const T=w[L-1];C=T.kind==="fragment"?T.originalIndex:T.originalIndex+1}return{segments:f,placed:C,height:f.length?A:0,capLeft:P,capTop:H,renderTokens:w.map(T=>T.token)}}const CC=.12,TC=2,LC=10,Ts=.25,PC=e=>{const t=e.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}},IC=(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,RC=(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=PC(e);(!r||!IC(r,c))&&(r=c,i(c)),o=requestAnimationFrame(l)};return l(),()=>cancelAnimationFrame(o)},[e,t]),n},Ls=(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})))},er=typeof window>"u"?s.useEffect:s.useLayoutEffect;function kC(){return typeof document>"u"?null:document.body}function EC({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:m,showOverflowIndicator:g,dropCapLines:x,dropCapSize:b,showGuides:E,typography:f,imageUrl:w,imageFocalX:G,imageFocalY:X,imageScale:k,imageCustomPath:L,pathDragActive:A,pathCarryImage:U,onCarryImageConsumed:$,pathEditor:P,imageEditor:H}){var Xe,lt;const W=`pretext-shape-image-${s.useId().replace(/:/g,"")}`,[C,T]=s.useState(null),B=s.useRef(null),[S,K]=s.useState({width:0,height:0}),[R,_]=s.useState(0),[j,oe]=s.useState(null),[re,O]=s.useState(0),[ie,D]=s.useState("none");s.useEffect(()=>{!P&&!H&&D("none")},[P,H]);const[le,ee]=s.useState(null);s.useEffect(()=>{if(!w||typeof Image>"u"){ee(null);return}let me=!1;const Re=new Image;return Re.onload=()=>{me||ee({width:Re.naturalWidth,height:Re.naturalHeight})},Re.src=w,()=>{me=!0}},[w]);const ve=s.useMemo(()=>Array.isArray(t==null?void 0:t.text)?t.text:[],[t]),Ie=s.useMemo(()=>bC(ve),[ve]),be=s.useMemo(()=>SC(ve),[ve]),pe=x>0&&b>1?((lt=(Xe=Ie[0])==null?void 0:Xe.text)==null?void 0:lt.charAt(0))??"":"",Y=(P==null?void 0:P.contours)??null,se=s.useMemo(()=>{let me=[];if(Y){const Re=br(Y);Re.length&&(me=$o(Re,r))}if(!me.length){const Re=i.trim(),it=Re?Sd(Re,o,r):null;it&&it.length?me=it:me=Xs(n==="custom"?"rectangle":n)}return n==="circle"?Ls(me,S):me},[Y,n,i,o,r,S.width,S.height]),xe=P==null?void 0:P.onConvert,Se=(P==null?void 0:P.needsConversion)??!1,Ce=s.useMemo(()=>{if(n==="circle")return!1;const me=Y??(i.trim()?Ii(i):null);return!!(me&&$p(me,r))},[Y,i,r,n]),[Ae,fe]=s.useState(null);er(()=>{if(!Ce){Ae&&fe(null);return}!Ae&&S.width>0&&S.height>0&&fe({width:S.width,height:S.height})},[Ce,S.width,S.height,Ae]);const we=s.useMemo(()=>{if(!Ce||S.width<=0||S.height<=0)return se;const me=Ae??S,Re=r.width/me.width,it=r.height/me.height;return se.map(ht=>ht.map(Ge=>({x:Ge.x*Re,y:Ge.y*it})))},[se,Ce,Ae,r.width,r.height,S.width,S.height]),Te=s.useMemo(()=>{if(Y){const ht=br(Y);if(ht.length){const Ge=$o(ht,r);return n==="circle"?Ls(Ge,S):Ge}}const me=L.trim(),Re=me?Sd(me,o,r):null,it=Re&&Re.length?Re:Xs(n==="custom"?"rectangle":n);return n==="circle"?Ls(it,S):it},[Y,n,L,o,r,S.width,S.height]),h=s.useMemo(()=>{if(!Ce||S.width<=0||S.height<=0)return Te;const me=Ae??S,Re=r.width/me.width,it=r.height/me.height;return Te.map(ht=>ht.map(Ge=>({x:Ge.x*Re,y:Ge.y*it})))},[Te,Ce,Ae,r.width,r.height,S.width,S.height]),q=s.useRef(null),Z=s.useRef(!1);s.useEffect(()=>{if(!(!xe||S.width<=0||S.height<=0)){if(Ce){if(q.current===i)return;const me=Y??(i.trim()?Ii(i):null);if(!(me!=null&&me.length))return;const Re=cn(me,it=>({x:r.x+(it.x-r.x)/S.width*r.width,y:r.y+(it.y-r.y)/S.height*r.height}));q.current=Ho(Re),xe(Re);return}!Se||!se.length||Z.current||(Z.current=!0,xe(cn(wp(se),me=>({x:me.x*ba,y:me.y*ba}))))}},[Se,Ce,xe,se,Y,i,r,S.width,S.height]);const te=s.useCallback(()=>{const me=C;if(!me)return;const Re=me.getBoundingClientRect(),it=parseFloat(window.getComputedStyle(me).paddingTop)||0;_(Ge=>Math.abs(Ge-it)<.5?Ge:it);const ht={width:Re.width,height:Re.height};K(Ge=>Math.abs(Ge.width-ht.width)<.5&&Math.abs(Ge.height-ht.height)<.5?Ge:ht)},[C]);er(()=>{const me=C;if(!me||typeof ResizeObserver>"u")return;te();const Re=new ResizeObserver(te);return Re.observe(me),()=>Re.disconnect()},[C,te]),er(()=>{te()},[v,te]),s.useEffect(()=>{const me=typeof document<"u"?document.fonts:void 0;me!=null&&me.ready&&me.ready.then(()=>{O(Re=>Re+1)})},[]),er(()=>{const me=B.current;if(!me)return;if(!Ie.length){oe(null);return}const Re=[],it=document.createDocumentFragment();for(const pt of Ie){const N=document.createElement("span");Object.assign(N.style,_d(pt.leaf)),N.textContent=pt.text,it.appendChild(N),Re.push(N)}const ht=document.createElement("span");ht.textContent=" ",it.appendChild(ht);const Ge=document.createElement("span");Ge.textContent="-",it.appendChild(Ge);const St=pe||"H",Pt=document.createElement("span");Pt.textContent=St,Pt.style.lineHeight="1",it.appendChild(Pt),me.replaceChildren(it);const kt=window.getComputedStyle(me),$t=parseFloat(kt.fontSize)||16,jt=parseFloat(kt.lineHeight),Bt=Number.isNaN(jt)?$t*1.2:jt,Xt=Math.max(Bt,$t),qt=document.createElement("span");qt.textContent=St,qt.style.lineHeight=`${Xt}px`;const It=document.createElement("span");It.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",qt.appendChild(It),me.appendChild(qt);const Dt=qt.getBoundingClientRect().top,on=It.getBoundingClientRect().top,xt=Math.max(1,on-Dt);qt.remove();let ft=xt*.8;const et=document.createElement("canvas").getContext("2d"),Je=pt=>`${kt.fontStyle} ${kt.fontWeight} ${pt}px ${kt.fontFamily}`;if(et){et.font=Je($t);const pt=et.measureText(St).actualBoundingBoxAscent;pt>0&&(ft=pt)}const dt=b>1?(b-1)*Xt+ft:ft;let Tt=$t*(dt/ft);if(et){et.font=Je(Tt);const pt=et.measureText(St).actualBoundingBoxAscent;pt>0&&(Tt=Tt*(dt/pt))}Pt.style.fontSize=`${Tt}px`,Pt.style.lineHeight=`${Tt}px`;const vt=document.createElement("span");vt.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",Pt.appendChild(vt);const ut=Math.max(1,vt.getBoundingClientRect().top-Pt.getBoundingClientRect().top);vt.remove();const Mt=(b-1)*Xt+xt-ut,Ht=Re.map(pt=>pt.getBoundingClientRect().width),Ut=ht.getBoundingClientRect().width,Et=Ge.getBoundingClientRect().width,Wt=pe?Pt.getBoundingClientRect().width:0,At=m?Re.map(pt=>{const N=pt.firstChild;if(!(N instanceof Text)||N.data.length<4)return;const Le=document.createRange(),Be=pt.getBoundingClientRect().left,Fe=[];for(let mt=1;mt<=N.data.length;mt+=1)Le.setStart(N,0),Le.setEnd(N,mt),Fe.push(Le.getBoundingClientRect().right-Be);return Fe}):[];me.replaceChildren(),oe({widths:Ht,spaceWidth:Ut,dashWidth:Et,charWidths:At,lineHeight:Xt,capWidth:Wt,dropCapFontSize:Tt,dropCapTopAdjust:Mt})},[Ie,f,pe,x,b,re,S.width,m]);const ue=j&&pe?j.capWidth+j.lineHeight*CC:0,z=Math.max(x,Math.ceil(b)),I=s.useMemo(()=>{if(!j||!Ie.length||S.width<=0||S.height<=0||!u)return 1;const me=ht=>Hd({tokens:Ie,widths:j.widths,spaceWidth:j.spaceWidth,lineHeight:j.lineHeight,width:S.width,height:S.height,rings:we,mode:l,align:c,scale:ht,allowOverflow:!1,capInset:ue*ht,capLines:pe?z:0,hyphenate:m,charWidths:j.charWidths,hyphenWidth:j.dashWidth,shapeMargin:R});if(me(1).placed>=Ie.length)return 1;if(me(Ts).placed<Ie.length)return Ts;let Re=Ts,it=1;for(let ht=0;ht<LC;ht+=1){const Ge=(Re+it)/2;me(Ge).placed>=Ie.length?Re=Ge:it=Ge}return Re},[j,Ie,S.width,S.height,we,l,c,u,ue,pe,z,m,R]);s.useEffect(()=>{y(I)},[I,y]);const Q=u?Math.min(p,I):1,ne=s.useMemo(()=>!j||!Ie.length||S.width<=0||S.height<=0?{segments:[],placed:0,height:0,capLeft:0,capTop:0,renderTokens:Ie}:Hd({tokens:Ie,widths:j.widths,spaceWidth:j.spaceWidth,lineHeight:j.lineHeight,width:S.width,height:S.height,rings:we,mode:l,align:c,scale:Q,allowOverflow:d,capInset:ue*Q,capLines:pe?z:0,hyphenate:m,charWidths:j.charWidths,hyphenWidth:j.dashWidth,shapeMargin:R}),[j,Ie,S.width,S.height,we,l,c,Q,d,ue,pe,z,m,R]),de=g&&Ie.length>0&&ne.placed<Ie.length,V=j?j.dropCapFontSize*Q:0,Pe=j?j.dropCapTopAdjust*Q:0,he=c==="justify"?"left":c,J=j?j.lineHeight*Q:0,He=ne.segments.length?ne.segments[ne.segments.length-1]:null,We=He?{top:He.top+J,left:He.left+He.width/2}:{top:S.height,left:S.width/2},ot=!!(P&&Y&&S.width>0&&S.height>0),qe=!!H,nt=(ot||qe)&&S.width>0&&S.height>0,tt=RC(C,nt),Ve=nt&&tt?kC():null,ge=s.useRef(!1),_e=s.useCallback(me=>{ge.current=me},[]);s.useEffect(()=>{if(!ot&&!qe)return;const me=Re=>{const it=C;if(!it)return;const ht=it.getBoundingClientRect();Re.clientX>=ht.left&&Re.clientX<=ht.right&&Re.clientY>=ht.top&&Re.clientY<=ht.bottom&&(Re.preventDefault(),Re.stopPropagation(),D(St=>St==="shape"&&ge.current?St:St==="shape"&&qe?"image":ot?"shape":"image"))};return document.addEventListener("dblclick",me,!0),()=>document.removeEventListener("dblclick",me,!0)},[ot,qe,C]);const je=s.useMemo(()=>w&&S.width>0&&S.height>0?L$(h,S):null,[w,h,S.width,S.height]),Ze=s.useRef(null),ye=(()=>{const me=Ze.current;return U||!H||!le||!je||!me||L===me.customPath||me.shape!==n&&n!=="custom"?null:cC(me.bounds,je,le,me.focalX,me.focalY,me.scale)})();er(()=>{if(A||!H||!le||!je)return;const me=Ze.current,Re=!!(me&&L!==me.customPath);Re&&ye&&H.onCommit(ye),Re&&U&&($==null||$()),Ze.current={rings:h,bounds:je,focalX:(ye==null?void 0:ye.focalX)??G,focalY:(ye==null?void 0:ye.focalY)??X,scale:(ye==null?void 0:ye.scale)??k,customPath:L,shape:n}},[A,U,L,n,h,je,H,le,G,X,k,ye,$]);const Ne=Ze.current,Ke=!!(A&&!U&&Ne&&!ye),Qe=Ke&&Ne?Ne.focalX:(ye==null?void 0:ye.focalX)??G,st=Ke&&Ne?Ne.focalY:(ye==null?void 0:ye.focalY)??X,rt=Ke&&Ne?Ne.scale:(ye==null?void 0:ye.scale)??k,De=Ke&&Ne?Ne.bounds:je,Me=s.useMemo(()=>{if(!(S.width>0)||!(S.height>0))return"";let me=$d(i,Y,o,r,n,S);if(Ce){const Re=Ae??S,it=r.width/Re.width,ht=r.height/Re.height;me=cn(me,Ge=>({x:Ge.x*it,y:Ge.y*ht}))}return Cd(me,S)||bd(we,S)},[i,Y,o,r,n,S.width,S.height,Ce,Ae,we]),gt=s.useMemo(()=>{if(!w||!(S.width>0)||!(S.height>0))return"";let me=$d(L,Y,o,r,n,S);if(Ce){const Re=Ae??S,it=r.width/Re.width,ht=r.height/Re.height;me=cn(me,Ge=>({x:Ge.x*it,y:Ge.y*ht}))}return Cd(me,S)||bd(h,S)},[w,L,Y,o,r,n,S.width,S.height,Ce,Ae,h]),ze=`${W}-clip`,Oe=s.useMemo(()=>{if(!De)return null;const me=le??{width:De.width,height:De.height},Re=Xi(De,me,rt);return{x:Dn(De.width,Re.width,Qe),y:Dn(De.height,Re.height,st),width:Re.width,height:Re.height}},[De,le,Qe,st,rt]);return a.jsxs("div",{className:`${e}-column`,style:{padding:v},ref:T,children:[Me?a.jsxs("svg",{className:`${e}-shape-fill`,style:{top:0,left:0,width:S.width,height:S.height},viewBox:`0 0 ${S.width} ${S.height}`,preserveAspectRatio:"none","aria-hidden":!0,children:[a.jsx("path",{className:`${e}-shape-fill-path`,d:Me,fillRule:"evenodd"}),w&&gt&&De&&Oe?a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsx("clipPath",{id:ze,clipPathUnits:"userSpaceOnUse",children:a.jsx("path",{d:gt,fillRule:"evenodd"})})}),a.jsx("image",{href:w,x:De.x+Oe.x,y:De.y+Oe.y,width:Oe.width,height:Oe.height,preserveAspectRatio:"none",clipPath:`url(#${ze})`})]}):null]}):null,a.jsxs("div",{className:`${e}-flow${d?"":` ${e}-clip`}`,style:{...f,["--"+e+"-fit"]:Q,top:0,left:0,width:S.width,height:S.height},children:[a.jsx("div",{className:`${e}-measure`,ref:B,style:f,"aria-hidden":!0}),ne.segments.map((me,Re)=>{const it=ne.renderTokens.slice(me.from,me.to),ht=Re===0;return a.jsx("div",{className:`${e}-line${me.justify?` ${e}-line-justify`:""}`,"aria-hidden":!0,style:{top:`${me.top}px`,left:`${me.left}px`,width:`${me.width}px`,textAlign:me.justify?void 0:he},children:it.map((Ge,St)=>{const kt=pe&&ht&&me.from===0&&St===0?Ge.text.slice(1):Ge.text,$t=_d(Ge.leaf),jt=Ge.href?a.jsx("a",{className:`${e}-link`,href:Ge.href,target:Ge.target,rel:Ge.target?"noopener noreferrer":void 0,style:$t,children:kt}):a.jsx("span",{style:$t,children:kt});return a.jsxs("span",{children:[!me.justify&&St>0?" ":null,jt]},St)})},`${me.from}-${me.to}-${Re}`)}),E&&!Y&&a.jsx("svg",{className:`${e}-guides`,viewBox:"0 0 1 1",preserveAspectRatio:"none","aria-hidden":!0,children:we.map((me,Re)=>a.jsx("polygon",{points:me.map(it=>`${it.x},${it.y}`).join(" ")},Re))})]}),pe&&j&&a.jsx("div",{className:`${e}-drop-cap`,"aria-hidden":!0,style:{...f,top:`${ne.capTop+Pe}px`,left:`${ne.capLeft}px`,fontSize:`${V}px`,lineHeight:`${V}px`},children:pe}),Ve&&tt&&(Y&&P||H)&&Gn.createPortal(a.jsxs("div",{"data-selection":"none",style:{position:"fixed",top:tt.top,left:tt.left,width:tt.width,height:tt.height,zIndex:TC,pointerEvents:"none"},children:[Y&&P&&a.jsx(fC,{P:e,box:{width:tt.width,height:tt.height},viewBox:r,contours:Y,snap:P.snap,stretchToBox:!Ce,uniformStretch:n==="circle",stage:ie,onStageChange:D,onSelectionChange:_e,onChange:P.onChange,onCommit:P.onCommit}),H&&De&&a.jsx(dC,{P:e,box:{width:tt.width,height:tt.height},bounds:De,natural:le,imageUrl:w,maskPath:gt,stage:ie,onStageChange:D,focalX:Qe,focalY:st,scale:rt,onChange:H.onChange,onCommit:H.onCommit})]}),Ve),a.jsx("div",{className:`${e}-a11y`,children:be.map((me,Re)=>a.jsx("p",{children:me},Re))}),de&&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 Ip=["diamond","parallelogram","vase","circle","shield","bobbin","custom"],MC={x:0,y:0,width:100,height:100},AC=e=>{const t=(e??"").trim().split(/[\s,]+/).map(Number).filter(n=>!Number.isNaN(n));return t.length<4||t[2]<=0||t[3]<=0?MC:{x:t[0],y:t[1],width:t[2],height:t[3]}},FC=e=>`
26851
26853
  .${e}-wrapper {
26852
26854
  box-sizing: border-box;
26853
26855
  display: flex;
@@ -27076,7 +27078,7 @@ export function Burger({
27076
27078
  clip-path: inset(50%);
27077
27079
  white-space: nowrap;
27078
27080
  }
27079
- `,NC=1;function _C({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,isSelected:r,onUpdateSettings:l}){const{prefix:d}=_.useScopedStyles(),c=s.useMemo(()=>FC(d),[d]),u=n??!1,p=!!r||!!o,x=s.useMemo(()=>Array.isArray(t)?t[0]??{}:{},[t]),y=(e==null?void 0:e.shape)??"custom",m=(e==null?void 0:e.customPath)??"",g=(e==null?void 0:e.pathFit)??"stretch",v=s.useMemo(()=>AC(e==null?void 0:e.pathViewBox),[e==null?void 0:e.pathViewBox]),b=(e==null?void 0:e.shapeMode)==="B"?"avoid":"contain",E=(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",G=((e==null?void 0:e.hyphenate)??"off")==="on",X=_.scalingValue((e==null?void 0:e.padding)??0,u),M=(e==null?void 0:e.dropCapSize)??NC,T=Math.max(1,Math.round((e==null?void 0:e.dropCapLines)??M)),N=u&&p&&!i,q=u&&!i,[$,I]=s.useState(!1);s.useEffect(()=>{if(!u||!p){I(!1);return}const B=()=>I(!0),P=()=>I(!1),Q=["ArticleEditor.Item:drag-start","ArticleEditor.Selection:resize-start","ArticleEditor.Selection:move-start"],ee=["ArticleEditor.Item:drag-end","ArticleEditor.Selection:resize-end","ArticleEditor.Selection:move-end"];for(const de of Q)window.addEventListener(de,B);for(const de of ee)window.addEventListener(de,P);return()=>{for(const de of Q)window.removeEventListener(de,B);for(const de of ee)window.removeEventListener(de,P)}},[u,p]);const W=u&&p&&!i&&typeof l=="function",O=!$,C=Math.max(0,(e==null?void 0:e.pathSnap)??0),L=s.useRef(e??{}),z=s.useRef(""),S=[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(S!==z.current)z.current=S,L.current=e??{};else if(e){const{customPath:B,shape:P,pathFit:Q,pathViewBox:ee,imageScale:de,imageFocalX:V,imageFocalY:Pe,image:he,...J}=e,Ne=L.current;for(const Be of Object.keys(J))if(Ne[Be]!==J[Be]){L.current={...Ne,...J};break}}const[K,k]=s.useState(null),[H,j]=s.useState(!1),[ne,oe]=s.useState(!1),R=s.useCallback(()=>oe(!1),[]),ce=L.current.shape??y,D=s.useMemo(()=>!K||K.serialized===m?m:K.serialized,[K,m]);s.useEffect(()=>{W||(j(!1),oe(!1))},[W]),s.useEffect(()=>{!K||H||K.serialized===m&&k(null)},[K,m,H]);const le=s.useMemo(()=>{if(!W)return null;if(K&&(K.base===m||K.serialized===m))return K.contours;const B=Ii(m);return B.length?B:null},[W,K,m]),ie=!!(g==="viewbox"&&((e==null?void 0:e.pathViewBox)??"")===Vs&&le&&(y==="circle"||!$p(le,v))),we=s.useCallback((B,P,Q)=>{const ee=Ho(B);if(k(de=>({base:de&&(de.base===m||de.serialized===m)?de.base:m,serialized:ee,contours:B})),P){const de=L.current,V=Q!=null&&Q.preserveShape?de.shape:"custom",Pe={...de,shape:V,customPath:ee};L.current=Pe,l==null||l(Pe)}},[m,l]),Ie=s.useMemo(()=>W?{contours:ie?le:null,snap:C,needsConversion:!ie,onConvert:B=>{const P=Ho(B);k({base:P,serialized:P,contours:B});const Q={...L.current,pathFit:"viewbox",pathViewBox:Vs,customPath:P};L.current=Q,l==null||l(Q)},onChange:(B,P)=>{j(!0),oe(!!(P!=null&&P.carryImage)),we(B,!1)},onCommit:(B,P)=>{we(B,!0,P),j(!1)}}:null,[W,ie,le,C,l,we]),xe=b==="avoid"&&!!(e!=null&&e.image),pe=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]),[Y,ae]=s.useState(null),se=Y??pe,Re=s.useCallback(B=>ae(B),[]),$e=s.useCallback(B=>{ae(B);const P={...L.current,imageFocalX:B.focalX,imageFocalY:B.focalY,imageScale:B.scale};L.current=P,l==null||l(P)},[l]);s.useEffect(()=>{Y&&Math.abs(Y.focalX-pe.focalX)<1e-9&&Math.abs(Y.focalY-pe.focalY)<1e-9&&Math.abs(Y.scale-pe.scale)<1e-9&&ae(null)},[Y,pe]);const Me=s.useMemo(()=>!W||!xe?null:{onChange:Re,onCommit:$e},[W,xe,Re,$e]),[ve,be]=s.useState(void 0),Ce=s.useRef(void 0),h=s.useCallback(B=>{const P=Ce.current;P!==void 0&&Math.abs(P-B)<.005||(Ce.current=B,be(B))},[]),U=s.useMemo(()=>w&&typeof ve=="number"?ve:1,[ve,w]),Z=B=>`calc(${B} * var(--${d}-fit, 1))`,te=s.useMemo(()=>{var Q,ee,de,V,Pe;const B=(e==null?void 0:e.textFontSize)??.012,P=Math.max((e==null?void 0:e.textLineHeight)??B,B);return{fontFamily:zo(e==null?void 0:e.textFontFamily),fontWeight:(Q=e==null?void 0:e.textFontSettings)==null?void 0:Q.fontWeight,fontStyle:(ee=e==null?void 0:e.textFontSettings)==null?void 0:ee.fontStyle,fontSize:Z(_.scalingValue(B,u)),lineHeight:Z(_.scalingValue(P,u)),letterSpacing:Z(_.scalingValue((e==null?void 0:e.textLetterSpacing)??0,u)),wordSpacing:Z(_.scalingValue((e==null?void 0:e.textWordSpacing)??0,u)),textTransform:(de=e==null?void 0:e.textTextAppearance)==null?void 0:de.textTransform,textDecoration:(V=e==null?void 0:e.textTextAppearance)==null?void 0:V.textDecoration,fontVariant:(Pe=e==null?void 0:e.textTextAppearance)==null?void 0:Pe.fontVariant}},[e,u,d]),me={[`--${d}-text-color`]:(e==null?void 0:e.textColor)??"#000000",[`--${d}-link-color`]:(e==null?void 0:e.linkColor)??(e==null?void 0:e.textColor)??"#000000",[`--${d}-background-color`]:(e==null?void 0:e.backgroundColor)??"transparent"};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),a.jsx("div",{className:`${d}-wrapper`,style:{...me},children:a.jsx(EC,{P:d,item:x,shape:ce,customPath:m,pathFit:g,viewBox:v,mode:b,align:E,allowOverflow:f,fitEnabled:w,scale:U,onFitScale:h,padding:X,hyphenate:G,showOverflowIndicator:q,dropCapLines:T,dropCapSize:M,showGuides:(N||W)&&O,typography:te,imageUrl:b==="avoid"?e==null?void 0:e.image:null,imageFocalX:se.focalX,imageFocalY:se.focalY,imageScale:se.scale,imageCustomPath:D,pathDragActive:H,pathCarryImage:ne,onCarryImageConsumed:R,pathEditor:O?Ie:null,imageEditor:O?Me:null})})]})}const HC=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
27081
+ `,NC=1;function _C({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,isSelected:r,onUpdateSettings:l}){const{prefix:c}=F.useScopedStyles(),d=s.useMemo(()=>FC(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",m=(e==null?void 0:e.customPath)??"",g=(e==null?void 0:e.pathFit)??"stretch",x=s.useMemo(()=>AC(e==null?void 0:e.pathViewBox),[e==null?void 0:e.pathViewBox]),b=(e==null?void 0:e.shapeMode)==="B"?"avoid":"contain",E=(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",G=((e==null?void 0:e.hyphenate)??"off")==="on",X=F.scalingValue((e==null?void 0:e.padding)??0,u),k=(e==null?void 0:e.dropCapSize)??NC,L=Math.max(1,Math.round((e==null?void 0:e.dropCapLines)??k)),A=u&&p&&!i,U=u&&!i,[$,P]=s.useState(!1);s.useEffect(()=>{if(!u||!p){P(!1);return}const z=()=>P(!0),I=()=>P(!1),Q=["ArticleEditor.Item:drag-start","ArticleEditor.Selection:resize-start","ArticleEditor.Selection:move-start"],ne=["ArticleEditor.Item:drag-end","ArticleEditor.Selection:resize-end","ArticleEditor.Selection:move-end"];for(const de of Q)window.addEventListener(de,z);for(const de of ne)window.addEventListener(de,I);return()=>{for(const de of Q)window.removeEventListener(de,z);for(const de of ne)window.removeEventListener(de,I)}},[u,p]);const H=u&&p&&!i&&typeof l=="function",W=!$,C=Math.max(0,(e==null?void 0:e.pathSnap)??0),T=s.useRef(e??{}),B=s.useRef(""),S=[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(S!==B.current)B.current=S,T.current=e??{};else if(e){const{customPath:z,shape:I,pathFit:Q,pathViewBox:ne,imageScale:de,imageFocalX:V,imageFocalY:Pe,image:he,...J}=e,He=T.current;for(const We of Object.keys(J))if(He[We]!==J[We]){T.current={...He,...J};break}}const[K,R]=s.useState(null),[_,j]=s.useState(!1),[oe,re]=s.useState(!1),O=s.useCallback(()=>re(!1),[]),ie=T.current.shape??v,D=s.useMemo(()=>!K||K.serialized===m?m:K.serialized,[K,m]);s.useEffect(()=>{H||(j(!1),re(!1))},[H]),s.useEffect(()=>{!K||_||K.serialized===m&&R(null)},[K,m,_]);const le=s.useMemo(()=>{if(!H)return null;if(K&&(K.base===m||K.serialized===m))return K.contours;const z=Ii(m);return z.length?z:null},[H,K,m]),ee=!!(g==="viewbox"&&((e==null?void 0:e.pathViewBox)??"")===Vs&&le&&(v==="circle"||!$p(le,x))),ve=s.useCallback((z,I,Q)=>{const ne=Ho(z);if(R(de=>({base:de&&(de.base===m||de.serialized===m)?de.base:m,serialized:ne,contours:z})),I){const de=T.current,V=Q!=null&&Q.preserveShape?de.shape:"custom",Pe={...de,shape:V,customPath:ne};T.current=Pe,l==null||l(Pe)}},[m,l]),Ie=s.useMemo(()=>H?{contours:ee?le:null,snap:C,needsConversion:!ee,onConvert:z=>{const I=Ho(z);R({base:I,serialized:I,contours:z});const Q={...T.current,pathFit:"viewbox",pathViewBox:Vs,customPath:I};T.current=Q,l==null||l(Q)},onChange:(z,I)=>{j(!0),re(!!(I!=null&&I.carryImage)),ve(z,!1)},onCommit:(z,I)=>{ve(z,!0,I),j(!1)}}:null,[H,ee,le,C,l,ve]),be=b==="avoid"&&!!(e!=null&&e.image),pe=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]),[Y,se]=s.useState(null),xe=Y??pe,Se=s.useCallback(z=>se(z),[]),Ce=s.useCallback(z=>{se(z);const I={...T.current,imageFocalX:z.focalX,imageFocalY:z.focalY,imageScale:z.scale};T.current=I,l==null||l(I)},[l]);s.useEffect(()=>{Y&&Math.abs(Y.focalX-pe.focalX)<1e-9&&Math.abs(Y.focalY-pe.focalY)<1e-9&&Math.abs(Y.scale-pe.scale)<1e-9&&se(null)},[Y,pe]);const Ae=s.useMemo(()=>!H||!be?null:{onChange:Se,onCommit:Ce},[H,be,Se,Ce]),[fe,we]=s.useState(void 0),Te=s.useRef(void 0),h=s.useCallback(z=>{const I=Te.current;I!==void 0&&Math.abs(I-z)<.005||(Te.current=z,we(z))},[]),q=s.useMemo(()=>w&&typeof fe=="number"?fe:1,[fe,w]),Z=z=>`calc(${z} * var(--${c}-fit, 1))`,te=s.useMemo(()=>{var Q,ne,de,V,Pe;const z=(e==null?void 0:e.textFontSize)??.012,I=Math.max((e==null?void 0:e.textLineHeight)??z,z);return{fontFamily:zo(e==null?void 0:e.textFontFamily),fontWeight:(Q=e==null?void 0:e.textFontSettings)==null?void 0:Q.fontWeight,fontStyle:(ne=e==null?void 0:e.textFontSettings)==null?void 0:ne.fontStyle,fontSize:Z(F.scalingValue(z,u)),lineHeight:Z(F.scalingValue(I,u)),letterSpacing:Z(F.scalingValue((e==null?void 0:e.textLetterSpacing)??0,u)),wordSpacing:Z(F.scalingValue((e==null?void 0:e.textWordSpacing)??0,u)),textTransform:(de=e==null?void 0:e.textTextAppearance)==null?void 0:de.textTransform,textDecoration:(V=e==null?void 0:e.textTextAppearance)==null?void 0:V.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(EC,{P:c,item:y,shape:ie,customPath:m,pathFit:g,viewBox:x,mode:b,align:E,allowOverflow:f,fitEnabled:w,scale:q,onFitScale:h,padding:X,hyphenate:G,showOverflowIndicator:U,dropCapLines:L,dropCapSize:k,showGuides:(A||H)&&W,typography:te,imageUrl:b==="avoid"?e==null?void 0:e.image:null,imageFocalX:xe.focalX,imageFocalY:xe.focalY,imageScale:xe.scale,imageCustomPath:D,pathDragActive:_,pathCarryImage:oe,onCarryImageConsumed:O,pathEditor:W?Ie:null,imageEditor:W?Ae:null})})]})}const HC=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
27080
27082
  import type React from 'react';
27081
27083
  import { CommonComponentProps } from '../props';
27082
27084
  import { scalingValue, useScopedStyles } from '../utils/index';
@@ -27903,4 +27905,4 @@ export function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode
27903
27905
  </>
27904
27906
  );
27905
27907
  }
27906
- `,Wd=[...Ip],WC={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},OC={type:"object",version:1,settings:{sizing:"manual",properties:{shape:{type:"string",scope:"layout",display:{type:"shape-select",isFilled:!0,enum:Wd},enum:Wd},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:{...WC.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:{...Cp("circle"),pathSnap:0,shapeMode:"A",fitText:"off",hyphenate:"off",dropCapLines:1,dropCapSize:1,image:"https://cdn.cntrl.site/component-assets/shapedType_img.jpg",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."}]}]}]}},DC={element:_C,id:"pretext",name:"Shaped Type",category:"typography",version:1,normalizeLayoutSettingsUpdate:(e,t)=>{const n=e.shape;return typeof n!="string"||n==="custom"||Ip.indexOf(n)===-1||(t==null?void 0:t.shape)===n?e:{...e,...Cp(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:OC,sourceCode:HC,assetsPaths:{content:[],parameters:[{path:"image",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}},zC=[Vg,Zg,Vx,jh,Jh,cf,If,Zf,oy,uy,_y,Rv,A0,B0,Cx,Nx,nb,Jb,mb,hS,qS,Ew,C$,DC];exports.getAvailableStatePanels=_.getAvailableStatePanels;exports.getUnavailableStates=_.getUnavailableStates;exports.isPanelAvailable=_.isPanelAvailable;exports.components=zC;exports.isSchemaV1=Np;
27908
+ `,Wd=[...Ip],WC={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},OC={type:"object",version:1,settings:{sizing:"manual",properties:{shape:{type:"string",scope:"layout",display:{type:"shape-select",isFilled:!0,enum:Wd},enum:Wd},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:{...WC.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:{...Cp("circle"),pathSnap:0,shapeMode:"A",fitText:"off",hyphenate:"off",dropCapLines:1,dropCapSize:1,image:"https://cdn.cntrl.site/component-assets/shapedType_img.jpg",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."}]}]}]}},DC={element:_C,id:"pretext",name:"Shaped Type",category:"typography",version:1,normalizeLayoutSettingsUpdate:(e,t)=>{const n=e.shape;return typeof n!="string"||n==="custom"||Ip.indexOf(n)===-1||(t==null?void 0:t.shape)===n?e:{...e,...Cp(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:OC,sourceCode:HC,assetsPaths:{content:[],parameters:[{path:"image",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}},zC=[Vg,Zg,Vx,jh,Jh,cf,If,Zf,oy,uy,_y,Rv,A0,B0,Cx,Nx,nb,Jb,mb,hS,qS,Ew,C$,DC];exports.getAvailableStatePanels=F.getAvailableStatePanels;exports.getUnavailableStates=F.getUnavailableStates;exports.isPanelAvailable=F.isPanelAvailable;exports.components=zC;exports.isSchemaV1=Np;