@cntrl-site/components 1.0.99 → 1.0.100

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"),Et=require("classnames"),E=require("./panelAvailability-D8c7cdbu.js"),qn=require("react-dom");function ug(e){return e.type==="object"&&e.version===1}const pg="ControlSlider-module__wrapper___sHEkd",gg="ControlSlider-module__hoverArrow___A-dOH",mg="ControlSlider-module__sliderItem___QQSkR",hg="ControlSlider-module__sliderImage___9hRl-",fg="ControlSlider-module__arrow___05ghY",yg="ControlSlider-module__arrowVertical___tBfVN",vg="ControlSlider-module__nextArrow___-30Yc",xg="ControlSlider-module__arrowInner___aEra3",bg="ControlSlider-module__arrowIcon___S4ztF",Sg="ControlSlider-module__arrowImg___2dwJW",wg="ControlSlider-module__mirror___brd6U",$g="ControlSlider-module__pagination___bicLF",Cg="ControlSlider-module__paginationInner___bT-P-",Tg="ControlSlider-module__paginationVertical___zYqKw",Ig="ControlSlider-module__paginationItem___nTRbk",Lg="ControlSlider-module__dot___p1Qun",Pg="ControlSlider-module__activeDot___LHFaj",Mg="ControlSlider-module__paginationInsideBottom___R3FWn",Rg="ControlSlider-module__paginationInsideTop___V-qb-",Eg="ControlSlider-module__paginationOutsideBottom___14w8D",kg="ControlSlider-module__paginationOutsideTop___SCLqB",Ag="ControlSlider-module__paginationInsideLeft___yOBRZ",Fg="ControlSlider-module__paginationInsideRight___Rtt3o",Ng="ControlSlider-module__paginationOutsideLeft___lahaw",_g="ControlSlider-module__paginationOutsideRight___EtuQa",Hg="ControlSlider-module__imgWrapper___UjEgB",Wg="ControlSlider-module__captionBlock___dJ6-j",Og="ControlSlider-module__captionTextWrapper___HFlpf",Dg="ControlSlider-module__captionText___uGBVc",zg="ControlSlider-module__active___WZK4G",Bg="ControlSlider-module__withPointerEvents___t-18M",jg="ControlSlider-module__topLeftAlignment___zjnGM",Vg="ControlSlider-module__topCenterAlignment___gD1xW",Gg="ControlSlider-module__topRightAlignment___NMapS",Xg="ControlSlider-module__middleLeftAlignment___OnUrY",Ug="ControlSlider-module__middleCenterAlignment___Tdkl0",qg="ControlSlider-module__middleRightAlignment___wEbfX",Yg="ControlSlider-module__bottomLeftAlignment___cTP2-",Kg="ControlSlider-module__bottomCenterAlignment___c54fB",Qg="ControlSlider-module__bottomRightAlignment___kEwrz",Zg="ControlSlider-module__clickOverlay___DZA28",Jg="ControlSlider-module__contain___pLyq7",em="ControlSlider-module__cover___KdDat",Rt={wrapper:pg,hoverArrow:gg,sliderItem:mg,sliderImage:hg,arrow:fg,arrowVertical:yg,nextArrow:vg,arrowInner:xg,arrowIcon:bg,arrowImg:Sg,mirror:wg,pagination:$g,paginationInner:Cg,paginationVertical:Tg,paginationItem:Ig,dot:Lg,activeDot:Pg,paginationInsideBottom:Mg,paginationInsideTop:Rg,paginationOutsideBottom:Eg,paginationOutsideTop:kg,paginationInsideLeft:Ag,paginationInsideRight:Fg,paginationOutsideLeft:Ng,paginationOutsideRight:_g,imgWrapper:Hg,captionBlock:Wg,captionTextWrapper:Og,captionText:Dg,active:zg,withPointerEvents:Bg,topLeftAlignment:jg,topCenterAlignment:Vg,topRightAlignment:Gg,middleLeftAlignment:Xg,middleCenterAlignment:Ug,middleRightAlignment:qg,bottomLeftAlignment:Yg,bottomCenterAlignment:Kg,bottomRightAlignment:Qg,clickOverlay:Zg,contain:Jg,cover:em};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 nm(e,t,n){return t&&tm(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var nc="(prefers-reduced-motion: reduce)",ho=1,im=2,To=3,Oo=4,Cr=5,sa=6,fa=7,om={CREATED:ho,MOUNTED:im,IDLE:To,MOVING:Oo,SCROLLING:Cr,DRAGGING:sa,DESTROYED:fa};function ci(e){e.length=0}function Ai(e,t,n){return Array.prototype.slice.call(e,t,n)}function tn(e){return e.bind.apply(e,[null].concat(Ai(arguments,1)))}var uu=setTimeout,Ns=function(){};function ic(e){return requestAnimationFrame(e)}function Ma(e,t){return typeof t===e}function dr(e){return!pl(e)&&Ma("object",e)}var ul=Array.isArray,pu=tn(Ma,"function"),Pi=tn(Ma,"string"),Tr=tn(Ma,"undefined");function pl(e){return e===null}function gu(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Ir(e){return ul(e)?e:[e]}function En(e,t){Ir(e).forEach(t)}function gl(e,t){return e.indexOf(t)>-1}function la(e,t){return e.push.apply(e,Ir(t)),e}function oi(e,t,n){e&&En(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Gn(e,t){oi(e,Pi(t)?t.split(" "):t,!0)}function Lr(e,t){En(t,e.appendChild.bind(e))}function ml(e,t){En(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function ur(e,t){return gu(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function mu(e,t){var n=e?Ai(e.children):[];return t?n.filter(function(i){return ur(i,t)}):n}function Pr(e,t){return t?mu(e,t)[0]:e.firstElementChild}var pr=Object.keys;function qi(e,t,n){return e&&(n?pr(e).reverse():pr(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function gr(e){return Ai(arguments,1).forEach(function(t){qi(t,function(n,i){e[i]=t[i]})}),e}function Ci(e){return Ai(arguments,1).forEach(function(t){qi(t,function(n,i){ul(n)?e[i]=n.slice():dr(n)?e[i]=Ci({},dr(e[i])?e[i]:{},n):e[i]=n})}),e}function oc(e,t){En(t||pr(e),function(n){delete e[n]})}function Xn(e,t){En(e,function(n){En(t,function(i){n&&n.removeAttribute(i)})})}function Gt(e,t,n){dr(t)?qi(t,function(i,o){Gt(e,o,i)}):En(e,function(i){pl(n)||n===""?Xn(i,t):i.setAttribute(t,String(n))})}function bo(e,t,n){var i=document.createElement(e);return t&&(Pi(t)?Gn(i,t):Gt(i,t)),n&&Lr(n,i),i}function Nn(e,t,n){if(Tr(n))return getComputedStyle(e)[t];pl(n)||(e.style[t]=""+n)}function mr(e,t){Nn(e,"display",t)}function hu(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function _n(e,t){return e.getAttribute(t)}function rc(e,t){return e&&e.classList.contains(t)}function Ln(e){return e.getBoundingClientRect()}function Ki(e){En(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function fu(e){return Pr(new DOMParser().parseFromString(e,"text/html").body)}function ni(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function yu(e,t){return e&&e.querySelector(t)}function hl(e,t){return t?Ai(e.querySelectorAll(t)):[]}function ri(e,t){oi(e,t,!1)}function _s(e){return e.timeStamp}function _i(e){return Pi(e)?e:e?e+"px":""}var Mr="splide",fl="data-"+Mr;function ar(e,t){if(!e)throw new Error("["+Mr+"] "+(t||""))}var Mi=Math.min,ya=Math.max,va=Math.floor,hr=Math.ceil,vn=Math.abs;function vu(e,t,n){return vn(e-t)<n}function ca(e,t,n,i){var o=Mi(t,n),r=ya(t,n);return i?o<e&&e<r:o<=e&&e<=r}function uo(e,t,n){var i=Mi(t,n),o=ya(t,n);return Mi(ya(i,e),o)}function Hs(e){return+(e>0)-+(e<0)}function Ws(e,t){return En(t,function(n){e=e.replace("%s",""+n)}),e}function yl(e){return e<10?"0"+e:""+e}var ac={};function rm(e){return""+e+yl(ac[e]=(ac[e]||0)+1)}function xu(){var e=[];function t(l,c,d,u){o(l,c,function(p,y,x){var g="addEventListener"in p,f=g?p.removeEventListener.bind(p,y,d,u):p.removeListener.bind(p,d);g?p.addEventListener(y,d,u):p.addListener(d),e.push([p,y,x,d,f])})}function n(l,c,d){o(l,c,function(u,p,y){e=e.filter(function(x){return x[0]===u&&x[1]===p&&x[2]===y&&(!d||x[3]===d)?(x[4](),!1):!0})})}function i(l,c,d){var u,p=!0;return typeof CustomEvent=="function"?u=new CustomEvent(c,{bubbles:p,detail:d}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(c,p,!1,d)),l.dispatchEvent(u),u}function o(l,c,d){En(l,function(u){u&&En(c,function(p){p.split(" ").forEach(function(y){var x=y.split(".");d(u,x[0],x[1])})})})}function r(){e.forEach(function(l){l[4]()}),ci(e)}return{bind:t,unbind:n,dispatch:i,destroy:r}}var Fi="mounted",Os="ready",di="move",Do="moved",vl="click",bu="active",Su="inactive",wu="visible",$u="hidden",ln="refresh",hn="updated",Io="resize",Ra="resized",Cu="drag",Tu="dragging",Iu="dragged",Ea="scroll",Ji="scrolled",am="overflow",xl="destroy",Lu="arrows:mounted",Pu="arrows:updated",Mu="pagination:mounted",Ru="pagination:updated",bl="navigation:mounted",Sl="autoplay:play",Eu="autoplay:playing",wl="autoplay:pause",$l="lazyload:loaded",ku="sk",Au="sh",xa="ei";function an(e){var t=e?e.event.bus:document.createDocumentFragment(),n=xu();function i(r,l){n.bind(t,Ir(r).join(" "),function(c){l.apply(l,ul(c.detail)?c.detail:[])})}function o(r){n.dispatch(t,r,Ai(arguments,1))}return e&&e.event.on(xl,n.destroy),gr(n,{bus:t,on:i,off:tn(n.unbind,t),emit:o})}function ka(e,t,n,i){var o=Date.now,r,l=0,c,d=!0,u=0;function p(){if(!d){if(l=e?Mi((o()-r)/e,1):1,n&&n(l),l>=1&&(t(),r=o(),i&&++u>=i))return x();c=ic(p)}}function y(W){W||f(),r=o()-(W?l*e:0),d=!1,c=ic(p)}function x(){d=!0}function g(){r=o(),l=0,n&&n(l)}function f(){c&&cancelAnimationFrame(c),l=0,c=0,d=!0}function b(W){e=W}function S(){return d}return{start:y,rewind:g,pause:x,cancel:f,set:b,isPaused:S}}function sm(e){var t=e;function n(o){t=o}function i(o){return gl(Ir(o),t)}return{set:n,is:i}}function lm(e,t){var n=ka(0,e,null,1);return function(){n.isPaused()&&n.start()}}function cm(e,t,n){var i=e.state,o=n.breakpoints||{},r=n.reducedMotion||{},l=xu(),c=[];function d(){var f=n.mediaQuery==="min";pr(o).sort(function(b,S){return f?+b-+S:+S-+b}).forEach(function(b){p(o[b],"("+(f?"min":"max")+"-width:"+b+"px)")}),p(r,nc),y()}function u(f){f&&l.destroy()}function p(f,b){var S=matchMedia(b);l.bind(S,"change",y),c.push([f,S])}function y(){var f=i.is(fa),b=n.direction,S=c.reduce(function(W,v){return Ci(W,v[1].matches?v[0]:{})},{});oc(n),g(S),n.destroy?e.destroy(n.destroy==="completely"):f?(u(!0),e.mount()):b!==n.direction&&e.refresh()}function x(f){matchMedia(nc).matches&&(f?Ci(n,r):oc(n,pr(r)))}function g(f,b,S){Ci(n,f),b&&Ci(Object.getPrototypeOf(n),f),(S||!i.is(ho))&&e.emit(hn,n)}return{setup:d,destroy:u,reduce:x,set:g}}var Aa="Arrow",Fa=Aa+"Left",Na=Aa+"Right",Fu=Aa+"Up",Nu=Aa+"Down",sc="rtl",_a="ttb",qa={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Fu,Na],ArrowRight:[Nu,Fa]};function dm(e,t,n){function i(r,l,c){c=c||n.direction;var d=c===sc&&!l?1:c===_a?0:-1;return qa[r]&&qa[r][d]||r.replace(/width|left|right/i,function(u,p){var y=qa[u.toLowerCase()][d]||u;return p>0?y.charAt(0).toUpperCase()+y.slice(1):y})}function o(r){return r*(n.direction===sc?1:-1)}return{resolve:i,orient:o}}var ai="role",So="tabindex",um="disabled",Hn="aria-",Rr=Hn+"controls",_u=Hn+"current",lc=Hn+"selected",Mn=Hn+"label",Cl=Hn+"labelledby",Hu=Hn+"hidden",Tl=Hn+"orientation",fr=Hn+"roledescription",cc=Hn+"live",dc=Hn+"busy",uc=Hn+"atomic",Il=[ai,So,um,Rr,_u,Mn,Cl,Hu,Tl,fr],Yn=Mr+"__",Ni="is-",Ya=Mr,pc=Yn+"track",pm=Yn+"list",Ha=Yn+"slide",Wu=Ha+"--clone",gm=Ha+"__container",Ll=Yn+"arrows",Wa=Yn+"arrow",Ou=Wa+"--prev",Du=Wa+"--next",Oa=Yn+"pagination",zu=Oa+"__page",mm=Yn+"progress",hm=mm+"__bar",fm=Yn+"toggle",ym=Yn+"spinner",vm=Yn+"sr",xm=Ni+"initialized",Qi=Ni+"active",Bu=Ni+"prev",ju=Ni+"next",Ds=Ni+"visible",zs=Ni+"loading",Vu=Ni+"focus-in",Gu=Ni+"overflow",bm=[Qi,Ds,Bu,ju,zs,Vu,Gu],Sm={slide:Ha,clone:Wu,arrows:Ll,arrow:Wa,prev:Ou,next:Du,pagination:Oa,page:zu,spinner:ym};function wm(e,t){if(pu(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!ur(n,t);)n=n.parentElement;return n}var $m=5,gc=200,Xu="touchstart mousedown",Ka="touchmove mousemove",Qa="touchend touchcancel mouseup click";function Cm(e,t,n){var i=an(e),o=i.on,r=i.bind,l=e.root,c=n.i18n,d={},u=[],p=[],y=[],x,g,f;function b(){L(),M(),v()}function S(){o(ln,W),o(ln,b),o(hn,v),r(document,Xu+" keydown",function(B){f=B.type==="keydown"},{capture:!0}),r(l,"focusin",function(){oi(l,Vu,!!f)})}function W(B){var N=Il.concat("style");ci(u),ri(l,p),ri(x,y),Xn([x,g],N),Xn(l,B?N:["style",fr])}function v(){ri(l,p),ri(x,y),p=G(Ya),y=G(pc),Gn(l,p),Gn(x,y),Gt(l,Mn,n.label),Gt(l,Cl,n.labelledby)}function L(){x=U("."+pc),g=Pr(x,"."+pm),ar(x&&g,"A track/list element is missing."),la(u,mu(g,"."+Ha+":not(."+Wu+")")),qi({arrows:Ll,pagination:Oa,prev:Ou,next:Du,bar:hm,toggle:fm},function(B,N){d[N]=U("."+B)}),gr(d,{root:l,track:x,list:g,slides:u})}function M(){var B=l.id||rm(Mr),N=n.role;l.id=B,x.id=x.id||B+"-track",g.id=g.id||B+"-list",!_n(l,ai)&&l.tagName!=="SECTION"&&N&&Gt(l,ai,N),Gt(l,fr,c.carousel),Gt(g,ai,"presentation")}function U(B){var N=yu(l,B);return N&&wm(N,"."+Ya)===l?N:void 0}function G(B){return[B+"--"+n.type,B+"--"+n.direction,n.drag&&B+"--draggable",n.isNavigation&&B+"--nav",B===Ya&&Qi]}return gr(d,{setup:b,mount:S,destroy:W})}var Lo="slide",zo="loop",Er="fade";function Tm(e,t,n,i){var o=an(e),r=o.on,l=o.emit,c=o.bind,d=e.Components,u=e.root,p=e.options,y=p.isNavigation,x=p.updateOnMove,g=p.i18n,f=p.pagination,b=p.slideFocus,S=d.Direction.resolve,W=_n(i,"style"),v=_n(i,Mn),L=n>-1,M=Pr(i,"."+gm),U;function G(){L||(i.id=u.id+"-slide"+yl(t+1),Gt(i,ai,f?"tabpanel":"group"),Gt(i,fr,g.slide),Gt(i,Mn,v||Ws(g.slideLabel,[t+1,e.length]))),B()}function B(){c(i,"click",tn(l,vl,Q)),c(i,"keydown",tn(l,ku,Q)),r([Do,Au,Ji],$),r(bl,O),x&&r(di,C)}function N(){U=!0,o.destroy(),ri(i,bm),Xn(i,Il),Gt(i,"style",W),Gt(i,Mn,v||"")}function O(){var P=e.splides.map(function(h){var J=h.splide.Components.Slides.getAt(t);return J?J.slide.id:""}).join(" ");Gt(i,Mn,Ws(g.slideX,(L?n:t)+1)),Gt(i,Rr,P),Gt(i,ai,b?"button":""),b&&Xn(i,fr)}function C(){U||$()}function $(){if(!U){var P=e.index;K(),R(),oi(i,Bu,t===P-1),oi(i,ju,t===P+1)}}function K(){var P=T();P!==rc(i,Qi)&&(oi(i,Qi,P),Gt(i,_u,y&&P||""),l(P?bu:Su,Q))}function R(){var P=j(),h=!P&&(!T()||L);if(e.state.is([Oo,Cr])||Gt(i,Hu,h||""),Gt(hl(i,p.focusableNodes||""),So,h?-1:""),b&&Gt(i,So,h?-1:0),P!==rc(i,Ds)&&(oi(i,Ds,P),l(P?wu:$u,Q)),!P&&document.activeElement===i){var J=d.Slides.getAt(e.index);J&&hu(J.slide)}}function w(P,h,J){Nn(J&&M||i,P,h)}function T(){var P=e.index;return P===t||p.cloneStatus&&P===n}function j(){if(e.is(Er))return T();var P=Ln(d.Elements.track),h=Ln(i),J=S("left",!0),V=S("right",!0);return va(P[J])<=hr(h[J])&&va(h[V])<=hr(P[V])}function _(P,h){var J=vn(P-t);return!L&&(p.rewind||e.is(zo))&&(J=Mi(J,e.length-J)),J<=h}var Q={index:t,slideIndex:n,slide:i,container:M,isClone:L,mount:G,destroy:N,update:$,style:w,isWithin:_};return Q}function Im(e,t,n){var i=an(e),o=i.on,r=i.emit,l=i.bind,c=t.Elements,d=c.slides,u=c.list,p=[];function y(){x(),o(ln,g),o(ln,x)}function x(){d.forEach(function($,K){b($,K,-1)})}function g(){U(function($){$.destroy()}),ci(p)}function f(){U(function($){$.update()})}function b($,K,R){var w=Tm(e,K,R,$);w.mount(),p.push(w),p.sort(function(T,j){return T.index-j.index})}function S($){return $?G(function(K){return!K.isClone}):p}function W($){var K=t.Controller,R=K.toIndex($),w=K.hasFocus()?1:n.perPage;return G(function(T){return ca(T.index,R,R+w-1)})}function v($){return G($)[0]}function L($,K){En($,function(R){if(Pi(R)&&(R=fu(R)),gu(R)){var w=d[K];w?ml(R,w):Lr(u,R),Gn(R,n.classes.slide),N(R,tn(r,Io))}}),r(ln)}function M($){Ki(G($).map(function(K){return K.slide})),r(ln)}function U($,K){S(K).forEach($)}function G($){return p.filter(pu($)?$:function(K){return Pi($)?ur(K.slide,$):gl(Ir($),K.index)})}function B($,K,R){U(function(w){w.style($,K,R)})}function N($,K){var R=hl($,"img"),w=R.length;w?R.forEach(function(T){l(T,"load error",function(){--w||K()})}):K()}function O($){return $?d.length:p.length}function C(){return p.length>n.perPage}return{mount:y,destroy:g,update:f,register:b,get:S,getIn:W,getAt:v,add:L,remove:M,forEach:U,filter:G,style:B,getLength:O,isEnough:C}}function Lm(e,t,n){var i=an(e),o=i.on,r=i.bind,l=i.emit,c=t.Slides,d=t.Direction.resolve,u=t.Elements,p=u.root,y=u.track,x=u.list,g=c.getAt,f=c.style,b,S,W;function v(){L(),r(window,"resize load",lm(tn(l,Io))),o([hn,ln],L),o(Io,M)}function L(){b=n.direction===_a,Nn(p,"maxWidth",_i(n.width)),Nn(y,d("paddingLeft"),U(!1)),Nn(y,d("paddingRight"),U(!0)),M(!0)}function M(Q){var P=Ln(p);(Q||S.width!==P.width||S.height!==P.height)&&(Nn(y,"height",G()),f(d("marginRight"),_i(n.gap)),f("width",N()),f("height",O(),!0),S=P,l(Ra),W!==(W=_())&&(oi(p,Gu,W),l(am,W)))}function U(Q){var P=n.padding,h=d(Q?"right":"left");return P&&_i(P[h]||(dr(P)?0:P))||"0px"}function G(){var Q="";return b&&(Q=B(),ar(Q,"height or heightRatio is missing."),Q="calc("+Q+" - "+U(!1)+" - "+U(!0)+")"),Q}function B(){return _i(n.height||Ln(x).width*n.heightRatio)}function N(){return n.autoWidth?null:_i(n.fixedWidth)||(b?"":C())}function O(){return _i(n.fixedHeight)||(b?n.autoHeight?null:C():B())}function C(){var Q=_i(n.gap);return"calc((100%"+(Q&&" + "+Q)+")/"+(n.perPage||1)+(Q&&" - "+Q)+")"}function $(){return Ln(x)[d("width")]}function K(Q,P){var h=g(Q||0);return h?Ln(h.slide)[d("width")]+(P?0:T()):0}function R(Q,P){var h=g(Q);if(h){var J=Ln(h.slide)[d("right")],V=Ln(x)[d("left")];return vn(J-V)+(P?0:T())}return 0}function w(Q){return R(e.length-1)-R(0)+K(0,Q)}function T(){var Q=g(0);return Q&&parseFloat(Nn(Q.slide,d("marginRight")))||0}function j(Q){return parseFloat(Nn(y,d("padding"+(Q?"Right":"Left"))))||0}function _(){return e.is(Er)||w(!0)>$()}return{mount:v,resize:M,listSize:$,slideSize:K,sliderSize:w,totalSize:R,getPadding:j,isOverflow:_}}var Pm=2;function Mm(e,t,n){var i=an(e),o=i.on,r=t.Elements,l=t.Slides,c=t.Direction.resolve,d=[],u;function p(){o(ln,y),o([hn,Io],g),(u=S())&&(f(u),t.Layout.resize(!0))}function y(){x(),p()}function x(){Ki(d),ci(d),i.destroy()}function g(){var W=S();u!==W&&(u<W||!W)&&i.emit(ln)}function f(W){var v=l.get().slice(),L=v.length;if(L){for(;v.length<W;)la(v,v);la(v.slice(-W),v.slice(0,W)).forEach(function(M,U){var G=U<W,B=b(M.slide,U);G?ml(B,v[0].slide):Lr(r.list,B),la(d,B),l.register(B,U-W+(G?0:L),M.index)})}}function b(W,v){var L=W.cloneNode(!0);return Gn(L,n.classes.clone),L.id=e.root.id+"-clone"+yl(v+1),L}function S(){var W=n.clones;if(!e.is(zo))W=0;else if(Tr(W)){var v=n[c("fixedWidth")]&&t.Layout.slideSize(0),L=v&&hr(Ln(r.track)[c("width")]/v);W=L||n[c("autoWidth")]&&e.length||n.perPage*Pm}return W}return{mount:p,destroy:x}}function Rm(e,t,n){var i=an(e),o=i.on,r=i.emit,l=e.state.set,c=t.Layout,d=c.slideSize,u=c.getPadding,p=c.totalSize,y=c.listSize,x=c.sliderSize,g=t.Direction,f=g.resolve,b=g.orient,S=t.Elements,W=S.list,v=S.track,L;function M(){L=t.Transition,o([Fi,Ra,hn,ln],U)}function U(){t.Controller.isBusy()||(t.Scroll.cancel(),B(e.index),t.Slides.update())}function G(h,J,V,me){h!==J&&Q(h>V)&&($(),N(C(w(),h>V),!0)),l(Oo),r(di,J,V,h),L.start(J,function(){l(To),r(Do,J,V,h),me&&me()})}function B(h){N(R(h,!0))}function N(h,J){if(!e.is(Er)){var V=J?h:O(h);Nn(W,"transform","translate"+f("X")+"("+V+"px)"),h!==V&&r(Au)}}function O(h){if(e.is(zo)){var J=K(h),V=J>t.Controller.getEnd(),me=J<0;(me||V)&&(h=C(h,V))}return h}function C(h,J){var V=h-_(J),me=x();return h-=b(me*(hr(vn(V)/me)||1))*(J?1:-1),h}function $(){N(w(),!0),L.cancel()}function K(h){for(var J=t.Slides.get(),V=0,me=1/0,k=0;k<J.length;k++){var le=J[k].index,I=vn(R(le,!0)-h);if(I<=me)me=I,V=le;else break}return V}function R(h,J){var V=b(p(h-1)-j(h));return J?T(V):V}function w(){var h=f("left");return Ln(W)[h]-Ln(v)[h]+b(u(!1))}function T(h){return n.trimSpace&&e.is(Lo)&&(h=uo(h,0,b(x(!0)-y()))),h}function j(h){var J=n.focus;return J==="center"?(y()-d(h,!0))/2:+J*d(h)||0}function _(h){return R(h?t.Controller.getEnd():0,!!n.trimSpace)}function Q(h){var J=b(C(w(),h));return h?J>=0:J<=W[f("scrollWidth")]-Ln(v)[f("width")]}function P(h,J){J=Tr(J)?w():J;var V=h!==!0&&b(J)<b(_(!1)),me=h!==!1&&b(J)>b(_(!0));return V||me}return{mount:M,move:G,jump:B,translate:N,shift:C,cancel:$,toIndex:K,toPosition:R,getPosition:w,getLimit:_,exceededLimit:P,reposition:U}}function Em(e,t,n){var i=an(e),o=i.on,r=i.emit,l=t.Move,c=l.getPosition,d=l.getLimit,u=l.toPosition,p=t.Slides,y=p.isEnough,x=p.getLength,g=n.omitEnd,f=e.is(zo),b=e.is(Lo),S=tn(w,!1),W=tn(w,!0),v=n.start||0,L,M=v,U,G,B;function N(){O(),o([hn,ln,xa],O),o(Ra,C)}function O(){U=x(!0),G=n.perMove,B=n.perPage,L=Q();var I=uo(v,0,g?L:U-1);I!==v&&(v=I,l.reposition())}function C(){L!==Q()&&r(xa)}function $(I,ue,ee){if(!le()){var xe=R(I),Le=_(xe);Le>-1&&(ue||Le!==v)&&(V(Le),l.move(xe,Le,M,ee))}}function K(I,ue,ee,xe){t.Scroll.scroll(I,ue,ee,function(){var Le=_(l.toIndex(c()));V(g?Mi(Le,L):Le),xe&&xe()})}function R(I){var ue=v;if(Pi(I)){var ee=I.match(/([+\-<>])(\d+)?/)||[],xe=ee[1],Le=ee[2];xe==="+"||xe==="-"?ue=T(v+ +(""+xe+(+Le||1)),v):xe===">"?ue=Le?P(+Le):S(!0):xe==="<"&&(ue=W(!0))}else ue=f?I:uo(I,0,L);return ue}function w(I,ue){var ee=G||(k()?1:B),xe=T(v+ee*(I?-1:1),v,!(G||k()));return xe===-1&&b&&!vu(c(),d(!I),1)?I?0:L:ue?xe:_(xe)}function T(I,ue,ee){if(y()||k()){var xe=j(I);xe!==I&&(ue=I,I=xe,ee=!1),I<0||I>L?!G&&(ca(0,I,ue,!0)||ca(L,ue,I,!0))?I=P(h(I)):f?I=ee?I<0?-(U%B||B):U:I:n.rewind?I=I<0?L:0:I=-1:ee&&I!==ue&&(I=P(h(ue)+(I<ue?-1:1)))}else I=-1;return I}function j(I){if(b&&n.trimSpace==="move"&&I!==v)for(var ue=c();ue===u(I,!0)&&ca(I,0,e.length-1,!n.rewind);)I<v?--I:++I;return I}function _(I){return f?(I+U)%U||0:I}function Q(){for(var I=U-(k()||f&&G?1:B);g&&I-- >0;)if(u(U-1,!0)!==u(I,!0)){I++;break}return uo(I,0,U-1)}function P(I){return uo(k()?I:B*I,0,L)}function h(I){return k()?Mi(I,L):va((I>=L?U-1:I)/B)}function J(I){var ue=l.toIndex(I);return b?uo(ue,0,L):ue}function V(I){I!==v&&(M=v,v=I)}function me(I){return I?M:v}function k(){return!Tr(n.focus)||n.isNavigation}function le(){return e.state.is([Oo,Cr])&&!!n.waitForTransition}return{mount:N,go:$,scroll:K,getNext:S,getPrev:W,getAdjacent:w,getEnd:Q,setIndex:V,getIndex:me,toIndex:P,toPage:h,toDest:J,hasFocus:k,isBusy:le}}var km="http://www.w3.org/2000/svg",Am="m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z",Hr=40;function Fm(e,t,n){var i=an(e),o=i.on,r=i.bind,l=i.emit,c=n.classes,d=n.i18n,u=t.Elements,p=t.Controller,y=u.arrows,x=u.track,g=y,f=u.prev,b=u.next,S,W,v={};function L(){U(),o(hn,M)}function M(){G(),L()}function U(){var K=n.arrows;K&&!(f&&b)&&O(),f&&b&&(gr(v,{prev:f,next:b}),mr(g,K?"":"none"),Gn(g,W=Ll+"--"+n.direction),K&&(B(),$(),Gt([f,b],Rr,x.id),l(Lu,f,b)))}function G(){i.destroy(),ri(g,W),S?(Ki(y?[f,b]:g),f=b=null):Xn([f,b],Il)}function B(){o([Fi,Do,ln,Ji,xa],$),r(b,"click",tn(N,">")),r(f,"click",tn(N,"<"))}function N(K){p.go(K,!0)}function O(){g=y||bo("div",c.arrows),f=C(!0),b=C(!1),S=!0,Lr(g,[f,b]),!y&&ml(g,x)}function C(K){var R='<button class="'+c.arrow+" "+(K?c.prev:c.next)+'" type="button"><svg xmlns="'+km+'" viewBox="0 0 '+Hr+" "+Hr+'" width="'+Hr+'" height="'+Hr+'" focusable="false"><path d="'+(n.arrowPath||Am)+'" />';return fu(R)}function $(){if(f&&b){var K=e.index,R=p.getPrev(),w=p.getNext(),T=R>-1&&K<R?d.last:d.prev,j=w>-1&&K>w?d.first:d.next;f.disabled=R<0,b.disabled=w<0,Gt(f,Mn,T),Gt(b,Mn,j),l(Pu,f,b,R,w)}}return{arrows:v,mount:L,destroy:G,update:$}}var Nm=fl+"-interval";function _m(e,t,n){var i=an(e),o=i.on,r=i.bind,l=i.emit,c=ka(n.interval,e.go.bind(e,">"),B),d=c.isPaused,u=t.Elements,p=t.Elements,y=p.root,x=p.toggle,g=n.autoplay,f,b,S=g==="pause";function W(){g&&(v(),x&&Gt(x,Rr,u.track.id),S||L(),G())}function v(){n.pauseOnHover&&r(y,"mouseenter mouseleave",function(O){f=O.type==="mouseenter",U()}),n.pauseOnFocus&&r(y,"focusin focusout",function(O){b=O.type==="focusin",U()}),x&&r(x,"click",function(){S?L():M(!0)}),o([di,Ea,ln],c.rewind),o(di,N)}function L(){d()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),b=f=S=!1,G(),l(Sl))}function M(O){O===void 0&&(O=!0),S=!!O,G(),d()||(c.pause(),l(wl))}function U(){S||(f||b?M(!1):L())}function G(){x&&(oi(x,Qi,!S),Gt(x,Mn,n.i18n[S?"play":"pause"]))}function B(O){var C=u.bar;C&&Nn(C,"width",O*100+"%"),l(Eu,O)}function N(O){var C=t.Slides.getAt(O);c.set(C&&+_n(C.slide,Nm)||n.interval)}return{mount:W,destroy:c.cancel,play:L,pause:M,isPaused:d}}function Hm(e,t,n){var i=an(e),o=i.on;function r(){n.cover&&(o($l,tn(c,!0)),o([Fi,hn,ln],tn(l,!0)))}function l(d){t.Slides.forEach(function(u){var p=Pr(u.container||u.slide,"img");p&&p.src&&c(d,p,u)})}function c(d,u,p){p.style("background",d?'center/cover no-repeat url("'+u.src+'")':"",!0),mr(u,d?"none":"")}return{mount:r,destroy:tn(l,!1)}}var Wm=10,Om=600,Dm=.6,zm=1.5,Bm=800;function jm(e,t,n){var i=an(e),o=i.on,r=i.emit,l=e.state.set,c=t.Move,d=c.getPosition,u=c.getLimit,p=c.exceededLimit,y=c.translate,x=e.is(Lo),g,f,b=1;function S(){o(di,M),o([hn,ln],U)}function W(B,N,O,C,$){var K=d();if(M(),O&&(!x||!p())){var R=t.Layout.sliderSize(),w=Hs(B)*R*va(vn(B)/R)||0;B=c.toPosition(t.Controller.toDest(B%R))+w}var T=vu(K,B,1);b=1,N=T?0:N||ya(vn(B-K)/zm,Bm),f=C,g=ka(N,v,tn(L,K,B,$),1),l(Cr),r(Ea),g.start()}function v(){l(To),f&&f(),r(Ji)}function L(B,N,O,C){var $=d(),K=B+(N-B)*G(C),R=(K-$)*b;y($+R),x&&!O&&p()&&(b*=Dm,vn(R)<Wm&&W(u(p(!0)),Om,!1,f,!0))}function M(){g&&g.cancel()}function U(){g&&!g.isPaused()&&(M(),v())}function G(B){var N=n.easingFunc;return N?N(B):1-Math.pow(1-B,4)}return{mount:S,destroy:M,scroll:W,cancel:U}}var po={passive:!1,capture:!0};function Vm(e,t,n){var i=an(e),o=i.on,r=i.emit,l=i.bind,c=i.unbind,d=e.state,u=t.Move,p=t.Scroll,y=t.Controller,x=t.Elements.track,g=t.Media.reduce,f=t.Direction,b=f.resolve,S=f.orient,W=u.getPosition,v=u.exceededLimit,L,M,U,G,B,N=!1,O,C,$;function K(){l(x,Ka,Ns,po),l(x,Qa,Ns,po),l(x,Xu,w,po),l(x,"click",_,{capture:!0}),l(x,"dragstart",ni),o([Fi,hn],R)}function R(){var Z=n.drag;de(!Z),G=Z==="free"}function w(Z){if(O=!1,!C){var pe=Le(Z);xe(Z.target)&&(pe||!Z.button)&&(y.isBusy()?ni(Z,!0):($=pe?x:window,B=d.is([Oo,Cr]),U=null,l($,Ka,T,po),l($,Qa,j,po),u.cancel(),p.cancel(),Q(Z)))}}function T(Z){if(d.is(sa)||(d.set(sa),r(Cu)),Z.cancelable)if(B){u.translate(L+ee(k(Z)));var pe=le(Z)>gc,oe=N!==(N=v());(pe||oe)&&Q(Z),O=!0,r(Tu),ni(Z)}else J(Z)&&(B=h(Z),ni(Z))}function j(Z){d.is(sa)&&(d.set(To),r(Iu)),B&&(P(Z),ni(Z)),c($,Ka,T),c($,Qa,j),B=!1}function _(Z){!C&&O&&ni(Z,!0)}function Q(Z){U=M,M=Z,L=W()}function P(Z){var pe=V(Z),oe=me(pe),ge=n.rewind&&n.rewindByDrag;g(!1),G?y.scroll(oe,0,n.snap):e.is(Er)?y.go(S(Hs(pe))<0?ge?"<":"-":ge?">":"+"):e.is(Lo)&&N&&ge?y.go(v(!0)?">":"<"):y.go(y.toDest(oe),!0),g(!0)}function h(Z){var pe=n.dragMinThreshold,oe=dr(pe),ge=oe&&pe.mouse||0,be=(oe?pe.touch:+pe)||10;return vn(k(Z))>(Le(Z)?be:ge)}function J(Z){return vn(k(Z))>vn(k(Z,!0))}function V(Z){if(e.is(zo)||!N){var pe=le(Z);if(pe&&pe<gc)return k(Z)/pe}return 0}function me(Z){return W()+Hs(Z)*Mi(vn(Z)*(n.flickPower||600),G?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function k(Z,pe){return ue(Z,pe)-ue(I(Z),pe)}function le(Z){return _s(Z)-_s(I(Z))}function I(Z){return M===Z&&U||M}function ue(Z,pe){return(Le(Z)?Z.changedTouches[0]:Z)["page"+b(pe?"Y":"X")]}function ee(Z){return Z/(N&&e.is(Lo)?$m:1)}function xe(Z){var pe=n.noDrag;return!ur(Z,"."+zu+", ."+Wa)&&(!pe||!ur(Z,pe))}function Le(Z){return typeof TouchEvent<"u"&&Z instanceof TouchEvent}function ce(){return B}function de(Z){C=Z}return{mount:K,disable:de,isDragging:ce}}var Gm={Spacebar:" ",Right:Na,Left:Fa,Up:Fu,Down:Nu};function Pl(e){return e=Pi(e)?e:e.key,Gm[e]||e}var mc="keydown";function Xm(e,t,n){var i=an(e),o=i.on,r=i.bind,l=i.unbind,c=e.root,d=t.Direction.resolve,u,p;function y(){x(),o(hn,g),o(hn,x),o(di,b)}function x(){var W=n.keyboard;W&&(u=W==="global"?window:c,r(u,mc,S))}function g(){l(u,mc)}function f(W){p=W}function b(){var W=p;p=!0,uu(function(){p=W})}function S(W){if(!p){var v=Pl(W);v===d(Fa)?e.go("<"):v===d(Na)&&e.go(">")}}return{mount:y,destroy:g,disable:f}}var sr=fl+"-lazy",da=sr+"-srcset",Um="["+sr+"], ["+da+"]";function qm(e,t,n){var i=an(e),o=i.on,r=i.off,l=i.bind,c=i.emit,d=n.lazyLoad==="sequential",u=[Do,Ji],p=[];function y(){n.lazyLoad&&(x(),o(ln,x))}function x(){ci(p),g(),d?W():(r(u),o(u,f),f())}function g(){t.Slides.forEach(function(v){hl(v.slide,Um).forEach(function(L){var M=_n(L,sr),U=_n(L,da);if(M!==L.src||U!==L.srcset){var G=n.classes.spinner,B=L.parentElement,N=Pr(B,"."+G)||bo("span",G,B);p.push([L,v,N]),L.src||mr(L,"none")}})})}function f(){p=p.filter(function(v){var L=n.perPage*((n.preloadPages||1)+1)-1;return v[1].isWithin(e.index,L)?b(v):!0}),p.length||r(u)}function b(v){var L=v[0];Gn(v[1].slide,zs),l(L,"load error",tn(S,v)),Gt(L,"src",_n(L,sr)),Gt(L,"srcset",_n(L,da)),Xn(L,sr),Xn(L,da)}function S(v,L){var M=v[0],U=v[1];ri(U.slide,zs),L.type!=="error"&&(Ki(v[2]),mr(M,""),c($l,M,U),c(Io)),d&&W()}function W(){p.length&&b(p.shift())}return{mount:y,destroy:tn(ci,p),check:f}}function Ym(e,t,n){var i=an(e),o=i.on,r=i.emit,l=i.bind,c=t.Slides,d=t.Elements,u=t.Controller,p=u.hasFocus,y=u.getIndex,x=u.go,g=t.Direction.resolve,f=d.pagination,b=[],S,W;function v(){L(),o([hn,ln,xa],v);var C=n.pagination;f&&mr(f,C?"":"none"),C&&(o([di,Ea,Ji],O),M(),O(),r(Mu,{list:S,items:b},N(e.index)))}function L(){S&&(Ki(f?Ai(S.children):S),ri(S,W),ci(b),S=null),i.destroy()}function M(){var C=e.length,$=n.classes,K=n.i18n,R=n.perPage,w=p()?u.getEnd()+1:hr(C/R);S=f||bo("ul",$.pagination,d.track.parentElement),Gn(S,W=Oa+"--"+B()),Gt(S,ai,"tablist"),Gt(S,Mn,K.select),Gt(S,Tl,B()===_a?"vertical":"");for(var T=0;T<w;T++){var j=bo("li",null,S),_=bo("button",{class:$.page,type:"button"},j),Q=c.getIn(T).map(function(h){return h.slide.id}),P=!p()&&R>1?K.pageX:K.slideX;l(_,"click",tn(U,T)),n.paginationKeyboard&&l(_,"keydown",tn(G,T)),Gt(j,ai,"presentation"),Gt(_,ai,"tab"),Gt(_,Rr,Q.join(" ")),Gt(_,Mn,Ws(P,T+1)),Gt(_,So,-1),b.push({li:j,button:_,page:T})}}function U(C){x(">"+C,!0)}function G(C,$){var K=b.length,R=Pl($),w=B(),T=-1;R===g(Na,!1,w)?T=++C%K:R===g(Fa,!1,w)?T=(--C+K)%K:R==="Home"?T=0:R==="End"&&(T=K-1);var j=b[T];j&&(hu(j.button),x(">"+T),ni($,!0))}function B(){return n.paginationDirection||n.direction}function N(C){return b[u.toPage(C)]}function O(){var C=N(y(!0)),$=N(y());if(C){var K=C.button;ri(K,Qi),Xn(K,lc),Gt(K,So,-1)}if($){var R=$.button;Gn(R,Qi),Gt(R,lc,!0),Gt(R,So,"")}r(Ru,{list:S,items:b},C,$)}return{items:b,mount:v,destroy:L,getAt:N,update:O}}var Km=[" ","Enter"];function Qm(e,t,n){var i=n.isNavigation,o=n.slideFocus,r=[];function l(){e.splides.forEach(function(f){f.isParent||(u(e,f.splide),u(f.splide,e))}),i&&p()}function c(){r.forEach(function(f){f.destroy()}),ci(r)}function d(){c(),l()}function u(f,b){var S=an(f);S.on(di,function(W,v,L){b.go(b.is(zo)?L:W)}),r.push(S)}function p(){var f=an(e),b=f.on;b(vl,x),b(ku,g),b([Fi,hn],y),r.push(f),f.emit(bl,e.splides)}function y(){Gt(t.Elements.list,Tl,n.direction===_a?"vertical":"")}function x(f){e.go(f.index)}function g(f,b){gl(Km,Pl(b))&&(x(f),ni(b))}return{setup:tn(t.Media.set,{slideFocus:Tr(o)?i:o},!0),mount:l,destroy:c,remount:d}}function Zm(e,t,n){var i=an(e),o=i.bind,r=0;function l(){n.wheel&&o(t.Elements.track,"wheel",c,po)}function c(u){if(u.cancelable){var p=u.deltaY,y=p<0,x=_s(u),g=n.wheelMinThreshold||0,f=n.wheelSleep||0;vn(p)>g&&x-r>f&&(e.go(y?"<":">"),r=x),d(y)&&ni(u)}}function d(u){return!n.releaseWheel||e.state.is(Oo)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var Jm=90;function eh(e,t,n){var i=an(e),o=i.on,r=t.Elements.track,l=n.live&&!n.isNavigation,c=bo("span",vm),d=ka(Jm,tn(p,!1));function u(){l&&(x(!t.Autoplay.isPaused()),Gt(r,uc,!0),c.textContent="…",o(Sl,tn(x,!0)),o(wl,tn(x,!1)),o([Do,Ji],tn(p,!0)))}function p(g){Gt(r,dc,g),g?(Lr(r,c),d.start()):(Ki(c),d.cancel())}function y(){Xn(r,[cc,uc,dc]),Ki(c)}function x(g){l&&Gt(r,cc,g?"off":"polite")}return{mount:u,disable:x,destroy:y}}var th=Object.freeze({__proto__:null,Media:cm,Direction:dm,Elements:Cm,Slides:Im,Layout:Lm,Clones:Mm,Move:Rm,Controller:Em,Arrows:Fm,Autoplay:_m,Cover:Hm,Scroll:jm,Drag:Vm,Keyboard:Xm,LazyLoad:qm,Pagination:Ym,Sync:Qm,Wheel:Zm,Live:eh}),nh={prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s",play:"Start autoplay",pause:"Pause autoplay",carousel:"carousel",slide:"slide",select:"Select a slide to show",slideLabel:"%s of %s"},ih={type:"slide",role:"region",speed:400,perPage:1,cloneStatus:!0,arrows:!0,pagination:!0,paginationKeyboard:!0,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,easing:"cubic-bezier(0.25, 1, 0.5, 1)",drag:!0,direction:"ltr",trimSpace:!0,focusableNodes:"a, button, textarea, input, select, iframe",live:!0,classes:Sm,i18n:nh,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function oh(e,t,n){var i=t.Slides;function o(){an(e).on([Fi,ln],r)}function r(){i.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function l(c,d){i.style("transition","opacity "+n.speed+"ms "+n.easing),uu(d)}return{mount:o,start:l,cancel:Ns}}function rh(e,t,n){var i=t.Move,o=t.Controller,r=t.Scroll,l=t.Elements.list,c=tn(Nn,l,"transition"),d;function u(){an(e).bind(l,"transitionend",function(g){g.target===l&&d&&(y(),d())})}function p(g,f){var b=i.toPosition(g,!0),S=i.getPosition(),W=x(g);vn(b-S)>=1&&W>=1?n.useScroll?r.scroll(b,W,!1,f):(c("transform "+W+"ms "+n.easing),i.translate(b,!0),d=f):(i.jump(g),f())}function y(){c(""),r.cancel()}function x(g){var f=n.rewindSpeed;if(e.is(Lo)&&f){var b=o.getIndex(!0),S=o.getEnd();if(b===0&&g>=S||b>=S&&g===0)return f}return n.speed}return{mount:u,start:p,cancel:y}}var ah=(function(){function e(n,i){this.event=an(),this.Components={},this.state=sm(ho),this.splides=[],this._o={},this._E={};var o=Pi(n)?yu(document,n):n;ar(o,o+" is invalid."),this.root=o,i=Ci({label:_n(o,Mn)||"",labelledby:_n(o,Cl)||""},ih,e.defaults,i||{});try{Ci(i,JSON.parse(_n(o,fl)))}catch{ar(!1,"Invalid JSON")}this._o=Object.create(Ci({},i))}var t=e.prototype;return t.mount=function(i,o){var r=this,l=this.state,c=this.Components;ar(l.is([ho,fa]),"Already mounted!"),l.set(ho),this._C=c,this._T=o||this._T||(this.is(Er)?oh:rh),this._E=i||this._E;var d=gr({},th,this._E,{Transition:this._T});return qi(d,function(u,p){var y=u(r,c,r._o);c[p]=y,y.setup&&y.setup()}),qi(c,function(u){u.mount&&u.mount()}),this.emit(Fi),Gn(this.root,xm),l.set(To),this.emit(Os),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(To)&&(this._C.Sync.remount(),i.Components.Sync.remount()),this},t.go=function(i){return this._C.Controller.go(i),this},t.on=function(i,o){return this.event.on(i,o),this},t.off=function(i){return this.event.off(i),this},t.emit=function(i){var o;return(o=this.event).emit.apply(o,[i].concat(Ai(arguments,1))),this},t.add=function(i,o){return this._C.Slides.add(i,o),this},t.remove=function(i){return this._C.Slides.remove(i),this},t.is=function(i){return this._o.type===i},t.refresh=function(){return this.emit(ln),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,r=this.state;return r.is(ho)?an(this).on(Os,this.destroy.bind(this,i)):(qi(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(xl),o.destroy(),i&&ci(this.splides),r.set(fa)),this},nm(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})(),Ml=ah;Ml.defaults={};Ml.STATES=om;var hc=[[Fi,"onMounted"],[Os,"onReady"],[di,"onMove"],[Do,"onMoved"],[vl,"onClick"],[bu,"onActive"],[Su,"onInactive"],[wu,"onVisible"],[$u,"onHidden"],[ln,"onRefresh"],[hn,"onUpdated"],[Io,"onResize"],[Ra,"onResized"],[Cu,"onDrag"],[Tu,"onDragging"],[Iu,"onDragged"],[Ea,"onScroll"],[Ji,"onScrolled"],[xl,"onDestroy"],[Lu,"onArrowsMounted"],[Pu,"onArrowsUpdated"],[Mu,"onPaginationMounted"],[Ru,"onPaginationUpdated"],[bl,"onNavigationMounted"],[Sl,"onAutoplayPlay"],[Eu,"onAutoplayPlaying"],[wl,"onAutoplayPause"],[$l,"onLazyLoadLoaded"]];function Rl(...e){return e.filter(Boolean).join(" ")}function ba(e){return e!==null&&typeof e=="object"}function Bs(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!Bs(n,t[i]));if(ba(e)&&ba(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!Bs(e[o],t[o]))}return e===t}function sh(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function lh(e,t){if(e){const n=Object.keys(e);for(let i=0;i<n.length;i++){const o=n[i];if(o!=="__proto__"&&t(e[o],o)===!1)break}}return e}function js(e,t){const n=e;return lh(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():ba(i)?n[o]=js(ba(n[o])?n[o]:{},i):n[o]=i}),n}var ch=({children:e,className:t,...n})=>s.createElement("div",{className:Rl("splide__track",t),...n},s.createElement("ul",{className:"splide__list"},e)),El=class extends s.Component{constructor(){super(...arguments),this.splideRef=s.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new Ml(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=js({},e||{}),this.slides=this.getSlides())}componentWillUnmount(){this.splide&&(this.splide.destroy(),this.splide=void 0),this.options=void 0,this.slides.length=0}componentDidUpdate(){if(!this.splide)return;const{options:e}=this.props;e&&!Bs(this.options,e)&&(this.splide.options=e,this.options=js({},e));const t=this.getSlides();sh(this.slides,t)||(this.splide.refresh(),this.slides=t)}sync(e){var t;(t=this.splide)==null||t.sync(e)}go(e){var t;(t=this.splide)==null||t.go(e)}getSlides(){var e;if(this.splide){const t=(e=this.splide.Components.Elements)==null?void 0:e.list.children;return t&&Array.prototype.slice.call(t)||[]}return[]}bind(e){hc.forEach(([t,n])=>{const i=this.props[n];typeof i=="function"&&e.on(t,(...o)=>{i(e,...o)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:i,...o}=this.props;return s.createElement(t,{className:Rl("splide",e),ref:this.splideRef,...this.omit(o,["options",...hc.map(r=>r[1])])},n?s.createElement(ch,null,i):i)}},kl=({children:e,className:t,...n})=>s.createElement("li",{className:Rl("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("react"),Et=require("classnames"),E=require("./panelAvailability-D8c7cdbu.js"),qn=require("react-dom");function ug(e){return e.type==="object"&&e.version===1}const pg="ControlSlider-module__wrapper___sHEkd",gg="ControlSlider-module__hoverArrow___A-dOH",mg="ControlSlider-module__sliderItem___QQSkR",hg="ControlSlider-module__sliderImage___9hRl-",fg="ControlSlider-module__arrow___05ghY",yg="ControlSlider-module__arrowVertical___tBfVN",vg="ControlSlider-module__nextArrow___-30Yc",xg="ControlSlider-module__arrowInner___aEra3",bg="ControlSlider-module__arrowIcon___S4ztF",Sg="ControlSlider-module__arrowImg___2dwJW",wg="ControlSlider-module__mirror___brd6U",$g="ControlSlider-module__pagination___bicLF",Cg="ControlSlider-module__paginationInner___bT-P-",Tg="ControlSlider-module__paginationVertical___zYqKw",Ig="ControlSlider-module__paginationItem___nTRbk",Lg="ControlSlider-module__dot___p1Qun",Pg="ControlSlider-module__activeDot___LHFaj",Mg="ControlSlider-module__paginationInsideBottom___R3FWn",Rg="ControlSlider-module__paginationInsideTop___V-qb-",Eg="ControlSlider-module__paginationOutsideBottom___14w8D",kg="ControlSlider-module__paginationOutsideTop___SCLqB",Ag="ControlSlider-module__paginationInsideLeft___yOBRZ",Fg="ControlSlider-module__paginationInsideRight___Rtt3o",Ng="ControlSlider-module__paginationOutsideLeft___lahaw",_g="ControlSlider-module__paginationOutsideRight___EtuQa",Hg="ControlSlider-module__imgWrapper___UjEgB",Wg="ControlSlider-module__captionBlock___dJ6-j",Og="ControlSlider-module__captionTextWrapper___HFlpf",Dg="ControlSlider-module__captionText___uGBVc",zg="ControlSlider-module__active___WZK4G",Bg="ControlSlider-module__withPointerEvents___t-18M",jg="ControlSlider-module__topLeftAlignment___zjnGM",Vg="ControlSlider-module__topCenterAlignment___gD1xW",Gg="ControlSlider-module__topRightAlignment___NMapS",Xg="ControlSlider-module__middleLeftAlignment___OnUrY",Ug="ControlSlider-module__middleCenterAlignment___Tdkl0",qg="ControlSlider-module__middleRightAlignment___wEbfX",Yg="ControlSlider-module__bottomLeftAlignment___cTP2-",Kg="ControlSlider-module__bottomCenterAlignment___c54fB",Qg="ControlSlider-module__bottomRightAlignment___kEwrz",Zg="ControlSlider-module__clickOverlay___DZA28",Jg="ControlSlider-module__contain___pLyq7",em="ControlSlider-module__cover___KdDat",Rt={wrapper:pg,hoverArrow:gg,sliderItem:mg,sliderImage:hg,arrow:fg,arrowVertical:yg,nextArrow:vg,arrowInner:xg,arrowIcon:bg,arrowImg:Sg,mirror:wg,pagination:$g,paginationInner:Cg,paginationVertical:Tg,paginationItem:Ig,dot:Lg,activeDot:Pg,paginationInsideBottom:Mg,paginationInsideTop:Rg,paginationOutsideBottom:Eg,paginationOutsideTop:kg,paginationInsideLeft:Ag,paginationInsideRight:Fg,paginationOutsideLeft:Ng,paginationOutsideRight:_g,imgWrapper:Hg,captionBlock:Wg,captionTextWrapper:Og,captionText:Dg,active:zg,withPointerEvents:Bg,topLeftAlignment:jg,topCenterAlignment:Vg,topRightAlignment:Gg,middleLeftAlignment:Xg,middleCenterAlignment:Ug,middleRightAlignment:qg,bottomLeftAlignment:Yg,bottomCenterAlignment:Kg,bottomRightAlignment:Qg,clickOverlay:Zg,contain:Jg,cover:em};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 nm(e,t,n){return t&&tm(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var nc="(prefers-reduced-motion: reduce)",ho=1,im=2,To=3,Oo=4,Cr=5,sa=6,fa=7,om={CREATED:ho,MOUNTED:im,IDLE:To,MOVING:Oo,SCROLLING:Cr,DRAGGING:sa,DESTROYED:fa};function ci(e){e.length=0}function Ai(e,t,n){return Array.prototype.slice.call(e,t,n)}function tn(e){return e.bind.apply(e,[null].concat(Ai(arguments,1)))}var uu=setTimeout,Ns=function(){};function ic(e){return requestAnimationFrame(e)}function Ma(e,t){return typeof t===e}function dr(e){return!pl(e)&&Ma("object",e)}var ul=Array.isArray,pu=tn(Ma,"function"),Pi=tn(Ma,"string"),Tr=tn(Ma,"undefined");function pl(e){return e===null}function gu(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Ir(e){return ul(e)?e:[e]}function En(e,t){Ir(e).forEach(t)}function gl(e,t){return e.indexOf(t)>-1}function la(e,t){return e.push.apply(e,Ir(t)),e}function oi(e,t,n){e&&En(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Gn(e,t){oi(e,Pi(t)?t.split(" "):t,!0)}function Lr(e,t){En(t,e.appendChild.bind(e))}function ml(e,t){En(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function ur(e,t){return gu(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function mu(e,t){var n=e?Ai(e.children):[];return t?n.filter(function(i){return ur(i,t)}):n}function Pr(e,t){return t?mu(e,t)[0]:e.firstElementChild}var pr=Object.keys;function qi(e,t,n){return e&&(n?pr(e).reverse():pr(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function gr(e){return Ai(arguments,1).forEach(function(t){qi(t,function(n,i){e[i]=t[i]})}),e}function Ci(e){return Ai(arguments,1).forEach(function(t){qi(t,function(n,i){ul(n)?e[i]=n.slice():dr(n)?e[i]=Ci({},dr(e[i])?e[i]:{},n):e[i]=n})}),e}function oc(e,t){En(t||pr(e),function(n){delete e[n]})}function Xn(e,t){En(e,function(n){En(t,function(i){n&&n.removeAttribute(i)})})}function Gt(e,t,n){dr(t)?qi(t,function(i,o){Gt(e,o,i)}):En(e,function(i){pl(n)||n===""?Xn(i,t):i.setAttribute(t,String(n))})}function bo(e,t,n){var i=document.createElement(e);return t&&(Pi(t)?Gn(i,t):Gt(i,t)),n&&Lr(n,i),i}function Nn(e,t,n){if(Tr(n))return getComputedStyle(e)[t];pl(n)||(e.style[t]=""+n)}function mr(e,t){Nn(e,"display",t)}function hu(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function _n(e,t){return e.getAttribute(t)}function rc(e,t){return e&&e.classList.contains(t)}function Ln(e){return e.getBoundingClientRect()}function Ki(e){En(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function fu(e){return Pr(new DOMParser().parseFromString(e,"text/html").body)}function ni(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function yu(e,t){return e&&e.querySelector(t)}function hl(e,t){return t?Ai(e.querySelectorAll(t)):[]}function ri(e,t){oi(e,t,!1)}function _s(e){return e.timeStamp}function _i(e){return Pi(e)?e:e?e+"px":""}var Mr="splide",fl="data-"+Mr;function ar(e,t){if(!e)throw new Error("["+Mr+"] "+(t||""))}var Mi=Math.min,ya=Math.max,va=Math.floor,hr=Math.ceil,vn=Math.abs;function vu(e,t,n){return vn(e-t)<n}function ca(e,t,n,i){var o=Mi(t,n),r=ya(t,n);return i?o<e&&e<r:o<=e&&e<=r}function uo(e,t,n){var i=Mi(t,n),o=ya(t,n);return Mi(ya(i,e),o)}function Hs(e){return+(e>0)-+(e<0)}function Ws(e,t){return En(t,function(n){e=e.replace("%s",""+n)}),e}function yl(e){return e<10?"0"+e:""+e}var ac={};function rm(e){return""+e+yl(ac[e]=(ac[e]||0)+1)}function xu(){var e=[];function t(l,c,d,u){o(l,c,function(p,y,x){var g="addEventListener"in p,h=g?p.removeEventListener.bind(p,y,d,u):p.removeListener.bind(p,d);g?p.addEventListener(y,d,u):p.addListener(d),e.push([p,y,x,d,h])})}function n(l,c,d){o(l,c,function(u,p,y){e=e.filter(function(x){return x[0]===u&&x[1]===p&&x[2]===y&&(!d||x[3]===d)?(x[4](),!1):!0})})}function i(l,c,d){var u,p=!0;return typeof CustomEvent=="function"?u=new CustomEvent(c,{bubbles:p,detail:d}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(c,p,!1,d)),l.dispatchEvent(u),u}function o(l,c,d){En(l,function(u){u&&En(c,function(p){p.split(" ").forEach(function(y){var x=y.split(".");d(u,x[0],x[1])})})})}function r(){e.forEach(function(l){l[4]()}),ci(e)}return{bind:t,unbind:n,dispatch:i,destroy:r}}var Fi="mounted",Os="ready",di="move",Do="moved",vl="click",bu="active",Su="inactive",wu="visible",$u="hidden",ln="refresh",hn="updated",Io="resize",Ra="resized",Cu="drag",Tu="dragging",Iu="dragged",Ea="scroll",Ji="scrolled",am="overflow",xl="destroy",Lu="arrows:mounted",Pu="arrows:updated",Mu="pagination:mounted",Ru="pagination:updated",bl="navigation:mounted",Sl="autoplay:play",Eu="autoplay:playing",wl="autoplay:pause",$l="lazyload:loaded",ku="sk",Au="sh",xa="ei";function an(e){var t=e?e.event.bus:document.createDocumentFragment(),n=xu();function i(r,l){n.bind(t,Ir(r).join(" "),function(c){l.apply(l,ul(c.detail)?c.detail:[])})}function o(r){n.dispatch(t,r,Ai(arguments,1))}return e&&e.event.on(xl,n.destroy),gr(n,{bus:t,on:i,off:tn(n.unbind,t),emit:o})}function ka(e,t,n,i){var o=Date.now,r,l=0,c,d=!0,u=0;function p(){if(!d){if(l=e?Mi((o()-r)/e,1):1,n&&n(l),l>=1&&(t(),r=o(),i&&++u>=i))return x();c=ic(p)}}function y(_){_||h(),r=o()-(_?l*e:0),d=!1,c=ic(p)}function x(){d=!0}function g(){r=o(),l=0,n&&n(l)}function h(){c&&cancelAnimationFrame(c),l=0,c=0,d=!0}function b(_){e=_}function S(){return d}return{start:y,rewind:g,pause:x,cancel:h,set:b,isPaused:S}}function sm(e){var t=e;function n(o){t=o}function i(o){return gl(Ir(o),t)}return{set:n,is:i}}function lm(e,t){var n=ka(0,e,null,1);return function(){n.isPaused()&&n.start()}}function cm(e,t,n){var i=e.state,o=n.breakpoints||{},r=n.reducedMotion||{},l=xu(),c=[];function d(){var h=n.mediaQuery==="min";pr(o).sort(function(b,S){return h?+b-+S:+S-+b}).forEach(function(b){p(o[b],"("+(h?"min":"max")+"-width:"+b+"px)")}),p(r,nc),y()}function u(h){h&&l.destroy()}function p(h,b){var S=matchMedia(b);l.bind(S,"change",y),c.push([h,S])}function y(){var h=i.is(fa),b=n.direction,S=c.reduce(function(_,v){return Ci(_,v[1].matches?v[0]:{})},{});oc(n),g(S),n.destroy?e.destroy(n.destroy==="completely"):h?(u(!0),e.mount()):b!==n.direction&&e.refresh()}function x(h){matchMedia(nc).matches&&(h?Ci(n,r):oc(n,pr(r)))}function g(h,b,S){Ci(n,h),b&&Ci(Object.getPrototypeOf(n),h),(S||!i.is(ho))&&e.emit(hn,n)}return{setup:d,destroy:u,reduce:x,set:g}}var Aa="Arrow",Fa=Aa+"Left",Na=Aa+"Right",Fu=Aa+"Up",Nu=Aa+"Down",sc="rtl",_a="ttb",qa={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Fu,Na],ArrowRight:[Nu,Fa]};function dm(e,t,n){function i(r,l,c){c=c||n.direction;var d=c===sc&&!l?1:c===_a?0:-1;return qa[r]&&qa[r][d]||r.replace(/width|left|right/i,function(u,p){var y=qa[u.toLowerCase()][d]||u;return p>0?y.charAt(0).toUpperCase()+y.slice(1):y})}function o(r){return r*(n.direction===sc?1:-1)}return{resolve:i,orient:o}}var ai="role",So="tabindex",um="disabled",Hn="aria-",Rr=Hn+"controls",_u=Hn+"current",lc=Hn+"selected",Mn=Hn+"label",Cl=Hn+"labelledby",Hu=Hn+"hidden",Tl=Hn+"orientation",fr=Hn+"roledescription",cc=Hn+"live",dc=Hn+"busy",uc=Hn+"atomic",Il=[ai,So,um,Rr,_u,Mn,Cl,Hu,Tl,fr],Yn=Mr+"__",Ni="is-",Ya=Mr,pc=Yn+"track",pm=Yn+"list",Ha=Yn+"slide",Wu=Ha+"--clone",gm=Ha+"__container",Ll=Yn+"arrows",Wa=Yn+"arrow",Ou=Wa+"--prev",Du=Wa+"--next",Oa=Yn+"pagination",zu=Oa+"__page",mm=Yn+"progress",hm=mm+"__bar",fm=Yn+"toggle",ym=Yn+"spinner",vm=Yn+"sr",xm=Ni+"initialized",Qi=Ni+"active",Bu=Ni+"prev",ju=Ni+"next",Ds=Ni+"visible",zs=Ni+"loading",Vu=Ni+"focus-in",Gu=Ni+"overflow",bm=[Qi,Ds,Bu,ju,zs,Vu,Gu],Sm={slide:Ha,clone:Wu,arrows:Ll,arrow:Wa,prev:Ou,next:Du,pagination:Oa,page:zu,spinner:ym};function wm(e,t){if(pu(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!ur(n,t);)n=n.parentElement;return n}var $m=5,gc=200,Xu="touchstart mousedown",Ka="touchmove mousemove",Qa="touchend touchcancel mouseup click";function Cm(e,t,n){var i=an(e),o=i.on,r=i.bind,l=e.root,c=n.i18n,d={},u=[],p=[],y=[],x,g,h;function b(){L(),P(),v()}function S(){o(ln,_),o(ln,b),o(hn,v),r(document,Xu+" keydown",function(B){h=B.type==="keydown"},{capture:!0}),r(l,"focusin",function(){oi(l,Vu,!!h)})}function _(B){var H=Il.concat("style");ci(u),ri(l,p),ri(x,y),Xn([x,g],H),Xn(l,B?H:["style",fr])}function v(){ri(l,p),ri(x,y),p=X(Ya),y=X(pc),Gn(l,p),Gn(x,y),Gt(l,Mn,n.label),Gt(l,Cl,n.labelledby)}function L(){x=q("."+pc),g=Pr(x,"."+pm),ar(x&&g,"A track/list element is missing."),la(u,mu(g,"."+Ha+":not(."+Wu+")")),qi({arrows:Ll,pagination:Oa,prev:Ou,next:Du,bar:hm,toggle:fm},function(B,H){d[H]=q("."+B)}),gr(d,{root:l,track:x,list:g,slides:u})}function P(){var B=l.id||rm(Mr),H=n.role;l.id=B,x.id=x.id||B+"-track",g.id=g.id||B+"-list",!_n(l,ai)&&l.tagName!=="SECTION"&&H&&Gt(l,ai,H),Gt(l,fr,c.carousel),Gt(g,ai,"presentation")}function q(B){var H=yu(l,B);return H&&wm(H,"."+Ya)===l?H:void 0}function X(B){return[B+"--"+n.type,B+"--"+n.direction,n.drag&&B+"--draggable",n.isNavigation&&B+"--nav",B===Ya&&Qi]}return gr(d,{setup:b,mount:S,destroy:_})}var Lo="slide",zo="loop",Er="fade";function Tm(e,t,n,i){var o=an(e),r=o.on,l=o.emit,c=o.bind,d=e.Components,u=e.root,p=e.options,y=p.isNavigation,x=p.updateOnMove,g=p.i18n,h=p.pagination,b=p.slideFocus,S=d.Direction.resolve,_=_n(i,"style"),v=_n(i,Mn),L=n>-1,P=Pr(i,"."+gm),q;function X(){L||(i.id=u.id+"-slide"+yl(t+1),Gt(i,ai,h?"tabpanel":"group"),Gt(i,fr,g.slide),Gt(i,Mn,v||Ws(g.slideLabel,[t+1,e.length]))),B()}function B(){c(i,"click",tn(l,vl,U)),c(i,"keydown",tn(l,ku,U)),r([Do,Au,Ji],$),r(bl,O),x&&r(di,C)}function H(){q=!0,o.destroy(),ri(i,bm),Xn(i,Il),Gt(i,"style",_),Gt(i,Mn,v||"")}function O(){var M=e.splides.map(function(f){var K=f.splide.Components.Slides.getAt(t);return K?K.slide.id:""}).join(" ");Gt(i,Mn,Ws(g.slideX,(L?n:t)+1)),Gt(i,Rr,M),Gt(i,ai,b?"button":""),b&&Xn(i,fr)}function C(){q||$()}function $(){if(!q){var M=e.index;Q(),R(),oi(i,Bu,t===M-1),oi(i,ju,t===M+1)}}function Q(){var M=w();M!==rc(i,Qi)&&(oi(i,Qi,M),Gt(i,_u,y&&M||""),l(M?bu:Su,U))}function R(){var M=V(),f=!M&&(!w()||L);if(e.state.is([Oo,Cr])||Gt(i,Hu,f||""),Gt(hl(i,p.focusableNodes||""),So,f?-1:""),b&&Gt(i,So,f?-1:0),M!==rc(i,Ds)&&(oi(i,Ds,M),l(M?wu:$u,U)),!M&&document.activeElement===i){var K=d.Slides.getAt(e.index);K&&hu(K.slide)}}function T(M,f,K){Nn(K&&P||i,M,f)}function w(){var M=e.index;return M===t||p.cloneStatus&&M===n}function V(){if(e.is(Er))return w();var M=Ln(d.Elements.track),f=Ln(i),K=S("left",!0),G=S("right",!0);return va(M[K])<=hr(f[K])&&va(f[G])<=hr(M[G])}function z(M,f){var K=vn(M-t);return!L&&(p.rewind||e.is(zo))&&(K=Mi(K,e.length-K)),K<=f}var U={index:t,slideIndex:n,slide:i,container:P,isClone:L,mount:X,destroy:H,update:$,style:T,isWithin:z};return U}function Im(e,t,n){var i=an(e),o=i.on,r=i.emit,l=i.bind,c=t.Elements,d=c.slides,u=c.list,p=[];function y(){x(),o(ln,g),o(ln,x)}function x(){d.forEach(function($,Q){b($,Q,-1)})}function g(){q(function($){$.destroy()}),ci(p)}function h(){q(function($){$.update()})}function b($,Q,R){var T=Tm(e,Q,R,$);T.mount(),p.push(T),p.sort(function(w,V){return w.index-V.index})}function S($){return $?X(function(Q){return!Q.isClone}):p}function _($){var Q=t.Controller,R=Q.toIndex($),T=Q.hasFocus()?1:n.perPage;return X(function(w){return ca(w.index,R,R+T-1)})}function v($){return X($)[0]}function L($,Q){En($,function(R){if(Pi(R)&&(R=fu(R)),gu(R)){var T=d[Q];T?ml(R,T):Lr(u,R),Gn(R,n.classes.slide),H(R,tn(r,Io))}}),r(ln)}function P($){Ki(X($).map(function(Q){return Q.slide})),r(ln)}function q($,Q){S(Q).forEach($)}function X($){return p.filter(pu($)?$:function(Q){return Pi($)?ur(Q.slide,$):gl(Ir($),Q.index)})}function B($,Q,R){q(function(T){T.style($,Q,R)})}function H($,Q){var R=hl($,"img"),T=R.length;T?R.forEach(function(w){l(w,"load error",function(){--T||Q()})}):Q()}function O($){return $?d.length:p.length}function C(){return p.length>n.perPage}return{mount:y,destroy:g,update:h,register:b,get:S,getIn:_,getAt:v,add:L,remove:P,forEach:q,filter:X,style:B,getLength:O,isEnough:C}}function Lm(e,t,n){var i=an(e),o=i.on,r=i.bind,l=i.emit,c=t.Slides,d=t.Direction.resolve,u=t.Elements,p=u.root,y=u.track,x=u.list,g=c.getAt,h=c.style,b,S,_;function v(){L(),r(window,"resize load",lm(tn(l,Io))),o([hn,ln],L),o(Io,P)}function L(){b=n.direction===_a,Nn(p,"maxWidth",_i(n.width)),Nn(y,d("paddingLeft"),q(!1)),Nn(y,d("paddingRight"),q(!0)),P(!0)}function P(U){var M=Ln(p);(U||S.width!==M.width||S.height!==M.height)&&(Nn(y,"height",X()),h(d("marginRight"),_i(n.gap)),h("width",H()),h("height",O(),!0),S=M,l(Ra),_!==(_=z())&&(oi(p,Gu,_),l(am,_)))}function q(U){var M=n.padding,f=d(U?"right":"left");return M&&_i(M[f]||(dr(M)?0:M))||"0px"}function X(){var U="";return b&&(U=B(),ar(U,"height or heightRatio is missing."),U="calc("+U+" - "+q(!1)+" - "+q(!0)+")"),U}function B(){return _i(n.height||Ln(x).width*n.heightRatio)}function H(){return n.autoWidth?null:_i(n.fixedWidth)||(b?"":C())}function O(){return _i(n.fixedHeight)||(b?n.autoHeight?null:C():B())}function C(){var U=_i(n.gap);return"calc((100%"+(U&&" + "+U)+")/"+(n.perPage||1)+(U&&" - "+U)+")"}function $(){return Ln(x)[d("width")]}function Q(U,M){var f=g(U||0);return f?Ln(f.slide)[d("width")]+(M?0:w()):0}function R(U,M){var f=g(U);if(f){var K=Ln(f.slide)[d("right")],G=Ln(x)[d("left")];return vn(K-G)+(M?0:w())}return 0}function T(U){return R(e.length-1)-R(0)+Q(0,U)}function w(){var U=g(0);return U&&parseFloat(Nn(U.slide,d("marginRight")))||0}function V(U){return parseFloat(Nn(y,d("padding"+(U?"Right":"Left"))))||0}function z(){return e.is(Er)||T(!0)>$()}return{mount:v,resize:P,listSize:$,slideSize:Q,sliderSize:T,totalSize:R,getPadding:V,isOverflow:z}}var Pm=2;function Mm(e,t,n){var i=an(e),o=i.on,r=t.Elements,l=t.Slides,c=t.Direction.resolve,d=[],u;function p(){o(ln,y),o([hn,Io],g),(u=S())&&(h(u),t.Layout.resize(!0))}function y(){x(),p()}function x(){Ki(d),ci(d),i.destroy()}function g(){var _=S();u!==_&&(u<_||!_)&&i.emit(ln)}function h(_){var v=l.get().slice(),L=v.length;if(L){for(;v.length<_;)la(v,v);la(v.slice(-_),v.slice(0,_)).forEach(function(P,q){var X=q<_,B=b(P.slide,q);X?ml(B,v[0].slide):Lr(r.list,B),la(d,B),l.register(B,q-_+(X?0:L),P.index)})}}function b(_,v){var L=_.cloneNode(!0);return Gn(L,n.classes.clone),L.id=e.root.id+"-clone"+yl(v+1),L}function S(){var _=n.clones;if(!e.is(zo))_=0;else if(Tr(_)){var v=n[c("fixedWidth")]&&t.Layout.slideSize(0),L=v&&hr(Ln(r.track)[c("width")]/v);_=L||n[c("autoWidth")]&&e.length||n.perPage*Pm}return _}return{mount:p,destroy:x}}function Rm(e,t,n){var i=an(e),o=i.on,r=i.emit,l=e.state.set,c=t.Layout,d=c.slideSize,u=c.getPadding,p=c.totalSize,y=c.listSize,x=c.sliderSize,g=t.Direction,h=g.resolve,b=g.orient,S=t.Elements,_=S.list,v=S.track,L;function P(){L=t.Transition,o([Fi,Ra,hn,ln],q)}function q(){t.Controller.isBusy()||(t.Scroll.cancel(),B(e.index),t.Slides.update())}function X(f,K,G,ge){f!==K&&U(f>G)&&($(),H(C(T(),f>G),!0)),l(Oo),r(di,K,G,f),L.start(K,function(){l(To),r(Do,K,G,f),ge&&ge()})}function B(f){H(R(f,!0))}function H(f,K){if(!e.is(Er)){var G=K?f:O(f);Nn(_,"transform","translate"+h("X")+"("+G+"px)"),f!==G&&r(Au)}}function O(f){if(e.is(zo)){var K=Q(f),G=K>t.Controller.getEnd(),ge=K<0;(ge||G)&&(f=C(f,G))}return f}function C(f,K){var G=f-z(K),ge=x();return f-=b(ge*(hr(vn(G)/ge)||1))*(K?1:-1),f}function $(){H(T(),!0),L.cancel()}function Q(f){for(var K=t.Slides.get(),G=0,ge=1/0,k=0;k<K.length;k++){var ce=K[k].index,I=vn(R(ce,!0)-f);if(I<=ge)ge=I,G=ce;else break}return G}function R(f,K){var G=b(p(f-1)-V(f));return K?w(G):G}function T(){var f=h("left");return Ln(_)[f]-Ln(v)[f]+b(u(!1))}function w(f){return n.trimSpace&&e.is(Lo)&&(f=uo(f,0,b(x(!0)-y()))),f}function V(f){var K=n.focus;return K==="center"?(y()-d(f,!0))/2:+K*d(f)||0}function z(f){return R(f?t.Controller.getEnd():0,!!n.trimSpace)}function U(f){var K=b(C(T(),f));return f?K>=0:K<=_[h("scrollWidth")]-Ln(v)[h("width")]}function M(f,K){K=Tr(K)?T():K;var G=f!==!0&&b(K)<b(z(!1)),ge=f!==!1&&b(K)>b(z(!0));return G||ge}return{mount:P,move:X,jump:B,translate:H,shift:C,cancel:$,toIndex:Q,toPosition:R,getPosition:T,getLimit:z,exceededLimit:M,reposition:q}}function Em(e,t,n){var i=an(e),o=i.on,r=i.emit,l=t.Move,c=l.getPosition,d=l.getLimit,u=l.toPosition,p=t.Slides,y=p.isEnough,x=p.getLength,g=n.omitEnd,h=e.is(zo),b=e.is(Lo),S=tn(T,!1),_=tn(T,!0),v=n.start||0,L,P=v,q,X,B;function H(){O(),o([hn,ln,xa],O),o(Ra,C)}function O(){q=x(!0),X=n.perMove,B=n.perPage,L=U();var I=uo(v,0,g?L:q-1);I!==v&&(v=I,l.reposition())}function C(){L!==U()&&r(xa)}function $(I,ue,ee){if(!ce()){var xe=R(I),Le=z(xe);Le>-1&&(ue||Le!==v)&&(G(Le),l.move(xe,Le,P,ee))}}function Q(I,ue,ee,xe){t.Scroll.scroll(I,ue,ee,function(){var Le=z(l.toIndex(c()));G(g?Mi(Le,L):Le),xe&&xe()})}function R(I){var ue=v;if(Pi(I)){var ee=I.match(/([+\-<>])(\d+)?/)||[],xe=ee[1],Le=ee[2];xe==="+"||xe==="-"?ue=w(v+ +(""+xe+(+Le||1)),v):xe===">"?ue=Le?M(+Le):S(!0):xe==="<"&&(ue=_(!0))}else ue=h?I:uo(I,0,L);return ue}function T(I,ue){var ee=X||(k()?1:B),xe=w(v+ee*(I?-1:1),v,!(X||k()));return xe===-1&&b&&!vu(c(),d(!I),1)?I?0:L:ue?xe:z(xe)}function w(I,ue,ee){if(y()||k()){var xe=V(I);xe!==I&&(ue=I,I=xe,ee=!1),I<0||I>L?!X&&(ca(0,I,ue,!0)||ca(L,ue,I,!0))?I=M(f(I)):h?I=ee?I<0?-(q%B||B):q:I:n.rewind?I=I<0?L:0:I=-1:ee&&I!==ue&&(I=M(f(ue)+(I<ue?-1:1)))}else I=-1;return I}function V(I){if(b&&n.trimSpace==="move"&&I!==v)for(var ue=c();ue===u(I,!0)&&ca(I,0,e.length-1,!n.rewind);)I<v?--I:++I;return I}function z(I){return h?(I+q)%q||0:I}function U(){for(var I=q-(k()||h&&X?1:B);g&&I-- >0;)if(u(q-1,!0)!==u(I,!0)){I++;break}return uo(I,0,q-1)}function M(I){return uo(k()?I:B*I,0,L)}function f(I){return k()?Mi(I,L):va((I>=L?q-1:I)/B)}function K(I){var ue=l.toIndex(I);return b?uo(ue,0,L):ue}function G(I){I!==v&&(P=v,v=I)}function ge(I){return I?P:v}function k(){return!Tr(n.focus)||n.isNavigation}function ce(){return e.state.is([Oo,Cr])&&!!n.waitForTransition}return{mount:H,go:$,scroll:Q,getNext:S,getPrev:_,getAdjacent:T,getEnd:U,setIndex:G,getIndex:ge,toIndex:M,toPage:f,toDest:K,hasFocus:k,isBusy:ce}}var km="http://www.w3.org/2000/svg",Am="m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z",Hr=40;function Fm(e,t,n){var i=an(e),o=i.on,r=i.bind,l=i.emit,c=n.classes,d=n.i18n,u=t.Elements,p=t.Controller,y=u.arrows,x=u.track,g=y,h=u.prev,b=u.next,S,_,v={};function L(){q(),o(hn,P)}function P(){X(),L()}function q(){var Q=n.arrows;Q&&!(h&&b)&&O(),h&&b&&(gr(v,{prev:h,next:b}),mr(g,Q?"":"none"),Gn(g,_=Ll+"--"+n.direction),Q&&(B(),$(),Gt([h,b],Rr,x.id),l(Lu,h,b)))}function X(){i.destroy(),ri(g,_),S?(Ki(y?[h,b]:g),h=b=null):Xn([h,b],Il)}function B(){o([Fi,Do,ln,Ji,xa],$),r(b,"click",tn(H,">")),r(h,"click",tn(H,"<"))}function H(Q){p.go(Q,!0)}function O(){g=y||bo("div",c.arrows),h=C(!0),b=C(!1),S=!0,Lr(g,[h,b]),!y&&ml(g,x)}function C(Q){var R='<button class="'+c.arrow+" "+(Q?c.prev:c.next)+'" type="button"><svg xmlns="'+km+'" viewBox="0 0 '+Hr+" "+Hr+'" width="'+Hr+'" height="'+Hr+'" focusable="false"><path d="'+(n.arrowPath||Am)+'" />';return fu(R)}function $(){if(h&&b){var Q=e.index,R=p.getPrev(),T=p.getNext(),w=R>-1&&Q<R?d.last:d.prev,V=T>-1&&Q>T?d.first:d.next;h.disabled=R<0,b.disabled=T<0,Gt(h,Mn,w),Gt(b,Mn,V),l(Pu,h,b,R,T)}}return{arrows:v,mount:L,destroy:X,update:$}}var Nm=fl+"-interval";function _m(e,t,n){var i=an(e),o=i.on,r=i.bind,l=i.emit,c=ka(n.interval,e.go.bind(e,">"),B),d=c.isPaused,u=t.Elements,p=t.Elements,y=p.root,x=p.toggle,g=n.autoplay,h,b,S=g==="pause";function _(){g&&(v(),x&&Gt(x,Rr,u.track.id),S||L(),X())}function v(){n.pauseOnHover&&r(y,"mouseenter mouseleave",function(O){h=O.type==="mouseenter",q()}),n.pauseOnFocus&&r(y,"focusin focusout",function(O){b=O.type==="focusin",q()}),x&&r(x,"click",function(){S?L():P(!0)}),o([di,Ea,ln],c.rewind),o(di,H)}function L(){d()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),b=h=S=!1,X(),l(Sl))}function P(O){O===void 0&&(O=!0),S=!!O,X(),d()||(c.pause(),l(wl))}function q(){S||(h||b?P(!1):L())}function X(){x&&(oi(x,Qi,!S),Gt(x,Mn,n.i18n[S?"play":"pause"]))}function B(O){var C=u.bar;C&&Nn(C,"width",O*100+"%"),l(Eu,O)}function H(O){var C=t.Slides.getAt(O);c.set(C&&+_n(C.slide,Nm)||n.interval)}return{mount:_,destroy:c.cancel,play:L,pause:P,isPaused:d}}function Hm(e,t,n){var i=an(e),o=i.on;function r(){n.cover&&(o($l,tn(c,!0)),o([Fi,hn,ln],tn(l,!0)))}function l(d){t.Slides.forEach(function(u){var p=Pr(u.container||u.slide,"img");p&&p.src&&c(d,p,u)})}function c(d,u,p){p.style("background",d?'center/cover no-repeat url("'+u.src+'")':"",!0),mr(u,d?"none":"")}return{mount:r,destroy:tn(l,!1)}}var Wm=10,Om=600,Dm=.6,zm=1.5,Bm=800;function jm(e,t,n){var i=an(e),o=i.on,r=i.emit,l=e.state.set,c=t.Move,d=c.getPosition,u=c.getLimit,p=c.exceededLimit,y=c.translate,x=e.is(Lo),g,h,b=1;function S(){o(di,P),o([hn,ln],q)}function _(B,H,O,C,$){var Q=d();if(P(),O&&(!x||!p())){var R=t.Layout.sliderSize(),T=Hs(B)*R*va(vn(B)/R)||0;B=c.toPosition(t.Controller.toDest(B%R))+T}var w=vu(Q,B,1);b=1,H=w?0:H||ya(vn(B-Q)/zm,Bm),h=C,g=ka(H,v,tn(L,Q,B,$),1),l(Cr),r(Ea),g.start()}function v(){l(To),h&&h(),r(Ji)}function L(B,H,O,C){var $=d(),Q=B+(H-B)*X(C),R=(Q-$)*b;y($+R),x&&!O&&p()&&(b*=Dm,vn(R)<Wm&&_(u(p(!0)),Om,!1,h,!0))}function P(){g&&g.cancel()}function q(){g&&!g.isPaused()&&(P(),v())}function X(B){var H=n.easingFunc;return H?H(B):1-Math.pow(1-B,4)}return{mount:S,destroy:P,scroll:_,cancel:q}}var po={passive:!1,capture:!0};function Vm(e,t,n){var i=an(e),o=i.on,r=i.emit,l=i.bind,c=i.unbind,d=e.state,u=t.Move,p=t.Scroll,y=t.Controller,x=t.Elements.track,g=t.Media.reduce,h=t.Direction,b=h.resolve,S=h.orient,_=u.getPosition,v=u.exceededLimit,L,P,q,X,B,H=!1,O,C,$;function Q(){l(x,Ka,Ns,po),l(x,Qa,Ns,po),l(x,Xu,T,po),l(x,"click",z,{capture:!0}),l(x,"dragstart",ni),o([Fi,hn],R)}function R(){var Z=n.drag;de(!Z),X=Z==="free"}function T(Z){if(O=!1,!C){var pe=Le(Z);xe(Z.target)&&(pe||!Z.button)&&(y.isBusy()?ni(Z,!0):($=pe?x:window,B=d.is([Oo,Cr]),q=null,l($,Ka,w,po),l($,Qa,V,po),u.cancel(),p.cancel(),U(Z)))}}function w(Z){if(d.is(sa)||(d.set(sa),r(Cu)),Z.cancelable)if(B){u.translate(L+ee(k(Z)));var pe=ce(Z)>gc,ie=H!==(H=v());(pe||ie)&&U(Z),O=!0,r(Tu),ni(Z)}else K(Z)&&(B=f(Z),ni(Z))}function V(Z){d.is(sa)&&(d.set(To),r(Iu)),B&&(M(Z),ni(Z)),c($,Ka,w),c($,Qa,V),B=!1}function z(Z){!C&&O&&ni(Z,!0)}function U(Z){q=P,P=Z,L=_()}function M(Z){var pe=G(Z),ie=ge(pe),me=n.rewind&&n.rewindByDrag;g(!1),X?y.scroll(ie,0,n.snap):e.is(Er)?y.go(S(Hs(pe))<0?me?"<":"-":me?">":"+"):e.is(Lo)&&H&&me?y.go(v(!0)?">":"<"):y.go(y.toDest(ie),!0),g(!0)}function f(Z){var pe=n.dragMinThreshold,ie=dr(pe),me=ie&&pe.mouse||0,ve=(ie?pe.touch:+pe)||10;return vn(k(Z))>(Le(Z)?ve:me)}function K(Z){return vn(k(Z))>vn(k(Z,!0))}function G(Z){if(e.is(zo)||!H){var pe=ce(Z);if(pe&&pe<gc)return k(Z)/pe}return 0}function ge(Z){return _()+Hs(Z)*Mi(vn(Z)*(n.flickPower||600),X?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function k(Z,pe){return ue(Z,pe)-ue(I(Z),pe)}function ce(Z){return _s(Z)-_s(I(Z))}function I(Z){return P===Z&&q||P}function ue(Z,pe){return(Le(Z)?Z.changedTouches[0]:Z)["page"+b(pe?"Y":"X")]}function ee(Z){return Z/(H&&e.is(Lo)?$m:1)}function xe(Z){var pe=n.noDrag;return!ur(Z,"."+zu+", ."+Wa)&&(!pe||!ur(Z,pe))}function Le(Z){return typeof TouchEvent<"u"&&Z instanceof TouchEvent}function se(){return B}function de(Z){C=Z}return{mount:Q,disable:de,isDragging:se}}var Gm={Spacebar:" ",Right:Na,Left:Fa,Up:Fu,Down:Nu};function Pl(e){return e=Pi(e)?e:e.key,Gm[e]||e}var mc="keydown";function Xm(e,t,n){var i=an(e),o=i.on,r=i.bind,l=i.unbind,c=e.root,d=t.Direction.resolve,u,p;function y(){x(),o(hn,g),o(hn,x),o(di,b)}function x(){var _=n.keyboard;_&&(u=_==="global"?window:c,r(u,mc,S))}function g(){l(u,mc)}function h(_){p=_}function b(){var _=p;p=!0,uu(function(){p=_})}function S(_){if(!p){var v=Pl(_);v===d(Fa)?e.go("<"):v===d(Na)&&e.go(">")}}return{mount:y,destroy:g,disable:h}}var sr=fl+"-lazy",da=sr+"-srcset",Um="["+sr+"], ["+da+"]";function qm(e,t,n){var i=an(e),o=i.on,r=i.off,l=i.bind,c=i.emit,d=n.lazyLoad==="sequential",u=[Do,Ji],p=[];function y(){n.lazyLoad&&(x(),o(ln,x))}function x(){ci(p),g(),d?_():(r(u),o(u,h),h())}function g(){t.Slides.forEach(function(v){hl(v.slide,Um).forEach(function(L){var P=_n(L,sr),q=_n(L,da);if(P!==L.src||q!==L.srcset){var X=n.classes.spinner,B=L.parentElement,H=Pr(B,"."+X)||bo("span",X,B);p.push([L,v,H]),L.src||mr(L,"none")}})})}function h(){p=p.filter(function(v){var L=n.perPage*((n.preloadPages||1)+1)-1;return v[1].isWithin(e.index,L)?b(v):!0}),p.length||r(u)}function b(v){var L=v[0];Gn(v[1].slide,zs),l(L,"load error",tn(S,v)),Gt(L,"src",_n(L,sr)),Gt(L,"srcset",_n(L,da)),Xn(L,sr),Xn(L,da)}function S(v,L){var P=v[0],q=v[1];ri(q.slide,zs),L.type!=="error"&&(Ki(v[2]),mr(P,""),c($l,P,q),c(Io)),d&&_()}function _(){p.length&&b(p.shift())}return{mount:y,destroy:tn(ci,p),check:h}}function Ym(e,t,n){var i=an(e),o=i.on,r=i.emit,l=i.bind,c=t.Slides,d=t.Elements,u=t.Controller,p=u.hasFocus,y=u.getIndex,x=u.go,g=t.Direction.resolve,h=d.pagination,b=[],S,_;function v(){L(),o([hn,ln,xa],v);var C=n.pagination;h&&mr(h,C?"":"none"),C&&(o([di,Ea,Ji],O),P(),O(),r(Mu,{list:S,items:b},H(e.index)))}function L(){S&&(Ki(h?Ai(S.children):S),ri(S,_),ci(b),S=null),i.destroy()}function P(){var C=e.length,$=n.classes,Q=n.i18n,R=n.perPage,T=p()?u.getEnd()+1:hr(C/R);S=h||bo("ul",$.pagination,d.track.parentElement),Gn(S,_=Oa+"--"+B()),Gt(S,ai,"tablist"),Gt(S,Mn,Q.select),Gt(S,Tl,B()===_a?"vertical":"");for(var w=0;w<T;w++){var V=bo("li",null,S),z=bo("button",{class:$.page,type:"button"},V),U=c.getIn(w).map(function(f){return f.slide.id}),M=!p()&&R>1?Q.pageX:Q.slideX;l(z,"click",tn(q,w)),n.paginationKeyboard&&l(z,"keydown",tn(X,w)),Gt(V,ai,"presentation"),Gt(z,ai,"tab"),Gt(z,Rr,U.join(" ")),Gt(z,Mn,Ws(M,w+1)),Gt(z,So,-1),b.push({li:V,button:z,page:w})}}function q(C){x(">"+C,!0)}function X(C,$){var Q=b.length,R=Pl($),T=B(),w=-1;R===g(Na,!1,T)?w=++C%Q:R===g(Fa,!1,T)?w=(--C+Q)%Q:R==="Home"?w=0:R==="End"&&(w=Q-1);var V=b[w];V&&(hu(V.button),x(">"+w),ni($,!0))}function B(){return n.paginationDirection||n.direction}function H(C){return b[u.toPage(C)]}function O(){var C=H(y(!0)),$=H(y());if(C){var Q=C.button;ri(Q,Qi),Xn(Q,lc),Gt(Q,So,-1)}if($){var R=$.button;Gn(R,Qi),Gt(R,lc,!0),Gt(R,So,"")}r(Ru,{list:S,items:b},C,$)}return{items:b,mount:v,destroy:L,getAt:H,update:O}}var Km=[" ","Enter"];function Qm(e,t,n){var i=n.isNavigation,o=n.slideFocus,r=[];function l(){e.splides.forEach(function(h){h.isParent||(u(e,h.splide),u(h.splide,e))}),i&&p()}function c(){r.forEach(function(h){h.destroy()}),ci(r)}function d(){c(),l()}function u(h,b){var S=an(h);S.on(di,function(_,v,L){b.go(b.is(zo)?L:_)}),r.push(S)}function p(){var h=an(e),b=h.on;b(vl,x),b(ku,g),b([Fi,hn],y),r.push(h),h.emit(bl,e.splides)}function y(){Gt(t.Elements.list,Tl,n.direction===_a?"vertical":"")}function x(h){e.go(h.index)}function g(h,b){gl(Km,Pl(b))&&(x(h),ni(b))}return{setup:tn(t.Media.set,{slideFocus:Tr(o)?i:o},!0),mount:l,destroy:c,remount:d}}function Zm(e,t,n){var i=an(e),o=i.bind,r=0;function l(){n.wheel&&o(t.Elements.track,"wheel",c,po)}function c(u){if(u.cancelable){var p=u.deltaY,y=p<0,x=_s(u),g=n.wheelMinThreshold||0,h=n.wheelSleep||0;vn(p)>g&&x-r>h&&(e.go(y?"<":">"),r=x),d(y)&&ni(u)}}function d(u){return!n.releaseWheel||e.state.is(Oo)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var Jm=90;function eh(e,t,n){var i=an(e),o=i.on,r=t.Elements.track,l=n.live&&!n.isNavigation,c=bo("span",vm),d=ka(Jm,tn(p,!1));function u(){l&&(x(!t.Autoplay.isPaused()),Gt(r,uc,!0),c.textContent="…",o(Sl,tn(x,!0)),o(wl,tn(x,!1)),o([Do,Ji],tn(p,!0)))}function p(g){Gt(r,dc,g),g?(Lr(r,c),d.start()):(Ki(c),d.cancel())}function y(){Xn(r,[cc,uc,dc]),Ki(c)}function x(g){l&&Gt(r,cc,g?"off":"polite")}return{mount:u,disable:x,destroy:y}}var th=Object.freeze({__proto__:null,Media:cm,Direction:dm,Elements:Cm,Slides:Im,Layout:Lm,Clones:Mm,Move:Rm,Controller:Em,Arrows:Fm,Autoplay:_m,Cover:Hm,Scroll:jm,Drag:Vm,Keyboard:Xm,LazyLoad:qm,Pagination:Ym,Sync:Qm,Wheel:Zm,Live:eh}),nh={prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s",play:"Start autoplay",pause:"Pause autoplay",carousel:"carousel",slide:"slide",select:"Select a slide to show",slideLabel:"%s of %s"},ih={type:"slide",role:"region",speed:400,perPage:1,cloneStatus:!0,arrows:!0,pagination:!0,paginationKeyboard:!0,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,easing:"cubic-bezier(0.25, 1, 0.5, 1)",drag:!0,direction:"ltr",trimSpace:!0,focusableNodes:"a, button, textarea, input, select, iframe",live:!0,classes:Sm,i18n:nh,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function oh(e,t,n){var i=t.Slides;function o(){an(e).on([Fi,ln],r)}function r(){i.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function l(c,d){i.style("transition","opacity "+n.speed+"ms "+n.easing),uu(d)}return{mount:o,start:l,cancel:Ns}}function rh(e,t,n){var i=t.Move,o=t.Controller,r=t.Scroll,l=t.Elements.list,c=tn(Nn,l,"transition"),d;function u(){an(e).bind(l,"transitionend",function(g){g.target===l&&d&&(y(),d())})}function p(g,h){var b=i.toPosition(g,!0),S=i.getPosition(),_=x(g);vn(b-S)>=1&&_>=1?n.useScroll?r.scroll(b,_,!1,h):(c("transform "+_+"ms "+n.easing),i.translate(b,!0),d=h):(i.jump(g),h())}function y(){c(""),r.cancel()}function x(g){var h=n.rewindSpeed;if(e.is(Lo)&&h){var b=o.getIndex(!0),S=o.getEnd();if(b===0&&g>=S||b>=S&&g===0)return h}return n.speed}return{mount:u,start:p,cancel:y}}var ah=(function(){function e(n,i){this.event=an(),this.Components={},this.state=sm(ho),this.splides=[],this._o={},this._E={};var o=Pi(n)?yu(document,n):n;ar(o,o+" is invalid."),this.root=o,i=Ci({label:_n(o,Mn)||"",labelledby:_n(o,Cl)||""},ih,e.defaults,i||{});try{Ci(i,JSON.parse(_n(o,fl)))}catch{ar(!1,"Invalid JSON")}this._o=Object.create(Ci({},i))}var t=e.prototype;return t.mount=function(i,o){var r=this,l=this.state,c=this.Components;ar(l.is([ho,fa]),"Already mounted!"),l.set(ho),this._C=c,this._T=o||this._T||(this.is(Er)?oh:rh),this._E=i||this._E;var d=gr({},th,this._E,{Transition:this._T});return qi(d,function(u,p){var y=u(r,c,r._o);c[p]=y,y.setup&&y.setup()}),qi(c,function(u){u.mount&&u.mount()}),this.emit(Fi),Gn(this.root,xm),l.set(To),this.emit(Os),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(To)&&(this._C.Sync.remount(),i.Components.Sync.remount()),this},t.go=function(i){return this._C.Controller.go(i),this},t.on=function(i,o){return this.event.on(i,o),this},t.off=function(i){return this.event.off(i),this},t.emit=function(i){var o;return(o=this.event).emit.apply(o,[i].concat(Ai(arguments,1))),this},t.add=function(i,o){return this._C.Slides.add(i,o),this},t.remove=function(i){return this._C.Slides.remove(i),this},t.is=function(i){return this._o.type===i},t.refresh=function(){return this.emit(ln),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,r=this.state;return r.is(ho)?an(this).on(Os,this.destroy.bind(this,i)):(qi(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(xl),o.destroy(),i&&ci(this.splides),r.set(fa)),this},nm(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})(),Ml=ah;Ml.defaults={};Ml.STATES=om;var hc=[[Fi,"onMounted"],[Os,"onReady"],[di,"onMove"],[Do,"onMoved"],[vl,"onClick"],[bu,"onActive"],[Su,"onInactive"],[wu,"onVisible"],[$u,"onHidden"],[ln,"onRefresh"],[hn,"onUpdated"],[Io,"onResize"],[Ra,"onResized"],[Cu,"onDrag"],[Tu,"onDragging"],[Iu,"onDragged"],[Ea,"onScroll"],[Ji,"onScrolled"],[xl,"onDestroy"],[Lu,"onArrowsMounted"],[Pu,"onArrowsUpdated"],[Mu,"onPaginationMounted"],[Ru,"onPaginationUpdated"],[bl,"onNavigationMounted"],[Sl,"onAutoplayPlay"],[Eu,"onAutoplayPlaying"],[wl,"onAutoplayPause"],[$l,"onLazyLoadLoaded"]];function Rl(...e){return e.filter(Boolean).join(" ")}function ba(e){return e!==null&&typeof e=="object"}function Bs(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!Bs(n,t[i]));if(ba(e)&&ba(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!Bs(e[o],t[o]))}return e===t}function sh(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function lh(e,t){if(e){const n=Object.keys(e);for(let i=0;i<n.length;i++){const o=n[i];if(o!=="__proto__"&&t(e[o],o)===!1)break}}return e}function js(e,t){const n=e;return lh(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():ba(i)?n[o]=js(ba(n[o])?n[o]:{},i):n[o]=i}),n}var ch=({children:e,className:t,...n})=>s.createElement("div",{className:Rl("splide__track",t),...n},s.createElement("ul",{className:"splide__list"},e)),El=class extends s.Component{constructor(){super(...arguments),this.splideRef=s.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new Ml(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=js({},e||{}),this.slides=this.getSlides())}componentWillUnmount(){this.splide&&(this.splide.destroy(),this.splide=void 0),this.options=void 0,this.slides.length=0}componentDidUpdate(){if(!this.splide)return;const{options:e}=this.props;e&&!Bs(this.options,e)&&(this.splide.options=e,this.options=js({},e));const t=this.getSlides();sh(this.slides,t)||(this.splide.refresh(),this.slides=t)}sync(e){var t;(t=this.splide)==null||t.sync(e)}go(e){var t;(t=this.splide)==null||t.go(e)}getSlides(){var e;if(this.splide){const t=(e=this.splide.Components.Elements)==null?void 0:e.list.children;return t&&Array.prototype.slice.call(t)||[]}return[]}bind(e){hc.forEach(([t,n])=>{const i=this.props[n];typeof i=="function"&&e.on(t,(...o)=>{i(e,...o)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:i,...o}=this.props;return s.createElement(t,{className:Rl("splide",e),ref:this.splideRef,...this.omit(o,["options",...hc.map(r=>r[1])])},n?s.createElement(ch,null,i):i)}},kl=({children:e,className:t,...n})=>s.createElement("li",{className:Rl("splide__slide",t),...n},e);/*!
2
2
  * Splide.js
3
3
  * Version : 4.1.3
4
4
  * License : MIT
5
5
  * Copyright: 2022 Naotoshi Fujita
6
- */const dh="RichTextRenderer-module__link___BWeZ2",uh={link:dh},ph=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(i=>/^\d/.test(i))},Bo=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>ph(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function pn(e){const{color:t,...n}=e;return n}function nn(e,t){var o,r,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:Bo(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:E.scalingValue(e.letterSpacing,t),wordSpacing:E.scalingValue(e.wordSpacing,t),fontSize:E.scalingValue(n,t),lineHeight:i!==void 0?E.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(r=e.textAppearance)==null?void 0:r.textDecoration,fontVariant:(l=e.textAppearance)==null?void 0:l.fontVariant,textAlign:e.textAlign,color:e.color}}function Uu(e){return e!=null&&e.length?e.some(t=>t.type==="link"?Uu(t.children):!!t.text):!1}const Zi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?a.jsx("a",{className:uh.link,href:i.value,target:i.target,children:t(i.children)},o):a.jsx("span",{style:gh(i),children:i.text},o));return a.jsx(a.Fragment,{children:e.map((n,i)=>{const o=n.children;return a.jsx("div",{children:Uu(o)?t(o):" "},i)})})};function gh(e){return{...e.fontFamily&&{fontFamily:Bo(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 mh="SvgImage-module__svg___q3xE-",hh="SvgImage-module__img___VsTm-",fc={svg:mh,img:hh},Za=new Map;function yr(e){return e.startsWith("data:")||e.startsWith("blob:")}function qu(e){if(yr(e))return Promise.resolve(e);const t=Za.get(e);if(t)return t;const n=fetch(e,{mode:"cors",cache:"reload"}).then(i=>{if(!i.ok)throw new Error(String(i.status));return i.blob()}).then(i=>URL.createObjectURL(i)).catch(i=>{throw Za.delete(e),i});return Za.set(e,n),n}const fh=e=>{const t=e.trim().toLowerCase();return!!(t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")||t.includes(".svg")||t.startsWith("blob:"))},yh=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,gn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[r,l]=s.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")')),[c,d]=s.useState(()=>yr(e)?e:null);return s.useEffect(()=>{if(typeof window<"u"&&window.CSS){const u=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');l(u)}},[]),s.useEffect(()=>{if(!fh(e)){d(null);return}if(yr(e)){d(e);return}let u=!1;return qu(e).then(p=>{u||d(p)}).catch(()=>{u||d(null)}),()=>{u=!0}},[e]),!c||!r?a.jsx("img",{src:e,alt:"",className:Et(fc.img,i),style:o}):a.jsx("span",{"data-supports-mask":r,className:Et(fc.svg,i),style:{"--svg":yh(c),"--fill":t,"--hover-fill":n,...o??{}}})},vh={"top-left":Rt.topLeftAlignment,"top-center":Rt.topCenterAlignment,"top-right":Rt.topRightAlignment,"middle-left":Rt.middleLeftAlignment,"middle-center":Rt.middleCenterAlignment,"middle-right":Rt.middleRightAlignment,"bottom-left":Rt.bottomLeftAlignment,"bottom-center":Rt.bottomCenterAlignment,"bottom-right":Rt.bottomRightAlignment};function xh({settings:e,content:t,styles:n,isEditor:i}){const[o,r]=s.useState(null),{widthSettings:l,fontSettings:c,letterSpacing:d,textAlign:u,wordSpacing:p,fontSizeLineHeight:y,textAppearance:x,color:g}=n.imageCaption??{},[f,b]=s.useState(void 0),[S,W]=s.useState(null),[v,L]=s.useState(0),[M,U]=s.useState(0),{direction:G,transition:B,controls:N,pagination:O,imageCaption:C,triggers:$}=e,K=s.useRef(B.type),{x:R,y:w}=e.controls.offset,T=j=>{o&&o.go(j)};return s.useEffect(()=>{if(!S)return;const j=new ResizeObserver(_=>{if(!o)return;const[Q]=_;b({width:Math.round(Q.contentRect.width),height:Math.round(Q.contentRect.height)})});return j.observe(S),()=>j.unobserve(S)},[S]),s.useEffect(()=>{!o||K.current===B.type||(U(j=>j+1),K.current=B.type)},[B.type]),a.jsx("div",{className:Et(Rt.wrapper,{[Rt.editor]:i}),ref:W,children:a.jsxs("div",{className:Rt.sliderInner,style:{width:f?f.width:"100%",height:f?f.height:"100%",backgroundColor:B.backgroundColor&&B.type==="fade in"?B.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:Et(Rt.captionBlock),children:a.jsx("div",{className:Rt.captionTextWrapper,children:t.map((j,_)=>a.jsx("div",{className:Et(Rt.captionText,vh[C.alignment],{[Rt.withPointerEvents]:_===v&&i,[Rt.active]:_===v}),style:{fontFamily:Bo(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:l.sizing==="auto"?"max-content":E.scalingValue(l.width,i),letterSpacing:E.scalingValue(d,i),wordSpacing:E.scalingValue(p,i),textAlign:u,fontSize:E.scalingValue(y.fontSize,i),lineHeight:E.scalingValue(y.lineHeight,i),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:g,transitionDuration:B.duration?`${Math.round(parseInt(B.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:Rt.captionTextInner,style:{"--link-hover-color":C.linkHoverColor,"--link-color":C.linkColor,position:"relative",top:E.scalingValue(C.offset.y,i),left:E.scalingValue(C.offset.x,i)},children:a.jsx(Zi,{content:j.imageCaption})})},_))})}),a.jsx(El,{onMove:j=>{L(j.index)},ref:r,options:{arrows:!1,speed:B.duration?parseInt(B.duration):500,autoplay:$.autoPlay!==null,...$.autoPlay!==null&&{interval:parseInt($.autoPlay)*1e3},direction:G==="horiz"||B.type==="fade in"?"ltr":"ttb",pagination:!1,drag:$.triggersList.drag,perPage:1,width:f?f.width:"100%",height:f?f.height:"100%",type:B.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((j,_)=>a.jsx(kl,{children:a.jsx("div",{className:Rt.sliderItem,children:a.jsx("div",{className:Rt.imgWrapper,children:a.jsx("img",{className:Et(Rt.sliderImage,{[Rt.contain]:j.image.objectFit==="contain",[Rt.cover]:j.image.objectFit==="cover"}),src:j.image.assetId,alt:j.image.name??""})})})},_))},M),N.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Et(Rt.arrow,{[Rt.arrowVertical]:G==="vert",[Rt.hoverArrow]:N.show==="on hover"}),style:{color:N.color,"--arrow-hover-color":N.hover},children:a.jsxs("button",{onClick:()=>{T("-1")},className:Rt.arrowInner,style:{transform:`translate(${E.scalingValue(R,i)}, ${E.scalingValue(w*(G==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${G==="horiz"?"0deg":"90deg"})`},children:[N.arrowsImgUrl&&a.jsx(gn,{url:N.arrowsImgUrl,fill:N.color,hoverFill:N.hover,className:Et(Rt.arrowImg,Rt.mirror)}),!N.arrowsImgUrl&&a.jsx(yc,{color:N.color,className:Et(Rt.arrowIcon,Rt.arrowImg,Rt.mirror)})]})}),a.jsx("div",{className:Et(Rt.arrow,Rt.nextArrow,{[Rt.arrowVertical]:G==="vert",[Rt.hoverArrow]:N.show==="on hover"}),style:{color:N.color,"--arrow-hover-color":N.hover},children:a.jsxs("button",{className:Rt.arrowInner,onClick:()=>T("+1"),style:{transform:`translate(${E.scalingValue(R*(G==="horiz"?-1:1),i)}, ${E.scalingValue(w,i)}) scale(${e.controls.scale/100}) rotate(${G==="horiz"?"0deg":"90deg"})`},children:[N.arrowsImgUrl&&a.jsx(gn,{url:N.arrowsImgUrl,fill:N.color,hoverFill:N.hover,className:Rt.arrowImg}),!N.arrowsImgUrl&&a.jsx(yc,{color:N.color,className:Et(Rt.arrowIcon,Rt.arrowImg)})]})})]}),$.triggersList.click&&a.jsx("div",{className:Rt.clickOverlay,onClick:()=>{o&&o.go("+1")}}),O.isActive&&a.jsx("div",{className:Et(Rt.pagination,{[Rt.paginationInsideBottom]:O.position==="inside-1"&&G==="horiz",[Rt.paginationInsideTop]:O.position==="inside-2"&&G==="horiz",[Rt.paginationOutsideBottom]:O.position==="outside-1"&&G==="horiz",[Rt.paginationOutsideTop]:O.position==="outside-2"&&G==="horiz",[Rt.paginationInsideLeft]:O.position==="inside-1"&&G==="vert",[Rt.paginationInsideRight]:O.position==="inside-2"&&G==="vert",[Rt.paginationOutsideLeft]:O.position==="outside-1"&&G==="vert",[Rt.paginationOutsideRight]:O.position==="outside-2"&&G==="vert",[Rt.paginationVertical]:G==="vert"}),children:a.jsx("div",{className:Rt.paginationInner,style:{backgroundColor:O.colors[2],transform:`scale(${O.scale/100}) translate(${E.scalingValue(O.offset.x,i)}, ${E.scalingValue(O.offset.y,i)}) rotate(${G==="horiz"?"0deg":"90deg"})`},children:t.map((j,_)=>a.jsx("button",{onClick:()=>{o&&o.go(_)},className:Et(Rt.paginationItem),children:a.jsx("div",{className:Et(Rt.dot,{[Rt.activeDot]:_===v}),style:{backgroundColor:_===v?O.colors[0]:O.colors[1],"--pagination-hover-color":O.hover}})},_))})})]})})}function yc({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const bh={element:xh,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"inside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",assetId:"01M3QM74XES6E7GVC0H3KJ2RH6",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEAZ8H1DTC5V1S554K",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEDRP49HNTEPNZYQTP",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},Sh="ImageRevealSlider-module__imageRevealSlider___UE5Ob",wh="ImageRevealSlider-module__image___Qjt-e",$h="ImageRevealSlider-module__link___N-iLG",Ch="ImageRevealSlider-module__cursor___2U03d",oo={imageRevealSlider:Sh,image:wh,link:$h,cursor:Ch};function vc(e,t,n){for(const i of n){const o=new Image;o.src=i.assetId;const r=i.width?Number.parseFloat(i.width):o.naturalWidth,l=o.naturalHeight/o.naturalWidth*r,c=r/2,d=l/2;if(e>=i.x-c&&e<=i.x+c&&t>=i.y-d&&t<=i.y+d)return!0}return!1}function Ja(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Th(e,t,n,i){let o,r;if(t==="custom"){o=n;const l=await Ja(e);r=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await Ja(e);r=l.height/l.width*o}else{const l=await Ja(e);o=l.width,r=l.height}return{width:o,height:r,finalWidth:`${o}px`}}function Ih({settings:e,content:t,isEditor:n}){const[i,o]=s.useState(null),[r,l]=s.useState([]),[c,d]=s.useState(0),u=s.useRef(0),[p,y]=s.useState({x:0,y:0}),[x,g]=s.useState(1),[f,b]=s.useState("none"),S=s.useRef({x:0,y:0}),[W,v]=s.useState(!1),{sizeType:L,imageWidth:M,randomRangeImageWidth:U}=e.imageSize,{revealPosition:G,visible:B}=e.position,{cursorType:N,target:O,defaultCursorScale:C,defaultCursor:$,hoverCursorScale:K,hoverCursor:R}=e.cursor;s.useEffect(()=>{if(!i)return;const j=(P,h)=>{const J=i.getBoundingClientRect(),V=P-J.left,me=h-J.top;if(y({x:V,y:me}),N==="system"){b("none"),g(1);return}const k=V,le=me,I=document.elementFromPoint(J.left+k,J.top+le);if(I&&I.closest("a")){b("none"),g(1);return}const ue=vc(k,le,r)||O==="area"?{img:R??"none",scale:K}:{img:$??"none",scale:C};b(ue.img),g(ue.scale)},_=P=>{P.stopPropagation(),S.current={x:P.clientX,y:P.clientY},j(P.clientX,P.clientY)},Q=()=>{W&&j(S.current.x,S.current.y)};return i.addEventListener("mousemove",_),window.addEventListener("scroll",Q,!0),()=>{i.removeEventListener("mousemove",_),window.removeEventListener("scroll",Q,!0)}},[i,W,p,N,O,R,$,K,C,r]),s.useEffect(()=>{W||(b("none"),g(0))},[W]);const w=async(j,_,Q,P={})=>{const{width:h,height:J,finalWidth:V}=await Th(j.image.assetId,L,M,U);let me=0,k=0;G==="same"?(me=_/2,k=Q/2):(me=P.x??Math.random()*_,k=P.y??Math.random()*Q);const le=Math.min(Math.max(me,h/2),_-h/2),I=Math.min(Math.max(k,J/2),Q-J/2);return{id:u.current++,assetId:j.image.assetId,link:j.link,name:j.image.name,x:le,y:I,width:V}};s.useEffect(()=>{if(!i||t.length===0)return;const j=i.getBoundingClientRect(),_=j.width,Q=j.height,P=[];(async()=>{const J=t[0],V=await w(J,_,Q);P.push(V),l(P),d(1)})()},[L,M,U,G,i]),s.useEffect(()=>{B==="last One"&&l(j=>j.length>0?[j[j.length-1]]:[])},[B]);const T=async j=>{if(!i)return;const _=i.getBoundingClientRect(),Q=j.clientX-_.left,P=j.clientY-_.top;if(O==="image"&&!vc(Q,P,r))return;let h=0,J=0;G==="on Click"?(h=Q,J=P):G==="same"?(h=_.width/2,J=_.height/2):(h=Math.random()*_.width,J=Math.random()*_.height);const V=t[c],me=await w(V,_.width,_.height,{x:h,y:J});l(k=>B==="all"?[...k,me]:[me]),d(k=>k>=t.length-1?0:k+1)};return a.jsxs("div",{ref:o,onClick:T,onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),className:oo.imageRevealSlider,style:{cursor:f==="none"?"default":"none"},children:[r.map(j=>a.jsx("div",{className:oo.wrapper,style:{top:`${j.y}px`,left:`${j.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:j.width??"auto",height:"auto",cursor:f==="none"?"default":"none"},children:O==="area"&&j.link?a.jsx("a",{href:j.link,target:"_blank",className:oo.link,children:a.jsx("img",{src:j.assetId,alt:j.name,className:oo.image},j.id)}):a.jsx("img",{src:j.assetId,alt:j.name,className:oo.image},j.id)},j.id)),W&&a.jsx("div",{className:oo.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${x})`,backgroundImage:`url('${f}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Lh={element:Ih,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",assetId:"01M3QM74XGWBJY3AQQ71GC2Z6Q",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",assetId:"01M3QM74XGMXS1Z5ZY2RFGS3T4",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",assetId:"01M3QM74XGWG6VCHNEXKVKAJGT",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",assetId:"01M3QM74XGCVMTPNHFHMR98RPZ",name:"Slider-4.png"},link:""}]}}}},Ph="LightBox-module__hidden___9s-9x",Mh="LightBox-module__heroImage___sTxNF",Rh="LightBox-module__background___rm9ml",Eh="LightBox-module__editor___4ACaY",kh="LightBox-module__contentStyle___Bgnsq",Ah="LightBox-module__imageStyle___tLIlB",Fh="LightBox-module__imgWrapper___LuFUp",Nh="LightBox-module__contain___8-yaS",_h="LightBox-module__cover___hNvOG",Hh="LightBox-module__caption___b6L2I",Wh="LightBox-module__captionTextInner___rCGNH",Oh="LightBox-module__lightboxSplide___XFuWC",Dh="LightBox-module__arrow___iz38X",zh="LightBox-module__arrowVertical___Zfz81",Bh="LightBox-module__nextArrow___zkAQN",jh="LightBox-module__arrowInner___p48sW",Vh="LightBox-module__arrowIcon___3VaFf",Gh="LightBox-module__arrowImg___pNV88",Xh="LightBox-module__mirror___pjeXc",Uh="LightBox-module__thumbsWrapper___GB-nU",qh="LightBox-module__thumbsContainerVertical___wttk5",Yh="LightBox-module__thumbsContainer___osSma",Kh="LightBox-module__thumbsAlignStart___MO6tY",Qh="LightBox-module__thumbsAlignCenter___Q4sUx",Zh="LightBox-module__thumbsAlignEnd___p4y9R",Jh="LightBox-module__thumbItem___HvnF3",ef="LightBox-module__closeButton___g2khP",tf="LightBox-module__fadeIn___0m5GW",nf="LightBox-module__slideInLeft___gPYwC",of="LightBox-module__slideInRight___S-pPp",rf="LightBox-module__slideInTop___DFdAj",af="LightBox-module__slideInBottom___m27kZ",sf="LightBox-module__fadeOut___55qBR",lf="LightBox-module__slideOutLeft___NvU7P",cf="LightBox-module__slideOutRight___SK7eC",df="LightBox-module__slideOutTop___Vgg0z",uf="LightBox-module__slideOutBottom___nJ0Ef",pf="LightBox-module__scaleSlide___vZriG",st={hidden:Ph,heroImage:Mh,background:Rh,editor:Eh,contentStyle:kh,imageStyle:Ah,imgWrapper:Fh,contain:Nh,cover:_h,caption:Hh,captionTextInner:Wh,lightboxSplide:Oh,arrow:Dh,arrowVertical:zh,nextArrow:Bh,arrowInner:jh,arrowIcon:Vh,arrowImg:Gh,mirror:Xh,thumbsWrapper:Uh,thumbsContainerVertical:qh,thumbsContainer:Yh,thumbsAlignStart:Kh,thumbsAlignCenter:Qh,thumbsAlignEnd:Zh,thumbItem:Jh,closeButton:ef,fadeIn:tf,slideInLeft:nf,slideInRight:of,slideInTop:rf,slideInBottom:af,fadeOut:sf,slideOutLeft:lf,slideOutRight:cf,slideOutTop:df,slideOutBottom:uf,scaleSlide:pf},Wr=(e,t,n)=>{const i={},[o,r]=e.split("-");return o==="top"?(i.top="0",i.bottom="auto"):o==="middle"?(i.top="50%",i.bottom="auto"):o==="bottom"&&(i.top="auto",i.bottom="0"),r==="left"?(i.left="0",i.right="auto"):r==="center"?(i.left="50%",i.right="auto"):r==="right"&&(i.left="auto",i.right="0"),o==="middle"&&r==="center"?i.transform=`translate(calc(-50% + ${E.scalingValue(t.x,n)}), calc(-50% + ${E.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${E.scalingValue(t.x,n)}, calc(-50% + ${E.scalingValue(t.y,n)}))`:r==="center"?i.transform=`translate(calc(-50% + ${E.scalingValue(t.x,n)}), ${E.scalingValue(t.y,n)})`:i.transform=`translate(${E.scalingValue(t.x,n)}, ${E.scalingValue(t.y,n)})`,i};function Yu(e){const t=window.getComputedStyle(e);return{top:parseFloat(t.paddingTop)||0,right:parseFloat(t.paddingRight)||0,bottom:parseFloat(t.paddingBottom)||0,left:parseFloat(t.paddingLeft)||0}}function gf(e){const t=e.trim().split(/\s+/),n=i=>{if(i.endsWith("%"))return parseFloat(i)/100;switch(i){case"left":case"top":return 0;case"right":case"bottom":return 1;case"center":return .5;default:return .5}};if(t.length===1){const i=t[0];return i==="center"?{x:.5,y:.5}:i==="top"||i==="bottom"?{x:.5,y:n(i)}:i==="left"||i==="right"?{x:n(i),y:.5}:{x:n(i),y:.5}}return{x:n(t[0]),y:n(t[1])}}function Ku(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 mf(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,r=n/i;if(r>o){const c=t;return{renderedW:c*r,renderedH:c}}const l=e;return{renderedW:l,renderedH:l/r}}function Qu(e,t,n,i,o){const{x:r,y:l}=gf(o);return{offsetX:r*(e-n),offsetY:l*(t-i)}}function hf(e){const t=e.getBoundingClientRect(),n=t.width,i=t.height;if(!n||!i)return"center center";const o=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,r=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight,{objectFit:l,objectPosition:c}=window.getComputedStyle(e),d=l==="cover"?mf:Ku,{renderedW:u,renderedH:p}=d(n,i,o,r),{offsetX:y,offsetY:x}=Qu(n,i,u,p,c),g=(y+u/2)/n*100,f=(x+p/2)/i*100;return`${g}% ${f}%`}function ff(e){return hf(e)}function Sa(e){const t=e.getBoundingClientRect(),n=Yu(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),r=e.naturalWidth,l=e.naturalHeight,{renderedW:c,renderedH:d}=Ku(i,o,r,l),u=window.getComputedStyle(e).objectPosition,{offsetX:p,offsetY:y}=Qu(i,o,c,d,u),x=t.left+n.left,g=t.top+n.top;return{x:p+x,y:y+g,width:c,height:d}}function xc(e){const t=e.getBoundingClientRect(),n=Yu(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function yf(e,t){const n=(()=>{if(e==="fade in")return st.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return st.slideInLeft;case"right":return st.slideInRight;case"top":return st.slideInTop;case"bottom":return st.slideInBottom;default:return st.slideInRight}return st.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return st.fadeIn;if(e==="slide in")switch(t){case"left":return st.slideInLeft;case"right":return st.slideInRight;case"top":return st.slideInTop;case"bottom":return st.slideInBottom;default:return st.slideInRight}return st.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return st.fadeOut;if(e==="slide in")switch(t){case"left":return st.slideOutLeft;case"right":return st.slideOutRight;case"top":return st.slideOutTop;case"bottom":return st.slideOutBottom;default:return st.slideOutRight}return st.fadeOut})(),r=(()=>{if(e==="fade in")return st.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return st.slideOutLeft;case"right":return st.slideOutRight;case"top":return st.slideOutTop;case"bottom":return st.slideOutBottom;default:return st.slideOutRight}return st.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:r}}const vf=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:r,isPreviewMode:l})=>{const[c,d]=s.useState(!1),{assetId:u}=e.thumbnailBlock.cover;return s.useEffect(()=>{o==="close"&&d(!1),o==="open"&&d(!0)},[o]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:u,alt:"Cover",className:st.heroImage,onClick:()=>d(!0)}),a.jsx(xf,{isOpen:c,onClose:()=>d(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:r})]})},xf=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:r,isEditor:l,metadata:c})=>{var we;const{widthSettings:d,fontSettings:u,letterSpacing:p,textAlign:y,wordSpacing:x,fontSizeLineHeight:g,textAppearance:f,color:b}=i.imageCaption??{},[S,W]=s.useState(0),[v,L]=s.useState(0),[M,U]=s.useState(!1),[G,B]=s.useState(!1),[N,O]=s.useState({}),C=s.useRef(null),$=s.useRef(null),K=s.useRef(null),R=s.useRef(!1),w=s.useRef(null),T=s.useRef(null),j=s.useRef(null),_=s.useRef(null),Q=s.useRef(!1),P=s.useRef(null),[h,J]=s.useState(!1),{appear:V,triggers:me,slider:k,thumbnail:le,controls:I,area:ue,caption:ee,layout:xe}=o.lightboxBlock,{appearClass:Le,backdropAppearClass:ce,backdropDisappearClass:de,disappearClass:Z}=yf(V.type,V.direction),pe=(c==null?void 0:c.itemId)??null;s.useEffect(()=>{const m=()=>{setTimeout(()=>{var te,ae;(ae=(te=C.current)==null?void 0:te.splide)==null||ae.refresh()},16)},Y=()=>{L(te=>te+1)};return window.addEventListener("ArticleEditor.Layout:change",m),window.addEventListener("ArticleEditor.ComponentContent:change",Y),()=>{window.removeEventListener("ArticleEditor.Layout:change",m),window.removeEventListener("ArticleEditor.ComponentContent:change",Y)}},[]),s.useEffect(()=>{if(!e||!le.isActive){J(!1);return}const m=P.current;if(!m)return;const Y=()=>{k.direction==="horiz"?J(m.scrollWidth>m.clientWidth):J(m.scrollHeight>m.clientHeight)};Y();const te=new ResizeObserver(Y);return te.observe(m),()=>te.disconnect()},[e,le.isActive,n.length,N,k.direction]);const oe=s.useCallback(()=>{const m=window.matchMedia("(max-width: 768px)").matches,Y=E.getColorAlpha(ue.color);m&&!l&&Y>.9&&(document.body.style.backgroundColor=""),U(!0),R.current=!0;const te=ae=>{ae.target===w.current&&ae.animationName&&(w.current&&T.current&&w.current.removeEventListener("animationend",T.current),T.current=null,R.current&&(R.current=!1,t()),U(!1))};w.current&&(T.current=te,w.current.addEventListener("animationend",te))},[t,ue.color,l]),ge=(m,Y,te)=>{var ae,fe;if(m){if(me.type==="click"&&me.switch==="image")me.repeat==="close"&&S===n.length-1?oe():(ae=C.current)==null||ae.go("+1");else if(me.type==="click"&&me.switch==="50/50"){const F=m.getBoundingClientRect(),H=Y-F.left,ne=te-F.top,q=F.width,ie=F.height;let z;k.direction==="horiz"?z=H<q/2?"-1":"+1":z=ne<ie/2?"-1":"+1",(fe=C.current)==null||fe.go(z)}}},be=m=>{if(Q.current){Q.current=!1;return}const Y=n[S],te=(Y==null?void 0:Y.image.objectFit)==="cover";let ae,fe;if("changedTouches"in m&&m.changedTouches.length>0)ae=m.changedTouches[0].clientX,fe=m.changedTouches[0].clientY;else if("clientX"in m)ae=m.clientX,fe=m.clientY;else return;let F;if(te&&K.current){const H=xc(K.current);F=ae>=H.left&&ae<=H.right&&fe>=H.top&&fe<=H.bottom}else{const H=K.current?Sa(K.current):null;if(!H){m.target===m.currentTarget&&oe();return}F=ae>=H.x&&ae<=H.x+H.width&&fe>=H.y&&fe<=H.y+H.height}F?ge(K.current,ae,fe):oe()},Re=m=>{const Y=m.target;(Y.classList.contains(st.thumbsWrapper)||Y.classList.contains(st.thumbsContainer))&&be(m)};s.useEffect(()=>{if(!e)return;const m=Y=>{var te,ae;if(Y.key==="Escape"){oe();return}if(Y.key==="ArrowRight"){W(fe=>(fe+1)%Math.max(n.length,1)),(te=C.current)==null||te.go("+1");return}Y.key==="ArrowLeft"&&(W(fe=>(fe-1+Math.max(n.length,1))%Math.max(n.length,1)),(ae=C.current)==null||ae.go("-1"))};return window.addEventListener("keydown",m),()=>{window.removeEventListener("keydown",m)}},[e,oe,n.length]),s.useEffect(()=>{if(e){if(W(0),L(Y=>Y+1),R.current=!1,U(!1),B(!1),O({}),!pe)return;const m=new CustomEvent("page-overlay",{detail:{itemId:pe}});window.dispatchEvent(m)}return()=>{w.current&&T.current&&(w.current.removeEventListener("animationend",T.current),T.current=null),B(!1)}},[e,pe]),s.useEffect(()=>{$.current!==null&&$.current!==k.type&&L(m=>m+1),$.current=k.type},[k.type]),s.useEffect(()=>{if(!e)return;const m=document.body.style.overflow,Y=window.matchMedia("(max-width: 768px)").matches,te=E.getColorAlpha(ue.color);document.body.style.overflow="hidden",B(!1);const ae=F=>{F.target===w.current&&!R.current&&F.animationName&&(Y&&!l&&te>.9&&(document.body.style.backgroundColor=ue.color),B(!0),w.current&&j.current&&w.current.removeEventListener("animationend",j.current),j.current=null)};w.current&&(j.current=ae,w.current.addEventListener("animationend",ae));const fe=F=>{const H=F.target;H&&(H.closest(`.${st.thumbsWrapper}`)||H.closest(`.${st.thumbsContainer}`))||k.type!=="slide"&&F.preventDefault()};return document.addEventListener("touchmove",fe,{passive:!1}),()=>{document.body.style.overflow=m,document.removeEventListener("touchmove",fe),w.current&&j.current&&(w.current.removeEventListener("animationend",j.current),j.current=null),B(!1)}},[e,l,ue.color,k.type]),s.useEffect(()=>{if(!e)return;const m=Y=>{var ae,fe;if(R.current){Y.stopPropagation();return}if(Q.current){Q.current=!1;return}const te=Y.target;if(!(te&&(te.closest(`.${st.thumbsContainer}`)||te.closest(`.${st.thumbItem}`)||te.closest(`.${st.arrow}`)||te.closest(`.${st.closeButton}`)||te.closest(`.${st.caption}`)))){if(k.type==="slide"&&me.type==="drag"&&((fe=(ae=C.current)==null?void 0:ae.splide)!=null&&fe.root)){const F=C.current.splide.root;if(te&&(F.contains(te)||F===te))return}if(Y.touches.length===0&&Y.changedTouches.length>0){const F=n[S],H=(F==null?void 0:F.image.objectFit)==="cover",ne=Y.changedTouches[0];let q;if(H&&K.current){const ie=xc(K.current);q=ne.clientX>=ie.left&&ne.clientX<=ie.right&&ne.clientY>=ie.top&&ne.clientY<=ie.bottom}else{const ie=K.current?Sa(K.current):null;if(!ie)return;q=ne.clientX>=ie.x&&ne.clientX<=ie.x+ie.width&&ne.clientY>=ie.y&&ne.clientY<=ie.y+ie.height}if(!q){Y.stopPropagation(),R.current=!0;const ie=z=>{z.stopPropagation(),z.preventDefault(),document.removeEventListener("click",ie,!0)};document.addEventListener("click",ie,!0),oe()}}}};return document.addEventListener("touchend",m,{passive:!0}),()=>{document.removeEventListener("touchend",m)}},[e,oe,S,n]);const Ee=(k.type==="scale"||k.type==="fade")&&k.direction==="vert"&&me.type==="drag";s.useEffect(()=>{var z,$e;if(!e||!Ee||!(($e=(z=C.current)==null?void 0:z.splide)!=null&&$e.root))return;const m=C.current.splide.root,Y=30,te=(re,X)=>{if(_.current){const Ce=Math.abs(re-_.current.x),He=Math.abs(X-_.current.y);(Ce>0||He>0)&&(Q.current=!0)}},ae=re=>{_.current&&(re.preventDefault(),te(re.clientX,re.clientY))},fe=re=>{_.current&&re.touches.length>0&&(re.preventDefault(),te(re.touches[0].clientX,re.touches[0].clientY))},F=(re,X)=>{if(!_.current||!C.current){_.current=null;return}const Ce=Math.abs(re-_.current.x),He=Math.abs(X-_.current.y);He>Y&&He>Ce&&C.current.go(X<_.current.y?"+1":"-1"),_.current=null},H=re=>{_.current&&F(re.clientX,re.clientY),document.removeEventListener("pointerup",H),document.removeEventListener("pointercancel",H),document.removeEventListener("pointermove",ae)},ne=re=>{if(_.current){if(re.changedTouches.length>0){const X=re.changedTouches[0];F(X.clientX,X.clientY)}document.removeEventListener("touchend",ne),document.removeEventListener("touchcancel",ne),document.removeEventListener("touchmove",fe)}},q=re=>{_.current={x:re.clientX,y:re.clientY},Q.current=!1,document.addEventListener("pointermove",ae,{passive:!1}),document.addEventListener("pointerup",H),document.addEventListener("pointercancel",H)},ie=re=>{re.touches.length>0&&(_.current={x:re.touches[0].clientX,y:re.touches[0].clientY},Q.current=!1,document.addEventListener("touchmove",fe,{passive:!1}),document.addEventListener("touchend",ne),document.addEventListener("touchcancel",ne))};return m.addEventListener("pointerdown",q),m.addEventListener("touchstart",ie),()=>{m.removeEventListener("pointerdown",q),m.removeEventListener("touchstart",ie),document.removeEventListener("pointermove",ae),document.removeEventListener("pointerup",H),document.removeEventListener("pointercancel",H),document.removeEventListener("touchmove",fe),document.removeEventListener("touchend",ne),document.removeEventListener("touchcancel",ne),_.current=null,Q.current=!1}},[e,Ee,v]);const Te={backgroundColor:ue.color,backdropFilter:`blur(${ue.blur}px)`,animationDuration:`${parseInt(V.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(r)?null:qn.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:l?null:w,className:Et(st.background,M?de:ce,{[st.editor]:l},{[st.hidden]:!e}),style:{...Te,...G&&!l&&!M?{position:"absolute"}:{}}}),a.jsxs("div",{ref:l?w:null,className:Et(st.contentStyle,M?Z:Le,{[st.editor]:l},{[st.hidden]:!e}),style:{animationDuration:`${parseInt(V.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(El,{onMove:m=>W(m.index),ref:C,className:st.lightboxSplide,options:{arrows:!1,speed:k.duration?parseInt(k.duration):500,direction:k.direction==="horiz"||k.type==="fade"||k.type==="scale"?"ltr":"ttb",pagination:!1,drag:me.type==="drag"&&!Ee,perPage:1,width:"100%",height:"100%",type:k.type==="fade"||k.type==="scale"?"fade":"loop",padding:0,rewind:me.repeat!=="close",start:0},style:{"--splide-speed":k.duration},children:n.map((m,Y)=>{const te=Wr(xe.position,xe.offset,l),ae=`${E.scalingValue(xe.padding.top,l)} ${E.scalingValue(xe.padding.right,l)} ${E.scalingValue(xe.padding.bottom,l)} ${E.scalingValue(xe.padding.left,l)}`,fe=k.type==="scale"?(()=>{const{transform:F,...H}=te;return{...H,position:"absolute",padding:ae,boxSizing:"border-box","--position-transform":F||"none"}})():{...te,position:"absolute",padding:ae,boxSizing:"border-box"};return a.jsx(kl,{children:a.jsx("div",{className:st.imgWrapper,onClick:be,children:a.jsx("img",{ref:Y===S?K:null,className:Et(st.imageStyle,{[st.contain]:m.image.objectFit==="contain",[st.cover]:m.image.objectFit==="cover",[st.scaleSlide]:k.type==="scale"}),src:m.image.assetId,alt:m.image.name??"",style:{...fe,pointerEvents:m.image.objectFit==="contain"?"none":"auto"}})})},Y)})},v),I.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Et(st.arrow,{[st.arrowVertical]:k.direction==="vert"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:a.jsxs("button",{className:st.arrowInner,style:{transform:`translate(${E.scalingValue(I.offset.x,l)}, ${E.scalingValue(I.offset.y*(k.direction==="horiz"?1:-1),l)}) scale(${I.scale}) rotate(${k.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var m;return(m=C.current)==null?void 0:m.go("-1")},"aria-label":"Previous",children:[I.arrowsImgUrl&&a.jsx(gn,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:Et(st.arrowImg,st.mirror)}),!I.arrowsImgUrl&&a.jsx(bc,{color:I.color,className:Et(st.arrowIcon,st.arrowImg,st.mirror)})]})}),a.jsx("div",{className:Et(st.arrow,st.nextArrow,{[st.arrowVertical]:k.direction==="vert"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:a.jsxs("button",{className:st.arrowInner,style:{transform:`translate(${E.scalingValue(I.offset.x*(k.direction==="horiz"?-1:1),l)}, ${E.scalingValue(I.offset.y,l)}) scale(${I.scale}) rotate(${k.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var m;return(m=C.current)==null?void 0:m.go("+1")},"aria-label":"Next",children:[I.arrowsImgUrl&&a.jsx(gn,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:st.arrowImg}),!I.arrowsImgUrl&&a.jsx(bc,{color:I.color,className:Et(st.arrowIcon,st.arrowImg)})]})})]}),ue.closeIconUrl&&(()=>{const m=Wr(ue.closeIconAlign,ue.closeIconOffset,l),Y=`scale(${ue.closeIconScale})`,te=m.transform?`${m.transform} ${Y}`:Y;return a.jsx("button",{className:st.closeButton,style:{...m,transform:te},onClick:oe,"aria-label":"Close lightbox",children:a.jsx(gn,{url:ue.closeIconUrl,fill:ue.closeIconColor??"#000000",hoverFill:ue.closeIconHover??"#cccccc"})})})(),ee&&ee.isActive&&i.imageCaption&&((we=n[S])==null?void 0:we.imageCaption)&&a.jsx("div",{className:st.caption,style:{...Wr(ee.alignment,ee.offset,l),fontFamily:Bo(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:d.sizing==="auto"?"max-content":E.scalingValue(d.width,l),letterSpacing:E.scalingValue(p,l),wordSpacing:E.scalingValue(x,l),textAlign:y,fontSize:E.scalingValue(g.fontSize,l),lineHeight:E.scalingValue(g.lineHeight,l),textTransform:f.textTransform??"none",textDecoration:f.textDecoration??"none",fontVariant:f.fontVariant??"normal",color:b},onClick:m=>m.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:st.captionTextInner,style:{"--link-color":ee.linkColor,"--link-hover-color":ee.linkHoverColor},children:a.jsx(Zi,{content:n[S].imageCaption})})}),le.isActive&&(()=>{const[m,Y]=le.position.split("-"),te=k.direction==="horiz"?`${m}-left`:le.position,ae=Wr(te,le.offset,l),fe=()=>{if(k.direction==="horiz"){if(Y==="left")return"flex-start";if(Y==="center")return"center";if(Y==="right")return"flex-end"}else{if(m==="top")return"flex-start";if(m==="middle")return"center";if(m==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:P,className:st.thumbsWrapper,onClick:F=>Re(F),style:{position:l?"absolute":"fixed",...ae,...k.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:Et(st.thumbsContainer,{[st.thumbsContainerVertical]:k.direction==="vert",[st.thumbsAlignStart]:le.align==="start",[st.thumbsAlignCenter]:le.align==="center",[st.thumbsAlignEnd]:le.align==="end"}),style:{gap:E.scalingValue(le.grid.gap,l),justifyContent:h?"flex-start":fe()},children:n.map((F,H)=>{const ne=H===S,q=N[H],z=le.grid.size*(ne?le.activeState.scale:1),$e=()=>{if(le.fit!=="fit")return{};if(!q)return k.direction==="horiz"?{height:E.scalingValue(z,l)}:{width:E.scalingValue(z,l)};const re=q.width/q.height;if(k.direction==="horiz"){const X=z,Ce=X*re;return{width:E.scalingValue(Ce,l),height:E.scalingValue(X,l)}}else{const X=z,Ce=X/re;return{width:E.scalingValue(X,l),height:E.scalingValue(Ce,l)}}};return a.jsx("button",{className:st.thumbItem,style:{...k.direction==="horiz"&&le.fit!=="fit"?{height:E.scalingValue(z,l)}:{},...k.direction==="vert"&&le.fit!=="fit"?{width:E.scalingValue(z,l)}:{},...le.fit==="cover"?{width:E.scalingValue(z,l),height:E.scalingValue(z,l)}:{},...$e(),transition:ne?"all 0.25s ease-out":"none",opacity:ne?le.activeState.opacity/100:le.opacity/100,"--thumb-hover":le.activeState.opacity/100},onClick:re=>{var X;re.stopPropagation(),W(H),(X=C.current)==null||X.go(H)},onMouseEnter:()=>{var re;le.triggers==="hov"&&((re=C.current)==null||re.go(H))},children:a.jsx("img",{src:F.image.assetId,alt:F.image.name??"",onLoad:re=>{const X=re.currentTarget;X.naturalWidth&&X.naturalHeight&&O(Ce=>({...Ce,[H]:{width:X.naturalWidth,height:X.naturalHeight}}))},style:{objectFit:le.fit==="cover"?"cover":"contain",...le.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...le.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${F.image.name}-${H}`)})})})})()]})]}),document.getElementById(r))};function bc({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const bf={element:vf,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Lightbox.png"},defaultSize:{d:{width:440,height:550},t:{width:235,height:293},m:{width:265,height:331}},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.assetId",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{assetId:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},lightboxBlock:{appear:{type:"slide in",duration:"1000ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.01,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:0,bottom:.06,left:0}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},linkColor:"#cccccc",linkHoverColor:"#cccccc"}}},m:{thumbnailBlock:{cover:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"horiz",duration:"1000ms"},thumbnail:{isActive:!0,position:"bottom-center",fit:"fit",align:"start",triggers:"hov",grid:{size:.1,gap:.05},offset:{x:.01,y:-.05},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.05,bottom:.06,left:.05}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}},t:{thumbnailBlock:{cover:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",assetId:"01M3QM74XD4J8X0B8TTSQ8CV3P",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XD0N6VQJ5J8J9YB32N",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XE4WSEPVF1QQSKMD76",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}};function Or(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Sf(e){return`
6
+ */const dh="RichTextRenderer-module__link___BWeZ2",uh={link:dh},ph=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(i=>/^\d/.test(i))},Bo=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>ph(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function pn(e){const{color:t,...n}=e;return n}function nn(e,t){var o,r,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:Bo(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:E.scalingValue(e.letterSpacing,t),wordSpacing:E.scalingValue(e.wordSpacing,t),fontSize:E.scalingValue(n,t),lineHeight:i!==void 0?E.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(r=e.textAppearance)==null?void 0:r.textDecoration,fontVariant:(l=e.textAppearance)==null?void 0:l.fontVariant,textAlign:e.textAlign,color:e.color}}function Uu(e){return e!=null&&e.length?e.some(t=>t.type==="link"?Uu(t.children):!!t.text):!1}const Zi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?a.jsx("a",{className:uh.link,href:i.value,target:i.target,children:t(i.children)},o):a.jsx("span",{style:gh(i),children:i.text},o));return a.jsx(a.Fragment,{children:e.map((n,i)=>{const o=n.children;return a.jsx("div",{children:Uu(o)?t(o):" "},i)})})};function gh(e){return{...e.fontFamily&&{fontFamily:Bo(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 mh="SvgImage-module__svg___q3xE-",hh="SvgImage-module__img___VsTm-",fc={svg:mh,img:hh},Za=new Map;function yr(e){return e.startsWith("data:")||e.startsWith("blob:")}function qu(e){if(yr(e))return Promise.resolve(e);const t=Za.get(e);if(t)return t;const n=fetch(e,{mode:"cors",cache:"reload"}).then(i=>{if(!i.ok)throw new Error(String(i.status));return i.blob()}).then(i=>URL.createObjectURL(i)).catch(i=>{throw Za.delete(e),i});return Za.set(e,n),n}const fh=e=>{const t=e.trim().toLowerCase();return!!(t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")||t.includes(".svg")||t.startsWith("blob:"))},yh=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,gn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[r,l]=s.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")')),[c,d]=s.useState(()=>yr(e)?e:null);return s.useEffect(()=>{if(typeof window<"u"&&window.CSS){const u=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');l(u)}},[]),s.useEffect(()=>{if(!fh(e)){d(null);return}if(yr(e)){d(e);return}let u=!1;return qu(e).then(p=>{u||d(p)}).catch(()=>{u||d(null)}),()=>{u=!0}},[e]),!c||!r?a.jsx("img",{src:e,alt:"",className:Et(fc.img,i),style:o}):a.jsx("span",{"data-supports-mask":r,className:Et(fc.svg,i),style:{"--svg":yh(c),"--fill":t,"--hover-fill":n,...o??{}}})},vh={"top-left":Rt.topLeftAlignment,"top-center":Rt.topCenterAlignment,"top-right":Rt.topRightAlignment,"middle-left":Rt.middleLeftAlignment,"middle-center":Rt.middleCenterAlignment,"middle-right":Rt.middleRightAlignment,"bottom-left":Rt.bottomLeftAlignment,"bottom-center":Rt.bottomCenterAlignment,"bottom-right":Rt.bottomRightAlignment};function xh({settings:e,content:t,styles:n,isEditor:i}){const[o,r]=s.useState(null),{widthSettings:l,fontSettings:c,letterSpacing:d,textAlign:u,wordSpacing:p,fontSizeLineHeight:y,textAppearance:x,color:g}=n.imageCaption??{},[h,b]=s.useState(void 0),[S,_]=s.useState(null),[v,L]=s.useState(0),[P,q]=s.useState(0),{direction:X,transition:B,controls:H,pagination:O,imageCaption:C,triggers:$}=e,Q=s.useRef(B.type),{x:R,y:T}=e.controls.offset,w=V=>{o&&o.go(V)};return s.useEffect(()=>{if(!S)return;const V=new ResizeObserver(z=>{if(!o)return;const[U]=z;b({width:Math.round(U.contentRect.width),height:Math.round(U.contentRect.height)})});return V.observe(S),()=>V.unobserve(S)},[S]),s.useEffect(()=>{!o||Q.current===B.type||(q(V=>V+1),Q.current=B.type)},[B.type]),a.jsx("div",{className:Et(Rt.wrapper,{[Rt.editor]:i}),ref:_,children:a.jsxs("div",{className:Rt.sliderInner,style:{width:h?h.width:"100%",height:h?h.height:"100%",backgroundColor:B.backgroundColor&&B.type==="fade in"?B.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:Et(Rt.captionBlock),children:a.jsx("div",{className:Rt.captionTextWrapper,children:t.map((V,z)=>a.jsx("div",{className:Et(Rt.captionText,vh[C.alignment],{[Rt.withPointerEvents]:z===v&&i,[Rt.active]:z===v}),style:{fontFamily:Bo(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:l.sizing==="auto"?"max-content":E.scalingValue(l.width,i),letterSpacing:E.scalingValue(d,i),wordSpacing:E.scalingValue(p,i),textAlign:u,fontSize:E.scalingValue(y.fontSize,i),lineHeight:E.scalingValue(y.lineHeight,i),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:g,transitionDuration:B.duration?`${Math.round(parseInt(B.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:Rt.captionTextInner,style:{"--link-hover-color":C.linkHoverColor,"--link-color":C.linkColor,position:"relative",top:E.scalingValue(C.offset.y,i),left:E.scalingValue(C.offset.x,i)},children:a.jsx(Zi,{content:V.imageCaption})})},z))})}),a.jsx(El,{onMove:V=>{L(V.index)},ref:r,options:{arrows:!1,speed:B.duration?parseInt(B.duration):500,autoplay:$.autoPlay!==null,...$.autoPlay!==null&&{interval:parseInt($.autoPlay)*1e3},direction:X==="horiz"||B.type==="fade in"?"ltr":"ttb",pagination:!1,drag:$.triggersList.drag,perPage:1,width:h?h.width:"100%",height:h?h.height:"100%",type:B.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((V,z)=>a.jsx(kl,{children:a.jsx("div",{className:Rt.sliderItem,children:a.jsx("div",{className:Rt.imgWrapper,children:a.jsx("img",{className:Et(Rt.sliderImage,{[Rt.contain]:V.image.objectFit==="contain",[Rt.cover]:V.image.objectFit==="cover"}),src:V.image.assetId,alt:V.image.name??""})})})},z))},P),H.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Et(Rt.arrow,{[Rt.arrowVertical]:X==="vert",[Rt.hoverArrow]:H.show==="on hover"}),style:{color:H.color,"--arrow-hover-color":H.hover},children:a.jsxs("button",{onClick:()=>{w("-1")},className:Rt.arrowInner,style:{transform:`translate(${E.scalingValue(R,i)}, ${E.scalingValue(T*(X==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${X==="horiz"?"0deg":"90deg"})`},children:[H.arrowsImgUrl&&a.jsx(gn,{url:H.arrowsImgUrl,fill:H.color,hoverFill:H.hover,className:Et(Rt.arrowImg,Rt.mirror)}),!H.arrowsImgUrl&&a.jsx(yc,{color:H.color,className:Et(Rt.arrowIcon,Rt.arrowImg,Rt.mirror)})]})}),a.jsx("div",{className:Et(Rt.arrow,Rt.nextArrow,{[Rt.arrowVertical]:X==="vert",[Rt.hoverArrow]:H.show==="on hover"}),style:{color:H.color,"--arrow-hover-color":H.hover},children:a.jsxs("button",{className:Rt.arrowInner,onClick:()=>w("+1"),style:{transform:`translate(${E.scalingValue(R*(X==="horiz"?-1:1),i)}, ${E.scalingValue(T,i)}) scale(${e.controls.scale/100}) rotate(${X==="horiz"?"0deg":"90deg"})`},children:[H.arrowsImgUrl&&a.jsx(gn,{url:H.arrowsImgUrl,fill:H.color,hoverFill:H.hover,className:Rt.arrowImg}),!H.arrowsImgUrl&&a.jsx(yc,{color:H.color,className:Et(Rt.arrowIcon,Rt.arrowImg)})]})})]}),$.triggersList.click&&a.jsx("div",{className:Rt.clickOverlay,onClick:()=>{o&&o.go("+1")}}),O.isActive&&a.jsx("div",{className:Et(Rt.pagination,{[Rt.paginationInsideBottom]:O.position==="inside-1"&&X==="horiz",[Rt.paginationInsideTop]:O.position==="inside-2"&&X==="horiz",[Rt.paginationOutsideBottom]:O.position==="outside-1"&&X==="horiz",[Rt.paginationOutsideTop]:O.position==="outside-2"&&X==="horiz",[Rt.paginationInsideLeft]:O.position==="inside-1"&&X==="vert",[Rt.paginationInsideRight]:O.position==="inside-2"&&X==="vert",[Rt.paginationOutsideLeft]:O.position==="outside-1"&&X==="vert",[Rt.paginationOutsideRight]:O.position==="outside-2"&&X==="vert",[Rt.paginationVertical]:X==="vert"}),children:a.jsx("div",{className:Rt.paginationInner,style:{backgroundColor:O.colors[2],transform:`scale(${O.scale/100}) translate(${E.scalingValue(O.offset.x,i)}, ${E.scalingValue(O.offset.y,i)}) rotate(${X==="horiz"?"0deg":"90deg"})`},children:t.map((V,z)=>a.jsx("button",{onClick:()=>{o&&o.go(z)},className:Et(Rt.paginationItem),children:a.jsx("div",{className:Et(Rt.dot,{[Rt.activeDot]:z===v}),style:{backgroundColor:z===v?O.colors[0]:O.colors[1],"--pagination-hover-color":O.hover}})},z))})})]})})}function yc({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const bh={element:xh,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"inside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",assetId:"01M3QM74XES6E7GVC0H3KJ2RH6",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEAZ8H1DTC5V1S554K",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEDRP49HNTEPNZYQTP",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},Sh="ImageRevealSlider-module__imageRevealSlider___UE5Ob",wh="ImageRevealSlider-module__image___Qjt-e",$h="ImageRevealSlider-module__link___N-iLG",Ch="ImageRevealSlider-module__cursor___2U03d",oo={imageRevealSlider:Sh,image:wh,link:$h,cursor:Ch};function vc(e,t,n){for(const i of n){const o=new Image;o.src=i.assetId;const r=i.width?Number.parseFloat(i.width):o.naturalWidth,l=o.naturalHeight/o.naturalWidth*r,c=r/2,d=l/2;if(e>=i.x-c&&e<=i.x+c&&t>=i.y-d&&t<=i.y+d)return!0}return!1}function Ja(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Th(e,t,n,i){let o,r;if(t==="custom"){o=n;const l=await Ja(e);r=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await Ja(e);r=l.height/l.width*o}else{const l=await Ja(e);o=l.width,r=l.height}return{width:o,height:r,finalWidth:`${o}px`}}function Ih({settings:e,content:t,isEditor:n}){const[i,o]=s.useState(null),[r,l]=s.useState([]),[c,d]=s.useState(0),u=s.useRef(0),[p,y]=s.useState({x:0,y:0}),[x,g]=s.useState(1),[h,b]=s.useState("none"),S=s.useRef({x:0,y:0}),[_,v]=s.useState(!1),{sizeType:L,imageWidth:P,randomRangeImageWidth:q}=e.imageSize,{revealPosition:X,visible:B}=e.position,{cursorType:H,target:O,defaultCursorScale:C,defaultCursor:$,hoverCursorScale:Q,hoverCursor:R}=e.cursor;s.useEffect(()=>{if(!i)return;const V=(M,f)=>{const K=i.getBoundingClientRect(),G=M-K.left,ge=f-K.top;if(y({x:G,y:ge}),H==="system"){b("none"),g(1);return}const k=G,ce=ge,I=document.elementFromPoint(K.left+k,K.top+ce);if(I&&I.closest("a")){b("none"),g(1);return}const ue=vc(k,ce,r)||O==="area"?{img:R??"none",scale:Q}:{img:$??"none",scale:C};b(ue.img),g(ue.scale)},z=M=>{M.stopPropagation(),S.current={x:M.clientX,y:M.clientY},V(M.clientX,M.clientY)},U=()=>{_&&V(S.current.x,S.current.y)};return i.addEventListener("mousemove",z),window.addEventListener("scroll",U,!0),()=>{i.removeEventListener("mousemove",z),window.removeEventListener("scroll",U,!0)}},[i,_,p,H,O,R,$,Q,C,r]),s.useEffect(()=>{_||(b("none"),g(0))},[_]);const T=async(V,z,U,M={})=>{const{width:f,height:K,finalWidth:G}=await Th(V.image.assetId,L,P,q);let ge=0,k=0;X==="same"?(ge=z/2,k=U/2):(ge=M.x??Math.random()*z,k=M.y??Math.random()*U);const ce=Math.min(Math.max(ge,f/2),z-f/2),I=Math.min(Math.max(k,K/2),U-K/2);return{id:u.current++,assetId:V.image.assetId,link:V.link,name:V.image.name,x:ce,y:I,width:G}};s.useEffect(()=>{if(!i||t.length===0)return;const V=i.getBoundingClientRect(),z=V.width,U=V.height,M=[];(async()=>{const K=t[0],G=await T(K,z,U);M.push(G),l(M),d(1)})()},[L,P,q,X,i]),s.useEffect(()=>{B==="last One"&&l(V=>V.length>0?[V[V.length-1]]:[])},[B]);const w=async V=>{if(!i)return;const z=i.getBoundingClientRect(),U=V.clientX-z.left,M=V.clientY-z.top;if(O==="image"&&!vc(U,M,r))return;let f=0,K=0;X==="on Click"?(f=U,K=M):X==="same"?(f=z.width/2,K=z.height/2):(f=Math.random()*z.width,K=Math.random()*z.height);const G=t[c],ge=await T(G,z.width,z.height,{x:f,y:K});l(k=>B==="all"?[...k,ge]:[ge]),d(k=>k>=t.length-1?0:k+1)};return a.jsxs("div",{ref:o,onClick:w,onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),className:oo.imageRevealSlider,style:{cursor:h==="none"?"default":"none"},children:[r.map(V=>a.jsx("div",{className:oo.wrapper,style:{top:`${V.y}px`,left:`${V.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:V.width??"auto",height:"auto",cursor:h==="none"?"default":"none"},children:O==="area"&&V.link?a.jsx("a",{href:V.link,target:"_blank",className:oo.link,children:a.jsx("img",{src:V.assetId,alt:V.name,className:oo.image},V.id)}):a.jsx("img",{src:V.assetId,alt:V.name,className:oo.image},V.id)},V.id)),_&&a.jsx("div",{className:oo.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${x})`,backgroundImage:`url('${h}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Lh={element:Ih,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",assetId:"01M3QM74XGWBJY3AQQ71GC2Z6Q",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",assetId:"01M3QM74XGMXS1Z5ZY2RFGS3T4",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",assetId:"01M3QM74XGWG6VCHNEXKVKAJGT",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",assetId:"01M3QM74XGCVMTPNHFHMR98RPZ",name:"Slider-4.png"},link:""}]}}}},Ph="LightBox-module__hidden___9s-9x",Mh="LightBox-module__heroImage___sTxNF",Rh="LightBox-module__background___rm9ml",Eh="LightBox-module__editor___4ACaY",kh="LightBox-module__contentStyle___Bgnsq",Ah="LightBox-module__imageStyle___tLIlB",Fh="LightBox-module__imgWrapper___LuFUp",Nh="LightBox-module__contain___8-yaS",_h="LightBox-module__cover___hNvOG",Hh="LightBox-module__caption___b6L2I",Wh="LightBox-module__captionTextInner___rCGNH",Oh="LightBox-module__lightboxSplide___XFuWC",Dh="LightBox-module__arrow___iz38X",zh="LightBox-module__arrowVertical___Zfz81",Bh="LightBox-module__nextArrow___zkAQN",jh="LightBox-module__arrowInner___p48sW",Vh="LightBox-module__arrowIcon___3VaFf",Gh="LightBox-module__arrowImg___pNV88",Xh="LightBox-module__mirror___pjeXc",Uh="LightBox-module__thumbsWrapper___GB-nU",qh="LightBox-module__thumbsContainerVertical___wttk5",Yh="LightBox-module__thumbsContainer___osSma",Kh="LightBox-module__thumbsAlignStart___MO6tY",Qh="LightBox-module__thumbsAlignCenter___Q4sUx",Zh="LightBox-module__thumbsAlignEnd___p4y9R",Jh="LightBox-module__thumbItem___HvnF3",ef="LightBox-module__closeButton___g2khP",tf="LightBox-module__fadeIn___0m5GW",nf="LightBox-module__slideInLeft___gPYwC",of="LightBox-module__slideInRight___S-pPp",rf="LightBox-module__slideInTop___DFdAj",af="LightBox-module__slideInBottom___m27kZ",sf="LightBox-module__fadeOut___55qBR",lf="LightBox-module__slideOutLeft___NvU7P",cf="LightBox-module__slideOutRight___SK7eC",df="LightBox-module__slideOutTop___Vgg0z",uf="LightBox-module__slideOutBottom___nJ0Ef",pf="LightBox-module__scaleSlide___vZriG",st={hidden:Ph,heroImage:Mh,background:Rh,editor:Eh,contentStyle:kh,imageStyle:Ah,imgWrapper:Fh,contain:Nh,cover:_h,caption:Hh,captionTextInner:Wh,lightboxSplide:Oh,arrow:Dh,arrowVertical:zh,nextArrow:Bh,arrowInner:jh,arrowIcon:Vh,arrowImg:Gh,mirror:Xh,thumbsWrapper:Uh,thumbsContainerVertical:qh,thumbsContainer:Yh,thumbsAlignStart:Kh,thumbsAlignCenter:Qh,thumbsAlignEnd:Zh,thumbItem:Jh,closeButton:ef,fadeIn:tf,slideInLeft:nf,slideInRight:of,slideInTop:rf,slideInBottom:af,fadeOut:sf,slideOutLeft:lf,slideOutRight:cf,slideOutTop:df,slideOutBottom:uf,scaleSlide:pf},Wr=(e,t,n)=>{const i={},[o,r]=e.split("-");return o==="top"?(i.top="0",i.bottom="auto"):o==="middle"?(i.top="50%",i.bottom="auto"):o==="bottom"&&(i.top="auto",i.bottom="0"),r==="left"?(i.left="0",i.right="auto"):r==="center"?(i.left="50%",i.right="auto"):r==="right"&&(i.left="auto",i.right="0"),o==="middle"&&r==="center"?i.transform=`translate(calc(-50% + ${E.scalingValue(t.x,n)}), calc(-50% + ${E.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${E.scalingValue(t.x,n)}, calc(-50% + ${E.scalingValue(t.y,n)}))`:r==="center"?i.transform=`translate(calc(-50% + ${E.scalingValue(t.x,n)}), ${E.scalingValue(t.y,n)})`:i.transform=`translate(${E.scalingValue(t.x,n)}, ${E.scalingValue(t.y,n)})`,i};function Yu(e){const t=window.getComputedStyle(e);return{top:parseFloat(t.paddingTop)||0,right:parseFloat(t.paddingRight)||0,bottom:parseFloat(t.paddingBottom)||0,left:parseFloat(t.paddingLeft)||0}}function gf(e){const t=e.trim().split(/\s+/),n=i=>{if(i.endsWith("%"))return parseFloat(i)/100;switch(i){case"left":case"top":return 0;case"right":case"bottom":return 1;case"center":return .5;default:return .5}};if(t.length===1){const i=t[0];return i==="center"?{x:.5,y:.5}:i==="top"||i==="bottom"?{x:.5,y:n(i)}:i==="left"||i==="right"?{x:n(i),y:.5}:{x:n(i),y:.5}}return{x:n(t[0]),y:n(t[1])}}function Ku(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 mf(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,r=n/i;if(r>o){const c=t;return{renderedW:c*r,renderedH:c}}const l=e;return{renderedW:l,renderedH:l/r}}function Qu(e,t,n,i,o){const{x:r,y:l}=gf(o);return{offsetX:r*(e-n),offsetY:l*(t-i)}}function hf(e){const t=e.getBoundingClientRect(),n=t.width,i=t.height;if(!n||!i)return"center center";const o=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,r=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight,{objectFit:l,objectPosition:c}=window.getComputedStyle(e),d=l==="cover"?mf:Ku,{renderedW:u,renderedH:p}=d(n,i,o,r),{offsetX:y,offsetY:x}=Qu(n,i,u,p,c),g=(y+u/2)/n*100,h=(x+p/2)/i*100;return`${g}% ${h}%`}function ff(e){return hf(e)}function Sa(e){const t=e.getBoundingClientRect(),n=Yu(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),r=e.naturalWidth,l=e.naturalHeight,{renderedW:c,renderedH:d}=Ku(i,o,r,l),u=window.getComputedStyle(e).objectPosition,{offsetX:p,offsetY:y}=Qu(i,o,c,d,u),x=t.left+n.left,g=t.top+n.top;return{x:p+x,y:y+g,width:c,height:d}}function xc(e){const t=e.getBoundingClientRect(),n=Yu(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function yf(e,t){const n=(()=>{if(e==="fade in")return st.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return st.slideInLeft;case"right":return st.slideInRight;case"top":return st.slideInTop;case"bottom":return st.slideInBottom;default:return st.slideInRight}return st.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return st.fadeIn;if(e==="slide in")switch(t){case"left":return st.slideInLeft;case"right":return st.slideInRight;case"top":return st.slideInTop;case"bottom":return st.slideInBottom;default:return st.slideInRight}return st.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return st.fadeOut;if(e==="slide in")switch(t){case"left":return st.slideOutLeft;case"right":return st.slideOutRight;case"top":return st.slideOutTop;case"bottom":return st.slideOutBottom;default:return st.slideOutRight}return st.fadeOut})(),r=(()=>{if(e==="fade in")return st.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return st.slideOutLeft;case"right":return st.slideOutRight;case"top":return st.slideOutTop;case"bottom":return st.slideOutBottom;default:return st.slideOutRight}return st.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:r}}const vf=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:r,isPreviewMode:l})=>{const[c,d]=s.useState(!1),{assetId:u}=e.thumbnailBlock.cover;return s.useEffect(()=>{o==="close"&&d(!1),o==="open"&&d(!0)},[o]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:u,alt:"Cover",className:st.heroImage,onClick:()=>d(!0)}),a.jsx(xf,{isOpen:c,onClose:()=>d(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:r})]})},xf=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:r,isEditor:l,metadata:c})=>{var $e;const{widthSettings:d,fontSettings:u,letterSpacing:p,textAlign:y,wordSpacing:x,fontSizeLineHeight:g,textAppearance:h,color:b}=i.imageCaption??{},[S,_]=s.useState(0),[v,L]=s.useState(0),[P,q]=s.useState(!1),[X,B]=s.useState(!1),[H,O]=s.useState({}),C=s.useRef(null),$=s.useRef(null),Q=s.useRef(null),R=s.useRef(!1),T=s.useRef(null),w=s.useRef(null),V=s.useRef(null),z=s.useRef(null),U=s.useRef(!1),M=s.useRef(null),[f,K]=s.useState(!1),{appear:G,triggers:ge,slider:k,thumbnail:ce,controls:I,area:ue,caption:ee,layout:xe}=o.lightboxBlock,{appearClass:Le,backdropAppearClass:se,backdropDisappearClass:de,disappearClass:Z}=yf(G.type,G.direction),pe=(c==null?void 0:c.itemId)??null;s.useEffect(()=>{const m=()=>{setTimeout(()=>{var te,oe;(oe=(te=C.current)==null?void 0:te.splide)==null||oe.refresh()},16)},Y=()=>{L(te=>te+1)};return window.addEventListener("ArticleEditor.Layout:change",m),window.addEventListener("ArticleEditor.ComponentContent:change",Y),()=>{window.removeEventListener("ArticleEditor.Layout:change",m),window.removeEventListener("ArticleEditor.ComponentContent:change",Y)}},[]),s.useEffect(()=>{if(!e||!ce.isActive){K(!1);return}const m=M.current;if(!m)return;const Y=()=>{k.direction==="horiz"?K(m.scrollWidth>m.clientWidth):K(m.scrollHeight>m.clientHeight)};Y();const te=new ResizeObserver(Y);return te.observe(m),()=>te.disconnect()},[e,ce.isActive,n.length,H,k.direction]);const ie=s.useCallback(()=>{const m=window.matchMedia("(max-width: 768px)").matches,Y=E.getColorAlpha(ue.color);m&&!l&&Y>.9&&(document.body.style.backgroundColor=""),q(!0),R.current=!0;const te=oe=>{oe.target===T.current&&oe.animationName&&(T.current&&w.current&&T.current.removeEventListener("animationend",w.current),w.current=null,R.current&&(R.current=!1,t()),q(!1))};T.current&&(w.current=te,T.current.addEventListener("animationend",te))},[t,ue.color,l]),me=(m,Y,te)=>{var oe,fe;if(m){if(ge.type==="click"&&ge.switch==="image")ge.repeat==="close"&&S===n.length-1?ie():(oe=C.current)==null||oe.go("+1");else if(ge.type==="click"&&ge.switch==="50/50"){const N=m.getBoundingClientRect(),F=Y-N.left,ne=te-N.top,re=N.width,J=N.height;let W;k.direction==="horiz"?W=F<re/2?"-1":"+1":W=ne<J/2?"-1":"+1",(fe=C.current)==null||fe.go(W)}}},ve=m=>{if(U.current){U.current=!1;return}const Y=n[S],te=(Y==null?void 0:Y.image.objectFit)==="cover";let oe,fe;if("changedTouches"in m&&m.changedTouches.length>0)oe=m.changedTouches[0].clientX,fe=m.changedTouches[0].clientY;else if("clientX"in m)oe=m.clientX,fe=m.clientY;else return;let N;if(te&&Q.current){const F=xc(Q.current);N=oe>=F.left&&oe<=F.right&&fe>=F.top&&fe<=F.bottom}else{const F=Q.current?Sa(Q.current):null;if(!F){m.target===m.currentTarget&&ie();return}N=oe>=F.x&&oe<=F.x+F.width&&fe>=F.y&&fe<=F.y+F.height}N?me(Q.current,oe,fe):ie()},Ee=m=>{const Y=m.target;(Y.classList.contains(st.thumbsWrapper)||Y.classList.contains(st.thumbsContainer))&&ve(m)};s.useEffect(()=>{if(!e)return;const m=Y=>{var te,oe;if(Y.key==="Escape"){ie();return}if(Y.key==="ArrowRight"){_(fe=>(fe+1)%Math.max(n.length,1)),(te=C.current)==null||te.go("+1");return}Y.key==="ArrowLeft"&&(_(fe=>(fe-1+Math.max(n.length,1))%Math.max(n.length,1)),(oe=C.current)==null||oe.go("-1"))};return window.addEventListener("keydown",m),()=>{window.removeEventListener("keydown",m)}},[e,ie,n.length]),s.useEffect(()=>{if(e){if(_(0),L(Y=>Y+1),R.current=!1,q(!1),B(!1),O({}),!pe)return;const m=new CustomEvent("page-overlay",{detail:{itemId:pe}});window.dispatchEvent(m)}return()=>{T.current&&w.current&&(T.current.removeEventListener("animationend",w.current),w.current=null),B(!1)}},[e,pe]),s.useEffect(()=>{$.current!==null&&$.current!==k.type&&L(m=>m+1),$.current=k.type},[k.type]),s.useEffect(()=>{if(!e)return;const m=document.body.style.overflow,Y=window.matchMedia("(max-width: 768px)").matches,te=E.getColorAlpha(ue.color);document.body.style.overflow="hidden",B(!1);const oe=N=>{N.target===T.current&&!R.current&&N.animationName&&(Y&&!l&&te>.9&&(document.body.style.backgroundColor=ue.color),B(!0),T.current&&V.current&&T.current.removeEventListener("animationend",V.current),V.current=null)};T.current&&(V.current=oe,T.current.addEventListener("animationend",oe));const fe=N=>{const F=N.target;F&&(F.closest(`.${st.thumbsWrapper}`)||F.closest(`.${st.thumbsContainer}`))||k.type!=="slide"&&N.preventDefault()};return document.addEventListener("touchmove",fe,{passive:!1}),()=>{document.body.style.overflow=m,document.removeEventListener("touchmove",fe),T.current&&V.current&&(T.current.removeEventListener("animationend",V.current),V.current=null),B(!1)}},[e,l,ue.color,k.type]),s.useEffect(()=>{if(!e)return;const m=Y=>{var oe,fe;if(R.current){Y.stopPropagation();return}if(U.current){U.current=!1;return}const te=Y.target;if(!(te&&(te.closest(`.${st.thumbsContainer}`)||te.closest(`.${st.thumbItem}`)||te.closest(`.${st.arrow}`)||te.closest(`.${st.closeButton}`)||te.closest(`.${st.caption}`)))){if(k.type==="slide"&&ge.type==="drag"&&((fe=(oe=C.current)==null?void 0:oe.splide)!=null&&fe.root)){const N=C.current.splide.root;if(te&&(N.contains(te)||N===te))return}if(Y.touches.length===0&&Y.changedTouches.length>0){const N=n[S],F=(N==null?void 0:N.image.objectFit)==="cover",ne=Y.changedTouches[0];let re;if(F&&Q.current){const J=xc(Q.current);re=ne.clientX>=J.left&&ne.clientX<=J.right&&ne.clientY>=J.top&&ne.clientY<=J.bottom}else{const J=Q.current?Sa(Q.current):null;if(!J)return;re=ne.clientX>=J.x&&ne.clientX<=J.x+J.width&&ne.clientY>=J.y&&ne.clientY<=J.y+J.height}if(!re){Y.stopPropagation(),R.current=!0;const J=W=>{W.stopPropagation(),W.preventDefault(),document.removeEventListener("click",J,!0)};document.addEventListener("click",J,!0),ie()}}}};return document.addEventListener("touchend",m,{passive:!0}),()=>{document.removeEventListener("touchend",m)}},[e,ie,S,n]);const Re=(k.type==="scale"||k.type==="fade")&&k.direction==="vert"&&ge.type==="drag";s.useEffect(()=>{var W,Se;if(!e||!Re||!((Se=(W=C.current)==null?void 0:W.splide)!=null&&Se.root))return;const m=C.current.splide.root,Y=30,te=(le,j)=>{if(z.current){const Te=Math.abs(le-z.current.x),Fe=Math.abs(j-z.current.y);(Te>0||Fe>0)&&(U.current=!0)}},oe=le=>{z.current&&(le.preventDefault(),te(le.clientX,le.clientY))},fe=le=>{z.current&&le.touches.length>0&&(le.preventDefault(),te(le.touches[0].clientX,le.touches[0].clientY))},N=(le,j)=>{if(!z.current||!C.current){z.current=null;return}const Te=Math.abs(le-z.current.x),Fe=Math.abs(j-z.current.y);Fe>Y&&Fe>Te&&C.current.go(j<z.current.y?"+1":"-1"),z.current=null},F=le=>{z.current&&N(le.clientX,le.clientY),document.removeEventListener("pointerup",F),document.removeEventListener("pointercancel",F),document.removeEventListener("pointermove",oe)},ne=le=>{if(z.current){if(le.changedTouches.length>0){const j=le.changedTouches[0];N(j.clientX,j.clientY)}document.removeEventListener("touchend",ne),document.removeEventListener("touchcancel",ne),document.removeEventListener("touchmove",fe)}},re=le=>{z.current={x:le.clientX,y:le.clientY},U.current=!1,document.addEventListener("pointermove",oe,{passive:!1}),document.addEventListener("pointerup",F),document.addEventListener("pointercancel",F)},J=le=>{le.touches.length>0&&(z.current={x:le.touches[0].clientX,y:le.touches[0].clientY},U.current=!1,document.addEventListener("touchmove",fe,{passive:!1}),document.addEventListener("touchend",ne),document.addEventListener("touchcancel",ne))};return m.addEventListener("pointerdown",re),m.addEventListener("touchstart",J),()=>{m.removeEventListener("pointerdown",re),m.removeEventListener("touchstart",J),document.removeEventListener("pointermove",oe),document.removeEventListener("pointerup",F),document.removeEventListener("pointercancel",F),document.removeEventListener("touchmove",fe),document.removeEventListener("touchend",ne),document.removeEventListener("touchcancel",ne),z.current=null,U.current=!1}},[e,Re,v]);const Ce={backgroundColor:ue.color,backdropFilter:`blur(${ue.blur}px)`,animationDuration:`${parseInt(G.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(r)?null:qn.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:l?null:T,className:Et(st.background,P?de:se,{[st.editor]:l},{[st.hidden]:!e}),style:{...Ce,...X&&!l&&!P?{position:"absolute"}:{}}}),a.jsxs("div",{ref:l?T:null,className:Et(st.contentStyle,P?Z:Le,{[st.editor]:l},{[st.hidden]:!e}),style:{animationDuration:`${parseInt(G.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(El,{onMove:m=>_(m.index),ref:C,className:st.lightboxSplide,options:{arrows:!1,speed:k.duration?parseInt(k.duration):500,direction:k.direction==="horiz"||k.type==="fade"||k.type==="scale"?"ltr":"ttb",pagination:!1,drag:ge.type==="drag"&&!Re,perPage:1,width:"100%",height:"100%",type:k.type==="fade"||k.type==="scale"?"fade":"loop",padding:0,rewind:ge.repeat!=="close",start:0},style:{"--splide-speed":k.duration},children:n.map((m,Y)=>{const te=Wr(xe.position,xe.offset,l),oe=`${E.scalingValue(xe.padding.top,l)} ${E.scalingValue(xe.padding.right,l)} ${E.scalingValue(xe.padding.bottom,l)} ${E.scalingValue(xe.padding.left,l)}`,fe=k.type==="scale"?(()=>{const{transform:N,...F}=te;return{...F,position:"absolute",padding:oe,boxSizing:"border-box","--position-transform":N||"none"}})():{...te,position:"absolute",padding:oe,boxSizing:"border-box"};return a.jsx(kl,{children:a.jsx("div",{className:st.imgWrapper,onClick:ve,children:a.jsx("img",{ref:Y===S?Q:null,className:Et(st.imageStyle,{[st.contain]:m.image.objectFit==="contain",[st.cover]:m.image.objectFit==="cover",[st.scaleSlide]:k.type==="scale"}),src:m.image.assetId,alt:m.image.name??"",style:{...fe,pointerEvents:m.image.objectFit==="contain"?"none":"auto"}})})},Y)})},v),I.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Et(st.arrow,{[st.arrowVertical]:k.direction==="vert"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:a.jsxs("button",{className:st.arrowInner,style:{transform:`translate(${E.scalingValue(I.offset.x,l)}, ${E.scalingValue(I.offset.y*(k.direction==="horiz"?1:-1),l)}) scale(${I.scale}) rotate(${k.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var m;return(m=C.current)==null?void 0:m.go("-1")},"aria-label":"Previous",children:[I.arrowsImgUrl&&a.jsx(gn,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:Et(st.arrowImg,st.mirror)}),!I.arrowsImgUrl&&a.jsx(bc,{color:I.color,className:Et(st.arrowIcon,st.arrowImg,st.mirror)})]})}),a.jsx("div",{className:Et(st.arrow,st.nextArrow,{[st.arrowVertical]:k.direction==="vert"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:a.jsxs("button",{className:st.arrowInner,style:{transform:`translate(${E.scalingValue(I.offset.x*(k.direction==="horiz"?-1:1),l)}, ${E.scalingValue(I.offset.y,l)}) scale(${I.scale}) rotate(${k.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var m;return(m=C.current)==null?void 0:m.go("+1")},"aria-label":"Next",children:[I.arrowsImgUrl&&a.jsx(gn,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:st.arrowImg}),!I.arrowsImgUrl&&a.jsx(bc,{color:I.color,className:Et(st.arrowIcon,st.arrowImg)})]})})]}),ue.closeIconUrl&&(()=>{const m=Wr(ue.closeIconAlign,ue.closeIconOffset,l),Y=`scale(${ue.closeIconScale})`,te=m.transform?`${m.transform} ${Y}`:Y;return a.jsx("button",{className:st.closeButton,style:{...m,transform:te},onClick:ie,"aria-label":"Close lightbox",children:a.jsx(gn,{url:ue.closeIconUrl,fill:ue.closeIconColor??"#000000",hoverFill:ue.closeIconHover??"#cccccc"})})})(),ee&&ee.isActive&&i.imageCaption&&(($e=n[S])==null?void 0:$e.imageCaption)&&a.jsx("div",{className:st.caption,style:{...Wr(ee.alignment,ee.offset,l),fontFamily:Bo(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:d.sizing==="auto"?"max-content":E.scalingValue(d.width,l),letterSpacing:E.scalingValue(p,l),wordSpacing:E.scalingValue(x,l),textAlign:y,fontSize:E.scalingValue(g.fontSize,l),lineHeight:E.scalingValue(g.lineHeight,l),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:b},onClick:m=>m.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:st.captionTextInner,style:{"--link-color":ee.linkColor,"--link-hover-color":ee.linkHoverColor},children:a.jsx(Zi,{content:n[S].imageCaption})})}),ce.isActive&&(()=>{const[m,Y]=ce.position.split("-"),te=k.direction==="horiz"?`${m}-left`:ce.position,oe=Wr(te,ce.offset,l),fe=()=>{if(k.direction==="horiz"){if(Y==="left")return"flex-start";if(Y==="center")return"center";if(Y==="right")return"flex-end"}else{if(m==="top")return"flex-start";if(m==="middle")return"center";if(m==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:M,className:st.thumbsWrapper,onClick:N=>Ee(N),style:{position:l?"absolute":"fixed",...oe,...k.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:Et(st.thumbsContainer,{[st.thumbsContainerVertical]:k.direction==="vert",[st.thumbsAlignStart]:ce.align==="start",[st.thumbsAlignCenter]:ce.align==="center",[st.thumbsAlignEnd]:ce.align==="end"}),style:{gap:E.scalingValue(ce.grid.gap,l),justifyContent:f?"flex-start":fe()},children:n.map((N,F)=>{const ne=F===S,re=H[F],W=ce.grid.size*(ne?ce.activeState.scale:1),Se=()=>{if(ce.fit!=="fit")return{};if(!re)return k.direction==="horiz"?{height:E.scalingValue(W,l)}:{width:E.scalingValue(W,l)};const le=re.width/re.height;if(k.direction==="horiz"){const j=W,Te=j*le;return{width:E.scalingValue(Te,l),height:E.scalingValue(j,l)}}else{const j=W,Te=j/le;return{width:E.scalingValue(j,l),height:E.scalingValue(Te,l)}}};return a.jsx("button",{className:st.thumbItem,style:{...k.direction==="horiz"&&ce.fit!=="fit"?{height:E.scalingValue(W,l)}:{},...k.direction==="vert"&&ce.fit!=="fit"?{width:E.scalingValue(W,l)}:{},...ce.fit==="cover"?{width:E.scalingValue(W,l),height:E.scalingValue(W,l)}:{},...Se(),transition:ne?"all 0.25s ease-out":"none",opacity:ne?ce.activeState.opacity/100:ce.opacity/100,"--thumb-hover":ce.activeState.opacity/100},onClick:le=>{var j;le.stopPropagation(),_(F),(j=C.current)==null||j.go(F)},onMouseEnter:()=>{var le;ce.triggers==="hov"&&((le=C.current)==null||le.go(F))},children:a.jsx("img",{src:N.image.assetId,alt:N.image.name??"",onLoad:le=>{const j=le.currentTarget;j.naturalWidth&&j.naturalHeight&&O(Te=>({...Te,[F]:{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%"}:{}}})},`${N.image.name}-${F}`)})})})})()]})]}),document.getElementById(r))};function bc({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const bf={element:vf,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Lightbox.png"},defaultSize:{d:{width:440,height:550},t:{width:235,height:293},m:{width:265,height:331}},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.assetId",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{assetId:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},lightboxBlock:{appear:{type:"slide in",duration:"1000ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.01,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:0,bottom:.06,left:0}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},linkColor:"#cccccc",linkHoverColor:"#cccccc"}}},m:{thumbnailBlock:{cover:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"horiz",duration:"1000ms"},thumbnail:{isActive:!0,position:"bottom-center",fit:"fit",align:"start",triggers:"hov",grid:{size:.1,gap:.05},offset:{x:.01,y:-.05},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.05,bottom:.06,left:.05}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}},t:{thumbnailBlock:{cover:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",assetId:"01M3QM74XD4J8X0B8TTSQ8CV3P",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XD0N6VQJ5J8J9YB32N",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XE4WSEPVF1QQSKMD76",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}};function Or(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Sf(e){return`
7
7
  .${e}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
@@ -155,7 +155,7 @@
155
155
  pointer-events: auto;
156
156
  z-index: 10;
157
157
  }
158
- `}function wf({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:r}){const l=!!n,c=i&&t||!t,{prefix:d}=E.useScopedStyles(),{type:u="A",fieldsToShow:p=2,textareaRows:y=1,fields:x=[],buttonLabel:g,gap:f,fieldsGap:b,buttonCorners:S,buttonStroke:W,buttonPadding:v,isButtonFullWidth:L,inputCorners:M,inputStroke:U,inputPadding:G,inputColor:B,inputTextColor:N,inputBorderColor:O,placeholderColor:C,buttonColor:$,buttonTextColor:K,buttonBorderColor:R,labelTextColor:w,successColor:T,errorColor:j,fontFamily:_,inputFontSettings:Q,inputFontSize:P,inputLineHeight:h,inputLetterSpacing:J,inputWordSpacing:V,inputTextAppearance:me,buttonFontSettings:k,buttonFontSize:le,buttonLineHeight:I,buttonLetterSpacing:ue,buttonWordSpacing:ee,buttonTextAppearance:xe,labelFontSettings:Le,labelFontSize:ce,labelLineHeight:de,labelLetterSpacing:Z,labelWordSpacing:pe,labelTextAppearance:oe,statusFontSettings:ge,statusFontSize:be,statusLineHeight:Re,statusLetterSpacing:Ee,statusWordSpacing:Te,statusTextAppearance:we,successMessage:m,errorMessage:Y,stateOverrides:te}=e,ae=u==="B",fe=x.slice(0,Math.min(p,x.length)),F={fontSettings:{fontFamily:_,fontWeight:(Q==null?void 0:Q.fontWeight)??400,fontStyle:(Q==null?void 0:Q.fontStyle)??"normal"},fontSize:P??.01,lineHeight:h,letterSpacing:J??0,wordSpacing:V??0,textAppearance:me,color:N},H=pn(nn(F,t)),ne=E.scalingValue(U??0,t),q=Xe=>E.scalingValue((h??P??.01)*Xe+((G==null?void 0:G.top)??0)+((G==null?void 0:G.bottom)??0)+(u==="C"?U??0:(U??0)*2),t),ie=q(1),z=q(Math.max(1,y)),$e={...H,borderStyle:"solid",borderRadius:u==="C"?0:E.scalingValue(M??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ne,borderLeftWidth:0}:{borderWidth:ne},paddingTop:E.scalingValue((G==null?void 0:G.top)??0,t),paddingRight:E.scalingValue((G==null?void 0:G.right)??0,t),paddingBottom:E.scalingValue((G==null?void 0:G.bottom)??0,t),paddingLeft:E.scalingValue((G==null?void 0:G.left)??0,t),height:ie,minHeight:ie},re={fontSettings:{fontFamily:_,fontWeight:(k==null?void 0:k.fontWeight)??400,fontStyle:(k==null?void 0:k.fontStyle)??"normal"},fontSize:le??.01,lineHeight:I,letterSpacing:ue??0,wordSpacing:ee??0,textAppearance:xe,color:K},X=pn(nn(re,t)),Ce=E.scalingValue(W??0,t),He={fontSettings:{fontFamily:_,fontWeight:(Le==null?void 0:Le.fontWeight)??400,fontStyle:(Le==null?void 0:Le.fontStyle)??"normal"},fontSize:ce??.01,lineHeight:de,letterSpacing:Z??0,wordSpacing:pe??0,textAppearance:oe,color:w},Ye=nn(He,t),De={fontSettings:{fontFamily:_,fontWeight:(ge==null?void 0:ge.fontWeight)??400,fontStyle:(ge==null?void 0:ge.fontStyle)??"normal"},fontSize:be??.01,lineHeight:Re,letterSpacing:Ee??0,wordSpacing:Te??0,textAppearance:we,color:T},ze=pn(nn(De,t)),Ze=E.buildColorVars(d,{inputColor:B,inputTextColor:N,inputBorderColor:O,placeholderColor:C!=null&&C.trim()?C:"#cccccc",buttonColor:$,buttonTextColor:K,buttonBorderColor:R,labelTextColor:w,successColor:T,errorColor:j},$f,Cf,te),[Ue,ye]=s.useState(()=>Object.fromEntries(fe.map(Xe=>[Xe.name,""]))),[Ne,Ve]=s.useState("idle"),[Je,et]=s.useState(null),ot=r==="success"?"success":r==="error"?"error":Ne,lt=r==="error"?Y:Je,Ke=r==="filled",ht=s.useMemo(()=>{if(!Ke)return Ue;let Xe=null;for(const ct of fe)(Ue[ct.name]??"").trim().length>0||(Xe=Xe??{...Ue},Xe[ct.name]="Filled");return Xe??Ue},[Ue,Ke,fe]),tt=ot==="error"?E.getFormFieldValidationError(fe,ht):null,We=`${r&&r!=="default"?`${d}-state-${r}`:""}`.trim(),Fe=o==null?void 0:o.submitUrl,ve=(Xe,ct)=>{ye(rt=>({...rt,[Xe]:ct}))},_e=async Xe=>{if(Xe.preventDefault(),!c)return;const ct=Object.fromEntries(fe.map(xt=>{var pt;return[xt.name,((pt=Ue[xt.name])==null?void 0:pt.trim())??""]}).filter(([,xt])=>xt));if(!Fe){Ve("error"),et("No integrations were found for this form.");return}if(Object.keys(ct).length===0)return;const rt=E.getFormFieldValidationError(fe,Ue);if(rt){Ve("error"),et(rt);return}Ve("submitting"),et(null);try{const xt=await fetch(Fe,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ct)});if(!xt.ok){const pt=await xt.text();throw new Error(pt||`Request failed: ${xt.status}`)}Ve("success"),ye(Object.fromEntries(fe.map(pt=>[pt.name,""])))}catch(xt){Ve("error"),et(xt instanceof Error?xt.message:"Something went wrong")}};return a.jsxs("div",{className:`${d}-wrapper ${d}-type-${u} ${We}`.trim(),style:Ze,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Sf(d)}}),a.jsxs("form",{onSubmit:_e,className:`${d}-form`,children:[a.jsx("div",{className:`${d}-fields`,children:fe.map((Xe,ct)=>a.jsxs(s.Fragment,{children:[ct>0&&a.jsx("div",{"data-controls":l?"fieldsGap":void 0,className:l?`${d}-control`:void 0,style:{height:E.scalingValue(b??0,t)}}),a.jsxs("div",{className:`${d}-field-group${ae?` ${d}-labeled`:""}`,children:[ae&&a.jsx("span",{className:`${d}-field-label`,style:Ye?{...Ye,lineHeight:Ye.fontSize}:void 0,children:Xe.label||Xe.name}),Xe.type==="textarea"?a.jsx("textarea",{name:Xe.name,autoComplete:"off",value:ht[Xe.name]??"",onChange:rt=>ve(Xe.name,rt.target.value),placeholder:Xe.placeholder,className:`${d}-input`,style:{...$e,height:z,minHeight:z},rows:y,"data-filled":Ke||(ht[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:ht[Xe.name]??"",onChange:rt=>ve(Xe.name,rt.target.value),placeholder:Xe.placeholder,required:Xe.isRequired??Xe.type==="email",className:`${d}-input`,style:$e,"data-filled":Ke||(ht[Xe.name]??"").trim().length>0})]})]},ct))}),a.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${d}-control`:void 0,style:{height:E.scalingValue(f??0,t)}}),a.jsx("div",{className:`${d}-overlay-anchor`,children:a.jsx("button",{type:c?"submit":"button",className:`${d}-button`,style:{borderStyle:"solid",borderRadius:E.scalingValue(S??0,t),borderWidth:Ce,paddingTop:E.scalingValue((v==null?void 0:v.top)??0,t),paddingRight:E.scalingValue((v==null?void 0:v.right)??0,t),paddingBottom:E.scalingValue((v==null?void 0:v.bottom)??0,t),paddingLeft:E.scalingValue((v==null?void 0:v.left)??0,t),pointerEvents:c?"auto":void 0,...X,...L?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${d}-overlay-anchor`,style:L?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:Ne==="submitting"?"...":g})})})]}),ot==="success"&&a.jsx("p",{className:`${d}-success`,style:{...ze},children:m}),ot==="error"&&a.jsx("p",{className:`${d}-error`,style:{...ze},role:"alert",children:tt??lt??Y})]})}const $f={inputColor:"input-color",inputTextColor:"input-text-color",inputBorderColor:"input-border-color",placeholderColor:"placeholder-color",buttonColor:"button-color",buttonTextColor:"button-text-color",buttonBorderColor:"button-border-color",labelTextColor:"label-text-color",successColor:"success-color",errorColor:"error-color"},Cf=["hover","focus","filled","success","error"],Tf=`import React, { useMemo, useState } from 'react';
158
+ `}function wf({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:r}){const l=!!n,c=i&&t||!t,{prefix:d}=E.useScopedStyles(),{type:u="A",fieldsToShow:p=2,textareaRows:y=1,fields:x=[],buttonLabel:g,gap:h,fieldsGap:b,buttonCorners:S,buttonStroke:_,buttonPadding:v,isButtonFullWidth:L,inputCorners:P,inputStroke:q,inputPadding:X,inputColor:B,inputTextColor:H,inputBorderColor:O,placeholderColor:C,buttonColor:$,buttonTextColor:Q,buttonBorderColor:R,labelTextColor:T,successColor:w,errorColor:V,fontFamily:z,inputFontSettings:U,inputFontSize:M,inputLineHeight:f,inputLetterSpacing:K,inputWordSpacing:G,inputTextAppearance:ge,buttonFontSettings:k,buttonFontSize:ce,buttonLineHeight:I,buttonLetterSpacing:ue,buttonWordSpacing:ee,buttonTextAppearance:xe,labelFontSettings:Le,labelFontSize:se,labelLineHeight:de,labelLetterSpacing:Z,labelWordSpacing:pe,labelTextAppearance:ie,statusFontSettings:me,statusFontSize:ve,statusLineHeight:Ee,statusLetterSpacing:Re,statusWordSpacing:Ce,statusTextAppearance:$e,successMessage:m,errorMessage:Y,stateOverrides:te}=e,oe=u==="B",fe=x.slice(0,Math.min(p,x.length)),N={fontSettings:{fontFamily:z,fontWeight:(U==null?void 0:U.fontWeight)??400,fontStyle:(U==null?void 0:U.fontStyle)??"normal"},fontSize:M??.01,lineHeight:f,letterSpacing:K??0,wordSpacing:G??0,textAppearance:ge,color:H},F=pn(nn(N,t)),ne=E.scalingValue(q??0,t),re=Xe=>E.scalingValue((f??M??.01)*Xe+((X==null?void 0:X.top)??0)+((X==null?void 0:X.bottom)??0)+(u==="C"?q??0:(q??0)*2),t),J=re(1),W=re(Math.max(1,y)),Se={...F,borderStyle:"solid",borderRadius:u==="C"?0:E.scalingValue(P??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ne,borderLeftWidth:0}:{borderWidth:ne},paddingTop:E.scalingValue((X==null?void 0:X.top)??0,t),paddingRight:E.scalingValue((X==null?void 0:X.right)??0,t),paddingBottom:E.scalingValue((X==null?void 0:X.bottom)??0,t),paddingLeft:E.scalingValue((X==null?void 0:X.left)??0,t),height:J,minHeight:J},le={fontSettings:{fontFamily:z,fontWeight:(k==null?void 0:k.fontWeight)??400,fontStyle:(k==null?void 0:k.fontStyle)??"normal"},fontSize:ce??.01,lineHeight:I,letterSpacing:ue??0,wordSpacing:ee??0,textAppearance:xe,color:Q},j=pn(nn(le,t)),Te=E.scalingValue(_??0,t),Fe={fontSettings:{fontFamily:z,fontWeight:(Le==null?void 0:Le.fontWeight)??400,fontStyle:(Le==null?void 0:Le.fontStyle)??"normal"},fontSize:se??.01,lineHeight:de,letterSpacing:Z??0,wordSpacing:pe??0,textAppearance:ie,color:T},Ye=nn(Fe,t),De={fontSettings:{fontFamily:z,fontWeight:(me==null?void 0:me.fontWeight)??400,fontStyle:(me==null?void 0:me.fontStyle)??"normal"},fontSize:ve??.01,lineHeight:Ee,letterSpacing:Re??0,wordSpacing:Ce??0,textAppearance:$e,color:w},ze=pn(nn(De,t)),Ze=E.buildColorVars(d,{inputColor:B,inputTextColor:H,inputBorderColor:O,placeholderColor:C!=null&&C.trim()?C:"#cccccc",buttonColor:$,buttonTextColor:Q,buttonBorderColor:R,labelTextColor:T,successColor:w,errorColor:V},$f,Cf,te),[Ue,ye]=s.useState(()=>Object.fromEntries(fe.map(Xe=>[Xe.name,""]))),[_e,Ve]=s.useState("idle"),[Je,et]=s.useState(null),ot=r==="success"?"success":r==="error"?"error":_e,lt=r==="error"?Y:Je,Ke=r==="filled",ht=s.useMemo(()=>{if(!Ke)return Ue;let Xe=null;for(const ct of fe)(Ue[ct.name]??"").trim().length>0||(Xe=Xe??{...Ue},Xe[ct.name]="Filled");return Xe??Ue},[Ue,Ke,fe]),tt=ot==="error"?E.getFormFieldValidationError(fe,ht):null,We=`${r&&r!=="default"?`${d}-state-${r}`:""}`.trim(),Ne=o==null?void 0:o.submitUrl,be=(Xe,ct)=>{ye(rt=>({...rt,[Xe]:ct}))},He=async Xe=>{if(Xe.preventDefault(),!c)return;const ct=Object.fromEntries(fe.map(xt=>{var pt;return[xt.name,((pt=Ue[xt.name])==null?void 0:pt.trim())??""]}).filter(([,xt])=>xt));if(!Ne){Ve("error"),et("No integrations were found for this form.");return}if(Object.keys(ct).length===0)return;const rt=E.getFormFieldValidationError(fe,Ue);if(rt){Ve("error"),et(rt);return}Ve("submitting"),et(null);try{const xt=await fetch(Ne,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ct)});if(!xt.ok){const pt=await xt.text();throw new Error(pt||`Request failed: ${xt.status}`)}Ve("success"),ye(Object.fromEntries(fe.map(pt=>[pt.name,""])))}catch(xt){Ve("error"),et(xt instanceof Error?xt.message:"Something went wrong")}};return a.jsxs("div",{className:`${d}-wrapper ${d}-type-${u} ${We}`.trim(),style:Ze,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Sf(d)}}),a.jsxs("form",{onSubmit:He,className:`${d}-form`,children:[a.jsx("div",{className:`${d}-fields`,children:fe.map((Xe,ct)=>a.jsxs(s.Fragment,{children:[ct>0&&a.jsx("div",{"data-controls":l?"fieldsGap":void 0,className:l?`${d}-control`:void 0,style:{height:E.scalingValue(b??0,t)}}),a.jsxs("div",{className:`${d}-field-group${oe?` ${d}-labeled`:""}`,children:[oe&&a.jsx("span",{className:`${d}-field-label`,style:Ye?{...Ye,lineHeight:Ye.fontSize}:void 0,children:Xe.label||Xe.name}),Xe.type==="textarea"?a.jsx("textarea",{name:Xe.name,autoComplete:"off",value:ht[Xe.name]??"",onChange:rt=>be(Xe.name,rt.target.value),placeholder:Xe.placeholder,className:`${d}-input`,style:{...Se,height:W,minHeight:W},rows:y,"data-filled":Ke||(ht[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:ht[Xe.name]??"",onChange:rt=>be(Xe.name,rt.target.value),placeholder:Xe.placeholder,required:Xe.isRequired??Xe.type==="email",className:`${d}-input`,style:Se,"data-filled":Ke||(ht[Xe.name]??"").trim().length>0})]})]},ct))}),a.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${d}-control`:void 0,style:{height:E.scalingValue(h??0,t)}}),a.jsx("div",{className:`${d}-overlay-anchor`,children:a.jsx("button",{type:c?"submit":"button",className:`${d}-button`,style:{borderStyle:"solid",borderRadius:E.scalingValue(S??0,t),borderWidth:Te,paddingTop:E.scalingValue((v==null?void 0:v.top)??0,t),paddingRight:E.scalingValue((v==null?void 0:v.right)??0,t),paddingBottom:E.scalingValue((v==null?void 0:v.bottom)??0,t),paddingLeft:E.scalingValue((v==null?void 0:v.left)??0,t),pointerEvents:c?"auto":void 0,...j,...L?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${d}-overlay-anchor`,style:L?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:_e==="submitting"?"...":g})})})]}),ot==="success"&&a.jsx("p",{className:`${d}-success`,style:{...ze},children:m}),ot==="error"&&a.jsx("p",{className:`${d}-error`,style:{...ze},role:"alert",children:tt??lt??Y})]})}const $f={inputColor:"input-color",inputTextColor:"input-text-color",inputBorderColor:"input-border-color",placeholderColor:"placeholder-color",buttonColor:"button-color",buttonTextColor:"button-text-color",buttonBorderColor:"button-border-color",labelTextColor:"label-text-color",successColor:"success-color",errorColor:"error-color"},Cf=["hover","focus","filled","success","error"],Tf=`import React, { useMemo, useState } from 'react';
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: ${zr(14)};
987
987
  color: var(--${e}-error-error-color, var(--${e}-error-color));
988
988
  }
989
- `}const Ef=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:r}=E.useScopedStyles(),l=n&&t||!t,{fields:c=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:d,buttonLabel:u,fieldsToShow:p=1,fontFamily:y,inputFontSettings:x,inputFontSize:g,inputLineHeight:f,inputLetterSpacing:b,inputWordSpacing:S,inputTextAppearance:W,buttonFontSettings:v,buttonFontSize:L,buttonLineHeight:M,buttonLetterSpacing:U,buttonWordSpacing:G,buttonTextAppearance:B,statusFontSettings:N,statusFontSize:O,statusLineHeight:C,statusLetterSpacing:$,statusWordSpacing:K,statusTextAppearance:R,iconMaxWidth:w,minHeight:T,corners:j,stroke:_,stateOverrides:Q,inputPadding:P,buttonPadding:h,successMessage:J="Thanks for subscribing!",errorMessage:V="Please, fill all required fields."}=e,me=c.slice(0,Math.min(p,c.length)),[k,le]=s.useState(()=>Object.fromEntries(me.map(re=>[re.name,""]))),[I,ue]=s.useState("idle"),[ee,xe]=s.useState(null),Le=o==="success"?"success":o==="error"?"error":I,ce=o==="error"?V:ee,de=o==="filled",Z=s.useMemo(()=>{if(!de)return k;let re=null;for(const X of me)(k[X.name]??"").trim().length>0||(re=re??{...k},re[X.name]="Filled");return re??k},[de,k,me]),pe=Le==="error"?E.getFormFieldValidationError(me,Z):null,oe=o&&o!=="default"?`${r}-state-${o}`:"",ge=me.some(re=>(Z[re.name]??"").trim().length>0),be=oe!==`${r}-state-filled`&&ge?`${r}-state-filled`:"",Re=`${oe} ${be}`.trim(),Ee=i==null?void 0:i.submitUrl,Te=u??"",we=(d==null?void 0:d.icon)??"",m=(d==null?void 0:d.mode)==="On",Y=Te||"Submit",te={fontSettings:{fontFamily:y,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:g??.01,lineHeight:f,letterSpacing:b??0,wordSpacing:S??0,textAppearance:W,color:e.inputTextColor??"#111111"},ae={fontSettings:{fontFamily:y,fontWeight:(v==null?void 0:v.fontWeight)??400,fontStyle:(v==null?void 0:v.fontStyle)??"normal"},fontSize:L??.01,lineHeight:M,letterSpacing:U??0,wordSpacing:G??0,textAppearance:B,color:e.buttonTextColor??"#ffffff"},fe={fontSettings:{fontFamily:y,fontWeight:(N==null?void 0:N.fontWeight)??400,fontStyle:(N==null?void 0:N.fontStyle)??"normal"},fontSize:O??.01,lineHeight:C,letterSpacing:$??0,wordSpacing:K??0,textAppearance:R,color:e.successColor??"#22c55e"},F=pn(nn(te,t)),H=pn(nn(ae,t)),ne=pn(nn(fe,t)),q=E.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(te==null?void 0:te.color)??"#111111",buttonTextColor:e.buttonTextColor??(ae==null?void 0:ae.color)??"#ffffff"},kf,Af,Q),ie={borderRadius:E.scalingValue(j,t),borderWidth:E.scalingValue(_,t),borderStyle:"solid"},z={borderLeftWidth:E.scalingValue(_,t)},$e=async re=>{if(re.preventDefault(),!l)return;const X=Object.fromEntries(me.map(He=>{var Ye;return[He.name,((Ye=k[He.name])==null?void 0:Ye.trim())??""]}).filter(([,He])=>He));if(!Ee){ue("error"),xe("No integrations were found for this form.");return}if(Object.keys(X).length===0)return;const Ce=E.getFormFieldValidationError(me,k);if(Ce){ue("error"),xe(Ce);return}ue("submitting"),xe(null);try{const He=await fetch(Ee,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(X)});if(!He.ok){const Ye=await He.text();throw new Error(Ye||`Request failed: ${He.status}`)}ue("success"),le(Object.fromEntries(me.map(Ye=>[Ye.name,""])))}catch(He){ue("error"),xe(He instanceof Error?He.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${Re}`.trim(),style:q,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Rf(r)}}),a.jsxs("form",{onSubmit:$e,className:`${r}-form`,style:{...ie,height:E.scalingValue(T,t),minHeight:E.scalingValue(T,t)},children:[a.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:me.map(re=>a.jsx("input",{type:re.type==="email"?"email":re.type==="phone"?"tel":"text",name:re.name,autoComplete:"off",value:Z[re.name]??"",onChange:X=>le(Ce=>({...Ce,[re.name]:X.target.value})),placeholder:re.placeholder,required:re.isRequired??re.type==="email",className:`${r}-input`,style:{...F,paddingRight:E.scalingValue(P.right,t),paddingLeft:E.scalingValue(P.left,t),paddingTop:E.scalingValue(P.top,t),paddingBottom:E.scalingValue(P.bottom,t)}},re.name))}),a.jsx("div",{className:`${r}-overlayAnchor`,children:a.jsx("button",{type:l?"submit":"button",className:`${r}-submitBtn`,"aria-label":Y,style:{...H,...z,paddingRight:E.scalingValue(h.right,t),paddingLeft:E.scalingValue(h.left,t),paddingTop:E.scalingValue(h.top,t),paddingBottom:E.scalingValue(h.bottom,t),pointerEvents:l?"auto":void 0},children:I==="submitting"?"...":m?we&&a.jsx(gn,{url:we,className:`${r}-submitBtnIcon`,style:{maxWidth:E.scalingValue(w??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):Te})})]}),Le==="success"&&a.jsx("p",{className:`${r}-success`,style:{...ne},children:J}),Le==="error"&&a.jsx("p",{className:`${r}-error`,style:{...ne},role:"alert",children:pe??ce??V})]})},kf={strokeColor:"stroke-color",inputColor:"input-color",placeholderColor:"placeholder-color",buttonColor:"button-color",inputTextColor:"input-text-color",buttonTextColor:"button-text-color",successColor:"success-color",errorColor:"error-color"},Af=["hover","focus","filled","success","error"],Ff=`import React, { useMemo, useState } from 'react';
989
+ `}const Ef=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:r}=E.useScopedStyles(),l=n&&t||!t,{fields:c=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:d,buttonLabel:u,fieldsToShow:p=1,fontFamily:y,inputFontSettings:x,inputFontSize:g,inputLineHeight:h,inputLetterSpacing:b,inputWordSpacing:S,inputTextAppearance:_,buttonFontSettings:v,buttonFontSize:L,buttonLineHeight:P,buttonLetterSpacing:q,buttonWordSpacing:X,buttonTextAppearance:B,statusFontSettings:H,statusFontSize:O,statusLineHeight:C,statusLetterSpacing:$,statusWordSpacing:Q,statusTextAppearance:R,iconMaxWidth:T,minHeight:w,corners:V,stroke:z,stateOverrides:U,inputPadding:M,buttonPadding:f,successMessage:K="Thanks for subscribing!",errorMessage:G="Please, fill all required fields."}=e,ge=c.slice(0,Math.min(p,c.length)),[k,ce]=s.useState(()=>Object.fromEntries(ge.map(le=>[le.name,""]))),[I,ue]=s.useState("idle"),[ee,xe]=s.useState(null),Le=o==="success"?"success":o==="error"?"error":I,se=o==="error"?G:ee,de=o==="filled",Z=s.useMemo(()=>{if(!de)return k;let le=null;for(const j of ge)(k[j.name]??"").trim().length>0||(le=le??{...k},le[j.name]="Filled");return le??k},[de,k,ge]),pe=Le==="error"?E.getFormFieldValidationError(ge,Z):null,ie=o&&o!=="default"?`${r}-state-${o}`:"",me=ge.some(le=>(Z[le.name]??"").trim().length>0),ve=ie!==`${r}-state-filled`&&me?`${r}-state-filled`:"",Ee=`${ie} ${ve}`.trim(),Re=i==null?void 0:i.submitUrl,Ce=u??"",$e=(d==null?void 0:d.icon)??"",m=(d==null?void 0:d.mode)==="On",Y=Ce||"Submit",te={fontSettings:{fontFamily:y,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:g??.01,lineHeight:h,letterSpacing:b??0,wordSpacing:S??0,textAppearance:_,color:e.inputTextColor??"#111111"},oe={fontSettings:{fontFamily:y,fontWeight:(v==null?void 0:v.fontWeight)??400,fontStyle:(v==null?void 0:v.fontStyle)??"normal"},fontSize:L??.01,lineHeight:P,letterSpacing:q??0,wordSpacing:X??0,textAppearance:B,color:e.buttonTextColor??"#ffffff"},fe={fontSettings:{fontFamily:y,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:O??.01,lineHeight:C,letterSpacing:$??0,wordSpacing:Q??0,textAppearance:R,color:e.successColor??"#22c55e"},N=pn(nn(te,t)),F=pn(nn(oe,t)),ne=pn(nn(fe,t)),re=E.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(te==null?void 0:te.color)??"#111111",buttonTextColor:e.buttonTextColor??(oe==null?void 0:oe.color)??"#ffffff"},kf,Af,U),J={borderRadius:E.scalingValue(V,t),borderWidth:E.scalingValue(z,t),borderStyle:"solid"},W={borderLeftWidth:E.scalingValue(z,t)},Se=async le=>{if(le.preventDefault(),!l)return;const j=Object.fromEntries(ge.map(Fe=>{var Ye;return[Fe.name,((Ye=k[Fe.name])==null?void 0:Ye.trim())??""]}).filter(([,Fe])=>Fe));if(!Re){ue("error"),xe("No integrations were found for this form.");return}if(Object.keys(j).length===0)return;const Te=E.getFormFieldValidationError(ge,k);if(Te){ue("error"),xe(Te);return}ue("submitting"),xe(null);try{const Fe=await fetch(Re,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(j)});if(!Fe.ok){const Ye=await Fe.text();throw new Error(Ye||`Request failed: ${Fe.status}`)}ue("success"),ce(Object.fromEntries(ge.map(Ye=>[Ye.name,""])))}catch(Fe){ue("error"),xe(Fe instanceof Error?Fe.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${Ee}`.trim(),style:re,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Rf(r)}}),a.jsxs("form",{onSubmit:Se,className:`${r}-form`,style:{...J,height:E.scalingValue(w,t),minHeight:E.scalingValue(w,t)},children:[a.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:ge.map(le=>a.jsx("input",{type:le.type==="email"?"email":le.type==="phone"?"tel":"text",name:le.name,autoComplete:"off",value:Z[le.name]??"",onChange:j=>ce(Te=>({...Te,[le.name]:j.target.value})),placeholder:le.placeholder,required:le.isRequired??le.type==="email",className:`${r}-input`,style:{...N,paddingRight:E.scalingValue(M.right,t),paddingLeft:E.scalingValue(M.left,t),paddingTop:E.scalingValue(M.top,t),paddingBottom:E.scalingValue(M.bottom,t)}},le.name))}),a.jsx("div",{className:`${r}-overlayAnchor`,children:a.jsx("button",{type:l?"submit":"button",className:`${r}-submitBtn`,"aria-label":Y,style:{...F,...W,paddingRight:E.scalingValue(f.right,t),paddingLeft:E.scalingValue(f.left,t),paddingTop:E.scalingValue(f.top,t),paddingBottom:E.scalingValue(f.bottom,t),pointerEvents:l?"auto":void 0},children:I==="submitting"?"...":m?$e&&a.jsx(gn,{url:$e,className:`${r}-submitBtnIcon`,style:{maxWidth:E.scalingValue(T??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):Ce})})]}),Le==="success"&&a.jsx("p",{className:`${r}-success`,style:{...ne},children:K}),Le==="error"&&a.jsx("p",{className:`${r}-error`,style:{...ne},role:"alert",children:pe??se??G})]})},kf={strokeColor:"stroke-color",inputColor:"input-color",placeholderColor:"placeholder-color",buttonColor:"button-color",inputTextColor:"input-text-color",buttonTextColor:"button-text-color",successColor:"success-color",errorColor:"error-color"},Af=["hover","focus","filled","success","error"],Ff=`import React, { useMemo, useState } from 'react';
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 zf=30,Bf=20,ts=3,jf=12,Vf=32,Gf=3,Xf=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},Uf=(e,t)=>Array.from({length:t},()=>e).flat(),qf=e=>typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"16:9",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"16:9",reversed:(e==null?void 0:e.reversed)??!1},Zu=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),Sc=(e,t)=>{if(t<=0||e.children.length<t)return 0;const n=e.children[0],i=e.children[t-1];if(!n||!i)return 0;const o=getComputedStyle(e),r=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=i.getBoundingClientRect().right-n.getBoundingClientRect().left;if(l>0)return l;const c=Array.from({length:t},(u,p)=>e.children[p]),d=Zu(c);return d<=0?0:d+r*Math.max(0,t-1)},Yf=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=Zu(Array.from(e.children));if(i<=0)return 0;const o=getComputedStyle(e),r=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=Number.parseFloat(o.paddingRight)||0;return i+r*Math.max(0,e.children.length-1)+l},Kf=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},Qf=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Kf(i,e))},Zf=e=>{if(e.type==="video")return!0;if(e.type==="image")return!1;const t=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.assetId??"")},Jf=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,ey=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:r,imageHoverClass:l,isFirstSet:c,scaled:d,onFirstSetImageDone:u})=>{var K,R,w,T;const p=s.useRef(null),y=!!((K=e.image)!=null&&K.assetId&&Zf(e.image));s.useLayoutEffect(()=>{c&&Jf(p.current)&&(u==null||u())},[c,(R=e.image)==null?void 0:R.assetId,u]);const x=n.display==="cover",g=n.ratioValue??"1:1",f=n.reversed??!1,[b,S]=g.split(":").map(Number),L=(f?S:b)/(f?b:S),M=i/L,U=M>o?o:M,G=M>o?o*L:i,B=d(G),N=d(U),O={borderRadius:d(r)},C=x?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...O}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:d(i),maxHeight:d(o),objectFit:"contain",...O},$=((w=e.image)==null?void 0:w.assetId)&&(y?a.jsx("video",{ref:j=>{p.current=j},src:e.image.assetId,style:C,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto",onLoadedData:c?u:void 0,onError:c?u:void 0}):a.jsx("img",{ref:j=>{p.current=j},src:e.image.assetId,alt:((T=e.image)==null?void 0:T.name)??"",style:C,onLoad:c?u:void 0,onError:c?u:void 0}));return a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...x?{width:B}:{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,...x?{width:B,height:N,overflow:"hidden",...O}:{width:"max-content",maxWidth:d(i),height:d(o)}},children:$&&e.link?a.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:Et(`${t}-marquee-link`,!x&&`${t}-marquee-link-contain`),children:$}):$})})},ty=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=E.useScopedStyles(),[l,c]=s.useState(0),d=l>0?Math.round(l):0,u=s.useMemo(()=>Df(r,d),[r,d]),{speed:p,direction:y,pauseOnHover:x,gap:g,imageMaxWidth:f,imageMaxHeight:b,hoverEffect:S,cornerRadius:W=0}=e,v=s.useMemo(()=>qf(e.imageFit),[e.imageFit]),L=(t==null?void 0:t.length)??0,M=!!o,U=!n||!!i,G=U&&S!=="off"&&S!=="randomize"?`${r}-image-hover-${S}`:void 0,B=n?!!i:!0,O=((t==null?void 0:t.length)??0)>0&&(B||!!n),C=Math.max(0,p)*zf,$=be=>E.scalingValue(be,n??!1),K=s.useRef(null),R=s.useRef(null),w=s.useRef(null),[T,j]=s.useState(0),_=B&&x==="on",[Q,P]=s.useState(!1),[h,J]=s.useState({}),V=s.useRef(h);V.current=h;const me=s.useRef(null),k=s.useRef(0),le=s.useRef(null),I=s.useMemo(()=>(t??[]).map(be=>{var Re;return((Re=be.image)==null?void 0:Re.assetId)??""}).join("\0"),[t]),[ue,ee]=s.useState(ts),xe=s.useMemo(()=>{const be=t??[];return be.length===0||!(B||!!n)?be:Uf(be,ue)},[t,B,ue,n]),Le=s.useMemo(()=>(t??[]).filter(be=>{var Re;return!!((Re=be.image)!=null&&Re.assetId)}).length,[t]),ce=O?Gf:1;s.useLayoutEffect(()=>{k.current=0,J({}),me.current=null,ee(ts),c(0)},[I]),s.useEffect(()=>{if(!U||S!=="randomize")return;const be=K.current;if(!be)return;const Re=m=>{J(Y=>{const te=Array.from(m).filter(fe=>fe in Y&&!Qf(be,fe));if(te.length===0)return Y;const ae={...Y};return te.forEach(fe=>{delete ae[fe]}),ae})},Ee=new IntersectionObserver(m=>{const Y=new Set;for(const te of m){const ae=te.target.dataset.marqueeItemIndex,fe=ae!==void 0?Number(ae):NaN;Number.isNaN(fe)||Y.add(fe)}Y.size>0&&Re(Y)},{root:be,threshold:0});Object.keys(h).forEach(m=>{const Y=Number(m);be.querySelectorAll(`[data-marquee-item-index="${Y}"]`).forEach(te=>Ee.observe(te))});const Te={current:0},we=()=>{const m=Object.keys(V.current);m.length!==0&&(Re(m.map(Number)),Te.current=requestAnimationFrame(we))};return Object.keys(V.current).length>0&&(Te.current=requestAnimationFrame(we)),()=>{cancelAnimationFrame(Te.current),Ee.disconnect()}},[S,h,U]),s.useEffect(()=>{const be=K.current;if(!be||typeof IntersectionObserver>"u")return;const Re=be.querySelectorAll("video");if(Re.length===0)return;const Ee=new IntersectionObserver(Te=>{for(const we of Te){const m=we.target;we.isIntersecting?m.paused&&m.play().catch(()=>{}):m.paused||m.pause()}},{threshold:0});return Re.forEach(Te=>Ee.observe(Te)),()=>Ee.disconnect()},[O,xe,ce,h]),s.useLayoutEffect(()=>{if(!O)return;const be=K.current,Re=w.current;if(!be||!Re)return;const Ee={current:0},Te=()=>{const Y=be.getBoundingClientRect().width||be.offsetWidth,te=Yf(Re),ae=me.current,fe=typeof ae=="number"&&Math.abs(ae-te)<=.25;me.current=te;let F=ue,H=0;if((B||n)&&L>0&&Y>0){const ie=Sc(Re,L);if(ie>=Vf){H=ie;const z=Math.min(jf,Math.max(ts,Math.ceil(Y/ie)+1));F=z,z!==ue&&ee(z)}}const q=F!==ue&&H>0?H*F:te>0?te:H>0?H*F:(()=>{const ie=Sc(Re,L);return ie>0?ie*F:0})();q>0?c(ie=>ie<=0?q:!fe||Math.round(ie)===Math.round(q)?ie:q):!fe&&l<=0&&(cancelAnimationFrame(Ee.current),Ee.current=requestAnimationFrame(Te))},we=()=>{cancelAnimationFrame(Ee.current),Ee.current=requestAnimationFrame(Te)};le.current=we,we();const m=new ResizeObserver(we);return m.observe(be),m.observe(Re),()=>{le.current=null,cancelAnimationFrame(Ee.current),m.disconnect()}},[B,O,l,I,ue,L,n]),s.useLayoutEffect(()=>{if(!O||d<=0)return;const be=R.current;be&&Xf(be)},[O,d,y,C]),s.useLayoutEffect(()=>{if(!O||l<=0){j(0);return}const be=R.current,Re=w.current;if(!be||!Re)return;const Ee=()=>{const we=be.offsetHeight||be.getBoundingClientRect().height,m=Array.from(Re.children).reduce((te,ae)=>Math.max(te,ae.offsetHeight||ae.getBoundingClientRect().height),0),Y=we>0?we:m;j(Y>0?Y:0)};Ee();const Te=new ResizeObserver(Ee);return Te.observe(be),Te.observe(Re),()=>Te.disconnect()},[O,ce,xe,n,g,f,b,l,v,h]),s.useLayoutEffect(()=>{if(!n||!M||!O||typeof window>"u")return;const be=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(be)},[n,M,O,y,l,T,g,xe]);const de=()=>{_&&P(!0)},Z=()=>{_&&P(!1)},pe=s.useCallback(()=>{var be;k.current=Math.min(Le,k.current+1),(be=le.current)==null||be.call(le)},[Le]),oe=s.useCallback((be,Re)=>{J(Ee=>{const Te=Ee[be]??Re,we=(t??[]).filter(Y=>Y!==Te);if(we.length===0)return Ee;const m=we[Math.floor(Math.random()*we.length)];return{...Ee,[be]:m}})},[t]),ge=(be,Re,Ee,Te)=>{const we=U&&S==="randomize"&&v.display==="cover"?h[Ee]??be:be,m=`max(${$(g)}, ${Bf}px)`,Y=`calc(-0.5 * (${m} + ${$(g)}))`;return a.jsxs("div",{className:`${r}-marquee-card`,"data-marquee-item-index":Ee,onMouseEnter:U&&S==="randomize"&&v.display==="cover"?()=>oe(Ee,be):void 0,children:[a.jsx(ey,{item:we,prefix:r,imageFit:v,imageMaxWidth:f,imageMaxHeight:b,cornerRadius:W,imageHoverClass:G,isEditor:n,isFirstSet:Te,scaled:$,onFirstSetImageDone:pe}),M&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${r}-gap-control`,style:{position:"absolute",top:0,right:Y,width:m,height:"100%"}})]},`${Re}-${Ee}`)};if(O){const be=B?_&&Q?"paused":"running":"paused",Re=d>0&&C>0?d/C*1e3:0,Ee=`${Math.max(0,Re)/1e3}s`;return a.jsxs("div",{ref:K,className:Et(`${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:R,className:`${r}-marquee-track`,"data-direction":y,onMouseEnter:de,onMouseLeave:Z,style:{WebkitAnimationDuration:Ee,animationDuration:Ee,WebkitAnimationPlayState:be,animationPlayState:be},children:Array.from({length:ce},(Te,we)=>a.jsx("div",{ref:we===0?w:void 0,className:Et(`${r}-marquee-row`,`${r}-marquee-set`),style:{gap:$(g),paddingRight:$(g)},"aria-hidden":we>0,children:xe.map((m,Y)=>ge(m,we,Y,we===0&&Y<L))},`set-${we}`))})]})}return a.jsxs("div",{ref:K,className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{className:Et(`${r}-marquee-row`,`${r}-marquee-static`),style:{gap:$(g),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((be,Re)=>ge(be,0,Re))},"marquee-static")]})},ny=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
1700
+ `}const zf=30,Bf=20,ts=3,jf=12,Vf=32,Gf=3,Xf=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},Uf=(e,t)=>Array.from({length:t},()=>e).flat(),qf=e=>typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"16:9",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"16:9",reversed:(e==null?void 0:e.reversed)??!1},Zu=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),Sc=(e,t)=>{if(t<=0||e.children.length<t)return 0;const n=e.children[0],i=e.children[t-1];if(!n||!i)return 0;const o=getComputedStyle(e),r=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=i.getBoundingClientRect().right-n.getBoundingClientRect().left;if(l>0)return l;const c=Array.from({length:t},(u,p)=>e.children[p]),d=Zu(c);return d<=0?0:d+r*Math.max(0,t-1)},Yf=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=Zu(Array.from(e.children));if(i<=0)return 0;const o=getComputedStyle(e),r=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=Number.parseFloat(o.paddingRight)||0;return i+r*Math.max(0,e.children.length-1)+l},Kf=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},Qf=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Kf(i,e))},Zf=e=>{if(e.type==="video")return!0;if(e.type==="image")return!1;const t=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.assetId??"")},Jf=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,ey=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:r,imageHoverClass:l,isFirstSet:c,scaled:d,onFirstSetImageDone:u})=>{var Q,R,T,w;const p=s.useRef(null),y=!!((Q=e.image)!=null&&Q.assetId&&Zf(e.image));s.useLayoutEffect(()=>{c&&Jf(p.current)&&(u==null||u())},[c,(R=e.image)==null?void 0:R.assetId,u]);const x=n.display==="cover",g=n.ratioValue??"1:1",h=n.reversed??!1,[b,S]=g.split(":").map(Number),L=(h?S:b)/(h?b:S),P=i/L,q=P>o?o:P,X=P>o?o*L:i,B=d(X),H=d(q),O={borderRadius:d(r)},C=x?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...O}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:d(i),maxHeight:d(o),objectFit:"contain",...O},$=((T=e.image)==null?void 0:T.assetId)&&(y?a.jsx("video",{ref:V=>{p.current=V},src:e.image.assetId,style:C,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto",onLoadedData:c?u:void 0,onError:c?u:void 0}):a.jsx("img",{ref:V=>{p.current=V},src:e.image.assetId,alt:((w=e.image)==null?void 0:w.name)??"",style:C,onLoad:c?u:void 0,onError:c?u:void 0}));return a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...x?{width:B}:{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,...x?{width:B,height:H,overflow:"hidden",...O}:{width:"max-content",maxWidth:d(i),height:d(o)}},children:$&&e.link?a.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:Et(`${t}-marquee-link`,!x&&`${t}-marquee-link-contain`),children:$}):$})})},ty=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=E.useScopedStyles(),[l,c]=s.useState(0),d=l>0?Math.round(l):0,u=s.useMemo(()=>Df(r,d),[r,d]),{speed:p,direction:y,pauseOnHover:x,gap:g,imageMaxWidth:h,imageMaxHeight:b,hoverEffect:S,cornerRadius:_=0}=e,v=s.useMemo(()=>qf(e.imageFit),[e.imageFit]),L=(t==null?void 0:t.length)??0,P=!!o,q=!n||!!i,X=q&&S!=="off"&&S!=="randomize"?`${r}-image-hover-${S}`:void 0,B=n?!!i:!0,O=((t==null?void 0:t.length)??0)>0&&(B||!!n),C=Math.max(0,p)*zf,$=ve=>E.scalingValue(ve,n??!1),Q=s.useRef(null),R=s.useRef(null),T=s.useRef(null),[w,V]=s.useState(0),z=B&&x==="on",[U,M]=s.useState(!1),[f,K]=s.useState({}),G=s.useRef(f);G.current=f;const ge=s.useRef(null),k=s.useRef(0),ce=s.useRef(null),I=s.useMemo(()=>(t??[]).map(ve=>{var Ee;return((Ee=ve.image)==null?void 0:Ee.assetId)??""}).join("\0"),[t]),[ue,ee]=s.useState(ts),xe=s.useMemo(()=>{const ve=t??[];return ve.length===0||!(B||!!n)?ve:Uf(ve,ue)},[t,B,ue,n]),Le=s.useMemo(()=>(t??[]).filter(ve=>{var Ee;return!!((Ee=ve.image)!=null&&Ee.assetId)}).length,[t]),se=O?Gf:1;s.useLayoutEffect(()=>{k.current=0,K({}),ge.current=null,ee(ts),c(0)},[I]),s.useEffect(()=>{if(!q||S!=="randomize")return;const ve=Q.current;if(!ve)return;const Ee=m=>{K(Y=>{const te=Array.from(m).filter(fe=>fe in Y&&!Qf(ve,fe));if(te.length===0)return Y;const oe={...Y};return te.forEach(fe=>{delete oe[fe]}),oe})},Re=new IntersectionObserver(m=>{const Y=new Set;for(const te of m){const oe=te.target.dataset.marqueeItemIndex,fe=oe!==void 0?Number(oe):NaN;Number.isNaN(fe)||Y.add(fe)}Y.size>0&&Ee(Y)},{root:ve,threshold:0});Object.keys(f).forEach(m=>{const Y=Number(m);ve.querySelectorAll(`[data-marquee-item-index="${Y}"]`).forEach(te=>Re.observe(te))});const Ce={current:0},$e=()=>{const m=Object.keys(G.current);m.length!==0&&(Ee(m.map(Number)),Ce.current=requestAnimationFrame($e))};return Object.keys(G.current).length>0&&(Ce.current=requestAnimationFrame($e)),()=>{cancelAnimationFrame(Ce.current),Re.disconnect()}},[S,f,q]),s.useEffect(()=>{const ve=Q.current;if(!ve||typeof IntersectionObserver>"u")return;const Ee=ve.querySelectorAll("video");if(Ee.length===0)return;const Re=new IntersectionObserver(Ce=>{for(const $e of Ce){const m=$e.target;$e.isIntersecting?m.paused&&m.play().catch(()=>{}):m.paused||m.pause()}},{threshold:0});return Ee.forEach(Ce=>Re.observe(Ce)),()=>Re.disconnect()},[O,xe,se,f]),s.useLayoutEffect(()=>{if(!O)return;const ve=Q.current,Ee=T.current;if(!ve||!Ee)return;const Re={current:0},Ce=()=>{const Y=ve.getBoundingClientRect().width||ve.offsetWidth,te=Yf(Ee),oe=ge.current,fe=typeof oe=="number"&&Math.abs(oe-te)<=.25;ge.current=te;let N=ue,F=0;if((B||n)&&L>0&&Y>0){const J=Sc(Ee,L);if(J>=Vf){F=J;const W=Math.min(jf,Math.max(ts,Math.ceil(Y/J)+1));N=W,W!==ue&&ee(W)}}const re=N!==ue&&F>0?F*N:te>0?te:F>0?F*N:(()=>{const J=Sc(Ee,L);return J>0?J*N:0})();re>0?c(J=>J<=0?re:!fe||Math.round(J)===Math.round(re)?J:re):!fe&&l<=0&&(cancelAnimationFrame(Re.current),Re.current=requestAnimationFrame(Ce))},$e=()=>{cancelAnimationFrame(Re.current),Re.current=requestAnimationFrame(Ce)};ce.current=$e,$e();const m=new ResizeObserver($e);return m.observe(ve),m.observe(Ee),()=>{ce.current=null,cancelAnimationFrame(Re.current),m.disconnect()}},[B,O,l,I,ue,L,n]),s.useLayoutEffect(()=>{if(!O||d<=0)return;const ve=R.current;ve&&Xf(ve)},[O,d,y,C]),s.useLayoutEffect(()=>{if(!O||l<=0){V(0);return}const ve=R.current,Ee=T.current;if(!ve||!Ee)return;const Re=()=>{const $e=ve.offsetHeight||ve.getBoundingClientRect().height,m=Array.from(Ee.children).reduce((te,oe)=>Math.max(te,oe.offsetHeight||oe.getBoundingClientRect().height),0),Y=$e>0?$e:m;V(Y>0?Y:0)};Re();const Ce=new ResizeObserver(Re);return Ce.observe(ve),Ce.observe(Ee),()=>Ce.disconnect()},[O,se,xe,n,g,h,b,l,v,f]),s.useLayoutEffect(()=>{if(!n||!P||!O||typeof window>"u")return;const ve=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(ve)},[n,P,O,y,l,w,g,xe]);const de=()=>{z&&M(!0)},Z=()=>{z&&M(!1)},pe=s.useCallback(()=>{var ve;k.current=Math.min(Le,k.current+1),(ve=ce.current)==null||ve.call(ce)},[Le]),ie=s.useCallback((ve,Ee)=>{K(Re=>{const Ce=Re[ve]??Ee,$e=(t??[]).filter(Y=>Y!==Ce);if($e.length===0)return Re;const m=$e[Math.floor(Math.random()*$e.length)];return{...Re,[ve]:m}})},[t]),me=(ve,Ee,Re,Ce)=>{const $e=q&&S==="randomize"&&v.display==="cover"?f[Re]??ve:ve,m=`max(${$(g)}, ${Bf}px)`,Y=`calc(-0.5 * (${m} + ${$(g)}))`;return a.jsxs("div",{className:`${r}-marquee-card`,"data-marquee-item-index":Re,onMouseEnter:q&&S==="randomize"&&v.display==="cover"?()=>ie(Re,ve):void 0,children:[a.jsx(ey,{item:$e,prefix:r,imageFit:v,imageMaxWidth:h,imageMaxHeight:b,cornerRadius:_,imageHoverClass:X,isEditor:n,isFirstSet:Ce,scaled:$,onFirstSetImageDone:pe}),P&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${r}-gap-control`,style:{position:"absolute",top:0,right:Y,width:m,height:"100%"}})]},`${Ee}-${Re}`)};if(O){const ve=B?z&&U?"paused":"running":"paused",Ee=d>0&&C>0?d/C*1e3:0,Re=`${Math.max(0,Ee)/1e3}s`;return a.jsxs("div",{ref:Q,className:Et(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Marquee",style:w>0?{height:w}:void 0,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{ref:R,className:`${r}-marquee-track`,"data-direction":y,onMouseEnter:de,onMouseLeave:Z,style:{WebkitAnimationDuration:Re,animationDuration:Re,WebkitAnimationPlayState:ve,animationPlayState:ve},children:Array.from({length:se},(Ce,$e)=>a.jsx("div",{ref:$e===0?T:void 0,className:Et(`${r}-marquee-row`,`${r}-marquee-set`),style:{gap:$(g),paddingRight:$(g)},"aria-hidden":$e>0,children:xe.map((m,Y)=>me(m,$e,Y,$e===0&&Y<L))},`set-${$e}`))})]})}return a.jsxs("div",{ref:Q,className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{className:Et(`${r}-marquee-row`,`${r}-marquee-static`),style:{gap:$(g),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((ve,Ee)=>me(ve,0,Ee))},"marquee-static")]})},ny=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
1701
1701
  import cn from 'classnames';
1702
1702
  import { CommonComponentProps } from '../props';
1703
1703
  import { scalingValue } from '../utils/scalingValue';
@@ -2632,7 +2632,7 @@ ${o}
2632
2632
  left: -9999px;
2633
2633
  top: 0;
2634
2634
  }
2635
- `}const ay=30,ns=3,sy=12,ly=96,wc=3,ua=.72,cy=100,dy=10,uy=e=>e/cy,py=e=>Math.max(0,e)/dy,gy=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},my=(e,t)=>Array.from({length:t*e.length},(n,i)=>e[i%e.length]),ro={ctx:void 0},hy=()=>ro.ctx!==void 0?ro.ctx:typeof document>"u"?(ro.ctx=null,ro.ctx):(ro.ctx=document.createElement("canvas").getContext("2d"),ro.ctx),fy=(e,t,n,i)=>{e.style.transform=`translate3d(${t}px, ${n}px, 0) rotate(${i}deg)`},$c=e=>{e.style.transform=""},yy=e=>{if(!e||e==="none")return 0;try{return new DOMMatrixReadOnly(e).m41}catch{return 0}},vy=(e,t)=>{const n=(i,o)=>{if(!i||i===t)return o;const r=o+i.offsetLeft,l=i.offsetParent;return!l||l===i?r:n(l,r)};return n(e,e.offsetWidth/2)},Ju=96,ep=(e,t,n)=>{if(t<=0||Math.abs(e)<=0||n<2)return null;const i=2*Math.PI/t,o=new Float64Array(n+1),r=new Float64Array(n+1),l=e*t,c=u=>Math.sqrt(1+(l*Math.cos(t*u))**2),d=i/n;return Array.from({length:n},(u,p)=>{const y=p*d,x=y+d;o[p+1]=x,r[p+1]=r[p]+(c(y)+c(x))*.5*d}),{wavelength:i,periodArc:r[n],x:o,s:r}},xy=(e,t)=>{const n=ep(e,t,Ju);return!n||n.wavelength<=0?1:n.periodArc/n.wavelength},by=(e,t)=>{if(e.periodArc<=0)return t;const n=t<0?-1:1,i=Math.abs(t),o=Math.floor(i/e.periodArc),r=i-o*e.periodArc,{s:l,x:c}=e,d=(g,f)=>{if(f-g<=1)return[g,f];const b=g+f>>1;return l[b]<=r?d(b,f):d(g,b)},[u,p]=d(0,l.length-1),y=l[p]-l[u],x=y>0?(r-l[u])/y:0;return n*(o*e.wavelength+c[u]+(c[p]-c[u])*x)},Sy=(e,t,n,i,o=0)=>{const r=Math.max(0,n),l=e>0?2*Math.PI*r/e:0,c=f=>i+t*Math.sin(l*f),d=f=>t*l*Math.cos(l*f),u=-o,y=e+o-u,x=Math.max(4,Math.ceil(r*4*(y/Math.max(e,1)))),g=Array.from({length:x},(f,b)=>{const S=u+b/x*y,W=u+(b+1)/x*y,v=W-S,L=c(S),M=c(W),U=S+v/3,G=L+d(S)*v/3,B=W-v/3,N=M-d(W)*v/3;return`C${U.toFixed(2)} ${G.toFixed(2)} ${B.toFixed(2)} ${N.toFixed(2)} ${W.toFixed(2)} ${M.toFixed(2)}`});return[`M${u.toFixed(2)} ${c(u).toFixed(2)}`,...g].join(" ")},wy=({item:e,prefix:t,textCss:n,capHeightPx:i,opticalOffsetY:o,imageGapPx:r,isCurve:l})=>{var g;const c=o!==0?{...n,transform:`translateY(${o}px)`}:n,d=i>0?{height:`${i}px`}:{fontSize:n.fontSize,height:`${ua}em`},u=((g=e.image)==null?void 0:g.assetId)&&a.jsx("img",{src:e.image.assetId,alt:e.image.name??"",className:`${t}-item-image`,style:d}),p=u&&(l?a.jsx("span",{className:`${t}-item-image-wrap`,"data-marquee-wave-node":!0,children:u}):u),y=l?a.jsx("span",{className:`${t}-text`,style:c,children:Array.from(e.text).map((f,b)=>a.jsx("span",{className:`${t}-glyph`,"data-marquee-wave-node":!0,children:a.jsx("span",{className:`${t}-glyph-inner`,children:f===" "?" ":f})},b))}):a.jsx("span",{className:`${t}-text`,style:c,children:e.text}),x=a.jsxs(a.Fragment,{children:[p,y]});return a.jsx("div",{className:`${t}-item`,"data-marquee-text-item":!0,style:{gap:r},children:e.link?a.jsx("a",{href:e.link,className:`${t}-item-link`,style:{gap:r},children:x}):x})},$y=({settings:e,content:t,isEditor:n,isPreviewMode:i})=>{const{prefix:o}=E.useScopedStyles(),[r,l]=s.useState(0),c=r>0?Math.round(r):0,{speed:d,direction:u,pauseOnHover:p,gap:y,layoutType:x,curveAmplitude:g,curveFrequency:f,textFontFamily:b,textFontSettings:S,textFontSize:W,textLetterSpacing:v,textWordSpacing:L,textTextAppearance:M,textColor:U,backgroundColor:G,ribbonWidth:B}=e,N=B??W,O=x==="curve",C=uy(g),$=py(f),K=s.useMemo(()=>ry(o,c,O),[o,c,O]),R=s.useMemo(()=>nn({fontSettings:{fontFamily:b,fontWeight:S.fontWeight,fontStyle:S.fontStyle},letterSpacing:v,wordSpacing:L,fontSize:W,lineHeight:W,textAppearance:M,color:U},n),[b,S,v,L,W,M,U,n]),w=Ge=>E.scalingValue(Ge,n??!1),T=((t==null?void 0:t.length)??0)>0,j=n?!!i:!0,_=T&&(j||!!n),Q=Math.max(0,d)*ay,P=j&&p==="on",[h,J]=s.useState(!1),V=j?P&&h?"paused":"running":"paused",me=V==="running"&&Q>0&&c>0,k=c>0&&Q>0?c/Q*1e3:0,le=s.useRef(null),I=s.useRef(null),ue=s.useRef(null),ee=s.useRef(null),xe=s.useRef(null),Le=s.useRef(null),ce=s.useRef(me),de=s.useRef(null),Z=s.useRef(null),pe=s.useRef(C),oe=s.useRef($);ce.current=me,pe.current=C,oe.current=$;const[ge,be]=s.useState(0),[Re,Ee]=s.useState(0),[Te,we]=s.useState(0),[m,Y]=s.useState(0),[te,ae]=s.useState(0),fe=s.useMemo(()=>(t??[]).map(Ge=>{var We;return`${Ge.text}\0${((We=Ge.image)==null?void 0:We.assetId)??""}\0${Ge.link??""}`}).join("\0"),[t]),[F,H]=s.useState(ns),ne=s.useMemo(()=>{const Ge=t??[];return Ge.length===0||!(j||n)?Ge:my(Ge,F)},[t,j,F,n]),q=_?wc:1;s.useLayoutEffect(()=>{H(ns),l(0)},[fe]),s.useLayoutEffect(()=>{var _e;const Ge=Le.current;if(!Ge)return;const We=()=>{const Xe=getComputedStyle(Ge),ct=parseFloat(Xe.fontSize)||0;if(ct<=0)return;const rt=hy();if(!rt){be(ct*ua),Ee(0);return}rt.font=`${Xe.fontStyle} ${Xe.fontWeight} ${ct}px ${Xe.fontFamily}`;const xt=rt.measureText("H"),pt=xt.actualBoundingBoxAscent>0?xt.actualBoundingBoxAscent:ct*ua,It=Math.max(0,xt.actualBoundingBoxDescent||0),nt=xt.fontBoundingBoxAscent||0,bt=xt.fontBoundingBoxDescent||0;be(Ut=>Math.abs(Ut-pt)>.5?pt:Ut);const Lt=nt>0||bt>0?(bt-It-(nt-pt))/2:0;Ee(Ut=>Math.abs(Ut-Lt)>.25?Lt:Ut)};We();const Fe=typeof document<"u"?document.fonts:void 0;(_e=Fe==null?void 0:Fe.ready)==null||_e.then(We).catch(()=>{});const ve=new ResizeObserver(We);return ve.observe(Ge),()=>ve.disconnect()},[R.fontFamily,R.fontWeight,R.fontStyle,R.fontSize,R.lineHeight]),s.useLayoutEffect(()=>{if(!_)return;const Ge=le.current,We=ee.current;if(!Ge||!We)return;const Fe={id:0},ve=()=>{const rt=Ge.offsetWidth||Ge.getBoundingClientRect().width,xt=We.offsetWidth||We.getBoundingClientRect().width;if(T&&rt>0&&xt>0){const pt=xt/F;if(pt>0){let It=rt,nt=sy;if(O){const Lt=rt*pe.current,Ut=oe.current,Ft=Ut>0?2*Math.PI*Ut/rt:0,Me=xy(Lt,Ft);It=Math.max(rt,Me*rt/(wc-1)),nt=ly}const bt=Math.min(nt,Math.max(ns,Math.ceil(It/pt)+1));if(bt!==F){H(bt);return}}}xt>0&&l(xt)},_e=()=>{cancelAnimationFrame(Fe.id),Fe.id=requestAnimationFrame(ve)};_e();const Xe=new ResizeObserver(_e);Xe.observe(Ge),Xe.observe(We);const ct=()=>{document.hidden||_e()};return document.addEventListener("visibilitychange",ct),window.addEventListener("pageshow",ct),window.addEventListener("focus",ct),()=>{cancelAnimationFrame(Fe.id),Xe.disconnect(),document.removeEventListener("visibilitychange",ct),window.removeEventListener("pageshow",ct),window.removeEventListener("focus",ct)}},[_,fe,F,T,ge,O,C,$]),s.useLayoutEffect(()=>{const Ge=xe.current;if(!Ge)return;const We={id:0},Fe=()=>{const _e=Ge.offsetHeight;_e>0&&ae(Xe=>Math.abs(Xe-_e)>.5?_e:Xe)};We.id=requestAnimationFrame(Fe);const ve=new ResizeObserver(()=>{cancelAnimationFrame(We.id),We.id=requestAnimationFrame(Fe)});return ve.observe(Ge),()=>{cancelAnimationFrame(We.id),ve.disconnect()}},[N,n]),s.useLayoutEffect(()=>{if(!O){we(0),Y(0);return}const Ge=le.current,We=ee.current;if(!Ge||!We)return;const Fe={id:0},ve=()=>{const Xe=Ge.offsetWidth,ct=We.offsetHeight;Xe>0&&Y(rt=>Math.abs(rt-Xe)>.5?Xe:rt),ct>0&&we(rt=>Math.abs(rt-ct)>.5?ct:rt)};Fe.id=requestAnimationFrame(ve);const _e=new ResizeObserver(()=>{cancelAnimationFrame(Fe.id),Fe.id=requestAnimationFrame(ve)});return _e.observe(Ge),_e.observe(We),()=>{cancelAnimationFrame(Fe.id),_e.disconnect()}},[O,fe,ge,W,_]),s.useLayoutEffect(()=>{if(!_||c<=0)return;const Ge=ue.current;Ge&&gy(Ge)},[_,c,u,Q]),s.useLayoutEffect(()=>{if(!O||!T)return;const Ge=le.current;if(!Ge)return;const We={raf:0,cancelled:!1,lut:null,lutKey:"",itemsCache:[],cacheDirty:!0},Fe=()=>{for(const pt of We.itemsCache)for(const It of pt.glyphs)$c(It.inner)},ve=()=>{const pt=I.current??Ge;We.itemsCache=Array.from(Ge.querySelectorAll("[data-marquee-text-item]"),It=>{const nt=[];return It.querySelectorAll("[data-marquee-wave-node]").forEach(bt=>{const Lt=bt.firstElementChild;Lt&&nt.push({inner:Lt,layoutLocalX:vy(bt,pt)})}),{item:It,glyphs:nt}}),We.cacheDirty=!1},_e=()=>{We.cacheDirty&&ve();const It=(I.current??Ge).offsetWidth||1,nt=It*pe.current,bt=oe.current,Lt=2*Math.PI*bt/It,Ut=`${It}|${nt}|${Lt}`;if(Ut!==We.lutKey&&(We.lutKey=Ut,We.lut=ep(nt,Lt,Ju)),Math.abs(nt)<=0||Lt<=0){Fe();return}const Ft=ue.current,Me=Ft?yy(getComputedStyle(Ft).transform):0,Oe=Ge.getBoundingClientRect(),St=Oe.left,Mt=Oe.right,Qe=We.lut&&We.lut.wavelength>0?Math.max(0,(We.lut.periodArc/We.lut.wavelength-1)*It):0;for(const{item:kt,glyphs:Bt}of We.itemsCache){const Wt=kt.getBoundingClientRect();if(Wt.right<St||Wt.left>Mt+Qe){for(const At of Bt)$c(At.inner);continue}for(const At of Bt){const Ae=At.layoutLocalX+Me,ft=We.lut?by(We.lut,Ae):Ae,gt=Lt*ft,dt=nt*Math.sin(gt),yt=nt*Lt*Math.cos(gt),ut=Math.atan(yt)*(180/Math.PI);fy(At.inner,ft-Ae,dt,ut)}}},Xe=()=>{We.cancelled||(We.raf=0,_e(),ce.current&&!document.hidden&&(We.raf=requestAnimationFrame(Xe)))},ct=()=>{We.cancelled||We.raf||(We.raf=requestAnimationFrame(Xe))},rt=()=>{We.cacheDirty=!0,_e(),ct()};de.current=ct,Z.current=rt,_e(),ct();const xt=()=>{if(document.hidden){cancelAnimationFrame(We.raf),We.raf=0;return}cancelAnimationFrame(We.raf),We.raf=0,rt()};return document.addEventListener("visibilitychange",xt),window.addEventListener("pageshow",xt),window.addEventListener("focus",xt),()=>{We.cancelled=!0,de.current=null,Z.current=null,cancelAnimationFrame(We.raf),document.removeEventListener("visibilitychange",xt),window.removeEventListener("pageshow",xt),window.removeEventListener("focus",xt),Fe()}},[O,T]),s.useLayoutEffect(()=>{var Ge;!O||!T||(Ge=Z.current)==null||Ge.call(Z)},[O,T,r,fe,F,ge,C,$,m]),s.useLayoutEffect(()=>{var Ge;(Ge=de.current)==null||Ge.call(de)},[me,u]);const ie=Ge=>{P&&Ge.pointerType==="mouse"&&J(!0)},z=()=>{P&&J(!1)},$e=O?Math.abs(C)*100:0,re=w(N),X={minHeight:re,...O?{paddingTop:`${$e}%`,paddingBottom:`${$e}%`}:{}},Ce={height:re,...O?{visibility:"hidden"}:{backgroundColor:G}},He={gap:w(y),minHeight:re},Ye=m*C,De=Math.abs(Ye),ze=te>0?te:Te,Ze=Math.max(Te,ze),Ue=De+Ze/2,ye=Math.max(ze,1),Ne=O&&m>0&&Ze>0?Sy(m,Ye,$,Ue,ye):"",Ve=De*2+Ze,Je=Ne?a.jsx("svg",{className:`${o}-curve-bg`,viewBox:`0 0 ${m} ${Ve}`,preserveAspectRatio:"none","aria-hidden":!0,children:a.jsx("path",{d:Ne,fill:"none",stroke:G,strokeWidth:ze,strokeLinecap:"butt",strokeLinejoin:"round"})}):null,et=a.jsx("div",{ref:xe,className:`${o}-ribbon`,style:Ce,"aria-hidden":!0}),ot={...R,lineHeight:ge>0?`${ge}px`:`${ua}em`},lt=(Ge,We,Fe)=>a.jsx(wy,{item:Ge,prefix:o,textCss:ot,capHeightPx:ge,opticalOffsetY:Re,imageGapPx:w(y),isCurve:O},`${We}-${Fe}`),Ke=a.jsx("span",{ref:Le,"aria-hidden":!0,className:`${o}-cap-ref`,style:R,children:"H"}),ht=`${Math.max(0,k)/1e3}s`,tt=_?a.jsx("div",{ref:ue,className:`${o}-marquee-track`,"data-direction":u,onPointerEnter:ie,onPointerLeave:z,style:{WebkitAnimationDuration:ht,animationDuration:ht,WebkitAnimationPlayState:V,animationPlayState:V},children:Array.from({length:q},(Ge,We)=>a.jsx("div",{ref:We===0?ee:void 0,className:`${o}-marquee-set`,style:{...He,paddingRight:w(y)},"aria-hidden":We>0,children:ne.map((Fe,ve)=>lt(Fe,We,ve))},`set-${We}`))}):a.jsx("div",{ref:ee,className:Et(`${o}-marquee-set`,`${o}-marquee-static`),style:He,children:t==null?void 0:t.map((Ge,We)=>lt(Ge,0,We))});return a.jsxs("div",{ref:le,className:`${o}-wrapper`,"aria-label":"Marquee text",children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:K}}),Ke,a.jsxs("div",{ref:I,className:`${o}-marquee-wrapper`,style:X,children:[et,Je,tt]})]})},Cy=`import { useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type PointerEvent as ReactPointerEvent } from 'react';
2635
+ `}const ay=30,ns=3,sy=12,ly=96,wc=3,ua=.72,cy=100,dy=10,uy=e=>e/cy,py=e=>Math.max(0,e)/dy,gy=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},my=(e,t)=>Array.from({length:t*e.length},(n,i)=>e[i%e.length]),ro={ctx:void 0},hy=()=>ro.ctx!==void 0?ro.ctx:typeof document>"u"?(ro.ctx=null,ro.ctx):(ro.ctx=document.createElement("canvas").getContext("2d"),ro.ctx),fy=(e,t,n,i)=>{e.style.transform=`translate3d(${t}px, ${n}px, 0) rotate(${i}deg)`},$c=e=>{e.style.transform=""},yy=e=>{if(!e||e==="none")return 0;try{return new DOMMatrixReadOnly(e).m41}catch{return 0}},vy=(e,t)=>{const n=(i,o)=>{if(!i||i===t)return o;const r=o+i.offsetLeft,l=i.offsetParent;return!l||l===i?r:n(l,r)};return n(e,e.offsetWidth/2)},Ju=96,ep=(e,t,n)=>{if(t<=0||Math.abs(e)<=0||n<2)return null;const i=2*Math.PI/t,o=new Float64Array(n+1),r=new Float64Array(n+1),l=e*t,c=u=>Math.sqrt(1+(l*Math.cos(t*u))**2),d=i/n;return Array.from({length:n},(u,p)=>{const y=p*d,x=y+d;o[p+1]=x,r[p+1]=r[p]+(c(y)+c(x))*.5*d}),{wavelength:i,periodArc:r[n],x:o,s:r}},xy=(e,t)=>{const n=ep(e,t,Ju);return!n||n.wavelength<=0?1:n.periodArc/n.wavelength},by=(e,t)=>{if(e.periodArc<=0)return t;const n=t<0?-1:1,i=Math.abs(t),o=Math.floor(i/e.periodArc),r=i-o*e.periodArc,{s:l,x:c}=e,d=(g,h)=>{if(h-g<=1)return[g,h];const b=g+h>>1;return l[b]<=r?d(b,h):d(g,b)},[u,p]=d(0,l.length-1),y=l[p]-l[u],x=y>0?(r-l[u])/y:0;return n*(o*e.wavelength+c[u]+(c[p]-c[u])*x)},Sy=(e,t,n,i,o=0)=>{const r=Math.max(0,n),l=e>0?2*Math.PI*r/e:0,c=h=>i+t*Math.sin(l*h),d=h=>t*l*Math.cos(l*h),u=-o,y=e+o-u,x=Math.max(4,Math.ceil(r*4*(y/Math.max(e,1)))),g=Array.from({length:x},(h,b)=>{const S=u+b/x*y,_=u+(b+1)/x*y,v=_-S,L=c(S),P=c(_),q=S+v/3,X=L+d(S)*v/3,B=_-v/3,H=P-d(_)*v/3;return`C${q.toFixed(2)} ${X.toFixed(2)} ${B.toFixed(2)} ${H.toFixed(2)} ${_.toFixed(2)} ${P.toFixed(2)}`});return[`M${u.toFixed(2)} ${c(u).toFixed(2)}`,...g].join(" ")},wy=({item:e,prefix:t,textCss:n,capHeightPx:i,opticalOffsetY:o,imageGapPx:r,isCurve:l})=>{var g;const c=o!==0?{...n,transform:`translateY(${o}px)`}:n,d=i>0?{height:`${i}px`}:{fontSize:n.fontSize,height:`${ua}em`},u=((g=e.image)==null?void 0:g.assetId)&&a.jsx("img",{src:e.image.assetId,alt:e.image.name??"",className:`${t}-item-image`,style:d}),p=u&&(l?a.jsx("span",{className:`${t}-item-image-wrap`,"data-marquee-wave-node":!0,children:u}):u),y=l?a.jsx("span",{className:`${t}-text`,style:c,children:Array.from(e.text).map((h,b)=>a.jsx("span",{className:`${t}-glyph`,"data-marquee-wave-node":!0,children:a.jsx("span",{className:`${t}-glyph-inner`,children:h===" "?" ":h})},b))}):a.jsx("span",{className:`${t}-text`,style:c,children:e.text}),x=a.jsxs(a.Fragment,{children:[p,y]});return a.jsx("div",{className:`${t}-item`,"data-marquee-text-item":!0,style:{gap:r},children:e.link?a.jsx("a",{href:e.link,className:`${t}-item-link`,style:{gap:r},children:x}):x})},$y=({settings:e,content:t,isEditor:n,isPreviewMode:i})=>{const{prefix:o}=E.useScopedStyles(),[r,l]=s.useState(0),c=r>0?Math.round(r):0,{speed:d,direction:u,pauseOnHover:p,gap:y,layoutType:x,curveAmplitude:g,curveFrequency:h,textFontFamily:b,textFontSettings:S,textFontSize:_,textLetterSpacing:v,textWordSpacing:L,textTextAppearance:P,textColor:q,backgroundColor:X,ribbonWidth:B}=e,H=B??_,O=x==="curve",C=uy(g),$=py(h),Q=s.useMemo(()=>ry(o,c,O),[o,c,O]),R=s.useMemo(()=>nn({fontSettings:{fontFamily:b,fontWeight:S.fontWeight,fontStyle:S.fontStyle},letterSpacing:v,wordSpacing:L,fontSize:_,lineHeight:_,textAppearance:P,color:q},n),[b,S,v,L,_,P,q,n]),T=Ge=>E.scalingValue(Ge,n??!1),w=((t==null?void 0:t.length)??0)>0,V=n?!!i:!0,z=w&&(V||!!n),U=Math.max(0,d)*ay,M=V&&p==="on",[f,K]=s.useState(!1),G=V?M&&f?"paused":"running":"paused",ge=G==="running"&&U>0&&c>0,k=c>0&&U>0?c/U*1e3:0,ce=s.useRef(null),I=s.useRef(null),ue=s.useRef(null),ee=s.useRef(null),xe=s.useRef(null),Le=s.useRef(null),se=s.useRef(ge),de=s.useRef(null),Z=s.useRef(null),pe=s.useRef(C),ie=s.useRef($);se.current=ge,pe.current=C,ie.current=$;const[me,ve]=s.useState(0),[Ee,Re]=s.useState(0),[Ce,$e]=s.useState(0),[m,Y]=s.useState(0),[te,oe]=s.useState(0),fe=s.useMemo(()=>(t??[]).map(Ge=>{var We;return`${Ge.text}\0${((We=Ge.image)==null?void 0:We.assetId)??""}\0${Ge.link??""}`}).join("\0"),[t]),[N,F]=s.useState(ns),ne=s.useMemo(()=>{const Ge=t??[];return Ge.length===0||!(V||n)?Ge:my(Ge,N)},[t,V,N,n]),re=z?wc:1;s.useLayoutEffect(()=>{F(ns),l(0)},[fe]),s.useLayoutEffect(()=>{var He;const Ge=Le.current;if(!Ge)return;const We=()=>{const Xe=getComputedStyle(Ge),ct=parseFloat(Xe.fontSize)||0;if(ct<=0)return;const rt=hy();if(!rt){ve(ct*ua),Re(0);return}rt.font=`${Xe.fontStyle} ${Xe.fontWeight} ${ct}px ${Xe.fontFamily}`;const xt=rt.measureText("H"),pt=xt.actualBoundingBoxAscent>0?xt.actualBoundingBoxAscent:ct*ua,It=Math.max(0,xt.actualBoundingBoxDescent||0),nt=xt.fontBoundingBoxAscent||0,bt=xt.fontBoundingBoxDescent||0;ve(Ut=>Math.abs(Ut-pt)>.5?pt:Ut);const Lt=nt>0||bt>0?(bt-It-(nt-pt))/2:0;Re(Ut=>Math.abs(Ut-Lt)>.25?Lt:Ut)};We();const Ne=typeof document<"u"?document.fonts:void 0;(He=Ne==null?void 0:Ne.ready)==null||He.then(We).catch(()=>{});const be=new ResizeObserver(We);return be.observe(Ge),()=>be.disconnect()},[R.fontFamily,R.fontWeight,R.fontStyle,R.fontSize,R.lineHeight]),s.useLayoutEffect(()=>{if(!z)return;const Ge=ce.current,We=ee.current;if(!Ge||!We)return;const Ne={id:0},be=()=>{const rt=Ge.offsetWidth||Ge.getBoundingClientRect().width,xt=We.offsetWidth||We.getBoundingClientRect().width;if(w&&rt>0&&xt>0){const pt=xt/N;if(pt>0){let It=rt,nt=sy;if(O){const Lt=rt*pe.current,Ut=ie.current,Ft=Ut>0?2*Math.PI*Ut/rt:0,Me=xy(Lt,Ft);It=Math.max(rt,Me*rt/(wc-1)),nt=ly}const bt=Math.min(nt,Math.max(ns,Math.ceil(It/pt)+1));if(bt!==N){F(bt);return}}}xt>0&&l(xt)},He=()=>{cancelAnimationFrame(Ne.id),Ne.id=requestAnimationFrame(be)};He();const Xe=new ResizeObserver(He);Xe.observe(Ge),Xe.observe(We);const ct=()=>{document.hidden||He()};return document.addEventListener("visibilitychange",ct),window.addEventListener("pageshow",ct),window.addEventListener("focus",ct),()=>{cancelAnimationFrame(Ne.id),Xe.disconnect(),document.removeEventListener("visibilitychange",ct),window.removeEventListener("pageshow",ct),window.removeEventListener("focus",ct)}},[z,fe,N,w,me,O,C,$]),s.useLayoutEffect(()=>{const Ge=xe.current;if(!Ge)return;const We={id:0},Ne=()=>{const He=Ge.offsetHeight;He>0&&oe(Xe=>Math.abs(Xe-He)>.5?He:Xe)};We.id=requestAnimationFrame(Ne);const be=new ResizeObserver(()=>{cancelAnimationFrame(We.id),We.id=requestAnimationFrame(Ne)});return be.observe(Ge),()=>{cancelAnimationFrame(We.id),be.disconnect()}},[H,n]),s.useLayoutEffect(()=>{if(!O){$e(0),Y(0);return}const Ge=ce.current,We=ee.current;if(!Ge||!We)return;const Ne={id:0},be=()=>{const Xe=Ge.offsetWidth,ct=We.offsetHeight;Xe>0&&Y(rt=>Math.abs(rt-Xe)>.5?Xe:rt),ct>0&&$e(rt=>Math.abs(rt-ct)>.5?ct:rt)};Ne.id=requestAnimationFrame(be);const He=new ResizeObserver(()=>{cancelAnimationFrame(Ne.id),Ne.id=requestAnimationFrame(be)});return He.observe(Ge),He.observe(We),()=>{cancelAnimationFrame(Ne.id),He.disconnect()}},[O,fe,me,_,z]),s.useLayoutEffect(()=>{if(!z||c<=0)return;const Ge=ue.current;Ge&&gy(Ge)},[z,c,u,U]),s.useLayoutEffect(()=>{if(!O||!w)return;const Ge=ce.current;if(!Ge)return;const We={raf:0,cancelled:!1,lut:null,lutKey:"",itemsCache:[],cacheDirty:!0},Ne=()=>{for(const pt of We.itemsCache)for(const It of pt.glyphs)$c(It.inner)},be=()=>{const pt=I.current??Ge;We.itemsCache=Array.from(Ge.querySelectorAll("[data-marquee-text-item]"),It=>{const nt=[];return It.querySelectorAll("[data-marquee-wave-node]").forEach(bt=>{const Lt=bt.firstElementChild;Lt&&nt.push({inner:Lt,layoutLocalX:vy(bt,pt)})}),{item:It,glyphs:nt}}),We.cacheDirty=!1},He=()=>{We.cacheDirty&&be();const It=(I.current??Ge).offsetWidth||1,nt=It*pe.current,bt=ie.current,Lt=2*Math.PI*bt/It,Ut=`${It}|${nt}|${Lt}`;if(Ut!==We.lutKey&&(We.lutKey=Ut,We.lut=ep(nt,Lt,Ju)),Math.abs(nt)<=0||Lt<=0){Ne();return}const Ft=ue.current,Me=Ft?yy(getComputedStyle(Ft).transform):0,Oe=Ge.getBoundingClientRect(),St=Oe.left,Mt=Oe.right,Qe=We.lut&&We.lut.wavelength>0?Math.max(0,(We.lut.periodArc/We.lut.wavelength-1)*It):0;for(const{item:kt,glyphs:Bt}of We.itemsCache){const Wt=kt.getBoundingClientRect();if(Wt.right<St||Wt.left>Mt+Qe){for(const At of Bt)$c(At.inner);continue}for(const At of Bt){const Ae=At.layoutLocalX+Me,ft=We.lut?by(We.lut,Ae):Ae,gt=Lt*ft,dt=nt*Math.sin(gt),yt=nt*Lt*Math.cos(gt),ut=Math.atan(yt)*(180/Math.PI);fy(At.inner,ft-Ae,dt,ut)}}},Xe=()=>{We.cancelled||(We.raf=0,He(),se.current&&!document.hidden&&(We.raf=requestAnimationFrame(Xe)))},ct=()=>{We.cancelled||We.raf||(We.raf=requestAnimationFrame(Xe))},rt=()=>{We.cacheDirty=!0,He(),ct()};de.current=ct,Z.current=rt,He(),ct();const xt=()=>{if(document.hidden){cancelAnimationFrame(We.raf),We.raf=0;return}cancelAnimationFrame(We.raf),We.raf=0,rt()};return document.addEventListener("visibilitychange",xt),window.addEventListener("pageshow",xt),window.addEventListener("focus",xt),()=>{We.cancelled=!0,de.current=null,Z.current=null,cancelAnimationFrame(We.raf),document.removeEventListener("visibilitychange",xt),window.removeEventListener("pageshow",xt),window.removeEventListener("focus",xt),Ne()}},[O,w]),s.useLayoutEffect(()=>{var Ge;!O||!w||(Ge=Z.current)==null||Ge.call(Z)},[O,w,r,fe,N,me,C,$,m]),s.useLayoutEffect(()=>{var Ge;(Ge=de.current)==null||Ge.call(de)},[ge,u]);const J=Ge=>{M&&Ge.pointerType==="mouse"&&K(!0)},W=()=>{M&&K(!1)},Se=O?Math.abs(C)*100:0,le=T(H),j={minHeight:le,...O?{paddingTop:`${Se}%`,paddingBottom:`${Se}%`}:{}},Te={height:le,...O?{visibility:"hidden"}:{backgroundColor:X}},Fe={gap:T(y),minHeight:le},Ye=m*C,De=Math.abs(Ye),ze=te>0?te:Ce,Ze=Math.max(Ce,ze),Ue=De+Ze/2,ye=Math.max(ze,1),_e=O&&m>0&&Ze>0?Sy(m,Ye,$,Ue,ye):"",Ve=De*2+Ze,Je=_e?a.jsx("svg",{className:`${o}-curve-bg`,viewBox:`0 0 ${m} ${Ve}`,preserveAspectRatio:"none","aria-hidden":!0,children:a.jsx("path",{d:_e,fill:"none",stroke:X,strokeWidth:ze,strokeLinecap:"butt",strokeLinejoin:"round"})}):null,et=a.jsx("div",{ref:xe,className:`${o}-ribbon`,style:Te,"aria-hidden":!0}),ot={...R,lineHeight:me>0?`${me}px`:`${ua}em`},lt=(Ge,We,Ne)=>a.jsx(wy,{item:Ge,prefix:o,textCss:ot,capHeightPx:me,opticalOffsetY:Ee,imageGapPx:T(y),isCurve:O},`${We}-${Ne}`),Ke=a.jsx("span",{ref:Le,"aria-hidden":!0,className:`${o}-cap-ref`,style:R,children:"H"}),ht=`${Math.max(0,k)/1e3}s`,tt=z?a.jsx("div",{ref:ue,className:`${o}-marquee-track`,"data-direction":u,onPointerEnter:J,onPointerLeave:W,style:{WebkitAnimationDuration:ht,animationDuration:ht,WebkitAnimationPlayState:G,animationPlayState:G},children:Array.from({length:re},(Ge,We)=>a.jsx("div",{ref:We===0?ee:void 0,className:`${o}-marquee-set`,style:{...Fe,paddingRight:T(y)},"aria-hidden":We>0,children:ne.map((Ne,be)=>lt(Ne,We,be))},`set-${We}`))}):a.jsx("div",{ref:ee,className:Et(`${o}-marquee-set`,`${o}-marquee-static`),style:Fe,children:t==null?void 0:t.map((Ge,We)=>lt(Ge,0,We))});return a.jsxs("div",{ref:ce,className:`${o}-wrapper`,"aria-label":"Marquee text",children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Q}}),Ke,a.jsxs("div",{ref:I,className:`${o}-marquee-wrapper`,style:j,children:[et,Je,tt]})]})},Cy=`import { useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type PointerEvent as ReactPointerEvent } from 'react';
2636
2636
  import cn from 'classnames';
2637
2637
  import { CommonComponentProps } from '../props';
2638
2638
  import { scalingValue } from '../utils/scalingValue';
@@ -3656,7 +3656,7 @@ type MarqueeTextProps = {
3656
3656
  pointer-events: auto;
3657
3657
  z-index: 10;
3658
3658
  }
3659
- `}const My=30,Cc=2,Ry=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},Ey=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=E.useScopedStyles(),{align:l,speed:c,direction:d,pauseOnHover:u,gap:p,cardWidth:y,corners:x,stroke:g,strokeColor:f,bgColor:b,padding:S,logoMarginTop:W,logoWidth:v,logoHeight:L,captionMarginTop:M}=e,U=!!o,G=((t==null?void 0:t.length)??0)>0,B=c>0&&(!n||i),N=G&&(B||n),O=Math.max(0,c)*My,C=H=>E.scalingValue(H,n??!1),$=s.useRef(null),K=s.useRef(null),R=s.useRef(null),[w,T]=s.useState(0),[j,_]=s.useState(0),Q=j>0?j:0,P=s.useMemo(()=>Py(r,Q),[r,Q]),[h,J]=s.useState(0),V=B&&u==="on",[me,k]=s.useState(!1),le=s.useRef(null),[I,ue]=s.useState(0),[ee,xe]=s.useState(0),Le=s.useRef(null),ce=H=>{var q,ie,z,$e,re;return{fontSettings:{fontFamily:(e==null?void 0:e[`${H}FontFamily`])??"Arial",fontWeight:((q=e==null?void 0:e[`${H}FontSettings`])==null?void 0:q.fontWeight)??400,fontStyle:((ie=e==null?void 0:e[`${H}FontSettings`])==null?void 0:ie.fontStyle)??"normal"},textAppearance:{textTransform:((z=e==null?void 0:e[`${H}TextAppearance`])==null?void 0:z.textTransform)??"none",textDecoration:(($e=e==null?void 0:e[`${H}TextAppearance`])==null?void 0:$e.textDecoration)??"none",fontVariant:((re=e==null?void 0:e[`${H}TextAppearance`])==null?void 0:re.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${H}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${H}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${H}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${H}LineHeight`])??.01,color:(e==null?void 0:e[`${H}Color`])??"#000000"}},de=ce("text"),Z=ce("caption"),pe=s.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(H=>{var ne,q;return(((ne=H.text)==null?void 0:ne.length)??0)>0||(((q=H.caption)==null?void 0:q.length)??0)>0}),[t]),oe=s.useMemo(()=>!N||(t==null?void 0:t.length)===0?1:j<=0||w<=0?Cc:Math.max(Cc,Math.ceil(w/j)+1),[N,t==null?void 0:t.length,j,w]);s.useLayoutEffect(()=>{if(!N)return;const H=$.current,ne=R.current;if(!H||!ne)return;let q=0;const ie=()=>{const re=H.getBoundingClientRect().width,X=ne.getBoundingClientRect().width,Ce=Le.current,He=typeof Ce=="number"&&Math.abs(Ce-X)<=.25;if(Le.current=X,T(re),typeof X=="number"&&X>0&&j<=0){_(X);return}He&&X!==j?_(X):!He&&j<=0&&(cancelAnimationFrame(q),q=requestAnimationFrame(ie))},z=()=>{cancelAnimationFrame(q),q=requestAnimationFrame(ie)};z();const $e=new ResizeObserver(z);return $e.observe(H),$e.observe(ne),()=>{cancelAnimationFrame(q),$e.disconnect()}},[B,N,j]);const ge=Q>0&&O>0?Q/O*1e3:0,be=`${Math.max(0,ge)/1e3}s`;s.useLayoutEffect(()=>{if(!N||Q<=0)return;const H=K.current;H&&Ry(H)},[N,Q,d]),s.useLayoutEffect(()=>{if(!N){J(0);return}const H=R.current,ne=K.current;if(!H||!ne)return;const q=()=>{let z=0;for(let $e=0;$e<H.children.length;$e++){const X=H.children[$e].firstElementChild;X&&(z=Math.max(z,X.offsetHeight))}z<=0&&(z=ne.offsetHeight),J(z>0?z:0)};q();const ie=new ResizeObserver(q);return ie.observe(H),ie.observe(ne),()=>{ie.disconnect()}},[N,oe,t,n,p,y,S,g,x,v,L,I,ee]);const Re=()=>{V&&k(!0)},Ee=()=>{V&&k(!1)},Te=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),we=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]),m=s.useCallback((H,ne,q,ie)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:Te,width:"100%"},children:[a.jsx("div",{"data-controls":U?ie==null?void 0:ie.controlsName:void 0,"data-controls-axis":U?"y":void 0,className:U?`${r}-control`:void 0,style:{height:C((ie==null?void 0:ie.marginTop)??0)}}),a.jsx("div",{...ie!=null&&ie.dataMeasureKind?{"data-testimonial-measure":ie.dataMeasureKind}:{},style:{...nn(H,n),textAlign:we,pointerEvents:"auto",...typeof(ie==null?void 0:ie.minHeightPx)=="number"&&ie.minHeightPx>0?{minHeight:ie.minHeightPx}:{}},children:a.jsx(Zi,{content:ne})})]},q),[Te,we,n,U,r,C]),Y=s.useCallback((H,ne,q)=>{var ie,z,$e;return a.jsxs("div",{style:{padding:`${C(S.top)} ${C(S.right)} ${C(S.bottom)} ${C(S.left)}`,width:C(y+g*2),height:"100%",borderRadius:C(x),border:`${C(g)} solid ${f}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${r}-cover`,style:{background:b}}),a.jsxs("div",{className:`${r}-elements-overlay`,style:{alignItems:Te,textAlign:we},children:[H.text&&m(de,H.text,"text",q!=null&&q.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(q==null?void 0:q.textMinHeightPx)=="number"&&q.textMinHeightPx>0?{minHeightPx:q.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:Te,width:"100%"},children:[a.jsx("div",{"data-controls":U&&!(q!=null&&q.dataMeasureAttrs)?"logoMarginTop":void 0,className:U&&!(q!=null&&q.dataMeasureAttrs)?`${r}-control`:void 0,style:{height:C(W)}}),a.jsx("div",{style:{width:C(v),height:C(L)},children:((ie=H.logo)==null?void 0:ie.assetId)&&a.jsx("img",{src:H.logo.assetId,alt:((z=H.logo)==null?void 0:z.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:(($e=H.logo)==null?void 0:$e.objectFit)||"contain"}})})]}),H.caption&&m(Z,H.caption,"caption",{...q!=null&&q.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:M,...q!=null&&q.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(q==null?void 0:q.captionMinHeightPx)=="number"&&q.captionMinHeightPx>0?{minHeightPx:q.captionMinHeightPx}:{}})]})]},ne)},[b,M,Z,y,x,L,W,v,Te,we,S.bottom,S.left,S.right,S.top,m,g,f,de,n,U,r]),te=s.useCallback(H=>{ue(H.maxTextPx),xe(H.maxCaptionPx)},[]);s.useLayoutEffect(()=>{if(!pe){te({maxTextPx:0,maxCaptionPx:0});return}const H=le.current;if(!H)return;const ne=()=>{E.readTestimonialTextMeasure(H,te)};ne();const q=new ResizeObserver(ne);return q.observe(H),()=>{q.disconnect()}},[pe,te,t,Y]);const ae=pe?{textMinHeightPx:I,captionMinHeightPx:ee}:void 0,fe=pe?a.jsx("div",{ref:le,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((H,ne)=>Y(H,`measure-${ne}`,{dataMeasureAttrs:!0}))}):null,F=(H,ne)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Y(H,`card-${ne}`,ae),U&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${C(p)})`,width:C(p),height:"100%",pointerEvents:"auto",zIndex:2}})]},ne);if(N){const H=B?V&&me?"paused":"running":"paused";return a.jsxs("div",{ref:$,className:Et(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...h>0?{height:h}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:P}}),fe,a.jsx("div",{ref:K,className:`${r}-marquee-track`,"data-direction":d,onMouseEnter:Re,onMouseLeave:Ee,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:be,WebkitAnimationDuration:be,animationPlayState:H,WebkitAnimationPlayState:H},children:Array.from({length:oe},(ne,q)=>a.jsx("div",{ref:q===0?R:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:C(p),paddingRight:C(p)},"aria-hidden":q>0,children:t==null?void 0:t.map((ie,z)=>F(ie,`${q}-${z}`))},`set-${q}`))})]})}return a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:P}}),fe,a.jsx("div",{style:{gap:C(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((H,ne)=>F(H,ne))})]})},ky=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
3659
+ `}const My=30,Cc=2,Ry=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},Ey=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=E.useScopedStyles(),{align:l,speed:c,direction:d,pauseOnHover:u,gap:p,cardWidth:y,corners:x,stroke:g,strokeColor:h,bgColor:b,padding:S,logoMarginTop:_,logoWidth:v,logoHeight:L,captionMarginTop:P}=e,q=!!o,X=((t==null?void 0:t.length)??0)>0,B=c>0&&(!n||i),H=X&&(B||n),O=Math.max(0,c)*My,C=F=>E.scalingValue(F,n??!1),$=s.useRef(null),Q=s.useRef(null),R=s.useRef(null),[T,w]=s.useState(0),[V,z]=s.useState(0),U=V>0?V:0,M=s.useMemo(()=>Py(r,U),[r,U]),[f,K]=s.useState(0),G=B&&u==="on",[ge,k]=s.useState(!1),ce=s.useRef(null),[I,ue]=s.useState(0),[ee,xe]=s.useState(0),Le=s.useRef(null),se=F=>{var re,J,W,Se,le;return{fontSettings:{fontFamily:(e==null?void 0:e[`${F}FontFamily`])??"Arial",fontWeight:((re=e==null?void 0:e[`${F}FontSettings`])==null?void 0:re.fontWeight)??400,fontStyle:((J=e==null?void 0:e[`${F}FontSettings`])==null?void 0:J.fontStyle)??"normal"},textAppearance:{textTransform:((W=e==null?void 0:e[`${F}TextAppearance`])==null?void 0:W.textTransform)??"none",textDecoration:((Se=e==null?void 0:e[`${F}TextAppearance`])==null?void 0:Se.textDecoration)??"none",fontVariant:((le=e==null?void 0:e[`${F}TextAppearance`])==null?void 0:le.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${F}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${F}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${F}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${F}LineHeight`])??.01,color:(e==null?void 0:e[`${F}Color`])??"#000000"}},de=se("text"),Z=se("caption"),pe=s.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(F=>{var ne,re;return(((ne=F.text)==null?void 0:ne.length)??0)>0||(((re=F.caption)==null?void 0:re.length)??0)>0}),[t]),ie=s.useMemo(()=>!H||(t==null?void 0:t.length)===0?1:V<=0||T<=0?Cc:Math.max(Cc,Math.ceil(T/V)+1),[H,t==null?void 0:t.length,V,T]);s.useLayoutEffect(()=>{if(!H)return;const F=$.current,ne=R.current;if(!F||!ne)return;let re=0;const J=()=>{const le=F.getBoundingClientRect().width,j=ne.getBoundingClientRect().width,Te=Le.current,Fe=typeof Te=="number"&&Math.abs(Te-j)<=.25;if(Le.current=j,w(le),typeof j=="number"&&j>0&&V<=0){z(j);return}Fe&&j!==V?z(j):!Fe&&V<=0&&(cancelAnimationFrame(re),re=requestAnimationFrame(J))},W=()=>{cancelAnimationFrame(re),re=requestAnimationFrame(J)};W();const Se=new ResizeObserver(W);return Se.observe(F),Se.observe(ne),()=>{cancelAnimationFrame(re),Se.disconnect()}},[B,H,V]);const me=U>0&&O>0?U/O*1e3:0,ve=`${Math.max(0,me)/1e3}s`;s.useLayoutEffect(()=>{if(!H||U<=0)return;const F=Q.current;F&&Ry(F)},[H,U,d]),s.useLayoutEffect(()=>{if(!H){K(0);return}const F=R.current,ne=Q.current;if(!F||!ne)return;const re=()=>{let W=0;for(let Se=0;Se<F.children.length;Se++){const j=F.children[Se].firstElementChild;j&&(W=Math.max(W,j.offsetHeight))}W<=0&&(W=ne.offsetHeight),K(W>0?W:0)};re();const J=new ResizeObserver(re);return J.observe(F),J.observe(ne),()=>{J.disconnect()}},[H,ie,t,n,p,y,S,g,x,v,L,I,ee]);const Ee=()=>{G&&k(!0)},Re=()=>{G&&k(!1)},Ce=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),$e=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]),m=s.useCallback((F,ne,re,J)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:Ce,width:"100%"},children:[a.jsx("div",{"data-controls":q?J==null?void 0:J.controlsName:void 0,"data-controls-axis":q?"y":void 0,className:q?`${r}-control`:void 0,style:{height:C((J==null?void 0:J.marginTop)??0)}}),a.jsx("div",{...J!=null&&J.dataMeasureKind?{"data-testimonial-measure":J.dataMeasureKind}:{},style:{...nn(F,n),textAlign:$e,pointerEvents:"auto",...typeof(J==null?void 0:J.minHeightPx)=="number"&&J.minHeightPx>0?{minHeight:J.minHeightPx}:{}},children:a.jsx(Zi,{content:ne})})]},re),[Ce,$e,n,q,r,C]),Y=s.useCallback((F,ne,re)=>{var J,W,Se;return a.jsxs("div",{style:{padding:`${C(S.top)} ${C(S.right)} ${C(S.bottom)} ${C(S.left)}`,width:C(y+g*2),height:"100%",borderRadius:C(x),border:`${C(g)} solid ${h}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${r}-cover`,style:{background:b}}),a.jsxs("div",{className:`${r}-elements-overlay`,style:{alignItems:Ce,textAlign:$e},children:[F.text&&m(de,F.text,"text",re!=null&&re.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(re==null?void 0:re.textMinHeightPx)=="number"&&re.textMinHeightPx>0?{minHeightPx:re.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:Ce,width:"100%"},children:[a.jsx("div",{"data-controls":q&&!(re!=null&&re.dataMeasureAttrs)?"logoMarginTop":void 0,className:q&&!(re!=null&&re.dataMeasureAttrs)?`${r}-control`:void 0,style:{height:C(_)}}),a.jsx("div",{style:{width:C(v),height:C(L)},children:((J=F.logo)==null?void 0:J.assetId)&&a.jsx("img",{src:F.logo.assetId,alt:((W=F.logo)==null?void 0:W.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Se=F.logo)==null?void 0:Se.objectFit)||"contain"}})})]}),F.caption&&m(Z,F.caption,"caption",{...re!=null&&re.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:P,...re!=null&&re.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(re==null?void 0:re.captionMinHeightPx)=="number"&&re.captionMinHeightPx>0?{minHeightPx:re.captionMinHeightPx}:{}})]})]},ne)},[b,P,Z,y,x,L,_,v,Ce,$e,S.bottom,S.left,S.right,S.top,m,g,h,de,n,q,r]),te=s.useCallback(F=>{ue(F.maxTextPx),xe(F.maxCaptionPx)},[]);s.useLayoutEffect(()=>{if(!pe){te({maxTextPx:0,maxCaptionPx:0});return}const F=ce.current;if(!F)return;const ne=()=>{E.readTestimonialTextMeasure(F,te)};ne();const re=new ResizeObserver(ne);return re.observe(F),()=>{re.disconnect()}},[pe,te,t,Y]);const oe=pe?{textMinHeightPx:I,captionMinHeightPx:ee}:void 0,fe=pe?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((F,ne)=>Y(F,`measure-${ne}`,{dataMeasureAttrs:!0}))}):null,N=(F,ne)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Y(F,`card-${ne}`,oe),q&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${C(p)})`,width:C(p),height:"100%",pointerEvents:"auto",zIndex:2}})]},ne);if(H){const F=B?G&&ge?"paused":"running":"paused";return a.jsxs("div",{ref:$,className:Et(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...f>0?{height:f}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:M}}),fe,a.jsx("div",{ref:Q,className:`${r}-marquee-track`,"data-direction":d,onMouseEnter:Ee,onMouseLeave:Re,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:ve,WebkitAnimationDuration:ve,animationPlayState:F,WebkitAnimationPlayState:F},children:Array.from({length:ie},(ne,re)=>a.jsx("div",{ref:re===0?R:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:C(p),paddingRight:C(p)},"aria-hidden":re>0,children:t==null?void 0:t.map((J,W)=>N(J,`${re}-${W}`))},`set-${re}`))})]})}return a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:M}}),fe,a.jsx("div",{style:{gap:C(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((F,ne)=>N(F,ne))})]})},ky=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
3660
3660
  import cn from 'classnames';
3661
3661
  import { CommonComponentProps } from '../props';
3662
3662
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -4411,7 +4411,7 @@ type TestimonialsSettings = {
4411
4411
  width: 100%;
4412
4412
  height: 100%;
4413
4413
  }
4414
- `}const _y=3e3,Hy=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=E.useScopedStyles(),l=t||[],{speed:c,align:d,width:u,imageMarginTop:p,textMarginTop:y,captionMarginTop:x,imageWidth:g,imageHeight:f,controlsWidth:b,controlsColor:S,controlsHoverColor:W}=e,v=c>0&&(!n||!!i),[L,M]=s.useState(0),[U,G]=s.useState(null),[B,N]=s.useState(!1),O=s.useRef(null),C=s.useMemo(()=>{switch(d){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[d]),$=s.useMemo(()=>{switch(d){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[d]);s.useEffect(()=>{M(0),G(null),N(!1)},[l.length]);const K=l[L],R=U===null?null:l[U],w=ce=>{var Z,pe,oe,ge,be;return{fontSettings:{fontFamily:(e==null?void 0:e[`${ce}FontFamily`])??"Arial",fontWeight:((Z=e==null?void 0:e[`${ce}FontSettings`])==null?void 0:Z.fontWeight)??400,fontStyle:((pe=e==null?void 0:e[`${ce}FontSettings`])==null?void 0:pe.fontStyle)??"normal"},textAppearance:{textTransform:((oe=e==null?void 0:e[`${ce}TextAppearance`])==null?void 0:oe.textTransform)??"none",textDecoration:((ge=e==null?void 0:e[`${ce}TextAppearance`])==null?void 0:ge.textDecoration)??"none",fontVariant:((be=e==null?void 0:e[`${ce}TextAppearance`])==null?void 0:be.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${ce}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${ce}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${ce}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${ce}WordSpacing`])??0,color:(e==null?void 0:e[`${ce}Color`])??"#000000"}},T=w("text"),j=w("caption"),_=l.length>1&&l.some(ce=>{var de,Z;return(((de=ce.text)==null?void 0:de.length)??0)>0||(((Z=ce.caption)==null?void 0:Z.length)??0)>0}),Q=s.useRef(null),[P,h]=s.useState(0),[J,V]=s.useState(0),me=e.controls??{mode:"Off",icon:null},k=l.length>1,le=s.useCallback((ce,de)=>!k||de===ce?ce:(O.current&&window.clearTimeout(O.current),G(ce),N(!0),O.current=window.setTimeout(()=>{G(null),N(!1),O.current=null},300),de),[k]),I=s.useCallback(()=>{k&&M(ce=>le(ce,(ce-1+l.length)%l.length))},[k,le,l.length]),ue=s.useCallback(()=>{k&&M(ce=>le(ce,(ce+1)%l.length))},[k,le,l.length]);s.useEffect(()=>{if(!v||!k)return;const ce=Math.max(300,_y/c),de=window.setInterval(()=>{M(Z=>le(Z,(Z+1)%l.length))},ce);return()=>{window.clearInterval(de)}},[v,k,le,l.length,c]),s.useEffect(()=>()=>{O.current&&window.clearTimeout(O.current)},[]);const ee=(ce,de)=>{var be,Re,Ee,Te;const Z=de==null?void 0:de.textMinHeightPx,pe=de==null?void 0:de.captionMinHeightPx,oe=de==null?void 0:de.dataMeasureAttrs,ge=o&&!(de!=null&&de.dataMeasureAttrs)&&!(de!=null&&de.hideControls);return a.jsxs(a.Fragment,{children:[ce.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:C,width:"100%"},children:[a.jsx("div",{"data-controls":ge?"textMarginTop":void 0,className:ge?`${r}-control`:void 0,style:{height:E.scalingValue(y??0,n??!1)}}),a.jsx("div",{...oe&&{"data-testimonial-measure":"text"},style:{...nn(T,n),...Z&&Z>0?{minHeight:Z}:{},textAlign:$,pointerEvents:"auto"},children:a.jsx(Zi,{content:ce.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:C,width:"100%"},children:[a.jsx("div",{"data-controls":ge?"imageMarginTop":void 0,className:ge?`${r}-control`:void 0,style:{height:E.scalingValue(p??0,n??!1)}}),a.jsx("div",{style:{width:E.scalingValue(g??0,n??!1),height:E.scalingValue(f??0,n??!1)},children:((be=ce.image)==null?void 0:be.assetId)&&a.jsx("img",{src:(Re=ce.image)==null?void 0:Re.assetId,alt:((Ee=ce.image)==null?void 0:Ee.name)??"",className:`${r}-icon`,style:{objectFit:((Te=ce.image)==null?void 0:Te.objectFit)||"contain"}})})]}),ce.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:C,width:"100%"},children:[a.jsx("div",{"data-controls":ge?"captionMarginTop":void 0,className:ge?`${r}-control`:void 0,style:{height:E.scalingValue(x??0,n??!1)}}),a.jsx("div",{...oe?{"data-testimonial-measure":"caption"}:{},style:{...nn(j,n),...pe&&pe>0?{minHeight:pe}:{},textAlign:$,pointerEvents:"auto"},children:a.jsx(Zi,{content:ce.caption})})]})]})},xe=s.useCallback(ce=>{h(ce.maxTextPx),V(ce.maxCaptionPx)},[]);if(s.useLayoutEffect(()=>{if(!_){xe({maxTextPx:0,maxCaptionPx:0});return}const ce=Q.current;if(!ce)return;const de=()=>{E.readTestimonialTextMeasure(ce,xe)};de();const Z=new ResizeObserver(de);return Z.observe(ce),()=>{Z.disconnect()}},[_,xe,t]),!K)return a.jsx(a.Fragment,{});const Le=_?{textMinHeightPx:P,captionMinHeightPx:J}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${r}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Ny(r)}}),a.jsxs("div",{className:`${r}-wrapper`,style:{width:E.scalingValue(u??0,n??!1),alignItems:C},children:[_&&a.jsx("div",{ref:Q,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((ce,de)=>a.jsx("div",{style:{width:"100%"},children:ee(ce,{dataMeasureAttrs:!0})},de))}),a.jsxs("div",{className:`${r}-fade-stack`,children:[R&&B&&a.jsx("div",{className:Et(`${r}-fade-item-prev`,`${r}-fade-out`),children:ee(R,{...Le,hideControls:!0})}),a.jsx("div",{className:Et(`${r}-fade-item-current`,B?`${r}-fade-in`:void 0),children:ee(K,Le)})]})]}),me.mode==="On"&&a.jsxs("div",{className:`${r}-controls`,children:[a.jsx("div",{className:`${r}-arrow`,style:{width:E.scalingValue(b??.02,n??!1),height:E.scalingValue(b??.02,n??!1),"--arrow-hover-color":W},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:I,disabled:!k,"aria-label":"Previous testimonial",children:me.icon&&a.jsx(gn,{url:me.icon,fill:S,hoverFill:W,className:Et(`${r}-arrow-img`,`${r}-mirror`)})})}),a.jsx("div",{className:Et(`${r}-arrow`,`${r}-next-arrow`),style:{width:E.scalingValue(b??.02,n??!1),height:E.scalingValue(b??.02,n??!1),"--arrow-hover-color":W},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:ue,disabled:!k,"aria-label":"Next testimonial",children:me.icon&&a.jsx(gn,{url:me.icon,fill:S,hoverFill:W,className:`${r}-arrow-img`})})})]})]})})},Wy=`import cn from 'classnames';
4414
+ `}const _y=3e3,Hy=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=E.useScopedStyles(),l=t||[],{speed:c,align:d,width:u,imageMarginTop:p,textMarginTop:y,captionMarginTop:x,imageWidth:g,imageHeight:h,controlsWidth:b,controlsColor:S,controlsHoverColor:_}=e,v=c>0&&(!n||!!i),[L,P]=s.useState(0),[q,X]=s.useState(null),[B,H]=s.useState(!1),O=s.useRef(null),C=s.useMemo(()=>{switch(d){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[d]),$=s.useMemo(()=>{switch(d){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[d]);s.useEffect(()=>{P(0),X(null),H(!1)},[l.length]);const Q=l[L],R=q===null?null:l[q],T=se=>{var Z,pe,ie,me,ve;return{fontSettings:{fontFamily:(e==null?void 0:e[`${se}FontFamily`])??"Arial",fontWeight:((Z=e==null?void 0:e[`${se}FontSettings`])==null?void 0:Z.fontWeight)??400,fontStyle:((pe=e==null?void 0:e[`${se}FontSettings`])==null?void 0:pe.fontStyle)??"normal"},textAppearance:{textTransform:((ie=e==null?void 0:e[`${se}TextAppearance`])==null?void 0:ie.textTransform)??"none",textDecoration:((me=e==null?void 0:e[`${se}TextAppearance`])==null?void 0:me.textDecoration)??"none",fontVariant:((ve=e==null?void 0:e[`${se}TextAppearance`])==null?void 0:ve.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${se}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${se}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${se}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${se}WordSpacing`])??0,color:(e==null?void 0:e[`${se}Color`])??"#000000"}},w=T("text"),V=T("caption"),z=l.length>1&&l.some(se=>{var de,Z;return(((de=se.text)==null?void 0:de.length)??0)>0||(((Z=se.caption)==null?void 0:Z.length)??0)>0}),U=s.useRef(null),[M,f]=s.useState(0),[K,G]=s.useState(0),ge=e.controls??{mode:"Off",icon:null},k=l.length>1,ce=s.useCallback((se,de)=>!k||de===se?se:(O.current&&window.clearTimeout(O.current),X(se),H(!0),O.current=window.setTimeout(()=>{X(null),H(!1),O.current=null},300),de),[k]),I=s.useCallback(()=>{k&&P(se=>ce(se,(se-1+l.length)%l.length))},[k,ce,l.length]),ue=s.useCallback(()=>{k&&P(se=>ce(se,(se+1)%l.length))},[k,ce,l.length]);s.useEffect(()=>{if(!v||!k)return;const se=Math.max(300,_y/c),de=window.setInterval(()=>{P(Z=>ce(Z,(Z+1)%l.length))},se);return()=>{window.clearInterval(de)}},[v,k,ce,l.length,c]),s.useEffect(()=>()=>{O.current&&window.clearTimeout(O.current)},[]);const ee=(se,de)=>{var ve,Ee,Re,Ce;const Z=de==null?void 0:de.textMinHeightPx,pe=de==null?void 0:de.captionMinHeightPx,ie=de==null?void 0:de.dataMeasureAttrs,me=o&&!(de!=null&&de.dataMeasureAttrs)&&!(de!=null&&de.hideControls);return a.jsxs(a.Fragment,{children:[se.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:C,width:"100%"},children:[a.jsx("div",{"data-controls":me?"textMarginTop":void 0,className:me?`${r}-control`:void 0,style:{height:E.scalingValue(y??0,n??!1)}}),a.jsx("div",{...ie&&{"data-testimonial-measure":"text"},style:{...nn(w,n),...Z&&Z>0?{minHeight:Z}:{},textAlign:$,pointerEvents:"auto"},children:a.jsx(Zi,{content:se.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:C,width:"100%"},children:[a.jsx("div",{"data-controls":me?"imageMarginTop":void 0,className:me?`${r}-control`:void 0,style:{height:E.scalingValue(p??0,n??!1)}}),a.jsx("div",{style:{width:E.scalingValue(g??0,n??!1),height:E.scalingValue(h??0,n??!1)},children:((ve=se.image)==null?void 0:ve.assetId)&&a.jsx("img",{src:(Ee=se.image)==null?void 0:Ee.assetId,alt:((Re=se.image)==null?void 0:Re.name)??"",className:`${r}-icon`,style:{objectFit:((Ce=se.image)==null?void 0:Ce.objectFit)||"contain"}})})]}),se.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:C,width:"100%"},children:[a.jsx("div",{"data-controls":me?"captionMarginTop":void 0,className:me?`${r}-control`:void 0,style:{height:E.scalingValue(x??0,n??!1)}}),a.jsx("div",{...ie?{"data-testimonial-measure":"caption"}:{},style:{...nn(V,n),...pe&&pe>0?{minHeight:pe}:{},textAlign:$,pointerEvents:"auto"},children:a.jsx(Zi,{content:se.caption})})]})]})},xe=s.useCallback(se=>{f(se.maxTextPx),G(se.maxCaptionPx)},[]);if(s.useLayoutEffect(()=>{if(!z){xe({maxTextPx:0,maxCaptionPx:0});return}const se=U.current;if(!se)return;const de=()=>{E.readTestimonialTextMeasure(se,xe)};de();const Z=new ResizeObserver(de);return Z.observe(se),()=>{Z.disconnect()}},[z,xe,t]),!Q)return a.jsx(a.Fragment,{});const Le=z?{textMinHeightPx:M,captionMinHeightPx:K}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${r}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Ny(r)}}),a.jsxs("div",{className:`${r}-wrapper`,style:{width:E.scalingValue(u??0,n??!1),alignItems:C},children:[z&&a.jsx("div",{ref:U,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((se,de)=>a.jsx("div",{style:{width:"100%"},children:ee(se,{dataMeasureAttrs:!0})},de))}),a.jsxs("div",{className:`${r}-fade-stack`,children:[R&&B&&a.jsx("div",{className:Et(`${r}-fade-item-prev`,`${r}-fade-out`),children:ee(R,{...Le,hideControls:!0})}),a.jsx("div",{className:Et(`${r}-fade-item-current`,B?`${r}-fade-in`:void 0),children:ee(Q,Le)})]})]}),ge.mode==="On"&&a.jsxs("div",{className:`${r}-controls`,children:[a.jsx("div",{className:`${r}-arrow`,style:{width:E.scalingValue(b??.02,n??!1),height:E.scalingValue(b??.02,n??!1),"--arrow-hover-color":_},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:I,disabled:!k,"aria-label":"Previous testimonial",children:ge.icon&&a.jsx(gn,{url:ge.icon,fill:S,hoverFill:_,className:Et(`${r}-arrow-img`,`${r}-mirror`)})})}),a.jsx("div",{className:Et(`${r}-arrow`,`${r}-next-arrow`),style:{width:E.scalingValue(b??.02,n??!1),height:E.scalingValue(b??.02,n??!1),"--arrow-hover-color":_},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:ue,disabled:!k,"aria-label":"Next testimonial",children:ge.icon&&a.jsx(gn,{url:ge.icon,fill:S,hoverFill:_,className:`${r}-arrow-img`})})})]})]})})},Wy=`import cn from 'classnames';
4415
4415
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
4416
4416
  import { CommonComponentProps } from '../props';
4417
4417
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -5280,7 +5280,7 @@ type TestimonialsSettings = {
5280
5280
  left: 50%;
5281
5281
  transform: translate(-50%, -50%);
5282
5282
  }
5283
- `}function Vy(){return Math.random()<.5?"ltr":"ttb"}function Gy(e){const t=e.Components.Autoplay;t&&(t.pause(!1),t.play())}function Xy(e){const t=Vy();e.options.direction!==t&&(e.options={...e.options,direction:t}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Gy(e)})})}const Fn=500,Uy=750,hi="cubic-bezier(0.22, 1, 0.36, 1)",qy=72,Yy=50;function Ky(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function Qy(e){const[t,n]=e.media;return n!=null&&n.assetId?n:t!=null&&t.assetId?t:null}function Zy(e){const[t]=e.media;return t!=null&&t.assetId?t:null}function tp(e){return!Array.isArray(e)||e.length===0?[]:Ky(e)?e.flatMap(t=>{const n=Qy(t);if(!n)return[];const i=Zy(t);return[{displayMedia:n,lightboxMedia:i!=null&&i.assetId?i:null}]}):e.filter(t=>t==null?void 0:t.assetId).map(t=>({displayMedia:t,lightboxMedia:t}))}function Yi(e){return e.type==="video"}function Jy(e){const t=new Set,n=[];for(const i of e){const o=tp(i.gallery);for(const r of o){const l=r.lightboxMedia;l!=null&&l.assetId&&!t.has(l.assetId)&&(t.add(l.assetId),n.push(l))}}return n}function ev({mediaList:e}){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=>Yi(t)?a.jsx("video",{src:t.assetId,preload:"auto",muted:!0,playsInline:!0},t.assetId):a.jsx("img",{src:t.assetId,alt:""},t.assetId))})}function tv(e){e.pause(),e.removeAttribute("src"),e.load()}function Pc({media:e,className:t,style:n,onMediaClick:i}){return Yi(e)?a.jsx("video",{src:e.assetId,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):a.jsx("img",{src:e.assetId,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function Mc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function nv(e,t){if(!t||!t.width||!t.height||!e.width||!e.height)return e;const n=t.width/t.height,i=e.width/e.height;if(n>i){const r=e.width/n;return{width:e.width,height:r,left:e.left,top:e.top+(e.height-r)/2}}const o=e.height*n;return{width:o,height:e.height,left:e.left+(e.width-o)/2,top:e.top}}function iv({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l}){return s.useEffect(()=>{const c=n.current;if(c)return()=>{tv(c)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:r,onMouseMove:l,style:i})}const ov="https://cdn.cntrl.site/component-assets/defaultCloseIcon.svg",rv=.004;function av({prefix:e,closeIcon:t=ov,closeIconMaxWidth:n=.0125,closeIconColor:i="#FFFFFF",closeIconHoverColor:o="#999999",iconMarginRight:r=.01,contentMarginTop:l=.01,isEditor:c,isPreviewMode:d,isEditMode:u,visible:p,onClose:y}){if(!t)return null;const x=E.scalingValue(n,c),g=E.scalingValue(r,c),f=E.scalingValue(l,c),b=E.scalingValue(Math.max(l,rv),c);return a.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,zIndex:1e4,display:"flex",flexDirection:"column",alignItems:"flex-end",pointerEvents:"none",opacity:p?1:0,transition:"opacity 500ms cubic-bezier(0.22, 1, 0.36, 1)"},children:[a.jsx("div",{style:{position:"relative",width:"100%",height:f,flexShrink:0},children:u&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-min":"0",className:`${e}-control`,style:{position:"absolute",top:0,left:0,width:"100%",height:b,pointerEvents:p?"auto":"none"}})}),a.jsxs("div",{className:`${e}-close-icon`,style:{width:x,height:x,marginRight:g,pointerEvents:p?"auto":"none"},onClick:S=>S.stopPropagation(),children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,"aria-label":"Close",onClick:S=>{S.stopPropagation(),y()},children:a.jsx(gn,{url:t,fill:i,hoverFill:c&&!d?i:o,className:`${e}-close-icon-img`})}),u&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:g,height:"100%",pointerEvents:p?"auto":"none"}})]})]})}function sv({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,isPreviewMode:r,isEditMode:l,onClose:c,onPrev:d,onNext:u,counterClassName:p,counterStyle:y,closeIcon:x,closeIconMaxWidth:g,closeIconColor:f,closeIconHoverColor:b,iconMarginRight:S,contentMarginTop:W}){const v=i==="cover",L=s.useRef(null),M=s.useRef(null),U=s.useRef(null),G=s.useRef(null),B=s.useRef(0),N=s.useRef(0),O=s.useRef("none"),C=s.useRef(!1),$=s.useRef(!1),K=s.useRef(null),R=s.useRef(0),w=s.useRef(null),T=s.useRef(!1),j=s.useRef(null),_=s.useRef(null),Q=s.useRef(null),P=s.useRef(()=>{}),[h,J]=s.useState(null),[V,me]=s.useState(null),[k,le]=s.useState("opening"),[I,ue]=s.useState(0),[ee,xe]=s.useState(0),[Le,ce]=s.useState(null),[de,Z]=s.useState(!1),[pe,oe]=s.useState(!1),[ge,be]=s.useState(!1),[Re,Ee]=s.useState(null),Te=s.useRef(n),we=s.useRef(void 0),m=t[n],Y=m?Yi(m):!1,te=ee!==0||de,ae=Le!==null,fe=s.useCallback(Fe=>{const ve=Fe.currentTarget,_e=ve instanceof HTMLVideoElement?{width:ve.videoWidth,height:ve.videoHeight}:{width:ve.naturalWidth,height:ve.naturalHeight};!_e.width||!_e.height||Ee(_e)},[]);s.useEffect(()=>{K.current=V},[V]),s.useEffect(()=>{const Fe=L.current;if(!Fe)return;const ve=()=>me(Mc(Fe));ve();const _e=new ResizeObserver(ve);return _e.observe(Fe),()=>_e.disconnect()},[]);const F=s.useCallback(()=>{j.current!==null&&(window.clearTimeout(j.current),j.current=null)},[]),H=s.useCallback(()=>{const Fe=_.current;_.current=null,F(),w.current=null,T.current=!1,ce(null),Z(!1),xe(0),R.current=0,oe(!1),C.current=!1,N.current=0,O.current="none",Fe===1?u():Fe===-1&&d()},[F,u,d]),ne=s.useCallback(()=>{F(),_.current=null,w.current=null,T.current=!1,ce(null),Z(!1),xe(0),R.current=0},[F]),q=s.useCallback(()=>{F(),j.current=window.setTimeout(()=>{_.current!==null&&H()},Fn+32)},[F,H]),ie=s.useCallback((Fe,ve)=>{var Xe;const _e=((Xe=K.current)==null?void 0:Xe.width)??0;if(F(),w.current=Fe,ce(Fe),T.current=!0,Z(!0),ve){_.current=Fe;const ct=-Fe*_e;R.current=ct,xe(ct),q();return}R.current=0,xe(0),j.current=window.setTimeout(()=>{j.current=null,ne()},Fn+32)},[F,ne,q]),z=s.useCallback(Fe=>{if(!(t.length<=1)){if(T.current){if(_.current===Fe){Q.current=Fe,H();return}ne()}F(),w.current=Fe,ce(Fe),T.current=!1,Z(!1),R.current=0,xe(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{ie(Fe,!0)})})}},[t.length,ie,H,ne,F]);P.current=z;const $e=s.useCallback(Fe=>{Fe.propertyName!=="transform"||!T.current||_.current!==null&&H()},[H]),re=s.useCallback(()=>{const Fe=M.current;if(!Fe)return;const ve=Mc(Fe);!ve.width||!ve.height||J(ve)},[]);s.useEffect(()=>{re();const Fe=M.current;if(!Fe)return;const ve=new ResizeObserver(()=>re());return ve.observe(Fe),()=>ve.disconnect()},[re]),s.useEffect(()=>{k==="opening"&&h&&le("open")},[k,h]),s.useEffect(()=>{if(k!=="closing")return;const Fe=setTimeout(()=>c(),Fn);return()=>clearTimeout(Fe)},[k,c]),s.useEffect(()=>()=>{F()},[F]),s.useLayoutEffect(()=>{Te.current===n&&we.current===(m==null?void 0:m.assetId)||(F(),_.current=null,ce(null),ue(0),xe(0),Z(!1),be(!1),oe(!1),Ee(null),B.current=0,N.current=0,O.current="none",C.current=!1,T.current=!1,R.current=0,w.current=null,G.current=null,$.current=!1,Te.current=n,we.current=m==null?void 0:m.assetId)},[n,m==null?void 0:m.assetId,F]),s.useLayoutEffect(()=>{const Fe=Q.current;Fe!==null&&(Q.current=null,requestAnimationFrame(()=>{P.current(Fe)}))},[n,m==null?void 0:m.assetId]),s.useEffect(()=>{if(k!=="open")return;let Fe=null;const ve=()=>{Fe&&(document.removeEventListener("click",Fe,!0),Fe=null)},_e=()=>{ve(),Fe=pt=>{pt.stopPropagation(),pt.preventDefault(),ve()},document.addEventListener("click",Fe,!0)},Xe=pt=>{const It=pt<0?1:-1;if(Math.abs(pt)>Yy&&t.length>1){ie(It,!0);return}ie(It,!1)},ct=pt=>{if(pt.touches.length!==1||T.current)return;const It=pt.touches[0];$.current=!0,G.current={x:It.clientX,y:It.clientY},O.current="none",N.current=0,C.current=!1},rt=pt=>{if(!G.current||pt.touches.length!==1||T.current)return;const It=pt.touches[0],nt=It.clientX-G.current.x,bt=It.clientY-G.current.y;if(O.current==="none"){if(Math.abs(nt)<10&&Math.abs(bt)<10)return;if(Math.abs(nt)>Math.abs(bt)){if(t.length<=1)return;O.current="horizontal"}else if(bt>0)O.current="vertical";else return}if(O.current==="horizontal"){C.current=!0,oe(!0),N.current=nt;const Lt=nt<0?1:-1;w.current!==Lt&&(w.current=Lt,ce(Lt)),R.current=nt,xe(nt),pt.preventDefault();return}O.current==="vertical"&&(C.current=!0,oe(!0),B.current=bt,ue(bt),pt.preventDefault())},xt=()=>{if(!G.current)return;const pt=O.current,It=C.current;if(It&&pt==="horizontal")Xe(N.current),_e();else if(It&&pt==="vertical")if(B.current>qy){const bt=window.innerHeight;B.current=bt,be(!0),ue(bt),le("closing")}else B.current=0,ue(0),_e();else pt==="horizontal"&&Math.abs(N.current)>0&&(Xe(N.current),_e());G.current=null,O.current="none",N.current=0,C.current=!1,oe(!1)};return document.addEventListener("touchstart",ct,{passive:!0}),document.addEventListener("touchmove",rt,{passive:!1}),document.addEventListener("touchend",xt),document.addEventListener("touchcancel",xt),()=>{document.removeEventListener("touchstart",ct),document.removeEventListener("touchmove",rt),document.removeEventListener("touchend",xt),document.removeEventListener("touchcancel",xt),ve()}},[k,t.length,ie]),s.useEffect(()=>{const Fe=ve=>{ve.key==="Escape"&&(ve.preventDefault(),ve.stopPropagation(),k!=="closing"&&le("closing"))};return window.addEventListener("keydown",Fe,!0),()=>window.removeEventListener("keydown",Fe,!0)},[k]);const X=()=>{k!=="closing"&&le("closing")},Ce=k==="open",He=k==="closing",Ye=I>0?Math.max(0,1-I/500):1,De=I>0?Math.max(.35,1-I/500):1,ze=h?v?h:nv(h,Re):null,Ze=Fe=>{if(Fe.stopPropagation(),$.current){$.current=!1;return}if(t.length<=1)return;const ve=ze??Fe.currentTarget.getBoundingClientRect(),_e=Fe.clientY-ve.top,Xe=Math.min(52,ve.height*.2);if(!(_e>ve.height-Xe)){if(Fe.clientX-ve.left<ve.width/2){z(-1);return}z(1)}},Ue=Fe=>{if(t.length<=1)return;const ve=ze??Fe.currentTarget.getBoundingClientRect(),_e=Fe.clientX-ve.left,Xe=Fe.clientY-ve.top,ct=Math.min(52,ve.height*.2);if(Xe>ve.height-ct){Fe.currentTarget.style.cursor="default";return}Fe.currentTarget.style.cursor=_e<ve.width/2?"w-resize":"e-resize"},ye={position:"fixed",top:V==null?void 0:V.top,left:V==null?void 0:V.left,width:V==null?void 0:V.width,height:V==null?void 0:V.height,zIndex:9998},Ne=v?"cover":"contain",Ve=ee!==0||I>0?`translate(${ee}px, ${I}px)`:void 0,Je=pe&&!de?"none":de?`transform ${Fn}ms ${hi}`:ge?`transform ${Fn}ms ${hi}, opacity ${Fn}ms ${hi}`:k==="opening"||He?`opacity ${Fn}ms ${hi}`:"none",et={...ye,transform:Ve,opacity:I>0?De:k==="opening"||He?0:1,transition:Je,pointerEvents:"none"},ot={position:"absolute",top:((ze==null?void 0:ze.top)??0)-((V==null?void 0:V.top)??0),left:((ze==null?void 0:ze.left)??0)-((V==null?void 0:V.left)??0),width:ze==null?void 0:ze.width,height:ze==null?void 0:ze.height,objectFit:Ne,pointerEvents:Y&&Ce&&!te?"auto":"none",touchAction:Y&&Ce?"none":void 0},lt=(V==null?void 0:V.width)??0,Ke=ae?(n+Le+t.length)%t.length:null,ht=Ke!==null?t[Ke]:null,tt={...ye,transform:ae?`translateX(${Le*lt+ee}px)`:void 0,opacity:1,transition:de?`transform ${Fn}ms ${hi}`:"none",pointerEvents:"none"},Ge={position:"absolute",top:((h==null?void 0:h.top)??0)-((V==null?void 0:V.top)??0),left:((h==null?void 0:h.left)??0)-((V==null?void 0:V.left)??0),width:h==null?void 0:h.width,height:h==null?void 0:h.height,objectFit:Ne,pointerEvents:"none"},We=ze?{position:"fixed",top:ze.top,height:ze.height,width:ze.width/2,zIndex:9999}:null;return a.jsxs("div",{ref:L,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:k==="open"?"none":void 0},onClick:X,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:Ce?Ye:0,transition:pe?"none":`opacity ${Fn}ms ${hi}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:v?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:M,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:Ce?1:0,transition:`opacity ${Fn}ms ${hi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:p,style:y,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:M,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Ce?1:0,transition:`opacity ${Fn}ms ${hi}`},children:t.length>1&&a.jsxs("p",{className:p,style:y,children:[n+1," / ",t.length]})})]})}),h&&V&&ht&&a.jsx("div",{style:tt,onTransitionEnd:$e,children:Yi(ht)?a.jsx("video",{src:ht.assetId,muted:!0,playsInline:!0,preload:"auto",style:Ge},`neighbor-${Ke}-${ht.assetId}`):a.jsx("img",{src:ht.assetId,alt:ht.name,style:Ge},`neighbor-${Ke}-${ht.assetId}`)}),h&&V&&m&&a.jsx("div",{style:et,onTransitionEnd:$e,children:Y?a.jsx(iv,{src:m.assetId,phase:k,mediaRef:U,mediaStyle:ot,onLoadedMetadata:fe,onClick:Ze,onMouseMove:Ue},`${n}-${m.assetId}`):a.jsx("img",{ref:U,src:m.assetId,alt:m.name,onLoad:fe,style:ot},`${n}-${m.assetId}`)}),Ce&&We&&t.length>1&&!Y&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...We,left:ze.left,cursor:"w-resize",pointerEvents:pe?"none":"auto"},onClick:Fe=>{if($.current){$.current=!1;return}Fe.stopPropagation(),z(-1)}}),a.jsx("div",{style:{...We,left:ze.left+ze.width/2,cursor:"e-resize",pointerEvents:pe?"none":"auto"},onClick:Fe=>{if($.current){$.current=!1;return}Fe.stopPropagation(),z(1)}})]}),a.jsx(av,{prefix:e,closeIcon:x,closeIconMaxWidth:g,closeIconColor:f,closeIconHoverColor:b,iconMarginRight:S,contentMarginTop:W,isEditor:o,isPreviewMode:r,isEditMode:l,visible:Ce,onClose:X})]})}function lv(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function cv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:r,activeEvent:l,layoutId:c,portalId:d}){const{prefix:u}=E.useScopedStyles(),{type:p="a",gridLayout:y,textBoxWidth:x=100,verticalGap:g,entriesCount:f,lightbox:b,imageDisplay:S,imageCorners:W,lightboxImageDisplay:v,slider:L,sliderTiming:M,direction:U,transition:G,titleMarginTop:B,subtitleMarginTop:N,titleColor:O,subtitleColor:C,lightboxCounterColor:$,titleFontFamily:K,titleFontSettings:R,titleFontSize:w,titleLineHeight:T,titleLetterSpacing:j,titleWordSpacing:_,titleTextAppearance:Q,subtitleFontFamily:P,subtitleFontSettings:h,subtitleFontSize:J,subtitleLineHeight:V,subtitleLetterSpacing:me,subtitleWordSpacing:k,subtitleTextAppearance:le,lightboxCounterFontFamily:I,lightboxCounterFontSettings:ue,lightboxCounterFontSize:ee,lightboxCounterLineHeight:xe,lightboxCounterLetterSpacing:Le,lightboxCounterWordSpacing:ce,lightboxCounterTextAppearance:de,closeIcon:Z,closeIconMaxWidth:pe,closeIconColor:oe,closeIconHoverColor:ge,iconMarginRight:be,contentMarginTop:Re,showText:Ee="always",alignEntries:Te="off",align:we="top"}=e,m={fontSettings:{fontFamily:K,fontWeight:(R==null?void 0:R.fontWeight)??400,fontStyle:(R==null?void 0:R.fontStyle)??"normal"},fontSize:w??.01,lineHeight:T,letterSpacing:j??0,wordSpacing:_??0,textAppearance:Q,color:O},te={...pn(nn(m,n))},ae={fontSettings:{fontFamily:P,fontWeight:(h==null?void 0:h.fontWeight)??400,fontStyle:(h==null?void 0:h.fontStyle)??"normal"},fontSize:J??.01,lineHeight:V,letterSpacing:me??0,wordSpacing:k??0,textAppearance:le,color:C},F={...pn(nn(ae,n))},H={fontSettings:{fontFamily:I,fontWeight:(ue==null?void 0:ue.fontWeight)??400,fontStyle:(ue==null?void 0:ue.fontStyle)??"normal"},fontSize:ee??.01,lineHeight:xe,letterSpacing:Le??0,wordSpacing:ce??0,textAppearance:de,color:$},q={...pn(nn(H,n)),...os(ee,xe,u,n)},ie=is(w,T,`${u}-item-title`,`${u}-text-tight-leading`),z=is(J,V,`${u}-item-subtitle`,`${u}-text-tight-leading`),$e=os(w,T,u,n),re=os(J,V,u,n),X=is(ee,xe,`${u}-lightbox-counter`,`${u}-text-tight-leading`),Ce=E.buildColorVars(u,{titleColor:O,subtitleColor:C,lightboxCounterColor:$},dv,uv),De=`${l&&l!=="default"?`${u}-state-${l}`:""}${Ee==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),ze=f===0?1/0:f,Ze=(t??[]).slice(0,ze),Ue=s.useMemo(()=>b==="on"?Jy(Ze):[],[Ze,b]),ye=y.entryWidth??.2,Ne=(S==null?void 0:S.display)==="cover",Ve=(S==null?void 0:S.ratioValue)??"1:1",Je=(S==null?void 0:S.reversed)??!1,[et,ot]=Ve.split(":").map(Number),ht=`${Je?ot:et} / ${Je?et:ot}`,tt=y.columnsCount,Ge=E.scalingValue(ye??0,n),We=Ge,Fe=!Ne&&L!=="off",ve=Ze.length%tt||tt,_e=ve<tt&&Ze.length>0,Xe=Ze.length-ve,ct=_e?Math.floor((tt-ve)/2)+1:1,rt=W?E.scalingValue(W,n):void 0,xt={width:We,...Ne?{aspectRatio:ht,height:"auto",overflow:"hidden"}:{height:"auto"},...rt?{borderRadius:rt,overflow:"hidden"}:{}},pt=`${u}-item-image-wrapper${Fe?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),It=p==="d"||p==="e"||p==="f",nt=Te==="on",bt=`calc(${E.scalingValue(ye??0,n)} * (${x} / 100))`,Lt=E.scalingValue(ye*x/100,n),Ut=Ne?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...rt?{borderRadius:rt}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...rt?{borderRadius:rt}:{}},[Ft,Me]=s.useState(0),Oe=s.useRef(null),St=G==="fade"||U==="horizontal"?"ltr":U==="vertical"?"ttb":"ltr";s.useEffect(()=>{const yt=Oe.current;if(!yt)return;const ut=new ResizeObserver(it=>{Me(Math.round(it[0].contentRect.width))});return ut.observe(yt),()=>ut.disconnect()},[]);const Mt=(()=>{const yt={...Ce},ut=Oe.current?getComputedStyle(Oe.current).getPropertyValue("--cntrl-article-width").trim():"";return ut&&(yt["--cntrl-article-width"]=ut),yt})(),[Qe,kt]=s.useState(!1),[Bt,Wt]=s.useState([]),[At,Ae]=s.useState(0),ft=b==="on"&&(!n||i),gt=(yt,ut)=>{n&&!i||b!=="off"&&(Wt(yt),Ae(ut),kt(!0))};s.useEffect(()=>{if(!Qe||b!=="on"||typeof document>"u")return;const yt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=yt}},[Qe,b]),s.useEffect(()=>{!n||i||kt(!1)},[n,i]);const dt=s.useMemo(()=>jy(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:dt}}),b==="on"&&a.jsx(ev,{mediaList:Ue}),a.jsx("div",{style:Ce,children:a.jsx("div",{ref:Oe,className:`${u}-wrapper ${u}-type-${p}${nt?` ${u}-align-entries`:""} ${u}-image-align-${we} ${De}`.trim(),style:{gridTemplateColumns:`repeat(${tt}, ${Ge})`,rowGap:nt?0:E.scalingValue(g??0,n),columnGap:E.scalingValue(y.horizontalGap??0,n),width:E.scalingValue(y.wrapperWidth??0,n),...nt?{[`--${u}-align-entries-row-gap`]:E.scalingValue(g??0,n)}:{}},children:Ze.map((yt,ut)=>{var vt;const it=Lc(yt.title),Nt=Lc(yt.subtitle),$t=(((vt=yt.link)==null?void 0:vt.length)??0)>0&&b==="off"?yt.link:void 0,Qt=Math.floor(ut/tt)===Math.ceil(Ze.length/tt)-1,Xt=_e&&ut>=Xe?`${ct+(ut-Xe)}`:void 0,Ot=It?a.jsxs("div",{className:`${u}-item-text-block`,children:[it&&a.jsx("p",{className:ie,style:{width:bt,...te,...$e},children:yt.title}),it&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:E.scalingValue(B??0,n),width:Lt}}),Nt&&a.jsx("p",{className:z,style:{width:bt,...F,...re},children:yt.subtitle}),Nt&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:E.scalingValue(N??0,n),width:Lt}})]}):null,jt=nt?a.jsxs("div",{className:`${u}-item-title-row`,children:[!It&&a.jsx("div",{"data-controls":o&&it?"titleMarginTop":void 0,className:o&&it?`${u}-control`:void 0,style:{height:it?E.scalingValue(B??0,n):0,width:Lt}}),it&&a.jsx("p",{className:ie,style:{width:bt,...te,...$e},children:yt.title}),It&&it&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:E.scalingValue(B??0,n),width:Lt}})]}):null,Dt=nt?a.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!It&&a.jsx("div",{"data-controls":o&&Nt?"subtitleMarginTop":void 0,className:o&&Nt?`${u}-control`:void 0,style:{height:Nt?E.scalingValue(N??0,n):0,width:Lt}}),Nt&&a.jsx("p",{className:z,style:{width:bt,...F,...re},children:yt.subtitle}),It&&Nt&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:E.scalingValue(N??0,n),width:Lt}})]}):null,zt=$t?a.jsxs("a",{href:$t,target:"_blank",className:`${u}-item-text-link`,children:[jt,Dt]}):a.jsxs(a.Fragment,{children:[jt,Dt]}),D=tp(yt.gallery),Ie=D.filter(Ct=>Ct.lightboxMedia).map(Ct=>Ct.lightboxMedia),Be=a.jsx("div",{className:pt,style:xt,children:D.length===0?null:L==="off"?(()=>{const{displayMedia:Ct,lightboxMedia:at}=D[0],Tt=at?Ie.findIndex(Vt=>Vt.assetId===at.assetId):-1;return a.jsx(Pc,{media:Ct,className:`${u}-item-${Yi(Ct)?"video":"image"}`.trim(),style:Ut,onMediaClick:ft&&Tt>=0?()=>gt(Ie,Tt):void 0})})():a.jsxs(a.Fragment,{children:[Fe&&a.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:D.map(({displayMedia:Ct})=>Yi(Ct)?a.jsx("video",{src:Ct.assetId,muted:!0,playsInline:!0},`sizer-${Ct.assetId}`):a.jsx("img",{src:Ct.assetId,alt:""},`sizer-${Ct.assetId}`))}),a.jsx(El,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:M*1e3,width:"100%",height:"100%",speed:Uy,type:G==="fade"?"fade":"loop",rewind:G==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:St},onMoved:Ct=>{U!=="random"||G==="fade"||Xy(Ct)},children:D.map(({displayMedia:Ct,lightboxMedia:at},Tt)=>{const Vt=at?Ie.findIndex(Pt=>Pt.assetId===at.assetId):-1;return a.jsx(kl,{children:a.jsx(Pc,{media:Ct,className:`${u}-item-${Yi(Ct)?"video":"image"}`.trim(),style:Ut,onMediaClick:ft&&Vt>=0?()=>gt(Ie,Vt):void 0})},Tt)})},`${G}-${ye}-${U}-${M}-${Ft}-${c}`)]})}),ke=It?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":o&&it?"titleMarginTop":void 0,className:o&&it?`${u}-control`:void 0,style:{height:it?E.scalingValue(B??0,n):0,width:Lt}}),a.jsx("p",{className:ie,style:{width:bt,...te,...$e},children:yt.title}),a.jsx("div",{"data-controls":o&&Nt?"subtitleMarginTop":void 0,className:o&&Nt?`${u}-control`:void 0,style:{height:Nt?E.scalingValue(N??0,n):0,width:Lt}}),a.jsx("p",{className:z,style:{width:bt,...F,...re},children:yt.subtitle})]});return a.jsx("div",{className:`${u}-item`.trim(),style:Xt&&!nt?{gridColumn:Xt}:void 0,children:a.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${nt&&Qt?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(x??0)>100?`calc(${Ge} * (${x} / 100))`:Ge,...Xt&&nt?{gridColumn:Xt}:{}},children:nt?a.jsx(a.Fragment,{children:It?a.jsxs(a.Fragment,{children:[zt,a.jsx("a",{href:$t,target:"_blank",className:`${u}-item-image-link`,children:Be})]}):a.jsxs(a.Fragment,{children:[a.jsx("a",{href:$t,target:"_blank",className:`${u}-item-image-link`,children:Be}),zt]})}):$t?a.jsxs(a.Fragment,{children:[a.jsxs("a",{href:$t,target:"_blank",className:`${u}-item-image-link`,children:[Ot,Be]}),!It&&a.jsx("a",{href:$t,target:"_blank",className:`${u}-item-text-link`,children:ke})]}):a.jsxs(a.Fragment,{children:[Ot,Be,ke]})})},ut)})})}),(!n||i)&&Qe&&typeof document<"u"&&b==="on"&&(()=>{const yt=(d?document.getElementById(d):null)??document.body;return qn.createPortal(a.jsx("div",{style:Mt,"data-selection":"none",children:a.jsx(sv,{prefix:u,items:Bt,index:At,imageDisplay:lv(v),isEditor:n,isPreviewMode:i,isEditMode:o,closeIcon:Z,closeIconMaxWidth:pe,closeIconColor:oe,closeIconHoverColor:ge,iconMarginRight:be,contentMarginTop:Re,onClose:()=>kt(!1),onPrev:()=>Ae(ut=>(ut-1+Bt.length)%Bt.length),onNext:()=>Ae(ut=>(ut+1)%Bt.length),counterClassName:X,counterStyle:q})}),yt)})()]})}const dv={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},uv=["hover","focus","filled","success","error"],pv=`import { Splide, SplideSlide } from '@splidejs/react-splide';
5283
+ `}function Vy(){return Math.random()<.5?"ltr":"ttb"}function Gy(e){const t=e.Components.Autoplay;t&&(t.pause(!1),t.play())}function Xy(e){const t=Vy();e.options.direction!==t&&(e.options={...e.options,direction:t}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Gy(e)})})}const Fn=500,Uy=750,hi="cubic-bezier(0.22, 1, 0.36, 1)",qy=72,Yy=50;function Ky(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function Qy(e){const[t,n]=e.media;return n!=null&&n.assetId?n:t!=null&&t.assetId?t:null}function Zy(e){const[t]=e.media;return t!=null&&t.assetId?t:null}function tp(e){return!Array.isArray(e)||e.length===0?[]:Ky(e)?e.flatMap(t=>{const n=Qy(t);if(!n)return[];const i=Zy(t);return[{displayMedia:n,lightboxMedia:i!=null&&i.assetId?i:null}]}):e.filter(t=>t==null?void 0:t.assetId).map(t=>({displayMedia:t,lightboxMedia:t}))}function Yi(e){return e.type==="video"}function Jy(e){const t=new Set,n=[];for(const i of e){const o=tp(i.gallery);for(const r of o){const l=r.lightboxMedia;l!=null&&l.assetId&&!t.has(l.assetId)&&(t.add(l.assetId),n.push(l))}}return n}function ev({mediaList:e}){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=>Yi(t)?a.jsx("video",{src:t.assetId,preload:"auto",muted:!0,playsInline:!0},t.assetId):a.jsx("img",{src:t.assetId,alt:""},t.assetId))})}function tv(e){e.pause(),e.removeAttribute("src"),e.load()}function Pc({media:e,className:t,style:n,onMediaClick:i}){return Yi(e)?a.jsx("video",{src:e.assetId,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):a.jsx("img",{src:e.assetId,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function Mc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function nv(e,t){if(!t||!t.width||!t.height||!e.width||!e.height)return e;const n=t.width/t.height,i=e.width/e.height;if(n>i){const r=e.width/n;return{width:e.width,height:r,left:e.left,top:e.top+(e.height-r)/2}}const o=e.height*n;return{width:o,height:e.height,left:e.left+(e.width-o)/2,top:e.top}}function iv({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l}){return s.useEffect(()=>{const c=n.current;if(c)return()=>{tv(c)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:r,onMouseMove:l,style:i})}const ov="https://cdn.cntrl.site/component-assets/defaultCloseIcon.svg",rv=.004;function av({prefix:e,closeIcon:t=ov,closeIconMaxWidth:n=.0125,closeIconColor:i="#FFFFFF",closeIconHoverColor:o="#999999",iconMarginRight:r=.01,contentMarginTop:l=.01,isEditor:c,isPreviewMode:d,isEditMode:u,visible:p,onClose:y}){if(!t)return null;const x=E.scalingValue(n,c),g=E.scalingValue(r,c),h=E.scalingValue(l,c),b=E.scalingValue(Math.max(l,rv),c);return a.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,zIndex:1e4,display:"flex",flexDirection:"column",alignItems:"flex-end",pointerEvents:"none",opacity:p?1:0,transition:"opacity 500ms cubic-bezier(0.22, 1, 0.36, 1)"},children:[a.jsx("div",{style:{position:"relative",width:"100%",height:h,flexShrink:0},children:u&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-min":"0",className:`${e}-control`,style:{position:"absolute",top:0,left:0,width:"100%",height:b,pointerEvents:p?"auto":"none"}})}),a.jsxs("div",{className:`${e}-close-icon`,style:{width:x,height:x,marginRight:g,pointerEvents:p?"auto":"none"},onClick:S=>S.stopPropagation(),children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,"aria-label":"Close",onClick:S=>{S.stopPropagation(),y()},children:a.jsx(gn,{url:t,fill:i,hoverFill:c&&!d?i:o,className:`${e}-close-icon-img`})}),u&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:g,height:"100%",pointerEvents:p?"auto":"none"}})]})]})}function sv({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,isPreviewMode:r,isEditMode:l,onClose:c,onPrev:d,onNext:u,counterClassName:p,counterStyle:y,closeIcon:x,closeIconMaxWidth:g,closeIconColor:h,closeIconHoverColor:b,iconMarginRight:S,contentMarginTop:_}){const v=i==="cover",L=s.useRef(null),P=s.useRef(null),q=s.useRef(null),X=s.useRef(null),B=s.useRef(0),H=s.useRef(0),O=s.useRef("none"),C=s.useRef(!1),$=s.useRef(!1),Q=s.useRef(null),R=s.useRef(0),T=s.useRef(null),w=s.useRef(!1),V=s.useRef(null),z=s.useRef(null),U=s.useRef(null),M=s.useRef(()=>{}),[f,K]=s.useState(null),[G,ge]=s.useState(null),[k,ce]=s.useState("opening"),[I,ue]=s.useState(0),[ee,xe]=s.useState(0),[Le,se]=s.useState(null),[de,Z]=s.useState(!1),[pe,ie]=s.useState(!1),[me,ve]=s.useState(!1),[Ee,Re]=s.useState(null),Ce=s.useRef(n),$e=s.useRef(void 0),m=t[n],Y=m?Yi(m):!1,te=ee!==0||de,oe=Le!==null,fe=s.useCallback(Ne=>{const be=Ne.currentTarget,He=be instanceof HTMLVideoElement?{width:be.videoWidth,height:be.videoHeight}:{width:be.naturalWidth,height:be.naturalHeight};!He.width||!He.height||Re(He)},[]);s.useEffect(()=>{Q.current=G},[G]),s.useEffect(()=>{const Ne=L.current;if(!Ne)return;const be=()=>ge(Mc(Ne));be();const He=new ResizeObserver(be);return He.observe(Ne),()=>He.disconnect()},[]);const N=s.useCallback(()=>{V.current!==null&&(window.clearTimeout(V.current),V.current=null)},[]),F=s.useCallback(()=>{const Ne=z.current;z.current=null,N(),T.current=null,w.current=!1,se(null),Z(!1),xe(0),R.current=0,ie(!1),C.current=!1,H.current=0,O.current="none",Ne===1?u():Ne===-1&&d()},[N,u,d]),ne=s.useCallback(()=>{N(),z.current=null,T.current=null,w.current=!1,se(null),Z(!1),xe(0),R.current=0},[N]),re=s.useCallback(()=>{N(),V.current=window.setTimeout(()=>{z.current!==null&&F()},Fn+32)},[N,F]),J=s.useCallback((Ne,be)=>{var Xe;const He=((Xe=Q.current)==null?void 0:Xe.width)??0;if(N(),T.current=Ne,se(Ne),w.current=!0,Z(!0),be){z.current=Ne;const ct=-Ne*He;R.current=ct,xe(ct),re();return}R.current=0,xe(0),V.current=window.setTimeout(()=>{V.current=null,ne()},Fn+32)},[N,ne,re]),W=s.useCallback(Ne=>{if(!(t.length<=1)){if(w.current){if(z.current===Ne){U.current=Ne,F();return}ne()}N(),T.current=Ne,se(Ne),w.current=!1,Z(!1),R.current=0,xe(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{J(Ne,!0)})})}},[t.length,J,F,ne,N]);M.current=W;const Se=s.useCallback(Ne=>{Ne.propertyName!=="transform"||!w.current||z.current!==null&&F()},[F]),le=s.useCallback(()=>{const Ne=P.current;if(!Ne)return;const be=Mc(Ne);!be.width||!be.height||K(be)},[]);s.useEffect(()=>{le();const Ne=P.current;if(!Ne)return;const be=new ResizeObserver(()=>le());return be.observe(Ne),()=>be.disconnect()},[le]),s.useEffect(()=>{k==="opening"&&f&&ce("open")},[k,f]),s.useEffect(()=>{if(k!=="closing")return;const Ne=setTimeout(()=>c(),Fn);return()=>clearTimeout(Ne)},[k,c]),s.useEffect(()=>()=>{N()},[N]),s.useLayoutEffect(()=>{Ce.current===n&&$e.current===(m==null?void 0:m.assetId)||(N(),z.current=null,se(null),ue(0),xe(0),Z(!1),ve(!1),ie(!1),Re(null),B.current=0,H.current=0,O.current="none",C.current=!1,w.current=!1,R.current=0,T.current=null,X.current=null,$.current=!1,Ce.current=n,$e.current=m==null?void 0:m.assetId)},[n,m==null?void 0:m.assetId,N]),s.useLayoutEffect(()=>{const Ne=U.current;Ne!==null&&(U.current=null,requestAnimationFrame(()=>{M.current(Ne)}))},[n,m==null?void 0:m.assetId]),s.useEffect(()=>{if(k!=="open")return;let Ne=null;const be=()=>{Ne&&(document.removeEventListener("click",Ne,!0),Ne=null)},He=()=>{be(),Ne=pt=>{pt.stopPropagation(),pt.preventDefault(),be()},document.addEventListener("click",Ne,!0)},Xe=pt=>{const It=pt<0?1:-1;if(Math.abs(pt)>Yy&&t.length>1){J(It,!0);return}J(It,!1)},ct=pt=>{if(pt.touches.length!==1||w.current)return;const It=pt.touches[0];$.current=!0,X.current={x:It.clientX,y:It.clientY},O.current="none",H.current=0,C.current=!1},rt=pt=>{if(!X.current||pt.touches.length!==1||w.current)return;const It=pt.touches[0],nt=It.clientX-X.current.x,bt=It.clientY-X.current.y;if(O.current==="none"){if(Math.abs(nt)<10&&Math.abs(bt)<10)return;if(Math.abs(nt)>Math.abs(bt)){if(t.length<=1)return;O.current="horizontal"}else if(bt>0)O.current="vertical";else return}if(O.current==="horizontal"){C.current=!0,ie(!0),H.current=nt;const Lt=nt<0?1:-1;T.current!==Lt&&(T.current=Lt,se(Lt)),R.current=nt,xe(nt),pt.preventDefault();return}O.current==="vertical"&&(C.current=!0,ie(!0),B.current=bt,ue(bt),pt.preventDefault())},xt=()=>{if(!X.current)return;const pt=O.current,It=C.current;if(It&&pt==="horizontal")Xe(H.current),He();else if(It&&pt==="vertical")if(B.current>qy){const bt=window.innerHeight;B.current=bt,ve(!0),ue(bt),ce("closing")}else B.current=0,ue(0),He();else pt==="horizontal"&&Math.abs(H.current)>0&&(Xe(H.current),He());X.current=null,O.current="none",H.current=0,C.current=!1,ie(!1)};return document.addEventListener("touchstart",ct,{passive:!0}),document.addEventListener("touchmove",rt,{passive:!1}),document.addEventListener("touchend",xt),document.addEventListener("touchcancel",xt),()=>{document.removeEventListener("touchstart",ct),document.removeEventListener("touchmove",rt),document.removeEventListener("touchend",xt),document.removeEventListener("touchcancel",xt),be()}},[k,t.length,J]),s.useEffect(()=>{const Ne=be=>{be.key==="Escape"&&(be.preventDefault(),be.stopPropagation(),k!=="closing"&&ce("closing"))};return window.addEventListener("keydown",Ne,!0),()=>window.removeEventListener("keydown",Ne,!0)},[k]);const j=()=>{k!=="closing"&&ce("closing")},Te=k==="open",Fe=k==="closing",Ye=I>0?Math.max(0,1-I/500):1,De=I>0?Math.max(.35,1-I/500):1,ze=f?v?f:nv(f,Ee):null,Ze=Ne=>{if(Ne.stopPropagation(),$.current){$.current=!1;return}if(t.length<=1)return;const be=ze??Ne.currentTarget.getBoundingClientRect(),He=Ne.clientY-be.top,Xe=Math.min(52,be.height*.2);if(!(He>be.height-Xe)){if(Ne.clientX-be.left<be.width/2){W(-1);return}W(1)}},Ue=Ne=>{if(t.length<=1)return;const be=ze??Ne.currentTarget.getBoundingClientRect(),He=Ne.clientX-be.left,Xe=Ne.clientY-be.top,ct=Math.min(52,be.height*.2);if(Xe>be.height-ct){Ne.currentTarget.style.cursor="default";return}Ne.currentTarget.style.cursor=He<be.width/2?"w-resize":"e-resize"},ye={position:"fixed",top:G==null?void 0:G.top,left:G==null?void 0:G.left,width:G==null?void 0:G.width,height:G==null?void 0:G.height,zIndex:9998},_e=v?"cover":"contain",Ve=ee!==0||I>0?`translate(${ee}px, ${I}px)`:void 0,Je=pe&&!de?"none":de?`transform ${Fn}ms ${hi}`:me?`transform ${Fn}ms ${hi}, opacity ${Fn}ms ${hi}`:k==="opening"||Fe?`opacity ${Fn}ms ${hi}`:"none",et={...ye,transform:Ve,opacity:I>0?De:k==="opening"||Fe?0:1,transition:Je,pointerEvents:"none"},ot={position:"absolute",top:((ze==null?void 0:ze.top)??0)-((G==null?void 0:G.top)??0),left:((ze==null?void 0:ze.left)??0)-((G==null?void 0:G.left)??0),width:ze==null?void 0:ze.width,height:ze==null?void 0:ze.height,objectFit:_e,pointerEvents:Y&&Te&&!te?"auto":"none",touchAction:Y&&Te?"none":void 0},lt=(G==null?void 0:G.width)??0,Ke=oe?(n+Le+t.length)%t.length:null,ht=Ke!==null?t[Ke]:null,tt={...ye,transform:oe?`translateX(${Le*lt+ee}px)`:void 0,opacity:1,transition:de?`transform ${Fn}ms ${hi}`:"none",pointerEvents:"none"},Ge={position:"absolute",top:((f==null?void 0:f.top)??0)-((G==null?void 0:G.top)??0),left:((f==null?void 0:f.left)??0)-((G==null?void 0:G.left)??0),width:f==null?void 0:f.width,height:f==null?void 0:f.height,objectFit:_e,pointerEvents:"none"},We=ze?{position:"fixed",top:ze.top,height:ze.height,width:ze.width/2,zIndex:9999}:null;return a.jsxs("div",{ref:L,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:k==="open"?"none":void 0},onClick:j,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:Te?Ye:0,transition:pe?"none":`opacity ${Fn}ms ${hi}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:v?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:P,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:Te?1:0,transition:`opacity ${Fn}ms ${hi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:p,style:y,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:P,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Te?1:0,transition:`opacity ${Fn}ms ${hi}`},children:t.length>1&&a.jsxs("p",{className:p,style:y,children:[n+1," / ",t.length]})})]})}),f&&G&&ht&&a.jsx("div",{style:tt,onTransitionEnd:Se,children:Yi(ht)?a.jsx("video",{src:ht.assetId,muted:!0,playsInline:!0,preload:"auto",style:Ge},`neighbor-${Ke}-${ht.assetId}`):a.jsx("img",{src:ht.assetId,alt:ht.name,style:Ge},`neighbor-${Ke}-${ht.assetId}`)}),f&&G&&m&&a.jsx("div",{style:et,onTransitionEnd:Se,children:Y?a.jsx(iv,{src:m.assetId,phase:k,mediaRef:q,mediaStyle:ot,onLoadedMetadata:fe,onClick:Ze,onMouseMove:Ue},`${n}-${m.assetId}`):a.jsx("img",{ref:q,src:m.assetId,alt:m.name,onLoad:fe,style:ot},`${n}-${m.assetId}`)}),Te&&We&&t.length>1&&!Y&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...We,left:ze.left,cursor:"w-resize",pointerEvents:pe?"none":"auto"},onClick:Ne=>{if($.current){$.current=!1;return}Ne.stopPropagation(),W(-1)}}),a.jsx("div",{style:{...We,left:ze.left+ze.width/2,cursor:"e-resize",pointerEvents:pe?"none":"auto"},onClick:Ne=>{if($.current){$.current=!1;return}Ne.stopPropagation(),W(1)}})]}),a.jsx(av,{prefix:e,closeIcon:x,closeIconMaxWidth:g,closeIconColor:h,closeIconHoverColor:b,iconMarginRight:S,contentMarginTop:_,isEditor:o,isPreviewMode:r,isEditMode:l,visible:Te,onClose:j})]})}function lv(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function cv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:r,activeEvent:l,layoutId:c,portalId:d}){const{prefix:u}=E.useScopedStyles(),{type:p="a",gridLayout:y,textBoxWidth:x=100,verticalGap:g,entriesCount:h,lightbox:b,imageDisplay:S,imageCorners:_,lightboxImageDisplay:v,slider:L,sliderTiming:P,direction:q,transition:X,titleMarginTop:B,subtitleMarginTop:H,titleColor:O,subtitleColor:C,lightboxCounterColor:$,titleFontFamily:Q,titleFontSettings:R,titleFontSize:T,titleLineHeight:w,titleLetterSpacing:V,titleWordSpacing:z,titleTextAppearance:U,subtitleFontFamily:M,subtitleFontSettings:f,subtitleFontSize:K,subtitleLineHeight:G,subtitleLetterSpacing:ge,subtitleWordSpacing:k,subtitleTextAppearance:ce,lightboxCounterFontFamily:I,lightboxCounterFontSettings:ue,lightboxCounterFontSize:ee,lightboxCounterLineHeight:xe,lightboxCounterLetterSpacing:Le,lightboxCounterWordSpacing:se,lightboxCounterTextAppearance:de,closeIcon:Z,closeIconMaxWidth:pe,closeIconColor:ie,closeIconHoverColor:me,iconMarginRight:ve,contentMarginTop:Ee,showText:Re="always",alignEntries:Ce="off",align:$e="top"}=e,m={fontSettings:{fontFamily:Q,fontWeight:(R==null?void 0:R.fontWeight)??400,fontStyle:(R==null?void 0:R.fontStyle)??"normal"},fontSize:T??.01,lineHeight:w,letterSpacing:V??0,wordSpacing:z??0,textAppearance:U,color:O},te={...pn(nn(m,n))},oe={fontSettings:{fontFamily:M,fontWeight:(f==null?void 0:f.fontWeight)??400,fontStyle:(f==null?void 0:f.fontStyle)??"normal"},fontSize:K??.01,lineHeight:G,letterSpacing:ge??0,wordSpacing:k??0,textAppearance:ce,color:C},N={...pn(nn(oe,n))},F={fontSettings:{fontFamily:I,fontWeight:(ue==null?void 0:ue.fontWeight)??400,fontStyle:(ue==null?void 0:ue.fontStyle)??"normal"},fontSize:ee??.01,lineHeight:xe,letterSpacing:Le??0,wordSpacing:se??0,textAppearance:de,color:$},re={...pn(nn(F,n)),...os(ee,xe,u,n)},J=is(T,w,`${u}-item-title`,`${u}-text-tight-leading`),W=is(K,G,`${u}-item-subtitle`,`${u}-text-tight-leading`),Se=os(T,w,u,n),le=os(K,G,u,n),j=is(ee,xe,`${u}-lightbox-counter`,`${u}-text-tight-leading`),Te=E.buildColorVars(u,{titleColor:O,subtitleColor:C,lightboxCounterColor:$},dv,uv),De=`${l&&l!=="default"?`${u}-state-${l}`:""}${Re==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),ze=h===0?1/0:h,Ze=(t??[]).slice(0,ze),Ue=s.useMemo(()=>b==="on"?Jy(Ze):[],[Ze,b]),ye=y.entryWidth??.2,_e=(S==null?void 0:S.display)==="cover",Ve=(S==null?void 0:S.ratioValue)??"1:1",Je=(S==null?void 0:S.reversed)??!1,[et,ot]=Ve.split(":").map(Number),ht=`${Je?ot:et} / ${Je?et:ot}`,tt=y.columnsCount,Ge=E.scalingValue(ye??0,n),We=Ge,Ne=!_e&&L!=="off",be=Ze.length%tt||tt,He=be<tt&&Ze.length>0,Xe=Ze.length-be,ct=He?Math.floor((tt-be)/2)+1:1,rt=_?E.scalingValue(_,n):void 0,xt={width:We,..._e?{aspectRatio:ht,height:"auto",overflow:"hidden"}:{height:"auto"},...rt?{borderRadius:rt,overflow:"hidden"}:{}},pt=`${u}-item-image-wrapper${Ne?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),It=p==="d"||p==="e"||p==="f",nt=Ce==="on",bt=`calc(${E.scalingValue(ye??0,n)} * (${x} / 100))`,Lt=E.scalingValue(ye*x/100,n),Ut=_e?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...rt?{borderRadius:rt}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...rt?{borderRadius:rt}:{}},[Ft,Me]=s.useState(0),Oe=s.useRef(null),St=X==="fade"||q==="horizontal"?"ltr":q==="vertical"?"ttb":"ltr";s.useEffect(()=>{const yt=Oe.current;if(!yt)return;const ut=new ResizeObserver(it=>{Me(Math.round(it[0].contentRect.width))});return ut.observe(yt),()=>ut.disconnect()},[]);const Mt=(()=>{const yt={...Te},ut=Oe.current?getComputedStyle(Oe.current).getPropertyValue("--cntrl-article-width").trim():"";return ut&&(yt["--cntrl-article-width"]=ut),yt})(),[Qe,kt]=s.useState(!1),[Bt,Wt]=s.useState([]),[At,Ae]=s.useState(0),ft=b==="on"&&(!n||i),gt=(yt,ut)=>{n&&!i||b!=="off"&&(Wt(yt),Ae(ut),kt(!0))};s.useEffect(()=>{if(!Qe||b!=="on"||typeof document>"u")return;const yt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=yt}},[Qe,b]),s.useEffect(()=>{!n||i||kt(!1)},[n,i]);const dt=s.useMemo(()=>jy(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:dt}}),b==="on"&&a.jsx(ev,{mediaList:Ue}),a.jsx("div",{style:Te,children:a.jsx("div",{ref:Oe,className:`${u}-wrapper ${u}-type-${p}${nt?` ${u}-align-entries`:""} ${u}-image-align-${$e} ${De}`.trim(),style:{gridTemplateColumns:`repeat(${tt}, ${Ge})`,rowGap:nt?0:E.scalingValue(g??0,n),columnGap:E.scalingValue(y.horizontalGap??0,n),width:E.scalingValue(y.wrapperWidth??0,n),...nt?{[`--${u}-align-entries-row-gap`]:E.scalingValue(g??0,n)}:{}},children:Ze.map((yt,ut)=>{var vt;const it=Lc(yt.title),Nt=Lc(yt.subtitle),$t=(((vt=yt.link)==null?void 0:vt.length)??0)>0&&b==="off"?yt.link:void 0,Qt=Math.floor(ut/tt)===Math.ceil(Ze.length/tt)-1,Xt=He&&ut>=Xe?`${ct+(ut-Xe)}`:void 0,Ot=It?a.jsxs("div",{className:`${u}-item-text-block`,children:[it&&a.jsx("p",{className:J,style:{width:bt,...te,...Se},children:yt.title}),it&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:E.scalingValue(B??0,n),width:Lt}}),Nt&&a.jsx("p",{className:W,style:{width:bt,...N,...le},children:yt.subtitle}),Nt&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:E.scalingValue(H??0,n),width:Lt}})]}):null,jt=nt?a.jsxs("div",{className:`${u}-item-title-row`,children:[!It&&a.jsx("div",{"data-controls":o&&it?"titleMarginTop":void 0,className:o&&it?`${u}-control`:void 0,style:{height:it?E.scalingValue(B??0,n):0,width:Lt}}),it&&a.jsx("p",{className:J,style:{width:bt,...te,...Se},children:yt.title}),It&&it&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:E.scalingValue(B??0,n),width:Lt}})]}):null,Dt=nt?a.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!It&&a.jsx("div",{"data-controls":o&&Nt?"subtitleMarginTop":void 0,className:o&&Nt?`${u}-control`:void 0,style:{height:Nt?E.scalingValue(H??0,n):0,width:Lt}}),Nt&&a.jsx("p",{className:W,style:{width:bt,...N,...le},children:yt.subtitle}),It&&Nt&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:E.scalingValue(H??0,n),width:Lt}})]}):null,zt=$t?a.jsxs("a",{href:$t,target:"_blank",className:`${u}-item-text-link`,children:[jt,Dt]}):a.jsxs(a.Fragment,{children:[jt,Dt]}),D=tp(yt.gallery),Ie=D.filter(Ct=>Ct.lightboxMedia).map(Ct=>Ct.lightboxMedia),Be=a.jsx("div",{className:pt,style:xt,children:D.length===0?null:L==="off"?(()=>{const{displayMedia:Ct,lightboxMedia:at}=D[0],Tt=at?Ie.findIndex(Vt=>Vt.assetId===at.assetId):-1;return a.jsx(Pc,{media:Ct,className:`${u}-item-${Yi(Ct)?"video":"image"}`.trim(),style:Ut,onMediaClick:ft&&Tt>=0?()=>gt(Ie,Tt):void 0})})():a.jsxs(a.Fragment,{children:[Ne&&a.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:D.map(({displayMedia:Ct})=>Yi(Ct)?a.jsx("video",{src:Ct.assetId,muted:!0,playsInline:!0},`sizer-${Ct.assetId}`):a.jsx("img",{src:Ct.assetId,alt:""},`sizer-${Ct.assetId}`))}),a.jsx(El,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:P*1e3,width:"100%",height:"100%",speed:Uy,type:X==="fade"?"fade":"loop",rewind:X==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:St},onMoved:Ct=>{q!=="random"||X==="fade"||Xy(Ct)},children:D.map(({displayMedia:Ct,lightboxMedia:at},Tt)=>{const Vt=at?Ie.findIndex(Pt=>Pt.assetId===at.assetId):-1;return a.jsx(kl,{children:a.jsx(Pc,{media:Ct,className:`${u}-item-${Yi(Ct)?"video":"image"}`.trim(),style:Ut,onMediaClick:ft&&Vt>=0?()=>gt(Ie,Vt):void 0})},Tt)})},`${X}-${ye}-${q}-${P}-${Ft}-${c}`)]})}),ke=It?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":o&&it?"titleMarginTop":void 0,className:o&&it?`${u}-control`:void 0,style:{height:it?E.scalingValue(B??0,n):0,width:Lt}}),a.jsx("p",{className:J,style:{width:bt,...te,...Se},children:yt.title}),a.jsx("div",{"data-controls":o&&Nt?"subtitleMarginTop":void 0,className:o&&Nt?`${u}-control`:void 0,style:{height:Nt?E.scalingValue(H??0,n):0,width:Lt}}),a.jsx("p",{className:W,style:{width:bt,...N,...le},children:yt.subtitle})]});return a.jsx("div",{className:`${u}-item`.trim(),style:Xt&&!nt?{gridColumn:Xt}:void 0,children:a.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${nt&&Qt?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(x??0)>100?`calc(${Ge} * (${x} / 100))`:Ge,...Xt&&nt?{gridColumn:Xt}:{}},children:nt?a.jsx(a.Fragment,{children:It?a.jsxs(a.Fragment,{children:[zt,a.jsx("a",{href:$t,target:"_blank",className:`${u}-item-image-link`,children:Be})]}):a.jsxs(a.Fragment,{children:[a.jsx("a",{href:$t,target:"_blank",className:`${u}-item-image-link`,children:Be}),zt]})}):$t?a.jsxs(a.Fragment,{children:[a.jsxs("a",{href:$t,target:"_blank",className:`${u}-item-image-link`,children:[Ot,Be]}),!It&&a.jsx("a",{href:$t,target:"_blank",className:`${u}-item-text-link`,children:ke})]}):a.jsxs(a.Fragment,{children:[Ot,Be,ke]})})},ut)})})}),(!n||i)&&Qe&&typeof document<"u"&&b==="on"&&(()=>{const yt=(d?document.getElementById(d):null)??document.body;return qn.createPortal(a.jsx("div",{style:Mt,"data-selection":"none",children:a.jsx(sv,{prefix:u,items:Bt,index:At,imageDisplay:lv(v),isEditor:n,isPreviewMode:i,isEditMode:o,closeIcon:Z,closeIconMaxWidth:pe,closeIconColor:ie,closeIconHoverColor:me,iconMarginRight:ve,contentMarginTop:Ee,onClose:()=>kt(!1),onPrev:()=>Ae(ut=>(ut-1+Bt.length)%Bt.length),onNext:()=>Ae(ut=>(ut+1)%Bt.length),counterClassName:j,counterStyle:re})}),yt)})()]})}const dv={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},uv=["hover","focus","filled","success","error"],pv=`import { Splide, SplideSlide } from '@splidejs/react-splide';
5284
5284
  import '@splidejs/react-splide/css/core';
5285
5285
  import { CommonComponentProps } from '../props';
5286
5286
  import {
@@ -7548,7 +7548,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
7548
7548
  };
7549
7549
 
7550
7550
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
7551
- `,gv="01M3SBP3P8CMVMM1ZZ0QVD2PPF",rs={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},mv=["titleColor","subtitleColor","lightboxCounterColor","closeIconColor","closeIconHoverColor"],hv={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["gallery"]},default:[{title:"Earth-orbital mission",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Salton Sea from Above",subtitle:"Hasselblad 500 EL / Zeiss Sonnar 250 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XERA3G7J0J00XVKEXX",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module Pilot",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module 3 porch",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Command Module",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEZCK8SJPAFXCKG8QN",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"CSM and Lunar Module LM",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"David R. Scott during EVA",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Fourth day of the mission",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XES6MX14JTT1CF24BB",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Landing of the Spider1",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEMGJWCYNPZ3ETQTKM",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c","d","e","f"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},imageCorners:{type:"number",scope:"layout",title:"Round corners",min:0,display:{type:"numeric-input"}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...rs.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},subtitleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},subtitleFontSettings:{...rs.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},subtitleFontSize:{type:"number",scope:"layout",title:"Subtitle Font Size",display:{type:"font-size"}},subtitleLineHeight:{type:"number",scope:"layout",title:"Subtitle Line Height",display:{type:"line-height-input"}},subtitleLetterSpacing:{type:"number",scope:"layout",title:"Subtitle Letter Spacing",display:{type:"letter-spacing-input"}},subtitleWordSpacing:{type:"number",scope:"layout",title:"Subtitle Word Spacing",display:{type:"word-spacing-input"}},subtitleTextAppearance:{type:"object",scope:"layout",title:"Subtitle Text Appearance",display:{type:"text-appearance"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...rs.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",closeIcon:gv,closeIconColor:"#FFFFFF",closeIconHoverColor:"#999999",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"off",align:"top",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"b",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,imageCorners:0,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.064,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405},t:{type:"b",gridLayout:{entryWidth:.1041,horizontalGap:.26041,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:250,verticalGap:.09722,entriesCount:0,titleMarginTop:.01953125,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.03255,titleLineHeight:.03255,titleLetterSpacing:-.00118,subtitleFontSize:.01822,subtitleLineHeight:.02083,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01,contentMarginTop:.026,closeIconMaxWidth:.03906,iconMarginRight:.026},d:{type:"b",gridLayout:{entryWidth:.0833,horizontalGap:.25,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.closeIcon.display.visible",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.closeIconMaxWidth.display.visible",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.closeIconColor.display.visible",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.closeIconHoverColor.display.visible",value:!1}},{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","align","entriesCount","lightbox","imageDisplay","imageCorners","lightboxImageDisplay","contentMarginTop","closeIconMaxWidth","iconMarginRight","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","verticalGap"]},{type:"row",title:"",items:["entriesCount","showText"]},{type:"row",title:"",items:["alignEntries","align"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay","imageCorners"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","direction"]},{type:"group",title:"",items:["sliderTiming","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...mv],panelIds:["general","imageSettings","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor","closeIconColor","closeIconHoverColor"]}}},fv={element:cv,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.assetId",placeholderEnabled:!0}],parameters:[{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"subtitleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",subtitleFontSettings:"subtitleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"},schema:hv,sourceCode:pv},yv=50,Rc=10,Al="cntrl-lightbox-journal",Da=Al,Vs=`${Al}-`,za=e=>`${Al}-${e}`,Fl=e=>e===Da||e.startsWith(Vs),Ec=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},kc=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=Ec(t.get(za(e)));if(i)return i}const n=Ec(t.get(Da));if(n)return n;for(const[i]of t){if(!i.startsWith(Vs))continue;const o=i.slice(Vs.length);if(!/^\d+$/.test(o))continue;const r=Number.parseInt(o,10);if(Number.isFinite(r)&&r>=1)return r}return null},Ac=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},np=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{Fl(l)&&i.searchParams.delete(l)}),t?i.searchParams.set(za(t),String(e)):i.searchParams.set(Da,String(e));const o=n?"replaceState":"pushState",r=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",r)},vv=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===za(e)||i===Da:Fl(i));if(n.forEach(i=>t.searchParams.delete(i)),n.length>0){const i=`${t.pathname}${t.search}${t.hash}`;window.history.replaceState(window.history.state,"",i)}},ip=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(za(e)):[...t.keys()].some(n=>Fl(n))},xv=(e,t)=>{if(ip(t)){if(e){window.history.back();return}vv(t)}},bv=20,Sv=2,as=e=>`max(${e}, ${bv}px)`,Po=e=>((e==null?void 0:e.image)??[]).slice(0,Sv),op=e=>e.reduce((t,n)=>t+Po(n).length,0),wv=(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}},$v=(e,t)=>{const n=op(e),{start:i,end:o}=wv(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},pa=(e,t)=>t==="B"?e.flatMap((n,i)=>Po(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Po(n)})),Cv=(e,t,n,i)=>{var r;if(n==="B")return`${t+1} / ${e.length}`;const o=((r=e[t])==null?void 0:r.entryIndex)??0;return $v(i,o)},Fc=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Tv=(e,t,n)=>e==="B"?t.length>1:op(n)>1,Pn=.004,ii=.004,wo={title1Width:.13,title2Width:.13,title3Width:.14},Ti=(e,t,n,i,o)=>{const r=[];return t.title1&&r.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&r.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&r.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),r},Mo=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},c)=>{if(r<=0||c<=0)return{overflow:r,widths:[c,...l]};const d=Math.min(r,c);return{overflow:r-d,widths:[c-d,...l]}},{overflow:i-1,widths:[]});return o},vr=(e,t)=>Mo(e,t),yn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Ii=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Mo(e.length,n),effective:vr(e.length,n)}},rp=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),ap=(e,t,n,i)=>e.slice(0,i+1).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),Ri=["title1","title2","title3","count"],wt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Nl={title1:"1",title2:"2",title3:"3",count:"Count"},_l=e=>[wt(e,"fontFamily"),wt(e,"fontSettings"),{type:"row",items:[wt(e,"fontSize"),wt(e,"lineHeight"),wt(e,"letterSpacing"),wt(e,"wordSpacing")]},wt(e,"textAlign"),wt(e,"textAppearance")],Iv=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Ri.map(e=>[Nl[e],_l(e)]))}),Lv={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Pv={title1:.02,title2:.02,title3:.02,count:.017},Vi=(e,t)=>{const n=i=>{const o=wt(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[Lv[t]]}},Gi=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??Pv[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return nn(i,n)};function sp({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l}){const{title1Width:c,title2Width:d,title3Width:u,title1MarginLeft:p=0,title2MarginLeft:y=0,title3MarginLeft:x=0,titleRowMarginBottom:g=0,titleHeaderLayout:f="desktop",contentMarginTop:b=0,iconMarginRight:S=0,closeIcon:W=null,closeIconMaxWidth:v=0,closeIconColor:L="#000000",closeIconHoverColor:M="#cccccc"}=n,U=E.scalingValue(b,i),G=E.scalingValue(Math.max(b,ii),i),B=E.scalingValue(S,i),N=E.scalingValue(g,i),O=f==="mobile",C=Gi("title1",Vi(n,"title1"),i),$=Gi("title2",Vi(n,"title2"),i),K=Gi("title3",Vi(n,"title3"),i),R=s.useMemo(()=>({title1Width:c??wo.title1Width,title2Width:d??wo.title2Width,title3Width:u??wo.title3Width}),[c,d,u]),w=s.useMemo(()=>({title2MarginLeft:y,title3MarginLeft:x}),[y,x]),T=s.useMemo(()=>Ti(e,t,C,$,K),[e,t,C,$,K]),j=s.useMemo(()=>T.map(z=>R[z.widthKey]),[T,R]),_=s.useMemo(()=>Mo(T.length,j),[T.length,j]),Q=s.useMemo(()=>vr(T.length,j),[T.length,j]),P=s.useMemo(()=>T.filter(z=>z.prefix==="title1"),[T]),h=s.useMemo(()=>T.filter(z=>z.prefix==="title2"||z.prefix==="title3"),[T]),J=s.useMemo(()=>Ii(P,R),[P,R]),V=s.useMemo(()=>Ii(h,R),[h,R]),me=!!(t.title1||t.title2||t.title3),k=W!==null;if(!(me||k))return null;const I=(p??0)>0||o,ue=(z,$e)=>{const re=T.findIndex(Ce=>Ce.prefix===z.prefix);if(!O||$e==="single-row")return{effectiveWidth:Q[re]??0,resolvedWidth:_[re]??0,maxWidth:yn(re,_)};if($e==="two-row-top"){const Ce=P.findIndex(He=>He.prefix===z.prefix);return{effectiveWidth:J.effective[Ce]??0,resolvedWidth:J.resolved[Ce]??0,maxWidth:yn(Ce,J.resolved)}}const X=h.findIndex(Ce=>Ce.prefix===z.prefix);return{effectiveWidth:V.effective[X]??0,resolvedWidth:V.resolved[X]??0,maxWidth:yn(X,V.resolved)}},ee=(z,$e,re)=>{if(!O||re==="single-row"){const De=z.findIndex(ye=>ye.prefix===$e.prefix),ze=z.map(ye=>R[ye.widthKey]),Ze=Mo(z.length,ze);return{effectiveWidth:vr(z.length,ze)[De]??0,resolvedWidth:Ze[De]??0,maxWidth:yn(De,Ze)}}if(re==="two-row-top"){const De=z.filter(ye=>ye.prefix==="title1"),ze=De.findIndex(ye=>ye.prefix===$e.prefix),{resolved:Ze,effective:Ue}=Ii(De,R);return{effectiveWidth:Ue[ze]??0,resolvedWidth:Ze[ze]??0,maxWidth:yn(ze,Ze)}}const X=z.filter(De=>De.prefix==="title2"||De.prefix==="title3"),Ce=X.findIndex(De=>De.prefix===$e.prefix),{resolved:He,effective:Ye}=Ii(X,R);return{effectiveWidth:Ye[Ce]??0,resolvedWidth:He[Ce]??0,maxWidth:yn(Ce,He)}},xe=z=>ap(T,_,w,z)+(O?0:p??0),Le=()=>O?0:p??0,ce=z=>h.slice(0,z).reduce(($e,re,X)=>$e+(re.marginLeftKey?w[re.marginLeftKey]??0:0)+(V.resolved[X]??0),0),de=z=>{const $e=h[z];return ce(z)+($e.marginLeftKey?w[$e.marginLeftKey]??0:0)+(V.resolved[z]??0)},Z=(z,$e,re)=>{const X=z.marginLeftKey?w[z.marginLeftKey]??0:0,{effectiveWidth:Ce,resolvedWidth:He,maxWidth:Ye}=re??ue(z,$e),De=Math.max(X,ii),ze=o&&$e==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":z.prefix,style:{width:E.scalingValue(Ce,i),...X>0?{marginLeft:E.scalingValue(X,i)}:{}},children:[a.jsx("p",{className:z.className,style:z.style,children:z.text}),ze&&z.marginLeftKey?a.jsx("div",{"data-controls":z.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(He),style:{position:"absolute",top:0,left:E.scalingValue(-X,i),width:E.scalingValue(De,i),height:"100%",pointerEvents:"auto"}}):null,ze?a.jsx("div",{"data-controls":z.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:E.scalingValue(-Pn/2,i),width:E.scalingValue(Pn,i),height:"100%",pointerEvents:"auto"}}):null]},z.className)},pe=(z="two-row")=>{const $e=T.findIndex(Ce=>Ce.prefix==="title1"),re=$e>=0?_[$e]:R.title1Width,X=z==="two-row"&&o;return a.jsx("div",{...X?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(re)}:{},style:{width:E.scalingValue(p??0,i),flexShrink:0,alignSelf:"stretch",...X?{pointerEvents:"auto"}:{}}})},oe=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:C,"aria-hidden":"true",children:" "}),ge=z=>{const $e=Ti(e,z,C,$,K);return a.jsx(a.Fragment,{children:$e.map(re=>Z(re,"single-row",ee($e,re,"single-row")))})},be=z=>{const $e=Ti(e,z,C,$,K),re=$e.find(X=>X.prefix==="title1");return re?Z(re,"two-row-top",ee($e,re,"two-row-top")):null},Re=(z,$e=!1)=>{const re=Ti(e,z,C,$,K),X=re.filter(Ye=>Ye.prefix==="title2"||Ye.prefix==="title3"),Ce=o&&$e;return X.length>0||Ce||(g??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[X.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[a.jsx("div",{className:`${e}-titles-stack`,children:X.map(Ye=>Z(Ye,"two-row-bottom",ee(re,Ye,"two-row-bottom")))}),$e&&o?a.jsxs(a.Fragment,{children:[fe(),F()]}):null]}):null,(g??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:N,width:"100%",flexShrink:0,pointerEvents:Ce?"auto":"none"}}):null]}):null},Ee=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:E.scalingValue(v??0,i),height:E.scalingValue(v??0,i),marginRight:B,"--close-icon-hover-color":M},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:z=>{z.stopPropagation(),l==null||l()},"aria-label":"Close",children:a.jsx(gn,{url:W??"",fill:L,hoverFill:i&&!r?L:M,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:B,height:"100%",pointerEvents:"auto"}})]}),Te=()=>k?a.jsx("div",{className:`${e}-titles-row-header-controls`,children:Ee()}):null,we=z=>a.jsx("div",{className:`${e}-titles-row-titles`,children:a.jsx("div",{className:`${e}-titles-stack`,children:z})}),m=z=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[k||me?oe():null,I?pe("two-row"):null,we(z),Te()]}),Y=(z,$e=!1)=>a.jsxs(a.Fragment,{children:[m(be(z)),Re(z,$e)]}),te=()=>{const z=O?-1:T.findIndex(X=>X.prefix==="title1"),$e=!O&&(o||(p??0)>0)?(()=>{const X=p??0,Ce=z>=0?_[z]:R.title1Width,He=Math.max(X,ii);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:E.scalingValue(He,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,re=T.flatMap((X,Ce)=>{if(!X.marginLeftKey)return[];const He=w[X.marginLeftKey]??0,Ye=rp(T,_,w,Ce)+Le(),De=Math.max(He,ii);return a.jsx("div",{"data-controls":X.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(_[Ce]),style:{position:"absolute",top:0,left:E.scalingValue(Ye,i),width:E.scalingValue(De,i),height:"100%",pointerEvents:"auto"}},X.marginLeftKey)});return $e?[$e,...re]:re},ae=()=>T.map((z,$e)=>{const re=yn($e,_),Ce=xe($e)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":z.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(re),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:E.scalingValue(Ce,i),width:E.scalingValue(Pn,i),height:"100%",pointerEvents:"auto"}})},`${z.widthKey}-junction`)}),fe=()=>h.flatMap((z,$e)=>{if(!z.marginLeftKey)return[];const re=w[z.marginLeftKey]??0,X=ce($e),Ce=Math.max(re,ii),{resolvedWidth:He}=ue(z,"two-row-bottom");return a.jsx("div",{"data-controls":z.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(He),style:{position:"absolute",top:0,left:E.scalingValue(X,i),width:E.scalingValue(Ce,i),height:"100%",pointerEvents:"auto"}},z.marginLeftKey)}),F=()=>h.map((z,$e)=>{const{maxWidth:re}=ue(z,"two-row-bottom"),Ce=de($e)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":z.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(re),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:E.scalingValue(Ce,i),width:E.scalingValue(Pn,i),height:"100%",pointerEvents:"auto"}})},`${z.widthKey}-junction`)}),H=()=>!o||O?null:a.jsxs(a.Fragment,{children:[te(),ae()]}),ne=!!(t.title2||t.title3||(g??0)>0||o),q=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[k||me?oe():null,I?pe("single-row"):null,me?we(ge(t)):a.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),Te(),H()]}),ie=()=>a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...ne?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:ne?void 0:{flex:"0 0 auto",height:"auto"},children:Y(t,!0)}),H()]});return a.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:U,flexShrink:0},children:o&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-min":"0",className:`${e}-control`,style:{position:"absolute",top:0,left:0,width:"100%",height:G,pointerEvents:"auto"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...O?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${O?` ${e}-lightbox-content-area-stacked`:""}`,children:a.jsx("div",{className:`${e}-text-bar-cell${O?` ${e}-text-bar-cell-stacked`:""}`,style:O?void 0:{flex:1,minWidth:0,width:"100%"},children:O?ie():q()})})})]})}function Mv(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Rv(e){return`
7551
+ `,gv="01M3SBP3P8CMVMM1ZZ0QVD2PPF",rs={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},mv=["titleColor","subtitleColor","lightboxCounterColor","closeIconColor","closeIconHoverColor"],hv={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["gallery"]},default:[{title:"Earth-orbital mission",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Salton Sea from Above",subtitle:"Hasselblad 500 EL / Zeiss Sonnar 250 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XERA3G7J0J00XVKEXX",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module Pilot",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module 3 porch",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Command Module",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEZCK8SJPAFXCKG8QN",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"CSM and Lunar Module LM",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"David R. Scott during EVA",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Fourth day of the mission",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XES6MX14JTT1CF24BB",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Landing of the Spider1",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEMGJWCYNPZ3ETQTKM",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c","d","e","f"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},imageCorners:{type:"number",scope:"layout",title:"Round corners",min:0,display:{type:"numeric-input"}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...rs.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},subtitleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},subtitleFontSettings:{...rs.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},subtitleFontSize:{type:"number",scope:"layout",title:"Subtitle Font Size",display:{type:"font-size"}},subtitleLineHeight:{type:"number",scope:"layout",title:"Subtitle Line Height",display:{type:"line-height-input"}},subtitleLetterSpacing:{type:"number",scope:"layout",title:"Subtitle Letter Spacing",display:{type:"letter-spacing-input"}},subtitleWordSpacing:{type:"number",scope:"layout",title:"Subtitle Word Spacing",display:{type:"word-spacing-input"}},subtitleTextAppearance:{type:"object",scope:"layout",title:"Subtitle Text Appearance",display:{type:"text-appearance"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...rs.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",closeIcon:gv,closeIconColor:"#FFFFFF",closeIconHoverColor:"#999999",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"off",align:"top",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"b",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,imageCorners:0,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.064,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405},t:{type:"b",gridLayout:{entryWidth:.1041,horizontalGap:.26041,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:250,verticalGap:.09722,entriesCount:0,titleMarginTop:.01953125,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.03255,titleLineHeight:.03255,titleLetterSpacing:-.00118,subtitleFontSize:.01822,subtitleLineHeight:.02083,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01,contentMarginTop:.026,closeIconMaxWidth:.03906,iconMarginRight:.026},d:{type:"b",gridLayout:{entryWidth:.0833,horizontalGap:.25,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.closeIcon.display.visible",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.closeIconMaxWidth.display.visible",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.closeIconColor.display.visible",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.closeIconHoverColor.display.visible",value:!1}},{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","align","entriesCount","lightbox","imageDisplay","imageCorners","lightboxImageDisplay","contentMarginTop","closeIconMaxWidth","iconMarginRight","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","verticalGap"]},{type:"row",title:"",items:["entriesCount","showText"]},{type:"row",title:"",items:["alignEntries","align"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay","imageCorners"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","direction"]},{type:"group",title:"",items:["sliderTiming","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...mv],panelIds:["general","imageSettings","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor","closeIconColor","closeIconHoverColor"]}}},fv={element:cv,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.assetId",placeholderEnabled:!0}],parameters:[{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"subtitleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",subtitleFontSettings:"subtitleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"},schema:hv,sourceCode:pv},yv=50,Rc=10,Al="cntrl-lightbox-journal",Da=Al,Vs=`${Al}-`,za=e=>`${Al}-${e}`,Fl=e=>e===Da||e.startsWith(Vs),Ec=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},kc=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=Ec(t.get(za(e)));if(i)return i}const n=Ec(t.get(Da));if(n)return n;for(const[i]of t){if(!i.startsWith(Vs))continue;const o=i.slice(Vs.length);if(!/^\d+$/.test(o))continue;const r=Number.parseInt(o,10);if(Number.isFinite(r)&&r>=1)return r}return null},Ac=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},np=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{Fl(l)&&i.searchParams.delete(l)}),t?i.searchParams.set(za(t),String(e)):i.searchParams.set(Da,String(e));const o=n?"replaceState":"pushState",r=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",r)},vv=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===za(e)||i===Da:Fl(i));if(n.forEach(i=>t.searchParams.delete(i)),n.length>0){const i=`${t.pathname}${t.search}${t.hash}`;window.history.replaceState(window.history.state,"",i)}},ip=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(za(e)):[...t.keys()].some(n=>Fl(n))},xv=(e,t)=>{if(ip(t)){if(e){window.history.back();return}vv(t)}},bv=20,Sv=2,as=e=>`max(${e}, ${bv}px)`,Po=e=>((e==null?void 0:e.image)??[]).slice(0,Sv),op=e=>e.reduce((t,n)=>t+Po(n).length,0),wv=(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}},$v=(e,t)=>{const n=op(e),{start:i,end:o}=wv(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},pa=(e,t)=>t==="B"?e.flatMap((n,i)=>Po(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Po(n)})),Cv=(e,t,n,i)=>{var r;if(n==="B")return`${t+1} / ${e.length}`;const o=((r=e[t])==null?void 0:r.entryIndex)??0;return $v(i,o)},Fc=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Tv=(e,t,n)=>e==="B"?t.length>1:op(n)>1,Pn=.004,ii=.004,wo={title1Width:.13,title2Width:.13,title3Width:.14},Ti=(e,t,n,i,o)=>{const r=[];return t.title1&&r.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&r.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&r.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),r},Mo=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},c)=>{if(r<=0||c<=0)return{overflow:r,widths:[c,...l]};const d=Math.min(r,c);return{overflow:r-d,widths:[c-d,...l]}},{overflow:i-1,widths:[]});return o},vr=(e,t)=>Mo(e,t),yn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Ii=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Mo(e.length,n),effective:vr(e.length,n)}},rp=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),ap=(e,t,n,i)=>e.slice(0,i+1).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),Ri=["title1","title2","title3","count"],wt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Nl={title1:"1",title2:"2",title3:"3",count:"Count"},_l=e=>[wt(e,"fontFamily"),wt(e,"fontSettings"),{type:"row",items:[wt(e,"fontSize"),wt(e,"lineHeight"),wt(e,"letterSpacing"),wt(e,"wordSpacing")]},wt(e,"textAlign"),wt(e,"textAppearance")],Iv=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Ri.map(e=>[Nl[e],_l(e)]))}),Lv={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Pv={title1:.02,title2:.02,title3:.02,count:.017},Vi=(e,t)=>{const n=i=>{const o=wt(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[Lv[t]]}},Gi=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??Pv[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return nn(i,n)};function sp({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l}){const{title1Width:c,title2Width:d,title3Width:u,title1MarginLeft:p=0,title2MarginLeft:y=0,title3MarginLeft:x=0,titleRowMarginBottom:g=0,titleHeaderLayout:h="desktop",contentMarginTop:b=0,iconMarginRight:S=0,closeIcon:_=null,closeIconMaxWidth:v=0,closeIconColor:L="#000000",closeIconHoverColor:P="#cccccc"}=n,q=E.scalingValue(b,i),X=E.scalingValue(Math.max(b,ii),i),B=E.scalingValue(S,i),H=E.scalingValue(g,i),O=h==="mobile",C=Gi("title1",Vi(n,"title1"),i),$=Gi("title2",Vi(n,"title2"),i),Q=Gi("title3",Vi(n,"title3"),i),R=s.useMemo(()=>({title1Width:c??wo.title1Width,title2Width:d??wo.title2Width,title3Width:u??wo.title3Width}),[c,d,u]),T=s.useMemo(()=>({title2MarginLeft:y,title3MarginLeft:x}),[y,x]),w=s.useMemo(()=>Ti(e,t,C,$,Q),[e,t,C,$,Q]),V=s.useMemo(()=>w.map(W=>R[W.widthKey]),[w,R]),z=s.useMemo(()=>Mo(w.length,V),[w.length,V]),U=s.useMemo(()=>vr(w.length,V),[w.length,V]),M=s.useMemo(()=>w.filter(W=>W.prefix==="title1"),[w]),f=s.useMemo(()=>w.filter(W=>W.prefix==="title2"||W.prefix==="title3"),[w]),K=s.useMemo(()=>Ii(M,R),[M,R]),G=s.useMemo(()=>Ii(f,R),[f,R]),ge=!!(t.title1||t.title2||t.title3),k=_!==null;if(!(ge||k))return null;const I=(p??0)>0||o,ue=(W,Se)=>{const le=w.findIndex(Te=>Te.prefix===W.prefix);if(!O||Se==="single-row")return{effectiveWidth:U[le]??0,resolvedWidth:z[le]??0,maxWidth:yn(le,z)};if(Se==="two-row-top"){const Te=M.findIndex(Fe=>Fe.prefix===W.prefix);return{effectiveWidth:K.effective[Te]??0,resolvedWidth:K.resolved[Te]??0,maxWidth:yn(Te,K.resolved)}}const j=f.findIndex(Te=>Te.prefix===W.prefix);return{effectiveWidth:G.effective[j]??0,resolvedWidth:G.resolved[j]??0,maxWidth:yn(j,G.resolved)}},ee=(W,Se,le)=>{if(!O||le==="single-row"){const De=W.findIndex(ye=>ye.prefix===Se.prefix),ze=W.map(ye=>R[ye.widthKey]),Ze=Mo(W.length,ze);return{effectiveWidth:vr(W.length,ze)[De]??0,resolvedWidth:Ze[De]??0,maxWidth:yn(De,Ze)}}if(le==="two-row-top"){const De=W.filter(ye=>ye.prefix==="title1"),ze=De.findIndex(ye=>ye.prefix===Se.prefix),{resolved:Ze,effective:Ue}=Ii(De,R);return{effectiveWidth:Ue[ze]??0,resolvedWidth:Ze[ze]??0,maxWidth:yn(ze,Ze)}}const j=W.filter(De=>De.prefix==="title2"||De.prefix==="title3"),Te=j.findIndex(De=>De.prefix===Se.prefix),{resolved:Fe,effective:Ye}=Ii(j,R);return{effectiveWidth:Ye[Te]??0,resolvedWidth:Fe[Te]??0,maxWidth:yn(Te,Fe)}},xe=W=>ap(w,z,T,W)+(O?0:p??0),Le=()=>O?0:p??0,se=W=>f.slice(0,W).reduce((Se,le,j)=>Se+(le.marginLeftKey?T[le.marginLeftKey]??0:0)+(G.resolved[j]??0),0),de=W=>{const Se=f[W];return se(W)+(Se.marginLeftKey?T[Se.marginLeftKey]??0:0)+(G.resolved[W]??0)},Z=(W,Se,le)=>{const j=W.marginLeftKey?T[W.marginLeftKey]??0:0,{effectiveWidth:Te,resolvedWidth:Fe,maxWidth:Ye}=le??ue(W,Se),De=Math.max(j,ii),ze=o&&Se==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":W.prefix,style:{width:E.scalingValue(Te,i),...j>0?{marginLeft:E.scalingValue(j,i)}:{}},children:[a.jsx("p",{className:W.className,style:W.style,children:W.text}),ze&&W.marginLeftKey?a.jsx("div",{"data-controls":W.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Fe),style:{position:"absolute",top:0,left:E.scalingValue(-j,i),width:E.scalingValue(De,i),height:"100%",pointerEvents:"auto"}}):null,ze?a.jsx("div",{"data-controls":W.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:E.scalingValue(-Pn/2,i),width:E.scalingValue(Pn,i),height:"100%",pointerEvents:"auto"}}):null]},W.className)},pe=(W="two-row")=>{const Se=w.findIndex(Te=>Te.prefix==="title1"),le=Se>=0?z[Se]:R.title1Width,j=W==="two-row"&&o;return a.jsx("div",{...j?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(le)}:{},style:{width:E.scalingValue(p??0,i),flexShrink:0,alignSelf:"stretch",...j?{pointerEvents:"auto"}:{}}})},ie=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:C,"aria-hidden":"true",children:" "}),me=W=>{const Se=Ti(e,W,C,$,Q);return a.jsx(a.Fragment,{children:Se.map(le=>Z(le,"single-row",ee(Se,le,"single-row")))})},ve=W=>{const Se=Ti(e,W,C,$,Q),le=Se.find(j=>j.prefix==="title1");return le?Z(le,"two-row-top",ee(Se,le,"two-row-top")):null},Ee=(W,Se=!1)=>{const le=Ti(e,W,C,$,Q),j=le.filter(Ye=>Ye.prefix==="title2"||Ye.prefix==="title3"),Te=o&&Se;return j.length>0||Te||(g??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(Ye=>Z(Ye,"two-row-bottom",ee(le,Ye,"two-row-bottom")))}),Se&&o?a.jsxs(a.Fragment,{children:[fe(),N()]}):null]}):null,(g??0)>0||Te?a.jsx("div",{"data-controls":Te?"titleRowMarginBottom":void 0,"data-controls-axis":Te?"y":void 0,"data-controls-reverse":Te?"":void 0,className:Te?`${e}-control`:void 0,style:{height:H,width:"100%",flexShrink:0,pointerEvents:Te?"auto":"none"}}):null]}):null},Re=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:E.scalingValue(v??0,i),height:E.scalingValue(v??0,i),marginRight:B,"--close-icon-hover-color":P},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:W=>{W.stopPropagation(),l==null||l()},"aria-label":"Close",children:a.jsx(gn,{url:_??"",fill:L,hoverFill:i&&!r?L:P,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:B,height:"100%",pointerEvents:"auto"}})]}),Ce=()=>k?a.jsx("div",{className:`${e}-titles-row-header-controls`,children:Re()}):null,$e=W=>a.jsx("div",{className:`${e}-titles-row-titles`,children:a.jsx("div",{className:`${e}-titles-stack`,children:W})}),m=W=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[k||ge?ie():null,I?pe("two-row"):null,$e(W),Ce()]}),Y=(W,Se=!1)=>a.jsxs(a.Fragment,{children:[m(ve(W)),Ee(W,Se)]}),te=()=>{const W=O?-1:w.findIndex(j=>j.prefix==="title1"),Se=!O&&(o||(p??0)>0)?(()=>{const j=p??0,Te=W>=0?z[W]:R.title1Width,Fe=Math.max(j,ii);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Te),style:{position:"absolute",top:0,left:0,width:E.scalingValue(Fe,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,le=w.flatMap((j,Te)=>{if(!j.marginLeftKey)return[];const Fe=T[j.marginLeftKey]??0,Ye=rp(w,z,T,Te)+Le(),De=Math.max(Fe,ii);return a.jsx("div",{"data-controls":j.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(z[Te]),style:{position:"absolute",top:0,left:E.scalingValue(Ye,i),width:E.scalingValue(De,i),height:"100%",pointerEvents:"auto"}},j.marginLeftKey)});return Se?[Se,...le]:le},oe=()=>w.map((W,Se)=>{const le=yn(Se,z),Te=xe(Se)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":W.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(le),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:E.scalingValue(Te,i),width:E.scalingValue(Pn,i),height:"100%",pointerEvents:"auto"}})},`${W.widthKey}-junction`)}),fe=()=>f.flatMap((W,Se)=>{if(!W.marginLeftKey)return[];const le=T[W.marginLeftKey]??0,j=se(Se),Te=Math.max(le,ii),{resolvedWidth:Fe}=ue(W,"two-row-bottom");return a.jsx("div",{"data-controls":W.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Fe),style:{position:"absolute",top:0,left:E.scalingValue(j,i),width:E.scalingValue(Te,i),height:"100%",pointerEvents:"auto"}},W.marginLeftKey)}),N=()=>f.map((W,Se)=>{const{maxWidth:le}=ue(W,"two-row-bottom"),Te=de(Se)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":W.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(le),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:E.scalingValue(Te,i),width:E.scalingValue(Pn,i),height:"100%",pointerEvents:"auto"}})},`${W.widthKey}-junction`)}),F=()=>!o||O?null:a.jsxs(a.Fragment,{children:[te(),oe()]}),ne=!!(t.title2||t.title3||(g??0)>0||o),re=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[k||ge?ie():null,I?pe("single-row"):null,ge?$e(me(t)):a.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),Ce(),F()]}),J=()=>a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...ne?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:ne?void 0:{flex:"0 0 auto",height:"auto"},children:Y(t,!0)}),F()]});return a.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:q,flexShrink:0},children:o&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-min":"0",className:`${e}-control`,style:{position:"absolute",top:0,left:0,width:"100%",height:X,pointerEvents:"auto"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...O?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${O?` ${e}-lightbox-content-area-stacked`:""}`,children:a.jsx("div",{className:`${e}-text-bar-cell${O?` ${e}-text-bar-cell-stacked`:""}`,style:O?void 0:{flex:1,minWidth:0,width:"100%"},children:O?J():re()})})})]})}function Mv(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Rv(e){return`
7552
7552
  .${e}-wrapper {
7553
7553
  display: grid;
7554
7554
  align-items: start;
@@ -7868,7 +7868,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
7868
7868
  pointer-events: auto;
7869
7869
  flex-shrink: 0;
7870
7870
  }
7871
- `}const Nc={assetId:"",name:"",objectFit:"cover"},On=500,qo=650,$n="cubic-bezier(0.22, 1, 0.36, 1)",Ev=72,kv=50,Av=1e4,Fv=650,Nv=500;function _v(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function lp(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=Sa(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function Hv(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?lp(i,n):null}function Wv(e){return e.reduce((t,n,i)=>{const o=Hl(n.gallery),l=Wl(o).filter(c=>c.lightboxMedia).map(c=>c.lightboxMedia);return l.length===0||t.push({gridIndex:i,items:l,entry:{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}),t},[])}function ir(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function _c(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return ir(e,i,n)}const Ov=.03;function cp(e){return e.width*Ov}const ss={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Br(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Hc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Dv(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Gs(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,c=o/r;if(l>c){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const d=r*l;return{width:d,height:r,left:i.left+(o-d)/2,top:i.top}}function zv(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Gs(e,t.width,t.height)}function Bv(e,t){if(jo(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.assetId,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.assetId,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.assetId,n.naturalWidth,n.naturalHeight)},n.src=e.assetId}function jv(e){const t=new Set,n=[];for(const i of e){const o=Hl(i.gallery),r=Wl(o);for(const l of r)for(const c of[l.displayMedia,l.lightboxMedia])c!=null&&c.assetId&&!t.has(c.assetId)&&(t.add(c.assetId),n.push(c))}return n}function Vv({mediaList:e}){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=>jo(t)?a.jsx("video",{src:t.assetId,preload:"auto",muted:!0,playsInline:!0},t.assetId):a.jsx("img",{src:t.assetId,alt:""},t.assetId))})}function Ro(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:c}=n,d=cp(n);return t==="left"?{left:l+d-i,top:r,width:i,height:o}:{left:l+c-d,top:r,width:i,height:o}}function wa(e,t,n){const i=Ro(e,t,n);return{...i,left:2*i.left-e.left}}function Gv(e,t,n){const{left:i,width:o}=n,r=cp(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function dp(e,t,n,i){const o=Ro(e,"left",i),r=Ro(e,"right",i),l=wa(e,"left",i),c=wa(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:c,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:c};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function Xv(e,t,n,i){const{start:o,end:r}=dp(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function Uv(e,t,n){const i=Ro(e,t,n),o=wa(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function up(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function Hl(e){if(!e)return;if(up(e))return e;if(!Array.isArray(e))return;const[t,n]=e,i=t!=null&&t.assetId?t:void 0,o=n!=null&&n.assetId?n:void 0;if(!(!i&&!o))return[{media:[o??i??Nc,i??o??Nc]}]}function qv(e){const[t,n]=e.media;return n!=null&&n.assetId?n:t!=null&&t.assetId?t:null}function Yv(e){const[t]=e.media;return t!=null&&t.assetId?t:null}function Wl(e){if(!Array.isArray(e)||e.length===0)return[];if(up(e)){const t=[];for(const n of e){const i=qv(n);if(!i)continue;const o=Yv(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.assetId?o:null})}return t}return e.filter(t=>t==null?void 0:t.assetId).map(t=>({displayMedia:t,lightboxMedia:t}))}function jo(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.assetId)}function Kv({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return jo(e)?a.jsx("video",{src:e.assetId,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onClick:o}):a.jsx("img",{src:e.assetId,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function Qv({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:r,onTransitionEnd:l}){const c=s.useRef(null);return s.useEffect(()=>{const d=c.current;return n==null||n(d??null),()=>{d==null||d.pause(),n==null||n(null)}},[e,n]),a.jsx("div",{style:i,onTransitionEnd:l,children:a.jsx("video",{ref:c,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:r,onClick:d=>d.stopPropagation(),style:o},e)})}function jr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return jo(e)?a.jsx("video",{src:e.assetId,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.assetId,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.assetId,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.assetId,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function Zv({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,canNavigate:d,lightboxEntries:u,entryIdx:p,layoutId:y,sourceRect:x,resolveCloseSourceRect:g,onClose:f,onPrev:b,onNext:S}){const W=s.useRef(null),v=s.useRef(null),L=s.useRef(null),M=s.useRef(new Map),[U,G]=s.useState(0),B=s.useRef(null),N=s.useRef(0),O=s.useRef(0),C=s.useRef("none"),$=s.useRef(!1),K=s.useRef(!1),R=s.useRef(!1),w=s.useRef(null),T=s.useRef(null),j=s.useRef(null),_=s.useRef(()=>{}),Q=s.useRef(null),P=s.useRef(null),h=s.useRef(null),J=s.useRef(!1),[V,me]=s.useState(null),[k,le]=s.useState(ss),[I,ue]=s.useState(0),[ee,xe]=s.useState("opening"),[Le,ce]=s.useState(0),[de,Z]=s.useState(0),[pe,oe]=s.useState(!1),[ge,be]=s.useState(null),[Re,Ee]=s.useState(null),[Te,we]=s.useState(null),[m,Y]=s.useState(!1),[te,ae]=s.useState(null),[fe,F]=s.useState(!1),H=s.useRef(!1),[ne,q]=s.useState(!1),[ie,z]=s.useState(!1),$e=s.useRef(n),re=s.useRef(void 0),X=t[n],Ce=X?jo(X):!1,He=de!==0||pe,Ye=!l&&(!r||!!c),De=d&&!l,ze=u.length>1,Ze=s.useCallback((D,Ie)=>t.length<=1?null:t[(D+Ie+t.length)%t.length]??null,[t]),Ue=ze?ir(u,p,-1):Ze(n,-1),ye=ze?ir(u,p,1):Ze(n,1),Ne=ge===-1&&He?ze&&Re!==null?ir(u,Re,-1):Te!==null?Ze(Te,-1):null:null,Ve=ge===1&&He?ze&&Re!==null?ir(u,Re,1):Te!==null?Ze(Te,1):null:null,Je=Ne&&Ne.assetId!==(Ue==null?void 0:Ue.assetId)?Ne:null,et=Ve&&Ve.assetId!==(ye==null?void 0:ye.assetId)?Ve:null,ot=Ue&&De?(()=>{const D=ze?_c(u,p,-1):t.length>2?Ze((n-1+t.length)%t.length,-1):null;return D&&D.assetId!==Ue.assetId?D:null})():null,lt=ye&&De?(()=>{const D=ze?_c(u,p,1):t.length>2?Ze((n+1)%t.length,1):null;return D&&D.assetId!==ye.assetId?D:null})():null,Ke=Je??ot,ht=et??lt,tt=s.useCallback((D,Ie,Be)=>{if(!D||!Ie||!Be)return;const ke=M.current,vt=ke.get(D);(vt==null?void 0:vt.width)===Ie&&(vt==null?void 0:vt.height)===Be||(ke.set(D,{width:Ie,height:Be}),G(Ct=>Ct+1))},[]),Ge=s.useCallback(D=>{if(!(D!=null&&D.assetId))return null;const Ie=M.current.get(D.assetId);return zv(v.current,Ie)},[U,I]),We=s.useCallback(()=>{if(!X)return;const D=Ge(X);if(D){me(D);return}const Ie=v.current;Ie&&me(Hc(Ie))},[X,Ge]),Fe=s.useCallback(D=>{if(ze){const Ie=u.length;Ee((p+D+Ie)%Ie),we(null);return}t.length>1&&(we((n+D+t.length)%t.length),Ee(null))},[ze,u.length,p,t.length,n]),ve=s.useCallback(D=>{R.current=D,oe(D)},[]),_e=s.useCallback(()=>{w.current!==null&&(window.clearTimeout(w.current),w.current=null)},[]),Xe=s.useCallback(()=>{_e(),w.current=window.setTimeout(()=>{_e(),ve(!1)},qo+32)},[_e,ve]),ct=s.useCallback(()=>{const D=W.current;if(!D){le({left:0,top:0,width:typeof window<"u"?window.innerWidth:ss.width,height:typeof window<"u"?window.innerHeight:ss.height});return}const Ie=D.getBoundingClientRect();le({left:Ie.left,top:Ie.top,width:Ie.width,height:Ie.height})},[]),rt=s.useCallback((D,Ie)=>{if(He){if(ne&&!pe)return`translate(${de}px, 0px)`;if(pe&&ge!==null){const Be=Ge(D);if(!Be)return;const{x:ke,y:vt}=Xv(Be,Ie,ge,k);return`translate(${ke}px, ${vt}px)`}if(pe)return"translate(0px, 0px)"}},[He,ne,pe,de,ge,k,Ge]),xt=s.useCallback(()=>{const D=T.current;T.current=null,_e(),ve(!1),be(null),Ee(null),we(null),Z(0),q(!1),$.current=!1,O.current=0,C.current="none",D===-1?b():D===1&&S()},[_e,ve,b,S]),pt=s.useCallback(()=>{_e(),w.current=window.setTimeout(()=>{T.current!==null&&xt()},qo+32)},[_e,xt]),It=s.useCallback(()=>{_e(),T.current=null,ve(!1),be(null),Ee(null),we(null),Z(0),q(!1),$.current=!1,O.current=0,C.current="none"},[_e,ve]),nt=s.useCallback(D=>{if(!(!De||!V)){if(R.current){if(T.current===D){j.current=D,xt();return}It()}_e(),Fe(D),T.current=D,be(D),ve(!0),pt()}},[De,V,xt,It,_e,Fe,ve,pt]);_.current=nt;const bt=s.useCallback(()=>{Q.current=null,J.current=!1,P.current!==null&&(window.clearInterval(P.current),P.current=null),h.current!==null&&(window.clearTimeout(h.current),h.current=null)},[]),Lt=s.useCallback(D=>{P.current!==null&&window.clearInterval(P.current);const Ie=J.current?Nv:Fv;P.current=window.setInterval(()=>{_.current(D)},Ie)},[]),Ut=s.useCallback(D=>{Q.current!==D&&(bt(),Q.current=D,J.current=!1,_.current(D),Lt(D),h.current=window.setTimeout(()=>{h.current=null,Q.current===D&&(J.current=!0,Lt(D))},Av))},[bt,Lt]),Ft=s.useCallback(()=>{const D=v.current;if(!D)return;const Ie=X==null?void 0:X.assetId,Be=Ie?M.current.get(Ie):void 0;if(Be!=null&&Be.width&&(Be!=null&&Be.height)){me(Gs(D,Be.width,Be.height));return}const ke=L.current;if(ke&&Ie&&(ke.src===Ie||ke.currentSrc===Ie)){const{width:Ct,height:at}=Dv(ke);if(Ct&&at){tt(Ie,Ct,at),me(Gs(D,Ct,at));return}}const vt=Hc(D);!vt.width||!vt.height||me(vt)},[X==null?void 0:X.assetId,tt]),Me=s.useCallback(D=>{if(L.current=D,!!D){if(D instanceof HTMLVideoElement){D.readyState>=1&&D.videoWidth>0&&Ft();return}D.complete&&D.naturalWidth>0&&Ft()}},[Ft]),Oe=s.useCallback(()=>{ct(),Ft(),ue(D=>D+1)},[ct,Ft]);s.useEffect(()=>{Oe();const D=v.current,Ie=W.current,Be=new ResizeObserver(()=>Oe());return D&&Be.observe(D),Ie&&Be.observe(Ie),window.addEventListener("resize",Oe),()=>{Be.disconnect(),window.removeEventListener("resize",Oe)}},[Oe,n,y]),s.useLayoutEffect(()=>{if(!X)return;const D=L.current;if(D){if(D instanceof HTMLImageElement&&D.complete&&D.naturalWidth>0){Ft();return}D instanceof HTMLVideoElement&&D.readyState>=1&&D.videoWidth>0&&Ft()}},[X==null?void 0:X.assetId,n,Ft]),s.useEffect(()=>{We()},[We,U]),s.useEffect(()=>{const D=new Set,Ie=[],Be=ke=>{!(ke!=null&&ke.assetId)||D.has(ke.assetId)||(D.add(ke.assetId),Ie.push(ke))};t.forEach(Be),u.forEach(ke=>ke.items.forEach(Be)),Ie.forEach(ke=>{M.current.has(ke.assetId)||Bv(ke,tt)})},[t,u,tt]),s.useEffect(()=>{if(ee!=="opening"||!V)return;if(!x){xe("open");return}Y(!1);const D=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Y(!0),xe("open")})});return()=>cancelAnimationFrame(D)},[ee,V,x]),s.useEffect(()=>{if(ee!=="closing")return;const D=setTimeout(()=>f(),On);return()=>clearTimeout(D)},[ee,f]),s.useEffect(()=>()=>{_e()},[_e]),s.useLayoutEffect(()=>{$e.current===n&&re.current===(X==null?void 0:X.assetId)||(_e(),T.current=null,be(null),Ee(null),we(null),ce(0),Z(0),ve(!1),z(!1),q(!1),N.current=0,O.current=0,C.current="none",$.current=!1,B.current=null,K.current=!1,L.current=null,We(),$e.current=n,re.current=X==null?void 0:X.assetId)},[n,X==null?void 0:X.assetId,ve,_e,We]),s.useLayoutEffect(()=>{const D=j.current;D!==null&&(j.current=null,requestAnimationFrame(()=>{_.current(D)}))},[n,p,X==null?void 0:X.assetId]),s.useLayoutEffect(()=>{if(ee==="opening"){H.current=!1,F(!1);return}if(ee!=="open"||H.current)return;if(!Ue&&!ye){H.current=!0;return}F(!1);const D=requestAnimationFrame(()=>{requestAnimationFrame(()=>{F(!0),H.current=!0})});return()=>cancelAnimationFrame(D)},[ee,Ue==null?void 0:Ue.assetId,ye==null?void 0:ye.assetId]),s.useEffect(()=>{if(ee!=="open")return;const D=()=>{const at=Tt=>{Tt.stopPropagation(),Tt.preventDefault(),document.removeEventListener("click",at,!0)};document.addEventListener("click",at,!0)},Ie=at=>{const Tt=at<0?1:-1;_e(),Fe(Tt),T.current=Tt,be(Tt),ve(!0),pt()},Be=at=>{if(Math.abs(at)>kv&&De){Ie(at);return}T.current=null,be(null),Ee(null),we(null),ve(!0),Z(0),Xe()},ke=at=>{if(at.touches.length!==1||R.current)return;const Tt=at.touches[0];K.current=!0,B.current={x:Tt.clientX,y:Tt.clientY},C.current="none",O.current=0,$.current=!1},vt=at=>{if(!B.current||at.touches.length!==1||R.current)return;const Tt=at.touches[0],Vt=Tt.clientX-B.current.x,Pt=Tt.clientY-B.current.y;if(C.current==="none"){if(Math.abs(Vt)<10&&Math.abs(Pt)<10)return;if(Math.abs(Vt)>Math.abs(Pt)){if(!De)return;C.current="horizontal"}else if(Pt>0){if(!Ye)return;C.current="vertical"}else return}if(C.current==="horizontal"){$.current=!0,q(!0),O.current=Vt,Z(Vt),at.preventDefault();return}C.current==="vertical"&&($.current=!0,q(!0),N.current=Pt,ce(Pt),at.preventDefault())},Ct=()=>{if(!B.current)return;const at=C.current,Tt=$.current;if(Tt&&at==="horizontal")Be(O.current),D();else if(Tt&&at==="vertical"){const Vt=N.current;if(Ye&&Vt>Ev){const Pt=window.innerHeight;N.current=Pt,z(!0),ce(Pt),xe("closing")}else N.current=0,ce(0);D()}else at==="horizontal"&&Math.abs(O.current)>0&&(Be(O.current),D());B.current=null,C.current="none",O.current=0,$.current=!1,q(!1)};return document.addEventListener("touchstart",ke,{passive:!0}),document.addEventListener("touchmove",vt,{passive:!1}),document.addEventListener("touchend",Ct),document.addEventListener("touchcancel",Ct),()=>{document.removeEventListener("touchstart",ke),document.removeEventListener("touchmove",vt),document.removeEventListener("touchend",Ct),document.removeEventListener("touchcancel",Ct)}},[ee,De,ve,Xe,_e,Ye,pt,Fe]);const St=s.useCallback(()=>{const D=(g==null?void 0:g())??x??null;D&&V&&(ae(D),Y(!0)),xe("closing")},[g,x,V]);s.useEffect(()=>{const D=ke=>{if(ke.key==="Escape"){if(r&&c||ee==="closing")return;bt(),St();return}if(ke.key!=="ArrowLeft"&&ke.key!=="ArrowRight"||ee!=="open"||!De)return;ke.preventDefault();const vt=ke.key==="ArrowLeft"?-1:1;ke.repeat&&Q.current===vt||Ut(vt)},Ie=ke=>{if(ke.key!=="ArrowLeft"&&ke.key!=="ArrowRight")return;const vt=ke.key==="ArrowLeft"?-1:1;Q.current===vt&&bt()},Be=()=>{bt()};return window.addEventListener("keydown",D),window.addEventListener("keyup",Ie),window.addEventListener("blur",Be),()=>{window.removeEventListener("keydown",D),window.removeEventListener("keyup",Ie),window.removeEventListener("blur",Be),bt()}},[ee,r,c,St,De,Ut,bt]),s.useEffect(()=>{ee!=="open"&&bt()},[ee,bt]);const Mt=()=>{ee==="closing"||l||St()},Qe=ee==="open",kt=ee==="closing",Bt=Le>0?Math.max(0,1-Le/500):1,Wt=Le>0?Math.max(.35,1-Le/500):1,At=s.useCallback(D=>{if(!(D.propertyName!=="transform"||!R.current)){if(T.current!==null){xt();return}_e(),ve(!1)}},[_e,ve,xt]),Ae=ee==="closing"?te??x:x,ft=Ae&&V&&(ee==="opening"||kt)?_v(Ae,V):void 0,gt=He&&X?rt(X,"center"):Le>0?`translateY(${Le}px)`:ft,dt=V?Br(V,k):null,yt=!!(Ae&&V),ut=yt&&(ee==="closing"||ee==="open"&&m),it={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:gt,opacity:Le>0?Wt:yt?1:ee==="opening"||kt?0:1,transition:ne&&!pe?"none":pe?`transform ${qo}ms ${$n}`:ie?`transform ${On}ms ${$n}, opacity ${On}ms ${$n}`:ut?`transform ${On}ms ${$n}`:ee==="opening"||kt?`opacity ${On}ms ${$n}`:"none",pointerEvents:Ce&&Qe&&!He?"auto":"none",touchAction:Ce&&Qe?"none":void 0,zIndex:1,overflow:Ce?"hidden":void 0},Nt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Qe&&!He?"auto":"none"},$t=(D,Ie,Be="adjacent")=>{const ke=Ge(D);if(!ke)return{display:"none"};const vt=Be==="far"?Ie==="left"?"far-left":"far-right":Ie==="left"?"left-adjacent":"right-adjacent",{start:Ct}=ge!==null?dp(ke,vt,ge,k):{start:Be==="far"?wa(ke,Ie,k):Ro(ke,Ie,k)},at=Br(Ct,k),Tt=rt(D,vt),Vt=!He&&Be==="adjacent"&&Qe&&!fe?Uv(ke,Ie,k):null,Pt=Be==="far"&&He&&ge===(Ie==="left"?-1:1),Zt=ne&&!pe?!1:pe,on=Be==="adjacent"&&Qe&&fe&&!He;return{position:"absolute",top:at.top,left:at.left,width:at.width,height:at.height,objectFit:"contain",transform:Tt??(Vt?`translate(${Vt.x}px, ${Vt.y}px)`:void 0),opacity:Be==="far"?Qe&&Pt?1:0:Qe?1:0,transition:Zt?Be==="far"?`transform ${qo}ms ${$n}`:`transform ${qo}ms ${$n}, opacity ${On}ms ${$n}`:on?`transform ${On}ms ${$n}`:ee==="opening"||kt?`opacity ${On}ms ${$n}`:"none",pointerEvents:"none",zIndex:1}},Qt=(D,Ie)=>{const Be=Ge(D);return Be?Gv(Ro(Be,Ie,k),Ie,k):null},Xt=D=>Ie=>{if(!l){if(K.current){K.current=!1;return}Ie.stopPropagation(),nt(D)}},Ot=Ue?Qt(Ue,"left"):null,jt=ye?Qt(ye,"right"):null,Dt=Ot?Br(Ot,k):null,zt=jt?Br(jt,k):null;return a.jsxs("div",{ref:W,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:ee==="open"?"none":void 0},onClick:Mt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Qe?Bt:0,transition:ne?"none":`opacity ${On}ms ${$n}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:v,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:Qe?1:0,transition:ne?"none":`opacity ${On}ms ${$n}`,pointerEvents:"none"},children:a.jsx(sp,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,onClose:Mt})})]}),Qe&&Ke&&a.jsx(jr,{media:Ke,style:$t(Ke,"left","far"),onMeasure:tt,onTransitionEnd:At},`far-prev-${Ke.assetId}`),Qe&&Ue&&a.jsxs(a.Fragment,{children:[a.jsx(jr,{media:Ue,style:$t(Ue,"left"),onMeasure:tt,onTransitionEnd:At},`prev-${Ue.assetId}`),Dt&&a.jsx("div",{style:{position:"absolute",top:Dt.top,left:Dt.left,width:Dt.width,height:Dt.height,cursor:l||ne?"default":"pointer",pointerEvents:l||ne?"none":"auto",zIndex:3},onClick:Xt(-1)})]}),Qe&&ye&&a.jsxs(a.Fragment,{children:[a.jsx(jr,{media:ye,style:$t(ye,"right"),onMeasure:tt,onTransitionEnd:At},`next-${ye.assetId}`),zt&&a.jsx("div",{style:{position:"absolute",top:zt.top,left:zt.left,width:zt.width,height:zt.height,cursor:l||ne?"default":"pointer",pointerEvents:l||ne?"none":"auto",zIndex:3},onClick:Xt(1)})]}),Qe&&ht&&a.jsx(jr,{media:ht,style:$t(ht,"right","far"),onMeasure:tt,onTransitionEnd:At},`far-next-${ht.assetId}`),V&&X&&(Ce?a.jsx(Qv,{src:X.assetId,phase:ee,onMediaElement:Me,wrapperStyle:it,videoStyle:Nt,onLoadedMetadata:Ft,onTransitionEnd:At},`${n}-${X.assetId}`):a.jsx("img",{ref:Me,src:X.assetId,alt:X.name,onLoad:Ft,onTransitionEnd:At,style:it},`${n}-${X.assetId}`))]})}function Jv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:c}=E.useScopedStyles(),{gridLayout:d,verticalGap:u,align:p="top",imageDisplay:y}=e,x=(y==null?void 0:y.display)==="cover",g=(y==null?void 0:y.ratioValue)??"1:1",f=(y==null?void 0:y.reversed)??!1,[b,S]=g.split(":").map(Number),L=`${f?S:b} / ${f?b:S}`,M=d.entryWidth??.2,U=d.columnsCount,G=E.scalingValue(M,n),B=E.scalingValue(d.horizontalGap??0,n),N=G,O=G,C={width:N,...x?{aspectRatio:L,height:"auto",overflow:"hidden"}:{height:"auto"}},$=x?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},K=s.useRef(null),[R,w]=s.useState(!1),[T,j]=s.useState([]),[_,Q]=s.useState(0),[P,h]=s.useState(0),[J,V]=s.useState(null),[me,k]=s.useState({title1:"",title2:"",title3:""}),le=(()=>{const Te={},we=K.current?getComputedStyle(K.current).getPropertyValue("--cntrl-article-width").trim():"";return we&&(Te["--cntrl-article-width"]=we),Te})(),I=!n||i||o,ue=s.useMemo(()=>Rv(c),[c]),ee=t??[],xe=ee.length%U||U,Le=xe<U&&ee.length>0,ce=ee.length-xe,de=Le?Math.floor((U-xe)/2)+1:1,Z=s.useMemo(()=>Wv(ee),[ee]),pe=s.useMemo(()=>jv(ee),[ee]),oe=(Te,we,m)=>{if(n&&!o&&!i)return;const Y=Z.findIndex(ae=>ae.gridIndex===Te);if(Y<0)return;const te=Z[Y];h(Y),j(te.items),Q(we),k(te.entry),V(m??null),w(!0)},ge=s.useCallback(()=>{w(!1),V(null)},[]),be=s.useCallback(()=>{const Te=Z[P];return!Te||!K.current?J:Hv(K.current,Te.gridIndex,x?"cover":"contain")??J},[Z,P,J,x]),Re=s.useCallback(Te=>{if(Z.length>1){const we=Z.length,m=(P+Te+we)%we,Y=Z[m],te=Math.min(_,Y.items.length-1);h(m),j(Y.items),Q(te),k(Y.entry);return}Q(we=>(we+Te+T.length)%T.length)},[Z,P,_,T.length]),Ee=Z.length>1||T.length>1;return s.useEffect(()=>{if(!R||typeof document>"u")return;const Te=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Te}},[R]),s.useEffect(()=>{!n||o||i||w(!1)},[n,o,i]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ue}}),a.jsx(Vv,{mediaList:pe}),a.jsx("div",{ref:K,className:`${c}-wrapper ${c}-align-entries ${c}-image-align-${p}`.trim(),style:{gridTemplateColumns:`repeat(${U}, ${G})`,rowGap:0,columnGap:B,width:E.scalingValue(d.wrapperWidth??0,n),[`--${c}-align-entries-row-gap`]:E.scalingValue(u??0,n)},children:ee.map((Te,we)=>{const m=Hl(Te.gallery),Y=Wl(m),te=Y.filter(q=>q.lightboxMedia).map(q=>q.lightboxMedia),ae=Math.floor(we/U)===Math.ceil(ee.length/U)-1,fe=Le&&we>=ce?`${de+(we-ce)}`:void 0,F=Y[0],H=F!=null&&F.lightboxMedia?te.findIndex(q=>q.assetId===F.lightboxMedia.assetId):-1,ne=a.jsx("div",{className:`${c}-item-image-wrapper`,style:C,children:Y.length>0&&a.jsx(Kv,{media:F.displayMedia,gridIndex:we,className:`${c}-item-${jo(F.displayMedia)?"video":"image"}`.trim(),style:$,onMediaClick:I&&H>=0?q=>oe(we,H,lp(q.currentTarget,x?"cover":"contain")):void 0})});return a.jsx("div",{className:`${c}-item`,children:a.jsxs("div",{className:[o?`${c}-item-inner`:`${c}-item-inner-hidden`,ae?`${c}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:G,...fe?{gridColumn:fe}:{}},children:[a.jsx("div",{className:`${c}-item-title-row`,children:a.jsx("div",{style:{height:0,width:O}})}),a.jsx("a",{className:`${c}-item-image-link`,children:ne}),a.jsx("div",{className:`${c}-item-subtitle-row`,children:a.jsx("div",{style:{height:0,width:O}})})]})},we)})}),R&&typeof document<"u"&&(()=>{const Te=(l?document.getElementById(l):null)??document.body;return qn.createPortal(a.jsx("div",{style:le,"data-selection":"none",children:a.jsx(Zv,{prefix:c,items:T,index:_,entry:me,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:Ee,lightboxEntries:Z,entryIdx:P,layoutId:r,sourceRect:J,resolveCloseSourceRect:be,onClose:ge,onPrev:()=>Re(-1),onNext:()=>Re(1)})}),Te)})()]})}const e0=`import { CommonComponentProps } from '../props';
7871
+ `}const Nc={assetId:"",name:"",objectFit:"cover"},On=500,qo=650,$n="cubic-bezier(0.22, 1, 0.36, 1)",Ev=72,kv=50,Av=1e4,Fv=650,Nv=500;function _v(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function lp(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=Sa(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function Hv(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?lp(i,n):null}function Wv(e){return e.reduce((t,n,i)=>{const o=Hl(n.gallery),l=Wl(o).filter(c=>c.lightboxMedia).map(c=>c.lightboxMedia);return l.length===0||t.push({gridIndex:i,items:l,entry:{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}),t},[])}function ir(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function _c(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return ir(e,i,n)}const Ov=.03;function cp(e){return e.width*Ov}const ss={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Br(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Hc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Dv(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Gs(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,c=o/r;if(l>c){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const d=r*l;return{width:d,height:r,left:i.left+(o-d)/2,top:i.top}}function zv(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Gs(e,t.width,t.height)}function Bv(e,t){if(jo(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.assetId,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.assetId,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.assetId,n.naturalWidth,n.naturalHeight)},n.src=e.assetId}function jv(e){const t=new Set,n=[];for(const i of e){const o=Hl(i.gallery),r=Wl(o);for(const l of r)for(const c of[l.displayMedia,l.lightboxMedia])c!=null&&c.assetId&&!t.has(c.assetId)&&(t.add(c.assetId),n.push(c))}return n}function Vv({mediaList:e}){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=>jo(t)?a.jsx("video",{src:t.assetId,preload:"auto",muted:!0,playsInline:!0},t.assetId):a.jsx("img",{src:t.assetId,alt:""},t.assetId))})}function Ro(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:c}=n,d=cp(n);return t==="left"?{left:l+d-i,top:r,width:i,height:o}:{left:l+c-d,top:r,width:i,height:o}}function wa(e,t,n){const i=Ro(e,t,n);return{...i,left:2*i.left-e.left}}function Gv(e,t,n){const{left:i,width:o}=n,r=cp(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function dp(e,t,n,i){const o=Ro(e,"left",i),r=Ro(e,"right",i),l=wa(e,"left",i),c=wa(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:c,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:c};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function Xv(e,t,n,i){const{start:o,end:r}=dp(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function Uv(e,t,n){const i=Ro(e,t,n),o=wa(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function up(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function Hl(e){if(!e)return;if(up(e))return e;if(!Array.isArray(e))return;const[t,n]=e,i=t!=null&&t.assetId?t:void 0,o=n!=null&&n.assetId?n:void 0;if(!(!i&&!o))return[{media:[o??i??Nc,i??o??Nc]}]}function qv(e){const[t,n]=e.media;return n!=null&&n.assetId?n:t!=null&&t.assetId?t:null}function Yv(e){const[t]=e.media;return t!=null&&t.assetId?t:null}function Wl(e){if(!Array.isArray(e)||e.length===0)return[];if(up(e)){const t=[];for(const n of e){const i=qv(n);if(!i)continue;const o=Yv(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.assetId?o:null})}return t}return e.filter(t=>t==null?void 0:t.assetId).map(t=>({displayMedia:t,lightboxMedia:t}))}function jo(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.assetId)}function Kv({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return jo(e)?a.jsx("video",{src:e.assetId,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onClick:o}):a.jsx("img",{src:e.assetId,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function Qv({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:r,onTransitionEnd:l}){const c=s.useRef(null);return s.useEffect(()=>{const d=c.current;return n==null||n(d??null),()=>{d==null||d.pause(),n==null||n(null)}},[e,n]),a.jsx("div",{style:i,onTransitionEnd:l,children:a.jsx("video",{ref:c,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:r,onClick:d=>d.stopPropagation(),style:o},e)})}function jr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return jo(e)?a.jsx("video",{src:e.assetId,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.assetId,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.assetId,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.assetId,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function Zv({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,canNavigate:d,lightboxEntries:u,entryIdx:p,layoutId:y,sourceRect:x,resolveCloseSourceRect:g,onClose:h,onPrev:b,onNext:S}){const _=s.useRef(null),v=s.useRef(null),L=s.useRef(null),P=s.useRef(new Map),[q,X]=s.useState(0),B=s.useRef(null),H=s.useRef(0),O=s.useRef(0),C=s.useRef("none"),$=s.useRef(!1),Q=s.useRef(!1),R=s.useRef(!1),T=s.useRef(null),w=s.useRef(null),V=s.useRef(null),z=s.useRef(()=>{}),U=s.useRef(null),M=s.useRef(null),f=s.useRef(null),K=s.useRef(!1),[G,ge]=s.useState(null),[k,ce]=s.useState(ss),[I,ue]=s.useState(0),[ee,xe]=s.useState("opening"),[Le,se]=s.useState(0),[de,Z]=s.useState(0),[pe,ie]=s.useState(!1),[me,ve]=s.useState(null),[Ee,Re]=s.useState(null),[Ce,$e]=s.useState(null),[m,Y]=s.useState(!1),[te,oe]=s.useState(null),[fe,N]=s.useState(!1),F=s.useRef(!1),[ne,re]=s.useState(!1),[J,W]=s.useState(!1),Se=s.useRef(n),le=s.useRef(void 0),j=t[n],Te=j?jo(j):!1,Fe=de!==0||pe,Ye=!l&&(!r||!!c),De=d&&!l,ze=u.length>1,Ze=s.useCallback((D,Ie)=>t.length<=1?null:t[(D+Ie+t.length)%t.length]??null,[t]),Ue=ze?ir(u,p,-1):Ze(n,-1),ye=ze?ir(u,p,1):Ze(n,1),_e=me===-1&&Fe?ze&&Ee!==null?ir(u,Ee,-1):Ce!==null?Ze(Ce,-1):null:null,Ve=me===1&&Fe?ze&&Ee!==null?ir(u,Ee,1):Ce!==null?Ze(Ce,1):null:null,Je=_e&&_e.assetId!==(Ue==null?void 0:Ue.assetId)?_e:null,et=Ve&&Ve.assetId!==(ye==null?void 0:ye.assetId)?Ve:null,ot=Ue&&De?(()=>{const D=ze?_c(u,p,-1):t.length>2?Ze((n-1+t.length)%t.length,-1):null;return D&&D.assetId!==Ue.assetId?D:null})():null,lt=ye&&De?(()=>{const D=ze?_c(u,p,1):t.length>2?Ze((n+1)%t.length,1):null;return D&&D.assetId!==ye.assetId?D:null})():null,Ke=Je??ot,ht=et??lt,tt=s.useCallback((D,Ie,Be)=>{if(!D||!Ie||!Be)return;const ke=P.current,vt=ke.get(D);(vt==null?void 0:vt.width)===Ie&&(vt==null?void 0:vt.height)===Be||(ke.set(D,{width:Ie,height:Be}),X(Ct=>Ct+1))},[]),Ge=s.useCallback(D=>{if(!(D!=null&&D.assetId))return null;const Ie=P.current.get(D.assetId);return zv(v.current,Ie)},[q,I]),We=s.useCallback(()=>{if(!j)return;const D=Ge(j);if(D){ge(D);return}const Ie=v.current;Ie&&ge(Hc(Ie))},[j,Ge]),Ne=s.useCallback(D=>{if(ze){const Ie=u.length;Re((p+D+Ie)%Ie),$e(null);return}t.length>1&&($e((n+D+t.length)%t.length),Re(null))},[ze,u.length,p,t.length,n]),be=s.useCallback(D=>{R.current=D,ie(D)},[]),He=s.useCallback(()=>{T.current!==null&&(window.clearTimeout(T.current),T.current=null)},[]),Xe=s.useCallback(()=>{He(),T.current=window.setTimeout(()=>{He(),be(!1)},qo+32)},[He,be]),ct=s.useCallback(()=>{const D=_.current;if(!D){ce({left:0,top:0,width:typeof window<"u"?window.innerWidth:ss.width,height:typeof window<"u"?window.innerHeight:ss.height});return}const Ie=D.getBoundingClientRect();ce({left:Ie.left,top:Ie.top,width:Ie.width,height:Ie.height})},[]),rt=s.useCallback((D,Ie)=>{if(Fe){if(ne&&!pe)return`translate(${de}px, 0px)`;if(pe&&me!==null){const Be=Ge(D);if(!Be)return;const{x:ke,y:vt}=Xv(Be,Ie,me,k);return`translate(${ke}px, ${vt}px)`}if(pe)return"translate(0px, 0px)"}},[Fe,ne,pe,de,me,k,Ge]),xt=s.useCallback(()=>{const D=w.current;w.current=null,He(),be(!1),ve(null),Re(null),$e(null),Z(0),re(!1),$.current=!1,O.current=0,C.current="none",D===-1?b():D===1&&S()},[He,be,b,S]),pt=s.useCallback(()=>{He(),T.current=window.setTimeout(()=>{w.current!==null&&xt()},qo+32)},[He,xt]),It=s.useCallback(()=>{He(),w.current=null,be(!1),ve(null),Re(null),$e(null),Z(0),re(!1),$.current=!1,O.current=0,C.current="none"},[He,be]),nt=s.useCallback(D=>{if(!(!De||!G)){if(R.current){if(w.current===D){V.current=D,xt();return}It()}He(),Ne(D),w.current=D,ve(D),be(!0),pt()}},[De,G,xt,It,He,Ne,be,pt]);z.current=nt;const bt=s.useCallback(()=>{U.current=null,K.current=!1,M.current!==null&&(window.clearInterval(M.current),M.current=null),f.current!==null&&(window.clearTimeout(f.current),f.current=null)},[]),Lt=s.useCallback(D=>{M.current!==null&&window.clearInterval(M.current);const Ie=K.current?Nv:Fv;M.current=window.setInterval(()=>{z.current(D)},Ie)},[]),Ut=s.useCallback(D=>{U.current!==D&&(bt(),U.current=D,K.current=!1,z.current(D),Lt(D),f.current=window.setTimeout(()=>{f.current=null,U.current===D&&(K.current=!0,Lt(D))},Av))},[bt,Lt]),Ft=s.useCallback(()=>{const D=v.current;if(!D)return;const Ie=j==null?void 0:j.assetId,Be=Ie?P.current.get(Ie):void 0;if(Be!=null&&Be.width&&(Be!=null&&Be.height)){ge(Gs(D,Be.width,Be.height));return}const ke=L.current;if(ke&&Ie&&(ke.src===Ie||ke.currentSrc===Ie)){const{width:Ct,height:at}=Dv(ke);if(Ct&&at){tt(Ie,Ct,at),ge(Gs(D,Ct,at));return}}const vt=Hc(D);!vt.width||!vt.height||ge(vt)},[j==null?void 0:j.assetId,tt]),Me=s.useCallback(D=>{if(L.current=D,!!D){if(D instanceof HTMLVideoElement){D.readyState>=1&&D.videoWidth>0&&Ft();return}D.complete&&D.naturalWidth>0&&Ft()}},[Ft]),Oe=s.useCallback(()=>{ct(),Ft(),ue(D=>D+1)},[ct,Ft]);s.useEffect(()=>{Oe();const D=v.current,Ie=_.current,Be=new ResizeObserver(()=>Oe());return D&&Be.observe(D),Ie&&Be.observe(Ie),window.addEventListener("resize",Oe),()=>{Be.disconnect(),window.removeEventListener("resize",Oe)}},[Oe,n,y]),s.useLayoutEffect(()=>{if(!j)return;const D=L.current;if(D){if(D instanceof HTMLImageElement&&D.complete&&D.naturalWidth>0){Ft();return}D instanceof HTMLVideoElement&&D.readyState>=1&&D.videoWidth>0&&Ft()}},[j==null?void 0:j.assetId,n,Ft]),s.useEffect(()=>{We()},[We,q]),s.useEffect(()=>{const D=new Set,Ie=[],Be=ke=>{!(ke!=null&&ke.assetId)||D.has(ke.assetId)||(D.add(ke.assetId),Ie.push(ke))};t.forEach(Be),u.forEach(ke=>ke.items.forEach(Be)),Ie.forEach(ke=>{P.current.has(ke.assetId)||Bv(ke,tt)})},[t,u,tt]),s.useEffect(()=>{if(ee!=="opening"||!G)return;if(!x){xe("open");return}Y(!1);const D=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Y(!0),xe("open")})});return()=>cancelAnimationFrame(D)},[ee,G,x]),s.useEffect(()=>{if(ee!=="closing")return;const D=setTimeout(()=>h(),On);return()=>clearTimeout(D)},[ee,h]),s.useEffect(()=>()=>{He()},[He]),s.useLayoutEffect(()=>{Se.current===n&&le.current===(j==null?void 0:j.assetId)||(He(),w.current=null,ve(null),Re(null),$e(null),se(0),Z(0),be(!1),W(!1),re(!1),H.current=0,O.current=0,C.current="none",$.current=!1,B.current=null,Q.current=!1,L.current=null,We(),Se.current=n,le.current=j==null?void 0:j.assetId)},[n,j==null?void 0:j.assetId,be,He,We]),s.useLayoutEffect(()=>{const D=V.current;D!==null&&(V.current=null,requestAnimationFrame(()=>{z.current(D)}))},[n,p,j==null?void 0:j.assetId]),s.useLayoutEffect(()=>{if(ee==="opening"){F.current=!1,N(!1);return}if(ee!=="open"||F.current)return;if(!Ue&&!ye){F.current=!0;return}N(!1);const D=requestAnimationFrame(()=>{requestAnimationFrame(()=>{N(!0),F.current=!0})});return()=>cancelAnimationFrame(D)},[ee,Ue==null?void 0:Ue.assetId,ye==null?void 0:ye.assetId]),s.useEffect(()=>{if(ee!=="open")return;const D=()=>{const at=Tt=>{Tt.stopPropagation(),Tt.preventDefault(),document.removeEventListener("click",at,!0)};document.addEventListener("click",at,!0)},Ie=at=>{const Tt=at<0?1:-1;He(),Ne(Tt),w.current=Tt,ve(Tt),be(!0),pt()},Be=at=>{if(Math.abs(at)>kv&&De){Ie(at);return}w.current=null,ve(null),Re(null),$e(null),be(!0),Z(0),Xe()},ke=at=>{if(at.touches.length!==1||R.current)return;const Tt=at.touches[0];Q.current=!0,B.current={x:Tt.clientX,y:Tt.clientY},C.current="none",O.current=0,$.current=!1},vt=at=>{if(!B.current||at.touches.length!==1||R.current)return;const Tt=at.touches[0],Vt=Tt.clientX-B.current.x,Pt=Tt.clientY-B.current.y;if(C.current==="none"){if(Math.abs(Vt)<10&&Math.abs(Pt)<10)return;if(Math.abs(Vt)>Math.abs(Pt)){if(!De)return;C.current="horizontal"}else if(Pt>0){if(!Ye)return;C.current="vertical"}else return}if(C.current==="horizontal"){$.current=!0,re(!0),O.current=Vt,Z(Vt),at.preventDefault();return}C.current==="vertical"&&($.current=!0,re(!0),H.current=Pt,se(Pt),at.preventDefault())},Ct=()=>{if(!B.current)return;const at=C.current,Tt=$.current;if(Tt&&at==="horizontal")Be(O.current),D();else if(Tt&&at==="vertical"){const Vt=H.current;if(Ye&&Vt>Ev){const Pt=window.innerHeight;H.current=Pt,W(!0),se(Pt),xe("closing")}else H.current=0,se(0);D()}else at==="horizontal"&&Math.abs(O.current)>0&&(Be(O.current),D());B.current=null,C.current="none",O.current=0,$.current=!1,re(!1)};return document.addEventListener("touchstart",ke,{passive:!0}),document.addEventListener("touchmove",vt,{passive:!1}),document.addEventListener("touchend",Ct),document.addEventListener("touchcancel",Ct),()=>{document.removeEventListener("touchstart",ke),document.removeEventListener("touchmove",vt),document.removeEventListener("touchend",Ct),document.removeEventListener("touchcancel",Ct)}},[ee,De,be,Xe,He,Ye,pt,Ne]);const St=s.useCallback(()=>{const D=(g==null?void 0:g())??x??null;D&&G&&(oe(D),Y(!0)),xe("closing")},[g,x,G]);s.useEffect(()=>{const D=ke=>{if(ke.key==="Escape"){if(r&&c||ee==="closing")return;bt(),St();return}if(ke.key!=="ArrowLeft"&&ke.key!=="ArrowRight"||ee!=="open"||!De)return;ke.preventDefault();const vt=ke.key==="ArrowLeft"?-1:1;ke.repeat&&U.current===vt||Ut(vt)},Ie=ke=>{if(ke.key!=="ArrowLeft"&&ke.key!=="ArrowRight")return;const vt=ke.key==="ArrowLeft"?-1:1;U.current===vt&&bt()},Be=()=>{bt()};return window.addEventListener("keydown",D),window.addEventListener("keyup",Ie),window.addEventListener("blur",Be),()=>{window.removeEventListener("keydown",D),window.removeEventListener("keyup",Ie),window.removeEventListener("blur",Be),bt()}},[ee,r,c,St,De,Ut,bt]),s.useEffect(()=>{ee!=="open"&&bt()},[ee,bt]);const Mt=()=>{ee==="closing"||l||St()},Qe=ee==="open",kt=ee==="closing",Bt=Le>0?Math.max(0,1-Le/500):1,Wt=Le>0?Math.max(.35,1-Le/500):1,At=s.useCallback(D=>{if(!(D.propertyName!=="transform"||!R.current)){if(w.current!==null){xt();return}He(),be(!1)}},[He,be,xt]),Ae=ee==="closing"?te??x:x,ft=Ae&&G&&(ee==="opening"||kt)?_v(Ae,G):void 0,gt=Fe&&j?rt(j,"center"):Le>0?`translateY(${Le}px)`:ft,dt=G?Br(G,k):null,yt=!!(Ae&&G),ut=yt&&(ee==="closing"||ee==="open"&&m),it={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:gt,opacity:Le>0?Wt:yt?1:ee==="opening"||kt?0:1,transition:ne&&!pe?"none":pe?`transform ${qo}ms ${$n}`:J?`transform ${On}ms ${$n}, opacity ${On}ms ${$n}`:ut?`transform ${On}ms ${$n}`:ee==="opening"||kt?`opacity ${On}ms ${$n}`:"none",pointerEvents:Te&&Qe&&!Fe?"auto":"none",touchAction:Te&&Qe?"none":void 0,zIndex:1,overflow:Te?"hidden":void 0},Nt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Qe&&!Fe?"auto":"none"},$t=(D,Ie,Be="adjacent")=>{const ke=Ge(D);if(!ke)return{display:"none"};const vt=Be==="far"?Ie==="left"?"far-left":"far-right":Ie==="left"?"left-adjacent":"right-adjacent",{start:Ct}=me!==null?dp(ke,vt,me,k):{start:Be==="far"?wa(ke,Ie,k):Ro(ke,Ie,k)},at=Br(Ct,k),Tt=rt(D,vt),Vt=!Fe&&Be==="adjacent"&&Qe&&!fe?Uv(ke,Ie,k):null,Pt=Be==="far"&&Fe&&me===(Ie==="left"?-1:1),Zt=ne&&!pe?!1:pe,on=Be==="adjacent"&&Qe&&fe&&!Fe;return{position:"absolute",top:at.top,left:at.left,width:at.width,height:at.height,objectFit:"contain",transform:Tt??(Vt?`translate(${Vt.x}px, ${Vt.y}px)`:void 0),opacity:Be==="far"?Qe&&Pt?1:0:Qe?1:0,transition:Zt?Be==="far"?`transform ${qo}ms ${$n}`:`transform ${qo}ms ${$n}, opacity ${On}ms ${$n}`:on?`transform ${On}ms ${$n}`:ee==="opening"||kt?`opacity ${On}ms ${$n}`:"none",pointerEvents:"none",zIndex:1}},Qt=(D,Ie)=>{const Be=Ge(D);return Be?Gv(Ro(Be,Ie,k),Ie,k):null},Xt=D=>Ie=>{if(!l){if(Q.current){Q.current=!1;return}Ie.stopPropagation(),nt(D)}},Ot=Ue?Qt(Ue,"left"):null,jt=ye?Qt(ye,"right"):null,Dt=Ot?Br(Ot,k):null,zt=jt?Br(jt,k):null;return a.jsxs("div",{ref:_,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:ee==="open"?"none":void 0},onClick:Mt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Qe?Bt:0,transition:ne?"none":`opacity ${On}ms ${$n}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:v,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:Qe?1:0,transition:ne?"none":`opacity ${On}ms ${$n}`,pointerEvents:"none"},children:a.jsx(sp,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,onClose:Mt})})]}),Qe&&Ke&&a.jsx(jr,{media:Ke,style:$t(Ke,"left","far"),onMeasure:tt,onTransitionEnd:At},`far-prev-${Ke.assetId}`),Qe&&Ue&&a.jsxs(a.Fragment,{children:[a.jsx(jr,{media:Ue,style:$t(Ue,"left"),onMeasure:tt,onTransitionEnd:At},`prev-${Ue.assetId}`),Dt&&a.jsx("div",{style:{position:"absolute",top:Dt.top,left:Dt.left,width:Dt.width,height:Dt.height,cursor:l||ne?"default":"pointer",pointerEvents:l||ne?"none":"auto",zIndex:3},onClick:Xt(-1)})]}),Qe&&ye&&a.jsxs(a.Fragment,{children:[a.jsx(jr,{media:ye,style:$t(ye,"right"),onMeasure:tt,onTransitionEnd:At},`next-${ye.assetId}`),zt&&a.jsx("div",{style:{position:"absolute",top:zt.top,left:zt.left,width:zt.width,height:zt.height,cursor:l||ne?"default":"pointer",pointerEvents:l||ne?"none":"auto",zIndex:3},onClick:Xt(1)})]}),Qe&&ht&&a.jsx(jr,{media:ht,style:$t(ht,"right","far"),onMeasure:tt,onTransitionEnd:At},`far-next-${ht.assetId}`),G&&j&&(Te?a.jsx(Qv,{src:j.assetId,phase:ee,onMediaElement:Me,wrapperStyle:it,videoStyle:Nt,onLoadedMetadata:Ft,onTransitionEnd:At},`${n}-${j.assetId}`):a.jsx("img",{ref:Me,src:j.assetId,alt:j.name,onLoad:Ft,onTransitionEnd:At,style:it},`${n}-${j.assetId}`))]})}function Jv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:c}=E.useScopedStyles(),{gridLayout:d,verticalGap:u,align:p="top",imageDisplay:y}=e,x=(y==null?void 0:y.display)==="cover",g=(y==null?void 0:y.ratioValue)??"1:1",h=(y==null?void 0:y.reversed)??!1,[b,S]=g.split(":").map(Number),L=`${h?S:b} / ${h?b:S}`,P=d.entryWidth??.2,q=d.columnsCount,X=E.scalingValue(P,n),B=E.scalingValue(d.horizontalGap??0,n),H=X,O=X,C={width:H,...x?{aspectRatio:L,height:"auto",overflow:"hidden"}:{height:"auto"}},$=x?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},Q=s.useRef(null),[R,T]=s.useState(!1),[w,V]=s.useState([]),[z,U]=s.useState(0),[M,f]=s.useState(0),[K,G]=s.useState(null),[ge,k]=s.useState({title1:"",title2:"",title3:""}),ce=(()=>{const Ce={},$e=Q.current?getComputedStyle(Q.current).getPropertyValue("--cntrl-article-width").trim():"";return $e&&(Ce["--cntrl-article-width"]=$e),Ce})(),I=!n||i||o,ue=s.useMemo(()=>Rv(c),[c]),ee=t??[],xe=ee.length%q||q,Le=xe<q&&ee.length>0,se=ee.length-xe,de=Le?Math.floor((q-xe)/2)+1:1,Z=s.useMemo(()=>Wv(ee),[ee]),pe=s.useMemo(()=>jv(ee),[ee]),ie=(Ce,$e,m)=>{if(n&&!o&&!i)return;const Y=Z.findIndex(oe=>oe.gridIndex===Ce);if(Y<0)return;const te=Z[Y];f(Y),V(te.items),U($e),k(te.entry),G(m??null),T(!0)},me=s.useCallback(()=>{T(!1),G(null)},[]),ve=s.useCallback(()=>{const Ce=Z[M];return!Ce||!Q.current?K:Hv(Q.current,Ce.gridIndex,x?"cover":"contain")??K},[Z,M,K,x]),Ee=s.useCallback(Ce=>{if(Z.length>1){const $e=Z.length,m=(M+Ce+$e)%$e,Y=Z[m],te=Math.min(z,Y.items.length-1);f(m),V(Y.items),U(te),k(Y.entry);return}U($e=>($e+Ce+w.length)%w.length)},[Z,M,z,w.length]),Re=Z.length>1||w.length>1;return s.useEffect(()=>{if(!R||typeof document>"u")return;const Ce=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Ce}},[R]),s.useEffect(()=>{!n||o||i||T(!1)},[n,o,i]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ue}}),a.jsx(Vv,{mediaList:pe}),a.jsx("div",{ref:Q,className:`${c}-wrapper ${c}-align-entries ${c}-image-align-${p}`.trim(),style:{gridTemplateColumns:`repeat(${q}, ${X})`,rowGap:0,columnGap:B,width:E.scalingValue(d.wrapperWidth??0,n),[`--${c}-align-entries-row-gap`]:E.scalingValue(u??0,n)},children:ee.map((Ce,$e)=>{const m=Hl(Ce.gallery),Y=Wl(m),te=Y.filter(re=>re.lightboxMedia).map(re=>re.lightboxMedia),oe=Math.floor($e/q)===Math.ceil(ee.length/q)-1,fe=Le&&$e>=se?`${de+($e-se)}`:void 0,N=Y[0],F=N!=null&&N.lightboxMedia?te.findIndex(re=>re.assetId===N.lightboxMedia.assetId):-1,ne=a.jsx("div",{className:`${c}-item-image-wrapper`,style:C,children:Y.length>0&&a.jsx(Kv,{media:N.displayMedia,gridIndex:$e,className:`${c}-item-${jo(N.displayMedia)?"video":"image"}`.trim(),style:$,onMediaClick:I&&F>=0?re=>ie($e,F,lp(re.currentTarget,x?"cover":"contain")):void 0})});return a.jsx("div",{className:`${c}-item`,children:a.jsxs("div",{className:[o?`${c}-item-inner`:`${c}-item-inner-hidden`,oe?`${c}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:X,...fe?{gridColumn:fe}:{}},children:[a.jsx("div",{className:`${c}-item-title-row`,children:a.jsx("div",{style:{height:0,width:O}})}),a.jsx("a",{className:`${c}-item-image-link`,children:ne}),a.jsx("div",{className:`${c}-item-subtitle-row`,children:a.jsx("div",{style:{height:0,width:O}})})]})},$e)})}),R&&typeof document<"u"&&(()=>{const Ce=(l?document.getElementById(l):null)??document.body;return qn.createPortal(a.jsx("div",{style:ce,"data-selection":"none",children:a.jsx(Zv,{prefix:c,items:w,index:z,entry:ge,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:Re,lightboxEntries:Z,entryIdx:M,layoutId:r,sourceRect:K,resolveCloseSourceRect:ve,onClose:me,onPrev:()=>Ee(-1),onNext:()=>Ee(1)})}),Ce)})()]})}const e0=`import { CommonComponentProps } from '../props';
7872
7872
  import { scalingValue, useScopedStyles } from '../utils/index';
7873
7873
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
7874
7874
  import { createPortal } from 'react-dom';
@@ -10211,7 +10211,7 @@ export function Hive({
10211
10211
  </>
10212
10212
  );
10213
10213
  }
10214
- `,t0="01M3SBP3P8CMVMM1ZZ0QVD2PPF",Hi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function n0(e){const t={};return t[wt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[wt(e,"fontSettings")]={...Hi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[wt(e,"fontSize")]={...Hi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[wt(e,"lineHeight")]={...Hi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[wt(e,"letterSpacing")]={...Hi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[wt(e,"wordSpacing")]={...Hi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[wt(e,"textAlign")]={...Hi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[wt(e,"textAppearance")]={...Hi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Eo=Ri.filter(e=>e!=="count"),i0=Eo.reduce((e,t)=>({...e,...n0(t)}),{}),o0=Eo.reduce((e,t)=>({...e,[wt(t,"fontFamily")]:"Arial",[wt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[wt(t,"letterSpacing")]:0,[wt(t,"wordSpacing")]:0,[wt(t,"textAlign")]:"left",[wt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ls(e){return Eo.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[wt(n,"fontSize")]=i),o!==void 0&&(t[wt(n,"lineHeight")]=o),t},{})}const r0={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Eo.map(e=>[Nl[e],_l(e)]))},a0={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},s0=["01M3QM74XEQE7FN1WYJN6H984H","01M3QM74XFXCSMJJ8TNR0RXSWV","01M3QM74XFQ6K4CJ0QYC7BT7VP","01M3QM74XFK2K9T3SPCZD8M7RT","01M3QM74XFV4J15XRFB85877RE","01M3QM74XFB8Q39K12G4G6CZDM","01M3QM74XFWVH9HND47HYNCBZB","01M3QM74XF3MFEKEA4E0W9F9ZQ","01M3QM74XFEQY4XMN22Q9ERGKX","01M3QM74XFWP1RY8ND8QX88J2V","01M3QM74XFD41TXQ5BQ2KFJBGQ","01M3QM74XFV8973P7WXXWJP3QK","01M3QM74XF67PD2N10JYF9409X","01M3QM74XFA5B75WMTTKRN9TM7","01M3QM74XFFQRBHCQGKWPGSAGE","01M3QM74XF1HQBTRANGVX0QVGK","01M3QM74XF8ZWGSVCX3KS5YXSC","01M3QM74XFPHGV2XFZ23ADCVFC","01M3QM74XFECQG799S95G63BDJ","01M3QM74XFW1XS568WAHG3BGN1","01M3QM74XFT1RRJ3N1JJKPK5EA","01M3QM74XFB2JQ62RPFSM145GN","01M3QM74XFH61QR5PACJS04Z5K","01M3QM74XFKD44BXHRA7SSMD7N"],l0=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...a0,gallery:[{media:[{assetId:s0[t-1],name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}]});return e})(),c0={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",max:1,display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:l0},settings:{sizing:"auto auto",properties:{gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:9999,display:{type:"numeric-input"}},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},...i0},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:t0,closeIconColor:"#000000",closeIconHoverColor:"#999999",...o0},layoutDefaults:{m:{gridLayout:{entryWidth:.37837,horizontalGap:.081,wrapperWidth:1,columnsCount:2,lockedParam:"wrapperWidth"},verticalGap:.081,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,...ls({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{gridLayout:{entryWidth:.10416,horizontalGap:.013,wrapperWidth:1,columnsCount:8,lockedParam:"wrapperWidth"},verticalGap:.013,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.039,iconMarginRight:.026,...ls({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})},d:{gridLayout:{entryWidth:.06944,horizontalGap:.006944,wrapperWidth:1,columnsCount:12,lockedParam:"wrapperWidth"},verticalGap:.00694,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,...ls({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})}},displayRules:[{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","gridLayout","verticalGap","align","imageDisplay","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["verticalGap"]},{type:"row",title:"",items:["imageDisplay","align"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[r0]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},d0={element:Jv,id:"hive",name:"Catalogue",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/hive.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.assetId",placeholderEnabled:!0}],parameters:[{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[...Eo.map(e=>({path:`${wt(e,"fontFamily")}`}))]},fontRelations:{...Eo.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${wt(t,"fontFamily")}`}),{})},schema:c0,sourceCode:e0};function u0(e){if(e.type==="video")return!0;if(e.type==="image")return!1;const t=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.assetId)}function p0({media:e,className:t,style:n}){const i=s.useRef(null);return s.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const r=o.play();r&&r.catch(()=>{})},[e.isVideo,e.assetId]),e.isVideo?a.jsx("video",{ref:i,className:t,src:e.assetId,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:t,src:e.assetId,alt:"",style:n})}function cs(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function g0(e){return String(e??"").trim().length>0}function Wc(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY-i.top>i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Oc(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY<i.top+i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Dc(e,t,n,i,o,r,l){const c=E.scalingValue(r,l),d=E.scalingValue(0,l),u=e===0,p=e===t-1&&!o;return{borderTopWidth:u&&n?c:d,borderBottomWidth:!p||i?c:d}}function m0(e,t,n){const i=E.scalingValue(t,n),o=E.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const zc=10,Bc=10,Yo={positionEase:.14,rotationEase:.09,rotationFactor:2.5,maxRotation:20};function h0(e,t,n){return Math.max(t,Math.min(n,e))}function ds(e,t,n){return e+(t-e)*n}function f0(e,t,n,i){if(!t)return{x:0,y:0};const o=t.getBoundingClientRect(),r=o.top+o.height/2;if(e==="cursor"&&n)return{x:n.clientX+zc,y:n.clientY+zc};switch(e){case"left":return{x:o.left+Bc+i/2,y:r};case"center":return{x:o.left+o.width/2,y:r};case"right":return{x:o.right-Bc-i/2,y:r};default:return{x:o.left+o.width/2,y:r}}}function y0(e,t){const n=s.useRef(null),i=s.useRef({x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1}),o=s.useRef(null),r=s.useCallback(()=>{const g=n.current,f=i.current;g&&(g.style.transform=`translate3d(${f.x}px, ${f.y}px, 0) translate(-50%, -50%) rotate(${f.rotation.toFixed(3)}deg)`)},[]),l=s.useCallback(()=>{o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)},[]),c=s.useCallback(()=>{const g=i.current;t?(g.x=ds(g.x,g.targetX,Yo.positionEase),g.y=ds(g.y,g.targetY,Yo.positionEase),g.rotation=ds(g.rotation,g.targetRotation,Yo.rotationEase)):(g.x=g.targetX,g.y=g.targetY,g.rotation=g.targetRotation),r();const f=Math.abs(g.x-g.targetX)<.4&&Math.abs(g.y-g.targetY)<.4,b=Math.abs(g.rotation-g.targetRotation)<.08;!f||!b?o.current=requestAnimationFrame(c):o.current=null},[r,t]),d=s.useCallback(()=>{o.current===null&&(o.current=requestAnimationFrame(c))},[c]),u=s.useCallback((g,f)=>{const b=i.current;b.targetX=g,b.targetY=f,b.targetRotation=0,b.x=g,b.y=f,b.rotation=0,b.lastX=g,b.hasLastX=!0,r(),t&&d()},[r,t,d]),p=s.useCallback((g,f)=>{if(!e)return;const b=i.current;if(t&&b.hasLastX){const S=g-b.lastX;b.targetRotation=h0(S*Yo.rotationFactor,-20,Yo.maxRotation)}else b.targetRotation=0;if(b.lastX=g,b.hasLastX=!0,b.targetX=g,b.targetY=f,t){d();return}b.x=g,b.y=f,b.rotation=b.targetRotation,r()},[e,r,t,d]),y=s.useCallback(g=>{l(),i.current.hasLastX=!1,g==null||g()},[l]),x=s.useCallback(()=>{l(),i.current={x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1},n.current&&(n.current.style.transform="")},[l]);return s.useEffect(()=>(e||x(),l),[e,x,l]),{anchorRef:n,onShow:u,onCursorMove:p,exit:y,reset:x}}function v0(e){return`
10214
+ `,t0="01M3SBP3P8CMVMM1ZZ0QVD2PPF",Hi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function n0(e){const t={};return t[wt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[wt(e,"fontSettings")]={...Hi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[wt(e,"fontSize")]={...Hi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[wt(e,"lineHeight")]={...Hi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[wt(e,"letterSpacing")]={...Hi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[wt(e,"wordSpacing")]={...Hi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[wt(e,"textAlign")]={...Hi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[wt(e,"textAppearance")]={...Hi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Eo=Ri.filter(e=>e!=="count"),i0=Eo.reduce((e,t)=>({...e,...n0(t)}),{}),o0=Eo.reduce((e,t)=>({...e,[wt(t,"fontFamily")]:"Arial",[wt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[wt(t,"letterSpacing")]:0,[wt(t,"wordSpacing")]:0,[wt(t,"textAlign")]:"left",[wt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ls(e){return Eo.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[wt(n,"fontSize")]=i),o!==void 0&&(t[wt(n,"lineHeight")]=o),t},{})}const r0={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Eo.map(e=>[Nl[e],_l(e)]))},a0={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},s0=["01M3QM74XEQE7FN1WYJN6H984H","01M3QM74XFXCSMJJ8TNR0RXSWV","01M3QM74XFQ6K4CJ0QYC7BT7VP","01M3QM74XFK2K9T3SPCZD8M7RT","01M3QM74XFV4J15XRFB85877RE","01M3QM74XFB8Q39K12G4G6CZDM","01M3QM74XFWVH9HND47HYNCBZB","01M3QM74XF3MFEKEA4E0W9F9ZQ","01M3QM74XFEQY4XMN22Q9ERGKX","01M3QM74XFWP1RY8ND8QX88J2V","01M3QM74XFD41TXQ5BQ2KFJBGQ","01M3QM74XFV8973P7WXXWJP3QK","01M3QM74XF67PD2N10JYF9409X","01M3QM74XFA5B75WMTTKRN9TM7","01M3QM74XFFQRBHCQGKWPGSAGE","01M3QM74XF1HQBTRANGVX0QVGK","01M3QM74XF8ZWGSVCX3KS5YXSC","01M3QM74XFPHGV2XFZ23ADCVFC","01M3QM74XFECQG799S95G63BDJ","01M3QM74XFW1XS568WAHG3BGN1","01M3QM74XFT1RRJ3N1JJKPK5EA","01M3QM74XFB2JQ62RPFSM145GN","01M3QM74XFH61QR5PACJS04Z5K","01M3QM74XFKD44BXHRA7SSMD7N"],l0=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...a0,gallery:[{media:[{assetId:s0[t-1],name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}]});return e})(),c0={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",max:1,display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:l0},settings:{sizing:"auto auto",properties:{gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:9999,display:{type:"numeric-input"}},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},...i0},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:t0,closeIconColor:"#000000",closeIconHoverColor:"#999999",...o0},layoutDefaults:{m:{gridLayout:{entryWidth:.37837,horizontalGap:.081,wrapperWidth:1,columnsCount:2,lockedParam:"wrapperWidth"},verticalGap:.081,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,...ls({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{gridLayout:{entryWidth:.10416,horizontalGap:.013,wrapperWidth:1,columnsCount:8,lockedParam:"wrapperWidth"},verticalGap:.013,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.039,iconMarginRight:.026,...ls({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})},d:{gridLayout:{entryWidth:.06944,horizontalGap:.006944,wrapperWidth:1,columnsCount:12,lockedParam:"wrapperWidth"},verticalGap:.00694,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,...ls({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})}},displayRules:[{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","gridLayout","verticalGap","align","imageDisplay","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["verticalGap"]},{type:"row",title:"",items:["imageDisplay","align"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[r0]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},d0={element:Jv,id:"hive",name:"Catalogue",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/hive.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.assetId",placeholderEnabled:!0}],parameters:[{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[...Eo.map(e=>({path:`${wt(e,"fontFamily")}`}))]},fontRelations:{...Eo.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${wt(t,"fontFamily")}`}),{})},schema:c0,sourceCode:e0};function u0(e){if(e.type==="video")return!0;if(e.type==="image")return!1;const t=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.assetId)}function p0({media:e,className:t,style:n}){const i=s.useRef(null);return s.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const r=o.play();r&&r.catch(()=>{})},[e.isVideo,e.assetId]),e.isVideo?a.jsx("video",{ref:i,className:t,src:e.assetId,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:t,src:e.assetId,alt:"",style:n})}function cs(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function g0(e){return String(e??"").trim().length>0}function Wc(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY-i.top>i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Oc(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY<i.top+i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Dc(e,t,n,i,o,r,l){const c=E.scalingValue(r,l),d=E.scalingValue(0,l),u=e===0,p=e===t-1&&!o;return{borderTopWidth:u&&n?c:d,borderBottomWidth:!p||i?c:d}}function m0(e,t,n){const i=E.scalingValue(t,n),o=E.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const zc=10,Bc=10,Yo={positionEase:.14,rotationEase:.09,rotationFactor:2.5,maxRotation:20};function h0(e,t,n){return Math.max(t,Math.min(n,e))}function ds(e,t,n){return e+(t-e)*n}function f0(e,t,n,i){if(!t)return{x:0,y:0};const o=t.getBoundingClientRect(),r=o.top+o.height/2;if(e==="cursor"&&n)return{x:n.clientX+zc,y:n.clientY+zc};switch(e){case"left":return{x:o.left+Bc+i/2,y:r};case"center":return{x:o.left+o.width/2,y:r};case"right":return{x:o.right-Bc-i/2,y:r};default:return{x:o.left+o.width/2,y:r}}}function y0(e,t){const n=s.useRef(null),i=s.useRef({x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1}),o=s.useRef(null),r=s.useCallback(()=>{const g=n.current,h=i.current;g&&(g.style.transform=`translate3d(${h.x}px, ${h.y}px, 0) translate(-50%, -50%) rotate(${h.rotation.toFixed(3)}deg)`)},[]),l=s.useCallback(()=>{o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)},[]),c=s.useCallback(()=>{const g=i.current;t?(g.x=ds(g.x,g.targetX,Yo.positionEase),g.y=ds(g.y,g.targetY,Yo.positionEase),g.rotation=ds(g.rotation,g.targetRotation,Yo.rotationEase)):(g.x=g.targetX,g.y=g.targetY,g.rotation=g.targetRotation),r();const h=Math.abs(g.x-g.targetX)<.4&&Math.abs(g.y-g.targetY)<.4,b=Math.abs(g.rotation-g.targetRotation)<.08;!h||!b?o.current=requestAnimationFrame(c):o.current=null},[r,t]),d=s.useCallback(()=>{o.current===null&&(o.current=requestAnimationFrame(c))},[c]),u=s.useCallback((g,h)=>{const b=i.current;b.targetX=g,b.targetY=h,b.targetRotation=0,b.x=g,b.y=h,b.rotation=0,b.lastX=g,b.hasLastX=!0,r(),t&&d()},[r,t,d]),p=s.useCallback((g,h)=>{if(!e)return;const b=i.current;if(t&&b.hasLastX){const S=g-b.lastX;b.targetRotation=h0(S*Yo.rotationFactor,-20,Yo.maxRotation)}else b.targetRotation=0;if(b.lastX=g,b.hasLastX=!0,b.targetX=g,b.targetY=h,t){d();return}b.x=g,b.y=h,b.rotation=b.targetRotation,r()},[e,r,t,d]),y=s.useCallback(g=>{l(),i.current.hasLastX=!1,g==null||g()},[l]),x=s.useCallback(()=>{l(),i.current={x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1},n.current&&(n.current.style.transform="")},[l]);return s.useEffect(()=>(e||x(),l),[e,x,l]),{anchorRef:n,onShow:u,onCursorMove:p,exit:y,reset:x}}function v0(e){return`
10215
10215
  .${e}-wrapper {
10216
10216
  display: grid;
10217
10217
  align-items: start;
@@ -10587,7 +10587,7 @@ a.${e}-list-item {
10587
10587
  overflow-wrap: anywhere;
10588
10588
  word-break: break-word;
10589
10589
  }
10590
- `}const Ei=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Ol=["AColumn","BColumn","CColumn","DColumn","EColumn"],si="cutLabel",xr=[...Ol,si],Ba=["A","B","C","D","E"];function pp(e){return`${e}ColumnVerticalAlign`}const Xs=["Top","Center","Bottom"];function Dl(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Ba.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function x0(e){const t=Dl(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function b0(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Ba.includes(n)?n:null}function gp(e,t,n){const i=b0(e);return i?i===t?!1:x0(n[pp(i)]):!0}function br(e){const t=Dl(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Ba.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function S0(e,t,n){if(mp(e,t,n))return br(e);const i=br(e);return i.kind==="baseline"?{kind:"top"}:i}function w0(e){const t=br(e);return t.kind==="baseline"?{kind:"top"}:t}function mp(e,t,n){return gp(e,n,t)?br(e).kind==="baseline":!1}function $0(e){const t={};let n=!1;for(const i of Ba){const o=pp(i),r=e[o];if(e.type==="b"){const l=String(r??"Top").trim();l!=="Top"&&l!=="Center"&&l!=="Bottom"&&(t[o]="Top",n=!0);continue}gp(r,i,e)||(t[o]="Top",n=!0)}return n?t:null}function C0(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function T0(e){const t=br(e).kind;return t==="baseline"?"center":t}function I0(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function jc(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function L0(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:i}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),r=o-i;return n.remove(),r}function us(e,t,n,i){const o=e.titleEl;if(!o)return 0;const r=o.closest(`.${n}`);if(!r)return 0;const l=L0(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+l;const c=r.getBoundingClientRect(),d=o.getBoundingClientRect().height;let u=0;return e.kind==="center"?u=(c.height-d)/2:e.kind==="bottom"&&(u=c.height-d),c.top-t+u+l}function P0(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const r=o.querySelector(`.${n}`);r&&(r.style.minHeight=`${i}px`,r.style.height=`${i}px`)}),i)}function M0(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const R0={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Kt(e,t){return`${e}${t.replace(/^text/,"Text")}`}const E0={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function k0(e){return[Kt(e,"textFontFamily"),Kt(e,"textFontSettings"),{type:"row",items:[Kt(e,"textFontSize"),Kt(e,"textLineHeight"),Kt(e,"textLetterSpacing"),Kt(e,"textWordSpacing")]},Kt(e,"textTextAlign"),Kt(e,"textTextAppearance"),`${e}VerticalAlign`]}function A0(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(xr.map(e=>[E0[e],k0(e)]))}}function $a(e,t){const n=i=>{const o=Kt(t,i);return e[o]};return{textFontFamily:n("textFontFamily")??"Arial",textFontSettings:n("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:n("textFontSize"),textLineHeight:n("textLineHeight"),textLetterSpacing:n("textLetterSpacing")??0,textWordSpacing:n("textWordSpacing")??0,textTextAlign:n("textTextAlign")??(t===si?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function Vc(e,t){var i,o;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((i=e.textFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e.textFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:e.textFontSize??.01,lineHeight:e.textLineHeight,letterSpacing:e.textLetterSpacing,wordSpacing:e.textWordSpacing,textAlign:e.textTextAlign,textAppearance:e.textTextAppearance,color:e.textColor??"#767676"};return pn(nn(n,t))}function Gc(e,t,n,i){const o=$a(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<r?`${n} ${i}`:n}function Xc(e,t,n,i){const o=$a(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=r?{}:{[`--${n}-title-leading-gap`]:E.scalingValue((r-l)/2,i)}}const Rn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],ko=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],Ao=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Fo=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],F0={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},N0=["hover","focus","filled","success","error"],Uc=.004,go=.004,ps=go,zl=50,Sr=1440,wr=zl/Sr;function hp(e){const t=typeof e=="number"&&e>0?e:Sr;return zl/t}function _0(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const o=parseFloat(n);if(Number.isFinite(o)&&o>0)return o}const i=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(i){const o=parseFloat(i);if(Number.isFinite(o)&&o>0)return o}t=t.parentElement}return Sr}const fp={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function lr(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function H0(e,t=1){const n=t/e;return Object.fromEntries(Rn.map(i=>[i,n]))}function W0(){return Object.fromEntries([...ko.map(e=>[e,0]),...Ao.map(e=>[e,0])])}function O0(){return Object.fromEntries(Fo.map(e=>[e,0]))}function Vr(e){return Object.fromEntries(Rn.map(t=>[t,typeof e[t]=="number"?e[t]:fp[t]]))}function yp(e,t,n){const i=e-wr,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const r=i/o;return{paddingLeft:t*r,paddingRight:n*r}}function ga(e,t,n){const i=Bl(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((r,l)=>r+l,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function D0(e,t,n){const i={};for(let o=0;o<e;o+=1){const r=ko[o],l=Ao[o],c=typeof n[r]=="number"?n[r]:0,d=typeof n[l]=="number"?n[l]:0,u=yp(t[o]??0,c,d);u.paddingLeft!==c&&(i[r]=u.paddingLeft),u.paddingRight!==d&&(i[l]=u.paddingRight)}return i}function Bl(e,t,n){if(e<=0)return[];const i=Rn.slice(0,e).map(u=>n[u]);if(e===1)return i;const o=i.slice(0,e-1),l=o.reduce((u,p)=>u+p,0)+wr;if(t>=l)return i;const c=[...o];let d=l-t;for(let u=c.length-1;u>=0&&d>0;u-=1){const p=c[u]-wr;if(p<=0)continue;const y=Math.min(d,p);c[u]-=y,d-=y}return[...c,i[e-1]]}function z0(e,t,n){if(e<=1)return{};const i=Bl(e,t,n),o={};for(let r=0;r<e-1;r+=1){const l=Rn[r];i[r]!==n[l]&&(o[l]=i[r])}return o}function qc(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Ei]}function B0(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function j0(e,t,n,i){const o=Math.min(i,e.length,Rn.length),r={};for(let l=0;l<o;l+=1){const c=e[l],d=t.indexOf(c);if(d===-1)continue;const u=Rn[d],p=ko[d],y=Ao[d],x=Fo[d],g=Rn[l],f=ko[l],b=Ao[l],S=Fo[l],W=n[u],v=n[p],L=n[y],M=n[x];typeof W=="number"&&(r[g]=W),typeof v=="number"&&(r[f]=v),typeof L=="number"&&(r[b]=L),typeof M=="number"&&(r[S]=M)}return r}function vp(e,t){const n=new Set([...Object.keys(e),...Object.keys(t)]);for(const i of n)if(e[i]!==t[i])return!0;return!1}function V0(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=lr(e),r=e.type==="b"||e.type===void 0&&t.type==="b",l={...e,...H0(n,o),...W0()};if(r)for(const c of Fo)typeof t[c]=="number"&&(l[c]=t[c]);else Object.assign(l,O0());return vp(e,l)?l:e}function G0(e,t,n){const i=$0(e);i&&(e={...e,...i});const o=hp(n==null?void 0:n.designWidth),r=e.columns,l=t.columns,c=lr(e),d=lr(t),u=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof r=="number"?r:typeof l=="number"?l:Ei.length,y=L=>{if(u)return L;const M=Vr({...t,...L}),U=lr(L),G=ga(p,U,M),B=D0(p,G,{...t,...L});return Object.keys(B).length===0?L:{...L,...B}};if(typeof r=="number"&&r!==l)return e;const x=qc(e),g=qc(t);if(!B0(x,g))return y({...e,...j0(x,g,t,p)});if(c<d&&typeof p=="number"&&!u){const L=Vr({...t,...e});return y({...e,...z0(p,c,L)})}if(u){const L=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,M=Math.max(0,(c-o)/2);return L>M?{...e,textPaddingLR:M}:e}const f=Vr({...t,...e}),b=ga(p,d,Vr(t)),W=ga(p,c,f).some((L,M)=>L<(b[M]??L)),v=Rn.some(L=>{const M=e[L],U=t[L];return typeof M=="number"&&typeof U=="number"&&M!==U});return W||v?y(e):e}function X0(e,t,n,i){const o=t.slice(0,e).reduce((l,c)=>l+c,0),r=n.slice(e+1,t.length-1).reduce((l,c)=>l+c,0);return Math.max(wr,i-o-r-wr)}function U0(e,t){return Math.random()*(t-e)+e}function q0(e){return Object.fromEntries(Rn.map(t=>[t,typeof e[t]=="number"?e[t]:fp[t]]))}function gs(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function Y0(e,t,n,i,o,r){return e.slice(0,t).map((l,c)=>{const d=ko[c],u=Ao[c],p=Fo[c];return{key:l,textPrefix:R0[l],widthKey:Rn[c],width:n[Rn[c]],paddingLeftKey:d,paddingRightKey:u,paddingBottomKey:p,paddingLeft:i[d],paddingRight:o[u],paddingBottom:r[p]}})}function K0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r,layoutId:l,portalId:c,onUpdateSettings:d}){const{prefix:u}=E.useScopedStyles(),p=!!o,{columns:y,type:x,wrapperWidth:g,entriesCount:f,cellMinHeight:b,dividerWidth:S,showVisibility:W,cut:v,showCut:L,cutCellMinHeight:M,cutLabel:U,imageSize:G,imageOnHover:B,imagePosition:N="cursor",imageInterpolation:O="on",entryHoverEffect:C,entryHoverShowOption:$,rowPaddingTop:K,rowPaddingBottom:R,rowPaddingTopB:w,columnsOrder:T,textPaddingLR:j,textColor:_,backgroundColor:Q,dividerColor:P,textHoverColor:h,backgroundHoverColor:J,dividerHoverColor:V}=e,[me,k]=s.useState(void 0),[le,I]=s.useState(null),ue=s.useRef(null),ee=B==="on"&&(!n||i),xe=N==="cursor",Le=xe&&O==="on",{anchorRef:ce,onShow:de,onCursorMove:Z,exit:pe}=y0(!!(ee&&le!==null),Le),oe=(v??0)>0,ge=x==="b",be=s.useRef(null),Re=s.useRef(null),[Ee,Te]=s.useState(null),[we,m]=s.useState(Sr),Y=hp(we),te=Math.max(0,((g??0)-Y)/2),ae=Math.min(j??0,te),fe=Math.max(ae,go),F=((g??0)+Y)/2;s.useLayoutEffect(()=>{if(!n){m(Sr);return}const Ae=()=>{m(_0(be.current))};Ae();const ft=be.current;if(!ft)return;const gt=new ResizeObserver(Ae);gt.observe(ft);let dt=ft;for(;dt&&!dt.style.getPropertyValue("--cntrl-article-width");)dt=dt.parentElement;return dt&&gt.observe(dt),()=>gt.disconnect()},[n,l]),s.useEffect(()=>{k(void 0)},[v,L,t,f]),s.useEffect(()=>{n&&!i&&k(void 0)},[n,i]);const H=E.buildColorVars(u,{textColor:_,backgroundColor:Q,dividerColor:P,textHoverColor:h,backgroundHoverColor:J,dividerHoverColor:V},F0,N0),ne=r&&r!=="default"?`${u}-state-${r}`:"",ie=`${!n||i?C==="default"?`${u}-entry-hover-default`:C==="blinds"?`${u}-entry-hover-blinds`:C==="reveal"?`${u}-entry-hover-reveal`:"":""} ${ne}`.trim(),z=C==="reveal"&&(!n||i),$e=(W==null?void 0:W[0])??!1,re=(W==null?void 0:W[1])??!1,X=s.useRef(e),Ce=s.useRef(l);s.useEffect(()=>{if(!d||!n){X.current=e,Ce.current=l;return}if(Ce.current!==l){X.current=e,Ce.current=l;return}const Ae=X.current;if(!(Ae!==e))return;if(typeof Ae.columns=="number"&&typeof e.columns=="number"&&Ae.columns!==e.columns){X.current=e;return}const gt=G0(e,Ae,{designWidth:we});X.current=e,vp(e,gt)&&d(gt)},[e,d,n,l,we]);const He=s.useMemo(()=>q0(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),Ye=s.useMemo(()=>gs(e,ko),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),De=s.useMemo(()=>gs(e,Ao),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),ze=s.useMemo(()=>gs(e,Fo),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),Ze=s.useMemo(()=>Array.isArray(T)&&T.length>0?T:[...Ei],[T]),Ue=s.useMemo(()=>Y0(Ze,y,He,Ye,De,ze),[Ze,y,He,Ye,De,ze]),ye=lr(e),Ne=s.useMemo(()=>Rn.slice(0,y).map(Ae=>He[Ae]),[y,He]),Ve=s.useMemo(()=>Bl(y,ye,He),[y,ye,He]),Je=s.useMemo(()=>ga(y,ye,He),[y,ye,He]),et=s.useMemo(()=>Ue.map((Ae,ft)=>yp(Je[ft]??0,Ae.paddingLeft,Ae.paddingRight)),[Ue,Je]),ot=s.useMemo(()=>{const Ae=f===0?1/0:f;return(t??[]).slice(0,Ae).map((gt,dt)=>({id:dt,cells:Object.fromEntries(Ei.map(yt=>[yt,gt[yt]??""])),image:gt.image,link:gt.link}))},[t,f]),lt=oe?me??v:ot.length,Ke=s.useMemo(()=>oe?ot.slice(0,lt):ot,[ot,oe,lt]),ht=oe&&lt<ot.length,tt=Ke.length>1||ht,Ge=[$e?`${u}-divider-top`:"",re||tt?`${u}-divider-bottom`:""].filter(Boolean).join(" "),We=!n||i,Fe=()=>{if(!We)return;const Ae=me??v;if(!L){k(ot.length);return}k(Math.min(Ae+L,ot.length))},ve=Ae=>E.scalingValue(Ae,n??!1),_e=ge?w??0:K??0,Xe=R??0,ct=b??0,rt=Math.max(Xe,ps),xt=Dc(0,Ke.length,$e,re,ht,S??0,n??!1).borderTopWidth,pt=ge?"rowPaddingTopB":"rowPaddingTop",It=Ue[0],nt=Ue[Ue.length-1],bt=et[0],Lt=et[et.length-1],Ut=It&&bt?Math.max(bt.paddingLeft,go):0,Ft=nt&&Lt?Math.max(Lt.paddingRight,go):0,Me=ye,Oe=(Ae,ft)=>f0(N,be.current,xe?Ae:null,ft),St=(Ae,ft)=>{if(!ee)return;const gt=Ae.image;if(!(gt!=null&&gt.assetId)){pe(()=>I(null));return}const dt=(G==null?void 0:G.min)??80,yt=(G==null?void 0:G.max)??320,ut=(le==null?void 0:le.rowId)===Ae.id,it=ut?le.widthPx:U0(dt,yt),{x:Nt,y:$t}=Oe(ft,it);if(ut&&xe){Z(Nt,$t);return}I({rowId:Ae.id,assetId:gt.assetId,objectFit:"contain",isVideo:u0(gt),widthPx:it}),ue.current={x:Nt,y:$t}},Mt=Ae=>{if(!ee||!le||!xe)return;const{x:ft,y:gt}=Oe(Ae,le.widthPx);Z(ft,gt)},Qe=()=>{le&&pe(()=>I(null))},kt=Ae=>{z&&Wc(Ae,u),!(!ee||!le)&&pe(()=>I(null))},Bt=Ae=>{z&&Oc(Ae,u)};s.useLayoutEffect(()=>{if(!le||!ue.current)return;const{x:Ae,y:ft}=ue.current;ue.current=null,de(Ae,ft)},[le==null?void 0:le.rowId,le==null?void 0:le.assetId,de]),s.useLayoutEffect(()=>{if(!p||ge){Te(null);return}const Ae=Re.current,ft=Ae==null?void 0:Ae.parentElement;if(!Ae||!ft){Te(null);return}const gt=()=>{const yt=Ae.querySelector("[data-list-row]");if(!yt){Te(null);return}const ut=ft.getBoundingClientRect(),it=yt.getBoundingClientRect();Te(it.top-ut.top+it.height/2)};gt();const dt=new ResizeObserver(gt);return dt.observe(Ae),dt.observe(ft),()=>dt.disconnect()},[p,ge,Ke,_e,Xe,ct,t,e,Ue,Je,we,S,$e,re,ht]);const Wt=s.useMemo(()=>!ge&&Ol.some(Ae=>{const ft=Ae.charAt(0),gt=e[`${Ae}VerticalAlign`];return mp(gt,e,ft)}),[ge,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);s.useLayoutEffect(()=>{var Nt;const Ae=be.current;if(!Ae)return;const ft=()=>{Ae.querySelectorAll("[data-list-col]").forEach($t=>{$t.style.transform="";const Qt=$t.querySelector(`.${u}-list-col`);Qt&&(Qt.style.minHeight="",Qt.style.height="");const Xt=$t.querySelector(`.${u}-list-col-title`);Xt&&(Xt.style.transform="")})};if(ge||!Wt){ft();return}const gt=()=>{const $t=Array.from(Ae.querySelectorAll("[data-list-row]")),Qt=`${u}-list-col`,Xt=`${u}-baseline-probe`;$t.forEach(Ot=>{Ot.querySelectorAll("[data-list-col]").forEach(jt=>{jt.style.transform="";const Dt=jt.querySelector(`.${Qt}`);Dt&&(Dt.style.minHeight="",Dt.style.height="");const zt=jt.querySelector(`.${u}-list-col-title`);zt&&(zt.style.transform="")})}),$t.forEach(Ot=>{const jt=Array.from(Ot.querySelectorAll("[data-list-col]"));P0(Ot,jt,Qt)}),Ae.offsetHeight,$t.forEach(Ot=>{const jt=Array.from(Ot.querySelectorAll("[data-list-col]")),Dt=Ot.getBoundingClientRect().top,zt=new Map,D=jt.map(ke=>{const vt=ke.querySelector(`.${u}-list-col-title`),Ct={el:ke,titleEl:vt,letter:ke.getAttribute("data-col-letter")??"",kind:ke.getAttribute("data-valign")??"top",anchor:ke.getAttribute("data-valign-anchor")};return zt.set(Ct.letter,Ct),Ct}),Ie=new Map,Be=(ke,vt)=>{const Ct=Ie.get(ke.letter);if(Ct!==void 0)return Ct;const at=ke.anchor?zt.get(ke.anchor):void 0;if(ke.kind!=="baseline"||!at||vt.has(ke.letter)){const on=us(ke,Dt,Qt,Xt);return Ie.set(ke.letter,on),on}vt.add(ke.letter);const Tt=Be(at,vt);vt.delete(ke.letter);const Vt=us(ke,Dt,Qt,Xt),Pt=Tt-Vt;M0(ke.titleEl,Pt);const Zt=us(ke,Dt,Qt,Xt);return Ie.set(ke.letter,Zt),Zt};D.forEach(ke=>Be(ke,new Set))})};let dt=null;const yt=()=>{dt===null&&(dt=requestAnimationFrame(()=>{dt=null,gt()}))};gt();const ut=new ResizeObserver(()=>yt());ut.observe(Ae);let it=!1;return typeof document<"u"&&((Nt=document.fonts)!=null&&Nt.ready)&&document.fonts.ready.then(()=>{it||yt()}),()=>{it=!0,dt!==null&&(cancelAnimationFrame(dt),dt=null),ut.disconnect(),ft()}},[Wt,ge,e,t,we,Ke,Je]);const At=s.useMemo(()=>v0(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:At}}),a.jsx("div",{style:H,children:a.jsxs("div",{ref:be,className:`${u}-wrapper ${ie}${Ge?` ${Ge}`:""}${ge?` ${u}-type-b`:""}`.trim(),style:{width:E.scalingValue(g??0,n)},onMouseMove:ee?Mt:void 0,onMouseLeave:ee?Qe:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[Ke.map((Ae,ft)=>{var ut;const gt=(((ut=Ae.link)==null?void 0:ut.length)??0)>0,dt=gt&&(!n||i)?"a":"div",yt=Dc(ft,Ke.length,$e,re,ht,S??0,n??!1);return a.jsxs(dt,{ref:ft===0?it=>{Re.current=it}:void 0,className:`${u}-list-item${gt||$==="always"?` ${u}-list-item-has-link`:""}${ht&&ft===Ke.length-1?` ${u}-list-item-before-cut`:""}`,...gt?{href:Ae.link,target:"_blank"}:{},style:yt,onMouseEnter:it=>{z&&(gt||$==="always")&&Wc(it,u),ee&&St(Ae,it)},onMouseLeave:it=>{z&&(gt||$==="always")&&Oc(it,u)},children:[_e>0&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:ve(_e)}}),a.jsxs("div",{className:`${u}-list-cols-row${ge?"":` ${u}-list-cols-row-h`}${p&&ft===0&&ge?` ${u}-list-cols-row-controls`:""}`,...ge?{}:{"data-list-row":""},style:ge?void 0:{minHeight:ve(ct)},children:[Ue.map((it,Nt)=>{const $t=Nt===Ue.length-1,Qt=et[Nt],Xt=it.paddingBottom,Ot=g0(Ae.cells[it.key]),jt=ge&&Ot&&Xt>0,Dt=ge?{minHeight:ve(ct)}:{width:ve(Je[Nt])},zt=ge?{paddingLeft:ve(ae),paddingRight:ve(ae)}:{paddingLeft:ve(Qt.paddingLeft),paddingRight:ve(Qt.paddingRight)},D=it.textPrefix.charAt(0),Ie=ge?w0(e[`${it.textPrefix}VerticalAlign`]):S0(e[`${it.textPrefix}VerticalAlign`],e,D),Be=ge&&Ot&&p&&ft===0;return ge&&!Ot?null:a.jsxs("div",{className:ge?`${u}-list-col-wrap`:void 0,...ge?{}:{"data-list-col":"","data-col-letter":D,"data-valign":Ie.kind,...Ie.kind==="baseline"?{"data-valign-anchor":Ie.anchorLetter}:{}},children:[a.jsx("div",{className:`${u}-list-col${$t?` ${u}-list-col-last`:""}`,style:{...zt,...Dt,...ge?{justifyContent:jc(Ie.kind)}:{}},"data-test":it.width,children:a.jsx("span",{className:Gc(e,it.textPrefix,`${u}-list-col-title`,`${u}-text-tight-leading`),style:{...Vc($a(e,it.textPrefix),n),...Xc(e,it.textPrefix,u,n),...ge?{}:C0(Ie.kind)},children:Ae.cells[it.key]??null})}),jt&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:ve(Xt)}}),Be&&a.jsx("div",{"data-controls":it.paddingBottomKey,"data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:ve(Math.max(Xt,ps))}})]},it.key)}),p&&ft===0&&ge&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(F),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{top:0,left:0,width:ve(fe),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(F),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{top:0,left:ve(Math.max(fe,ye-fe)),width:ve(fe),height:"100%"}})]})]}),!ge&&Xe>0&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:ve(Xe)}}),p&&ft===0&&!ge&&a.jsx("div",{"data-controls":"rowPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${u}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:ve(rt)}})]},Ae.id)}),p&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":pt,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":ge?"center":"left-y",className:`${u}-control-anchor`,style:{top:xt,left:0,width:"100%",height:ve(Math.max(_e,ps))}})},"row-padding-handles"),p&&!ge&&It&&nt&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":It.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Je[0]-((bt==null?void 0:bt.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Ee??void 0,className:`${u}-control-anchor`,style:{top:0,left:0,width:ve(Ut),height:"100%"}}),a.jsx("div",{"data-controls":nt.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Je[Ue.length-1]-((Lt==null?void 0:Lt.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Ee??void 0,className:`${u}-control-anchor`,style:{top:0,left:ve(Me-Ft),width:ve(Ft),height:"100%"}})]},"column-edge-padding-handles"),p&&!ge&&Ue.slice(0,-1).map((Ae,ft)=>{const gt=Ue[ft+1],dt=Ve.slice(0,ft+1).reduce(($t,Qt)=>$t+Qt,0),yt=et[ft],ut=et[ft+1],it=Math.max(yt.paddingRight,go),Nt=Math.max(ut.paddingLeft,go);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":Ae.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Je[ft]-yt.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Ee??void 0,className:`${u}-control-anchor`,style:{top:0,left:ve(dt-it),width:ve(it),height:"100%"}}),a.jsx("div",{"data-controls":gt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Je[ft+1]-ut.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Ee??void 0,className:`${u}-control-anchor`,style:{top:0,left:ve(dt),width:ve(Nt),height:"100%"}})]},`${Ae.paddingRightKey}-padding`)}),p&&!ge&&Ue.slice(0,-1).map((Ae,ft)=>{const gt=X0(ft,Ve,Ne,ye),yt=Ve.slice(0,ft+1).reduce((ut,it)=>ut+it,0)-Uc/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Ae.widthKey,"data-controls-axis":"x","data-controls-min":String(zl),"data-controls-max-fraction":String(gt),"data-controls-variant":"column-width",className:`${u}-col-resize-handle`,style:{position:"absolute",top:"0px",left:ve(yt),width:ve(Uc),height:"calc(100%)",pointerEvents:"auto"}})},`${Ae.widthKey}-junction`)})]}),ht&&(()=>{const Ae=$a(e,si),ft=T0(e.cutLabelVerticalAlign),gt=Ae.textTextAlign==="justify"||ge;return a.jsx("button",{type:"button",className:`${u}-cut-item`,style:{minHeight:ve(M??0),cursor:We?"pointer":"default",...m0(re,S??0,n??!1)},onClick:We?Fe:void 0,onMouseEnter:z||ee?kt:void 0,onMouseLeave:z?Bt:void 0,children:a.jsx("div",{className:`${u}-list-cols-row`,style:{...ge?{paddingLeft:ve(ae),paddingRight:ve(ae)}:{},justifyContent:I0(Ae.textTextAlign),alignItems:jc(ft)},children:a.jsx("span",{className:Gc(e,si,`${u}-cut-label`,`${u}-text-tight-leading`),style:{...Vc(Ae,n),...Xc(e,si,u,n),...gt?{width:"100%"}:{}},children:U})})})})(),ee&&le&&typeof document<"u"&&(()=>{const Ae=`${le.widthPx}px`,ft={width:Ae,height:"auto",maxHeight:Ae,objectFit:"contain"},gt=(c?document.getElementById(c):null)??document.body;return qn.createPortal(a.jsx("div",{ref:ce,className:`${u}-hover-media-anchor`,"data-selection":"none",children:a.jsx(p0,{media:le,className:le.isVideo?`${u}-hover-video`:`${u}-hover-image`,style:ft},`${le.rowId}-${le.assetId}`)}),gt)})()]})})]})}const Q0=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
10590
+ `}const Ei=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Ol=["AColumn","BColumn","CColumn","DColumn","EColumn"],si="cutLabel",xr=[...Ol,si],Ba=["A","B","C","D","E"];function pp(e){return`${e}ColumnVerticalAlign`}const Xs=["Top","Center","Bottom"];function Dl(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Ba.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function x0(e){const t=Dl(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function b0(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Ba.includes(n)?n:null}function gp(e,t,n){const i=b0(e);return i?i===t?!1:x0(n[pp(i)]):!0}function br(e){const t=Dl(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Ba.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function S0(e,t,n){if(mp(e,t,n))return br(e);const i=br(e);return i.kind==="baseline"?{kind:"top"}:i}function w0(e){const t=br(e);return t.kind==="baseline"?{kind:"top"}:t}function mp(e,t,n){return gp(e,n,t)?br(e).kind==="baseline":!1}function $0(e){const t={};let n=!1;for(const i of Ba){const o=pp(i),r=e[o];if(e.type==="b"){const l=String(r??"Top").trim();l!=="Top"&&l!=="Center"&&l!=="Bottom"&&(t[o]="Top",n=!0);continue}gp(r,i,e)||(t[o]="Top",n=!0)}return n?t:null}function C0(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function T0(e){const t=br(e).kind;return t==="baseline"?"center":t}function I0(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function jc(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function L0(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:i}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),r=o-i;return n.remove(),r}function us(e,t,n,i){const o=e.titleEl;if(!o)return 0;const r=o.closest(`.${n}`);if(!r)return 0;const l=L0(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+l;const c=r.getBoundingClientRect(),d=o.getBoundingClientRect().height;let u=0;return e.kind==="center"?u=(c.height-d)/2:e.kind==="bottom"&&(u=c.height-d),c.top-t+u+l}function P0(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const r=o.querySelector(`.${n}`);r&&(r.style.minHeight=`${i}px`,r.style.height=`${i}px`)}),i)}function M0(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const R0={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Kt(e,t){return`${e}${t.replace(/^text/,"Text")}`}const E0={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function k0(e){return[Kt(e,"textFontFamily"),Kt(e,"textFontSettings"),{type:"row",items:[Kt(e,"textFontSize"),Kt(e,"textLineHeight"),Kt(e,"textLetterSpacing"),Kt(e,"textWordSpacing")]},Kt(e,"textTextAlign"),Kt(e,"textTextAppearance"),`${e}VerticalAlign`]}function A0(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(xr.map(e=>[E0[e],k0(e)]))}}function $a(e,t){const n=i=>{const o=Kt(t,i);return e[o]};return{textFontFamily:n("textFontFamily")??"Arial",textFontSettings:n("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:n("textFontSize"),textLineHeight:n("textLineHeight"),textLetterSpacing:n("textLetterSpacing")??0,textWordSpacing:n("textWordSpacing")??0,textTextAlign:n("textTextAlign")??(t===si?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function Vc(e,t){var i,o;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((i=e.textFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e.textFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:e.textFontSize??.01,lineHeight:e.textLineHeight,letterSpacing:e.textLetterSpacing,wordSpacing:e.textWordSpacing,textAlign:e.textTextAlign,textAppearance:e.textTextAppearance,color:e.textColor??"#767676"};return pn(nn(n,t))}function Gc(e,t,n,i){const o=$a(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<r?`${n} ${i}`:n}function Xc(e,t,n,i){const o=$a(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=r?{}:{[`--${n}-title-leading-gap`]:E.scalingValue((r-l)/2,i)}}const Rn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],ko=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],Ao=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Fo=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],F0={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},N0=["hover","focus","filled","success","error"],Uc=.004,go=.004,ps=go,zl=50,Sr=1440,wr=zl/Sr;function hp(e){const t=typeof e=="number"&&e>0?e:Sr;return zl/t}function _0(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const o=parseFloat(n);if(Number.isFinite(o)&&o>0)return o}const i=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(i){const o=parseFloat(i);if(Number.isFinite(o)&&o>0)return o}t=t.parentElement}return Sr}const fp={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function lr(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function H0(e,t=1){const n=t/e;return Object.fromEntries(Rn.map(i=>[i,n]))}function W0(){return Object.fromEntries([...ko.map(e=>[e,0]),...Ao.map(e=>[e,0])])}function O0(){return Object.fromEntries(Fo.map(e=>[e,0]))}function Vr(e){return Object.fromEntries(Rn.map(t=>[t,typeof e[t]=="number"?e[t]:fp[t]]))}function yp(e,t,n){const i=e-wr,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const r=i/o;return{paddingLeft:t*r,paddingRight:n*r}}function ga(e,t,n){const i=Bl(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((r,l)=>r+l,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function D0(e,t,n){const i={};for(let o=0;o<e;o+=1){const r=ko[o],l=Ao[o],c=typeof n[r]=="number"?n[r]:0,d=typeof n[l]=="number"?n[l]:0,u=yp(t[o]??0,c,d);u.paddingLeft!==c&&(i[r]=u.paddingLeft),u.paddingRight!==d&&(i[l]=u.paddingRight)}return i}function Bl(e,t,n){if(e<=0)return[];const i=Rn.slice(0,e).map(u=>n[u]);if(e===1)return i;const o=i.slice(0,e-1),l=o.reduce((u,p)=>u+p,0)+wr;if(t>=l)return i;const c=[...o];let d=l-t;for(let u=c.length-1;u>=0&&d>0;u-=1){const p=c[u]-wr;if(p<=0)continue;const y=Math.min(d,p);c[u]-=y,d-=y}return[...c,i[e-1]]}function z0(e,t,n){if(e<=1)return{};const i=Bl(e,t,n),o={};for(let r=0;r<e-1;r+=1){const l=Rn[r];i[r]!==n[l]&&(o[l]=i[r])}return o}function qc(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Ei]}function B0(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function j0(e,t,n,i){const o=Math.min(i,e.length,Rn.length),r={};for(let l=0;l<o;l+=1){const c=e[l],d=t.indexOf(c);if(d===-1)continue;const u=Rn[d],p=ko[d],y=Ao[d],x=Fo[d],g=Rn[l],h=ko[l],b=Ao[l],S=Fo[l],_=n[u],v=n[p],L=n[y],P=n[x];typeof _=="number"&&(r[g]=_),typeof v=="number"&&(r[h]=v),typeof L=="number"&&(r[b]=L),typeof P=="number"&&(r[S]=P)}return r}function vp(e,t){const n=new Set([...Object.keys(e),...Object.keys(t)]);for(const i of n)if(e[i]!==t[i])return!0;return!1}function V0(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=lr(e),r=e.type==="b"||e.type===void 0&&t.type==="b",l={...e,...H0(n,o),...W0()};if(r)for(const c of Fo)typeof t[c]=="number"&&(l[c]=t[c]);else Object.assign(l,O0());return vp(e,l)?l:e}function G0(e,t,n){const i=$0(e);i&&(e={...e,...i});const o=hp(n==null?void 0:n.designWidth),r=e.columns,l=t.columns,c=lr(e),d=lr(t),u=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof r=="number"?r:typeof l=="number"?l:Ei.length,y=L=>{if(u)return L;const P=Vr({...t,...L}),q=lr(L),X=ga(p,q,P),B=D0(p,X,{...t,...L});return Object.keys(B).length===0?L:{...L,...B}};if(typeof r=="number"&&r!==l)return e;const x=qc(e),g=qc(t);if(!B0(x,g))return y({...e,...j0(x,g,t,p)});if(c<d&&typeof p=="number"&&!u){const L=Vr({...t,...e});return y({...e,...z0(p,c,L)})}if(u){const L=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,P=Math.max(0,(c-o)/2);return L>P?{...e,textPaddingLR:P}:e}const h=Vr({...t,...e}),b=ga(p,d,Vr(t)),_=ga(p,c,h).some((L,P)=>L<(b[P]??L)),v=Rn.some(L=>{const P=e[L],q=t[L];return typeof P=="number"&&typeof q=="number"&&P!==q});return _||v?y(e):e}function X0(e,t,n,i){const o=t.slice(0,e).reduce((l,c)=>l+c,0),r=n.slice(e+1,t.length-1).reduce((l,c)=>l+c,0);return Math.max(wr,i-o-r-wr)}function U0(e,t){return Math.random()*(t-e)+e}function q0(e){return Object.fromEntries(Rn.map(t=>[t,typeof e[t]=="number"?e[t]:fp[t]]))}function gs(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function Y0(e,t,n,i,o,r){return e.slice(0,t).map((l,c)=>{const d=ko[c],u=Ao[c],p=Fo[c];return{key:l,textPrefix:R0[l],widthKey:Rn[c],width:n[Rn[c]],paddingLeftKey:d,paddingRightKey:u,paddingBottomKey:p,paddingLeft:i[d],paddingRight:o[u],paddingBottom:r[p]}})}function K0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r,layoutId:l,portalId:c,onUpdateSettings:d}){const{prefix:u}=E.useScopedStyles(),p=!!o,{columns:y,type:x,wrapperWidth:g,entriesCount:h,cellMinHeight:b,dividerWidth:S,showVisibility:_,cut:v,showCut:L,cutCellMinHeight:P,cutLabel:q,imageSize:X,imageOnHover:B,imagePosition:H="cursor",imageInterpolation:O="on",entryHoverEffect:C,entryHoverShowOption:$,rowPaddingTop:Q,rowPaddingBottom:R,rowPaddingTopB:T,columnsOrder:w,textPaddingLR:V,textColor:z,backgroundColor:U,dividerColor:M,textHoverColor:f,backgroundHoverColor:K,dividerHoverColor:G}=e,[ge,k]=s.useState(void 0),[ce,I]=s.useState(null),ue=s.useRef(null),ee=B==="on"&&(!n||i),xe=H==="cursor",Le=xe&&O==="on",{anchorRef:se,onShow:de,onCursorMove:Z,exit:pe}=y0(!!(ee&&ce!==null),Le),ie=(v??0)>0,me=x==="b",ve=s.useRef(null),Ee=s.useRef(null),[Re,Ce]=s.useState(null),[$e,m]=s.useState(Sr),Y=hp($e),te=Math.max(0,((g??0)-Y)/2),oe=Math.min(V??0,te),fe=Math.max(oe,go),N=((g??0)+Y)/2;s.useLayoutEffect(()=>{if(!n){m(Sr);return}const Ae=()=>{m(_0(ve.current))};Ae();const ft=ve.current;if(!ft)return;const gt=new ResizeObserver(Ae);gt.observe(ft);let dt=ft;for(;dt&&!dt.style.getPropertyValue("--cntrl-article-width");)dt=dt.parentElement;return dt&&gt.observe(dt),()=>gt.disconnect()},[n,l]),s.useEffect(()=>{k(void 0)},[v,L,t,h]),s.useEffect(()=>{n&&!i&&k(void 0)},[n,i]);const F=E.buildColorVars(u,{textColor:z,backgroundColor:U,dividerColor:M,textHoverColor:f,backgroundHoverColor:K,dividerHoverColor:G},F0,N0),ne=r&&r!=="default"?`${u}-state-${r}`:"",J=`${!n||i?C==="default"?`${u}-entry-hover-default`:C==="blinds"?`${u}-entry-hover-blinds`:C==="reveal"?`${u}-entry-hover-reveal`:"":""} ${ne}`.trim(),W=C==="reveal"&&(!n||i),Se=(_==null?void 0:_[0])??!1,le=(_==null?void 0:_[1])??!1,j=s.useRef(e),Te=s.useRef(l);s.useEffect(()=>{if(!d||!n){j.current=e,Te.current=l;return}if(Te.current!==l){j.current=e,Te.current=l;return}const Ae=j.current;if(!(Ae!==e))return;if(typeof Ae.columns=="number"&&typeof e.columns=="number"&&Ae.columns!==e.columns){j.current=e;return}const gt=G0(e,Ae,{designWidth:$e});j.current=e,vp(e,gt)&&d(gt)},[e,d,n,l,$e]);const Fe=s.useMemo(()=>q0(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),Ye=s.useMemo(()=>gs(e,ko),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),De=s.useMemo(()=>gs(e,Ao),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),ze=s.useMemo(()=>gs(e,Fo),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),Ze=s.useMemo(()=>Array.isArray(w)&&w.length>0?w:[...Ei],[w]),Ue=s.useMemo(()=>Y0(Ze,y,Fe,Ye,De,ze),[Ze,y,Fe,Ye,De,ze]),ye=lr(e),_e=s.useMemo(()=>Rn.slice(0,y).map(Ae=>Fe[Ae]),[y,Fe]),Ve=s.useMemo(()=>Bl(y,ye,Fe),[y,ye,Fe]),Je=s.useMemo(()=>ga(y,ye,Fe),[y,ye,Fe]),et=s.useMemo(()=>Ue.map((Ae,ft)=>yp(Je[ft]??0,Ae.paddingLeft,Ae.paddingRight)),[Ue,Je]),ot=s.useMemo(()=>{const Ae=h===0?1/0:h;return(t??[]).slice(0,Ae).map((gt,dt)=>({id:dt,cells:Object.fromEntries(Ei.map(yt=>[yt,gt[yt]??""])),image:gt.image,link:gt.link}))},[t,h]),lt=ie?ge??v:ot.length,Ke=s.useMemo(()=>ie?ot.slice(0,lt):ot,[ot,ie,lt]),ht=ie&&lt<ot.length,tt=Ke.length>1||ht,Ge=[Se?`${u}-divider-top`:"",le||tt?`${u}-divider-bottom`:""].filter(Boolean).join(" "),We=!n||i,Ne=()=>{if(!We)return;const Ae=ge??v;if(!L){k(ot.length);return}k(Math.min(Ae+L,ot.length))},be=Ae=>E.scalingValue(Ae,n??!1),He=me?T??0:Q??0,Xe=R??0,ct=b??0,rt=Math.max(Xe,ps),xt=Dc(0,Ke.length,Se,le,ht,S??0,n??!1).borderTopWidth,pt=me?"rowPaddingTopB":"rowPaddingTop",It=Ue[0],nt=Ue[Ue.length-1],bt=et[0],Lt=et[et.length-1],Ut=It&&bt?Math.max(bt.paddingLeft,go):0,Ft=nt&&Lt?Math.max(Lt.paddingRight,go):0,Me=ye,Oe=(Ae,ft)=>f0(H,ve.current,xe?Ae:null,ft),St=(Ae,ft)=>{if(!ee)return;const gt=Ae.image;if(!(gt!=null&&gt.assetId)){pe(()=>I(null));return}const dt=(X==null?void 0:X.min)??80,yt=(X==null?void 0:X.max)??320,ut=(ce==null?void 0:ce.rowId)===Ae.id,it=ut?ce.widthPx:U0(dt,yt),{x:Nt,y:$t}=Oe(ft,it);if(ut&&xe){Z(Nt,$t);return}I({rowId:Ae.id,assetId:gt.assetId,objectFit:"contain",isVideo:u0(gt),widthPx:it}),ue.current={x:Nt,y:$t}},Mt=Ae=>{if(!ee||!ce||!xe)return;const{x:ft,y:gt}=Oe(Ae,ce.widthPx);Z(ft,gt)},Qe=()=>{ce&&pe(()=>I(null))},kt=Ae=>{W&&Wc(Ae,u),!(!ee||!ce)&&pe(()=>I(null))},Bt=Ae=>{W&&Oc(Ae,u)};s.useLayoutEffect(()=>{if(!ce||!ue.current)return;const{x:Ae,y:ft}=ue.current;ue.current=null,de(Ae,ft)},[ce==null?void 0:ce.rowId,ce==null?void 0:ce.assetId,de]),s.useLayoutEffect(()=>{if(!p||me){Ce(null);return}const Ae=Ee.current,ft=Ae==null?void 0:Ae.parentElement;if(!Ae||!ft){Ce(null);return}const gt=()=>{const yt=Ae.querySelector("[data-list-row]");if(!yt){Ce(null);return}const ut=ft.getBoundingClientRect(),it=yt.getBoundingClientRect();Ce(it.top-ut.top+it.height/2)};gt();const dt=new ResizeObserver(gt);return dt.observe(Ae),dt.observe(ft),()=>dt.disconnect()},[p,me,Ke,He,Xe,ct,t,e,Ue,Je,$e,S,Se,le,ht]);const Wt=s.useMemo(()=>!me&&Ol.some(Ae=>{const ft=Ae.charAt(0),gt=e[`${Ae}VerticalAlign`];return mp(gt,e,ft)}),[me,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);s.useLayoutEffect(()=>{var Nt;const Ae=ve.current;if(!Ae)return;const ft=()=>{Ae.querySelectorAll("[data-list-col]").forEach($t=>{$t.style.transform="";const Qt=$t.querySelector(`.${u}-list-col`);Qt&&(Qt.style.minHeight="",Qt.style.height="");const Xt=$t.querySelector(`.${u}-list-col-title`);Xt&&(Xt.style.transform="")})};if(me||!Wt){ft();return}const gt=()=>{const $t=Array.from(Ae.querySelectorAll("[data-list-row]")),Qt=`${u}-list-col`,Xt=`${u}-baseline-probe`;$t.forEach(Ot=>{Ot.querySelectorAll("[data-list-col]").forEach(jt=>{jt.style.transform="";const Dt=jt.querySelector(`.${Qt}`);Dt&&(Dt.style.minHeight="",Dt.style.height="");const zt=jt.querySelector(`.${u}-list-col-title`);zt&&(zt.style.transform="")})}),$t.forEach(Ot=>{const jt=Array.from(Ot.querySelectorAll("[data-list-col]"));P0(Ot,jt,Qt)}),Ae.offsetHeight,$t.forEach(Ot=>{const jt=Array.from(Ot.querySelectorAll("[data-list-col]")),Dt=Ot.getBoundingClientRect().top,zt=new Map,D=jt.map(ke=>{const vt=ke.querySelector(`.${u}-list-col-title`),Ct={el:ke,titleEl:vt,letter:ke.getAttribute("data-col-letter")??"",kind:ke.getAttribute("data-valign")??"top",anchor:ke.getAttribute("data-valign-anchor")};return zt.set(Ct.letter,Ct),Ct}),Ie=new Map,Be=(ke,vt)=>{const Ct=Ie.get(ke.letter);if(Ct!==void 0)return Ct;const at=ke.anchor?zt.get(ke.anchor):void 0;if(ke.kind!=="baseline"||!at||vt.has(ke.letter)){const on=us(ke,Dt,Qt,Xt);return Ie.set(ke.letter,on),on}vt.add(ke.letter);const Tt=Be(at,vt);vt.delete(ke.letter);const Vt=us(ke,Dt,Qt,Xt),Pt=Tt-Vt;M0(ke.titleEl,Pt);const Zt=us(ke,Dt,Qt,Xt);return Ie.set(ke.letter,Zt),Zt};D.forEach(ke=>Be(ke,new Set))})};let dt=null;const yt=()=>{dt===null&&(dt=requestAnimationFrame(()=>{dt=null,gt()}))};gt();const ut=new ResizeObserver(()=>yt());ut.observe(Ae);let it=!1;return typeof document<"u"&&((Nt=document.fonts)!=null&&Nt.ready)&&document.fonts.ready.then(()=>{it||yt()}),()=>{it=!0,dt!==null&&(cancelAnimationFrame(dt),dt=null),ut.disconnect(),ft()}},[Wt,me,e,t,$e,Ke,Je]);const At=s.useMemo(()=>v0(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:At}}),a.jsx("div",{style:F,children:a.jsxs("div",{ref:ve,className:`${u}-wrapper ${J}${Ge?` ${Ge}`:""}${me?` ${u}-type-b`:""}`.trim(),style:{width:E.scalingValue(g??0,n)},onMouseMove:ee?Mt:void 0,onMouseLeave:ee?Qe:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[Ke.map((Ae,ft)=>{var ut;const gt=(((ut=Ae.link)==null?void 0:ut.length)??0)>0,dt=gt&&(!n||i)?"a":"div",yt=Dc(ft,Ke.length,Se,le,ht,S??0,n??!1);return a.jsxs(dt,{ref:ft===0?it=>{Ee.current=it}:void 0,className:`${u}-list-item${gt||$==="always"?` ${u}-list-item-has-link`:""}${ht&&ft===Ke.length-1?` ${u}-list-item-before-cut`:""}`,...gt?{href:Ae.link,target:"_blank"}:{},style:yt,onMouseEnter:it=>{W&&(gt||$==="always")&&Wc(it,u),ee&&St(Ae,it)},onMouseLeave:it=>{W&&(gt||$==="always")&&Oc(it,u)},children:[He>0&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:be(He)}}),a.jsxs("div",{className:`${u}-list-cols-row${me?"":` ${u}-list-cols-row-h`}${p&&ft===0&&me?` ${u}-list-cols-row-controls`:""}`,...me?{}:{"data-list-row":""},style:me?void 0:{minHeight:be(ct)},children:[Ue.map((it,Nt)=>{const $t=Nt===Ue.length-1,Qt=et[Nt],Xt=it.paddingBottom,Ot=g0(Ae.cells[it.key]),jt=me&&Ot&&Xt>0,Dt=me?{minHeight:be(ct)}:{width:be(Je[Nt])},zt=me?{paddingLeft:be(oe),paddingRight:be(oe)}:{paddingLeft:be(Qt.paddingLeft),paddingRight:be(Qt.paddingRight)},D=it.textPrefix.charAt(0),Ie=me?w0(e[`${it.textPrefix}VerticalAlign`]):S0(e[`${it.textPrefix}VerticalAlign`],e,D),Be=me&&Ot&&p&&ft===0;return me&&!Ot?null:a.jsxs("div",{className:me?`${u}-list-col-wrap`:void 0,...me?{}:{"data-list-col":"","data-col-letter":D,"data-valign":Ie.kind,...Ie.kind==="baseline"?{"data-valign-anchor":Ie.anchorLetter}:{}},children:[a.jsx("div",{className:`${u}-list-col${$t?` ${u}-list-col-last`:""}`,style:{...zt,...Dt,...me?{justifyContent:jc(Ie.kind)}:{}},"data-test":it.width,children:a.jsx("span",{className:Gc(e,it.textPrefix,`${u}-list-col-title`,`${u}-text-tight-leading`),style:{...Vc($a(e,it.textPrefix),n),...Xc(e,it.textPrefix,u,n),...me?{}:C0(Ie.kind)},children:Ae.cells[it.key]??null})}),jt&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:be(Xt)}}),Be&&a.jsx("div",{"data-controls":it.paddingBottomKey,"data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:be(Math.max(Xt,ps))}})]},it.key)}),p&&ft===0&&me&&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(N),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{top:0,left:0,width:be(fe),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(N),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{top:0,left:be(Math.max(fe,ye-fe)),width:be(fe),height:"100%"}})]})]}),!me&&Xe>0&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:be(Xe)}}),p&&ft===0&&!me&&a.jsx("div",{"data-controls":"rowPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${u}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:be(rt)}})]},Ae.id)}),p&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":pt,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":me?"center":"left-y",className:`${u}-control-anchor`,style:{top:xt,left:0,width:"100%",height:be(Math.max(He,ps))}})},"row-padding-handles"),p&&!me&&It&&nt&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":It.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Je[0]-((bt==null?void 0:bt.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Re??void 0,className:`${u}-control-anchor`,style:{top:0,left:0,width:be(Ut),height:"100%"}}),a.jsx("div",{"data-controls":nt.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Je[Ue.length-1]-((Lt==null?void 0:Lt.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Re??void 0,className:`${u}-control-anchor`,style:{top:0,left:be(Me-Ft),width:be(Ft),height:"100%"}})]},"column-edge-padding-handles"),p&&!me&&Ue.slice(0,-1).map((Ae,ft)=>{const gt=Ue[ft+1],dt=Ve.slice(0,ft+1).reduce(($t,Qt)=>$t+Qt,0),yt=et[ft],ut=et[ft+1],it=Math.max(yt.paddingRight,go),Nt=Math.max(ut.paddingLeft,go);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":Ae.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Je[ft]-yt.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Re??void 0,className:`${u}-control-anchor`,style:{top:0,left:be(dt-it),width:be(it),height:"100%"}}),a.jsx("div",{"data-controls":gt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Je[ft+1]-ut.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Re??void 0,className:`${u}-control-anchor`,style:{top:0,left:be(dt),width:be(Nt),height:"100%"}})]},`${Ae.paddingRightKey}-padding`)}),p&&!me&&Ue.slice(0,-1).map((Ae,ft)=>{const gt=X0(ft,Ve,_e,ye),yt=Ve.slice(0,ft+1).reduce((ut,it)=>ut+it,0)-Uc/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Ae.widthKey,"data-controls-axis":"x","data-controls-min":String(zl),"data-controls-max-fraction":String(gt),"data-controls-variant":"column-width",className:`${u}-col-resize-handle`,style:{position:"absolute",top:"0px",left:be(yt),width:be(Uc),height:"calc(100%)",pointerEvents:"auto"}})},`${Ae.widthKey}-junction`)})]}),ht&&(()=>{const Ae=$a(e,si),ft=T0(e.cutLabelVerticalAlign),gt=Ae.textTextAlign==="justify"||me;return a.jsx("button",{type:"button",className:`${u}-cut-item`,style:{minHeight:be(P??0),cursor:We?"pointer":"default",...m0(le,S??0,n??!1)},onClick:We?Ne:void 0,onMouseEnter:W||ee?kt:void 0,onMouseLeave:W?Bt:void 0,children:a.jsx("div",{className:`${u}-list-cols-row`,style:{...me?{paddingLeft:be(oe),paddingRight:be(oe)}:{},justifyContent:I0(Ae.textTextAlign),alignItems:jc(ft)},children:a.jsx("span",{className:Gc(e,si,`${u}-cut-label`,`${u}-text-tight-leading`),style:{...Vc(Ae,n),...Xc(e,si,u,n),...gt?{width:"100%"}:{}},children:q})})})})(),ee&&ce&&typeof document<"u"&&(()=>{const Ae=`${ce.widthPx}px`,ft={width:Ae,height:"auto",maxHeight:Ae,objectFit:"contain"},gt=(c?document.getElementById(c):null)??document.body;return qn.createPortal(a.jsx("div",{ref:se,className:`${u}-hover-media-anchor`,"data-selection":"none",children:a.jsx(p0,{media:ce,className:ce.isVideo?`${u}-hover-video`:`${u}-hover-image`,style:ft},`${ce.rowId}-${ce.assetId}`)}),gt)})()]})})]})}const Q0=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
10591
10591
  import { createPortal } from 'react-dom';
10592
10592
  import { CommonComponentProps } from '../props';
10593
10593
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
@@ -13842,7 +13842,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13842
13842
  pointer-events: none;
13843
13843
  z-index: 2;
13844
13844
  }
13845
- `}function td(e,t,n,i,o,r,l,c){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:r??0,textAppearance:l,color:c??"#000000"}}function xx({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r}){const{prefix:l}=E.useScopedStyles(),c=o??!1,{wrapperWidth:d=1,cellMinHeight:u=0,dividerWidth:p=694e-6,dividerStyle:y="solid",entryHoverEffect:x="default",autoclose:g="off",icon:f,iconMaxWidth:b=.00833,iconPaddingRight:S=0,iconAnimation:W="rotate 45",questionColor:v="#000000",answerColor:L="#000000",dividerColor:M="#0000001F",iconColor:U="#000000",questionHoverColor:G="#666666",iconHoverColor:B="#666666",iconActiveColor:N="#000000",dividerHoverColor:O="#000000",questionFontFamily:C,questionFontSettings:$,questionFontSize:K,questionLineHeight:R,questionLetterSpacing:w,questionWordSpacing:T,questionTextAppearance:j,answerFontFamily:_,answerFontSettings:Q,answerFontSize:P,answerLineHeight:h,answerLetterSpacing:J,answerWordSpacing:V,answerTextAppearance:me,questionPaddingLeft:k=0,questionPaddingTop:le=0,questionPaddingBottom:I=0,answerPaddingLeft:ue=0,answerPaddingRight:ee=0,answerPaddingTop:xe=0,answerPaddingBottom:Le=0}=e,ce=t??[],[de,Z]=s.useState(()=>new Set),pe=!n||i;s.useEffect(()=>{Z(new Set)},[g]),s.useEffect(()=>{n&&!o&&!i&&Z(new Set)},[n,o,i]);const oe=Je=>E.scalingValue(Je,n??!1),ge=Math.max(k,fi),be=Math.max(le,fi),Re=Math.max(I,fi),Ee=Math.max(ue,fi),Te=Math.max(ee,fi),we=Math.max(xe,fi),m=Math.max(Le,fi),Y=Math.max(0,(d??1)-S-b),te=Math.max(0,(d??1)-ee),ae=Math.max(0,(d??1)-ue),fe=Math.max(S,fi),F=Math.max(0,(d??1)-k-b),H=s.useMemo(()=>de.size===0?0:Math.min(...de),[de]),ne=s.useCallback(Je=>de.has(Je),[de]),q=pe&&x==="default"?`${l}-entry-hover-default`:"",ie=f??"",z=ie!=="",$e=W.replace(/^rotate /,""),re=`${l}-icon-anim-${$e}`,X=pn(nn(td(C,$,K,R,w,T,j,v),n)),Ce=pn(nn(td(_,Q,P,h,J,V,me,L),n)),He=Jc(K,R,`${l}-question`,`${l}-text-tight-leading`),Ye=Jc(P,h,`${l}-answer-text`,`${l}-text-tight-leading`),De=ed(K,R,l,n),ze=ed(P,h,l,n),Ze=E.buildColorVars(l,{questionColor:v,answerColor:L,dividerColor:M,iconColor:U,questionHoverColor:G,iconHoverColor:B,iconActiveColor:N,dividerHoverColor:O},hx,fx),Ue=r&&r!=="default"?`${l}-state-${r}`:"",ye=s.useCallback(Je=>{pe&&Z(et=>{if(et.has(Je)){const lt=new Set(et);return lt.delete(Je),lt}if(g==="on")return new Set([Je]);const ot=new Set(et);return ot.add(Je),ot})},[pe,g]),Ne=s.useMemo(()=>vx(l),[l]),Ve={[`--${l}-divider-width`]:E.scalingValue(p,n??!1),[`--${l}-divider-style`]:y,[`--${l}-icon-max-width`]:E.scalingValue(b,n??!1),...u>0?{[`--${l}-question-min-height`]:E.scalingValue(u,n??!1)}:{}};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Ne}}),a.jsx("div",{style:Ze,children:a.jsx("div",{className:Et(`${l}-wrapper`,n&&!i&&`${l}-editor`,q,Ue),style:{width:E.scalingValue(d,n??!1),maxWidth:"100%",...Ve},children:ce.map((Je,et)=>{var Ge;const ot=ne(et),lt=((Ge=Je.question)==null?void 0:Ge.trim())??"",Ke=Je.answer,ht=((Ke==null?void 0:Ke.length)??0)>0,tt=c&&et===H;return a.jsxs("div",{className:Et(`${l}-item`,ot&&`${l}-item-open`),"data-faq-item":"",children:[a.jsxs("div",{className:`${l}-question-controls`,children:[tt&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"questionPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:oe(be)}}),a.jsx("div",{"data-controls":"questionPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Y),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:oe(ge),height:"100%"}}),a.jsx("div",{"data-controls":"iconPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(F),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:oe(fe),height:"100%"}})]}),a.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":ot,style:{...X,...De,paddingLeft:oe(k),paddingRight:oe(S)},onClick:()=>ye(et),children:[le>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:oe(le)},"aria-hidden":"true"}),a.jsxs("span",{className:`${l}-question-row`,children:[a.jsx("span",{className:He,children:lt}),ht&&(z?a.jsx("span",{className:`${l}-icon ${l}-icon-custom ${re}`,"aria-hidden":"true",children:a.jsx(gn,{url:ie,fill:`var(--${l}-icon-color)`,hoverFill:`var(--${l}-icon-hover-color, var(--${l}-icon-color))`,className:`${l}-icon-image`})}):a.jsx("span",{className:`${l}-icon ${l}-icon-default ${re}`,"aria-hidden":"true"}))]}),I>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:oe(I)},"aria-hidden":"true"})]}),tt&&a.jsx("div",{"data-controls":"questionPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:oe(Re)}})]}),ht&&Ke&&a.jsx("div",{className:`${l}-panel`,"aria-hidden":!ot,children:a.jsx("div",{className:`${l}-panel-inner`,children:a.jsxs("div",{className:`${l}-answer-controls`,children:[tt&&ot&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"answerPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:oe(we)}}),a.jsx("div",{"data-controls":"answerPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(te),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:oe(Ee),height:"100%"}}),a.jsx("div",{"data-controls":"answerPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ae),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:oe(Te),height:"100%"}})]}),xe>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:oe(xe)}}),a.jsx("div",{className:`${l}-answer`,style:{...Ce,...ze,paddingLeft:oe(ue),paddingRight:oe(ee)},children:a.jsx("div",{className:Ye,children:a.jsx(Zi,{content:Ke})})}),Le>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:oe(Le)}}),tt&&ot&&a.jsx("div",{"data-controls":"answerPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:oe(m)}})]})})})]},et)})})})]})}const bx=`import { useCallback, useEffect, useMemo, useState } from 'react';
13845
+ `}function td(e,t,n,i,o,r,l,c){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:r??0,textAppearance:l,color:c??"#000000"}}function xx({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r}){const{prefix:l}=E.useScopedStyles(),c=o??!1,{wrapperWidth:d=1,cellMinHeight:u=0,dividerWidth:p=694e-6,dividerStyle:y="solid",entryHoverEffect:x="default",autoclose:g="off",icon:h,iconMaxWidth:b=.00833,iconPaddingRight:S=0,iconAnimation:_="rotate 45",questionColor:v="#000000",answerColor:L="#000000",dividerColor:P="#0000001F",iconColor:q="#000000",questionHoverColor:X="#666666",iconHoverColor:B="#666666",iconActiveColor:H="#000000",dividerHoverColor:O="#000000",questionFontFamily:C,questionFontSettings:$,questionFontSize:Q,questionLineHeight:R,questionLetterSpacing:T,questionWordSpacing:w,questionTextAppearance:V,answerFontFamily:z,answerFontSettings:U,answerFontSize:M,answerLineHeight:f,answerLetterSpacing:K,answerWordSpacing:G,answerTextAppearance:ge,questionPaddingLeft:k=0,questionPaddingTop:ce=0,questionPaddingBottom:I=0,answerPaddingLeft:ue=0,answerPaddingRight:ee=0,answerPaddingTop:xe=0,answerPaddingBottom:Le=0}=e,se=t??[],[de,Z]=s.useState(()=>new Set),pe=!n||i;s.useEffect(()=>{Z(new Set)},[g]),s.useEffect(()=>{n&&!o&&!i&&Z(new Set)},[n,o,i]);const ie=Je=>E.scalingValue(Je,n??!1),me=Math.max(k,fi),ve=Math.max(ce,fi),Ee=Math.max(I,fi),Re=Math.max(ue,fi),Ce=Math.max(ee,fi),$e=Math.max(xe,fi),m=Math.max(Le,fi),Y=Math.max(0,(d??1)-S-b),te=Math.max(0,(d??1)-ee),oe=Math.max(0,(d??1)-ue),fe=Math.max(S,fi),N=Math.max(0,(d??1)-k-b),F=s.useMemo(()=>de.size===0?0:Math.min(...de),[de]),ne=s.useCallback(Je=>de.has(Je),[de]),re=pe&&x==="default"?`${l}-entry-hover-default`:"",J=h??"",W=J!=="",Se=_.replace(/^rotate /,""),le=`${l}-icon-anim-${Se}`,j=pn(nn(td(C,$,Q,R,T,w,V,v),n)),Te=pn(nn(td(z,U,M,f,K,G,ge,L),n)),Fe=Jc(Q,R,`${l}-question`,`${l}-text-tight-leading`),Ye=Jc(M,f,`${l}-answer-text`,`${l}-text-tight-leading`),De=ed(Q,R,l,n),ze=ed(M,f,l,n),Ze=E.buildColorVars(l,{questionColor:v,answerColor:L,dividerColor:P,iconColor:q,questionHoverColor:X,iconHoverColor:B,iconActiveColor:H,dividerHoverColor:O},hx,fx),Ue=r&&r!=="default"?`${l}-state-${r}`:"",ye=s.useCallback(Je=>{pe&&Z(et=>{if(et.has(Je)){const lt=new Set(et);return lt.delete(Je),lt}if(g==="on")return new Set([Je]);const ot=new Set(et);return ot.add(Je),ot})},[pe,g]),_e=s.useMemo(()=>vx(l),[l]),Ve={[`--${l}-divider-width`]:E.scalingValue(p,n??!1),[`--${l}-divider-style`]:y,[`--${l}-icon-max-width`]:E.scalingValue(b,n??!1),...u>0?{[`--${l}-question-min-height`]:E.scalingValue(u,n??!1)}:{}};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:_e}}),a.jsx("div",{style:Ze,children:a.jsx("div",{className:Et(`${l}-wrapper`,n&&!i&&`${l}-editor`,re,Ue),style:{width:E.scalingValue(d,n??!1),maxWidth:"100%",...Ve},children:se.map((Je,et)=>{var Ge;const ot=ne(et),lt=((Ge=Je.question)==null?void 0:Ge.trim())??"",Ke=Je.answer,ht=((Ke==null?void 0:Ke.length)??0)>0,tt=c&&et===F;return a.jsxs("div",{className:Et(`${l}-item`,ot&&`${l}-item-open`),"data-faq-item":"",children:[a.jsxs("div",{className:`${l}-question-controls`,children:[tt&&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:ie(ve)}}),a.jsx("div",{"data-controls":"questionPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Y),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:ie(me),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(N),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:ie(fe),height:"100%"}})]}),a.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":ot,style:{...j,...De,paddingLeft:ie(k),paddingRight:ie(S)},onClick:()=>ye(et),children:[ce>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:ie(ce)},"aria-hidden":"true"}),a.jsxs("span",{className:`${l}-question-row`,children:[a.jsx("span",{className:Fe,children:lt}),ht&&(W?a.jsx("span",{className:`${l}-icon ${l}-icon-custom ${le}`,"aria-hidden":"true",children:a.jsx(gn,{url:J,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 ${le}`,"aria-hidden":"true"}))]}),I>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:ie(I)},"aria-hidden":"true"})]}),tt&&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:ie(Ee)}})]}),ht&&Ke&&a.jsx("div",{className:`${l}-panel`,"aria-hidden":!ot,children:a.jsx("div",{className:`${l}-panel-inner`,children:a.jsxs("div",{className:`${l}-answer-controls`,children:[tt&&ot&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"answerPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:ie($e)}}),a.jsx("div",{"data-controls":"answerPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","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,left:0,width:ie(Re),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(oe),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:ie(Ce),height:"100%"}})]}),xe>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:ie(xe)}}),a.jsx("div",{className:`${l}-answer`,style:{...Te,...ze,paddingLeft:ie(ue),paddingRight:ie(ee)},children:a.jsx("div",{className:Ye,children:a.jsx(Zi,{content:Ke})})}),Le>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:ie(Le)}}),tt&&ot&&a.jsx("div",{"data-controls":"answerPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:ie(m)}})]})})})]},et)})})})]})}const bx=`import { useCallback, useEffect, useMemo, useState } from 'react';
13846
13846
  import cn from 'classnames';
13847
13847
  import { CommonComponentProps } from '../props';
13848
13848
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
@@ -14590,7 +14590,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
14590
14590
  </>
14591
14591
  );
14592
14592
  }
14593
- `;function yi(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const nd={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Sx=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],wx={type:"object",version:1,content:{type:"array",display:{type:"array"},items:{type:"object",properties:{question:{type:"string",label:"Question",placeholder:"Add question...",display:{type:"text-input"}},answer:{label:"Answer",placeholder:"Add answer...",display:{type:"rich-text"}}}},default:[{question:"What are the three main parts of The Divine Comedy?",answer:[{type:"paragraph",children:[{text:"The poem is divided into Inferno, Purgatorio, and Paradiso. These three sections follow Dante’s journey through Hell, Purgatory, and Heaven."}]}]},{question:"Who guides Dante through Hell and most of Purgatory?",answer:[{type:"paragraph",children:[{text:"Dante is guided by Virgil, the ancient Roman poet. Virgil represents human reason and wisdom, but because he lived before Christianity, he cannot guide Dante all the way into Heaven."}]}]},{question:"What does the dark wood at the beginning of the poem symbolize?",answer:[{type:"paragraph",children:[{text:"The dark wood symbolizes Dante’s spiritual confusion and moral crisis. It shows that he has lost the “straight way” in life and needs guidance to return to truth and salvation."}]}]},{question:"What is “contrapasso” in Inferno?",answer:[{type:"paragraph",children:[{text:"“Contrapasso” is the principle that punishments in Hell reflect the sins committed during life. For example, people who caused division are themselves physically divided, showing how their punishment mirrors their wrongdoing."}]}]},{question:"Who guides Dante through Heaven?",answer:[{type:"paragraph",children:[{text:"Beatrice guides Dante through Paradiso. She represents divine love, grace, and spiritual understanding, helping Dante move beyond human reason toward a vision of God."}]}]},{question:"Why is The Divine Comedy important in literary history?",answer:[{type:"paragraph",children:[{text:"The Divine Comedy is important because it is one of the greatest works of world literature and helped shape the Italian language. Dante wrote it in the Tuscan dialect rather than Latin, making serious literature more accessible to ordinary readers."}]}]},{question:"What is the overall journey of The Divine Comedy about?",answer:[{type:"paragraph",children:[{text:"The poem is about Dante’s spiritual journey from sin and despair toward repentance, wisdom, and union with God. On a deeper level, it represents the soul’s path from confusion to divine truth."}]}]}]},settings:{sizing:"auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},dividerWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},dividerStyle:{type:"string",scope:"common",title:"Style",display:{type:"toggle-cycle",enum:["solid","dashed","dotted"]}},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default"]}},autoclose:{type:"string",scope:"common",title:"Autoclose",display:{type:"toggle-cycle",enum:["on","off"]}},icon:{type:["string","null"],scope:"common",display:{type:"settings-image-input"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:yi("Icon Padding Right"),iconAnimation:{type:"string",scope:"common",title:"Icon Animation",display:{type:"toggle-cycle",enum:["rotate 180","rotate 90","rotate 45"]}},questionColor:{type:"string",scope:"common",title:"Question Default",display:{type:"palette-color-picker"}},answerColor:{type:"string",scope:"common",title:"Answer Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"palette-color-picker"}},questionHoverColor:{type:"string",scope:"common",title:"Question Hover",display:{type:"palette-color-picker"}},iconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"palette-color-picker"}},iconActiveColor:{type:"string",scope:"common",title:"Icon Active",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}},questionFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},questionFontSettings:{...nd.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},questionFontSize:{type:"number",scope:"layout",title:"Question Font Size",display:{type:"font-size"}},questionLineHeight:{type:"number",scope:"layout",title:"Question Line Height",display:{type:"line-height-input"}},questionLetterSpacing:{type:"number",scope:"layout",title:"Question Letter Spacing",display:{type:"letter-spacing-input"}},questionWordSpacing:{type:"number",scope:"layout",title:"Question Word Spacing",display:{type:"word-spacing-input"}},questionTextAppearance:{type:"object",scope:"layout",title:"Question Text Appearance",display:{type:"text-appearance"}},answerFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},answerFontSettings:{...nd.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},answerFontSize:{type:"number",scope:"layout",title:"Answer Font Size",display:{type:"font-size"}},answerLineHeight:{type:"number",scope:"layout",title:"Answer Line Height",display:{type:"line-height-input"}},answerLetterSpacing:{type:"number",scope:"layout",title:"Answer Letter Spacing",display:{type:"letter-spacing-input"}},answerWordSpacing:{type:"number",scope:"layout",title:"Answer Word Spacing",display:{type:"word-spacing-input"}},answerTextAppearance:{type:"object",scope:"layout",title:"Answer Text Appearance",display:{type:"text-appearance"}},questionPaddingLeft:yi("Question Padding Left"),questionPaddingTop:yi("Question Padding Top"),questionPaddingBottom:yi("Question Padding Bottom"),answerPaddingLeft:yi("Answer Padding Left"),answerPaddingRight:yi("Answer Padding Right"),answerPaddingTop:yi("Answer Padding Top"),answerPaddingBottom:yi("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"01M3QM74XGFBPMXNEQB1BXSD9E",iconAnimation:"rotate 45",questionColor:"#000000",answerColor:"#000000",dividerColor:"#000000",iconColor:"#000000",questionHoverColor:"#A60239",iconHoverColor:"#A60239",iconActiveColor:"#000000",dividerHoverColor:"#A60239",questionFontFamily:"Goudy Bookletter 1911",questionFontSettings:{fontWeight:400,fontStyle:"normal"},questionLetterSpacing:0,questionWordSpacing:0,questionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},answerFontFamily:"Goudy Bookletter 1911",answerFontSettings:{fontWeight:400,fontStyle:"normal"},answerLetterSpacing:0,answerWordSpacing:0,answerTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{wrapperWidth:1,cellMinHeight:0,dividerWidth:.008,iconMaxWidth:.0533,iconPaddingRight:.08,questionFontSize:.09066,questionLineHeight:.10133,questionLetterSpacing:-.00266,answerFontSize:.0533,answerLineHeight:.064,questionPaddingLeft:.0533,questionPaddingTop:.0533,questionPaddingBottom:.0533,answerPaddingLeft:.0533,answerPaddingRight:.16,answerPaddingTop:.0533,answerPaddingBottom:.0533},t:{wrapperWidth:.651041,cellMinHeight:0,dividerWidth:.00390625,iconMaxWidth:.02604166,iconPaddingRight:.0130208,questionFontSize:.0390625,questionLineHeight:.04427,questionLetterSpacing:-.00091145833,answerFontSize:.0234375,answerLineHeight:.026041,questionPaddingLeft:0,questionPaddingTop:.01302,questionPaddingBottom:.01302,answerPaddingLeft:.065104,answerPaddingRight:.09765625,answerPaddingTop:.026041,answerPaddingBottom:.026041},d:{wrapperWidth:.6388,cellMinHeight:0,dividerWidth:.002083,iconMaxWidth:.01388,iconPaddingRight:.01388,questionFontSize:.0333,questionLineHeight:.0333,questionLetterSpacing:-9e-4,answerFontSize:.01111,answerLineHeight:.01388,questionPaddingLeft:0,questionPaddingTop:.01111,questionPaddingBottom:.01111,answerPaddingLeft:.0625,answerPaddingRight:.1625,answerPaddingTop:0,answerPaddingBottom:.01111}},layout:["__componentName__","wrapperWidth","cellMinHeight","dividerWidth","dividerStyle","entryHoverEffect","autoclose","icon","iconMaxWidth","iconAnimation"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["wrapperWidth","cellMinHeight"]},{type:"row",title:"",items:["entryHoverEffect","autoclose"]},{type:"row",title:"Divider",items:["dividerWidth","dividerStyle"]},{type:"row",title:"Icon",items:["icon","iconMaxWidth"]},{type:"row",title:"",items:["iconAnimation"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Question",items:["questionFontFamily","questionFontSettings",{type:"row",items:["questionFontSize","questionLineHeight","questionLetterSpacing","questionWordSpacing"]},"questionTextAppearance"]},{type:"group",title:"Answer",items:["answerFontFamily","answerFontSettings",{type:"row",items:["answerFontSize","answerLineHeight","answerLetterSpacing","answerWordSpacing"]},"answerTextAppearance"]}]}],paletteBookmark:{items:[...Sx],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},$x={element:xx,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:wx,sourceCode:bx},li=e=>e.display==="cover",ja=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},id=100,Cx=.2,od=8,bp=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,r]=s.useState(0),[l,c]=s.useState(!1),d=s.useRef(null),u=s.useRef(0);u.current=o;const p=s.useMemo(()=>typeof window>"u"?id:Math.max(id,window.innerHeight*Cx),[]),y=s.useCallback(C=>Math.max(0,1-C/(p*1.5)),[p]),x=s.useCallback(C=>Math.max(0,1-C/(p*.45)),[p]),g=s.useCallback(C=>{const $=typeof window<"u"?window.innerHeight:800,K=Math.max(.88,1-C/$*.12);return`translateY(${C}px) scale(${K})`},[]),f=s.useCallback(()=>{d.current=null},[]),b=s.useCallback(()=>{c(!0),r(0),window.setTimeout(()=>c(!1),n),f()},[n,f]),S=s.useCallback(()=>{const C=typeof window<"u"?window.innerHeight:800;c(!0),r(C),window.setTimeout(()=>{t(),f(),c(!1)},Math.min(n,200))},[n,t,f]),W=s.useCallback(C=>{!e||l||C.pointerType==="touch"&&(i!=null&&i(C.target)||(d.current={startX:C.clientX,startY:C.clientY,isLocked:null,pointerId:C.pointerId}))},[e,l,i]),v=s.useCallback(C=>{const $=d.current;if(!e||!$||C.pointerType!=="touch"||$.pointerId!==C.pointerId)return;const K=C.clientX-$.startX,R=C.clientY-$.startY;if($.isLocked===null){if(Math.abs(K)<od&&Math.abs(R)<od)return;if(R>0&&R>Math.abs(K))$.isLocked=!0,C.currentTarget.setPointerCapture(C.pointerId);else{$.isLocked=!1,f();return}}if(!$.isLocked)return;C.preventDefault();const w=Math.max(0,R);u.current=w,r(w)},[e,f]),L=s.useCallback(C=>{const $=d.current;if(!e||!$||C.pointerType!=="touch"||$.pointerId!==C.pointerId)return;const K=$.isLocked===!0;if(C.currentTarget.hasPointerCapture(C.pointerId)&&C.currentTarget.releasePointerCapture(C.pointerId),!K){f();return}C.clientY-$.startY>=p?S():b()},[p,S,e,f,b]),M=s.useCallback(C=>{L(C)},[L]),U=s.useCallback(C=>{L(C)},[L]),G=o>0,B=l?`transform ${n}ms ease`:"none",N=l?`opacity ${n}ms ease`:"none",O=o>0||l;return{isSwipeDragging:G,backdropStyle:{opacity:y(o),transition:N},mediaAreaStyle:{transform:g(o),transition:B,touchAction:G?"none":void 0,willChange:G?"transform":void 0},overlayContentStyle:O?{opacity:x(o),transition:N}:void 0,swipeHandlers:e?{onPointerDown:W,onPointerMove:v,onPointerUp:M,onPointerCancel:U}:{},dismissAreaStyle:e?{touchAction:G?"none":"pan-x"}:void 0}},Tx="[data-lightbox-scrollable]",jl=(e=!0)=>{s.useEffect(()=>{if(!e)return;const t=window.scrollY,n=document.body.style.overflow,i=document.body.style.position,o=document.body.style.top,r=document.body.style.width,l=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${t}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const c=d=>{const u=d.target;u instanceof Element&&u.closest(Tx)||d.preventDefault()};return document.addEventListener("touchmove",c,{passive:!1}),()=>{document.removeEventListener("touchmove",c),document.body.style.overflow=n,document.body.style.position=i,document.body.style.top=o,document.body.style.width=r,document.documentElement.style.overflow=l,window.scrollTo({top:t,left:0,behavior:"instant"})}},[e])},Ix=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Lx=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},Px=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},Mx=(e,t,n,{duration:i,easing:o,onComplete:r})=>{const l=e.scrollLeft,c=n-l,d=l-n,u=(f,b)=>{Lx(t),e.scrollLeft=f,b&&(r==null||r())};if(Math.abs(c)<.5)return u(n,!0),()=>{};let p=!1,y=0;const x=()=>{t.removeEventListener("transitionend",g),clearTimeout(y)},g=f=>{f.target!==t||f.propertyName!=="transform"||p||(p=!0,x(),u(n,!0))};return t.addEventListener("transitionend",g),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${d}px, 0, 0)`,y=window.setTimeout(()=>{p||(p=!0,x(),u(n,!0))},i+64),()=>{p||(p=!0,x(),u(l-Px(t),!1))}},cr=300,Rx=900,Ex=1500,kx="cubic-bezier(0.16, 1, 0.3, 1)",Ax=3e3,Fx=2,Nx=16,_x=.05,Hx=1,Xr=.3,Wx=50,Ox=20,ao=.004,No=["title1","title2","title3"],Dx={title1:"1",title2:"2",title3:"3"},zx={title1:"title1Color",title2:"title2Color",title3:"title3Color"},Bx={title1:.02,title2:.02,title3:.02},Ur=e=>`max(${e}, ${Ox}px)`,jx=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]}},Vx=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=jx(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Jt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Gx=e=>[Jt(e,"fontFamily"),Jt(e,"fontSettings"),{type:"row",items:[Jt(e,"fontSize"),Jt(e,"lineHeight"),Jt(e,"letterSpacing"),Jt(e,"wordSpacing")]},Jt(e,"textAlign"),Jt(e,"textAppearance")],Xx=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(No.map(e=>[Dx[e],Gx(e)]))}),Vl=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},c)=>{if(r<=0||c<=0)return{overflow:r,widths:[c,...l]};const d=Math.min(r,c);return{overflow:r-d,widths:[c-d,...l]}},{overflow:i-1,widths:[]});return o},Sp=(e,t)=>Vl(e,t),qr=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},rd=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Vl(e.length,n),effective:Sp(e.length,n)}},Ux=(e,t,n,i,o,r,l)=>{const c=[];return t&&c.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&c.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:r,text:n}),i&&c.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:l,text:i}),c},ms=(e,t)=>{const n=i=>{const o=Jt(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[zx[t]]}},qx=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),hs=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??Bx[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return nn(i,n)},Yx=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l})=>{const{backgroundColor:c,thumbnailSize:d,thumbnailGap:u,thumbnailMarginBottom:p,imageGap:y,closeIcon:x,closeIconMaxWidth:g,closeIconColor:f,closeIconHoverColor:b,thumbnailTrigger:S,thumbnailVisibility:W,thumbnailObjectFit:v,thumbnailActive:L,thumbnailActiveColor:M,title1Width:U,title2Width:G,title3Width:B,title1MarginLeft:N=0,title2MarginLeft:O=0,title3MarginLeft:C=0,titleRowMarginBottom:$=0,titleHeaderLayout:K="desktop",contentMarginTop:R,iconMarginLeft:w}=n,T=A=>E.scalingValue(A,i??!1),j=d??n.thumnailSize??.03,_=T(j),Q=T(u),P=T(p??.02),h=T(y??0),J=T(R??0),V=Ur(J),me=T(w??0),[k,le]=s.useState(0),I=s.useRef(k);I.current=k;const ue=t[k],{title1:ee,title2:xe,title3:Le}=Vx(ue),ce=hs("title1",ms(n,"title1"),i),de=hs("title2",ms(n,"title2"),i),Z=hs("title3",ms(n,"title3"),i),pe=K==="mobile",oe=!o&&(!i||r),ge=oe,be=oe,Re=oe,Ee=li(v),Te=Ee?{"--image-aspect-ratio":ja(v)}:void 0,we=!!(ee||xe||Le),m=s.useMemo(()=>Ux(e,ee,xe,Le,ce,de,Z),[e,k,ee,xe,Le,ce,de,Z]),Y=s.useMemo(()=>({title1Width:U,title2Width:G,title3Width:B}),[U,G,B]),te=s.useMemo(()=>m.map(A=>Y[A.widthKey]),[m,Y]),ae=s.useMemo(()=>Vl(m.length,te),[m.length,te]),fe=s.useMemo(()=>Sp(m.length,te),[m.length,te]),F=s.useMemo(()=>m.filter(A=>A.prefix==="title1"),[m]),H=s.useMemo(()=>m.filter(A=>A.prefix==="title2"||A.prefix==="title3"),[m]),ne=s.useMemo(()=>rd(F,Y),[F,Y]),q=s.useMemo(()=>rd(H,Y),[H,Y]),ie=s.useCallback((A,se)=>{const he=m.indexOf(A);if(!pe||se==="single-row")return{effectiveWidth:fe[he]??0,resolvedWidth:ae[he]??0,maxWidth:qr(he,ae)};if(se==="two-row-top"){const je=F.indexOf(A);return{effectiveWidth:ne.effective[je]??0,resolvedWidth:ne.resolved[je]??0,maxWidth:qr(je,ne.resolved)}}const Pe=H.indexOf(A);return{effectiveWidth:q.effective[Pe]??0,resolvedWidth:q.resolved[Pe]??0,maxWidth:qr(Pe,q.resolved)}},[H,q,fe,ae,m,F,ne,pe]),z=s.useCallback(A=>E.scalingValue(A,i??!1),[i]),$e=z($??0),re=s.useMemo(()=>({title1MarginLeft:N,title2MarginLeft:O,title3MarginLeft:C}),[N,O,C]),X=s.useCallback(A=>m.slice(0,A+1).reduce((se,he,Pe)=>se+(he!=null&&he.marginLeftKey?re[he.marginLeftKey]??0:0)+(ae[Pe]??0),0)+(pe?0:N??0),[m,re,ae,pe,N]),Ce=s.useCallback(()=>pe?0:N??0,[pe,N]),He=s.useCallback(A=>H.slice(0,A).reduce((se,he,Pe)=>se+(he.marginLeftKey?re[he.marginLeftKey]??0:0)+(q.resolved[Pe]??0),0),[H,q.resolved,re]),Ye=s.useCallback(A=>{const se=H[A];return He(A)+(se.marginLeftKey?re[se.marginLeftKey]??0:0)+(q.resolved[A]??0)},[H,q.resolved,He,re]),De=(A,se)=>{const he=A.marginLeftKey?re[A.marginLeftKey]??0:0,{effectiveWidth:Pe,resolvedWidth:je,maxWidth:mt}=ie(A,se),Ht=o&&se==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":A.prefix,style:{...se==="single-row"?{gridArea:A.prefix}:{},width:z(Pe),...he>0?{marginLeft:z(he)}:{}},children:[a.jsx("p",{className:A.className,style:A.style,children:A.text}),Ht&&A.marginLeftKey&&a.jsx("div",{"data-controls":A.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(je),style:{position:"absolute",top:0,left:z(-he),width:`max(${z(he)}, 10px)`,height:"100%",pointerEvents:"auto"}}),Ht&&a.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(mt),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:z(-ao/2),width:z(ao),height:"100%",pointerEvents:"auto"}})]},A.className)},ze=()=>{const A=pe?-1:m.findIndex(Pe=>Pe.prefix==="title1"),se=!pe&&(o||(N??0)>0)?(()=>{const Pe=N??0,je=A>=0?ae[A]:U??0;return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(je),style:{position:"absolute",top:0,left:0,width:`max(${z(Pe)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,he=m.flatMap((Pe,je)=>{if(!Pe.marginLeftKey)return[];const mt=re[Pe.marginLeftKey]??0,Ht=qx(m,ae,re,je)+Ce();return a.jsx("div",{"data-controls":Pe.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ae[je]),style:{position:"absolute",top:0,left:z(Ht),width:`max(${z(mt)}, 10px)`,height:"100%",pointerEvents:"auto"}},Pe.marginLeftKey)});return se?[se,...he]:he},Ze=()=>m.map((A,se)=>{const he=qr(se,ae),je=X(se)-ao/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(he),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:z(je),width:z(ao),height:"100%",pointerEvents:"auto"}})},`${A.widthKey}-junction`)}),Ue=()=>H.flatMap((A,se)=>{if(!A.marginLeftKey)return[];const he=re[A.marginLeftKey]??0,Pe=He(se),{resolvedWidth:je}=ie(A,"two-row-bottom");return a.jsx("div",{"data-controls":A.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(je),style:{position:"absolute",top:0,left:z(Pe),width:`max(${z(he)}, 10px)`,height:"100%",pointerEvents:"auto"}},A.marginLeftKey)}),ye=()=>H.map((A,se)=>{const{maxWidth:he}=ie(A,"two-row-bottom"),je=Ye(se)-ao/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(he),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:z(je),width:z(ao),height:"100%",pointerEvents:"auto"}})},`${A.widthKey}-junction`)}),Ne=s.useRef(null),Ve=s.useRef(null),Je=s.useRef(null),et=s.useRef(null),ot=s.useRef([]),lt=s.useRef([]),Ke=s.useRef(0),ht=s.useRef(null),tt=s.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),Ge=s.useRef(null),We=s.useRef(null),Fe=s.useRef(0),ve=s.useRef("forward"),_e=s.useRef(0),Xe=s.useRef(null),ct=s.useRef(!1),rt=t.length>1&&(!o||!!r),xt=rt?3:1,pt=s.useMemo(()=>Array.from({length:xt},()=>t).flat(),[t,xt]),[It,nt]=s.useState(!1),[bt,Lt]=s.useState(!1),[Ut,Ft]=s.useState(!0),Me=s.useRef(null),Oe=s.useRef(null),St=s.useRef(!1),Mt=s.useRef(!1),Qe=s.useRef(null),kt=s.useRef(null),Bt=ge&&!Ut,Wt=s.useCallback(()=>{ge&&(Ft(!0),kt.current&&clearTimeout(kt.current),kt.current=setTimeout(()=>{tt.current.isActive||Ft(!1)},Ax))},[ge]),At=s.useCallback(()=>{o||Mt.current||(Mt.current=!0,Lt(!1),Qe.current=setTimeout(()=>{l()},cr))},[o,l]),Ae=()=>a.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":Bt?"true":"false",style:{width:E.scalingValue(g??0,i),height:E.scalingValue(g??0,i),marginRight:me,"--close-icon-hover-color":b},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:At,"aria-label":"Close",children:a.jsx(gn,{url:x,fill:f,hoverFill:i&&!r?f:b,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:me,height:"100%",pointerEvents:"auto"}})]}),ft=(A="two-row")=>a.jsx("div",{...A==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:z(N??0),flexShrink:0,...A==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...A==="two-row"&&o?{pointerEvents:"auto"}:{}}}),gt=()=>{const A=m.find(Pe=>Pe.prefix==="title1"),se=m.filter(Pe=>Pe.prefix==="title2"||Pe.prefix==="title3"),he=se.length>0||o||($??0)>0;return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`${e}-header-row-top`,children:[(N??0)>0||o?ft():null,A&&De(A,"two-row-top"),x&&Ae()]}),he?a.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[se.length>0?a.jsxs("div",{className:`${e}-header-row-bottom`,children:[se.map(Pe=>De(Pe,"two-row-bottom")),o&&a.jsxs(a.Fragment,{children:[Ue(),ye()]})]}):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:$e,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},dt=()=>a.jsxs(a.Fragment,{children:[(N??0)>0||o?ft("single-row"):null,m.map(A=>De(A,"single-row")),o?a.jsxs(a.Fragment,{children:[ze(),Ze()]}):null,x?Ae():null]}),yt=s.useCallback(A=>!!(A.closest("[data-controls]")||A.closest(`.${e}-thumbnails`)||A.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:ut,backdropStyle:it,mediaAreaStyle:Nt,overlayContentStyle:$t,swipeHandlers:Qt,dismissAreaStyle:Xt}=bp({enabled:oe??!1,onClose:At,animMs:cr,isBlockedTarget:yt}),Ot=()=>{if(!rt||t.length===0)return Ke.current=0,0;const A=lt.current[0],se=lt.current[t.length];if(!A||!se)return Ke.current;const he=se.offsetLeft-A.offsetLeft;return he>0&&(Ke.current=he),Ke.current},jt=(A=!1)=>{if(!rt)return;const se=Ve.current,he=Ot();!se||he<=0||he<se.clientWidth*.25||(se.scrollLeft<=0?(se.scrollLeft+=he,A&&(tt.current.scrollLeft+=he),ct.current&&(_e.current+=he)):se.scrollLeft>=he*2&&(se.scrollLeft-=he,A&&(tt.current.scrollLeft-=he),ct.current&&(_e.current-=he)))},Dt=(A,se=(he=>(he=Ve.current)==null?void 0:he.scrollLeft)()??0)=>{if(!rt)return A;let Pe=t.length+A,je=1/0;for(let mt=0;mt<xt;mt++){const Ht=mt*t.length+A,qt=lt.current[Ht];if(!qt)continue;const sn=Math.abs(qt.offsetLeft-se);sn<je&&(je=sn,Pe=Ht)}return Pe},zt=A=>{const se=Ve.current;return!A||!se?!1:A.offsetWidth>se.clientWidth+1},D=A=>{const se=Ve.current;if(!A||!se||!zt(A))return!1;const he=A.offsetLeft,Pe=he+A.offsetWidth;return se.scrollLeft>=he-1&&se.scrollLeft+se.clientWidth<=Pe+1},Ie=(A=(se=>(se=Ve.current)==null?void 0:se.scrollLeft)()??0)=>{for(let Pe=0;Pe<lt.current.length;Pe+=1){const je=lt.current[Pe];if(je&&D(je))return Pe}let he={flatIndex:0,distance:1/0};return lt.current.forEach((Pe,je)=>{if(!Pe)return;const mt=Math.abs(Pe.offsetLeft-A);mt<he.distance&&(he={flatIndex:je,distance:mt})}),he.flatIndex},Be=A=>{Ve.current&&lt.current.forEach(se=>{se&&(se.style.scrollSnapAlign=zt(se)&&A==="backward"?"end":"start")})},ke=(A,se,he)=>{const Pe=A-se,je=Ie(se),mt=lt.current[je];if(D(mt))return Ie(A)%t.length;const Ht=lt.current[je+1],qt=mt?Ht?Ht.offsetLeft-mt.offsetLeft:mt.offsetWidth:0,sn=qt>0?Pe>qt*Xr?1:Pe<-qt*Xr?-1:0:0;return sn===0?he:rt?(he+sn+t.length)%t.length:Math.max(0,Math.min(t.length-1,he+sn))},vt=s.useCallback((A=!1)=>{if(W!=="on"||o)return;const se=et.current,he=I.current,Pe=ot.current[he];if(!se||!Pe||se.scrollWidth<=se.clientWidth)return;const je=se.scrollLeft,mt=je+se.clientWidth,Ht=Pe.offsetLeft,qt=Ht+Pe.offsetWidth;if(Ht>=je&&qt<=mt)return;const sn=se.scrollWidth-se.clientWidth;let en=je;if(!A&&Me.current===null){const mi=ot.current[he-1],kn=ot.current[he+1],Zn=mi?Pe.offsetLeft-mi.offsetLeft:kn?kn.offsetLeft-Pe.offsetLeft:Pe.offsetWidth;qt>mt?en+=Zn:Ht<je&&(en-=Zn)}else qt>mt?en=qt-se.clientWidth:en=Ht;se.scrollLeft=Math.max(0,Math.min(sn,en))},[o,W]),Ct=s.useCallback((A=!1)=>{A&&(St.current=!0),Oe.current===null&&(Oe.current=requestAnimationFrame(()=>{Oe.current=null;const se=St.current;St.current=!1,vt(se)}))},[vt]),at=s.useCallback(A=>{if(A===I.current)return;const se=I.current;I.current=A;const he=Math.abs(A-se)>1,Pe=rt&&t.length>1&&(se===t.length-1&&A===0||se===0&&A===t.length-1);le(A),Ct(he||Pe)},[t.length,rt,Ct]),Tt=()=>{if(!Ve.current||t.length===0||Me.current!==null||tt.current.isActive&&tt.current.hasMoved)return;const A=Ve.current.scrollLeft,se=Ie(A)%t.length;se!==I.current&&at(se)},Vt=()=>{Me.current=null},Pt=A=>{const se=Ve.current;se&&(se.style.scrollSnapType=A?"":"none")},Zt=()=>{var A;(A=We.current)==null||A.call(We),We.current=null},on=()=>{Xe.current!==null&&(cancelAnimationFrame(Xe.current),Xe.current=null),ct.current=!1},Wn=()=>{const A=Ve.current;if(!A){Xe.current=null,ct.current=!1;return}const se=_e.current-A.scrollLeft;if(Math.abs(se)<.5){A.scrollLeft=_e.current,jt(),Tt(),Xe.current=null,ct.current=!1;return}A.scrollLeft+=se*_x,jt(),Tt(),Wt(),Xe.current=requestAnimationFrame(Wn)},xn=()=>{const A=Je.current;A&&(A.style.transition="",A.style.transform="",A.style.willChange="")},ui=(A,se,he,Pe)=>{xn(),A.scrollLeft=se,Fe.current=A.scrollLeft,jt(),he!==void 0?(I.current=he,le(he)):Tt(),Pt(!0),Pe==null||Pe()},dn=(A,{behavior:se="smooth",activeIndex:he,onComplete:Pe}={})=>{const je=Ve.current,mt=Je.current;if(!je||!mt)return;if(on(),Zt(),Pt(!1),se==="auto"){ui(je,A,he,Pe);return}const Ht=Math.abs(A-je.scrollLeft),qt=Ix(Ht,Rx,Ex,je.clientWidth*.55);We.current=Mx(je,mt,A,{duration:qt,easing:kx,onComplete:()=>{We.current=null,ui(je,A,he,Pe)}})},pi=(A="smooth")=>{const se=Ve.current;if(!se||t.length===0)return;const he=Ie()%t.length,Pe=Dt(he,se.scrollLeft),je=lt.current[Pe];je&&dn(je.offsetLeft,{behavior:A,activeIndex:he})},Kn=(A,se="smooth",he,Pe)=>{const je=Ve.current;if(!je||t.length===0)return;const mt=(Pe??je.scrollLeft)-A,Ht=Ie(A),qt=lt.current[Ht];if(D(qt)){Pt(!0),Tt();return}const sn=lt.current[Ht+1],en=qt?sn?sn.offsetLeft-qt.offsetLeft:qt.offsetWidth:0;if((en>0?mt>en*Xr?1:mt<-en*Xr?-1:0:0)!==0){const Kl=he??Ht%t.length,Xo=ke(Pe??je.scrollLeft,A,Kl);bn(Xo,se);return}const kn=Pe??je.scrollLeft,Zn=Ie(kn),kr=lt.current[Zn];if(kr&&Math.abs(kr.offsetLeft-kn)<1){Pt(!0),Tt();return}pi("auto")},bn=(A,se="smooth")=>{const he=Ve.current;if(!he||t.length===0)return;const Pe=Dt(A,he.scrollLeft),je=lt.current[Pe];je&&(se==="smooth"?Me.current=A:Me.current=null,I.current=A,le(A),Ct(!0),dn(je.offsetLeft,{behavior:se,activeIndex:A,onComplete:se==="smooth"?Vt:void 0}))},gi=()=>{Ge.current&&(window.removeEventListener("pointerup",Ge.current),window.removeEventListener("pointercancel",Ge.current),Ge.current=null)},eo=(A,se,he,Pe,je)=>{const mt=he-A,Ht=Pe-se,qt=Math.abs(mt),sn=Math.abs(Ht);if(qt<Wx||qt<=sn)return!1;const en=mt<0?1:-1,mi=rt?(je+en+t.length)%t.length:Math.max(0,Math.min(t.length-1,je+en));return mi===je?!1:(bn(mi),!0)},Sn=A=>{if(!tt.current.isActive)return;gi();const se=Ve.current;if(!se)return;const{scrollLeft:he,startActiveIndex:Pe,hasMoved:je}=tt.current,mt=se.scrollLeft;jt(!0),tt.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},nt(!1),A!==void 0&&se.hasPointerCapture(A)&&se.releasePointerCapture(A),je?Kn(he,"smooth",Pe,mt):(Pt(!0),Tt()),Wt()},Qn=(A,se)=>{const he=ht.current;ht.current=null,he&&(eo(he.startX,he.startY,A,se,he.startActiveIndex),Wt())},to=A=>{if(!be)return;if(A.pointerType==="touch"){if(on(),Pt(!0),yt(A.target))return;ht.current={startX:A.clientX,startY:A.clientY,startActiveIndex:I.current};return}if(A.pointerType!=="mouse"||A.button!==0||yt(A.target))return;const se=Ve.current;if(!se)return;on(),Zt(),xn(),Me.current=null,tt.current={isActive:!0,startX:A.clientX,scrollLeft:se.scrollLeft,startActiveIndex:I.current,hasMoved:!1},Pt(!1),Wt(),se.setPointerCapture(A.pointerId),gi();const he=Pe=>{Pe.pointerType==="mouse"&&Sn(Pe.pointerId)};Ge.current=he,window.addEventListener("pointerup",he),window.addEventListener("pointercancel",he)},no=A=>{if(!be||A.pointerType!=="mouse")return;const se=Ve.current;if(!se||!tt.current.isActive)return;if(A.buttons===0){Sn(A.pointerId);return}const he=A.clientX-tt.current.startX;Math.abs(he)>Hx&&(tt.current.hasMoved=!0,nt(!0)),tt.current.hasMoved&&(A.preventDefault(),se.scrollLeft=tt.current.scrollLeft-he,jt(!0),Tt(),Wt())},Se=A=>{if(be){if(A.pointerType==="touch"){A.type==="pointerup"?Qn(A.clientX,A.clientY):ht.current=null;return}A.pointerType==="mouse"&&Sn(A.pointerId)}},qe=A=>{!be||A.pointerType!=="mouse"||Sn(A.pointerId)};return jl(),s.useEffect(()=>{const A=requestAnimationFrame(()=>Lt(!0));return()=>{cancelAnimationFrame(A),Zt(),gi(),Oe.current!==null&&(cancelAnimationFrame(Oe.current),Oe.current=null),Qe.current&&clearTimeout(Qe.current),kt.current&&clearTimeout(kt.current)}},[]),s.useEffect(()=>{if(!ge){Ft(!0);return}Wt();const A=()=>Wt();return document.addEventListener("pointermove",A,{passive:!0}),document.addEventListener("pointerdown",A,{passive:!0}),()=>{document.removeEventListener("pointermove",A),document.removeEventListener("pointerdown",A),kt.current&&clearTimeout(kt.current)}},[ge,Wt]),s.useEffect(()=>{const A=se=>{se.key==="Escape"&&At()};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[At]),s.useLayoutEffect(()=>{Ot()},[h,t.length,rt]),s.useLayoutEffect(()=>{o||bn(I.current,"auto")},[h,o]),s.useLayoutEffect(()=>{bn(0,"auto")},[t.length,rt]),s.useEffect(()=>{const A=Ve.current;if(!A||o||!oe)return;const se=he=>{if(he.preventDefault(),Math.abs(he.deltaY)<=Math.abs(he.deltaX))return;const Pe=he.deltaMode===1?Nx:he.deltaMode===2?A.clientHeight:1,je=he.deltaY*Pe*Fx;if(je!==0){if(Zt(),ct.current||(ct.current=!0,_e.current=A.scrollLeft,Me.current=null,Pt(!1)),_e.current+=je,!rt){const mt=A.scrollWidth-A.clientWidth;_e.current=Math.max(0,Math.min(mt,_e.current))}Wt(),Xe.current===null&&(Xe.current=requestAnimationFrame(Wn))}};return A.addEventListener("wheel",se,{passive:!1}),()=>{A.removeEventListener("wheel",se),on()}},[o,oe,rt]),s.useEffect(()=>{const A=Ve.current;if(!A)return;const se=()=>{jt(tt.current.isActive);const Pe=A.scrollLeft,je=Pe-Fe.current;Fe.current=Pe;const mt=Ke.current>0?Ke.current*.5:1/0;if(je!==0&&Math.abs(je)<mt){const Ht=je>0?"forward":"backward";Ht!==ve.current&&(ve.current=Ht,Be(Ht))}tt.current.isActive&&tt.current.hasMoved||Tt()};A.addEventListener("scroll",se,{passive:!0});const he=new ResizeObserver(()=>{Ot(),jt(tt.current.isActive),Be(ve.current),Tt()});return he.observe(A),()=>{Zt(),A.removeEventListener("scroll",se),he.disconnect()}},[t.length,rt]),a.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{ut||At()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:bt?1:0,transition:`opacity ${cr}ms ease`,pointerEvents:bt?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:c,...it}}),a.jsxs("div",{ref:Ne,className:`${e}-lightbox-dismiss-area`,style:Xt,...Qt,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:Nt,onClick:A=>A.stopPropagation(),children:a.jsx("div",{ref:Ve,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":be&&t.length>0?"true":"false","data-mouse-dragging":It?"true":"false",onPointerDown:to,onPointerMove:no,onPointerUp:Se,onPointerCancel:Se,onLostPointerCapture:qe,children:a.jsx("div",{ref:Je,className:`${e}-lightbox-strip-track`,style:{gap:h},children:pt.map((A,se)=>{const he=A.image.objectFit??"contain",Pe=se%t.length,je=Math.floor(se/t.length),mt=Ur(h),Ht=`calc(-0.5 * (${mt} + ${h}))`;return a.jsxs("div",{ref:qt=>lt.current[se]=qt,className:`${e}-strip-item`,style:{height:K==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[a.jsx("img",{src:A.image.assetId,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:he}}),o&&Pe<t.length-1&&je===0&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Ht,width:mt,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${je}-${A.image.assetId}-${Pe}`)})})})}),a.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":Bt?"true":"false",style:$t,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:J,flexShrink:0,pointerEvents:"none"},children:o&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-handle-left-fraction":"0.05",style:{position:"absolute",left:0,right:0,top:0,height:V,pointerEvents:"auto",zIndex:3}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:a.jsx("div",{className:`${e}-lightbox-content-area${pe?` ${e}-lightbox-content-area-stacked`:""}`,children:(we||x)&&a.jsx("div",{className:`${e}-header ${pe?`${e}-header-two-row`:`${e}-header-single-row`}`,children:pe?gt():we||x?dt():null})})})]}),t.length>1&&W==="on"&&(()=>{const A=Ur(P),se=`calc(-0.5 * (${P} + ${A}))`;return a.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:P},children:a.jsx("div",{ref:et,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:he=>he.stopPropagation(),children:a.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":L,style:{gap:Q,"--thumbnail-active-color":M},children:[t.map((he,Pe)=>{const je=Ur(Q),mt=`calc(-0.5 * (${je} + ${Q}))`;return a.jsxs("div",{ref:Ht=>{ot.current[Pe]=Ht},style:{position:"relative",flex:"0 0 auto"},children:[a.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":k===Pe?"true":"false",onClick:()=>oe&&S==="click"&&bn(Pe),onMouseEnter:()=>Re&&S==="hover"&&bn(Pe),"aria-label":he.image.name?`View ${he.image.name}`:`View image ${Pe+1}`,"aria-current":k===Pe?"true":void 0,children:a.jsx("img",{className:`${e}-thumb-image${Ee?` ${e}-thumb-image-cover`:""}`,src:he.image.assetId,alt:"",draggable:!1,style:{...Te,maxWidth:_,maxHeight:_,width:v.display==="cover"?"auto":"100%",height:"auto",objectFit:v.display==="cover"?"cover":"contain"}})}),o&&Pe<t.length-1&&a.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:mt,width:je,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${he.image.assetId}-${Pe}`)}),o&&a.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:se,height:A,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function Kx(e){return`
14593
+ `;function yi(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const nd={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Sx=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],wx={type:"object",version:1,content:{type:"array",display:{type:"array"},items:{type:"object",properties:{question:{type:"string",label:"Question",placeholder:"Add question...",display:{type:"text-input"}},answer:{label:"Answer",placeholder:"Add answer...",display:{type:"rich-text"}}}},default:[{question:"What are the three main parts of The Divine Comedy?",answer:[{type:"paragraph",children:[{text:"The poem is divided into Inferno, Purgatorio, and Paradiso. These three sections follow Dante’s journey through Hell, Purgatory, and Heaven."}]}]},{question:"Who guides Dante through Hell and most of Purgatory?",answer:[{type:"paragraph",children:[{text:"Dante is guided by Virgil, the ancient Roman poet. Virgil represents human reason and wisdom, but because he lived before Christianity, he cannot guide Dante all the way into Heaven."}]}]},{question:"What does the dark wood at the beginning of the poem symbolize?",answer:[{type:"paragraph",children:[{text:"The dark wood symbolizes Dante’s spiritual confusion and moral crisis. It shows that he has lost the “straight way” in life and needs guidance to return to truth and salvation."}]}]},{question:"What is “contrapasso” in Inferno?",answer:[{type:"paragraph",children:[{text:"“Contrapasso” is the principle that punishments in Hell reflect the sins committed during life. For example, people who caused division are themselves physically divided, showing how their punishment mirrors their wrongdoing."}]}]},{question:"Who guides Dante through Heaven?",answer:[{type:"paragraph",children:[{text:"Beatrice guides Dante through Paradiso. She represents divine love, grace, and spiritual understanding, helping Dante move beyond human reason toward a vision of God."}]}]},{question:"Why is The Divine Comedy important in literary history?",answer:[{type:"paragraph",children:[{text:"The Divine Comedy is important because it is one of the greatest works of world literature and helped shape the Italian language. Dante wrote it in the Tuscan dialect rather than Latin, making serious literature more accessible to ordinary readers."}]}]},{question:"What is the overall journey of The Divine Comedy about?",answer:[{type:"paragraph",children:[{text:"The poem is about Dante’s spiritual journey from sin and despair toward repentance, wisdom, and union with God. On a deeper level, it represents the soul’s path from confusion to divine truth."}]}]}]},settings:{sizing:"auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},dividerWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},dividerStyle:{type:"string",scope:"common",title:"Style",display:{type:"toggle-cycle",enum:["solid","dashed","dotted"]}},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default"]}},autoclose:{type:"string",scope:"common",title:"Autoclose",display:{type:"toggle-cycle",enum:["on","off"]}},icon:{type:["string","null"],scope:"common",display:{type:"settings-image-input"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:yi("Icon Padding Right"),iconAnimation:{type:"string",scope:"common",title:"Icon Animation",display:{type:"toggle-cycle",enum:["rotate 180","rotate 90","rotate 45"]}},questionColor:{type:"string",scope:"common",title:"Question Default",display:{type:"palette-color-picker"}},answerColor:{type:"string",scope:"common",title:"Answer Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"palette-color-picker"}},questionHoverColor:{type:"string",scope:"common",title:"Question Hover",display:{type:"palette-color-picker"}},iconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"palette-color-picker"}},iconActiveColor:{type:"string",scope:"common",title:"Icon Active",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}},questionFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},questionFontSettings:{...nd.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},questionFontSize:{type:"number",scope:"layout",title:"Question Font Size",display:{type:"font-size"}},questionLineHeight:{type:"number",scope:"layout",title:"Question Line Height",display:{type:"line-height-input"}},questionLetterSpacing:{type:"number",scope:"layout",title:"Question Letter Spacing",display:{type:"letter-spacing-input"}},questionWordSpacing:{type:"number",scope:"layout",title:"Question Word Spacing",display:{type:"word-spacing-input"}},questionTextAppearance:{type:"object",scope:"layout",title:"Question Text Appearance",display:{type:"text-appearance"}},answerFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},answerFontSettings:{...nd.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},answerFontSize:{type:"number",scope:"layout",title:"Answer Font Size",display:{type:"font-size"}},answerLineHeight:{type:"number",scope:"layout",title:"Answer Line Height",display:{type:"line-height-input"}},answerLetterSpacing:{type:"number",scope:"layout",title:"Answer Letter Spacing",display:{type:"letter-spacing-input"}},answerWordSpacing:{type:"number",scope:"layout",title:"Answer Word Spacing",display:{type:"word-spacing-input"}},answerTextAppearance:{type:"object",scope:"layout",title:"Answer Text Appearance",display:{type:"text-appearance"}},questionPaddingLeft:yi("Question Padding Left"),questionPaddingTop:yi("Question Padding Top"),questionPaddingBottom:yi("Question Padding Bottom"),answerPaddingLeft:yi("Answer Padding Left"),answerPaddingRight:yi("Answer Padding Right"),answerPaddingTop:yi("Answer Padding Top"),answerPaddingBottom:yi("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"01M3QM74XGFBPMXNEQB1BXSD9E",iconAnimation:"rotate 45",questionColor:"#000000",answerColor:"#000000",dividerColor:"#000000",iconColor:"#000000",questionHoverColor:"#A60239",iconHoverColor:"#A60239",iconActiveColor:"#000000",dividerHoverColor:"#A60239",questionFontFamily:"Goudy Bookletter 1911",questionFontSettings:{fontWeight:400,fontStyle:"normal"},questionLetterSpacing:0,questionWordSpacing:0,questionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},answerFontFamily:"Goudy Bookletter 1911",answerFontSettings:{fontWeight:400,fontStyle:"normal"},answerLetterSpacing:0,answerWordSpacing:0,answerTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{wrapperWidth:1,cellMinHeight:0,dividerWidth:.008,iconMaxWidth:.0533,iconPaddingRight:.08,questionFontSize:.09066,questionLineHeight:.10133,questionLetterSpacing:-.00266,answerFontSize:.0533,answerLineHeight:.064,questionPaddingLeft:.0533,questionPaddingTop:.0533,questionPaddingBottom:.0533,answerPaddingLeft:.0533,answerPaddingRight:.16,answerPaddingTop:.0533,answerPaddingBottom:.0533},t:{wrapperWidth:.651041,cellMinHeight:0,dividerWidth:.00390625,iconMaxWidth:.02604166,iconPaddingRight:.0130208,questionFontSize:.0390625,questionLineHeight:.04427,questionLetterSpacing:-.00091145833,answerFontSize:.0234375,answerLineHeight:.026041,questionPaddingLeft:0,questionPaddingTop:.01302,questionPaddingBottom:.01302,answerPaddingLeft:.065104,answerPaddingRight:.09765625,answerPaddingTop:.026041,answerPaddingBottom:.026041},d:{wrapperWidth:.6388,cellMinHeight:0,dividerWidth:.002083,iconMaxWidth:.01388,iconPaddingRight:.01388,questionFontSize:.0333,questionLineHeight:.0333,questionLetterSpacing:-9e-4,answerFontSize:.01111,answerLineHeight:.01388,questionPaddingLeft:0,questionPaddingTop:.01111,questionPaddingBottom:.01111,answerPaddingLeft:.0625,answerPaddingRight:.1625,answerPaddingTop:0,answerPaddingBottom:.01111}},layout:["__componentName__","wrapperWidth","cellMinHeight","dividerWidth","dividerStyle","entryHoverEffect","autoclose","icon","iconMaxWidth","iconAnimation"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["wrapperWidth","cellMinHeight"]},{type:"row",title:"",items:["entryHoverEffect","autoclose"]},{type:"row",title:"Divider",items:["dividerWidth","dividerStyle"]},{type:"row",title:"Icon",items:["icon","iconMaxWidth"]},{type:"row",title:"",items:["iconAnimation"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Question",items:["questionFontFamily","questionFontSettings",{type:"row",items:["questionFontSize","questionLineHeight","questionLetterSpacing","questionWordSpacing"]},"questionTextAppearance"]},{type:"group",title:"Answer",items:["answerFontFamily","answerFontSettings",{type:"row",items:["answerFontSize","answerLineHeight","answerLetterSpacing","answerWordSpacing"]},"answerTextAppearance"]}]}],paletteBookmark:{items:[...Sx],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},$x={element:xx,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:wx,sourceCode:bx},li=e=>e.display==="cover",ja=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},id=100,Cx=.2,od=8,bp=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,r]=s.useState(0),[l,c]=s.useState(!1),d=s.useRef(null),u=s.useRef(0);u.current=o;const p=s.useMemo(()=>typeof window>"u"?id:Math.max(id,window.innerHeight*Cx),[]),y=s.useCallback(C=>Math.max(0,1-C/(p*1.5)),[p]),x=s.useCallback(C=>Math.max(0,1-C/(p*.45)),[p]),g=s.useCallback(C=>{const $=typeof window<"u"?window.innerHeight:800,Q=Math.max(.88,1-C/$*.12);return`translateY(${C}px) scale(${Q})`},[]),h=s.useCallback(()=>{d.current=null},[]),b=s.useCallback(()=>{c(!0),r(0),window.setTimeout(()=>c(!1),n),h()},[n,h]),S=s.useCallback(()=>{const C=typeof window<"u"?window.innerHeight:800;c(!0),r(C),window.setTimeout(()=>{t(),h(),c(!1)},Math.min(n,200))},[n,t,h]),_=s.useCallback(C=>{!e||l||C.pointerType==="touch"&&(i!=null&&i(C.target)||(d.current={startX:C.clientX,startY:C.clientY,isLocked:null,pointerId:C.pointerId}))},[e,l,i]),v=s.useCallback(C=>{const $=d.current;if(!e||!$||C.pointerType!=="touch"||$.pointerId!==C.pointerId)return;const Q=C.clientX-$.startX,R=C.clientY-$.startY;if($.isLocked===null){if(Math.abs(Q)<od&&Math.abs(R)<od)return;if(R>0&&R>Math.abs(Q))$.isLocked=!0,C.currentTarget.setPointerCapture(C.pointerId);else{$.isLocked=!1,h();return}}if(!$.isLocked)return;C.preventDefault();const T=Math.max(0,R);u.current=T,r(T)},[e,h]),L=s.useCallback(C=>{const $=d.current;if(!e||!$||C.pointerType!=="touch"||$.pointerId!==C.pointerId)return;const Q=$.isLocked===!0;if(C.currentTarget.hasPointerCapture(C.pointerId)&&C.currentTarget.releasePointerCapture(C.pointerId),!Q){h();return}C.clientY-$.startY>=p?S():b()},[p,S,e,h,b]),P=s.useCallback(C=>{L(C)},[L]),q=s.useCallback(C=>{L(C)},[L]),X=o>0,B=l?`transform ${n}ms ease`:"none",H=l?`opacity ${n}ms ease`:"none",O=o>0||l;return{isSwipeDragging:X,backdropStyle:{opacity:y(o),transition:H},mediaAreaStyle:{transform:g(o),transition:B,touchAction:X?"none":void 0,willChange:X?"transform":void 0},overlayContentStyle:O?{opacity:x(o),transition:H}:void 0,swipeHandlers:e?{onPointerDown:_,onPointerMove:v,onPointerUp:P,onPointerCancel:q}:{},dismissAreaStyle:e?{touchAction:X?"none":"pan-x"}:void 0}},Tx="[data-lightbox-scrollable]",jl=(e=!0)=>{s.useEffect(()=>{if(!e)return;const t=window.scrollY,n=document.body.style.overflow,i=document.body.style.position,o=document.body.style.top,r=document.body.style.width,l=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${t}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const c=d=>{const u=d.target;u instanceof Element&&u.closest(Tx)||d.preventDefault()};return document.addEventListener("touchmove",c,{passive:!1}),()=>{document.removeEventListener("touchmove",c),document.body.style.overflow=n,document.body.style.position=i,document.body.style.top=o,document.body.style.width=r,document.documentElement.style.overflow=l,window.scrollTo({top:t,left:0,behavior:"instant"})}},[e])},Ix=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Lx=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},Px=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},Mx=(e,t,n,{duration:i,easing:o,onComplete:r})=>{const l=e.scrollLeft,c=n-l,d=l-n,u=(h,b)=>{Lx(t),e.scrollLeft=h,b&&(r==null||r())};if(Math.abs(c)<.5)return u(n,!0),()=>{};let p=!1,y=0;const x=()=>{t.removeEventListener("transitionend",g),clearTimeout(y)},g=h=>{h.target!==t||h.propertyName!=="transform"||p||(p=!0,x(),u(n,!0))};return t.addEventListener("transitionend",g),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${d}px, 0, 0)`,y=window.setTimeout(()=>{p||(p=!0,x(),u(n,!0))},i+64),()=>{p||(p=!0,x(),u(l-Px(t),!1))}},cr=300,Rx=900,Ex=1500,kx="cubic-bezier(0.16, 1, 0.3, 1)",Ax=3e3,Fx=2,Nx=16,_x=.05,Hx=1,Xr=.3,Wx=50,Ox=20,ao=.004,No=["title1","title2","title3"],Dx={title1:"1",title2:"2",title3:"3"},zx={title1:"title1Color",title2:"title2Color",title3:"title3Color"},Bx={title1:.02,title2:.02,title3:.02},Ur=e=>`max(${e}, ${Ox}px)`,jx=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]}},Vx=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=jx(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Jt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Gx=e=>[Jt(e,"fontFamily"),Jt(e,"fontSettings"),{type:"row",items:[Jt(e,"fontSize"),Jt(e,"lineHeight"),Jt(e,"letterSpacing"),Jt(e,"wordSpacing")]},Jt(e,"textAlign"),Jt(e,"textAppearance")],Xx=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(No.map(e=>[Dx[e],Gx(e)]))}),Vl=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},c)=>{if(r<=0||c<=0)return{overflow:r,widths:[c,...l]};const d=Math.min(r,c);return{overflow:r-d,widths:[c-d,...l]}},{overflow:i-1,widths:[]});return o},Sp=(e,t)=>Vl(e,t),qr=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},rd=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Vl(e.length,n),effective:Sp(e.length,n)}},Ux=(e,t,n,i,o,r,l)=>{const c=[];return t&&c.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&c.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:r,text:n}),i&&c.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:l,text:i}),c},ms=(e,t)=>{const n=i=>{const o=Jt(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[zx[t]]}},qx=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),hs=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??Bx[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return nn(i,n)},Yx=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l})=>{const{backgroundColor:c,thumbnailSize:d,thumbnailGap:u,thumbnailMarginBottom:p,imageGap:y,closeIcon:x,closeIconMaxWidth:g,closeIconColor:h,closeIconHoverColor:b,thumbnailTrigger:S,thumbnailVisibility:_,thumbnailObjectFit:v,thumbnailActive:L,thumbnailActiveColor:P,title1Width:q,title2Width:X,title3Width:B,title1MarginLeft:H=0,title2MarginLeft:O=0,title3MarginLeft:C=0,titleRowMarginBottom:$=0,titleHeaderLayout:Q="desktop",contentMarginTop:R,iconMarginLeft:T}=n,w=A=>E.scalingValue(A,i??!1),V=d??n.thumnailSize??.03,z=w(V),U=w(u),M=w(p??.02),f=w(y??0),K=w(R??0),G=Ur(K),ge=w(T??0),[k,ce]=s.useState(0),I=s.useRef(k);I.current=k;const ue=t[k],{title1:ee,title2:xe,title3:Le}=Vx(ue),se=hs("title1",ms(n,"title1"),i),de=hs("title2",ms(n,"title2"),i),Z=hs("title3",ms(n,"title3"),i),pe=Q==="mobile",ie=!o&&(!i||r),me=ie,ve=ie,Ee=ie,Re=li(v),Ce=Re?{"--image-aspect-ratio":ja(v)}:void 0,$e=!!(ee||xe||Le),m=s.useMemo(()=>Ux(e,ee,xe,Le,se,de,Z),[e,k,ee,xe,Le,se,de,Z]),Y=s.useMemo(()=>({title1Width:q,title2Width:X,title3Width:B}),[q,X,B]),te=s.useMemo(()=>m.map(A=>Y[A.widthKey]),[m,Y]),oe=s.useMemo(()=>Vl(m.length,te),[m.length,te]),fe=s.useMemo(()=>Sp(m.length,te),[m.length,te]),N=s.useMemo(()=>m.filter(A=>A.prefix==="title1"),[m]),F=s.useMemo(()=>m.filter(A=>A.prefix==="title2"||A.prefix==="title3"),[m]),ne=s.useMemo(()=>rd(N,Y),[N,Y]),re=s.useMemo(()=>rd(F,Y),[F,Y]),J=s.useCallback((A,ae)=>{const he=m.indexOf(A);if(!pe||ae==="single-row")return{effectiveWidth:fe[he]??0,resolvedWidth:oe[he]??0,maxWidth:qr(he,oe)};if(ae==="two-row-top"){const je=N.indexOf(A);return{effectiveWidth:ne.effective[je]??0,resolvedWidth:ne.resolved[je]??0,maxWidth:qr(je,ne.resolved)}}const Pe=F.indexOf(A);return{effectiveWidth:re.effective[Pe]??0,resolvedWidth:re.resolved[Pe]??0,maxWidth:qr(Pe,re.resolved)}},[F,re,fe,oe,m,N,ne,pe]),W=s.useCallback(A=>E.scalingValue(A,i??!1),[i]),Se=W($??0),le=s.useMemo(()=>({title1MarginLeft:H,title2MarginLeft:O,title3MarginLeft:C}),[H,O,C]),j=s.useCallback(A=>m.slice(0,A+1).reduce((ae,he,Pe)=>ae+(he!=null&&he.marginLeftKey?le[he.marginLeftKey]??0:0)+(oe[Pe]??0),0)+(pe?0:H??0),[m,le,oe,pe,H]),Te=s.useCallback(()=>pe?0:H??0,[pe,H]),Fe=s.useCallback(A=>F.slice(0,A).reduce((ae,he,Pe)=>ae+(he.marginLeftKey?le[he.marginLeftKey]??0:0)+(re.resolved[Pe]??0),0),[F,re.resolved,le]),Ye=s.useCallback(A=>{const ae=F[A];return Fe(A)+(ae.marginLeftKey?le[ae.marginLeftKey]??0:0)+(re.resolved[A]??0)},[F,re.resolved,Fe,le]),De=(A,ae)=>{const he=A.marginLeftKey?le[A.marginLeftKey]??0:0,{effectiveWidth:Pe,resolvedWidth:je,maxWidth:mt}=J(A,ae),Ht=o&&ae==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":A.prefix,style:{...ae==="single-row"?{gridArea:A.prefix}:{},width:W(Pe),...he>0?{marginLeft:W(he)}:{}},children:[a.jsx("p",{className:A.className,style:A.style,children:A.text}),Ht&&A.marginLeftKey&&a.jsx("div",{"data-controls":A.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(je),style:{position:"absolute",top:0,left:W(-he),width:`max(${W(he)}, 10px)`,height:"100%",pointerEvents:"auto"}}),Ht&&a.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(mt),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:W(-ao/2),width:W(ao),height:"100%",pointerEvents:"auto"}})]},A.className)},ze=()=>{const A=pe?-1:m.findIndex(Pe=>Pe.prefix==="title1"),ae=!pe&&(o||(H??0)>0)?(()=>{const Pe=H??0,je=A>=0?oe[A]:q??0;return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(je),style:{position:"absolute",top:0,left:0,width:`max(${W(Pe)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,he=m.flatMap((Pe,je)=>{if(!Pe.marginLeftKey)return[];const mt=le[Pe.marginLeftKey]??0,Ht=qx(m,oe,le,je)+Te();return a.jsx("div",{"data-controls":Pe.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(oe[je]),style:{position:"absolute",top:0,left:W(Ht),width:`max(${W(mt)}, 10px)`,height:"100%",pointerEvents:"auto"}},Pe.marginLeftKey)});return ae?[ae,...he]:he},Ze=()=>m.map((A,ae)=>{const he=qr(ae,oe),je=j(ae)-ao/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(he),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:W(je),width:W(ao),height:"100%",pointerEvents:"auto"}})},`${A.widthKey}-junction`)}),Ue=()=>F.flatMap((A,ae)=>{if(!A.marginLeftKey)return[];const he=le[A.marginLeftKey]??0,Pe=Fe(ae),{resolvedWidth:je}=J(A,"two-row-bottom");return a.jsx("div",{"data-controls":A.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(je),style:{position:"absolute",top:0,left:W(Pe),width:`max(${W(he)}, 10px)`,height:"100%",pointerEvents:"auto"}},A.marginLeftKey)}),ye=()=>F.map((A,ae)=>{const{maxWidth:he}=J(A,"two-row-bottom"),je=Ye(ae)-ao/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(he),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:W(je),width:W(ao),height:"100%",pointerEvents:"auto"}})},`${A.widthKey}-junction`)}),_e=s.useRef(null),Ve=s.useRef(null),Je=s.useRef(null),et=s.useRef(null),ot=s.useRef([]),lt=s.useRef([]),Ke=s.useRef(0),ht=s.useRef(null),tt=s.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),Ge=s.useRef(null),We=s.useRef(null),Ne=s.useRef(0),be=s.useRef("forward"),He=s.useRef(0),Xe=s.useRef(null),ct=s.useRef(!1),rt=t.length>1&&(!o||!!r),xt=rt?3:1,pt=s.useMemo(()=>Array.from({length:xt},()=>t).flat(),[t,xt]),[It,nt]=s.useState(!1),[bt,Lt]=s.useState(!1),[Ut,Ft]=s.useState(!0),Me=s.useRef(null),Oe=s.useRef(null),St=s.useRef(!1),Mt=s.useRef(!1),Qe=s.useRef(null),kt=s.useRef(null),Bt=me&&!Ut,Wt=s.useCallback(()=>{me&&(Ft(!0),kt.current&&clearTimeout(kt.current),kt.current=setTimeout(()=>{tt.current.isActive||Ft(!1)},Ax))},[me]),At=s.useCallback(()=>{o||Mt.current||(Mt.current=!0,Lt(!1),Qe.current=setTimeout(()=>{l()},cr))},[o,l]),Ae=()=>a.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":Bt?"true":"false",style:{width:E.scalingValue(g??0,i),height:E.scalingValue(g??0,i),marginRight:ge,"--close-icon-hover-color":b},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:At,"aria-label":"Close",children:a.jsx(gn,{url:x,fill:h,hoverFill:i&&!r?h:b,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:ge,height:"100%",pointerEvents:"auto"}})]}),ft=(A="two-row")=>a.jsx("div",{...A==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:W(H??0),flexShrink:0,...A==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...A==="two-row"&&o?{pointerEvents:"auto"}:{}}}),gt=()=>{const A=m.find(Pe=>Pe.prefix==="title1"),ae=m.filter(Pe=>Pe.prefix==="title2"||Pe.prefix==="title3"),he=ae.length>0||o||($??0)>0;return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`${e}-header-row-top`,children:[(H??0)>0||o?ft():null,A&&De(A,"two-row-top"),x&&Ae()]}),he?a.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[ae.length>0?a.jsxs("div",{className:`${e}-header-row-bottom`,children:[ae.map(Pe=>De(Pe,"two-row-bottom")),o&&a.jsxs(a.Fragment,{children:[Ue(),ye()]})]}):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:Se,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},dt=()=>a.jsxs(a.Fragment,{children:[(H??0)>0||o?ft("single-row"):null,m.map(A=>De(A,"single-row")),o?a.jsxs(a.Fragment,{children:[ze(),Ze()]}):null,x?Ae():null]}),yt=s.useCallback(A=>!!(A.closest("[data-controls]")||A.closest(`.${e}-thumbnails`)||A.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:ut,backdropStyle:it,mediaAreaStyle:Nt,overlayContentStyle:$t,swipeHandlers:Qt,dismissAreaStyle:Xt}=bp({enabled:ie??!1,onClose:At,animMs:cr,isBlockedTarget:yt}),Ot=()=>{if(!rt||t.length===0)return Ke.current=0,0;const A=lt.current[0],ae=lt.current[t.length];if(!A||!ae)return Ke.current;const he=ae.offsetLeft-A.offsetLeft;return he>0&&(Ke.current=he),Ke.current},jt=(A=!1)=>{if(!rt)return;const ae=Ve.current,he=Ot();!ae||he<=0||he<ae.clientWidth*.25||(ae.scrollLeft<=0?(ae.scrollLeft+=he,A&&(tt.current.scrollLeft+=he),ct.current&&(He.current+=he)):ae.scrollLeft>=he*2&&(ae.scrollLeft-=he,A&&(tt.current.scrollLeft-=he),ct.current&&(He.current-=he)))},Dt=(A,ae=(he=>(he=Ve.current)==null?void 0:he.scrollLeft)()??0)=>{if(!rt)return A;let Pe=t.length+A,je=1/0;for(let mt=0;mt<xt;mt++){const Ht=mt*t.length+A,qt=lt.current[Ht];if(!qt)continue;const sn=Math.abs(qt.offsetLeft-ae);sn<je&&(je=sn,Pe=Ht)}return Pe},zt=A=>{const ae=Ve.current;return!A||!ae?!1:A.offsetWidth>ae.clientWidth+1},D=A=>{const ae=Ve.current;if(!A||!ae||!zt(A))return!1;const he=A.offsetLeft,Pe=he+A.offsetWidth;return ae.scrollLeft>=he-1&&ae.scrollLeft+ae.clientWidth<=Pe+1},Ie=(A=(ae=>(ae=Ve.current)==null?void 0:ae.scrollLeft)()??0)=>{for(let Pe=0;Pe<lt.current.length;Pe+=1){const je=lt.current[Pe];if(je&&D(je))return Pe}let he={flatIndex:0,distance:1/0};return lt.current.forEach((Pe,je)=>{if(!Pe)return;const mt=Math.abs(Pe.offsetLeft-A);mt<he.distance&&(he={flatIndex:je,distance:mt})}),he.flatIndex},Be=A=>{Ve.current&&lt.current.forEach(ae=>{ae&&(ae.style.scrollSnapAlign=zt(ae)&&A==="backward"?"end":"start")})},ke=(A,ae,he)=>{const Pe=A-ae,je=Ie(ae),mt=lt.current[je];if(D(mt))return Ie(A)%t.length;const Ht=lt.current[je+1],qt=mt?Ht?Ht.offsetLeft-mt.offsetLeft:mt.offsetWidth:0,sn=qt>0?Pe>qt*Xr?1:Pe<-qt*Xr?-1:0:0;return sn===0?he:rt?(he+sn+t.length)%t.length:Math.max(0,Math.min(t.length-1,he+sn))},vt=s.useCallback((A=!1)=>{if(_!=="on"||o)return;const ae=et.current,he=I.current,Pe=ot.current[he];if(!ae||!Pe||ae.scrollWidth<=ae.clientWidth)return;const je=ae.scrollLeft,mt=je+ae.clientWidth,Ht=Pe.offsetLeft,qt=Ht+Pe.offsetWidth;if(Ht>=je&&qt<=mt)return;const sn=ae.scrollWidth-ae.clientWidth;let en=je;if(!A&&Me.current===null){const mi=ot.current[he-1],kn=ot.current[he+1],Zn=mi?Pe.offsetLeft-mi.offsetLeft:kn?kn.offsetLeft-Pe.offsetLeft:Pe.offsetWidth;qt>mt?en+=Zn:Ht<je&&(en-=Zn)}else qt>mt?en=qt-ae.clientWidth:en=Ht;ae.scrollLeft=Math.max(0,Math.min(sn,en))},[o,_]),Ct=s.useCallback((A=!1)=>{A&&(St.current=!0),Oe.current===null&&(Oe.current=requestAnimationFrame(()=>{Oe.current=null;const ae=St.current;St.current=!1,vt(ae)}))},[vt]),at=s.useCallback(A=>{if(A===I.current)return;const ae=I.current;I.current=A;const he=Math.abs(A-ae)>1,Pe=rt&&t.length>1&&(ae===t.length-1&&A===0||ae===0&&A===t.length-1);ce(A),Ct(he||Pe)},[t.length,rt,Ct]),Tt=()=>{if(!Ve.current||t.length===0||Me.current!==null||tt.current.isActive&&tt.current.hasMoved)return;const A=Ve.current.scrollLeft,ae=Ie(A)%t.length;ae!==I.current&&at(ae)},Vt=()=>{Me.current=null},Pt=A=>{const ae=Ve.current;ae&&(ae.style.scrollSnapType=A?"":"none")},Zt=()=>{var A;(A=We.current)==null||A.call(We),We.current=null},on=()=>{Xe.current!==null&&(cancelAnimationFrame(Xe.current),Xe.current=null),ct.current=!1},Wn=()=>{const A=Ve.current;if(!A){Xe.current=null,ct.current=!1;return}const ae=He.current-A.scrollLeft;if(Math.abs(ae)<.5){A.scrollLeft=He.current,jt(),Tt(),Xe.current=null,ct.current=!1;return}A.scrollLeft+=ae*_x,jt(),Tt(),Wt(),Xe.current=requestAnimationFrame(Wn)},xn=()=>{const A=Je.current;A&&(A.style.transition="",A.style.transform="",A.style.willChange="")},ui=(A,ae,he,Pe)=>{xn(),A.scrollLeft=ae,Ne.current=A.scrollLeft,jt(),he!==void 0?(I.current=he,ce(he)):Tt(),Pt(!0),Pe==null||Pe()},dn=(A,{behavior:ae="smooth",activeIndex:he,onComplete:Pe}={})=>{const je=Ve.current,mt=Je.current;if(!je||!mt)return;if(on(),Zt(),Pt(!1),ae==="auto"){ui(je,A,he,Pe);return}const Ht=Math.abs(A-je.scrollLeft),qt=Ix(Ht,Rx,Ex,je.clientWidth*.55);We.current=Mx(je,mt,A,{duration:qt,easing:kx,onComplete:()=>{We.current=null,ui(je,A,he,Pe)}})},pi=(A="smooth")=>{const ae=Ve.current;if(!ae||t.length===0)return;const he=Ie()%t.length,Pe=Dt(he,ae.scrollLeft),je=lt.current[Pe];je&&dn(je.offsetLeft,{behavior:A,activeIndex:he})},Kn=(A,ae="smooth",he,Pe)=>{const je=Ve.current;if(!je||t.length===0)return;const mt=(Pe??je.scrollLeft)-A,Ht=Ie(A),qt=lt.current[Ht];if(D(qt)){Pt(!0),Tt();return}const sn=lt.current[Ht+1],en=qt?sn?sn.offsetLeft-qt.offsetLeft:qt.offsetWidth:0;if((en>0?mt>en*Xr?1:mt<-en*Xr?-1:0:0)!==0){const Kl=he??Ht%t.length,Xo=ke(Pe??je.scrollLeft,A,Kl);bn(Xo,ae);return}const kn=Pe??je.scrollLeft,Zn=Ie(kn),kr=lt.current[Zn];if(kr&&Math.abs(kr.offsetLeft-kn)<1){Pt(!0),Tt();return}pi("auto")},bn=(A,ae="smooth")=>{const he=Ve.current;if(!he||t.length===0)return;const Pe=Dt(A,he.scrollLeft),je=lt.current[Pe];je&&(ae==="smooth"?Me.current=A:Me.current=null,I.current=A,ce(A),Ct(!0),dn(je.offsetLeft,{behavior:ae,activeIndex:A,onComplete:ae==="smooth"?Vt:void 0}))},gi=()=>{Ge.current&&(window.removeEventListener("pointerup",Ge.current),window.removeEventListener("pointercancel",Ge.current),Ge.current=null)},eo=(A,ae,he,Pe,je)=>{const mt=he-A,Ht=Pe-ae,qt=Math.abs(mt),sn=Math.abs(Ht);if(qt<Wx||qt<=sn)return!1;const en=mt<0?1:-1,mi=rt?(je+en+t.length)%t.length:Math.max(0,Math.min(t.length-1,je+en));return mi===je?!1:(bn(mi),!0)},Sn=A=>{if(!tt.current.isActive)return;gi();const ae=Ve.current;if(!ae)return;const{scrollLeft:he,startActiveIndex:Pe,hasMoved:je}=tt.current,mt=ae.scrollLeft;jt(!0),tt.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},nt(!1),A!==void 0&&ae.hasPointerCapture(A)&&ae.releasePointerCapture(A),je?Kn(he,"smooth",Pe,mt):(Pt(!0),Tt()),Wt()},Qn=(A,ae)=>{const he=ht.current;ht.current=null,he&&(eo(he.startX,he.startY,A,ae,he.startActiveIndex),Wt())},to=A=>{if(!ve)return;if(A.pointerType==="touch"){if(on(),Pt(!0),yt(A.target))return;ht.current={startX:A.clientX,startY:A.clientY,startActiveIndex:I.current};return}if(A.pointerType!=="mouse"||A.button!==0||yt(A.target))return;const ae=Ve.current;if(!ae)return;on(),Zt(),xn(),Me.current=null,tt.current={isActive:!0,startX:A.clientX,scrollLeft:ae.scrollLeft,startActiveIndex:I.current,hasMoved:!1},Pt(!1),Wt(),ae.setPointerCapture(A.pointerId),gi();const he=Pe=>{Pe.pointerType==="mouse"&&Sn(Pe.pointerId)};Ge.current=he,window.addEventListener("pointerup",he),window.addEventListener("pointercancel",he)},no=A=>{if(!ve||A.pointerType!=="mouse")return;const ae=Ve.current;if(!ae||!tt.current.isActive)return;if(A.buttons===0){Sn(A.pointerId);return}const he=A.clientX-tt.current.startX;Math.abs(he)>Hx&&(tt.current.hasMoved=!0,nt(!0)),tt.current.hasMoved&&(A.preventDefault(),ae.scrollLeft=tt.current.scrollLeft-he,jt(!0),Tt(),Wt())},we=A=>{if(ve){if(A.pointerType==="touch"){A.type==="pointerup"?Qn(A.clientX,A.clientY):ht.current=null;return}A.pointerType==="mouse"&&Sn(A.pointerId)}},qe=A=>{!ve||A.pointerType!=="mouse"||Sn(A.pointerId)};return jl(),s.useEffect(()=>{const A=requestAnimationFrame(()=>Lt(!0));return()=>{cancelAnimationFrame(A),Zt(),gi(),Oe.current!==null&&(cancelAnimationFrame(Oe.current),Oe.current=null),Qe.current&&clearTimeout(Qe.current),kt.current&&clearTimeout(kt.current)}},[]),s.useEffect(()=>{if(!me){Ft(!0);return}Wt();const A=()=>Wt();return document.addEventListener("pointermove",A,{passive:!0}),document.addEventListener("pointerdown",A,{passive:!0}),()=>{document.removeEventListener("pointermove",A),document.removeEventListener("pointerdown",A),kt.current&&clearTimeout(kt.current)}},[me,Wt]),s.useEffect(()=>{const A=ae=>{ae.key==="Escape"&&At()};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[At]),s.useLayoutEffect(()=>{Ot()},[f,t.length,rt]),s.useLayoutEffect(()=>{o||bn(I.current,"auto")},[f,o]),s.useLayoutEffect(()=>{bn(0,"auto")},[t.length,rt]),s.useEffect(()=>{const A=Ve.current;if(!A||o||!ie)return;const ae=he=>{if(he.preventDefault(),Math.abs(he.deltaY)<=Math.abs(he.deltaX))return;const Pe=he.deltaMode===1?Nx:he.deltaMode===2?A.clientHeight:1,je=he.deltaY*Pe*Fx;if(je!==0){if(Zt(),ct.current||(ct.current=!0,He.current=A.scrollLeft,Me.current=null,Pt(!1)),He.current+=je,!rt){const mt=A.scrollWidth-A.clientWidth;He.current=Math.max(0,Math.min(mt,He.current))}Wt(),Xe.current===null&&(Xe.current=requestAnimationFrame(Wn))}};return A.addEventListener("wheel",ae,{passive:!1}),()=>{A.removeEventListener("wheel",ae),on()}},[o,ie,rt]),s.useEffect(()=>{const A=Ve.current;if(!A)return;const ae=()=>{jt(tt.current.isActive);const Pe=A.scrollLeft,je=Pe-Ne.current;Ne.current=Pe;const mt=Ke.current>0?Ke.current*.5:1/0;if(je!==0&&Math.abs(je)<mt){const Ht=je>0?"forward":"backward";Ht!==be.current&&(be.current=Ht,Be(Ht))}tt.current.isActive&&tt.current.hasMoved||Tt()};A.addEventListener("scroll",ae,{passive:!0});const he=new ResizeObserver(()=>{Ot(),jt(tt.current.isActive),Be(be.current),Tt()});return he.observe(A),()=>{Zt(),A.removeEventListener("scroll",ae),he.disconnect()}},[t.length,rt]),a.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{ut||At()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:bt?1:0,transition:`opacity ${cr}ms ease`,pointerEvents:bt?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:c,...it}}),a.jsxs("div",{ref:_e,className:`${e}-lightbox-dismiss-area`,style:Xt,...Qt,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:Nt,onClick:A=>A.stopPropagation(),children:a.jsx("div",{ref:Ve,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":ve&&t.length>0?"true":"false","data-mouse-dragging":It?"true":"false",onPointerDown:to,onPointerMove:no,onPointerUp:we,onPointerCancel:we,onLostPointerCapture:qe,children:a.jsx("div",{ref:Je,className:`${e}-lightbox-strip-track`,style:{gap:f},children:pt.map((A,ae)=>{const he=A.image.objectFit??"contain",Pe=ae%t.length,je=Math.floor(ae/t.length),mt=Ur(f),Ht=`calc(-0.5 * (${mt} + ${f}))`;return a.jsxs("div",{ref:qt=>lt.current[ae]=qt,className:`${e}-strip-item`,style:{height:Q==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[a.jsx("img",{src:A.image.assetId,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:he}}),o&&Pe<t.length-1&&je===0&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Ht,width:mt,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${je}-${A.image.assetId}-${Pe}`)})})})}),a.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":Bt?"true":"false",style:$t,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:K,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:G,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${pe?` ${e}-lightbox-content-area-stacked`:""}`,children:($e||x)&&a.jsx("div",{className:`${e}-header ${pe?`${e}-header-two-row`:`${e}-header-single-row`}`,children:pe?gt():$e||x?dt():null})})})]}),t.length>1&&_==="on"&&(()=>{const A=Ur(M),ae=`calc(-0.5 * (${M} + ${A}))`;return a.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:M},children:a.jsx("div",{ref:et,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:he=>he.stopPropagation(),children:a.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":L,style:{gap:U,"--thumbnail-active-color":P},children:[t.map((he,Pe)=>{const je=Ur(U),mt=`calc(-0.5 * (${je} + ${U}))`;return a.jsxs("div",{ref:Ht=>{ot.current[Pe]=Ht},style:{position:"relative",flex:"0 0 auto"},children:[a.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":k===Pe?"true":"false",onClick:()=>ie&&S==="click"&&bn(Pe),onMouseEnter:()=>Ee&&S==="hover"&&bn(Pe),"aria-label":he.image.name?`View ${he.image.name}`:`View image ${Pe+1}`,"aria-current":k===Pe?"true":void 0,children:a.jsx("img",{className:`${e}-thumb-image${Re?` ${e}-thumb-image-cover`:""}`,src:he.image.assetId,alt:"",draggable:!1,style:{...Ce,maxWidth:z,maxHeight:z,width:v.display==="cover"?"auto":"100%",height:"auto",objectFit:v.display==="cover"?"cover":"contain"}})}),o&&Pe<t.length-1&&a.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:mt,width:je,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${he.image.assetId}-${Pe}`)}),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:A,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function Kx(e){return`
14594
14594
  .${e}-wrapper {
14595
14595
  position: relative;
14596
14596
  width: 100%;
@@ -14975,7 +14975,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
14975
14975
  pointer-events: auto;
14976
14976
  z-index: 10;
14977
14977
  }
14978
- `}const Qx=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r})=>{const{prefix:l}=E.useScopedStyles(),{cover:c,coverFit:d}=e,u=s.useRef(null),[p,y]=s.useState(!1),x=t??[],g=p&&x.length>0,f=()=>{x.length!==0&&y(!0)};return s.useEffect(()=>{!n||i||o||y(!1)},[n,i,o]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:u,className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Kx(l)}}),c&&a.jsx("div",{className:`${l}-cover ${li(d)?`${l}-ratio-wrapper-cover`:`${l}-ratio-wrapper-fit`}`,onClick:()=>f(),style:{...li(d)?{"--image-aspect-ratio":ja(d)}:{}},"aria-label":"Open image gallery",children:a.jsx("img",{className:`${l}-cover-image ${li(d)?`${l}-cover-image-cover`:`${l}-cover-image-fit`}`,src:c,alt:"cover"})})]}),g&&typeof document<"u"&&(()=>{const b=(r?document.getElementById(r):null)??document.body;return qn.createPortal(a.jsx(Yx,{prefix:l,images:x,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>y(!1)}),b)})()]})},Zx=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
14978
+ `}const Qx=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r})=>{const{prefix:l}=E.useScopedStyles(),{cover:c,coverFit:d}=e,u=s.useRef(null),[p,y]=s.useState(!1),x=t??[],g=p&&x.length>0,h=()=>{x.length!==0&&y(!0)};return s.useEffect(()=>{!n||i||o||y(!1)},[n,i,o]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:u,className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Kx(l)}}),c&&a.jsx("div",{className:`${l}-cover ${li(d)?`${l}-ratio-wrapper-cover`:`${l}-ratio-wrapper-fit`}`,onClick:()=>h(),style:{...li(d)?{"--image-aspect-ratio":ja(d)}:{}},"aria-label":"Open image gallery",children:a.jsx("img",{className:`${l}-cover-image ${li(d)?`${l}-cover-image-cover`:`${l}-cover-image-fit`}`,src:c,alt:"cover"})})]}),g&&typeof document<"u"&&(()=>{const b=(r?document.getElementById(r):null)??document.body;return qn.createPortal(a.jsx(Yx,{prefix:l,images:x,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>y(!1)}),b)})()]})},Zx=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
14979
14979
  import { createPortal } from 'react-dom';
14980
14980
  import { CommonComponentProps } from '../props';
14981
14981
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -15521,7 +15521,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
15521
15521
  </>
15522
15522
  );
15523
15523
  };
15524
- `,Jx="01M3SBP3P8CMVMM1ZZ0QVD2PPF",Di={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function eb(e){const t={};return t[Jt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Jt(e,"fontSettings")]={...Di.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Jt(e,"fontSize")]={...Di.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Jt(e,"lineHeight")]={...Di.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Jt(e,"letterSpacing")]={...Di.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Jt(e,"wordSpacing")]={...Di.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Jt(e,"textAlign")]={...Di.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Jt(e,"textAppearance")]={...Di.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const tb=No.reduce((e,t)=>({...e,...eb(t)}),{}),nb=No.reduce((e,t)=>({...e,[Jt(t,"fontFamily")]:"Goudy Bookletter 1911",[Jt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Jt(t,"letterSpacing")]:0,[Jt(t,"wordSpacing")]:0,[Jt(t,"textAlign")]:"left",[Jt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function fs(e){return No.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Jt(n,"fontSize")]=i),o!==void 0&&(t[Jt(n,"lineHeight")]=o),t},{})}const ib=Xx(),ob={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"}},...tb,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},iconMarginLeft:{type:"number",scope:"layout",title:"Icon margin left",min:0,display:{type:"range-control"}}},defaults:{cover:"01M3QM74XESYN1HRYH9VRTZ5CK",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Jx,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...nb},layoutDefaults:{m:{thumbnailSize:.1,thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,contentMarginTop:.08,iconMarginLeft:.02,...fs({title1FontSize:.042,title1LineHeight:.042,title2FontSize:.042,title2LineHeight:.042,title3FontSize:.042,title3LineHeight:.042})},t:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.039,contentMarginTop:.015,iconMarginLeft:.02,...fs({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208})},d:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,contentMarginTop:.015,iconMarginLeft:.02,...fs({title1FontSize:.011,title1LineHeight:.02,title2FontSize:.011,title2LineHeight:.02,title3FontSize:.011,title3LineHeight:.02})}},displayRules:[{if:{name:"thumbnailActive",value:"outline"},then:{name:"properties.thumbnailActiveColor.display.visible",value:!0}}],layout:["__componentName__","thumbnailGap","thumbnailMarginBottom","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","contentMarginTop","title1MarginLeft","iconMarginLeft"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",title:"Thumbnails",items:["thumbnailVisibility","thumbnailObjectFit"]},{type:"row",items:["thumbnailTrigger","thumbnailActive"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[ib]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"}},title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}}}},default:[{image:{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"}]}},rb={element:Qx,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:ob,sourceCode:Zx,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0},{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[...No.map(e=>({path:`${Jt(e,"fontFamily")}`}))]},fontRelations:{...No.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Jt(t,"fontFamily")}`}),{})}},ab=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,initialSlideIndex:l=0,enableUrlSync:c=!1,journalItemId:d=null,onBeforeClose:u,onClose:p})=>{const{type:y,coverFit:x,backgroundColor:g,imageGap:f,maxWidth:b,maxHeight:S,textTransition:W,title1Width:v,title2Width:L,title3Width:M,title1MarginLeft:U=0,title2MarginLeft:G=0,title3MarginLeft:B=0,titleRowMarginBottom:N=0,titleHeaderLayout:O="single-row",countCloseGap:C=0,closeIcon:$,closeIconMaxWidth:K,closeIconColor:R,closeIconHoverColor:w,contentMarginTop:T=0,iconMarginRight:j=0}=n,_=s.useCallback(Se=>E.scalingValue(Se,i??!1),[i]),Q=_(f??0),P=`${b}%`,h=`${S}%`,J=_(C),V=_(T),me=_(j),k=Gi("title1",Vi(n,"title1"),i),le=Gi("title2",Vi(n,"title2"),i),I=Gi("title3",Vi(n,"title3"),i),ue=Gi("count",Vi(n,"count"),i),ee=O==="mobile",xe=!i||!!r,Le=!o&&(!i||!!r),ce=s.useMemo(()=>pa(t,y),[t,y]),[de,Z]=s.useState(l),pe=ce[de],oe=pe==null?void 0:pe.entry,[ge,be]=s.useState(!1),[Re,Ee]=s.useState(null),[Te,we]=s.useState(!1),[m,Y]=s.useState(null),[te,ae]=s.useState(!1),[fe,F]=s.useState(0),[H,ne]=s.useState(),[q,ie]=s.useState(),[z,$e]=s.useState(null),re=s.useRef(null),X=s.useRef(0),Ce=s.useRef(0),He=s.useRef(0),Ye=s.useRef(!1),De=s.useRef(null),ze=s.useRef(null),Ze=s.useRef(null),Ue=s.useRef(null),ye=s.useRef(null),Ne=s.useRef(null),Ve=s.useRef(null),Je=s.useCallback(()=>{const Se=ze.current;if(!Se)return;const qe=Se.closest(`.${e}-lightbox-content-area`);if(!qe)return Se.getBoundingClientRect().width;const A=Array.from(qe.children).reduce((se,he)=>!(he instanceof HTMLElement)||he.contains(Se)?se:se+he.getBoundingClientRect().width,0);return qe.getBoundingClientRect().width-A},[e]),et=s.useCallback(()=>{re.current&&(clearTimeout(re.current),re.current=null)},[]),ot=s.useCallback(Se=>{Se===X.current&&(Y(null),ae(!1))},[]),lt=s.useCallback(()=>{o||Ye.current||(Ye.current=!0,u==null||u(),be(!1),De.current=setTimeout(()=>{p()},300))},[o,u,p]),Ke=s.useCallback(Se=>!!(Se.closest("[data-controls]")||Se.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:ht,backdropStyle:tt,mediaAreaStyle:Ge,overlayContentStyle:We,swipeHandlers:Fe,dismissAreaStyle:ve}=bp({enabled:Le,onClose:lt,animMs:300,isBlockedTarget:Ke}),_e=s.useCallback(Se=>{c&&np(Se+1,d,!0)},[c,d]),Xe=s.useCallback(Se=>{if(Se)return Se.getBoundingClientRect().height},[]),ct=s.useCallback(Se=>{if(ce.length===0)return;const qe=(Se%ce.length+ce.length)%ce.length;if(qe===de)return;const A=ce[de],se=ce[qe];X.current+=1;const he=X.current,Pe=W==="fade"&&Fc(A==null?void 0:A.entry)!==Fc(se==null?void 0:se.entry),je=Xe(Ze.current),mt=Pe?(()=>{const qt=Je();qn.flushSync(()=>{$e(se.entry)}),Ze.current&&qt&&(Ze.current.style.width=`${qt}px`);const sn=Xe(Ze.current);return Ze.current&&(Ze.current.style.width=""),{measuredIncomingTitlesHeight:sn,incomingTitlesMeasureWidth:qt}})():void 0,Ht=Math.max(je??0,(mt==null?void 0:mt.measuredIncomingTitlesHeight)??0)||void 0;F(he),Y(de),ae(!0),Z(qe),_e(qe),He.current=qe,Pe?(et(),Ht&&ne(Ht),mt!=null&&mt.incomingTitlesMeasureWidth&&ie(mt.incomingTitlesMeasureWidth),Ee((A==null?void 0:A.entryIndex)??null),we(!0),Ce.current=se.entryIndex,re.current=setTimeout(()=>{Ee(null),we(!1),ne(void 0),ie(void 0),$e(null),re.current=null},400)):(et(),Ee(null),we(!1),ne(void 0),ie(void 0),$e(null),Ce.current=se.entryIndex)},[de,et,Je,Xe,ce,_e,W]),rt=s.useCallback(()=>{Ve.current=null},[]),xt=s.useCallback(Se=>{!xe||ce.length<=1||Se.pointerType==="mouse"&&Se.button!==0||Se.target.closest("[data-controls]")||(Ve.current={startX:Se.clientX,startY:Se.clientY,pointerId:Se.pointerId})},[xe,ce.length]),pt=s.useCallback(Se=>{var qt;if(!xe||ce.length<=1||Se.pointerType==="mouse"&&Se.button!==0)return;if(ht){rt();return}const qe=Ve.current;if(!qe||qe.pointerId!==Se.pointerId||(rt(),Se.target.closest("[data-controls]")))return;const se=Se.clientX-qe.startX,he=Se.clientY-qe.startY,Pe=Math.abs(se),je=Math.abs(he);if(Pe>=yv&&Pe>je){ct(se>0?de-1:de+1);return}if(Pe>Rc||je>Rc)return;const mt=(qt=Ue.current)==null?void 0:qt.getBoundingClientRect(),Ht=mt?mt.left+mt.width/2:window.innerWidth/2;ct(Se.clientX<Ht?de-1:de+1)},[de,xe,ct,ht,rt,ce.length]),It=s.useCallback(Se=>{const qe=Ve.current;(qe==null?void 0:qe.pointerId)===Se.pointerId&&rt()},[rt]);jl(),s.useEffect(()=>{Ne.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const Se=requestAnimationFrame(()=>{be(!0),requestAnimationFrame(()=>{ye.current?ye.current.focus():Ue.current&&Ue.current.focus()})});return()=>{cancelAnimationFrame(Se),De.current&&clearTimeout(De.current),re.current&&clearTimeout(re.current);const qe=Ne.current;qe&&document.contains(qe)&&qe.focus({preventScroll:!0})}},[]),s.useEffect(()=>{var Se;W!=="fade"&&(Ce.current=((Se=ce[de])==null?void 0:Se.entryIndex)??0,et(),Ee(null),we(!1),ne(void 0),ie(void 0))},[de,et,ce,W]),s.useEffect(()=>{const Se=qe=>{if(qe.key==="Escape"){lt();return}if(qe.key==="ArrowLeft"&&ce.length>1){ct(de-1);return}if(qe.key==="ArrowRight"&&ce.length>1){ct(de+1);return}if(qe.key==="Tab"&&Ue.current){const A=Ue.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),se=Array.from(A).filter(mt=>!mt.closest('[aria-hidden="true"]'));if(se.length===0)return;const he=se[0],Pe=se[se.length-1],je=document.activeElement;qe.shiftKey?(je===he||!Ue.current.contains(je))&&(qe.preventDefault(),Pe.focus()):(je===Pe||!Ue.current.contains(je))&&(qe.preventDefault(),he.focus())}};return window.addEventListener("keydown",Se),()=>window.removeEventListener("keydown",Se)},[ct,lt,de,ce.length]),s.useLayoutEffect(()=>{et(),X.current=0,F(0),Y(null),ae(!1),Ee(null),we(!1),ne(void 0),ie(void 0),$e(null),Z(Se=>{const qe=Math.max(0,ce.length-1);return Math.min(Se,qe)})},[et,t.length,y,ce.length]),s.useLayoutEffect(()=>{var A;const Se=Math.max(0,ce.length-1),qe=Math.min(Math.max(0,l),Se);He.current=qe,Ce.current=((A=ce[qe])==null?void 0:A.entryIndex)??0,Z(qe)},[l]);const nt=Re!==null?t[Re]:null,bt=m!==null?ce[m]:null,Lt=(oe==null?void 0:oe.title1)||(oe==null?void 0:oe.title2)||(oe==null?void 0:oe.title3)||(nt==null?void 0:nt.title1)||(nt==null?void 0:nt.title2)||(nt==null?void 0:nt.title3),Ut=Tv(y,ce,t),Ft=$!==null,Me=Lt||Ut||Ft,Oe=Ut&&Ft?{gap:J}:void 0,St=`${e}-titles-stack${ee?` ${e}-titles-stack-stacked`:""}`,Mt=`${e}-titles-layer-out${ee?` ${e}-titles-layer-out-stacked`:""}`,Qe=`${e}-titles-layer-out`,kt=(U??0)>0||o,Bt=_(N),Wt=s.useMemo(()=>({title1Width:v??wo.title1Width,title2Width:L??wo.title2Width,title3Width:M??wo.title3Width}),[v,L,M]),At=s.useMemo(()=>({title2MarginLeft:G,title3MarginLeft:B}),[G,B]),Ae=s.useMemo(()=>oe?Ti(e,oe,k,le,I):[],[e,oe,k,le,I]),ft=s.useMemo(()=>Ae.map(Se=>Wt[Se.widthKey]),[Ae,Wt]),gt=s.useMemo(()=>Mo(Ae.length,ft),[Ae.length,ft]),dt=s.useMemo(()=>vr(Ae.length,ft),[Ae.length,ft]),yt=s.useMemo(()=>Ae.filter(Se=>Se.prefix==="title1"),[Ae]),ut=s.useMemo(()=>Ae.filter(Se=>Se.prefix==="title2"||Se.prefix==="title3"),[Ae]),it=s.useMemo(()=>Ii(yt,Wt),[yt,Wt]),Nt=s.useMemo(()=>Ii(ut,Wt),[ut,Wt]),$t=s.useCallback((Se,qe)=>{const A=Ae.findIndex(he=>he.prefix===Se.prefix);if(!ee||qe==="single-row")return{effectiveWidth:dt[A]??0,resolvedWidth:gt[A]??0,maxWidth:yn(A,gt)};if(qe==="two-row-top"){const he=yt.findIndex(Pe=>Pe.prefix===Se.prefix);return{effectiveWidth:it.effective[he]??0,resolvedWidth:it.resolved[he]??0,maxWidth:yn(he,it.resolved)}}const se=ut.findIndex(he=>he.prefix===Se.prefix);return{effectiveWidth:Nt.effective[se]??0,resolvedWidth:Nt.resolved[se]??0,maxWidth:yn(se,Nt.resolved)}},[Ae,ut,Nt,dt,gt,yt,it,ee]),Qt=s.useCallback(Se=>ap(Ae,gt,At,Se)+(ee?0:U??0),[Ae,gt,At,ee,U]),Xt=s.useCallback(()=>ee?0:U??0,[ee,U]),Ot=s.useCallback(Se=>ut.slice(0,Se).reduce((qe,A,se)=>qe+(A.marginLeftKey?At[A.marginLeftKey]??0:0)+(Nt.resolved[se]??0),0),[ut,Nt.resolved,At]),jt=s.useCallback(Se=>{const qe=ut[Se];return Ot(Se)+(qe.marginLeftKey?At[qe.marginLeftKey]??0:0)+(Nt.resolved[Se]??0)},[ut,Nt.resolved,Ot,At]),Dt=s.useCallback((Se,qe,A)=>{if(!ee||A==="single-row"){const mt=Se.findIndex(en=>en.prefix===qe.prefix),Ht=Se.map(en=>Wt[en.widthKey]),qt=Mo(Se.length,Ht);return{effectiveWidth:vr(Se.length,Ht)[mt]??0,resolvedWidth:qt[mt]??0,maxWidth:yn(mt,qt)}}if(A==="two-row-top"){const mt=Se.filter(en=>en.prefix==="title1"),Ht=mt.findIndex(en=>en.prefix===qe.prefix),{resolved:qt,effective:sn}=Ii(mt,Wt);return{effectiveWidth:sn[Ht]??0,resolvedWidth:qt[Ht]??0,maxWidth:yn(Ht,qt)}}const se=Se.filter(mt=>mt.prefix==="title2"||mt.prefix==="title3"),he=se.findIndex(mt=>mt.prefix===qe.prefix),{resolved:Pe,effective:je}=Ii(se,Wt);return{effectiveWidth:je[he]??0,resolvedWidth:Pe[he]??0,maxWidth:yn(he,Pe)}},[Wt,ee]),zt=(Se,qe,A)=>{const se=Se.marginLeftKey?At[Se.marginLeftKey]??0:0,{effectiveWidth:he,resolvedWidth:Pe,maxWidth:je}=A??$t(Se,qe),mt=Math.max(se,ii),Ht=o&&qe==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":Se.prefix,style:{width:_(he),...se>0?{marginLeft:_(se)}:{}},children:[a.jsx("p",{className:Se.className,style:Se.style,children:Se.text}),Ht&&Se.marginLeftKey?a.jsx("div",{"data-controls":Se.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Pe),style:{position:"absolute",top:0,left:_(-se),width:_(mt),height:"100%",pointerEvents:"auto"}}):null,Ht?a.jsx("div",{"data-controls":Se.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(je),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:_(-Pn/2),width:_(Pn),height:"100%",pointerEvents:"auto"}}):null]},Se.className)},D=(Se="two-row")=>{const qe=Ae.findIndex(he=>he.prefix==="title1"),A=qe>=0?gt[qe]:Wt.title1Width,se=Se==="two-row"&&o;return a.jsx("div",{...se?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(A)}:{},style:{width:_(U??0),flexShrink:0,alignSelf:"stretch",...se?{pointerEvents:"auto"}:{}}})},Ie=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:k,"aria-hidden":"true",children:" "}),Be=()=>a.jsx("span",{className:`${e}-entry-counter`,style:ue,"aria-live":"polite","aria-atomic":"true",children:Cv(ce,de,y,t)}),ke=()=>Ut?o&&Ft?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 * (${as(J)} + ${J}))`,width:as(J),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Be():null,vt=()=>!Ut&&!Ft?null:a.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Oe,children:[ke(),Ft?Tt():null]}),Ct=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Ut||Lt?Ie():null,kt?D("single-row"):null,Pt(oe),a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),vt(),bn()]}),at=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Ut||Lt?Ie():null,kt?D("single-row"):null,a.jsxs("div",{className:`${e}-titles-row-titles`,style:Te&&H?{minHeight:H}:void 0,children:[a.jsx("div",{ref:Ze,className:St,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:xn(z||oe)}),a.jsxs("div",{ref:ze,className:St,style:{position:Te?"absolute":"relative",inset:Te?0:void 0,width:"100%",...Te&&q?{width:q,maxWidth:"100%"}:void 0},children:[nt&&Te?a.jsx("div",{className:`${Mt} ${e}-titles-fade-out`,children:xn(nt)}):null,a.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:xn(oe)})]})]}),vt(),bn()]}),Tt=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:E.scalingValue(K??0,i),height:E.scalingValue(K??0,i),marginRight:me,"--close-icon-hover-color":w},children:[a.jsx("button",{ref:ye,type:"button",className:`${e}-close-icon-inner`,onClick:lt,"aria-label":"Close",children:a.jsx(gn,{url:$??"",fill:R,hoverFill:i&&!r?R:w,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:me,height:"100%",pointerEvents:"auto"}})]}),Vt=(Se,qe)=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[Ut||Lt?Ie():null,kt?D("two-row"):null,qe!==void 0?a.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:qe},children:Se}):a.jsxs(a.Fragment,{children:[Se,a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),vt()]}),Pt=Se=>{if(!Se)return null;const qe=Ti(e,Se,k,le,I);return a.jsx(a.Fragment,{children:qe.map(A=>zt(A,"single-row",Dt(qe,A,"single-row")))})},Zt=Se=>{if(!Se)return null;const qe=Ti(e,Se,k,le,I),A=qe.find(se=>se.prefix==="title1");return A?zt(A,"two-row-top",Dt(qe,A,"two-row-top")):null},on=(Se,qe=!1)=>{const A=Se?Ti(e,Se,k,le,I):[],se=A.filter(je=>je.prefix==="title2"||je.prefix==="title3"),he=o&&qe;return se.length>0||he||(N??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[se.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[se.map(je=>zt(je,"two-row-bottom",Dt(A,je,"two-row-bottom"))),qe&&o?a.jsxs(a.Fragment,{children:[pi(),Kn()]}):null]}):null,(N??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:Bt,width:"100%",flexShrink:0,pointerEvents:he?"auto":"none"}}):null]}):null},Wn=(Se,qe=!1)=>a.jsxs(a.Fragment,{children:[Vt(Zt(Se)),on(Se,qe)]}),xn=Se=>ee?a.jsx("div",{className:`${e}-titles-row-two-row`,children:Wn(Se)}):Se?a.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Pt(Se)}):null,ui=()=>{const Se=ee?-1:Ae.findIndex(se=>se.prefix==="title1"),qe=!ee&&(o||(U??0)>0)?(()=>{const se=U??0,he=Se>=0?gt[Se]:Wt.title1Width,Pe=Math.max(se,ii);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:_(Pe),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,A=Ae.flatMap((se,he)=>{if(!se.marginLeftKey)return[];const Pe=At[se.marginLeftKey]??0,je=rp(Ae,gt,At,he)+Xt(),mt=Math.max(Pe,ii);return a.jsx("div",{"data-controls":se.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(gt[he]),style:{position:"absolute",top:0,left:_(je),width:_(mt),height:"100%",pointerEvents:"auto"}},se.marginLeftKey)});return qe?[qe,...A]:A},dn=()=>Ae.map((Se,qe)=>{const A=yn(qe,gt),he=Qt(qe)-Pn/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(A),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:_(he),width:_(Pn),height:"100%",pointerEvents:"auto"}})},`${Se.widthKey}-junction`)}),pi=()=>ut.flatMap((Se,qe)=>{if(!Se.marginLeftKey)return[];const A=At[Se.marginLeftKey]??0,se=Ot(qe),he=Math.max(A,ii),{resolvedWidth:Pe}=$t(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(Pe),style:{position:"absolute",top:0,left:_(se),width:_(he),height:"100%",pointerEvents:"auto"}},Se.marginLeftKey)}),Kn=()=>ut.map((Se,qe)=>{const{maxWidth:A}=$t(Se,"two-row-bottom"),he=jt(qe)-Pn/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(A),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:_(he),width:_(Pn),height:"100%",pointerEvents:"auto"}})},`${Se.widthKey}-junction`)}),bn=()=>!o||ee?null:a.jsxs(a.Fragment,{children:[ui(),dn()]}),gi=Se=>{const qe=!Se.objectFit&&li(x);return{className:`${e}-slide-image-cell${qe?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:P,maxHeight:h,...qe?{"--image-aspect-ratio":ja(x)}:{}}}},eo=Se=>Se.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":Se.objectFit}}:li(x)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},Sn=Se=>{if(Se.length===0)return null;const qe=Se.length>1,A=as(Q),se=`calc(-0.5 * (${A} + ${Q}))`;if(Se.length===1){const he=Se[0];return a.jsx("div",{...gi(he),children:a.jsx("img",{...eo(he),src:he.assetId,alt:he.name??"",draggable:!1})})}return a.jsx("div",{className:`${e}-slide-inner`,style:qe?{gap:Q}:void 0,children:Se.map((he,Pe)=>a.jsxs("div",{...gi(he),children:[a.jsx("img",{...eo(he),src:he.assetId,alt:he.name??"",draggable:!1}),o&&qe&&Pe<Se.length-1&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:se,width:A,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${he.assetId}-${Pe}`))})},Qn=!!(oe!=null&&oe.title2||oe!=null&&oe.title3||nt!=null&&nt.title2||nt!=null&&nt.title3||(N??0)>0||o),to=()=>a.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[a.jsx("div",{ref:Ze,className:St,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Wn(z||oe)}),a.jsxs("div",{ref:ze,className:`${e}-titles-row-two-row`,style:{...Te&&H?{minHeight:H}:void 0,...Te&&q?{width:q,maxWidth:"100%"}:void 0},children:[Vt(a.jsxs("div",{className:St,style:{position:Te?"absolute":"relative",inset:Te?0:void 0,width:"100%"},children:[nt&&Te?a.jsx("div",{className:`${Qe} ${e}-titles-fade-out`,children:Zt(nt)}):null,a.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Zt(oe)})]}),Te&&H?H:void 0),Qn?a.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[nt&&Te?a.jsx("div",{className:`${Mt} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:on(nt)}):null,a.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${ee?` ${e}-titles-layer-in-stacked`:""}`,children:on(oe,!0)})]}):null]})]}),no=()=>{const Se=Qn;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:Wn(oe,!0)}),bn()]})};return a.jsxs("div",{ref:Ue,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{ht||lt()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:Ft?void 0:-1,style:{opacity:ge?1:0,transition:"opacity 300ms ease",pointerEvents:ge?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:g,...tt}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:ve,...Fe,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:Ge,onClick:Se=>Se.stopPropagation(),children:a.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":xe&&ce.length>1?"true":"false",onPointerDown:xe?xt:void 0,onPointerUp:xe?pt:void 0,onPointerCancel:xe?It:void 0,children:a.jsxs("div",{className:`${e}-slide-stack`,children:[bt&&te?a.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:Se=>{Se.target===Se.currentTarget&&ot(fe)},children:a.jsx("div",{className:`${e}-slide-area`,children:Sn(bt.images)})},`slide-out-${fe}`):null,a.jsx("div",{className:`${e}-slide-layer-in${te?` ${e}-slide-fade-in`:""}`,children:a.jsx("div",{className:`${e}-slide-area`,children:pe?Sn(pe.images):null})},`slide-in-${fe}-${de}`)]})})}),a.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:We,children:[a.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:V,width:"100%"}}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...ee?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${ee?` ${e}-lightbox-content-area-stacked`:""}`,children:Me&&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?W==="fade"?to():no():W==="fade"?at():Ct()})})})]})]})]})};function sb(e){return`
15524
+ `,Jx="01M3SBP3P8CMVMM1ZZ0QVD2PPF",Di={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function eb(e){const t={};return t[Jt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Jt(e,"fontSettings")]={...Di.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Jt(e,"fontSize")]={...Di.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Jt(e,"lineHeight")]={...Di.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Jt(e,"letterSpacing")]={...Di.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Jt(e,"wordSpacing")]={...Di.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Jt(e,"textAlign")]={...Di.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Jt(e,"textAppearance")]={...Di.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const tb=No.reduce((e,t)=>({...e,...eb(t)}),{}),nb=No.reduce((e,t)=>({...e,[Jt(t,"fontFamily")]:"Goudy Bookletter 1911",[Jt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Jt(t,"letterSpacing")]:0,[Jt(t,"wordSpacing")]:0,[Jt(t,"textAlign")]:"left",[Jt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function fs(e){return No.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Jt(n,"fontSize")]=i),o!==void 0&&(t[Jt(n,"lineHeight")]=o),t},{})}const ib=Xx(),ob={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"}},...tb,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},iconMarginLeft:{type:"number",scope:"layout",title:"Icon margin left",min:0,display:{type:"range-control"}}},defaults:{cover:"01M3QM74XESYN1HRYH9VRTZ5CK",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Jx,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...nb},layoutDefaults:{m:{thumbnailSize:.1,thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,contentMarginTop:.08,iconMarginLeft:.02,...fs({title1FontSize:.042,title1LineHeight:.042,title2FontSize:.042,title2LineHeight:.042,title3FontSize:.042,title3LineHeight:.042})},t:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.039,contentMarginTop:.015,iconMarginLeft:.02,...fs({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208})},d:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,contentMarginTop:.015,iconMarginLeft:.02,...fs({title1FontSize:.011,title1LineHeight:.02,title2FontSize:.011,title2LineHeight:.02,title3FontSize:.011,title3LineHeight:.02})}},displayRules:[{if:{name:"thumbnailActive",value:"outline"},then:{name:"properties.thumbnailActiveColor.display.visible",value:!0}}],layout:["__componentName__","thumbnailGap","thumbnailMarginBottom","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","contentMarginTop","title1MarginLeft","iconMarginLeft"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",title:"Thumbnails",items:["thumbnailVisibility","thumbnailObjectFit"]},{type:"row",items:["thumbnailTrigger","thumbnailActive"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[ib]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"}},title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}}}},default:[{image:{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"}]}},rb={element:Qx,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:ob,sourceCode:Zx,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0},{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[...No.map(e=>({path:`${Jt(e,"fontFamily")}`}))]},fontRelations:{...No.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Jt(t,"fontFamily")}`}),{})}},ab=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,initialSlideIndex:l=0,enableUrlSync:c=!1,journalItemId:d=null,onBeforeClose:u,onClose:p})=>{const{type:y,coverFit:x,backgroundColor:g,imageGap:h,maxWidth:b,maxHeight:S,textTransition:_,title1Width:v,title2Width:L,title3Width:P,title1MarginLeft:q=0,title2MarginLeft:X=0,title3MarginLeft:B=0,titleRowMarginBottom:H=0,titleHeaderLayout:O="single-row",countCloseGap:C=0,closeIcon:$,closeIconMaxWidth:Q,closeIconColor:R,closeIconHoverColor:T,contentMarginTop:w=0,iconMarginRight:V=0}=n,z=s.useCallback(we=>E.scalingValue(we,i??!1),[i]),U=z(h??0),M=`${b}%`,f=`${S}%`,K=z(C),G=z(w),ge=z(V),k=Gi("title1",Vi(n,"title1"),i),ce=Gi("title2",Vi(n,"title2"),i),I=Gi("title3",Vi(n,"title3"),i),ue=Gi("count",Vi(n,"count"),i),ee=O==="mobile",xe=!i||!!r,Le=!o&&(!i||!!r),se=s.useMemo(()=>pa(t,y),[t,y]),[de,Z]=s.useState(l),pe=se[de],ie=pe==null?void 0:pe.entry,[me,ve]=s.useState(!1),[Ee,Re]=s.useState(null),[Ce,$e]=s.useState(!1),[m,Y]=s.useState(null),[te,oe]=s.useState(!1),[fe,N]=s.useState(0),[F,ne]=s.useState(),[re,J]=s.useState(),[W,Se]=s.useState(null),le=s.useRef(null),j=s.useRef(0),Te=s.useRef(0),Fe=s.useRef(0),Ye=s.useRef(!1),De=s.useRef(null),ze=s.useRef(null),Ze=s.useRef(null),Ue=s.useRef(null),ye=s.useRef(null),_e=s.useRef(null),Ve=s.useRef(null),Je=s.useCallback(()=>{const we=ze.current;if(!we)return;const qe=we.closest(`.${e}-lightbox-content-area`);if(!qe)return we.getBoundingClientRect().width;const A=Array.from(qe.children).reduce((ae,he)=>!(he instanceof HTMLElement)||he.contains(we)?ae:ae+he.getBoundingClientRect().width,0);return qe.getBoundingClientRect().width-A},[e]),et=s.useCallback(()=>{le.current&&(clearTimeout(le.current),le.current=null)},[]),ot=s.useCallback(we=>{we===j.current&&(Y(null),oe(!1))},[]),lt=s.useCallback(()=>{o||Ye.current||(Ye.current=!0,u==null||u(),ve(!1),De.current=setTimeout(()=>{p()},300))},[o,u,p]),Ke=s.useCallback(we=>!!(we.closest("[data-controls]")||we.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:ht,backdropStyle:tt,mediaAreaStyle:Ge,overlayContentStyle:We,swipeHandlers:Ne,dismissAreaStyle:be}=bp({enabled:Le,onClose:lt,animMs:300,isBlockedTarget:Ke}),He=s.useCallback(we=>{c&&np(we+1,d,!0)},[c,d]),Xe=s.useCallback(we=>{if(we)return we.getBoundingClientRect().height},[]),ct=s.useCallback(we=>{if(se.length===0)return;const qe=(we%se.length+se.length)%se.length;if(qe===de)return;const A=se[de],ae=se[qe];j.current+=1;const he=j.current,Pe=_==="fade"&&Fc(A==null?void 0:A.entry)!==Fc(ae==null?void 0:ae.entry),je=Xe(Ze.current),mt=Pe?(()=>{const qt=Je();qn.flushSync(()=>{Se(ae.entry)}),Ze.current&&qt&&(Ze.current.style.width=`${qt}px`);const sn=Xe(Ze.current);return Ze.current&&(Ze.current.style.width=""),{measuredIncomingTitlesHeight:sn,incomingTitlesMeasureWidth:qt}})():void 0,Ht=Math.max(je??0,(mt==null?void 0:mt.measuredIncomingTitlesHeight)??0)||void 0;N(he),Y(de),oe(!0),Z(qe),He(qe),Fe.current=qe,Pe?(et(),Ht&&ne(Ht),mt!=null&&mt.incomingTitlesMeasureWidth&&J(mt.incomingTitlesMeasureWidth),Re((A==null?void 0:A.entryIndex)??null),$e(!0),Te.current=ae.entryIndex,le.current=setTimeout(()=>{Re(null),$e(!1),ne(void 0),J(void 0),Se(null),le.current=null},400)):(et(),Re(null),$e(!1),ne(void 0),J(void 0),Se(null),Te.current=ae.entryIndex)},[de,et,Je,Xe,se,He,_]),rt=s.useCallback(()=>{Ve.current=null},[]),xt=s.useCallback(we=>{!xe||se.length<=1||we.pointerType==="mouse"&&we.button!==0||we.target.closest("[data-controls]")||(Ve.current={startX:we.clientX,startY:we.clientY,pointerId:we.pointerId})},[xe,se.length]),pt=s.useCallback(we=>{var qt;if(!xe||se.length<=1||we.pointerType==="mouse"&&we.button!==0)return;if(ht){rt();return}const qe=Ve.current;if(!qe||qe.pointerId!==we.pointerId||(rt(),we.target.closest("[data-controls]")))return;const ae=we.clientX-qe.startX,he=we.clientY-qe.startY,Pe=Math.abs(ae),je=Math.abs(he);if(Pe>=yv&&Pe>je){ct(ae>0?de-1:de+1);return}if(Pe>Rc||je>Rc)return;const mt=(qt=Ue.current)==null?void 0:qt.getBoundingClientRect(),Ht=mt?mt.left+mt.width/2:window.innerWidth/2;ct(we.clientX<Ht?de-1:de+1)},[de,xe,ct,ht,rt,se.length]),It=s.useCallback(we=>{const qe=Ve.current;(qe==null?void 0:qe.pointerId)===we.pointerId&&rt()},[rt]);jl(),s.useEffect(()=>{_e.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const we=requestAnimationFrame(()=>{ve(!0),requestAnimationFrame(()=>{ye.current?ye.current.focus():Ue.current&&Ue.current.focus()})});return()=>{cancelAnimationFrame(we),De.current&&clearTimeout(De.current),le.current&&clearTimeout(le.current);const qe=_e.current;qe&&document.contains(qe)&&qe.focus({preventScroll:!0})}},[]),s.useEffect(()=>{var we;_!=="fade"&&(Te.current=((we=se[de])==null?void 0:we.entryIndex)??0,et(),Re(null),$e(!1),ne(void 0),J(void 0))},[de,et,se,_]),s.useEffect(()=>{const we=qe=>{if(qe.key==="Escape"){lt();return}if(qe.key==="ArrowLeft"&&se.length>1){ct(de-1);return}if(qe.key==="ArrowRight"&&se.length>1){ct(de+1);return}if(qe.key==="Tab"&&Ue.current){const A=Ue.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),ae=Array.from(A).filter(mt=>!mt.closest('[aria-hidden="true"]'));if(ae.length===0)return;const he=ae[0],Pe=ae[ae.length-1],je=document.activeElement;qe.shiftKey?(je===he||!Ue.current.contains(je))&&(qe.preventDefault(),Pe.focus()):(je===Pe||!Ue.current.contains(je))&&(qe.preventDefault(),he.focus())}};return window.addEventListener("keydown",we),()=>window.removeEventListener("keydown",we)},[ct,lt,de,se.length]),s.useLayoutEffect(()=>{et(),j.current=0,N(0),Y(null),oe(!1),Re(null),$e(!1),ne(void 0),J(void 0),Se(null),Z(we=>{const qe=Math.max(0,se.length-1);return Math.min(we,qe)})},[et,t.length,y,se.length]),s.useLayoutEffect(()=>{var A;const we=Math.max(0,se.length-1),qe=Math.min(Math.max(0,l),we);Fe.current=qe,Te.current=((A=se[qe])==null?void 0:A.entryIndex)??0,Z(qe)},[l]);const nt=Ee!==null?t[Ee]:null,bt=m!==null?se[m]:null,Lt=(ie==null?void 0:ie.title1)||(ie==null?void 0:ie.title2)||(ie==null?void 0:ie.title3)||(nt==null?void 0:nt.title1)||(nt==null?void 0:nt.title2)||(nt==null?void 0:nt.title3),Ut=Tv(y,se,t),Ft=$!==null,Me=Lt||Ut||Ft,Oe=Ut&&Ft?{gap:K}:void 0,St=`${e}-titles-stack${ee?` ${e}-titles-stack-stacked`:""}`,Mt=`${e}-titles-layer-out${ee?` ${e}-titles-layer-out-stacked`:""}`,Qe=`${e}-titles-layer-out`,kt=(q??0)>0||o,Bt=z(H),Wt=s.useMemo(()=>({title1Width:v??wo.title1Width,title2Width:L??wo.title2Width,title3Width:P??wo.title3Width}),[v,L,P]),At=s.useMemo(()=>({title2MarginLeft:X,title3MarginLeft:B}),[X,B]),Ae=s.useMemo(()=>ie?Ti(e,ie,k,ce,I):[],[e,ie,k,ce,I]),ft=s.useMemo(()=>Ae.map(we=>Wt[we.widthKey]),[Ae,Wt]),gt=s.useMemo(()=>Mo(Ae.length,ft),[Ae.length,ft]),dt=s.useMemo(()=>vr(Ae.length,ft),[Ae.length,ft]),yt=s.useMemo(()=>Ae.filter(we=>we.prefix==="title1"),[Ae]),ut=s.useMemo(()=>Ae.filter(we=>we.prefix==="title2"||we.prefix==="title3"),[Ae]),it=s.useMemo(()=>Ii(yt,Wt),[yt,Wt]),Nt=s.useMemo(()=>Ii(ut,Wt),[ut,Wt]),$t=s.useCallback((we,qe)=>{const A=Ae.findIndex(he=>he.prefix===we.prefix);if(!ee||qe==="single-row")return{effectiveWidth:dt[A]??0,resolvedWidth:gt[A]??0,maxWidth:yn(A,gt)};if(qe==="two-row-top"){const he=yt.findIndex(Pe=>Pe.prefix===we.prefix);return{effectiveWidth:it.effective[he]??0,resolvedWidth:it.resolved[he]??0,maxWidth:yn(he,it.resolved)}}const ae=ut.findIndex(he=>he.prefix===we.prefix);return{effectiveWidth:Nt.effective[ae]??0,resolvedWidth:Nt.resolved[ae]??0,maxWidth:yn(ae,Nt.resolved)}},[Ae,ut,Nt,dt,gt,yt,it,ee]),Qt=s.useCallback(we=>ap(Ae,gt,At,we)+(ee?0:q??0),[Ae,gt,At,ee,q]),Xt=s.useCallback(()=>ee?0:q??0,[ee,q]),Ot=s.useCallback(we=>ut.slice(0,we).reduce((qe,A,ae)=>qe+(A.marginLeftKey?At[A.marginLeftKey]??0:0)+(Nt.resolved[ae]??0),0),[ut,Nt.resolved,At]),jt=s.useCallback(we=>{const qe=ut[we];return Ot(we)+(qe.marginLeftKey?At[qe.marginLeftKey]??0:0)+(Nt.resolved[we]??0)},[ut,Nt.resolved,Ot,At]),Dt=s.useCallback((we,qe,A)=>{if(!ee||A==="single-row"){const mt=we.findIndex(en=>en.prefix===qe.prefix),Ht=we.map(en=>Wt[en.widthKey]),qt=Mo(we.length,Ht);return{effectiveWidth:vr(we.length,Ht)[mt]??0,resolvedWidth:qt[mt]??0,maxWidth:yn(mt,qt)}}if(A==="two-row-top"){const mt=we.filter(en=>en.prefix==="title1"),Ht=mt.findIndex(en=>en.prefix===qe.prefix),{resolved:qt,effective:sn}=Ii(mt,Wt);return{effectiveWidth:sn[Ht]??0,resolvedWidth:qt[Ht]??0,maxWidth:yn(Ht,qt)}}const ae=we.filter(mt=>mt.prefix==="title2"||mt.prefix==="title3"),he=ae.findIndex(mt=>mt.prefix===qe.prefix),{resolved:Pe,effective:je}=Ii(ae,Wt);return{effectiveWidth:je[he]??0,resolvedWidth:Pe[he]??0,maxWidth:yn(he,Pe)}},[Wt,ee]),zt=(we,qe,A)=>{const ae=we.marginLeftKey?At[we.marginLeftKey]??0:0,{effectiveWidth:he,resolvedWidth:Pe,maxWidth:je}=A??$t(we,qe),mt=Math.max(ae,ii),Ht=o&&qe==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":we.prefix,style:{width:z(he),...ae>0?{marginLeft:z(ae)}:{}},children:[a.jsx("p",{className:we.className,style:we.style,children:we.text}),Ht&&we.marginLeftKey?a.jsx("div",{"data-controls":we.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Pe),style:{position:"absolute",top:0,left:z(-ae),width:z(mt),height:"100%",pointerEvents:"auto"}}):null,Ht?a.jsx("div",{"data-controls":we.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(je),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:z(-Pn/2),width:z(Pn),height:"100%",pointerEvents:"auto"}}):null]},we.className)},D=(we="two-row")=>{const qe=Ae.findIndex(he=>he.prefix==="title1"),A=qe>=0?gt[qe]:Wt.title1Width,ae=we==="two-row"&&o;return a.jsx("div",{...ae?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(A)}:{},style:{width:z(q??0),flexShrink:0,alignSelf:"stretch",...ae?{pointerEvents:"auto"}:{}}})},Ie=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:k,"aria-hidden":"true",children:" "}),Be=()=>a.jsx("span",{className:`${e}-entry-counter`,style:ue,"aria-live":"polite","aria-atomic":"true",children:Cv(se,de,y,t)}),ke=()=>Ut?o&&Ft?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 * (${as(K)} + ${K}))`,width:as(K),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Be():null,vt=()=>!Ut&&!Ft?null:a.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Oe,children:[ke(),Ft?Tt():null]}),Ct=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Ut||Lt?Ie():null,kt?D("single-row"):null,Pt(ie),a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),vt(),bn()]}),at=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Ut||Lt?Ie():null,kt?D("single-row"):null,a.jsxs("div",{className:`${e}-titles-row-titles`,style:Ce&&F?{minHeight:F}:void 0,children:[a.jsx("div",{ref:Ze,className:St,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:xn(W||ie)}),a.jsxs("div",{ref:ze,className:St,style:{position:Ce?"absolute":"relative",inset:Ce?0:void 0,width:"100%",...Ce&&re?{width:re,maxWidth:"100%"}:void 0},children:[nt&&Ce?a.jsx("div",{className:`${Mt} ${e}-titles-fade-out`,children:xn(nt)}):null,a.jsx("div",{className:`${e}-titles-layer-in${Ce?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:xn(ie)})]})]}),vt(),bn()]}),Tt=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:E.scalingValue(Q??0,i),height:E.scalingValue(Q??0,i),marginRight:ge,"--close-icon-hover-color":T},children:[a.jsx("button",{ref:ye,type:"button",className:`${e}-close-icon-inner`,onClick:lt,"aria-label":"Close",children:a.jsx(gn,{url:$??"",fill:R,hoverFill:i&&!r?R:T,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:ge,height:"100%",pointerEvents:"auto"}})]}),Vt=(we,qe)=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[Ut||Lt?Ie():null,kt?D("two-row"):null,qe!==void 0?a.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:qe},children:we}):a.jsxs(a.Fragment,{children:[we,a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),vt()]}),Pt=we=>{if(!we)return null;const qe=Ti(e,we,k,ce,I);return a.jsx(a.Fragment,{children:qe.map(A=>zt(A,"single-row",Dt(qe,A,"single-row")))})},Zt=we=>{if(!we)return null;const qe=Ti(e,we,k,ce,I),A=qe.find(ae=>ae.prefix==="title1");return A?zt(A,"two-row-top",Dt(qe,A,"two-row-top")):null},on=(we,qe=!1)=>{const A=we?Ti(e,we,k,ce,I):[],ae=A.filter(je=>je.prefix==="title2"||je.prefix==="title3"),he=o&&qe;return ae.length>0||he||(H??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(je=>zt(je,"two-row-bottom",Dt(A,je,"two-row-bottom"))),qe&&o?a.jsxs(a.Fragment,{children:[pi(),Kn()]}):null]}):null,(H??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:Bt,width:"100%",flexShrink:0,pointerEvents:he?"auto":"none"}}):null]}):null},Wn=(we,qe=!1)=>a.jsxs(a.Fragment,{children:[Vt(Zt(we)),on(we,qe)]}),xn=we=>ee?a.jsx("div",{className:`${e}-titles-row-two-row`,children:Wn(we)}):we?a.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Pt(we)}):null,ui=()=>{const we=ee?-1:Ae.findIndex(ae=>ae.prefix==="title1"),qe=!ee&&(o||(q??0)>0)?(()=>{const ae=q??0,he=we>=0?gt[we]:Wt.title1Width,Pe=Math.max(ae,ii);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:z(Pe),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,A=Ae.flatMap((ae,he)=>{if(!ae.marginLeftKey)return[];const Pe=At[ae.marginLeftKey]??0,je=rp(Ae,gt,At,he)+Xt(),mt=Math.max(Pe,ii);return a.jsx("div",{"data-controls":ae.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(gt[he]),style:{position:"absolute",top:0,left:z(je),width:z(mt),height:"100%",pointerEvents:"auto"}},ae.marginLeftKey)});return qe?[qe,...A]:A},dn=()=>Ae.map((we,qe)=>{const A=yn(qe,gt),he=Qt(qe)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":we.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(A),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:z(he),width:z(Pn),height:"100%",pointerEvents:"auto"}})},`${we.widthKey}-junction`)}),pi=()=>ut.flatMap((we,qe)=>{if(!we.marginLeftKey)return[];const A=At[we.marginLeftKey]??0,ae=Ot(qe),he=Math.max(A,ii),{resolvedWidth:Pe}=$t(we,"two-row-bottom");return a.jsx("div",{"data-controls":we.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Pe),style:{position:"absolute",top:0,left:z(ae),width:z(he),height:"100%",pointerEvents:"auto"}},we.marginLeftKey)}),Kn=()=>ut.map((we,qe)=>{const{maxWidth:A}=$t(we,"two-row-bottom"),he=jt(qe)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":we.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(A),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:z(he),width:z(Pn),height:"100%",pointerEvents:"auto"}})},`${we.widthKey}-junction`)}),bn=()=>!o||ee?null:a.jsxs(a.Fragment,{children:[ui(),dn()]}),gi=we=>{const qe=!we.objectFit&&li(x);return{className:`${e}-slide-image-cell${qe?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:M,maxHeight:f,...qe?{"--image-aspect-ratio":ja(x)}:{}}}},eo=we=>we.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":we.objectFit}}:li(x)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},Sn=we=>{if(we.length===0)return null;const qe=we.length>1,A=as(U),ae=`calc(-0.5 * (${A} + ${U}))`;if(we.length===1){const he=we[0];return a.jsx("div",{...gi(he),children:a.jsx("img",{...eo(he),src:he.assetId,alt:he.name??"",draggable:!1})})}return a.jsx("div",{className:`${e}-slide-inner`,style:qe?{gap:U}:void 0,children:we.map((he,Pe)=>a.jsxs("div",{...gi(he),children:[a.jsx("img",{...eo(he),src:he.assetId,alt:he.name??"",draggable:!1}),o&&qe&&Pe<we.length-1&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:ae,width:A,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${he.assetId}-${Pe}`))})},Qn=!!(ie!=null&&ie.title2||ie!=null&&ie.title3||nt!=null&&nt.title2||nt!=null&&nt.title3||(H??0)>0||o),to=()=>a.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[a.jsx("div",{ref:Ze,className:St,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Wn(W||ie)}),a.jsxs("div",{ref:ze,className:`${e}-titles-row-two-row`,style:{...Ce&&F?{minHeight:F}:void 0,...Ce&&re?{width:re,maxWidth:"100%"}:void 0},children:[Vt(a.jsxs("div",{className:St,style:{position:Ce?"absolute":"relative",inset:Ce?0:void 0,width:"100%"},children:[nt&&Ce?a.jsx("div",{className:`${Qe} ${e}-titles-fade-out`,children:Zt(nt)}):null,a.jsx("div",{className:`${e}-titles-layer-in${Ce?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Zt(ie)})]}),Ce&&F?F:void 0),Qn?a.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[nt&&Ce?a.jsx("div",{className:`${Mt} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:on(nt)}):null,a.jsx("div",{className:`${e}-titles-layer-in${Ce?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${ee?` ${e}-titles-layer-in-stacked`:""}`,children:on(ie,!0)})]}):null]})]}),no=()=>{const we=Qn;return a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...we?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:we?void 0:{flex:"0 0 auto",height:"auto"},children:Wn(ie,!0)}),bn()]})};return a.jsxs("div",{ref:Ue,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{ht||lt()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:Ft?void 0:-1,style:{opacity:me?1:0,transition:"opacity 300ms ease",pointerEvents:me?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:g,...tt}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:be,...Ne,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:Ge,onClick:we=>we.stopPropagation(),children:a.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":xe&&se.length>1?"true":"false",onPointerDown:xe?xt:void 0,onPointerUp:xe?pt:void 0,onPointerCancel:xe?It:void 0,children:a.jsxs("div",{className:`${e}-slide-stack`,children:[bt&&te?a.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:we=>{we.target===we.currentTarget&&ot(fe)},children:a.jsx("div",{className:`${e}-slide-area`,children:Sn(bt.images)})},`slide-out-${fe}`):null,a.jsx("div",{className:`${e}-slide-layer-in${te?` ${e}-slide-fade-in`:""}`,children:a.jsx("div",{className:`${e}-slide-area`,children:pe?Sn(pe.images):null})},`slide-in-${fe}-${de}`)]})})}),a.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:We,children:[a.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:G,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:Me&&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?_==="fade"?to():no():_==="fade"?at():Ct()})})})]})]})]})};function sb(e){return`
15525
15525
  .${e}-wrapper {
15526
15526
  position: relative;
15527
15527
  width: 100%;
@@ -16043,7 +16043,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
16043
16043
  pointer-events: auto;
16044
16044
  z-index: 10;
16045
16045
  }
16046
- `}const lb=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r,metadata:l})=>{const{prefix:c}=E.useScopedStyles(),d=(l==null?void 0:l.itemId)??null,{cover:u,coverFit:p,type:y}=e,x=s.useRef(null),[g,f]=s.useState(!1),[b,S]=s.useState(0),W=s.useRef(!1),v=s.useRef(!1),L=s.useRef(!1),M=s.useMemo(()=>(t??[]).filter(C=>Po(C).length>0),[t]),U=g&&M.length>0,G=!n,B=s.useCallback(()=>{G&&(L.current=!0,xv(v.current,d),v.current=!1)},[G,d]),N=(C=0)=>{if(M.length===0||n&&!i&&!o)return;const $=pa(M,y),K=Math.max(0,Math.min(C,$.length-1));if(S(K),G){const R=ip();np(K+1,d,R),v.current=!R}f(!0)},O=s.useCallback(()=>{f(!1),L.current=!1},[]);return s.useEffect(()=>{!n||i||o||f(!1)},[n,i,o]),s.useEffect(()=>{if(!G||typeof window>"u")return;const C=window.history.scrollRestoration;return window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration=C}},[G]),s.useEffect(()=>{if(!G||W.current)return;W.current=!0;const C=kc(d);if(!C)return;const $=Ac(C,pa(M,y).length);$<0||(S($),f(!0))},[M,d,G,y]),s.useEffect(()=>{if(!G)return;const C=()=>{if(L.current){L.current=!1,f(!1);return}const $=kc(d);if(!$){f(!1);return}const K=Ac($,pa(M,y).length);if(K<0){f(!1);return}v.current=!1,S(K),f(!0)};return window.addEventListener("popstate",C),()=>window.removeEventListener("popstate",C)},[M,d,G,y]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:x,className:`${c}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:sb(c)}}),u?a.jsx("button",{type:"button",className:`${c}-cover ${li(p)?`${c}-ratio-wrapper-cover`:`${c}-ratio-wrapper-fit`}`,onClick:()=>N(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...li(p)?{"--image-aspect-ratio":ja(p)}:{}},"aria-label":"Open journal gallery",children:a.jsx("img",{className:`${c}-cover-image ${li(p)?`${c}-cover-image-cover`:`${c}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),U&&typeof document<"u"&&(()=>{const C=(r?document.getElementById(r):null)??document.body;return qn.createPortal(a.jsx(ab,{prefix:c,entries:M,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:b,enableUrlSync:G,journalItemId:d,onBeforeClose:B,onClose:O}),C)})()]})},cb=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
16046
+ `}const lb=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r,metadata:l})=>{const{prefix:c}=E.useScopedStyles(),d=(l==null?void 0:l.itemId)??null,{cover:u,coverFit:p,type:y}=e,x=s.useRef(null),[g,h]=s.useState(!1),[b,S]=s.useState(0),_=s.useRef(!1),v=s.useRef(!1),L=s.useRef(!1),P=s.useMemo(()=>(t??[]).filter(C=>Po(C).length>0),[t]),q=g&&P.length>0,X=!n,B=s.useCallback(()=>{X&&(L.current=!0,xv(v.current,d),v.current=!1)},[X,d]),H=(C=0)=>{if(P.length===0||n&&!i&&!o)return;const $=pa(P,y),Q=Math.max(0,Math.min(C,$.length-1));if(S(Q),X){const R=ip();np(Q+1,d,R),v.current=!R}h(!0)},O=s.useCallback(()=>{h(!1),L.current=!1},[]);return s.useEffect(()=>{!n||i||o||h(!1)},[n,i,o]),s.useEffect(()=>{if(!X||typeof window>"u")return;const C=window.history.scrollRestoration;return window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration=C}},[X]),s.useEffect(()=>{if(!X||_.current)return;_.current=!0;const C=kc(d);if(!C)return;const $=Ac(C,pa(P,y).length);$<0||(S($),h(!0))},[P,d,X,y]),s.useEffect(()=>{if(!X)return;const C=()=>{if(L.current){L.current=!1,h(!1);return}const $=kc(d);if(!$){h(!1);return}const Q=Ac($,pa(P,y).length);if(Q<0){h(!1);return}v.current=!1,S(Q),h(!0)};return window.addEventListener("popstate",C),()=>window.removeEventListener("popstate",C)},[P,d,X,y]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:x,className:`${c}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:sb(c)}}),u?a.jsx("button",{type:"button",className:`${c}-cover ${li(p)?`${c}-ratio-wrapper-cover`:`${c}-ratio-wrapper-fit`}`,onClick:()=>H(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...li(p)?{"--image-aspect-ratio":ja(p)}:{}},"aria-label":"Open journal gallery",children:a.jsx("img",{className:`${c}-cover-image ${li(p)?`${c}-cover-image-cover`:`${c}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),q&&typeof document<"u"&&(()=>{const C=(r?document.getElementById(r):null)??document.body;return qn.createPortal(a.jsx(ab,{prefix:c,entries:P,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:b,enableUrlSync:X,journalItemId:d,onBeforeClose:B,onClose:O}),C)})()]})},cb=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
16047
16047
  import { createPortal } from 'react-dom';
16048
16048
  import { CommonComponentProps } from '../props';
16049
16049
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -16843,7 +16843,7 @@ export type LightboxJournalSettings = {
16843
16843
  width: 32px;
16844
16844
  height: 32px;
16845
16845
  }
16846
- `}function bb(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 Sb(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await bb(i)]));return new Map(n)}function wb({settings:e,content:t=[],isEditor:n}){const{prefix:i}=E.useScopedStyles(),[o,r]=s.useState(null),[l,c]=s.useState([]),[d,u]=s.useState(0),p=s.useRef(0),[y,x]=s.useState({x:0,y:0}),[g,f]=s.useState("none"),b=s.useRef({x:0,y:0}),[S,W]=s.useState(!1),[v,L]=s.useState(!1),M=s.useRef(new Map),{imageSize:U=yb,cursor:G="system",target:B="area",position:N="random",visible:O="all",defaultCursor:C=null,hoverCursor:$=null}=e,K=t.filter(P=>{var h;return!!((h=P==null?void 0:P.image)!=null&&h.assetId)}),R=s.useMemo(()=>xb(i),[i]),w=s.useCallback((P,h,J=l)=>{if(!o)return;const V=o.getBoundingClientRect(),me=P-V.left,k=h-V.top;x({x:me,y:k}),f(vb(me,k,J,o,G,B,$,C))},[o,l,G,B,$,C]);s.useEffect(()=>{const P=[...K.map(J=>J.image.assetId),C,$].filter(J=>!!J);if(P.length===0){M.current=new Map,L(!0);return}let h=!1;return L(!1),Sb(P).then(J=>{h||(M.current=J,L(!0))}),()=>{h=!0}},[t,C,$]),s.useEffect(()=>{if(!o)return;const P=J=>{J.stopPropagation(),b.current={x:J.clientX,y:J.clientY},w(J.clientX,J.clientY)},h=()=>{S&&w(b.current.x,b.current.y)};return o.addEventListener("mousemove",P),window.addEventListener("scroll",h,!0),()=>{o.removeEventListener("mousemove",P),window.removeEventListener("scroll",h,!0)}},[o,S,w]),s.useEffect(()=>{!o||!S||w(b.current.x,b.current.y)},[l,o,S,w]),s.useEffect(()=>{S||f("none")},[S]);const T=(P,h,J,V={})=>{var ee,xe;if(!((ee=P==null?void 0:P.image)!=null&&ee.assetId))return null;const me=((xe=M.current.get(P.image.assetId))==null?void 0:xe.aspectRatio)??1,k=sd(P.image.assetId,U,M.current),{heightPx:le}=Ca(k,me);let I=0,ue=0;return N==="same"?{x:I,y:ue}=ad(h,J,k,me):(I=V.x??Math.random()*h,ue=V.y??Math.random()*J,{x:I,y:ue}=Us(I,ue,h,J,k,le)),{id:p.current++,assetId:P.image.assetId,link:P.link,name:P.image.name,x:I,y:ue,xRatio:I/h,yRatio:ue/J,aspectRatio:me,widthPx:k}},j=()=>{if(!o)return;const P=o.getBoundingClientRect(),h=P.width,J=P.height;h===0||J===0||c(V=>V.length===0?V:V.map(me=>{const k=U.sizeType==="random"?me.widthPx:sd(me.assetId,U,M.current),{heightPx:le}=Ca(k,me.aspectRatio);if(N==="same"){const{x:ee,y:xe}=ad(h,J,k,me.aspectRatio);return{...me,x:ee,y:xe,widthPx:k}}const{x:I,y:ue}=Us(me.xRatio*h,me.yRatio*J,h,J,k,le);return{...me,x:I,y:ue,widthPx:k}}))};s.useEffect(()=>{if(!o||K.length===0||!v)return;const P=o.getBoundingClientRect(),h=P.width,J=P.height,V=T(K[0],h,J);V&&(c([V]),u(K.length>1?1:0))},[U,N,o,t,v]),s.useEffect(()=>{if(!o)return;j();const P=new ResizeObserver(j);return P.observe(o),window.addEventListener("resize",j),()=>{P.disconnect(),window.removeEventListener("resize",j)}},[o,N,U,l.length]),s.useEffect(()=>{O==="last One"&&c(P=>P.length>0?[P[P.length-1]]:[])},[O]);const _=P=>{if(!o||K.length===0||!v)return;const h=o.getBoundingClientRect(),J=P.clientX-h.left,V=P.clientY-h.top;if(B==="image"&&!wp(J,V,l))return;let me=0,k=0;N==="on Click"?(me=J,k=V):N==="same"?(me=h.width/2,k=h.height/2):(me=Math.random()*h.width,k=Math.random()*h.height);const le=K[d%K.length],I=T(le,h.width,h.height,{x:me,y:k});if(!I)return;const ue=O==="all"?[...l,I]:[I];c(ue),u(ee=>(ee+1)%K.length),w(P.clientX,P.clientY,ue)},Q=G==="custom"&&g!=="none";return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:R}}),a.jsxs("div",{ref:r,onClick:_,onMouseEnter:()=>W(!0),onMouseLeave:()=>W(!1),className:`${i}-root`,style:{cursor:Q?"none":"default"},children:[l.map(P=>a.jsx("div",{className:`${i}-wrapper`,style:{top:`${P.y}px`,left:`${P.x}px`,width:`${P.widthPx}px`,cursor:Q?"none":"default"},children:B==="area"&&P.link?a.jsx("a",{href:P.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:a.jsx("img",{src:P.assetId,alt:P.name,className:`${i}-image`})}):a.jsx("img",{src:P.assetId,alt:P.name,className:`${i}-image`})},P.id)),S&&Q&&a.jsx("div",{className:`${i}-cursor`,style:{left:`${y.x}px`,top:`${y.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${g}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const $b=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
16846
+ `}function bb(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 Sb(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await bb(i)]));return new Map(n)}function wb({settings:e,content:t=[],isEditor:n}){const{prefix:i}=E.useScopedStyles(),[o,r]=s.useState(null),[l,c]=s.useState([]),[d,u]=s.useState(0),p=s.useRef(0),[y,x]=s.useState({x:0,y:0}),[g,h]=s.useState("none"),b=s.useRef({x:0,y:0}),[S,_]=s.useState(!1),[v,L]=s.useState(!1),P=s.useRef(new Map),{imageSize:q=yb,cursor:X="system",target:B="area",position:H="random",visible:O="all",defaultCursor:C=null,hoverCursor:$=null}=e,Q=t.filter(M=>{var f;return!!((f=M==null?void 0:M.image)!=null&&f.assetId)}),R=s.useMemo(()=>xb(i),[i]),T=s.useCallback((M,f,K=l)=>{if(!o)return;const G=o.getBoundingClientRect(),ge=M-G.left,k=f-G.top;x({x:ge,y:k}),h(vb(ge,k,K,o,X,B,$,C))},[o,l,X,B,$,C]);s.useEffect(()=>{const M=[...Q.map(K=>K.image.assetId),C,$].filter(K=>!!K);if(M.length===0){P.current=new Map,L(!0);return}let f=!1;return L(!1),Sb(M).then(K=>{f||(P.current=K,L(!0))}),()=>{f=!0}},[t,C,$]),s.useEffect(()=>{if(!o)return;const M=K=>{K.stopPropagation(),b.current={x:K.clientX,y:K.clientY},T(K.clientX,K.clientY)},f=()=>{S&&T(b.current.x,b.current.y)};return o.addEventListener("mousemove",M),window.addEventListener("scroll",f,!0),()=>{o.removeEventListener("mousemove",M),window.removeEventListener("scroll",f,!0)}},[o,S,T]),s.useEffect(()=>{!o||!S||T(b.current.x,b.current.y)},[l,o,S,T]),s.useEffect(()=>{S||h("none")},[S]);const w=(M,f,K,G={})=>{var ee,xe;if(!((ee=M==null?void 0:M.image)!=null&&ee.assetId))return null;const ge=((xe=P.current.get(M.image.assetId))==null?void 0:xe.aspectRatio)??1,k=sd(M.image.assetId,q,P.current),{heightPx:ce}=Ca(k,ge);let I=0,ue=0;return H==="same"?{x:I,y:ue}=ad(f,K,k,ge):(I=G.x??Math.random()*f,ue=G.y??Math.random()*K,{x:I,y:ue}=Us(I,ue,f,K,k,ce)),{id:p.current++,assetId:M.image.assetId,link:M.link,name:M.image.name,x:I,y:ue,xRatio:I/f,yRatio:ue/K,aspectRatio:ge,widthPx:k}},V=()=>{if(!o)return;const M=o.getBoundingClientRect(),f=M.width,K=M.height;f===0||K===0||c(G=>G.length===0?G:G.map(ge=>{const k=q.sizeType==="random"?ge.widthPx:sd(ge.assetId,q,P.current),{heightPx:ce}=Ca(k,ge.aspectRatio);if(H==="same"){const{x:ee,y:xe}=ad(f,K,k,ge.aspectRatio);return{...ge,x:ee,y:xe,widthPx:k}}const{x:I,y:ue}=Us(ge.xRatio*f,ge.yRatio*K,f,K,k,ce);return{...ge,x:I,y:ue,widthPx:k}}))};s.useEffect(()=>{if(!o||Q.length===0||!v)return;const M=o.getBoundingClientRect(),f=M.width,K=M.height,G=w(Q[0],f,K);G&&(c([G]),u(Q.length>1?1:0))},[q,H,o,t,v]),s.useEffect(()=>{if(!o)return;V();const M=new ResizeObserver(V);return M.observe(o),window.addEventListener("resize",V),()=>{M.disconnect(),window.removeEventListener("resize",V)}},[o,H,q,l.length]),s.useEffect(()=>{O==="last One"&&c(M=>M.length>0?[M[M.length-1]]:[])},[O]);const z=M=>{if(!o||Q.length===0||!v)return;const f=o.getBoundingClientRect(),K=M.clientX-f.left,G=M.clientY-f.top;if(B==="image"&&!wp(K,G,l))return;let ge=0,k=0;H==="on Click"?(ge=K,k=G):H==="same"?(ge=f.width/2,k=f.height/2):(ge=Math.random()*f.width,k=Math.random()*f.height);const ce=Q[d%Q.length],I=w(ce,f.width,f.height,{x:ge,y:k});if(!I)return;const ue=O==="all"?[...l,I]:[I];c(ue),u(ee=>(ee+1)%Q.length),T(M.clientX,M.clientY,ue)},U=X==="custom"&&g!=="none";return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:R}}),a.jsxs("div",{ref:r,onClick:z,onMouseEnter:()=>_(!0),onMouseLeave:()=>_(!1),className:`${i}-root`,style:{cursor:U?"none":"default"},children:[l.map(M=>a.jsx("div",{className:`${i}-wrapper`,style:{top:`${M.y}px`,left:`${M.x}px`,width:`${M.widthPx}px`,cursor:U?"none":"default"},children:B==="area"&&M.link?a.jsx("a",{href:M.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:a.jsx("img",{src:M.assetId,alt:M.name,className:`${i}-image`})}):a.jsx("img",{src:M.assetId,alt:M.name,className:`${i}-image`})},M.id)),S&&U&&a.jsx("div",{className:`${i}-cursor`,style:{left:`${y.x}px`,top:`${y.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${g}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const $b=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
16847
16847
  import { CommonComponentProps } from '../props';
16848
16848
  import { useScopedStyles } from '../utils/index';
16849
16849
 
@@ -17483,7 +17483,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
17483
17483
  display: block;
17484
17484
  pointer-events: none;
17485
17485
  }
17486
- `}function Mb(e){return e==="blur"?Lb:e==="greyscale"?Ib:0}function Ko(e,t=1,n=1){const i=Mb(e)*Math.max(0,Math.min(1,t));if(e==="greyscale")return`grayscale(${i}%)`;if(e==="blur"){const o=i/4;return o<=0?"none":`blur(${o/Math.max(n,1)}px)`}return"none"}function ld(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function Rb(e,t){return t<=1?0:(e-1+t)%t}function Eb(e,t=1){return!e||e.height===0?t:e.width/e.height}function kb(e,t,n,i,o){if(e<=0||t<=0)return{widthPercent:i,heightPercent:o};const r=e*i/100,l=t*o/100;let c=r,d=c/n;return d>l&&(d=l,c=d*n),{widthPercent:c/e*100,heightPercent:d/t*100}}function cd(e,t,n){if(e<=0||t<=0)return 1;const i=e*n.widthPercent/100,o=t*n.heightPercent/100;return i<=0||o<=0?1:Math.max(e/i,t/o)}function $p(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function dd(e,t,n){return{...$p(e),[`--${n}-stage-scale`]:t}}function Ab(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 Fb({settings:e,content:t,isEditor:n,isPreviewMode:i}){var we,m,Y,te,ae,fe,F;const{prefix:o}=E.useScopedStyles(),r=s.useMemo(()=>Pb(o),[o]),{imageSize:l,maxWidth:c,maxHeight:d,transition:u=1e3,bgImage:p="greyscale"}=e,y=t??[],x=ld(y.length),[g,f]=s.useState(x.activeIndex),[b,S]=s.useState(x.backgroundIndex),[W,v]=s.useState(!1),[L,M]=s.useState(!1),[U,G]=s.useState(null),[B,N]=s.useState(null),[O,C]=s.useState(0),[$,K]=s.useState(1),[R,w]=s.useState("none"),[T,j]=s.useState("next"),[_,Q]=s.useState({}),[P,h]=s.useState({width:0,height:0}),J=s.useRef(null),V=s.useRef(null),me=!n||!!i,k=l??60,le=Math.max(10,Math.min(100,c??k)),I=Math.max(10,Math.min(100,d??k)),ue=Math.max(100,u),ee=Ko(p),xe=s.useCallback(H=>{const ne=Eb(H?_[H]:void 0);return kb(P.width,P.height,ne,le,I)},[P.height,P.width,_,I,le]);s.useEffect(()=>{const H=V.current;if(!H)return;const ne=new ResizeObserver(([q])=>{const{width:ie,height:z}=q.contentRect;h({width:ie,height:z})});return ne.observe(H),()=>ne.disconnect()},[]),s.useEffect(()=>{const H=(t??[]).map(ne=>{var q;return(q=ne.image)==null?void 0:q.assetId}).filter(ne=>!!ne);Ab(H,(ne,q)=>{Q(ie=>{var z,$e;return((z=ie[ne])==null?void 0:z.width)===q.width&&(($e=ie[ne])==null?void 0:$e.height)===q.height?ie:{...ie,[ne]:q}})})},[t]),s.useEffect(()=>{const{backgroundIndex:H,activeIndex:ne}=ld(y.length);f(ne),S(H),v(!1),M(!1),G(null),N(null),C(0),K(1),w("none"),j("next")},[y.length,t]),s.useEffect(()=>()=>{J.current&&clearTimeout(J.current)},[]);const Le=s.useCallback(H=>{var re,X,Ce,He;if(!me||W||y.length<=1)return;const ne=H==="next"?(g+1)%y.length:(g-1+y.length)%y.length,q=xe((X=(re=y[g])==null?void 0:re.image)==null?void 0:X.assetId),ie=xe((He=(Ce=y[ne])==null?void 0:Ce.image)==null?void 0:He.assetId),z=cd(P.width,P.height,q),$e=cd(P.width,P.height,ie);J.current&&clearTimeout(J.current),j(H),M(!0),v(!0),H==="next"?(G(g),N(ne),C(0),K(1),w(Ko(p,0,1))):(S(Rb(ne,y.length)),G(ne),N(g),C(1),K($e),w(Ko(p,1,$e))),requestAnimationFrame(()=>{M(!1),requestAnimationFrame(()=>{H==="next"?(C(1),K(z),w(Ko(p,1,z))):(C(0),K(1),w(Ko(p,0,1)))})}),J.current=setTimeout(()=>{H==="next"&&S(g),f(ne),G(null),N(null),v(!1)},ue)},[g,p,P.height,P.width,xe,W,me,y,ue]),ce=y[g],de=b!==null?y[b]:null,Z=U!==null?y[U]:null,pe=B!==null?y[B]:null,oe=y.length<=1?0:(g-1+y.length)%y.length,ge=y.length<=1?0:(g+1)%y.length,be=xe((we=ce==null?void 0:ce.image)==null?void 0:we.assetId),Re=xe((m=Z==null?void 0:Z.image)==null?void 0:m.assetId),Ee=xe((Y=pe==null?void 0:pe.image)==null?void 0:Y.assetId),Te={[`--${o}-transition-ms`]:`${ue}ms`};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:r}}),a.jsxs("div",{ref:V,className:Et(`${o}-wrapper`,L&&`${o}-snap`,n&&!i&&`${o}-editor`),style:Te,"aria-label":"Zoom gallery",children:[((te=de==null?void 0:de.image)==null?void 0:te.assetId)&&a.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:de.image.assetId,alt:"",style:{filter:ee}})}),W&&((ae=Z==null?void 0:Z.image)==null?void 0:ae.assetId)&&a.jsx("div",{className:Et(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${T}`),style:dd(Re,$,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:Z.image.assetId,alt:"",style:{filter:R}})}),W&&((fe=pe==null?void 0:pe.image)==null?void 0:fe.assetId)&&a.jsx("div",{className:Et(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${T}`),style:dd(Ee,O,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-image`,src:pe.image.assetId,alt:""})}),!W&&((F=ce==null?void 0:ce.image)==null?void 0:F.assetId)&&a.jsx("div",{className:Et(`${o}-stage`,`${o}-foreground`),style:$p(be),children:a.jsx("img",{className:`${o}-image`,src:ce.image.assetId,alt:ce.image.name??""})}),me&&y.length>1&&!W&&a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:Et(`${o}-nav`,`${o}-nav-prev`),onClick:()=>Le("prev"),"aria-label":`Show previous image (${oe+1} of ${y.length})`}),a.jsx("button",{type:"button",className:Et(`${o}-nav`,`${o}-nav-next`),onClick:()=>Le("next"),"aria-label":`Show next image (${ge+1} of ${y.length})`})]})]})]})}const Nb=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17486
+ `}function Mb(e){return e==="blur"?Lb:e==="greyscale"?Ib:0}function Ko(e,t=1,n=1){const i=Mb(e)*Math.max(0,Math.min(1,t));if(e==="greyscale")return`grayscale(${i}%)`;if(e==="blur"){const o=i/4;return o<=0?"none":`blur(${o/Math.max(n,1)}px)`}return"none"}function ld(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function Rb(e,t){return t<=1?0:(e-1+t)%t}function Eb(e,t=1){return!e||e.height===0?t:e.width/e.height}function kb(e,t,n,i,o){if(e<=0||t<=0)return{widthPercent:i,heightPercent:o};const r=e*i/100,l=t*o/100;let c=r,d=c/n;return d>l&&(d=l,c=d*n),{widthPercent:c/e*100,heightPercent:d/t*100}}function cd(e,t,n){if(e<=0||t<=0)return 1;const i=e*n.widthPercent/100,o=t*n.heightPercent/100;return i<=0||o<=0?1:Math.max(e/i,t/o)}function $p(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function dd(e,t,n){return{...$p(e),[`--${n}-stage-scale`]:t}}function Ab(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 Fb({settings:e,content:t,isEditor:n,isPreviewMode:i}){var $e,m,Y,te,oe,fe,N;const{prefix:o}=E.useScopedStyles(),r=s.useMemo(()=>Pb(o),[o]),{imageSize:l,maxWidth:c,maxHeight:d,transition:u=1e3,bgImage:p="greyscale"}=e,y=t??[],x=ld(y.length),[g,h]=s.useState(x.activeIndex),[b,S]=s.useState(x.backgroundIndex),[_,v]=s.useState(!1),[L,P]=s.useState(!1),[q,X]=s.useState(null),[B,H]=s.useState(null),[O,C]=s.useState(0),[$,Q]=s.useState(1),[R,T]=s.useState("none"),[w,V]=s.useState("next"),[z,U]=s.useState({}),[M,f]=s.useState({width:0,height:0}),K=s.useRef(null),G=s.useRef(null),ge=!n||!!i,k=l??60,ce=Math.max(10,Math.min(100,c??k)),I=Math.max(10,Math.min(100,d??k)),ue=Math.max(100,u),ee=Ko(p),xe=s.useCallback(F=>{const ne=Eb(F?z[F]:void 0);return kb(M.width,M.height,ne,ce,I)},[M.height,M.width,z,I,ce]);s.useEffect(()=>{const F=G.current;if(!F)return;const ne=new ResizeObserver(([re])=>{const{width:J,height:W}=re.contentRect;f({width:J,height:W})});return ne.observe(F),()=>ne.disconnect()},[]),s.useEffect(()=>{const F=(t??[]).map(ne=>{var re;return(re=ne.image)==null?void 0:re.assetId}).filter(ne=>!!ne);Ab(F,(ne,re)=>{U(J=>{var W,Se;return((W=J[ne])==null?void 0:W.width)===re.width&&((Se=J[ne])==null?void 0:Se.height)===re.height?J:{...J,[ne]:re}})})},[t]),s.useEffect(()=>{const{backgroundIndex:F,activeIndex:ne}=ld(y.length);h(ne),S(F),v(!1),P(!1),X(null),H(null),C(0),Q(1),T("none"),V("next")},[y.length,t]),s.useEffect(()=>()=>{K.current&&clearTimeout(K.current)},[]);const Le=s.useCallback(F=>{var le,j,Te,Fe;if(!ge||_||y.length<=1)return;const ne=F==="next"?(g+1)%y.length:(g-1+y.length)%y.length,re=xe((j=(le=y[g])==null?void 0:le.image)==null?void 0:j.assetId),J=xe((Fe=(Te=y[ne])==null?void 0:Te.image)==null?void 0:Fe.assetId),W=cd(M.width,M.height,re),Se=cd(M.width,M.height,J);K.current&&clearTimeout(K.current),V(F),P(!0),v(!0),F==="next"?(X(g),H(ne),C(0),Q(1),T(Ko(p,0,1))):(S(Rb(ne,y.length)),X(ne),H(g),C(1),Q(Se),T(Ko(p,1,Se))),requestAnimationFrame(()=>{P(!1),requestAnimationFrame(()=>{F==="next"?(C(1),Q(W),T(Ko(p,1,W))):(C(0),Q(1),T(Ko(p,0,1)))})}),K.current=setTimeout(()=>{F==="next"&&S(g),h(ne),X(null),H(null),v(!1)},ue)},[g,p,M.height,M.width,xe,_,ge,y,ue]),se=y[g],de=b!==null?y[b]:null,Z=q!==null?y[q]:null,pe=B!==null?y[B]:null,ie=y.length<=1?0:(g-1+y.length)%y.length,me=y.length<=1?0:(g+1)%y.length,ve=xe(($e=se==null?void 0:se.image)==null?void 0:$e.assetId),Ee=xe((m=Z==null?void 0:Z.image)==null?void 0:m.assetId),Re=xe((Y=pe==null?void 0:pe.image)==null?void 0:Y.assetId),Ce={[`--${o}-transition-ms`]:`${ue}ms`};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:r}}),a.jsxs("div",{ref:G,className:Et(`${o}-wrapper`,L&&`${o}-snap`,n&&!i&&`${o}-editor`),style:Ce,"aria-label":"Zoom gallery",children:[((te=de==null?void 0:de.image)==null?void 0:te.assetId)&&a.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:de.image.assetId,alt:"",style:{filter:ee}})}),_&&((oe=Z==null?void 0:Z.image)==null?void 0:oe.assetId)&&a.jsx("div",{className:Et(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${w}`),style:dd(Ee,$,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:Z.image.assetId,alt:"",style:{filter:R}})}),_&&((fe=pe==null?void 0:pe.image)==null?void 0:fe.assetId)&&a.jsx("div",{className:Et(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${w}`),style:dd(Re,O,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-image`,src:pe.image.assetId,alt:""})}),!_&&((N=se==null?void 0:se.image)==null?void 0:N.assetId)&&a.jsx("div",{className:Et(`${o}-stage`,`${o}-foreground`),style:$p(ve),children:a.jsx("img",{className:`${o}-image`,src:se.image.assetId,alt:se.image.name??""})}),ge&&y.length>1&&!_&&a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:Et(`${o}-nav`,`${o}-nav-prev`),onClick:()=>Le("prev"),"aria-label":`Show previous image (${ie+1} of ${y.length})`}),a.jsx("button",{type:"button",className:Et(`${o}-nav`,`${o}-nav-next`),onClick:()=>Le("next"),"aria-label":`Show next image (${me+1} of ${y.length})`})]})]})]})}const Nb=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17487
17487
  import cn from 'classnames';
17488
17488
  import { CommonComponentProps } from '../props';
17489
17489
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -18002,7 +18002,7 @@ export function Scale({ settings, content, isEditor, isPreviewMode }: ScaleProps
18002
18002
  </>
18003
18003
  );
18004
18004
  }
18005
- `,_b={type:"object",version:1,settings:{sizing:"manual",properties:{maxWidth:{type:"number",scope:"common",title:"Max width (%)",display:{type:"percentage-input"},min:10,max:100},maxHeight:{type:"number",scope:"common",title:"Max height (%)",display:{type:"percentage-input"},min:10,max:100},transition:{type:"number",scope:"common",title:"Transition (ms)",display:{type:"common-numeric-input"},min:100,max:9999},bgImage:{type:"string",scope:"common",title:"BG image",display:{type:"toggle-cycle",enum:["greyscale","blur","as is"]}}},defaults:{maxWidth:60,maxHeight:60,transition:700,bgImage:"greyscale"},layout:["__componentName__","maxWidth","maxHeight","transition","bgImage"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["maxWidth","maxHeight"]},{type:"row",title:"",items:["transition","bgImage"]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input",isObjectFitEditable:!1}}}},default:[{image:{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:""}},{image:{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:""}},{image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:""}},{image:{assetId:"01M3QM74XE20C38X4NND20C5R4",name:""}},{image:{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:""}},{image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:""}},{image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:""}}]}},Hb={element:Fb,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:_b,sourceCode:Nb,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Wb={backgroundColor:"background-color",textColor:"text-color",borderColor:"border-color",iconColor:"icon-color",boxShadowColor:"box-shadow-color",innerBoxShadowColor:"inner-box-shadow-color"},Ob=["hover","active"],vs={left:"flex-start",center:"center",right:"flex-end"};function Db(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 zb(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY<i.top+i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Bb(e){const t=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-box-shadow-color, transparent)`,n=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-inner-box-shadow-color, transparent)`,i=`${t}, ${n}`,o=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-hover-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,r=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-hover-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,l=`${o}, ${r}`,c=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-active-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,d=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-active-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,u=`${c}, ${d}`,p=`0 4px 12px rgba(0, 0, 0, 0.15), ${n}`,y=`.${e}-button:focus-visible, a:focus-visible .${e}-button`,x=`.${e}-button:hover, ${y}`,g=f=>`.${e}-hover-effect-${f}:hover, .${e}-hover-effect-${f}:focus-visible, a:focus-visible .${e}-hover-effect-${f}`;return`
18005
+ `,_b={type:"object",version:1,settings:{sizing:"manual",properties:{maxWidth:{type:"number",scope:"common",title:"Max width (%)",display:{type:"percentage-input"},min:10,max:100},maxHeight:{type:"number",scope:"common",title:"Max height (%)",display:{type:"percentage-input"},min:10,max:100},transition:{type:"number",scope:"common",title:"Transition (ms)",display:{type:"common-numeric-input"},min:100,max:9999},bgImage:{type:"string",scope:"common",title:"BG image",display:{type:"toggle-cycle",enum:["greyscale","blur","as is"]}}},defaults:{maxWidth:60,maxHeight:60,transition:700,bgImage:"greyscale"},layout:["__componentName__","maxWidth","maxHeight","transition","bgImage"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["maxWidth","maxHeight"]},{type:"row",title:"",items:["transition","bgImage"]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input",isObjectFitEditable:!1}}}},default:[{image:{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:""}},{image:{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:""}},{image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:""}},{image:{assetId:"01M3QM74XE20C38X4NND20C5R4",name:""}},{image:{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:""}},{image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:""}},{image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:""}}]}},Hb={element:Fb,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:_b,sourceCode:Nb,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Wb={backgroundColor:"background-color",textColor:"text-color",borderColor:"border-color",iconColor:"icon-color",boxShadowColor:"box-shadow-color",innerBoxShadowColor:"inner-box-shadow-color"},Ob=["hover","active"],vs={left:"flex-start",center:"center",right:"flex-end"};function Db(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 zb(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY<i.top+i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Bb(e){const t=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-box-shadow-color, transparent)`,n=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-inner-box-shadow-color, transparent)`,i=`${t}, ${n}`,o=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-hover-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,r=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-hover-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,l=`${o}, ${r}`,c=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-active-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,d=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-active-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,u=`${c}, ${d}`,p=`0 4px 12px rgba(0, 0, 0, 0.15), ${n}`,y=`.${e}-button:focus-visible, a:focus-visible .${e}-button`,x=`.${e}-button:hover, ${y}`,g=h=>`.${e}-hover-effect-${h}:hover, .${e}-hover-effect-${h}:focus-visible, a:focus-visible .${e}-hover-effect-${h}`;return`
18006
18006
  .${e}-root {
18007
18007
  line-height: 0;
18008
18008
  }
@@ -18244,7 +18244,7 @@ a:active .${e}-button .${e}-icon-image,
18244
18244
  height: calc(1em * var(--${e}-icon-scale, 1));
18245
18245
  width: calc(1em * var(--${e}-icon-scale, 1));
18246
18246
  }
18247
- `}function xs(e,t,n="",i,o){const r=t();return a.jsxs("span",{className:`${e}-content-roll-wrap ${n}`.trim(),style:i,children:[a.jsx("span",{className:`${e}-content-roll-spacer`,"aria-hidden":"true",style:o,children:r}),a.jsxs("span",{className:`${e}-content-roll-viewport`,children:[a.jsx("span",{className:`${e}-content-roll-layer`,style:o,children:t()}),a.jsx("span",{className:`${e}-content-roll-layer ${e}-content-roll-layer-hover`,"aria-hidden":"true",style:o,children:t()})]})]})}function ud(e,t,n="fill",i=100,o=0,r){if(!t)return null;const l=a.jsx(gn,{url:t,fill:`var(--${e}-icon-color)`,hoverFill:`var(--${e}-icon-color)`,className:`${e}-icon-image`});if(n==="inline")return a.jsx("span",{className:`${e}-icon ${e}-icon-inline`,style:{[`--${e}-icon-scale`]:i/100},"aria-hidden":"true",children:l});if(n==="fixed"&&o>0){const c=E.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 jb({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:r}=E.useScopedStyles(),l=s.useMemo(()=>Bb(r),[r]),{type:c="a",label:d="Button",icon:u,alignment:p="center",alignA:y,order:x="text-icon",gap:g=0,iconSize:f=0,iconWidthC:b=0,dimensions:S=!1,padding:W={top:0,right:0,bottom:0,left:0},cornerRadius:v=0,boxShadow:L={top:0,left:0,right:0,bottom:0},boxShadowColor:M="rgba(0, 0, 0, 0)",innerBoxShadow:U={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:G="rgba(0, 0, 0, 0)",stroke:B=0,blur:N=0,backgroundColor:O="#000000",textColor:C="#ffffff",borderColor:$="#ffffff",iconColor:K="#ffffff",hoverEffect:R="none",fontFamily:w,fontSettings:T,fontSize:j,lineHeight:_,letterSpacing:Q=0,wordSpacing:P=0,textAppearance:h,stateOverrides:J,minWidth:V=0,minHeight:me=0,width:k=0,height:le=0}=e,I=E.buildColorVars(r,{backgroundColor:O,textColor:C,borderColor:$,iconColor:K,boxShadowColor:M,innerBoxShadowColor:G},Wb,Ob,J),ue=i&&i!=="default"?`${r}-state-${i}`:"",ee=t&&!n?`${r}-editing`:"",xe=R!=="none"&&(!t||n||i==="hover")?`${r}-hover-effect-${R}`:"",Le=R==="reveal"||R==="swipe",ce=R==="content-roll",de=R==="reveal"&&(!t||n),Z=S===!0,oe=c==="a"?y??p:p,ge=c==="c",be=c!=="b",Re={fontSettings:{fontFamily:w,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:j??.01,lineHeight:_,letterSpacing:Q,wordSpacing:P,textAppearance:h,color:C},Te={...be?pn(nn(Re,t)):{},[`--${r}-box-shadow-x`]:E.scalingValue(L.left,t),[`--${r}-box-shadow-y`]:E.scalingValue(L.top,t),[`--${r}-box-shadow-blur`]:E.scalingValue(L.right,t),[`--${r}-box-shadow-spread`]:E.scalingValue(L.bottom,t),[`--${r}-inner-box-shadow-x`]:E.scalingValue(U.left,t),[`--${r}-inner-box-shadow-y`]:E.scalingValue(U.top,t),[`--${r}-inner-box-shadow-blur`]:E.scalingValue(U.right,t),[`--${r}-inner-box-shadow-spread`]:E.scalingValue(U.bottom,t),[`--${r}-backdrop-blur`]:N>0?`blur(${E.scalingValue(N,t)})`:void 0,paddingTop:E.scalingValue(W.top,t),paddingRight:E.scalingValue(W.right,t),paddingBottom:E.scalingValue(W.bottom,t),paddingLeft:E.scalingValue(W.left,t),borderRadius:E.scalingValue(v,t),borderWidth:E.scalingValue(B,t),...ge?{}:{justifyContent:vs[oe],textAlign:oe},...ge&&!ce?{gap:E.scalingValue(g,t)}:{},...Z?{width:E.scalingValue(k,t),height:E.scalingValue(le,t)}:{minWidth:E.scalingValue(V,t),minHeight:E.scalingValue(me,t),...ge?{width:"100%"}:{}}};let we;const m={display:"inline-flex",alignItems:"center",justifyContent:ge?vs[oe]:vs[c==="a"?oe:"center"],gap:ge?E.scalingValue(g,t):void 0,width:"100%",height:"100%",...c==="a"?{textAlign:oe}:{}};if(c==="b"){const ae=()=>ud(r,u,f>0?"fixed":"fill",100,f,t);we=ce?xs(r,ae,`${r}-icon-roll`,void 0,m):ae()}else if(c==="c"){const ae=()=>{const fe=a.jsx("span",{className:`${r}-text`,style:{textAlign:oe},children:d}),F=ud(r,u,b>0?"fixed":"fill",100,b,t);return x==="icon-text"?a.jsxs(a.Fragment,{children:[F,fe]}):a.jsxs(a.Fragment,{children:[fe,F]})};we=ce?xs(r,ae,`${r}-icon-text-roll`,void 0,m):ae()}else we=ce?xs(r,()=>d,`${r}-label-roll`,void 0,m):Le?a.jsx("span",{className:`${r}-button-inner`,children:d}):d;const Y=de?ae=>Db(ae,r):void 0,te=de?ae=>zb(ae,r):void 0;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),a.jsx("div",{className:`${r}-root`,style:I,children:a.jsx("div",{className:`${r}-wrapper ${ue} ${ee}`.trim(),children:a.jsx("div",{className:`${r}-button ${xe}`.trim(),style:Te,onMouseEnter:Y,onMouseLeave:te,role:"button",tabIndex:o||t&&!n?void 0:0,children:we})})})]})}const Vb=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
18247
+ `}function xs(e,t,n="",i,o){const r=t();return a.jsxs("span",{className:`${e}-content-roll-wrap ${n}`.trim(),style:i,children:[a.jsx("span",{className:`${e}-content-roll-spacer`,"aria-hidden":"true",style:o,children:r}),a.jsxs("span",{className:`${e}-content-roll-viewport`,children:[a.jsx("span",{className:`${e}-content-roll-layer`,style:o,children:t()}),a.jsx("span",{className:`${e}-content-roll-layer ${e}-content-roll-layer-hover`,"aria-hidden":"true",style:o,children:t()})]})]})}function ud(e,t,n="fill",i=100,o=0,r){if(!t)return null;const l=a.jsx(gn,{url:t,fill:`var(--${e}-icon-color)`,hoverFill:`var(--${e}-icon-color)`,className:`${e}-icon-image`});if(n==="inline")return a.jsx("span",{className:`${e}-icon ${e}-icon-inline`,style:{[`--${e}-icon-scale`]:i/100},"aria-hidden":"true",children:l});if(n==="fixed"&&o>0){const c=E.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 jb({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:r}=E.useScopedStyles(),l=s.useMemo(()=>Bb(r),[r]),{type:c="a",label:d="Button",icon:u,alignment:p="center",alignA:y,order:x="text-icon",gap:g=0,iconSize:h=0,iconWidthC:b=0,dimensions:S=!1,padding:_={top:0,right:0,bottom:0,left:0},cornerRadius:v=0,boxShadow:L={top:0,left:0,right:0,bottom:0},boxShadowColor:P="rgba(0, 0, 0, 0)",innerBoxShadow:q={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:X="rgba(0, 0, 0, 0)",stroke:B=0,blur:H=0,backgroundColor:O="#000000",textColor:C="#ffffff",borderColor:$="#ffffff",iconColor:Q="#ffffff",hoverEffect:R="none",fontFamily:T,fontSettings:w,fontSize:V,lineHeight:z,letterSpacing:U=0,wordSpacing:M=0,textAppearance:f,stateOverrides:K,minWidth:G=0,minHeight:ge=0,width:k=0,height:ce=0}=e,I=E.buildColorVars(r,{backgroundColor:O,textColor:C,borderColor:$,iconColor:Q,boxShadowColor:P,innerBoxShadowColor:X},Wb,Ob,K),ue=i&&i!=="default"?`${r}-state-${i}`:"",ee=t&&!n?`${r}-editing`:"",xe=R!=="none"&&(!t||n||i==="hover")?`${r}-hover-effect-${R}`:"",Le=R==="reveal"||R==="swipe",se=R==="content-roll",de=R==="reveal"&&(!t||n),Z=S===!0,ie=c==="a"?y??p:p,me=c==="c",ve=c!=="b",Ee={fontSettings:{fontFamily:T,fontWeight:(w==null?void 0:w.fontWeight)??400,fontStyle:(w==null?void 0:w.fontStyle)??"normal"},fontSize:V??.01,lineHeight:z,letterSpacing:U,wordSpacing:M,textAppearance:f,color:C},Ce={...ve?pn(nn(Ee,t)):{},[`--${r}-box-shadow-x`]:E.scalingValue(L.left,t),[`--${r}-box-shadow-y`]:E.scalingValue(L.top,t),[`--${r}-box-shadow-blur`]:E.scalingValue(L.right,t),[`--${r}-box-shadow-spread`]:E.scalingValue(L.bottom,t),[`--${r}-inner-box-shadow-x`]:E.scalingValue(q.left,t),[`--${r}-inner-box-shadow-y`]:E.scalingValue(q.top,t),[`--${r}-inner-box-shadow-blur`]:E.scalingValue(q.right,t),[`--${r}-inner-box-shadow-spread`]:E.scalingValue(q.bottom,t),[`--${r}-backdrop-blur`]:H>0?`blur(${E.scalingValue(H,t)})`:void 0,paddingTop:E.scalingValue(_.top,t),paddingRight:E.scalingValue(_.right,t),paddingBottom:E.scalingValue(_.bottom,t),paddingLeft:E.scalingValue(_.left,t),borderRadius:E.scalingValue(v,t),borderWidth:E.scalingValue(B,t),...me?{}:{justifyContent:vs[ie],textAlign:ie},...me&&!se?{gap:E.scalingValue(g,t)}:{},...Z?{width:E.scalingValue(k,t),height:E.scalingValue(ce,t)}:{minWidth:E.scalingValue(G,t),minHeight:E.scalingValue(ge,t),...me?{width:"100%"}:{}}};let $e;const m={display:"inline-flex",alignItems:"center",justifyContent:me?vs[ie]:vs[c==="a"?ie:"center"],gap:me?E.scalingValue(g,t):void 0,width:"100%",height:"100%",...c==="a"?{textAlign:ie}:{}};if(c==="b"){const oe=()=>ud(r,u,h>0?"fixed":"fill",100,h,t);$e=se?xs(r,oe,`${r}-icon-roll`,void 0,m):oe()}else if(c==="c"){const oe=()=>{const fe=a.jsx("span",{className:`${r}-text`,style:{textAlign:ie},children:d}),N=ud(r,u,b>0?"fixed":"fill",100,b,t);return x==="icon-text"?a.jsxs(a.Fragment,{children:[N,fe]}):a.jsxs(a.Fragment,{children:[fe,N]})};$e=se?xs(r,oe,`${r}-icon-text-roll`,void 0,m):oe()}else $e=se?xs(r,()=>d,`${r}-label-roll`,void 0,m):Le?a.jsx("span",{className:`${r}-button-inner`,children:d}):d;const Y=de?oe=>Db(oe,r):void 0,te=de?oe=>zb(oe,r):void 0;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),a.jsx("div",{className:`${r}-root`,style:I,children:a.jsx("div",{className:`${r}-wrapper ${ue} ${ee}`.trim(),children:a.jsx("div",{className:`${r}-button ${xe}`.trim(),style:Ce,onMouseEnter:Y,onMouseLeave:te,role:"button",tabIndex:o||t&&!n?void 0:0,children:$e})})})]})}const Vb=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
18248
18248
  import { SvgImage } from '../helpers/SvgImage/SvgImage';
18249
18249
  import { CommonComponentProps } from '../props';
18250
18250
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
@@ -19074,7 +19074,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
19074
19074
  pointer-events: auto;
19075
19075
  flex-shrink: 0;
19076
19076
  }
19077
- `}const Dn=500,Qo=650,Cn="cubic-bezier(0.22, 1, 0.36, 1)",Kb=72,Qb=50,Zb=1e4,Jb=650,eS=500;function tS(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function Cp(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=Sa(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function nS(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?Cp(i,n):null}function iS(e){return e.reduce((t,n,i)=>{var o;return(o=n.image)!=null&&o.assetId&&t.push({gridIndex:i,items:[n.image],entry:{title1:n.title??"",title2:n.subtitle??"",title3:n.caption??""}}),t},[])}function or(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function pd(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return or(e,i,n)}const oS=.03;function Tp(e){return e.width*oS}const bs={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Yr(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function gd(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function rS(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function qs(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,c=o/r;if(l>c){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const d=r*l;return{width:d,height:r,left:i.left+(o-d)/2,top:i.top}}function aS(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:qs(e,t.width,t.height)}function sS(e,t){if(Va(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.assetId,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.assetId,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.assetId,n.naturalWidth,n.naturalHeight)},n.src=e.assetId}function lS(e){const t=new Set,n=[];for(const i of e){const o=i.image;!(o!=null&&o.assetId)||t.has(o.assetId)||(t.add(o.assetId),n.push(o))}return n}function cS({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Va(t)?a.jsx("video",{src:t.assetId,preload:"auto",muted:!0,playsInline:!0},t.assetId):a.jsx("img",{src:t.assetId,alt:""},t.assetId))})}function _o(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:c}=n,d=Tp(n);return t==="left"?{left:l+d-i,top:r,width:i,height:o}:{left:l+c-d,top:r,width:i,height:o}}function Ta(e,t,n){const i=_o(e,t,n);return{...i,left:2*i.left-e.left}}function dS(e,t,n){const{left:i,width:o}=n,r=Tp(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function Ip(e,t,n,i){const o=_o(e,"left",i),r=_o(e,"right",i),l=Ta(e,"left",i),c=Ta(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:c,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:c};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function uS(e,t,n,i){const{start:o,end:r}=Ip(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function pS(e,t,n){const i=_o(e,t,n),o=Ta(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Va(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.assetId)}function gS({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:r,onTransitionEnd:l}){const c=s.useRef(null);return s.useEffect(()=>{const d=c.current;return n==null||n(d??null),()=>{d==null||d.pause(),n==null||n(null)}},[e,n]),a.jsx("div",{style:i,onTransitionEnd:l,children:a.jsx("video",{ref:c,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:r,onClick:d=>d.stopPropagation(),style:o},e)})}function Kr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Va(e)?a.jsx("video",{src:e.assetId,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.assetId,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.assetId,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.assetId,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function mS({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,canNavigate:d,lightboxEntries:u,entryIdx:p,layoutId:y,sourceRect:x,resolveCloseSourceRect:g,onClose:f,onPrev:b,onNext:S}){const W=s.useRef(null),v=s.useRef(null),L=s.useRef(null),M=s.useRef(new Map),[U,G]=s.useState(0),B=s.useRef(null),N=s.useRef(0),O=s.useRef(0),C=s.useRef("none"),$=s.useRef(!1),K=s.useRef(!1),R=s.useRef(!1),w=s.useRef(null),T=s.useRef(null),j=s.useRef(null),_=s.useRef(()=>{}),Q=s.useRef(null),P=s.useRef(null),h=s.useRef(null),J=s.useRef(!1),[V,me]=s.useState(null),[k,le]=s.useState(bs),[I,ue]=s.useState(0),[ee,xe]=s.useState("opening"),[Le,ce]=s.useState(0),[de,Z]=s.useState(0),[pe,oe]=s.useState(!1),[ge,be]=s.useState(null),[Re,Ee]=s.useState(null),[Te,we]=s.useState(null),[m,Y]=s.useState(!1),[te,ae]=s.useState(null),[fe,F]=s.useState(!1),H=s.useRef(!1),[ne,q]=s.useState(!1),[ie,z]=s.useState(!1),$e=s.useRef(n),re=s.useRef(void 0),X=t[n],Ce=X?Va(X):!1,He=de!==0||pe,Ye=!l&&(!r||!!c),De=d&&!l,ze=u.length>1,Ze=s.useCallback((D,Ie)=>t.length<=1?null:t[(D+Ie+t.length)%t.length]??null,[t]),Ue=ze?or(u,p,-1):Ze(n,-1),ye=ze?or(u,p,1):Ze(n,1),Ne=ge===-1&&He?ze&&Re!==null?or(u,Re,-1):Te!==null?Ze(Te,-1):null:null,Ve=ge===1&&He?ze&&Re!==null?or(u,Re,1):Te!==null?Ze(Te,1):null:null,Je=Ne&&Ne.assetId!==(Ue==null?void 0:Ue.assetId)?Ne:null,et=Ve&&Ve.assetId!==(ye==null?void 0:ye.assetId)?Ve:null,ot=Ue&&De?(()=>{const D=ze?pd(u,p,-1):t.length>2?Ze((n-1+t.length)%t.length,-1):null;return D&&D.assetId!==Ue.assetId?D:null})():null,lt=ye&&De?(()=>{const D=ze?pd(u,p,1):t.length>2?Ze((n+1)%t.length,1):null;return D&&D.assetId!==ye.assetId?D:null})():null,Ke=Je??ot,ht=et??lt,tt=s.useCallback((D,Ie,Be)=>{if(!D||!Ie||!Be)return;const ke=M.current,vt=ke.get(D);(vt==null?void 0:vt.width)===Ie&&(vt==null?void 0:vt.height)===Be||(ke.set(D,{width:Ie,height:Be}),G(Ct=>Ct+1))},[]),Ge=s.useCallback(D=>{if(!(D!=null&&D.assetId))return null;const Ie=M.current.get(D.assetId);return aS(v.current,Ie)},[U,I]),We=s.useCallback(()=>{if(!X)return;const D=Ge(X);if(D){me(D);return}const Ie=v.current;Ie&&me(gd(Ie))},[X,Ge]),Fe=s.useCallback(D=>{if(ze){const Ie=u.length;Ee((p+D+Ie)%Ie),we(null);return}t.length>1&&(we((n+D+t.length)%t.length),Ee(null))},[ze,u.length,p,t.length,n]),ve=s.useCallback(D=>{R.current=D,oe(D)},[]),_e=s.useCallback(()=>{w.current!==null&&(window.clearTimeout(w.current),w.current=null)},[]),Xe=s.useCallback(()=>{_e(),w.current=window.setTimeout(()=>{_e(),ve(!1)},Qo+32)},[_e,ve]),ct=s.useCallback(()=>{const D=W.current;if(!D){le({left:0,top:0,width:typeof window<"u"?window.innerWidth:bs.width,height:typeof window<"u"?window.innerHeight:bs.height});return}const Ie=D.getBoundingClientRect();le({left:Ie.left,top:Ie.top,width:Ie.width,height:Ie.height})},[]),rt=s.useCallback((D,Ie)=>{if(He){if(ne&&!pe)return`translate(${de}px, 0px)`;if(pe&&ge!==null){const Be=Ge(D);if(!Be)return;const{x:ke,y:vt}=uS(Be,Ie,ge,k);return`translate(${ke}px, ${vt}px)`}if(pe)return"translate(0px, 0px)"}},[He,ne,pe,de,ge,k,Ge]),xt=s.useCallback(()=>{const D=T.current;T.current=null,_e(),ve(!1),be(null),Ee(null),we(null),Z(0),q(!1),$.current=!1,O.current=0,C.current="none",D===-1?b():D===1&&S()},[_e,ve,b,S]),pt=s.useCallback(()=>{_e(),w.current=window.setTimeout(()=>{T.current!==null&&xt()},Qo+32)},[_e,xt]),It=s.useCallback(()=>{_e(),T.current=null,ve(!1),be(null),Ee(null),we(null),Z(0),q(!1),$.current=!1,O.current=0,C.current="none"},[_e,ve]),nt=s.useCallback(D=>{if(!(!De||!V)){if(R.current){if(T.current===D){j.current=D,xt();return}It()}_e(),Fe(D),T.current=D,be(D),ve(!0),pt()}},[De,V,xt,It,_e,Fe,ve,pt]);_.current=nt;const bt=s.useCallback(()=>{Q.current=null,J.current=!1,P.current!==null&&(window.clearInterval(P.current),P.current=null),h.current!==null&&(window.clearTimeout(h.current),h.current=null)},[]),Lt=s.useCallback(D=>{P.current!==null&&window.clearInterval(P.current);const Ie=J.current?eS:Jb;P.current=window.setInterval(()=>{_.current(D)},Ie)},[]),Ut=s.useCallback(D=>{Q.current!==D&&(bt(),Q.current=D,J.current=!1,_.current(D),Lt(D),h.current=window.setTimeout(()=>{h.current=null,Q.current===D&&(J.current=!0,Lt(D))},Zb))},[bt,Lt]),Ft=s.useCallback(()=>{const D=v.current;if(!D)return;const Ie=X==null?void 0:X.assetId,Be=Ie?M.current.get(Ie):void 0;if(Be!=null&&Be.width&&(Be!=null&&Be.height)){me(qs(D,Be.width,Be.height));return}const ke=L.current;if(ke&&Ie&&(ke.src===Ie||ke.currentSrc===Ie)){const{width:Ct,height:at}=rS(ke);if(Ct&&at){tt(Ie,Ct,at),me(qs(D,Ct,at));return}}const vt=gd(D);!vt.width||!vt.height||me(vt)},[X==null?void 0:X.assetId,tt]),Me=s.useCallback(D=>{if(L.current=D,!!D){if(D instanceof HTMLVideoElement){D.readyState>=1&&D.videoWidth>0&&Ft();return}D.complete&&D.naturalWidth>0&&Ft()}},[Ft]),Oe=s.useCallback(()=>{ct(),Ft(),ue(D=>D+1)},[ct,Ft]);s.useEffect(()=>{Oe();const D=v.current,Ie=W.current,Be=new ResizeObserver(()=>Oe());return D&&Be.observe(D),Ie&&Be.observe(Ie),window.addEventListener("resize",Oe),()=>{Be.disconnect(),window.removeEventListener("resize",Oe)}},[Oe,n,y]),s.useLayoutEffect(()=>{if(!X)return;const D=L.current;if(D){if(D instanceof HTMLImageElement&&D.complete&&D.naturalWidth>0){Ft();return}D instanceof HTMLVideoElement&&D.readyState>=1&&D.videoWidth>0&&Ft()}},[X==null?void 0:X.assetId,n,Ft]),s.useEffect(()=>{We()},[We,U]),s.useEffect(()=>{const D=new Set,Ie=[],Be=ke=>{!(ke!=null&&ke.assetId)||D.has(ke.assetId)||(D.add(ke.assetId),Ie.push(ke))};t.forEach(Be),u.forEach(ke=>ke.items.forEach(Be)),Ie.forEach(ke=>{M.current.has(ke.assetId)||sS(ke,tt)})},[t,u,tt]),s.useEffect(()=>{if(ee!=="opening"||!V)return;if(!x){xe("open");return}Y(!1);const D=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Y(!0),xe("open")})});return()=>cancelAnimationFrame(D)},[ee,V,x]),s.useEffect(()=>{if(ee!=="closing")return;const D=setTimeout(()=>f(),Dn);return()=>clearTimeout(D)},[ee,f]),s.useEffect(()=>()=>{_e()},[_e]),s.useLayoutEffect(()=>{$e.current===n&&re.current===(X==null?void 0:X.assetId)||(_e(),T.current=null,be(null),Ee(null),we(null),ce(0),Z(0),ve(!1),z(!1),q(!1),N.current=0,O.current=0,C.current="none",$.current=!1,B.current=null,K.current=!1,L.current=null,We(),$e.current=n,re.current=X==null?void 0:X.assetId)},[n,X==null?void 0:X.assetId,ve,_e,We]),s.useLayoutEffect(()=>{const D=j.current;D!==null&&(j.current=null,requestAnimationFrame(()=>{_.current(D)}))},[n,p,X==null?void 0:X.assetId]),s.useLayoutEffect(()=>{if(ee==="opening"){H.current=!1,F(!1);return}if(ee!=="open"||H.current)return;if(!Ue&&!ye){H.current=!0;return}F(!1);const D=requestAnimationFrame(()=>{requestAnimationFrame(()=>{F(!0),H.current=!0})});return()=>cancelAnimationFrame(D)},[ee,Ue==null?void 0:Ue.assetId,ye==null?void 0:ye.assetId]),s.useEffect(()=>{if(ee!=="open")return;const D=()=>{const at=Tt=>{Tt.stopPropagation(),Tt.preventDefault(),document.removeEventListener("click",at,!0)};document.addEventListener("click",at,!0)},Ie=at=>{const Tt=at<0?1:-1;_e(),Fe(Tt),T.current=Tt,be(Tt),ve(!0),pt()},Be=at=>{if(Math.abs(at)>Qb&&De){Ie(at);return}T.current=null,be(null),Ee(null),we(null),ve(!0),Z(0),Xe()},ke=at=>{if(at.touches.length!==1||R.current)return;const Tt=at.touches[0];K.current=!0,B.current={x:Tt.clientX,y:Tt.clientY},C.current="none",O.current=0,$.current=!1},vt=at=>{if(!B.current||at.touches.length!==1||R.current)return;const Tt=at.touches[0],Vt=Tt.clientX-B.current.x,Pt=Tt.clientY-B.current.y;if(C.current==="none"){if(Math.abs(Vt)<10&&Math.abs(Pt)<10)return;if(Math.abs(Vt)>Math.abs(Pt)){if(!De)return;C.current="horizontal"}else if(Pt>0){if(!Ye)return;C.current="vertical"}else return}if(C.current==="horizontal"){$.current=!0,q(!0),O.current=Vt,Z(Vt),at.preventDefault();return}C.current==="vertical"&&($.current=!0,q(!0),N.current=Pt,ce(Pt),at.preventDefault())},Ct=()=>{if(!B.current)return;const at=C.current,Tt=$.current;if(Tt&&at==="horizontal")Be(O.current),D();else if(Tt&&at==="vertical"){const Vt=N.current;if(Ye&&Vt>Kb){const Pt=window.innerHeight;N.current=Pt,z(!0),ce(Pt),xe("closing")}else N.current=0,ce(0);D()}else at==="horizontal"&&Math.abs(O.current)>0&&(Be(O.current),D());B.current=null,C.current="none",O.current=0,$.current=!1,q(!1)};return document.addEventListener("touchstart",ke,{passive:!0}),document.addEventListener("touchmove",vt,{passive:!1}),document.addEventListener("touchend",Ct),document.addEventListener("touchcancel",Ct),()=>{document.removeEventListener("touchstart",ke),document.removeEventListener("touchmove",vt),document.removeEventListener("touchend",Ct),document.removeEventListener("touchcancel",Ct)}},[ee,De,ve,Xe,_e,Ye,pt,Fe]);const St=s.useCallback(()=>{const D=(g==null?void 0:g())??x??null;D&&V&&(ae(D),Y(!0)),xe("closing")},[g,x,V]);s.useEffect(()=>{const D=ke=>{if(ke.key==="Escape"){if(r&&c||ee==="closing")return;bt(),St();return}if(ke.key!=="ArrowLeft"&&ke.key!=="ArrowRight"||ee!=="open"||!De)return;ke.preventDefault();const vt=ke.key==="ArrowLeft"?-1:1;ke.repeat&&Q.current===vt||Ut(vt)},Ie=ke=>{if(ke.key!=="ArrowLeft"&&ke.key!=="ArrowRight")return;const vt=ke.key==="ArrowLeft"?-1:1;Q.current===vt&&bt()},Be=()=>{bt()};return window.addEventListener("keydown",D),window.addEventListener("keyup",Ie),window.addEventListener("blur",Be),()=>{window.removeEventListener("keydown",D),window.removeEventListener("keyup",Ie),window.removeEventListener("blur",Be),bt()}},[ee,r,c,St,De,Ut,bt]),s.useEffect(()=>{ee!=="open"&&bt()},[ee,bt]);const Mt=()=>{ee==="closing"||l||St()},Qe=ee==="open",kt=ee==="closing",Bt=Le>0?Math.max(0,1-Le/500):1,Wt=Le>0?Math.max(.35,1-Le/500):1,At=s.useCallback(D=>{if(!(D.propertyName!=="transform"||!R.current)){if(T.current!==null){xt();return}_e(),ve(!1)}},[_e,ve,xt]),Ae=ee==="closing"?te??x:x,ft=Ae&&V&&(ee==="opening"||kt)?tS(Ae,V):void 0,gt=He&&X?rt(X,"center"):Le>0?`translateY(${Le}px)`:ft,dt=V?Yr(V,k):null,yt=!!(Ae&&V),ut=yt&&(ee==="closing"||ee==="open"&&m),it={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:gt,opacity:Le>0?Wt:yt?1:ee==="opening"||kt?0:1,transition:ne&&!pe?"none":pe?`transform ${Qo}ms ${Cn}`:ie?`transform ${Dn}ms ${Cn}, opacity ${Dn}ms ${Cn}`:ut?`transform ${Dn}ms ${Cn}`:ee==="opening"||kt?`opacity ${Dn}ms ${Cn}`:"none",pointerEvents:Ce&&Qe&&!He?"auto":"none",touchAction:Ce&&Qe?"none":void 0,zIndex:1,overflow:Ce?"hidden":void 0},Nt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Qe&&!He?"auto":"none"},$t=(D,Ie,Be="adjacent")=>{const ke=Ge(D);if(!ke)return{display:"none"};const vt=Be==="far"?Ie==="left"?"far-left":"far-right":Ie==="left"?"left-adjacent":"right-adjacent",{start:Ct}=ge!==null?Ip(ke,vt,ge,k):{start:Be==="far"?Ta(ke,Ie,k):_o(ke,Ie,k)},at=Yr(Ct,k),Tt=rt(D,vt),Vt=!He&&Be==="adjacent"&&Qe&&!fe?pS(ke,Ie,k):null,Pt=Be==="far"&&He&&ge===(Ie==="left"?-1:1),Zt=ne&&!pe?!1:pe,on=Be==="adjacent"&&Qe&&fe&&!He;return{position:"absolute",top:at.top,left:at.left,width:at.width,height:at.height,objectFit:"contain",transform:Tt??(Vt?`translate(${Vt.x}px, ${Vt.y}px)`:void 0),opacity:Be==="far"?Qe&&Pt?1:0:Qe?1:0,transition:Zt?Be==="far"?`transform ${Qo}ms ${Cn}`:`transform ${Qo}ms ${Cn}, opacity ${Dn}ms ${Cn}`:on?`transform ${Dn}ms ${Cn}`:ee==="opening"||kt?`opacity ${Dn}ms ${Cn}`:"none",pointerEvents:"none",zIndex:1}},Qt=(D,Ie)=>{const Be=Ge(D);return Be?dS(_o(Be,Ie,k),Ie,k):null},Xt=D=>Ie=>{if(!l){if(K.current){K.current=!1;return}Ie.stopPropagation(),nt(D)}},Ot=Ue?Qt(Ue,"left"):null,jt=ye?Qt(ye,"right"):null,Dt=Ot?Yr(Ot,k):null,zt=jt?Yr(jt,k):null;return a.jsxs("div",{ref:W,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:ee==="open"?"none":void 0},onClick:Mt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Qe?Bt:0,transition:ne?"none":`opacity ${Dn}ms ${Cn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:v,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:Qe?1:0,transition:ne?"none":`opacity ${Dn}ms ${Cn}`,pointerEvents:"none"},children:a.jsx(sp,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,onClose:Mt})})]}),Qe&&Ke&&a.jsx(Kr,{media:Ke,style:$t(Ke,"left","far"),onMeasure:tt,onTransitionEnd:At},`far-prev-${Ke.assetId}`),Qe&&Ue&&a.jsxs(a.Fragment,{children:[a.jsx(Kr,{media:Ue,style:$t(Ue,"left"),onMeasure:tt,onTransitionEnd:At},`prev-${Ue.assetId}`),Dt&&a.jsx("div",{style:{position:"absolute",top:Dt.top,left:Dt.left,width:Dt.width,height:Dt.height,cursor:l||ne?"default":"pointer",pointerEvents:l||ne?"none":"auto",zIndex:3},onClick:Xt(-1)})]}),Qe&&ye&&a.jsxs(a.Fragment,{children:[a.jsx(Kr,{media:ye,style:$t(ye,"right"),onMeasure:tt,onTransitionEnd:At},`next-${ye.assetId}`),zt&&a.jsx("div",{style:{position:"absolute",top:zt.top,left:zt.left,width:zt.width,height:zt.height,cursor:l||ne?"default":"pointer",pointerEvents:l||ne?"none":"auto",zIndex:3},onClick:Xt(1)})]}),Qe&&ht&&a.jsx(Kr,{media:ht,style:$t(ht,"right","far"),onMeasure:tt,onTransitionEnd:At},`far-next-${ht.assetId}`),V&&X&&(Ce?a.jsx(gS,{src:X.assetId,phase:ee,onMediaElement:Me,wrapperStyle:it,videoStyle:Nt,onLoadedMetadata:Ft,onTransitionEnd:At},`${n}-${X.assetId}`):a.jsx("img",{ref:Me,src:X.assetId,alt:X.name,onLoad:Ft,onTransitionEnd:At,style:it},`${n}-${X.assetId}`))]})}const hS=20,fS=.18;function yS(e){return`
19077
+ `}const Dn=500,Qo=650,Cn="cubic-bezier(0.22, 1, 0.36, 1)",Kb=72,Qb=50,Zb=1e4,Jb=650,eS=500;function tS(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function Cp(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=Sa(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function nS(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?Cp(i,n):null}function iS(e){return e.reduce((t,n,i)=>{var o;return(o=n.image)!=null&&o.assetId&&t.push({gridIndex:i,items:[n.image],entry:{title1:n.title??"",title2:n.subtitle??"",title3:n.caption??""}}),t},[])}function or(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function pd(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return or(e,i,n)}const oS=.03;function Tp(e){return e.width*oS}const bs={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Yr(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function gd(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function rS(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function qs(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,c=o/r;if(l>c){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const d=r*l;return{width:d,height:r,left:i.left+(o-d)/2,top:i.top}}function aS(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:qs(e,t.width,t.height)}function sS(e,t){if(Va(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.assetId,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.assetId,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.assetId,n.naturalWidth,n.naturalHeight)},n.src=e.assetId}function lS(e){const t=new Set,n=[];for(const i of e){const o=i.image;!(o!=null&&o.assetId)||t.has(o.assetId)||(t.add(o.assetId),n.push(o))}return n}function cS({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Va(t)?a.jsx("video",{src:t.assetId,preload:"auto",muted:!0,playsInline:!0},t.assetId):a.jsx("img",{src:t.assetId,alt:""},t.assetId))})}function _o(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:c}=n,d=Tp(n);return t==="left"?{left:l+d-i,top:r,width:i,height:o}:{left:l+c-d,top:r,width:i,height:o}}function Ta(e,t,n){const i=_o(e,t,n);return{...i,left:2*i.left-e.left}}function dS(e,t,n){const{left:i,width:o}=n,r=Tp(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function Ip(e,t,n,i){const o=_o(e,"left",i),r=_o(e,"right",i),l=Ta(e,"left",i),c=Ta(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:c,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:c};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function uS(e,t,n,i){const{start:o,end:r}=Ip(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function pS(e,t,n){const i=_o(e,t,n),o=Ta(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Va(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.assetId)}function gS({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:r,onTransitionEnd:l}){const c=s.useRef(null);return s.useEffect(()=>{const d=c.current;return n==null||n(d??null),()=>{d==null||d.pause(),n==null||n(null)}},[e,n]),a.jsx("div",{style:i,onTransitionEnd:l,children:a.jsx("video",{ref:c,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:r,onClick:d=>d.stopPropagation(),style:o},e)})}function Kr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Va(e)?a.jsx("video",{src:e.assetId,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.assetId,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.assetId,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.assetId,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function mS({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,canNavigate:d,lightboxEntries:u,entryIdx:p,layoutId:y,sourceRect:x,resolveCloseSourceRect:g,onClose:h,onPrev:b,onNext:S}){const _=s.useRef(null),v=s.useRef(null),L=s.useRef(null),P=s.useRef(new Map),[q,X]=s.useState(0),B=s.useRef(null),H=s.useRef(0),O=s.useRef(0),C=s.useRef("none"),$=s.useRef(!1),Q=s.useRef(!1),R=s.useRef(!1),T=s.useRef(null),w=s.useRef(null),V=s.useRef(null),z=s.useRef(()=>{}),U=s.useRef(null),M=s.useRef(null),f=s.useRef(null),K=s.useRef(!1),[G,ge]=s.useState(null),[k,ce]=s.useState(bs),[I,ue]=s.useState(0),[ee,xe]=s.useState("opening"),[Le,se]=s.useState(0),[de,Z]=s.useState(0),[pe,ie]=s.useState(!1),[me,ve]=s.useState(null),[Ee,Re]=s.useState(null),[Ce,$e]=s.useState(null),[m,Y]=s.useState(!1),[te,oe]=s.useState(null),[fe,N]=s.useState(!1),F=s.useRef(!1),[ne,re]=s.useState(!1),[J,W]=s.useState(!1),Se=s.useRef(n),le=s.useRef(void 0),j=t[n],Te=j?Va(j):!1,Fe=de!==0||pe,Ye=!l&&(!r||!!c),De=d&&!l,ze=u.length>1,Ze=s.useCallback((D,Ie)=>t.length<=1?null:t[(D+Ie+t.length)%t.length]??null,[t]),Ue=ze?or(u,p,-1):Ze(n,-1),ye=ze?or(u,p,1):Ze(n,1),_e=me===-1&&Fe?ze&&Ee!==null?or(u,Ee,-1):Ce!==null?Ze(Ce,-1):null:null,Ve=me===1&&Fe?ze&&Ee!==null?or(u,Ee,1):Ce!==null?Ze(Ce,1):null:null,Je=_e&&_e.assetId!==(Ue==null?void 0:Ue.assetId)?_e:null,et=Ve&&Ve.assetId!==(ye==null?void 0:ye.assetId)?Ve:null,ot=Ue&&De?(()=>{const D=ze?pd(u,p,-1):t.length>2?Ze((n-1+t.length)%t.length,-1):null;return D&&D.assetId!==Ue.assetId?D:null})():null,lt=ye&&De?(()=>{const D=ze?pd(u,p,1):t.length>2?Ze((n+1)%t.length,1):null;return D&&D.assetId!==ye.assetId?D:null})():null,Ke=Je??ot,ht=et??lt,tt=s.useCallback((D,Ie,Be)=>{if(!D||!Ie||!Be)return;const ke=P.current,vt=ke.get(D);(vt==null?void 0:vt.width)===Ie&&(vt==null?void 0:vt.height)===Be||(ke.set(D,{width:Ie,height:Be}),X(Ct=>Ct+1))},[]),Ge=s.useCallback(D=>{if(!(D!=null&&D.assetId))return null;const Ie=P.current.get(D.assetId);return aS(v.current,Ie)},[q,I]),We=s.useCallback(()=>{if(!j)return;const D=Ge(j);if(D){ge(D);return}const Ie=v.current;Ie&&ge(gd(Ie))},[j,Ge]),Ne=s.useCallback(D=>{if(ze){const Ie=u.length;Re((p+D+Ie)%Ie),$e(null);return}t.length>1&&($e((n+D+t.length)%t.length),Re(null))},[ze,u.length,p,t.length,n]),be=s.useCallback(D=>{R.current=D,ie(D)},[]),He=s.useCallback(()=>{T.current!==null&&(window.clearTimeout(T.current),T.current=null)},[]),Xe=s.useCallback(()=>{He(),T.current=window.setTimeout(()=>{He(),be(!1)},Qo+32)},[He,be]),ct=s.useCallback(()=>{const D=_.current;if(!D){ce({left:0,top:0,width:typeof window<"u"?window.innerWidth:bs.width,height:typeof window<"u"?window.innerHeight:bs.height});return}const Ie=D.getBoundingClientRect();ce({left:Ie.left,top:Ie.top,width:Ie.width,height:Ie.height})},[]),rt=s.useCallback((D,Ie)=>{if(Fe){if(ne&&!pe)return`translate(${de}px, 0px)`;if(pe&&me!==null){const Be=Ge(D);if(!Be)return;const{x:ke,y:vt}=uS(Be,Ie,me,k);return`translate(${ke}px, ${vt}px)`}if(pe)return"translate(0px, 0px)"}},[Fe,ne,pe,de,me,k,Ge]),xt=s.useCallback(()=>{const D=w.current;w.current=null,He(),be(!1),ve(null),Re(null),$e(null),Z(0),re(!1),$.current=!1,O.current=0,C.current="none",D===-1?b():D===1&&S()},[He,be,b,S]),pt=s.useCallback(()=>{He(),T.current=window.setTimeout(()=>{w.current!==null&&xt()},Qo+32)},[He,xt]),It=s.useCallback(()=>{He(),w.current=null,be(!1),ve(null),Re(null),$e(null),Z(0),re(!1),$.current=!1,O.current=0,C.current="none"},[He,be]),nt=s.useCallback(D=>{if(!(!De||!G)){if(R.current){if(w.current===D){V.current=D,xt();return}It()}He(),Ne(D),w.current=D,ve(D),be(!0),pt()}},[De,G,xt,It,He,Ne,be,pt]);z.current=nt;const bt=s.useCallback(()=>{U.current=null,K.current=!1,M.current!==null&&(window.clearInterval(M.current),M.current=null),f.current!==null&&(window.clearTimeout(f.current),f.current=null)},[]),Lt=s.useCallback(D=>{M.current!==null&&window.clearInterval(M.current);const Ie=K.current?eS:Jb;M.current=window.setInterval(()=>{z.current(D)},Ie)},[]),Ut=s.useCallback(D=>{U.current!==D&&(bt(),U.current=D,K.current=!1,z.current(D),Lt(D),f.current=window.setTimeout(()=>{f.current=null,U.current===D&&(K.current=!0,Lt(D))},Zb))},[bt,Lt]),Ft=s.useCallback(()=>{const D=v.current;if(!D)return;const Ie=j==null?void 0:j.assetId,Be=Ie?P.current.get(Ie):void 0;if(Be!=null&&Be.width&&(Be!=null&&Be.height)){ge(qs(D,Be.width,Be.height));return}const ke=L.current;if(ke&&Ie&&(ke.src===Ie||ke.currentSrc===Ie)){const{width:Ct,height:at}=rS(ke);if(Ct&&at){tt(Ie,Ct,at),ge(qs(D,Ct,at));return}}const vt=gd(D);!vt.width||!vt.height||ge(vt)},[j==null?void 0:j.assetId,tt]),Me=s.useCallback(D=>{if(L.current=D,!!D){if(D instanceof HTMLVideoElement){D.readyState>=1&&D.videoWidth>0&&Ft();return}D.complete&&D.naturalWidth>0&&Ft()}},[Ft]),Oe=s.useCallback(()=>{ct(),Ft(),ue(D=>D+1)},[ct,Ft]);s.useEffect(()=>{Oe();const D=v.current,Ie=_.current,Be=new ResizeObserver(()=>Oe());return D&&Be.observe(D),Ie&&Be.observe(Ie),window.addEventListener("resize",Oe),()=>{Be.disconnect(),window.removeEventListener("resize",Oe)}},[Oe,n,y]),s.useLayoutEffect(()=>{if(!j)return;const D=L.current;if(D){if(D instanceof HTMLImageElement&&D.complete&&D.naturalWidth>0){Ft();return}D instanceof HTMLVideoElement&&D.readyState>=1&&D.videoWidth>0&&Ft()}},[j==null?void 0:j.assetId,n,Ft]),s.useEffect(()=>{We()},[We,q]),s.useEffect(()=>{const D=new Set,Ie=[],Be=ke=>{!(ke!=null&&ke.assetId)||D.has(ke.assetId)||(D.add(ke.assetId),Ie.push(ke))};t.forEach(Be),u.forEach(ke=>ke.items.forEach(Be)),Ie.forEach(ke=>{P.current.has(ke.assetId)||sS(ke,tt)})},[t,u,tt]),s.useEffect(()=>{if(ee!=="opening"||!G)return;if(!x){xe("open");return}Y(!1);const D=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Y(!0),xe("open")})});return()=>cancelAnimationFrame(D)},[ee,G,x]),s.useEffect(()=>{if(ee!=="closing")return;const D=setTimeout(()=>h(),Dn);return()=>clearTimeout(D)},[ee,h]),s.useEffect(()=>()=>{He()},[He]),s.useLayoutEffect(()=>{Se.current===n&&le.current===(j==null?void 0:j.assetId)||(He(),w.current=null,ve(null),Re(null),$e(null),se(0),Z(0),be(!1),W(!1),re(!1),H.current=0,O.current=0,C.current="none",$.current=!1,B.current=null,Q.current=!1,L.current=null,We(),Se.current=n,le.current=j==null?void 0:j.assetId)},[n,j==null?void 0:j.assetId,be,He,We]),s.useLayoutEffect(()=>{const D=V.current;D!==null&&(V.current=null,requestAnimationFrame(()=>{z.current(D)}))},[n,p,j==null?void 0:j.assetId]),s.useLayoutEffect(()=>{if(ee==="opening"){F.current=!1,N(!1);return}if(ee!=="open"||F.current)return;if(!Ue&&!ye){F.current=!0;return}N(!1);const D=requestAnimationFrame(()=>{requestAnimationFrame(()=>{N(!0),F.current=!0})});return()=>cancelAnimationFrame(D)},[ee,Ue==null?void 0:Ue.assetId,ye==null?void 0:ye.assetId]),s.useEffect(()=>{if(ee!=="open")return;const D=()=>{const at=Tt=>{Tt.stopPropagation(),Tt.preventDefault(),document.removeEventListener("click",at,!0)};document.addEventListener("click",at,!0)},Ie=at=>{const Tt=at<0?1:-1;He(),Ne(Tt),w.current=Tt,ve(Tt),be(!0),pt()},Be=at=>{if(Math.abs(at)>Qb&&De){Ie(at);return}w.current=null,ve(null),Re(null),$e(null),be(!0),Z(0),Xe()},ke=at=>{if(at.touches.length!==1||R.current)return;const Tt=at.touches[0];Q.current=!0,B.current={x:Tt.clientX,y:Tt.clientY},C.current="none",O.current=0,$.current=!1},vt=at=>{if(!B.current||at.touches.length!==1||R.current)return;const Tt=at.touches[0],Vt=Tt.clientX-B.current.x,Pt=Tt.clientY-B.current.y;if(C.current==="none"){if(Math.abs(Vt)<10&&Math.abs(Pt)<10)return;if(Math.abs(Vt)>Math.abs(Pt)){if(!De)return;C.current="horizontal"}else if(Pt>0){if(!Ye)return;C.current="vertical"}else return}if(C.current==="horizontal"){$.current=!0,re(!0),O.current=Vt,Z(Vt),at.preventDefault();return}C.current==="vertical"&&($.current=!0,re(!0),H.current=Pt,se(Pt),at.preventDefault())},Ct=()=>{if(!B.current)return;const at=C.current,Tt=$.current;if(Tt&&at==="horizontal")Be(O.current),D();else if(Tt&&at==="vertical"){const Vt=H.current;if(Ye&&Vt>Kb){const Pt=window.innerHeight;H.current=Pt,W(!0),se(Pt),xe("closing")}else H.current=0,se(0);D()}else at==="horizontal"&&Math.abs(O.current)>0&&(Be(O.current),D());B.current=null,C.current="none",O.current=0,$.current=!1,re(!1)};return document.addEventListener("touchstart",ke,{passive:!0}),document.addEventListener("touchmove",vt,{passive:!1}),document.addEventListener("touchend",Ct),document.addEventListener("touchcancel",Ct),()=>{document.removeEventListener("touchstart",ke),document.removeEventListener("touchmove",vt),document.removeEventListener("touchend",Ct),document.removeEventListener("touchcancel",Ct)}},[ee,De,be,Xe,He,Ye,pt,Ne]);const St=s.useCallback(()=>{const D=(g==null?void 0:g())??x??null;D&&G&&(oe(D),Y(!0)),xe("closing")},[g,x,G]);s.useEffect(()=>{const D=ke=>{if(ke.key==="Escape"){if(r&&c||ee==="closing")return;bt(),St();return}if(ke.key!=="ArrowLeft"&&ke.key!=="ArrowRight"||ee!=="open"||!De)return;ke.preventDefault();const vt=ke.key==="ArrowLeft"?-1:1;ke.repeat&&U.current===vt||Ut(vt)},Ie=ke=>{if(ke.key!=="ArrowLeft"&&ke.key!=="ArrowRight")return;const vt=ke.key==="ArrowLeft"?-1:1;U.current===vt&&bt()},Be=()=>{bt()};return window.addEventListener("keydown",D),window.addEventListener("keyup",Ie),window.addEventListener("blur",Be),()=>{window.removeEventListener("keydown",D),window.removeEventListener("keyup",Ie),window.removeEventListener("blur",Be),bt()}},[ee,r,c,St,De,Ut,bt]),s.useEffect(()=>{ee!=="open"&&bt()},[ee,bt]);const Mt=()=>{ee==="closing"||l||St()},Qe=ee==="open",kt=ee==="closing",Bt=Le>0?Math.max(0,1-Le/500):1,Wt=Le>0?Math.max(.35,1-Le/500):1,At=s.useCallback(D=>{if(!(D.propertyName!=="transform"||!R.current)){if(w.current!==null){xt();return}He(),be(!1)}},[He,be,xt]),Ae=ee==="closing"?te??x:x,ft=Ae&&G&&(ee==="opening"||kt)?tS(Ae,G):void 0,gt=Fe&&j?rt(j,"center"):Le>0?`translateY(${Le}px)`:ft,dt=G?Yr(G,k):null,yt=!!(Ae&&G),ut=yt&&(ee==="closing"||ee==="open"&&m),it={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:gt,opacity:Le>0?Wt:yt?1:ee==="opening"||kt?0:1,transition:ne&&!pe?"none":pe?`transform ${Qo}ms ${Cn}`:J?`transform ${Dn}ms ${Cn}, opacity ${Dn}ms ${Cn}`:ut?`transform ${Dn}ms ${Cn}`:ee==="opening"||kt?`opacity ${Dn}ms ${Cn}`:"none",pointerEvents:Te&&Qe&&!Fe?"auto":"none",touchAction:Te&&Qe?"none":void 0,zIndex:1,overflow:Te?"hidden":void 0},Nt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Qe&&!Fe?"auto":"none"},$t=(D,Ie,Be="adjacent")=>{const ke=Ge(D);if(!ke)return{display:"none"};const vt=Be==="far"?Ie==="left"?"far-left":"far-right":Ie==="left"?"left-adjacent":"right-adjacent",{start:Ct}=me!==null?Ip(ke,vt,me,k):{start:Be==="far"?Ta(ke,Ie,k):_o(ke,Ie,k)},at=Yr(Ct,k),Tt=rt(D,vt),Vt=!Fe&&Be==="adjacent"&&Qe&&!fe?pS(ke,Ie,k):null,Pt=Be==="far"&&Fe&&me===(Ie==="left"?-1:1),Zt=ne&&!pe?!1:pe,on=Be==="adjacent"&&Qe&&fe&&!Fe;return{position:"absolute",top:at.top,left:at.left,width:at.width,height:at.height,objectFit:"contain",transform:Tt??(Vt?`translate(${Vt.x}px, ${Vt.y}px)`:void 0),opacity:Be==="far"?Qe&&Pt?1:0:Qe?1:0,transition:Zt?Be==="far"?`transform ${Qo}ms ${Cn}`:`transform ${Qo}ms ${Cn}, opacity ${Dn}ms ${Cn}`:on?`transform ${Dn}ms ${Cn}`:ee==="opening"||kt?`opacity ${Dn}ms ${Cn}`:"none",pointerEvents:"none",zIndex:1}},Qt=(D,Ie)=>{const Be=Ge(D);return Be?dS(_o(Be,Ie,k),Ie,k):null},Xt=D=>Ie=>{if(!l){if(Q.current){Q.current=!1;return}Ie.stopPropagation(),nt(D)}},Ot=Ue?Qt(Ue,"left"):null,jt=ye?Qt(ye,"right"):null,Dt=Ot?Yr(Ot,k):null,zt=jt?Yr(jt,k):null;return a.jsxs("div",{ref:_,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:ee==="open"?"none":void 0},onClick:Mt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Qe?Bt:0,transition:ne?"none":`opacity ${Dn}ms ${Cn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:v,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:Qe?1:0,transition:ne?"none":`opacity ${Dn}ms ${Cn}`,pointerEvents:"none"},children:a.jsx(sp,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,onClose:Mt})})]}),Qe&&Ke&&a.jsx(Kr,{media:Ke,style:$t(Ke,"left","far"),onMeasure:tt,onTransitionEnd:At},`far-prev-${Ke.assetId}`),Qe&&Ue&&a.jsxs(a.Fragment,{children:[a.jsx(Kr,{media:Ue,style:$t(Ue,"left"),onMeasure:tt,onTransitionEnd:At},`prev-${Ue.assetId}`),Dt&&a.jsx("div",{style:{position:"absolute",top:Dt.top,left:Dt.left,width:Dt.width,height:Dt.height,cursor:l||ne?"default":"pointer",pointerEvents:l||ne?"none":"auto",zIndex:3},onClick:Xt(-1)})]}),Qe&&ye&&a.jsxs(a.Fragment,{children:[a.jsx(Kr,{media:ye,style:$t(ye,"right"),onMeasure:tt,onTransitionEnd:At},`next-${ye.assetId}`),zt&&a.jsx("div",{style:{position:"absolute",top:zt.top,left:zt.left,width:zt.width,height:zt.height,cursor:l||ne?"default":"pointer",pointerEvents:l||ne?"none":"auto",zIndex:3},onClick:Xt(1)})]}),Qe&&ht&&a.jsx(Kr,{media:ht,style:$t(ht,"right","far"),onMeasure:tt,onTransitionEnd:At},`far-next-${ht.assetId}`),G&&j&&(Te?a.jsx(gS,{src:j.assetId,phase:ee,onMediaElement:Me,wrapperStyle:it,videoStyle:Nt,onLoadedMetadata:Ft,onTransitionEnd:At},`${n}-${j.assetId}`):a.jsx("img",{ref:Me,src:j.assetId,alt:j.name,onLoad:Ft,onTransitionEnd:At,style:it},`${n}-${j.assetId}`))]})}const hS=20,fS=.18;function yS(e){return`
19078
19078
  .${e}-wrapper {
19079
19079
  box-sizing: border-box;
19080
19080
  max-width: 100%;
@@ -19162,7 +19162,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
19162
19162
  pointer-events: auto;
19163
19163
  }
19164
19164
  ${Yb(e)}
19165
- `}function vS(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 xS(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 bS(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:E.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:E.scalingValue(i*fS,n??!1),[`--${t}-image-aspect`]:vS(e)}}function SS(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.07,lineHeight:e==null?void 0:e.titleLineHeight,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,color:(e==null?void 0:e.titleColor)??"#000000"};return nn(n,t)}function wS(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 $S(e,t,n,i,o,r){if(!(!e||!t))return l=>{var d;const c=((d=l.currentTarget.closest(`.${i}-item`))==null?void 0:d.querySelector(`[data-waterfall-index="${n}"]`))??(l.currentTarget instanceof HTMLImageElement||l.currentTarget instanceof HTMLVideoElement?l.currentTarget:null);r(n,c?Cp(c,o):void 0)}}function CS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:c}=E.useScopedStyles(),d=s.useMemo(()=>yS(c),[c]),u=t??[],p=(e==null?void 0:e.type)??"a",y=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,x=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,g=E.scalingValue(x,n??!1),f=`max(${g}, ${hS}px)`,{objectFitMode:b,imageStyle:S}=wS(e),W=SS(e,n),v=s.useRef(null),[L,M]=s.useState(!1),[U,G]=s.useState([]),[B,N]=s.useState(0),[O,C]=s.useState(0),[$,K]=s.useState(null),[R,w]=s.useState({title1:"",title2:"",title3:""}),T=(!n||i)&&!L,j=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},_=j.sizeType??"none",Q=T&&_!=="none"?`${c}-item-image-hover-${_}`:void 0,P=(j.value??120)/100,h=s.useCallback(de=>{!de||_!=="scale"||(de.style.transformOrigin=ff(de))},[_]),J=s.useCallback(de=>{if(de){if(b==="contain"){const Z=xS(de);if(Z){const pe=de.closest(`.${c}-item-image`);pe instanceof HTMLElement&&pe.style.setProperty(`--${c}-item-media-aspect`,String(Z))}}h(de)}},[c,h,b]),V={width:E.scalingValue(y,n??!1),...W,...bS(e,c,n),[`--${c}-image-hover-scale`]:String(P)},me=(()=>{const de={},Z=v.current?getComputedStyle(v.current).getPropertyValue("--cntrl-article-width").trim():"";return Z&&(de["--cntrl-article-width"]=Z),de})(),k=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),le=s.useMemo(()=>iS(u),[u]),I=s.useMemo(()=>lS(u),[u]),ue=(de,Z)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const pe=le.findIndex(ge=>ge.gridIndex===de);if(pe<0)return;const oe=le[pe];C(pe),G(oe.items),N(0),w(oe.entry),K(Z??null),M(!0)},ee=s.useCallback(()=>{M(!1),K(null)},[]),xe=s.useCallback(()=>{const de=le[O];return!de||!v.current?$:nS(v.current,de.gridIndex,b)??$},[le,O,$,b]),Le=s.useCallback(de=>{if(le.length>1){const Z=le.length,pe=(O+de+Z)%Z,oe=le[pe];C(pe),G(oe.items),N(0),w(oe.entry);return}N(Z=>(Z+de+U.length)%U.length)},[le,O,U.length]),ce=le.length>1||U.length>1;return s.useEffect(()=>{if(!L||typeof document>"u")return;const de=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=de}},[L]),s.useEffect(()=>{!n||o||i||M(!1)},[n,o,i]),s.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&M(!1)},[e==null?void 0:e.lightbox]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),a.jsx(cS,{mediaList:I}),a.jsx("div",{ref:v,className:`${c}-wrapper ${c}-type-${p}`,style:V,children:u.map((de,Z)=>{var ge,be;const pe=!!((ge=de.image)!=null&&ge.assetId),oe=$S(!!k,pe,Z,c,b,ue);return a.jsxs("div",{className:`${c}-item`,children:[de.title?a.jsx("span",{className:`${c}-item-title`,onClick:oe,style:oe?{cursor:"pointer"}:void 0,children:de.title}):null,(be=de.image)!=null&&be.assetId?a.jsx("span",{className:[`${c}-item-image`,b==="contain"?`${c}-item-image-fit`:void 0,Q].filter(Boolean).join(" "),children:de.image.type==="video"?a.jsx("video",{ref:J,src:de.image.assetId,"data-waterfall-index":Z,style:S,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:oe,onLoadedData:Re=>J(Re.currentTarget)}):a.jsx("img",{ref:J,src:de.image.assetId,alt:de.image.name??"","data-waterfall-index":Z,style:S,onClick:oe,onLoad:Re=>J(Re.currentTarget)})}):null,Z<u.length-1&&a.jsx("div",{className:`${c}-item-gap-host`,style:{width:g},children:o&&!L&&a.jsx("div",{"data-controls":"horizontalGap","data-controls-axis":"x","data-controls-min":"0",className:`${c}-item-gap-control`,style:{left:"50%",transform:"translateX(-50%)",width:f,height:"100%"}})})]},Z)})}),L&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const de=(l?document.getElementById(l):null)??document.body;return qn.createPortal(a.jsx("div",{style:me,"data-selection":"none",children:a.jsx(mS,{prefix:c,items:U,index:B,entry:R,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:ce,lightboxEntries:le,entryIdx:O,layoutId:r,sourceRect:$,resolveCloseSourceRect:xe,onClose:ee,onPrev:()=>Le(-1),onNext:()=>Le(1)})}),de)})()]})}const TS=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
19165
+ `}function vS(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 xS(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 bS(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:E.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:E.scalingValue(i*fS,n??!1),[`--${t}-image-aspect`]:vS(e)}}function SS(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.07,lineHeight:e==null?void 0:e.titleLineHeight,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,color:(e==null?void 0:e.titleColor)??"#000000"};return nn(n,t)}function wS(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 $S(e,t,n,i,o,r){if(!(!e||!t))return l=>{var d;const c=((d=l.currentTarget.closest(`.${i}-item`))==null?void 0:d.querySelector(`[data-waterfall-index="${n}"]`))??(l.currentTarget instanceof HTMLImageElement||l.currentTarget instanceof HTMLVideoElement?l.currentTarget:null);r(n,c?Cp(c,o):void 0)}}function CS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:c}=E.useScopedStyles(),d=s.useMemo(()=>yS(c),[c]),u=t??[],p=(e==null?void 0:e.type)??"a",y=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,x=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,g=E.scalingValue(x,n??!1),h=`max(${g}, ${hS}px)`,{objectFitMode:b,imageStyle:S}=wS(e),_=SS(e,n),v=s.useRef(null),[L,P]=s.useState(!1),[q,X]=s.useState([]),[B,H]=s.useState(0),[O,C]=s.useState(0),[$,Q]=s.useState(null),[R,T]=s.useState({title1:"",title2:"",title3:""}),w=(!n||i)&&!L,V=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},z=V.sizeType??"none",U=w&&z!=="none"?`${c}-item-image-hover-${z}`:void 0,M=(V.value??120)/100,f=s.useCallback(de=>{!de||z!=="scale"||(de.style.transformOrigin=ff(de))},[z]),K=s.useCallback(de=>{if(de){if(b==="contain"){const Z=xS(de);if(Z){const pe=de.closest(`.${c}-item-image`);pe instanceof HTMLElement&&pe.style.setProperty(`--${c}-item-media-aspect`,String(Z))}}f(de)}},[c,f,b]),G={width:E.scalingValue(y,n??!1),..._,...bS(e,c,n),[`--${c}-image-hover-scale`]:String(M)},ge=(()=>{const de={},Z=v.current?getComputedStyle(v.current).getPropertyValue("--cntrl-article-width").trim():"";return Z&&(de["--cntrl-article-width"]=Z),de})(),k=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),ce=s.useMemo(()=>iS(u),[u]),I=s.useMemo(()=>lS(u),[u]),ue=(de,Z)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const pe=ce.findIndex(me=>me.gridIndex===de);if(pe<0)return;const ie=ce[pe];C(pe),X(ie.items),H(0),T(ie.entry),Q(Z??null),P(!0)},ee=s.useCallback(()=>{P(!1),Q(null)},[]),xe=s.useCallback(()=>{const de=ce[O];return!de||!v.current?$:nS(v.current,de.gridIndex,b)??$},[ce,O,$,b]),Le=s.useCallback(de=>{if(ce.length>1){const Z=ce.length,pe=(O+de+Z)%Z,ie=ce[pe];C(pe),X(ie.items),H(0),T(ie.entry);return}H(Z=>(Z+de+q.length)%q.length)},[ce,O,q.length]),se=ce.length>1||q.length>1;return s.useEffect(()=>{if(!L||typeof document>"u")return;const de=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=de}},[L]),s.useEffect(()=>{!n||o||i||P(!1)},[n,o,i]),s.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&P(!1)},[e==null?void 0:e.lightbox]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),a.jsx(cS,{mediaList:I}),a.jsx("div",{ref:v,className:`${c}-wrapper ${c}-type-${p}`,style:G,children:u.map((de,Z)=>{var me,ve;const pe=!!((me=de.image)!=null&&me.assetId),ie=$S(!!k,pe,Z,c,b,ue);return a.jsxs("div",{className:`${c}-item`,children:[de.title?a.jsx("span",{className:`${c}-item-title`,onClick:ie,style:ie?{cursor:"pointer"}:void 0,children:de.title}):null,(ve=de.image)!=null&&ve.assetId?a.jsx("span",{className:[`${c}-item-image`,b==="contain"?`${c}-item-image-fit`:void 0,U].filter(Boolean).join(" "),children:de.image.type==="video"?a.jsx("video",{ref:K,src:de.image.assetId,"data-waterfall-index":Z,style:S,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:ie,onLoadedData:Ee=>K(Ee.currentTarget)}):a.jsx("img",{ref:K,src:de.image.assetId,alt:de.image.name??"","data-waterfall-index":Z,style:S,onClick:ie,onLoad:Ee=>K(Ee.currentTarget)})}):null,Z<u.length-1&&a.jsx("div",{className:`${c}-item-gap-host`,style:{width:g},children:o&&!L&&a.jsx("div",{"data-controls":"horizontalGap","data-controls-axis":"x","data-controls-min":"0",className:`${c}-item-gap-control`,style:{left:"50%",transform:"translateX(-50%)",width:h,height:"100%"}})})]},Z)})}),L&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const de=(l?document.getElementById(l):null)??document.body;return qn.createPortal(a.jsx("div",{style:ge,"data-selection":"none",children:a.jsx(mS,{prefix:c,items:q,index:B,entry:R,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:se,lightboxEntries:ce,entryIdx:O,layoutId:r,sourceRect:$,resolveCloseSourceRect:xe,onClose:ee,onPrev:()=>Le(-1),onNext:()=>Le(1)})}),de)})()]})}const TS=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
19166
19166
  import type React from 'react';
19167
19167
  import { createPortal } from 'react-dom';
19168
19168
  import { CommonComponentProps } from '../props';
@@ -19947,7 +19947,7 @@ export function Waterfall({
19947
19947
  from { clip-path: inset(100% 0 0 0); }
19948
19948
  to { clip-path: inset(0 0 0 0); }
19949
19949
  }
19950
- `}function US({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o}){const{prefix:r}=E.useScopedStyles(),l=zS(e,n),c=t??[],d=c.length,u=(e==null?void 0:e.trigger)??hd,p=u.sizeType??"drag",y=u.value??hd.value,x=(e==null?void 0:e.direction)??"horizontal",g=(e==null?void 0:e.transition)??"slide",f=(e==null?void 0:e.nav)??"classic",b=(e==null?void 0:e.navSize)??"m",S=OS[b],W=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,v=ye=>E.scalingValue(ye*W,n),L=(e==null?void 0:e.show)??"always",M=(e==null?void 0:e.controls)??null,U=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,G=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,B=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,N=(e==null?void 0:e.controlsColor)??md.color,O=(e==null?void 0:e.controlsHoverColor)??md.hover,C=(e==null?void 0:e.navColor)??Zo.colors.inactive,$=(e==null?void 0:e.navPaginationColor)??Zo.colors.pagination,K=(e==null?void 0:e.navBackgroundColor)??Zo.colors.background,R=(e==null?void 0:e.linkColor)??ws.linkColor,w=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,T=x==="horizontal",j=p==="click",_=p==="drag",Q=p==="auto"&&(!n||!!i),P=!n,h=g==="slide",J=f==="classic",V=L!=="never"&&U>0,me=L==="on hover",k=E.scalingValue(U,n),le={width:k,height:k,maxWidth:k},I=h&&d>1,[ue,ee]=s.useState(0),[xe,Le]=s.useState(I?1:0),[ce,de]=s.useState(!1),[Z,pe]=s.useState(!1),[oe,ge]=s.useState(!1),[be,Re]=s.useState(0),[Ee,Te]=s.useState(!1),[we,m]=s.useState(!1),Y=s.useRef(!1),te=s.useRef(xe);te.current=xe;const ae=s.useRef(null),fe=s.useRef(0),F=s.useRef(null),H=s.useRef(null),ne=s.useRef(null),q=s.useRef(null),ie=s.useCallback(ye=>{Y.current=ye,de(ye)},[]),z=s.useCallback(ye=>{if(d<2||ye===0)return;const Ne=ye>0?1:-1,Ve=Math.abs(ye);if(Te(!0),ie(!0),!h){ee(ht=>rr(ht+ye,d));return}let Je=te.current;const et=I&&(Je===0||Je===d+1),ot=et?ue+1:null;et&&(Je=ue+1);let lt=Ve;for(;lt>0;){const ht=BS(Je,Ne,d,I);if(Je=ht.position,lt-=1,ht.hitBoundary){fe.current=lt*Ne;break}}const Ke=Ve-lt;if(Ke>0&&ee(ht=>rr(ht+Ke*Ne,d)),te.current=Je,ot!==null){if(te.current=ot,Je===ot){pe(!0),Le(Je);return}ae.current=Je,pe(!0),Le(ot);return}pe(!1),Le(Je)},[ue,d,I,h,ie]),$e=s.useCallback(ye=>{z(ye)},[z]),re=s.useCallback(ye=>{if(d<2)return;const Ne=rr(ye,d);if(!(Ne===ue&&!Y.current)&&(Te(!0),ie(!0),ee(Ne),h)){const Ve=Ne+(I?1:0);ae.current=null,fe.current=0,te.current=Ve,pe(!1),Le(Ve)}},[ue,d,I,h,ie]);s.useEffect(()=>{if(!ce)return;const ye=window.setTimeout(()=>{if(I&&(xe===0||xe===d+1)){ae.current=null,pe(!0),Le(ue+1);return}ie(!1)},$o);return()=>window.clearTimeout(ye)},[ue,d,I,ce,ie,xe]),s.useEffect(()=>{if(!Z)return;let ye=0;const Ne=requestAnimationFrame(()=>{ye=requestAnimationFrame(()=>{const Ve=ae.current;ae.current=null;const Je=fe.current;if(fe.current=0,pe(!1),Ve!==null){te.current=Ve,Le(Ve);return}if(Je!==0){z(Je);return}ie(!1)})});return()=>{cancelAnimationFrame(Ne),cancelAnimationFrame(ye)}},[z,ie,Z]);const X=`${I}:${d}`,Ce=s.useRef(X);s.useEffect(()=>{if(Ce.current===X)return;Ce.current=X;const ye=d>0?Math.min(ue,d-1):0;ne.current=null,q.current=null,ge(!1),Re(0),ee(ye),pe(!0),Le(ye+(I?1:0))},[ue,d,I,X]),s.useEffect(()=>{if(!Ee)return;const ye=window.setTimeout(()=>Te(!1),FS);return()=>window.clearTimeout(ye)},[Ee,ue]),s.useEffect(()=>{if(!Q||d<2)return;const ye=Math.max(y,.1)*1e3,Ne=window.setInterval(()=>{P&&we||$e(1)},ye);return()=>window.clearInterval(Ne)},[y,d,$e,Q,we,P]);const He=s.useCallback(ye=>{const Ne=ne.current;if(!Ne||Ne.pointerId!==ye.pointerId)return;ne.current=null,q.current=null;const Ve=F.current;if(Ve!=null&&Ve.hasPointerCapture(ye.pointerId)&&Ve.releasePointerCapture(ye.pointerId),!Ne.isActive){h&&Re(0);return}const et=!(ye.timeStamp-Ne.lastTime>WS)&&Math.abs(Ne.velocity)>HS,ot=Ne.size>0&&Math.abs(Ne.offset-Ne.baseOffset)>Ne.size*_S;if(ge(!1),!et&&!ot){Re(0);return}const lt=ot?Ne.offset-Ne.baseOffset:Ne.velocity;let Ke=1;ot&&Ne.size>0&&(Ke=Math.max(1,Math.round(Math.abs(lt)/Ne.size))),Re(0),z(lt<0?Ke:-Ke)},[z,h]);s.useEffect(()=>{const ye=Ne=>{q.current===null||Ne.pointerId!==q.current||He(Ne)};return window.addEventListener("pointerup",ye),window.addEventListener("pointercancel",ye),()=>{window.removeEventListener("pointerup",ye),window.removeEventListener("pointercancel",ye)}},[He]);const Ye=ye=>{const Ne=F.current;if(!_||d<2||!Ne||ye.pointerType==="mouse"&&ye.button!==0)return;ae.current=null,fe.current=0,Y.current&&ie(!1);let Ve=0;const Je=H.current;if(h&&Je){const et=T?Je.offsetWidth:Je.offsetHeight;if(et>0){const ot=jS(Je,T);let lt=te.current;I&&(lt===0||lt===d+1)?(lt=ue+1,te.current=lt,pe(!0),Le(lt),Ve=0):Ve=ot+lt*et,Re(Ve)}}Ne.setPointerCapture(ye.pointerId),q.current=ye.pointerId,ne.current={pointerId:ye.pointerId,startClientX:ye.clientX,startClientY:ye.clientY,axes:VS(Ne,`${r}-axis-probe`),size:T?Ne.offsetWidth:Ne.offsetHeight,isActive:!1,baseOffset:Ve,offset:Ve,lastTime:ye.timeStamp,velocity:0}},De=ye=>{const Ne=ne.current;if(!Ne||Ne.pointerId!==ye.pointerId)return;if(ye.pointerType==="mouse"&&ye.buttons===0){He(ye);return}const Ve=ye.clientX-Ne.startClientX,Je=ye.clientY-Ne.startClientY,et=Ne.axes?GS(Ne.axes,Ve,Je):{x:Ve,y:Je},ot=T?et.x:et.y,lt=T?et.y:et.x,Ke=Ne.baseOffset+ot;if(!Ne.isActive){if(Math.max(Math.abs(ot),Math.abs(lt))<NS)return;if(Math.abs(lt)>Math.abs(ot)){const tt=F.current;tt!=null&&tt.hasPointerCapture(Ne.pointerId)&&tt.releasePointerCapture(Ne.pointerId),ne.current=null,q.current=null,h&&Re(0);return}Ne.isActive=!0,ge(!0)}const ht=ye.timeStamp-Ne.lastTime;ht>0&&(Ne.velocity=(Ke-Ne.offset)/ht,Ne.lastTime=ye.timeStamp),Ne.offset=Ke,h&&Re(Ke)},ze=ye=>{He(ye)},Ze=T?`translate3d(calc(${-xe*100}% + ${be}px), 0, 0)`:`translate3d(0, calc(${-xe*100}% + ${be}px), 0)`,Ue=I?[c[d-1],...c,c[0]]:c;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:XS(r,n)}}),a.jsxs("div",{className:Et(`${r}-wrapper`,{[`${r}-transition-reveal`]:g==="reveal",[`${r}-transition-reveal-vertical`]:g==="reveal"&&!T}),onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),children:[a.jsxs("div",{className:`${r}-slider-inner`,style:{backgroundColor:"transparent"},children:[a.jsxs("div",{ref:F,className:Et(`${r}-track`,{[`${r}-track-draggable`]:_,[`${r}-track-draggable-vertical`]:_&&!T}),onPointerDown:Ye,onPointerMove:De,onPointerUp:ze,onPointerCancel:ze,onLostPointerCapture:ye=>{q.current===ye.pointerId&&He(ye)},children:[a.jsx("div",{ref:H,className:Et(`${r}-list`,{[`${r}-list-slide`]:h,[`${r}-list-slide-vertical`]:h&&!T,[`${r}-list-fade`]:!h}),style:h?{transform:Ze,transition:oe||Z?"none":`transform ${$o}ms ${Lp}`}:void 0,children:Ue.map((ye,Ne)=>{const Ve=I?rr(Ne-1,d):Ne,et=I&&(Ne===0||Ne===d+1)?`clone-${Ne===0?"start":"end"}`:`slide-${Ve}`;return a.jsx("div",{className:Et(`${r}-slide`,{[`${r}-is-active`]:!h&&Ve===ue}),children:a.jsx("div",{className:`${r}-slider-item`,children:a.jsx("div",{className:`${r}-img-wrapper`,children:a.jsx("img",{className:Et(`${r}-slider-image`,{[`${r}-contain`]:ye.image.objectFit==="contain",[`${r}-cover`]:ye.image.objectFit==="cover"}),src:ye.image.assetId,alt:ye.image.name??"",draggable:!1})})})},et)})}),j&&a.jsx("div",{className:`${r}-click-overlay`,onClick:()=>$e(1)})]}),V&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Et(`${r}-arrow`,{[`${r}-arrow-prev`]:T,[`${r}-arrow-prev-vertical`]:!T,[`${r}-hover-arrow`]:me}),style:{color:N,"--arrow-hover-color":O,...le},children:a.jsxs("button",{onClick:ye=>{ye.stopPropagation(),$e(-1)},className:`${r}-arrow-inner`,style:{transform:`translate(${E.scalingValue(G,n)}, ${E.scalingValue(B*(T?1:-1),n)}) rotate(${T?"0deg":"90deg"})`},children:[M&&a.jsx(gn,{url:M,fill:N,hoverFill:O,className:Et(`${r}-arrow-img`,`${r}-mirror`),style:le}),!M&&a.jsx(fd,{color:N,className:Et(`${r}-arrow-icon`,`${r}-arrow-img`,`${r}-mirror`)})]})}),a.jsx("div",{className:Et(`${r}-arrow`,{[`${r}-arrow-next`]:T,[`${r}-arrow-next-vertical`]:!T,[`${r}-hover-arrow`]:me}),style:{color:N,"--arrow-hover-color":O,...le},children:a.jsxs("button",{className:`${r}-arrow-inner`,onClick:ye=>{ye.stopPropagation(),$e(1)},style:{transform:`translate(${E.scalingValue(G*(T?-1:1),n)}, ${E.scalingValue(B,n)}) rotate(${T?"0deg":"90deg"})`},children:[M&&a.jsx(gn,{url:M,fill:N,hoverFill:O,className:`${r}-arrow-img`,style:le}),!M&&a.jsx(fd,{color:N,className:Et(`${r}-arrow-icon`,`${r}-arrow-img`)})]})})]}),J&&a.jsx("div",{className:Et(`${r}-pagination`,{[`${r}-pagination-inside-bottom`]:T,[`${r}-pagination-inside-left`]:!T}),style:T?{bottom:v(S.inset)}:{left:v(S.inset)},children:a.jsx("div",{className:Et(`${r}-pagination-inner`,{[`${r}-pagination-vertical`]:!T,[`${r}-animate-dots`]:Ee}),style:{backgroundColor:K,gap:v(S.gapInactive-S.activeDot+S.dot),...T?{height:v(S.activeDot+S.paddingY*2),paddingTop:v(S.paddingY),paddingBottom:v(S.paddingY),paddingLeft:v(S.paddingActive),paddingRight:v(S.paddingActive)}:{width:v(S.activeDot+S.paddingY*2),paddingLeft:v(S.paddingY),paddingRight:v(S.paddingY),paddingTop:v(S.paddingActive),paddingBottom:v(S.paddingActive)},borderRadius:v(S.borderRadius),transform:`translate(${E.scalingValue(Zo.offset.x,n)}, ${E.scalingValue(Zo.offset.y,n)})`},children:c.map((ye,Ne)=>{const Ve=Ne===ue,Je=Ve?S.activeDot:S.dot;return a.jsx("button",{onClick:()=>re(Ne),className:`${r}-pagination-item`,style:{width:v(S.activeDot)},children:a.jsx("div",{className:`${r}-dot`,style:{backgroundColor:Ve?$:C,width:v(Je)}})},Ne)})},`${b}-${x}`)})]}),a.jsxs("div",{className:`${r}-caption-block`,children:[a.jsx("div",{"data-controls":o?"captionMarginTop":void 0,className:o?`${r}-control`:void 0,style:{height:E.scalingValue(w,n)}}),a.jsx("div",{className:`${r}-caption-text-wrapper`,children:c.map((ye,Ne)=>a.jsx("div",{className:Et(`${r}-caption-text`,{[`${r}-with-pointer-events`]:Ne===ue&&n,[`${r}-active`]:Ne===ue}),style:{...l,width:"max-content",transitionDuration:`${Math.round($o/2)}ms`},children:a.jsx("div",{className:`${r}-caption-text-inner`,style:{"--link-color":R,"--link-hover-color":R,position:"relative",top:E.scalingValue(ws.offset.y,n),left:E.scalingValue(ws.offset.x,n)},children:a.jsx(Zi,{content:ye.imageCaption})})},Ne))})]})]})]})}function fd({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const qS=`import React, { useCallback, useEffect, useRef, useState } from 'react';
19950
+ `}function US({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o}){const{prefix:r}=E.useScopedStyles(),l=zS(e,n),c=t??[],d=c.length,u=(e==null?void 0:e.trigger)??hd,p=u.sizeType??"drag",y=u.value??hd.value,x=(e==null?void 0:e.direction)??"horizontal",g=(e==null?void 0:e.transition)??"slide",h=(e==null?void 0:e.nav)??"classic",b=(e==null?void 0:e.navSize)??"m",S=OS[b],_=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,v=ye=>E.scalingValue(ye*_,n),L=(e==null?void 0:e.show)??"always",P=(e==null?void 0:e.controls)??null,q=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,X=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,B=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,H=(e==null?void 0:e.controlsColor)??md.color,O=(e==null?void 0:e.controlsHoverColor)??md.hover,C=(e==null?void 0:e.navColor)??Zo.colors.inactive,$=(e==null?void 0:e.navPaginationColor)??Zo.colors.pagination,Q=(e==null?void 0:e.navBackgroundColor)??Zo.colors.background,R=(e==null?void 0:e.linkColor)??ws.linkColor,T=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,w=x==="horizontal",V=p==="click",z=p==="drag",U=p==="auto"&&(!n||!!i),M=!n,f=g==="slide",K=h==="classic",G=L!=="never"&&q>0,ge=L==="on hover",k=E.scalingValue(q,n),ce={width:k,height:k,maxWidth:k},I=f&&d>1,[ue,ee]=s.useState(0),[xe,Le]=s.useState(I?1:0),[se,de]=s.useState(!1),[Z,pe]=s.useState(!1),[ie,me]=s.useState(!1),[ve,Ee]=s.useState(0),[Re,Ce]=s.useState(!1),[$e,m]=s.useState(!1),Y=s.useRef(!1),te=s.useRef(xe);te.current=xe;const oe=s.useRef(null),fe=s.useRef(0),N=s.useRef(null),F=s.useRef(null),ne=s.useRef(null),re=s.useRef(null),J=s.useCallback(ye=>{Y.current=ye,de(ye)},[]),W=s.useCallback(ye=>{if(d<2||ye===0)return;const _e=ye>0?1:-1,Ve=Math.abs(ye);if(Ce(!0),J(!0),!f){ee(ht=>rr(ht+ye,d));return}let Je=te.current;const et=I&&(Je===0||Je===d+1),ot=et?ue+1:null;et&&(Je=ue+1);let lt=Ve;for(;lt>0;){const ht=BS(Je,_e,d,I);if(Je=ht.position,lt-=1,ht.hitBoundary){fe.current=lt*_e;break}}const Ke=Ve-lt;if(Ke>0&&ee(ht=>rr(ht+Ke*_e,d)),te.current=Je,ot!==null){if(te.current=ot,Je===ot){pe(!0),Le(Je);return}oe.current=Je,pe(!0),Le(ot);return}pe(!1),Le(Je)},[ue,d,I,f,J]),Se=s.useCallback(ye=>{W(ye)},[W]),le=s.useCallback(ye=>{if(d<2)return;const _e=rr(ye,d);if(!(_e===ue&&!Y.current)&&(Ce(!0),J(!0),ee(_e),f)){const Ve=_e+(I?1:0);oe.current=null,fe.current=0,te.current=Ve,pe(!1),Le(Ve)}},[ue,d,I,f,J]);s.useEffect(()=>{if(!se)return;const ye=window.setTimeout(()=>{if(I&&(xe===0||xe===d+1)){oe.current=null,pe(!0),Le(ue+1);return}J(!1)},$o);return()=>window.clearTimeout(ye)},[ue,d,I,se,J,xe]),s.useEffect(()=>{if(!Z)return;let ye=0;const _e=requestAnimationFrame(()=>{ye=requestAnimationFrame(()=>{const Ve=oe.current;oe.current=null;const Je=fe.current;if(fe.current=0,pe(!1),Ve!==null){te.current=Ve,Le(Ve);return}if(Je!==0){W(Je);return}J(!1)})});return()=>{cancelAnimationFrame(_e),cancelAnimationFrame(ye)}},[W,J,Z]);const j=`${I}:${d}`,Te=s.useRef(j);s.useEffect(()=>{if(Te.current===j)return;Te.current=j;const ye=d>0?Math.min(ue,d-1):0;ne.current=null,re.current=null,me(!1),Ee(0),ee(ye),pe(!0),Le(ye+(I?1:0))},[ue,d,I,j]),s.useEffect(()=>{if(!Re)return;const ye=window.setTimeout(()=>Ce(!1),FS);return()=>window.clearTimeout(ye)},[Re,ue]),s.useEffect(()=>{if(!U||d<2)return;const ye=Math.max(y,.1)*1e3,_e=window.setInterval(()=>{M&&$e||Se(1)},ye);return()=>window.clearInterval(_e)},[y,d,Se,U,$e,M]);const Fe=s.useCallback(ye=>{const _e=ne.current;if(!_e||_e.pointerId!==ye.pointerId)return;ne.current=null,re.current=null;const Ve=N.current;if(Ve!=null&&Ve.hasPointerCapture(ye.pointerId)&&Ve.releasePointerCapture(ye.pointerId),!_e.isActive){f&&Ee(0);return}const et=!(ye.timeStamp-_e.lastTime>WS)&&Math.abs(_e.velocity)>HS,ot=_e.size>0&&Math.abs(_e.offset-_e.baseOffset)>_e.size*_S;if(me(!1),!et&&!ot){Ee(0);return}const lt=ot?_e.offset-_e.baseOffset:_e.velocity;let Ke=1;ot&&_e.size>0&&(Ke=Math.max(1,Math.round(Math.abs(lt)/_e.size))),Ee(0),W(lt<0?Ke:-Ke)},[W,f]);s.useEffect(()=>{const ye=_e=>{re.current===null||_e.pointerId!==re.current||Fe(_e)};return window.addEventListener("pointerup",ye),window.addEventListener("pointercancel",ye),()=>{window.removeEventListener("pointerup",ye),window.removeEventListener("pointercancel",ye)}},[Fe]);const Ye=ye=>{const _e=N.current;if(!z||d<2||!_e||ye.pointerType==="mouse"&&ye.button!==0)return;oe.current=null,fe.current=0,Y.current&&J(!1);let Ve=0;const Je=F.current;if(f&&Je){const et=w?Je.offsetWidth:Je.offsetHeight;if(et>0){const ot=jS(Je,w);let lt=te.current;I&&(lt===0||lt===d+1)?(lt=ue+1,te.current=lt,pe(!0),Le(lt),Ve=0):Ve=ot+lt*et,Ee(Ve)}}_e.setPointerCapture(ye.pointerId),re.current=ye.pointerId,ne.current={pointerId:ye.pointerId,startClientX:ye.clientX,startClientY:ye.clientY,axes:VS(_e,`${r}-axis-probe`),size:w?_e.offsetWidth:_e.offsetHeight,isActive:!1,baseOffset:Ve,offset:Ve,lastTime:ye.timeStamp,velocity:0}},De=ye=>{const _e=ne.current;if(!_e||_e.pointerId!==ye.pointerId)return;if(ye.pointerType==="mouse"&&ye.buttons===0){Fe(ye);return}const Ve=ye.clientX-_e.startClientX,Je=ye.clientY-_e.startClientY,et=_e.axes?GS(_e.axes,Ve,Je):{x:Ve,y:Je},ot=w?et.x:et.y,lt=w?et.y:et.x,Ke=_e.baseOffset+ot;if(!_e.isActive){if(Math.max(Math.abs(ot),Math.abs(lt))<NS)return;if(Math.abs(lt)>Math.abs(ot)){const tt=N.current;tt!=null&&tt.hasPointerCapture(_e.pointerId)&&tt.releasePointerCapture(_e.pointerId),ne.current=null,re.current=null,f&&Ee(0);return}_e.isActive=!0,me(!0)}const ht=ye.timeStamp-_e.lastTime;ht>0&&(_e.velocity=(Ke-_e.offset)/ht,_e.lastTime=ye.timeStamp),_e.offset=Ke,f&&Ee(Ke)},ze=ye=>{Fe(ye)},Ze=w?`translate3d(calc(${-xe*100}% + ${ve}px), 0, 0)`:`translate3d(0, calc(${-xe*100}% + ${ve}px), 0)`,Ue=I?[c[d-1],...c,c[0]]:c;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:XS(r,n)}}),a.jsxs("div",{className:Et(`${r}-wrapper`,{[`${r}-transition-reveal`]:g==="reveal",[`${r}-transition-reveal-vertical`]:g==="reveal"&&!w}),onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),children:[a.jsxs("div",{className:`${r}-slider-inner`,style:{backgroundColor:"transparent"},children:[a.jsxs("div",{ref:N,className:Et(`${r}-track`,{[`${r}-track-draggable`]:z,[`${r}-track-draggable-vertical`]:z&&!w}),onPointerDown:Ye,onPointerMove:De,onPointerUp:ze,onPointerCancel:ze,onLostPointerCapture:ye=>{re.current===ye.pointerId&&Fe(ye)},children:[a.jsx("div",{ref:F,className:Et(`${r}-list`,{[`${r}-list-slide`]:f,[`${r}-list-slide-vertical`]:f&&!w,[`${r}-list-fade`]:!f}),style:f?{transform:Ze,transition:ie||Z?"none":`transform ${$o}ms ${Lp}`}:void 0,children:Ue.map((ye,_e)=>{const Ve=I?rr(_e-1,d):_e,et=I&&(_e===0||_e===d+1)?`clone-${_e===0?"start":"end"}`:`slide-${Ve}`;return a.jsx("div",{className:Et(`${r}-slide`,{[`${r}-is-active`]:!f&&Ve===ue}),children:a.jsx("div",{className:`${r}-slider-item`,children:a.jsx("div",{className:`${r}-img-wrapper`,children:a.jsx("img",{className:Et(`${r}-slider-image`,{[`${r}-contain`]:ye.image.objectFit==="contain",[`${r}-cover`]:ye.image.objectFit==="cover"}),src:ye.image.assetId,alt:ye.image.name??"",draggable:!1})})})},et)})}),V&&a.jsx("div",{className:`${r}-click-overlay`,onClick:()=>Se(1)})]}),G&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Et(`${r}-arrow`,{[`${r}-arrow-prev`]:w,[`${r}-arrow-prev-vertical`]:!w,[`${r}-hover-arrow`]:ge}),style:{color:H,"--arrow-hover-color":O,...ce},children:a.jsxs("button",{onClick:ye=>{ye.stopPropagation(),Se(-1)},className:`${r}-arrow-inner`,style:{transform:`translate(${E.scalingValue(X,n)}, ${E.scalingValue(B*(w?1:-1),n)}) rotate(${w?"0deg":"90deg"})`},children:[P&&a.jsx(gn,{url:P,fill:H,hoverFill:O,className:Et(`${r}-arrow-img`,`${r}-mirror`),style:ce}),!P&&a.jsx(fd,{color:H,className:Et(`${r}-arrow-icon`,`${r}-arrow-img`,`${r}-mirror`)})]})}),a.jsx("div",{className:Et(`${r}-arrow`,{[`${r}-arrow-next`]:w,[`${r}-arrow-next-vertical`]:!w,[`${r}-hover-arrow`]:ge}),style:{color:H,"--arrow-hover-color":O,...ce},children:a.jsxs("button",{className:`${r}-arrow-inner`,onClick:ye=>{ye.stopPropagation(),Se(1)},style:{transform:`translate(${E.scalingValue(X*(w?-1:1),n)}, ${E.scalingValue(B,n)}) rotate(${w?"0deg":"90deg"})`},children:[P&&a.jsx(gn,{url:P,fill:H,hoverFill:O,className:`${r}-arrow-img`,style:ce}),!P&&a.jsx(fd,{color:H,className:Et(`${r}-arrow-icon`,`${r}-arrow-img`)})]})})]}),K&&a.jsx("div",{className:Et(`${r}-pagination`,{[`${r}-pagination-inside-bottom`]:w,[`${r}-pagination-inside-left`]:!w}),style:w?{bottom:v(S.inset)}:{left:v(S.inset)},children:a.jsx("div",{className:Et(`${r}-pagination-inner`,{[`${r}-pagination-vertical`]:!w,[`${r}-animate-dots`]:Re}),style:{backgroundColor:Q,gap:v(S.gapInactive-S.activeDot+S.dot),...w?{height:v(S.activeDot+S.paddingY*2),paddingTop:v(S.paddingY),paddingBottom:v(S.paddingY),paddingLeft:v(S.paddingActive),paddingRight:v(S.paddingActive)}:{width:v(S.activeDot+S.paddingY*2),paddingLeft:v(S.paddingY),paddingRight:v(S.paddingY),paddingTop:v(S.paddingActive),paddingBottom:v(S.paddingActive)},borderRadius:v(S.borderRadius),transform:`translate(${E.scalingValue(Zo.offset.x,n)}, ${E.scalingValue(Zo.offset.y,n)})`},children:c.map((ye,_e)=>{const Ve=_e===ue,Je=Ve?S.activeDot:S.dot;return a.jsx("button",{onClick:()=>le(_e),className:`${r}-pagination-item`,style:{width:v(S.activeDot)},children:a.jsx("div",{className:`${r}-dot`,style:{backgroundColor:Ve?$:C,width:v(Je)}})},_e)})},`${b}-${x}`)})]}),a.jsxs("div",{className:`${r}-caption-block`,children:[a.jsx("div",{"data-controls":o?"captionMarginTop":void 0,className:o?`${r}-control`:void 0,style:{height:E.scalingValue(T,n)}}),a.jsx("div",{className:`${r}-caption-text-wrapper`,children:c.map((ye,_e)=>a.jsx("div",{className:Et(`${r}-caption-text`,{[`${r}-with-pointer-events`]:_e===ue&&n,[`${r}-active`]:_e===ue}),style:{...l,width:"max-content",transitionDuration:`${Math.round($o/2)}ms`},children:a.jsx("div",{className:`${r}-caption-text-inner`,style:{"--link-color":R,"--link-hover-color":R,position:"relative",top:E.scalingValue(ws.offset.y,n),left:E.scalingValue(ws.offset.x,n)},children:a.jsx(Zi,{content:ye.imageCaption})})},_e))})]})]})]})}function fd({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const qS=`import React, { useCallback, useEffect, useRef, useState } from 'react';
19951
19951
  import cn from 'classnames';
19952
19952
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
19953
19953
  import { scalingValue } from '../utils/scalingValue';
@@ -21395,7 +21395,7 @@ function ArrowIcon({ color, className }: { color: string, className: string }) {
21395
21395
  left: 50%;
21396
21396
  transform: translate(-50%, -50%);
21397
21397
  }
21398
- `}const Pp={"left-top":{horizontal:"left",vertical:"top"},"top-center":{horizontal:"center",vertical:"top"},"top-right":{horizontal:"right",vertical:"top"},"left-center":{horizontal:"left",vertical:"center"},center:{horizontal:"center",vertical:"center"},"right-center":{horizontal:"right",vertical:"center"},"left-bottom":{horizontal:"left",vertical:"bottom"},"bottom-center":{horizontal:"center",vertical:"bottom"},"right-bottom":{horizontal:"right",vertical:"bottom"}};function ew(e){return e in Pp}function tw(e){if(e&&ew(e))return e;switch(e){case"center-top":return"top-center";case"right-top":return"top-right";case"top-left":return"left-top";case"center-bottom":return"bottom-center";case"bottom-left":return"left-bottom";case"bottom-right":return"right-bottom";case"center-center":return"center";case"left":return"left-center";case"right":return"right-center";case"top":return"left-top";default:return"center"}}function Gl(e){return Pp[e]}const nw="rgba(28,31,34,0.9)",Jn=500,Bi="cubic-bezier(0.22, 1, 0.36, 1)",iw=72,ow=50,rw={titleColor:"title-color",descriptionColor:"description-color",lightboxCounterColor:"lightbox-counter-color"},aw=[];function sw(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 lw(e){const[t,n]=e.media;return n!=null&&n.assetId?n:t!=null&&t.assetId?t:null}function cw(e){const[t]=e.media;return t!=null&&t.assetId?t:null}function dw(e){if(!Array.isArray(e)||e.length===0)return[];if(sw(e)){const t=[];for(const n of e){const i=lw(n);if(!i)continue;const o=cw(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.assetId?o:null})}return t}return e.filter(t=>t==null?void 0:t.assetId).map(t=>({displayMedia:t,lightboxMedia:t}))}function Ys(e){return e.type==="video"}function uw(e){e.pause(),e.removeAttribute("src"),e.load()}function Zr(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function pw(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}const gw=1140/1440;function mw(e){return typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"2:3",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"2:3",reversed:(e==null?void 0:e.reversed)??!1}}function hw(e){const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`}function fw(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function yw({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()=>{uw(d)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:r,onMouseMove:l,onTransitionEnd:c,style:i})}const vw="https://cdn.cntrl.site/component-assets/defaultCloseIcon.svg",xw=.004;function bw({prefix:e,closeIcon:t=vw,closeIconMaxWidth:n=.0125,closeIconColor:i="#FFFFFF",closeIconHoverColor:o="#999999",iconMarginRight:r=.01,contentMarginTop:l=.01,isEditor:c,isPreviewMode:d,isEditMode:u,visible:p,onClose:y}){if(!t)return null;const x=E.scalingValue(n,c),g=E.scalingValue(r,c),f=E.scalingValue(l,c),b=E.scalingValue(Math.max(l,xw),c);return a.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,zIndex:1e4,display:"flex",flexDirection:"column",alignItems:"flex-end",pointerEvents:"none",opacity:p?1:0,transition:"opacity 500ms cubic-bezier(0.22, 1, 0.36, 1)"},children:[a.jsx("div",{style:{position:"relative",width:"100%",height:f,flexShrink:0},children:u&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-min":"0",className:`${e}-control`,style:{position:"absolute",top:0,left:0,width:"100%",height:b,pointerEvents:p?"auto":"none"}})}),a.jsxs("div",{className:`${e}-close-icon`,style:{width:x,height:x,marginRight:g,pointerEvents:p?"auto":"none"},onClick:S=>S.stopPropagation(),children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,"aria-label":"Close",onClick:S=>{S.stopPropagation(),y()},children:a.jsx(gn,{url:t,fill:i,hoverFill:c&&!d?i:o,className:`${e}-close-icon-img`})}),u&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:g,height:"100%",pointerEvents:p?"auto":"none"}})]})]})}function Sw({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,isPreviewMode:r,isEditMode:l,onClose:c,onPrev:d,onNext:u,counterClassName:p,counterStyle:y,backgroundColor:x,closeIcon:g,closeIconMaxWidth:f,closeIconColor:b,closeIconHoverColor:S,iconMarginRight:W,contentMarginTop:v}){const L=i==="cover",M=s.useRef(null),U=s.useRef(null),G=s.useRef(null),B=s.useRef(0),N=s.useRef(0),O=s.useRef("none"),C=s.useRef(!1),$=s.useRef(!1),K=s.useRef(!1),R=s.useRef(null),[w,T]=s.useState(null),[j,_]=s.useState("opening"),[Q,P]=s.useState(0),[h,J]=s.useState(0),[V,me]=s.useState(!1),[k,le]=s.useState(!1),[I,ue]=s.useState(!1),ee=s.useRef(n),xe=t[n],Le=xe?Ys(xe):!1,ce=h!==0||V,de=s.useCallback(F=>{K.current=F,me(F)},[]),Z=s.useCallback(()=>{R.current!==null&&(window.clearTimeout(R.current),R.current=null)},[]),pe=s.useCallback(()=>{Z(),R.current=window.setTimeout(()=>{Z(),de(!1)},Jn+32)},[Z,de]),oe=s.useCallback(()=>{const F=M.current,H=U.current;if(!F)return;const ne=F.getBoundingClientRect(),q=ne.width,ie=ne.height;if(!q||!ie)return;if(i==="cover"){T({width:q,height:ie,left:ne.left,top:ne.top});return}if(!H){T(Zr(F));return}const{width:z,height:$e}=pw(H);if(!z||!$e){T(Zr(F));return}const re=z/$e,X=q/ie;if(re>X){const Ce=q/re;T({width:q,height:Ce,left:ne.left,top:ne.top+(ie-Ce)/2})}else{const Ce=ie*re;T({width:Ce,height:ie,left:ne.left+(q-Ce)/2,top:ne.top})}},[i]);s.useEffect(()=>{oe();const F=M.current;if(!F)return;const H=new ResizeObserver(()=>oe());return H.observe(F),()=>H.disconnect()},[oe,n]),s.useEffect(()=>{j==="opening"&&w&&_("open")},[j,w]),s.useEffect(()=>{if(j!=="closing")return;const F=setTimeout(()=>c(),Jn);return()=>clearTimeout(F)},[j,c]),s.useEffect(()=>()=>{Z()},[Z]),s.useLayoutEffect(()=>{if(ee.current===n)return;Z(),P(0),J(0),de(!1),ue(!1),le(!1),B.current=0,N.current=0,O.current="none",C.current=!1,G.current=null,$.current=!1;const F=M.current;F&&T(Zr(F)),ee.current=n},[n,de,Z]),s.useEffect(()=>{if(j!=="open")return;let F=null;const H=()=>{F&&(document.removeEventListener("click",F,!0),F=null)},ne=()=>{H(),F=X=>{X.stopPropagation(),X.preventDefault(),H()},document.addEventListener("click",F,!0)},q=X=>{Z(),K.current=!1,me(!1),J(0),le(!1),C.current=!1,N.current=0,O.current="none";const Ce=M.current;Ce&&T(Zr(Ce)),X<0?u():d()},ie=X=>{if(Math.abs(X)>ow&&t.length>1){q(X);return}de(!0),J(0),pe()},z=X=>{if(X.touches.length!==1||K.current)return;const Ce=X.touches[0];$.current=!0,G.current={x:Ce.clientX,y:Ce.clientY},O.current="none",N.current=0,C.current=!1},$e=X=>{if(!G.current||X.touches.length!==1||K.current)return;const Ce=X.touches[0],He=Ce.clientX-G.current.x,Ye=Ce.clientY-G.current.y;if(O.current==="none"){if(Math.abs(He)<10&&Math.abs(Ye)<10)return;if(Math.abs(He)>Math.abs(Ye)){if(t.length<=1)return;O.current="horizontal"}else if(Ye>0)O.current="vertical";else return}if(O.current==="horizontal"){C.current=!0,le(!0),N.current=He,J(He),X.preventDefault();return}O.current==="vertical"&&(C.current=!0,le(!0),B.current=Ye,P(Ye),X.preventDefault())},re=()=>{if(!G.current)return;const X=O.current,Ce=C.current;if(Ce&&X==="horizontal")ie(N.current),ne();else if(Ce&&X==="vertical")if(B.current>iw){const Ye=window.innerHeight;B.current=Ye,ue(!0),P(Ye),_("closing")}else B.current=0,P(0),ne();else X==="horizontal"&&Math.abs(N.current)>0&&(ie(N.current),ne());G.current=null,O.current="none",N.current=0,C.current=!1,le(!1)};return document.addEventListener("touchstart",z,{passive:!0}),document.addEventListener("touchmove",$e,{passive:!1}),document.addEventListener("touchend",re),document.addEventListener("touchcancel",re),()=>{document.removeEventListener("touchstart",z),document.removeEventListener("touchmove",$e),document.removeEventListener("touchend",re),document.removeEventListener("touchcancel",re),H()}},[j,t.length,u,d,de,pe,Z]),s.useEffect(()=>{const F=H=>{H.key==="Escape"&&(H.preventDefault(),H.stopPropagation(),j!=="closing"&&_("closing"))};return window.addEventListener("keydown",F,!0),()=>window.removeEventListener("keydown",F,!0)},[j]);const ge=()=>{j!=="closing"&&_("closing")},be=j==="open",Re=j==="closing",Ee=Q>0?Math.max(0,1-Q/500):1,Te=Q>0?Math.max(.35,1-Q/500):1,we=F=>{if(F.stopPropagation(),$.current){$.current=!1;return}if(t.length<=1)return;const H=F.currentTarget.getBoundingClientRect(),ne=F.clientY-H.top,q=Math.min(52,H.height*.2);if(!(ne>H.height-q)){if(F.clientX-H.left<H.width/2){d();return}u()}},m=F=>{if(t.length<=1)return;const H=F.currentTarget.getBoundingClientRect(),ne=F.clientX-H.left,q=F.clientY-H.top,ie=Math.min(52,H.height*.2);if(q>H.height-ie){F.currentTarget.style.cursor="default";return}F.currentTarget.style.cursor=ne<H.width/2?"w-resize":"e-resize"},Y=s.useCallback(F=>{F.propertyName!=="transform"||!K.current||(Z(),de(!1))},[Z,de]),te=ce?`translateX(${h}px)`:Q>0?`translateY(${Q}px)`:void 0,ae={position:"fixed",top:w==null?void 0:w.top,left:w==null?void 0:w.left,width:w==null?void 0:w.width,height:w==null?void 0:w.height,objectFit:i==="cover"?"cover":"contain",transform:te,opacity:Q>0?Te:j==="opening"||Re?0:1,transition:k&&!V?"none":V?`transform ${Jn}ms ${Bi}`:I?`transform ${Jn}ms ${Bi}, opacity ${Jn}ms ${Bi}`:j==="opening"||Re?`opacity ${Jn}ms ${Bi}`:"none",pointerEvents:Le&&be&&!ce?"auto":"none",touchAction:Le&&be?"none":void 0,zIndex:9998},fe=w?{position:"fixed",top:w.top,height:w.height,width:w.width/2,zIndex:9999}:null;return a.jsxs("div",{className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:j==="open"?"none":void 0},onClick:ge,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:x,opacity:be?Ee:0,transition:k?"none":`opacity ${Jn}ms ${Bi}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:L?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:M,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:be?1:0,transition:`opacity ${Jn}ms ${Bi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:p,style:y,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:M,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:be?1:0,transition:`opacity ${Jn}ms ${Bi}`},children:t.length>1&&a.jsxs("p",{className:p,style:y,children:[n+1," / ",t.length]})})]})}),w&&xe&&(Le?a.jsx(yw,{src:xe.assetId,phase:j,mediaRef:U,mediaStyle:ae,onLoadedMetadata:oe,onClick:we,onMouseMove:m,onTransitionEnd:Y},`${n}-${xe.assetId}`):a.jsx("img",{ref:U,src:xe.assetId,alt:xe.name,onLoad:oe,onTransitionEnd:Y,style:ae},`${n}-${xe.assetId}`)),be&&fe&&t.length>1&&!Le&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...fe,left:w.left,cursor:"w-resize",pointerEvents:ce?"none":"auto"},onClick:F=>{if($.current){$.current=!1;return}F.stopPropagation(),d()}}),a.jsx("div",{style:{...fe,left:w.left+w.width/2,cursor:"e-resize",pointerEvents:ce?"none":"auto"},onClick:F=>{if($.current){$.current=!1;return}F.stopPropagation(),u()}})]}),a.jsx(bw,{prefix:e,closeIcon:g,closeIconMaxWidth:f,closeIconColor:b,closeIconHoverColor:S,iconMarginRight:W,contentMarginTop:v,isEditor:o,isPreviewMode:r,isEditMode:l,visible:be,onClose:ge})]})}function yd({P:e,media:t,imgWidth:n,cornerRadius:i,fillGalleryWidth:o,imageDisplay:r,isEditor:l,galleryPaddingBetween:c=0,showPaddingAfter:d=!1,showControls:u=!1,onMediaClick:p}){const y=`${e}-gallery-${Ys(t)?"video":"image"}`,x=r.display==="cover",g=hw(r),f=N=>E.scalingValue(N,l??!1),b=n??mo,S=o?{width:"100%",maxWidth:"100%"}:{width:f(b),maxWidth:"100%"},W=i?{borderRadius:f(i)}:{},v={...S,...x?{aspectRatio:g,height:"auto",overflow:"hidden"}:{},...W},L={...x?{display:"block",width:"100%",height:"100%",objectFit:"cover",maxWidth:"100%"}:{display:"block",maxWidth:"100%",height:"auto",width:o?"100%":f(b)},...p?{cursor:"pointer",pointerEvents:"auto"}:{},...x?{}:W},U={className:y,style:L,onClick:p?N=>{N.stopPropagation(),p()}:void 0},G=Math.max(c,ti),B=Ys(t)?a.jsx("video",{...U,src:t.assetId,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):a.jsx("img",{...U,src:t.assetId,alt:t.name??""});return a.jsxs("div",{className:`${e}-gallery-item`,children:[x?a.jsx("div",{style:v,children:B}):B,d&&c>0&&a.jsx("div",{className:`${e}-padding-handle`,style:{height:f(c)},"aria-hidden":"true"}),u&&d&&a.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:f(G)}})]})}function ww({P:e,layoutType:t,galleryWidthStyle:n,galleryPaddingRight:i,galleryPaddingLeft:o,galleryPaddingRightWidth:r,galleryPaddingLeftWidth:l,galleryPaddingMaxFraction:c,showControls:d,scaled:u,children:p}){const y=t==="a"?i:t==="c"?o:0,x=y>0||d;return a.jsxs("div",{className:`${e}-gallery-controls`,children:[t==="c"&&x&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(y)},"aria-hidden":"true"}),d&&t==="c"&&a.jsx("div",{"data-controls":"galleryPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(c),className:`${e}-control-anchor`,style:{top:0,left:0,width:u(l),height:"100%"}}),a.jsx("div",{className:`${e}-gallery`,style:n,children:p}),t==="a"&&x&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(y)},"aria-hidden":"true"}),d&&t==="a"&&a.jsx("div",{"data-controls":"galleryPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(c),className:`${e}-control-anchor`,style:{top:0,right:0,width:u(r),height:"100%"}})]})}function $w(e){switch(e){case"fade":case"retype":case"scroll":return e;case"default":return"scroll";default:return"scroll"}}function Jr({P:e,controlKey:t,scaled:n,height:i,paired:o,side:r}){return a.jsx("div",{"data-controls":t,...o?{"data-controls-paired":""}:{},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{...r==="top"?{top:0}:{bottom:0},left:0,width:"100%",height:n(i)}})}function vd({P:e,controlKey:t,scaled:n,width:i,maxFraction:o,side:r,paired:l,anchorStyle:c}){return a.jsx("div",{"data-controls":t,...l?{"data-controls-paired":""}:{},"data-controls-axis":"x","data-controls-variant":"column-padding",...r==="right"?{"data-controls-reverse":""}:{},"data-controls-min":"0","data-controls-max-fraction":String(o),className:`${e}-control-anchor`,style:{top:0,...r==="left"?{left:0}:{right:0},width:n(i),height:"100%",...c}})}function Ts({P:e,title:t,description:n,position:i,titleRef:o,titleClassName:r,titleContainerStyle:l,titleTextBoxStyle:c,titleStyle:d,descriptionClassName:u,descriptionStyle:p,descriptionPadding:y,showTextBoxOutline:x=!1,showDescriptionPaddingControl:g=!1,descriptionPaddingPaired:f=!1,topPaddingControl:b,bottomPaddingControl:S}){const W=s.useRef(null),[v,L]=s.useState(0),M=t??"",U=n??"",G=U.length>0,{horizontal:B,vertical:N}=Gl(i),O=N==="center"||N==="bottom",C=N==="bottom";s.useLayoutEffect(()=>{if(!O)return;const w=W.current;if(!w||typeof ResizeObserver>"u")return;const T=()=>L(w.offsetHeight);T();const j=new ResizeObserver(T);return j.observe(w),()=>j.disconnect()},[M,U,O]);const $=a.jsx("span",{className:`${e}-title-text`,style:d,children:M}),K=G?a.jsx("span",{className:u,style:p,children:U}):null,R=G?a.jsx("div",{className:`${e}-title-texts-gap`,style:{height:y},children:g&&a.jsx("div",{"data-controls":"titleDescriptionPadding",...f?{"data-controls-paired":""}:{},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{top:0,left:0,width:"100%",height:"100%"}})}):null;return a.jsx("div",{ref:w=>{W.current=w,o(w)},className:[r,`${e}-title-h-${B}`,`${e}-title-v-${N}`].join(" "),style:{...O?{[`--${e}-title-height`]:`${v}px`}:{},...l},children:a.jsxs("div",{className:`${e}-title-text-stack`,style:c,children:[b,a.jsx("div",{className:x?`${e}-title-text-inner`:`${e}-title-text-inner-hidden`,style:{width:"100%"},children:a.jsx("div",{className:`${e}-title-texts`,children:C?a.jsxs(a.Fragment,{children:[K,R,$]}):a.jsxs(a.Fragment,{children:[$,R,K]})})}),S]})})}const xd=45;function bd(e,t,n){let i=e;for(;i;){const o=getComputedStyle(i).getPropertyValue(t).trim();if(o){const r=parseFloat(o);if(!Number.isNaN(r))return r}i=i.parentElement}return n}function Cw(e){const t=bd(e,"--cntrl-viewport-height",window.innerHeight),n=bd(e,"--cntrl-article-top",0);return{top:n,height:t,centerY:n+t/2}}function Tw(e,t,n){const{vertical:i}=Gl(t),{top:o,height:r,centerY:l}=Cw(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 Iw(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=Tw(u,n,d);return Math.exp(-(p*p)/(2*xd*xd))});let o=0,r=-1;return i.forEach((l,c)=>{l>r&&(r=l,o=c)}),{opacities:i,dominantIndex:o}}function Lw(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(Iw(i,e,n))},p=()=>{d||(d=window.requestAnimationFrame(()=>{d=0,u()}))};return u(),window.addEventListener("scroll",p,{passive:!0}),window.addEventListener("resize",p,{passive:!0}),()=>{d&&window.cancelAnimationFrame(d),window.removeEventListener("scroll",p),window.removeEventListener("resize",p)}},[t,e,n]),{setTitleRef:d=>u=>{i.current[d]=u},opacities:o,dominantIndex:r}}function Sd(e,t){const[n,i]=s.useState(e),o=s.useRef(e);return s.useEffect(()=>{if(!t){o.current=e,i(e);return}const r=Array.from(o.current),l=Array.from(e),c=Math.max(r.length,l.length);if(c===0||o.current===e)return;let d=0;const u=window.setInterval(()=>{d+=1;const p=[...l.slice(0,d),...r.slice(d)].join("");o.current=p,i(p),d>=c&&window.clearInterval(u)},70);return()=>window.clearInterval(u)},[t,e]),n}function Pw({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,portalId:r}){var dt,yt;const{prefix:l}=E.useScopedStyles(),c=s.useMemo(()=>JS(l),[l]),d=t??[],u=(e==null?void 0:e.wrapperWidth)??1,p=(e==null?void 0:e.type)??"a",y=(e==null?void 0:e.imgWidth)??mo,x=(e==null?void 0:e.titleWidth)??gw,g=mw(e==null?void 0:e.imageDisplay),f=(e==null?void 0:e.cornerRadius)??QS,b=tw(e==null?void 0:e.position),{horizontal:S,vertical:W}=Gl(b),v=(e==null?void 0:e.titleTopPadding)??0,L=(e==null?void 0:e.titleBottomPadding)??0,M=(e==null?void 0:e.titleLeftPadding)??0,U=(e==null?void 0:e.titleRightPadding)??0,G=(e==null?void 0:e.titleDescriptionPadding)??0,B=$w(e==null?void 0:e.transition),N=(e==null?void 0:e.lightbox)??"on",O=p==="b",C=B==="fade"||B==="retype",{setTitleRef:$,dominantIndex:K}=Lw(d.length,C,b),R=((dt=d[K])==null?void 0:dt.title)??"",w=((yt=d[K])==null?void 0:yt.description)??"",T=Sd(R,B==="retype"),j=Sd(w,B==="retype"),_=B==="fade"||B==="retype",Q=B==="retype"?T:R,P=B==="retype"?j:w,h=O?void 0:{width:E.scalingValue(y,n??!1)},J=N==="on"&&(!n||i||o),V=o??!1,me=(e==null?void 0:e.galleryPaddingRight)??0,k=(e==null?void 0:e.galleryPaddingLeft)??0,le=(e==null?void 0:e.galleryPaddingBetween)??0,I=ut=>E.scalingValue(ut,n??!1),ee={width:I(x)},xe=p==="a"?me:k,Le=O?{width:"100%"}:{width:`calc(100% - ${I(y)} - ${I(xe)})`,...p==="c"?{marginLeft:"auto"}:{}},ce=Math.max(me,ti),de=Math.max(k,ti),Z=Math.max(le,ti),pe=Math.max(v,ti),oe=Math.max(L,ti),ge=Math.max(M,ti),be=Math.max(U,ti),Re=Math.max(G,ti),Ee=Math.max(0,(u??1)-(y??mo)),Te=p==="a"?Math.max(0,(u??1)-(y??mo)-me):p==="c"?Math.max(0,(u??1)-(y??mo)-k):p==="b"?u??1:1,we=V&&W==="top",m=V&&W==="bottom",Y=V&&S==="left",te=V&&S==="right",ae=d.length>1,fe=O?void 0:I((p==="c"?k:me)+(y??mo)),F=p==="c"&&fe?{left:fe}:void 0,H=p==="a"&&fe?{right:fe}:void 0,ne=O?{left:0,width:"100%"}:p==="a"?{right:I(me),width:I(y)}:{left:I(k),width:I(y)},{titleColor:q,titleFontFamily:ie,titleFontSettings:z,titleFontSize:$e,titleLineHeight:re,titleLetterSpacing:X,titleWordSpacing:Ce,titleAlign:He,titleTextAppearance:Ye,descriptionColor:De,descriptionFontFamily:ze,descriptionFontSettings:Ze,descriptionFontSize:Ue,descriptionLineHeight:ye,descriptionLetterSpacing:Ne,descriptionWordSpacing:Ve,descriptionAlign:Je,descriptionTextAppearance:et,lightboxCounterColor:ot,lightboxCounterFontFamily:lt,lightboxCounterFontSettings:Ke,lightboxCounterFontSize:ht,lightboxCounterLineHeight:tt,lightboxCounterLetterSpacing:Ge,lightboxCounterWordSpacing:We,lightboxCounterTextAppearance:Fe}=e??{},ve={fontSettings:{fontFamily:ie,fontWeight:(z==null?void 0:z.fontWeight)??400,fontStyle:(z==null?void 0:z.fontStyle)??"normal"},fontSize:$e??.01,lineHeight:re,letterSpacing:X??0,wordSpacing:Ce??0,textAlign:He??"left",textAppearance:Ye,color:q??"#000000"},Xe=pn(nn(ve,n)),ct=ee,rt={...Cs($e,re,l,n),...Cs(Ue,ye,l,n,"description-leading-gap")},xt=$s($e,re,`${l}-title`,`${l}-text-tight-leading`),pt={fontSettings:{fontFamily:ze,fontWeight:(Ze==null?void 0:Ze.fontWeight)??400,fontStyle:(Ze==null?void 0:Ze.fontStyle)??"normal"},fontSize:Ue??.01,lineHeight:ye,letterSpacing:Ne??0,wordSpacing:Ve??0,textAlign:Je??"left",textAppearance:et,color:De??"#000000"},It=pn(nn(pt,n)),nt=$s(Ue,ye,`${l}-description-text`,`${l}-description-tight-leading`),bt=I(V?Re:G),Lt={fontSettings:{fontFamily:lt,fontWeight:(Ke==null?void 0:Ke.fontWeight)??400,fontStyle:(Ke==null?void 0:Ke.fontStyle)??"normal"},fontSize:ht??.01,lineHeight:tt,letterSpacing:Ge??0,wordSpacing:We??0,textAppearance:Fe,color:ot??"#DEDDDD"},Ft={...pn(nn(Lt,n)),...Cs(ht,tt,l,n)},Me=$s(ht,tt,`${l}-lightbox-counter`,`${l}-text-tight-leading`),Oe=E.buildColorVars(l,{titleColor:q??"#000000",descriptionColor:De??"#000000",lightboxCounterColor:ot??"#DEDDDD"},rw,aw),St=s.useRef(null),[Mt,Qe]=s.useState(!1),[kt,Bt]=s.useState([]),[Wt,At]=s.useState(0),Ae=s.useCallback((ut,it)=>{J&&(Bt(ut),At(it),Qe(!0))},[J]),ft=s.useCallback(()=>{Qe(!1)},[]),gt=s.useMemo(()=>{const ut={...Oe},it=St.current?getComputedStyle(St.current).getPropertyValue("--cntrl-article-width").trim():"";return it&&(ut["--cntrl-article-width"]=it),ut},[Oe,Mt]);return s.useEffect(()=>{if(!Mt||N!=="on"||typeof document>"u")return;const ut=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ut}},[Mt,N]),s.useEffect(()=>{!n||o||i||Qe(!1)},[n,o,i]),s.useEffect(()=>{N==="off"&&Qe(!1)},[N]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),a.jsx("div",{style:Oe,children:a.jsxs("div",{ref:St,className:`${l}-wrapper`,style:{width:E.scalingValue(u,n??!1),[`--${l}-title-top-padding`]:W==="top"?I(v):void 0,[`--${l}-title-bottom-padding`]:W==="bottom"?I(L):void 0,[`--${l}-title-left-padding`]:S==="left"?I(M):void 0,[`--${l}-title-right-padding`]:S==="right"?I(U):void 0},children:[_&&a.jsx("div",{className:`${l}-single-title-layer`,children:a.jsx(Ts,{P:l,title:Q,description:P,position:b,titleRef:()=>{},titleClassName:`${xt} ${l}-single-title`,titleContainerStyle:{...rt,...Le},titleTextBoxStyle:ct,titleStyle:Xe,descriptionClassName:nt,descriptionStyle:It,descriptionPadding:bt,showTextBoxOutline:V,showDescriptionPaddingControl:V,topPaddingControl:we?Jr({P:l,controlKey:"titleTopPadding",scaled:I,height:pe,paired:!1,side:"top"}):void 0,bottomPaddingControl:m?Jr({P:l,controlKey:"titleBottomPadding",scaled:I,height:oe,paired:!1,side:"bottom"}):void 0})}),d.map((ut,it)=>{const Nt=dw(ut.gallery),$t=it<d.length-1,Qt=Nt.filter(Ot=>Ot.lightboxMedia).map(Ot=>Ot.lightboxMedia),Xt={P:l,position:b,titleRef:$(it),titleClassName:xt,titleContainerStyle:rt,titleTextBoxStyle:_?{maxWidth:"100%"}:ct,titleStyle:Xe,descriptionClassName:nt,descriptionStyle:It,descriptionPadding:bt,showTextBoxOutline:V&&!_,showDescriptionPaddingControl:V&&!_,descriptionPaddingPaired:ae,topPaddingControl:we&&!_?Jr({P:l,controlKey:"titleTopPadding",scaled:I,height:pe,paired:ae,side:"top"}):void 0,bottomPaddingControl:m&&!_?Jr({P:l,controlKey:"titleBottomPadding",scaled:I,height:oe,paired:ae,side:"bottom"}):void 0};return a.jsxs("div",{"data-item-index":it,className:`${l}-item ${l}-item-${p}`,style:{paddingBottom:$t?I(le):void 0},children:[Y&&vd({P:l,controlKey:"titleLeftPadding",scaled:I,width:ge,maxFraction:Te,side:"left",paired:ae,anchorStyle:F}),te&&vd({P:l,controlKey:"titleRightPadding",scaled:I,width:be,maxFraction:Te,side:"right",paired:ae,anchorStyle:H}),V&&$t&&a.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-control-anchor`,style:{bottom:0,height:I(Z),...ne}}),O?a.jsxs("div",{className:`${l}-gallery`,children:[a.jsx("div",{className:`${l}-gallery-media`,children:Nt.map(({displayMedia:Ot,lightboxMedia:jt},Dt)=>{const zt=jt?Qt.findIndex(D=>D.assetId===jt.assetId):-1;return a.jsx(yd,{P:l,media:Ot,imgWidth:y||void 0,cornerRadius:f||void 0,imageDisplay:g,isEditor:n,galleryPaddingBetween:le,showPaddingAfter:Dt<Nt.length-1,showControls:V,onMediaClick:J&&zt>=0?()=>Ae(Qt,zt):void 0},`${Ot.assetId}-${Dt}`)})}),a.jsx("div",{className:`${l}-title-layer`,children:a.jsx(Ts,{...Xt,title:_?"":ut.title,description:_?"":ut.description})})]}):a.jsxs(a.Fragment,{children:[a.jsx(Ts,{...Xt,title:_?"":ut.title,description:_?"":ut.description}),Nt.length>0&&a.jsx(ww,{P:l,layoutType:p,galleryWidthStyle:h,galleryPaddingRight:me,galleryPaddingLeft:k,galleryPaddingRightWidth:ce,galleryPaddingLeftWidth:de,galleryPaddingMaxFraction:Ee,showControls:V,scaled:I,children:Nt.map(({displayMedia:Ot,lightboxMedia:jt},Dt)=>{const zt=jt?Qt.findIndex(D=>D.assetId===jt.assetId):-1;return a.jsx(yd,{P:l,media:Ot,cornerRadius:f||void 0,fillGalleryWidth:!0,imageDisplay:g,isEditor:n,galleryPaddingBetween:le,showPaddingAfter:Dt<Nt.length-1,showControls:V,onMediaClick:J&&zt>=0?()=>Ae(Qt,zt):void 0},`${Ot.assetId}-${Dt}`)})})]})]},it)})]})}),Mt&&N==="on"&&typeof document<"u"&&e&&(()=>{const ut=(r?document.getElementById(r):null)??document.body;return qn.createPortal(a.jsx("div",{style:gt,"data-selection":"none",children:a.jsx(Sw,{prefix:l,items:kt,index:Wt,imageDisplay:fw(e.lightboxImageDisplay),isEditor:n,isPreviewMode:i,isEditMode:o,closeIcon:e.closeIcon,closeIconMaxWidth:e.closeIconMaxWidth,closeIconColor:e.closeIconColor,closeIconHoverColor:e.closeIconHoverColor,iconMarginRight:e.iconMarginRight,contentMarginTop:e.contentMarginTop,onClose:ft,onPrev:()=>At(it=>(it-1+kt.length)%kt.length),onNext:()=>At(it=>(it+1)%kt.length),counterClassName:Me,counterStyle:Ft,backgroundColor:e.backgroundColor??nw})}),ut)})()]})}const Mw=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
21398
+ `}const Pp={"left-top":{horizontal:"left",vertical:"top"},"top-center":{horizontal:"center",vertical:"top"},"top-right":{horizontal:"right",vertical:"top"},"left-center":{horizontal:"left",vertical:"center"},center:{horizontal:"center",vertical:"center"},"right-center":{horizontal:"right",vertical:"center"},"left-bottom":{horizontal:"left",vertical:"bottom"},"bottom-center":{horizontal:"center",vertical:"bottom"},"right-bottom":{horizontal:"right",vertical:"bottom"}};function ew(e){return e in Pp}function tw(e){if(e&&ew(e))return e;switch(e){case"center-top":return"top-center";case"right-top":return"top-right";case"top-left":return"left-top";case"center-bottom":return"bottom-center";case"bottom-left":return"left-bottom";case"bottom-right":return"right-bottom";case"center-center":return"center";case"left":return"left-center";case"right":return"right-center";case"top":return"left-top";default:return"center"}}function Gl(e){return Pp[e]}const nw="rgba(28,31,34,0.9)",Jn=500,Bi="cubic-bezier(0.22, 1, 0.36, 1)",iw=72,ow=50,rw={titleColor:"title-color",descriptionColor:"description-color",lightboxCounterColor:"lightbox-counter-color"},aw=[];function sw(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 lw(e){const[t,n]=e.media;return n!=null&&n.assetId?n:t!=null&&t.assetId?t:null}function cw(e){const[t]=e.media;return t!=null&&t.assetId?t:null}function dw(e){if(!Array.isArray(e)||e.length===0)return[];if(sw(e)){const t=[];for(const n of e){const i=lw(n);if(!i)continue;const o=cw(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.assetId?o:null})}return t}return e.filter(t=>t==null?void 0:t.assetId).map(t=>({displayMedia:t,lightboxMedia:t}))}function Ys(e){return e.type==="video"}function uw(e){e.pause(),e.removeAttribute("src"),e.load()}function Zr(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function pw(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}const gw=1140/1440;function mw(e){return typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"2:3",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"2:3",reversed:(e==null?void 0:e.reversed)??!1}}function hw(e){const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`}function fw(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function yw({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()=>{uw(d)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:r,onMouseMove:l,onTransitionEnd:c,style:i})}const vw="https://cdn.cntrl.site/component-assets/defaultCloseIcon.svg",xw=.004;function bw({prefix:e,closeIcon:t=vw,closeIconMaxWidth:n=.0125,closeIconColor:i="#FFFFFF",closeIconHoverColor:o="#999999",iconMarginRight:r=.01,contentMarginTop:l=.01,isEditor:c,isPreviewMode:d,isEditMode:u,visible:p,onClose:y}){if(!t)return null;const x=E.scalingValue(n,c),g=E.scalingValue(r,c),h=E.scalingValue(l,c),b=E.scalingValue(Math.max(l,xw),c);return a.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,zIndex:1e4,display:"flex",flexDirection:"column",alignItems:"flex-end",pointerEvents:"none",opacity:p?1:0,transition:"opacity 500ms cubic-bezier(0.22, 1, 0.36, 1)"},children:[a.jsx("div",{style:{position:"relative",width:"100%",height:h,flexShrink:0},children:u&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-min":"0",className:`${e}-control`,style:{position:"absolute",top:0,left:0,width:"100%",height:b,pointerEvents:p?"auto":"none"}})}),a.jsxs("div",{className:`${e}-close-icon`,style:{width:x,height:x,marginRight:g,pointerEvents:p?"auto":"none"},onClick:S=>S.stopPropagation(),children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,"aria-label":"Close",onClick:S=>{S.stopPropagation(),y()},children:a.jsx(gn,{url:t,fill:i,hoverFill:c&&!d?i:o,className:`${e}-close-icon-img`})}),u&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:g,height:"100%",pointerEvents:p?"auto":"none"}})]})]})}function Sw({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,isPreviewMode:r,isEditMode:l,onClose:c,onPrev:d,onNext:u,counterClassName:p,counterStyle:y,backgroundColor:x,closeIcon:g,closeIconMaxWidth:h,closeIconColor:b,closeIconHoverColor:S,iconMarginRight:_,contentMarginTop:v}){const L=i==="cover",P=s.useRef(null),q=s.useRef(null),X=s.useRef(null),B=s.useRef(0),H=s.useRef(0),O=s.useRef("none"),C=s.useRef(!1),$=s.useRef(!1),Q=s.useRef(!1),R=s.useRef(null),[T,w]=s.useState(null),[V,z]=s.useState("opening"),[U,M]=s.useState(0),[f,K]=s.useState(0),[G,ge]=s.useState(!1),[k,ce]=s.useState(!1),[I,ue]=s.useState(!1),ee=s.useRef(n),xe=t[n],Le=xe?Ys(xe):!1,se=f!==0||G,de=s.useCallback(N=>{Q.current=N,ge(N)},[]),Z=s.useCallback(()=>{R.current!==null&&(window.clearTimeout(R.current),R.current=null)},[]),pe=s.useCallback(()=>{Z(),R.current=window.setTimeout(()=>{Z(),de(!1)},Jn+32)},[Z,de]),ie=s.useCallback(()=>{const N=P.current,F=q.current;if(!N)return;const ne=N.getBoundingClientRect(),re=ne.width,J=ne.height;if(!re||!J)return;if(i==="cover"){w({width:re,height:J,left:ne.left,top:ne.top});return}if(!F){w(Zr(N));return}const{width:W,height:Se}=pw(F);if(!W||!Se){w(Zr(N));return}const le=W/Se,j=re/J;if(le>j){const Te=re/le;w({width:re,height:Te,left:ne.left,top:ne.top+(J-Te)/2})}else{const Te=J*le;w({width:Te,height:J,left:ne.left+(re-Te)/2,top:ne.top})}},[i]);s.useEffect(()=>{ie();const N=P.current;if(!N)return;const F=new ResizeObserver(()=>ie());return F.observe(N),()=>F.disconnect()},[ie,n]),s.useEffect(()=>{V==="opening"&&T&&z("open")},[V,T]),s.useEffect(()=>{if(V!=="closing")return;const N=setTimeout(()=>c(),Jn);return()=>clearTimeout(N)},[V,c]),s.useEffect(()=>()=>{Z()},[Z]),s.useLayoutEffect(()=>{if(ee.current===n)return;Z(),M(0),K(0),de(!1),ue(!1),ce(!1),B.current=0,H.current=0,O.current="none",C.current=!1,X.current=null,$.current=!1;const N=P.current;N&&w(Zr(N)),ee.current=n},[n,de,Z]),s.useEffect(()=>{if(V!=="open")return;let N=null;const F=()=>{N&&(document.removeEventListener("click",N,!0),N=null)},ne=()=>{F(),N=j=>{j.stopPropagation(),j.preventDefault(),F()},document.addEventListener("click",N,!0)},re=j=>{Z(),Q.current=!1,ge(!1),K(0),ce(!1),C.current=!1,H.current=0,O.current="none";const Te=P.current;Te&&w(Zr(Te)),j<0?u():d()},J=j=>{if(Math.abs(j)>ow&&t.length>1){re(j);return}de(!0),K(0),pe()},W=j=>{if(j.touches.length!==1||Q.current)return;const Te=j.touches[0];$.current=!0,X.current={x:Te.clientX,y:Te.clientY},O.current="none",H.current=0,C.current=!1},Se=j=>{if(!X.current||j.touches.length!==1||Q.current)return;const Te=j.touches[0],Fe=Te.clientX-X.current.x,Ye=Te.clientY-X.current.y;if(O.current==="none"){if(Math.abs(Fe)<10&&Math.abs(Ye)<10)return;if(Math.abs(Fe)>Math.abs(Ye)){if(t.length<=1)return;O.current="horizontal"}else if(Ye>0)O.current="vertical";else return}if(O.current==="horizontal"){C.current=!0,ce(!0),H.current=Fe,K(Fe),j.preventDefault();return}O.current==="vertical"&&(C.current=!0,ce(!0),B.current=Ye,M(Ye),j.preventDefault())},le=()=>{if(!X.current)return;const j=O.current,Te=C.current;if(Te&&j==="horizontal")J(H.current),ne();else if(Te&&j==="vertical")if(B.current>iw){const Ye=window.innerHeight;B.current=Ye,ue(!0),M(Ye),z("closing")}else B.current=0,M(0),ne();else j==="horizontal"&&Math.abs(H.current)>0&&(J(H.current),ne());X.current=null,O.current="none",H.current=0,C.current=!1,ce(!1)};return document.addEventListener("touchstart",W,{passive:!0}),document.addEventListener("touchmove",Se,{passive:!1}),document.addEventListener("touchend",le),document.addEventListener("touchcancel",le),()=>{document.removeEventListener("touchstart",W),document.removeEventListener("touchmove",Se),document.removeEventListener("touchend",le),document.removeEventListener("touchcancel",le),F()}},[V,t.length,u,d,de,pe,Z]),s.useEffect(()=>{const N=F=>{F.key==="Escape"&&(F.preventDefault(),F.stopPropagation(),V!=="closing"&&z("closing"))};return window.addEventListener("keydown",N,!0),()=>window.removeEventListener("keydown",N,!0)},[V]);const me=()=>{V!=="closing"&&z("closing")},ve=V==="open",Ee=V==="closing",Re=U>0?Math.max(0,1-U/500):1,Ce=U>0?Math.max(.35,1-U/500):1,$e=N=>{if(N.stopPropagation(),$.current){$.current=!1;return}if(t.length<=1)return;const F=N.currentTarget.getBoundingClientRect(),ne=N.clientY-F.top,re=Math.min(52,F.height*.2);if(!(ne>F.height-re)){if(N.clientX-F.left<F.width/2){d();return}u()}},m=N=>{if(t.length<=1)return;const F=N.currentTarget.getBoundingClientRect(),ne=N.clientX-F.left,re=N.clientY-F.top,J=Math.min(52,F.height*.2);if(re>F.height-J){N.currentTarget.style.cursor="default";return}N.currentTarget.style.cursor=ne<F.width/2?"w-resize":"e-resize"},Y=s.useCallback(N=>{N.propertyName!=="transform"||!Q.current||(Z(),de(!1))},[Z,de]),te=se?`translateX(${f}px)`:U>0?`translateY(${U}px)`:void 0,oe={position:"fixed",top:T==null?void 0:T.top,left:T==null?void 0:T.left,width:T==null?void 0:T.width,height:T==null?void 0:T.height,objectFit:i==="cover"?"cover":"contain",transform:te,opacity:U>0?Ce:V==="opening"||Ee?0:1,transition:k&&!G?"none":G?`transform ${Jn}ms ${Bi}`:I?`transform ${Jn}ms ${Bi}, opacity ${Jn}ms ${Bi}`:V==="opening"||Ee?`opacity ${Jn}ms ${Bi}`:"none",pointerEvents:Le&&ve&&!se?"auto":"none",touchAction:Le&&ve?"none":void 0,zIndex:9998},fe=T?{position:"fixed",top:T.top,height:T.height,width:T.width/2,zIndex:9999}:null;return a.jsxs("div",{className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:V==="open"?"none":void 0},onClick:me,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:x,opacity:ve?Re:0,transition:k?"none":`opacity ${Jn}ms ${Bi}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:L?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:P,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 ${Jn}ms ${Bi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:p,style:y,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:P,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 ${Jn}ms ${Bi}`},children:t.length>1&&a.jsxs("p",{className:p,style:y,children:[n+1," / ",t.length]})})]})}),T&&xe&&(Le?a.jsx(yw,{src:xe.assetId,phase:V,mediaRef:q,mediaStyle:oe,onLoadedMetadata:ie,onClick:$e,onMouseMove:m,onTransitionEnd:Y},`${n}-${xe.assetId}`):a.jsx("img",{ref:q,src:xe.assetId,alt:xe.name,onLoad:ie,onTransitionEnd:Y,style:oe},`${n}-${xe.assetId}`)),ve&&fe&&t.length>1&&!Le&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...fe,left:T.left,cursor:"w-resize",pointerEvents:se?"none":"auto"},onClick:N=>{if($.current){$.current=!1;return}N.stopPropagation(),d()}}),a.jsx("div",{style:{...fe,left:T.left+T.width/2,cursor:"e-resize",pointerEvents:se?"none":"auto"},onClick:N=>{if($.current){$.current=!1;return}N.stopPropagation(),u()}})]}),a.jsx(bw,{prefix:e,closeIcon:g,closeIconMaxWidth:h,closeIconColor:b,closeIconHoverColor:S,iconMarginRight:_,contentMarginTop:v,isEditor:o,isPreviewMode:r,isEditMode:l,visible:ve,onClose:me})]})}function yd({P:e,media:t,imgWidth:n,cornerRadius:i,fillGalleryWidth:o,imageDisplay:r,isEditor:l,galleryPaddingBetween:c=0,showPaddingAfter:d=!1,showControls:u=!1,onMediaClick:p}){const y=`${e}-gallery-${Ys(t)?"video":"image"}`,x=r.display==="cover",g=hw(r),h=H=>E.scalingValue(H,l??!1),b=n??mo,S=o?{width:"100%",maxWidth:"100%"}:{width:h(b),maxWidth:"100%"},_=i?{borderRadius:h(i)}:{},v={...S,...x?{aspectRatio:g,height:"auto",overflow:"hidden"}:{},..._},L={...x?{display:"block",width:"100%",height:"100%",objectFit:"cover",maxWidth:"100%"}:{display:"block",maxWidth:"100%",height:"auto",width:o?"100%":h(b)},...p?{cursor:"pointer",pointerEvents:"auto"}:{},...x?{}:_},q={className:y,style:L,onClick:p?H=>{H.stopPropagation(),p()}:void 0},X=Math.max(c,ti),B=Ys(t)?a.jsx("video",{...q,src:t.assetId,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):a.jsx("img",{...q,src:t.assetId,alt:t.name??""});return a.jsxs("div",{className:`${e}-gallery-item`,children:[x?a.jsx("div",{style:v,children:B}):B,d&&c>0&&a.jsx("div",{className:`${e}-padding-handle`,style:{height:h(c)},"aria-hidden":"true"}),u&&d&&a.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:h(X)}})]})}function ww({P:e,layoutType:t,galleryWidthStyle:n,galleryPaddingRight:i,galleryPaddingLeft:o,galleryPaddingRightWidth:r,galleryPaddingLeftWidth:l,galleryPaddingMaxFraction:c,showControls:d,scaled:u,children:p}){const y=t==="a"?i:t==="c"?o:0,x=y>0||d;return a.jsxs("div",{className:`${e}-gallery-controls`,children:[t==="c"&&x&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(y)},"aria-hidden":"true"}),d&&t==="c"&&a.jsx("div",{"data-controls":"galleryPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(c),className:`${e}-control-anchor`,style:{top:0,left:0,width:u(l),height:"100%"}}),a.jsx("div",{className:`${e}-gallery`,style:n,children:p}),t==="a"&&x&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(y)},"aria-hidden":"true"}),d&&t==="a"&&a.jsx("div",{"data-controls":"galleryPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(c),className:`${e}-control-anchor`,style:{top:0,right:0,width:u(r),height:"100%"}})]})}function $w(e){switch(e){case"fade":case"retype":case"scroll":return e;case"default":return"scroll";default:return"scroll"}}function Jr({P:e,controlKey:t,scaled:n,height:i,paired:o,side:r}){return a.jsx("div",{"data-controls":t,...o?{"data-controls-paired":""}:{},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{...r==="top"?{top:0}:{bottom:0},left:0,width:"100%",height:n(i)}})}function vd({P:e,controlKey:t,scaled:n,width:i,maxFraction:o,side:r,paired:l,anchorStyle:c}){return a.jsx("div",{"data-controls":t,...l?{"data-controls-paired":""}:{},"data-controls-axis":"x","data-controls-variant":"column-padding",...r==="right"?{"data-controls-reverse":""}:{},"data-controls-min":"0","data-controls-max-fraction":String(o),className:`${e}-control-anchor`,style:{top:0,...r==="left"?{left:0}:{right:0},width:n(i),height:"100%",...c}})}function Ts({P:e,title:t,description:n,position:i,titleRef:o,titleClassName:r,titleContainerStyle:l,titleTextBoxStyle:c,titleStyle:d,descriptionClassName:u,descriptionStyle:p,descriptionPadding:y,showTextBoxOutline:x=!1,showDescriptionPaddingControl:g=!1,descriptionPaddingPaired:h=!1,topPaddingControl:b,bottomPaddingControl:S}){const _=s.useRef(null),[v,L]=s.useState(0),P=t??"",q=n??"",X=q.length>0,{horizontal:B,vertical:H}=Gl(i),O=H==="center"||H==="bottom",C=H==="bottom";s.useLayoutEffect(()=>{if(!O)return;const T=_.current;if(!T||typeof ResizeObserver>"u")return;const w=()=>L(T.offsetHeight);w();const V=new ResizeObserver(w);return V.observe(T),()=>V.disconnect()},[P,q,O]);const $=a.jsx("span",{className:`${e}-title-text`,style:d,children:P}),Q=X?a.jsx("span",{className:u,style:p,children:q}):null,R=X?a.jsx("div",{className:`${e}-title-texts-gap`,style:{height:y},children:g&&a.jsx("div",{"data-controls":"titleDescriptionPadding",...h?{"data-controls-paired":""}:{},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{top:0,left:0,width:"100%",height:"100%"}})}):null;return a.jsx("div",{ref:T=>{_.current=T,o(T)},className:[r,`${e}-title-h-${B}`,`${e}-title-v-${H}`].join(" "),style:{...O?{[`--${e}-title-height`]:`${v}px`}:{},...l},children:a.jsxs("div",{className:`${e}-title-text-stack`,style:c,children:[b,a.jsx("div",{className:x?`${e}-title-text-inner`:`${e}-title-text-inner-hidden`,style:{width:"100%"},children:a.jsx("div",{className:`${e}-title-texts`,children:C?a.jsxs(a.Fragment,{children:[Q,R,$]}):a.jsxs(a.Fragment,{children:[$,R,Q]})})}),S]})})}const xd=45;function bd(e,t,n){let i=e;for(;i;){const o=getComputedStyle(i).getPropertyValue(t).trim();if(o){const r=parseFloat(o);if(!Number.isNaN(r))return r}i=i.parentElement}return n}function Cw(e){const t=bd(e,"--cntrl-viewport-height",window.innerHeight),n=bd(e,"--cntrl-article-top",0);return{top:n,height:t,centerY:n+t/2}}function Tw(e,t,n){const{vertical:i}=Gl(t),{top:o,height:r,centerY:l}=Cw(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 Iw(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=Tw(u,n,d);return Math.exp(-(p*p)/(2*xd*xd))});let o=0,r=-1;return i.forEach((l,c)=>{l>r&&(r=l,o=c)}),{opacities:i,dominantIndex:o}}function Lw(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(Iw(i,e,n))},p=()=>{d||(d=window.requestAnimationFrame(()=>{d=0,u()}))};return u(),window.addEventListener("scroll",p,{passive:!0}),window.addEventListener("resize",p,{passive:!0}),()=>{d&&window.cancelAnimationFrame(d),window.removeEventListener("scroll",p),window.removeEventListener("resize",p)}},[t,e,n]),{setTitleRef:d=>u=>{i.current[d]=u},opacities:o,dominantIndex:r}}function Sd(e,t){const[n,i]=s.useState(e),o=s.useRef(e);return s.useEffect(()=>{if(!t){o.current=e,i(e);return}const r=Array.from(o.current),l=Array.from(e),c=Math.max(r.length,l.length);if(c===0||o.current===e)return;let d=0;const u=window.setInterval(()=>{d+=1;const p=[...l.slice(0,d),...r.slice(d)].join("");o.current=p,i(p),d>=c&&window.clearInterval(u)},70);return()=>window.clearInterval(u)},[t,e]),n}function Pw({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,portalId:r}){var dt,yt;const{prefix:l}=E.useScopedStyles(),c=s.useMemo(()=>JS(l),[l]),d=t??[],u=(e==null?void 0:e.wrapperWidth)??1,p=(e==null?void 0:e.type)??"a",y=(e==null?void 0:e.imgWidth)??mo,x=(e==null?void 0:e.titleWidth)??gw,g=mw(e==null?void 0:e.imageDisplay),h=(e==null?void 0:e.cornerRadius)??QS,b=tw(e==null?void 0:e.position),{horizontal:S,vertical:_}=Gl(b),v=(e==null?void 0:e.titleTopPadding)??0,L=(e==null?void 0:e.titleBottomPadding)??0,P=(e==null?void 0:e.titleLeftPadding)??0,q=(e==null?void 0:e.titleRightPadding)??0,X=(e==null?void 0:e.titleDescriptionPadding)??0,B=$w(e==null?void 0:e.transition),H=(e==null?void 0:e.lightbox)??"on",O=p==="b",C=B==="fade"||B==="retype",{setTitleRef:$,dominantIndex:Q}=Lw(d.length,C,b),R=((dt=d[Q])==null?void 0:dt.title)??"",T=((yt=d[Q])==null?void 0:yt.description)??"",w=Sd(R,B==="retype"),V=Sd(T,B==="retype"),z=B==="fade"||B==="retype",U=B==="retype"?w:R,M=B==="retype"?V:T,f=O?void 0:{width:E.scalingValue(y,n??!1)},K=H==="on"&&(!n||i||o),G=o??!1,ge=(e==null?void 0:e.galleryPaddingRight)??0,k=(e==null?void 0:e.galleryPaddingLeft)??0,ce=(e==null?void 0:e.galleryPaddingBetween)??0,I=ut=>E.scalingValue(ut,n??!1),ee={width:I(x)},xe=p==="a"?ge:k,Le=O?{width:"100%"}:{width:`calc(100% - ${I(y)} - ${I(xe)})`,...p==="c"?{marginLeft:"auto"}:{}},se=Math.max(ge,ti),de=Math.max(k,ti),Z=Math.max(ce,ti),pe=Math.max(v,ti),ie=Math.max(L,ti),me=Math.max(P,ti),ve=Math.max(q,ti),Ee=Math.max(X,ti),Re=Math.max(0,(u??1)-(y??mo)),Ce=p==="a"?Math.max(0,(u??1)-(y??mo)-ge):p==="c"?Math.max(0,(u??1)-(y??mo)-k):p==="b"?u??1:1,$e=G&&_==="top",m=G&&_==="bottom",Y=G&&S==="left",te=G&&S==="right",oe=d.length>1,fe=O?void 0:I((p==="c"?k:ge)+(y??mo)),N=p==="c"&&fe?{left:fe}:void 0,F=p==="a"&&fe?{right:fe}:void 0,ne=O?{left:0,width:"100%"}:p==="a"?{right:I(ge),width:I(y)}:{left:I(k),width:I(y)},{titleColor:re,titleFontFamily:J,titleFontSettings:W,titleFontSize:Se,titleLineHeight:le,titleLetterSpacing:j,titleWordSpacing:Te,titleAlign:Fe,titleTextAppearance:Ye,descriptionColor:De,descriptionFontFamily:ze,descriptionFontSettings:Ze,descriptionFontSize:Ue,descriptionLineHeight:ye,descriptionLetterSpacing:_e,descriptionWordSpacing:Ve,descriptionAlign:Je,descriptionTextAppearance:et,lightboxCounterColor:ot,lightboxCounterFontFamily:lt,lightboxCounterFontSettings:Ke,lightboxCounterFontSize:ht,lightboxCounterLineHeight:tt,lightboxCounterLetterSpacing:Ge,lightboxCounterWordSpacing:We,lightboxCounterTextAppearance:Ne}=e??{},be={fontSettings:{fontFamily:J,fontWeight:(W==null?void 0:W.fontWeight)??400,fontStyle:(W==null?void 0:W.fontStyle)??"normal"},fontSize:Se??.01,lineHeight:le,letterSpacing:j??0,wordSpacing:Te??0,textAlign:Fe??"left",textAppearance:Ye,color:re??"#000000"},Xe=pn(nn(be,n)),ct=ee,rt={...Cs(Se,le,l,n),...Cs(Ue,ye,l,n,"description-leading-gap")},xt=$s(Se,le,`${l}-title`,`${l}-text-tight-leading`),pt={fontSettings:{fontFamily:ze,fontWeight:(Ze==null?void 0:Ze.fontWeight)??400,fontStyle:(Ze==null?void 0:Ze.fontStyle)??"normal"},fontSize:Ue??.01,lineHeight:ye,letterSpacing:_e??0,wordSpacing:Ve??0,textAlign:Je??"left",textAppearance:et,color:De??"#000000"},It=pn(nn(pt,n)),nt=$s(Ue,ye,`${l}-description-text`,`${l}-description-tight-leading`),bt=I(G?Ee:X),Lt={fontSettings:{fontFamily:lt,fontWeight:(Ke==null?void 0:Ke.fontWeight)??400,fontStyle:(Ke==null?void 0:Ke.fontStyle)??"normal"},fontSize:ht??.01,lineHeight:tt,letterSpacing:Ge??0,wordSpacing:We??0,textAppearance:Ne,color:ot??"#DEDDDD"},Ft={...pn(nn(Lt,n)),...Cs(ht,tt,l,n)},Me=$s(ht,tt,`${l}-lightbox-counter`,`${l}-text-tight-leading`),Oe=E.buildColorVars(l,{titleColor:re??"#000000",descriptionColor:De??"#000000",lightboxCounterColor:ot??"#DEDDDD"},rw,aw),St=s.useRef(null),[Mt,Qe]=s.useState(!1),[kt,Bt]=s.useState([]),[Wt,At]=s.useState(0),Ae=s.useCallback((ut,it)=>{K&&(Bt(ut),At(it),Qe(!0))},[K]),ft=s.useCallback(()=>{Qe(!1)},[]),gt=s.useMemo(()=>{const ut={...Oe},it=St.current?getComputedStyle(St.current).getPropertyValue("--cntrl-article-width").trim():"";return it&&(ut["--cntrl-article-width"]=it),ut},[Oe,Mt]);return s.useEffect(()=>{if(!Mt||H!=="on"||typeof document>"u")return;const ut=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ut}},[Mt,H]),s.useEffect(()=>{!n||o||i||Qe(!1)},[n,o,i]),s.useEffect(()=>{H==="off"&&Qe(!1)},[H]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),a.jsx("div",{style:Oe,children:a.jsxs("div",{ref:St,className:`${l}-wrapper`,style:{width:E.scalingValue(u,n??!1),[`--${l}-title-top-padding`]:_==="top"?I(v):void 0,[`--${l}-title-bottom-padding`]:_==="bottom"?I(L):void 0,[`--${l}-title-left-padding`]:S==="left"?I(P):void 0,[`--${l}-title-right-padding`]:S==="right"?I(q):void 0},children:[z&&a.jsx("div",{className:`${l}-single-title-layer`,children:a.jsx(Ts,{P:l,title:U,description:M,position:b,titleRef:()=>{},titleClassName:`${xt} ${l}-single-title`,titleContainerStyle:{...rt,...Le},titleTextBoxStyle:ct,titleStyle:Xe,descriptionClassName:nt,descriptionStyle:It,descriptionPadding:bt,showTextBoxOutline:G,showDescriptionPaddingControl:G,topPaddingControl:$e?Jr({P:l,controlKey:"titleTopPadding",scaled:I,height:pe,paired:!1,side:"top"}):void 0,bottomPaddingControl:m?Jr({P:l,controlKey:"titleBottomPadding",scaled:I,height:ie,paired:!1,side:"bottom"}):void 0})}),d.map((ut,it)=>{const Nt=dw(ut.gallery),$t=it<d.length-1,Qt=Nt.filter(Ot=>Ot.lightboxMedia).map(Ot=>Ot.lightboxMedia),Xt={P:l,position:b,titleRef:$(it),titleClassName:xt,titleContainerStyle:rt,titleTextBoxStyle:z?{maxWidth:"100%"}:ct,titleStyle:Xe,descriptionClassName:nt,descriptionStyle:It,descriptionPadding:bt,showTextBoxOutline:G&&!z,showDescriptionPaddingControl:G&&!z,descriptionPaddingPaired:oe,topPaddingControl:$e&&!z?Jr({P:l,controlKey:"titleTopPadding",scaled:I,height:pe,paired:oe,side:"top"}):void 0,bottomPaddingControl:m&&!z?Jr({P:l,controlKey:"titleBottomPadding",scaled:I,height:ie,paired:oe,side:"bottom"}):void 0};return a.jsxs("div",{"data-item-index":it,className:`${l}-item ${l}-item-${p}`,style:{paddingBottom:$t?I(ce):void 0},children:[Y&&vd({P:l,controlKey:"titleLeftPadding",scaled:I,width:me,maxFraction:Ce,side:"left",paired:oe,anchorStyle:N}),te&&vd({P:l,controlKey:"titleRightPadding",scaled:I,width:ve,maxFraction:Ce,side:"right",paired:oe,anchorStyle:F}),G&&$t&&a.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-control-anchor`,style:{bottom:0,height:I(Z),...ne}}),O?a.jsxs("div",{className:`${l}-gallery`,children:[a.jsx("div",{className:`${l}-gallery-media`,children:Nt.map(({displayMedia:Ot,lightboxMedia:jt},Dt)=>{const zt=jt?Qt.findIndex(D=>D.assetId===jt.assetId):-1;return a.jsx(yd,{P:l,media:Ot,imgWidth:y||void 0,cornerRadius:h||void 0,imageDisplay:g,isEditor:n,galleryPaddingBetween:ce,showPaddingAfter:Dt<Nt.length-1,showControls:G,onMediaClick:K&&zt>=0?()=>Ae(Qt,zt):void 0},`${Ot.assetId}-${Dt}`)})}),a.jsx("div",{className:`${l}-title-layer`,children:a.jsx(Ts,{...Xt,title:z?"":ut.title,description:z?"":ut.description})})]}):a.jsxs(a.Fragment,{children:[a.jsx(Ts,{...Xt,title:z?"":ut.title,description:z?"":ut.description}),Nt.length>0&&a.jsx(ww,{P:l,layoutType:p,galleryWidthStyle:f,galleryPaddingRight:ge,galleryPaddingLeft:k,galleryPaddingRightWidth:se,galleryPaddingLeftWidth:de,galleryPaddingMaxFraction:Re,showControls:G,scaled:I,children:Nt.map(({displayMedia:Ot,lightboxMedia:jt},Dt)=>{const zt=jt?Qt.findIndex(D=>D.assetId===jt.assetId):-1;return a.jsx(yd,{P:l,media:Ot,cornerRadius:h||void 0,fillGalleryWidth:!0,imageDisplay:g,isEditor:n,galleryPaddingBetween:ce,showPaddingAfter:Dt<Nt.length-1,showControls:G,onMediaClick:K&&zt>=0?()=>Ae(Qt,zt):void 0},`${Ot.assetId}-${Dt}`)})})]})]},it)})]})}),Mt&&H==="on"&&typeof document<"u"&&e&&(()=>{const ut=(r?document.getElementById(r):null)??document.body;return qn.createPortal(a.jsx("div",{style:gt,"data-selection":"none",children:a.jsx(Sw,{prefix:l,items:kt,index:Wt,imageDisplay:fw(e.lightboxImageDisplay),isEditor:n,isPreviewMode:i,isEditMode:o,closeIcon:e.closeIcon,closeIconMaxWidth:e.closeIconMaxWidth,closeIconColor:e.closeIconColor,closeIconHoverColor:e.closeIconHoverColor,iconMarginRight:e.iconMarginRight,contentMarginTop:e.contentMarginTop,onClose:ft,onPrev:()=>At(it=>(it-1+kt.length)%kt.length),onNext:()=>At(it=>(it+1)%kt.length),counterClassName:Me,counterStyle:Ft,backgroundColor:e.backgroundColor??nw})}),ut)})()]})}const Mw=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
21399
21399
  import { createPortal } from 'react-dom';
21400
21400
  import type React from 'react';
21401
21401
  import { CommonComponentProps } from '../props';
@@ -23933,7 +23933,7 @@ export function Mercury({
23933
23933
  object-fit: cover;
23934
23934
  object-position: center;
23935
23935
  }
23936
- `}function Ep(e){return Number(e.toFixed(4))}function wd(e,t,n,i){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,Math.round(r))):t}function Is(e,t,n=0,i=9999){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,r)):t}function Kw(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 Qw(e){const[t,n]=e.ratioValue.split(":").map(Number),i=e.reversed?n:t;return(e.reversed?t:n)/i}function Zw(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.name??"")||/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.assetId??"")}function kp(e,t){return(1-e)/(1-e*Math.cos(t))}function Jw(e){let t=0;for(let n=0;n<360;n+=1){const i=n*Math.PI/180;t=Math.max(t,Math.abs(Math.sin(i)*kp(e,i)))}return t||1}function e$(e,t){return e?1:1+Rp*(.35+t)}function t$(e,t,n,i){const o=t*e$(n,i);return Math.max(0,(e-o)/2)}function n$(e,t,n){const i=kp(e,n);return{offset:Math.sin(n)*i/t,scale:i}}function i$(e,t,n){return e/2+t*n}function o$(e,t,n){return`translate(calc(${e(t)} - var(--helix-base-w) / 2), -50%) scale(${Ep(n)})`}function r$(e){return Math.round(e*1e3)}function Ap(e,t,n){const i=Math.cos(e),o=Math.cos(qw*Math.PI/2);if(i>=o)return n;const r=(i+1)/(o+1);return Ep(t+(n-t)*r)}function a$(e){return Ap(e,Vw,Gw)}function s$(e){return Ap(e,Xw,Uw)}function l$(e,t){if(!t)return"none";const n=s$(e);return n<=0?"none":`blur(${n}px)`}function $d(e,t){const n=t*Math.PI*2,{offset:i,scale:o}=n$(e.depthFactor,e.spreadFactor,n),r=i$(e.width,e.orbitRadius,i);return{transform:o$(e.scaled,r,o),zIndex:r$(o),opacity:a$(n),filter:l$(n,e.blurEnabled)}}function Fp(e,t){return(e%t+t)%t}function c$(e,t){return Xl(e,t)/t}function Xl(e,t){return Fp(e,t)}function d$(e,t){return Math.floor(e/t)}function u$(e,t,n,i){return d$(e,t)*n+Xl(e,t)*i}function Cd(e){const t=Math.sin(e*12.9898)*43758.5453;return t-Math.floor(t)}function ha(e){const t=e%1;return t<0?t+1:t}function p$(e,t,n){const i=t/Mp,o=n==="left"?-e*i:e*i;return ha(o)}function g$({settings:e,content:t,isEditor:n,isPreviewMode:i}){const{prefix:o}=E.useScopedStyles(),r=s.useRef(null),l=Is((e==null?void 0:e.width)??(e==null?void 0:e.spread)??(e==null?void 0:e.wrapperWidth),_w),c=Is(e==null?void 0:e.imageWidth,Hw),d=Is(e==null?void 0:e.turnHeight,Ww),u=wd(e==null?void 0:e.itemsPerTurn,Ow,3,40),p=wd(e==null?void 0:e.turns,Dw,1,30),y=Math.min(jw,Math.max(0,zw)),x=Math.min(1,Math.max(0,Bw)),g=Math.max(0,(e==null?void 0:e.speed)??Mp),f=(e==null?void 0:e.direction)==="left"?"left":"right",b=(e==null?void 0:e.playback)==="scroll"?"scroll":"autoplay",S=(e==null?void 0:e.cornerRadius)??0,W=(e==null?void 0:e.blur)!=="off",v=s.useMemo(()=>Kw(e==null?void 0:e.imageDisplay),[e==null?void 0:e.imageDisplay]),L=v.display==="cover",M=I=>E.scalingValue(I,n??!1),U=s.useMemo(()=>Jw(y),[y]),G=s.useMemo(()=>t$(l,c,L,x),[l,c,L,x]),B=s.useMemo(()=>Yw(o),[o]),N=s.useMemo(()=>({scaled:I=>E.scalingValue(I,n??!1),width:l,orbitRadius:G,depthFactor:y,spreadFactor:U,blurEnabled:W}),[n,l,G,y,U,W]),O=s.useRef([]),C=s.useRef(0),$=s.useMemo(()=>(t??[]).filter(I=>{var ue;return!!((ue=I.image)!=null&&ue.assetId)}),[t]),K=d/u,R=c*Qw(v),w=Math.min(Fw,p*u),T=Nw*u,j=w+T*2,Q=Math.max(0,p-1)*d+(u-1)*K,P=g>0,h=b==="scroll"&&P,J=b==="autoplay"&&P&&(n?!!i:!0),V=J?360/(g*Aw):0,me=$.length===0?0:j,k=s.useMemo(()=>Array.from({length:me},(I,ue)=>c$(ue-T,u)),[me,T,u]);s.useEffect(()=>{if(!J&&!h)return;const I=r.current;if(!I)return;const ue=oe=>{C.current=oe,k.forEach((ge,be)=>{const Re=O.current[be];if(!Re)return;const Ee=$d(N,ha(ge+oe));Re.style.transform=Ee.transform,Re.style.zIndex=String(Ee.zIndex),Re.style.opacity=String(Ee.opacity),Re.style.filter=Ee.filter})};if(h){const oe=I.ownerDocument.defaultView??window,ge=()=>{const Re=I.getBoundingClientRect(),Ee=oe.innerHeight||I.ownerDocument.documentElement.clientHeight,Te=Ee+Re.height;if(Te<=0)return;const we=Math.min(1,Math.max(0,(Ee-Re.top)/Te));ue(p$(we,g,f))};ge(),oe.addEventListener("scroll",ge,{passive:!0,capture:!0}),oe.addEventListener("resize",ge);const be=new ResizeObserver(ge);return be.observe(I),()=>{oe.removeEventListener("scroll",ge,{capture:!0}),oe.removeEventListener("resize",ge),be.disconnect()}}const ee=f==="left"?-1:1;let xe=null,Le=null;const ce=oe=>{if(Le!==null){const ge=(oe-Le)/1e3/V*ee;C.current=ha(C.current+ge)}Le=oe,ue(C.current),xe=requestAnimationFrame(ce)},de=()=>{xe===null&&(Le=null,xe=requestAnimationFrame(ce))},Z=()=>{xe!==null&&cancelAnimationFrame(xe),xe=null},pe=new IntersectionObserver(([oe])=>{oe!=null&&oe.isIntersecting?de():Z()});return pe.observe(I),()=>{Z(),pe.disconnect()}},[J,h,k,N,V,g,f]);const le=J||h?C.current:0;return $.length===0?a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:B}}),a.jsx("div",{className:`${o}-wrapper`,style:{width:M(l)}})]}):a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:B}}),a.jsx("div",{ref:r,className:`${o}-wrapper`,style:{width:M(l),height:M(Q)},children:Array.from({length:j},(I,ue)=>{const ee=ue-T,Le=$[Fp(ee,$.length)].image,ce=Xl(ee,u),de=k[ue],Z=u$(ee,u,d,K),pe=x===0?0:(Cd(ce+7.3)-.5)*x*K,oe=L?1:1+(Cd(ce+3.1)-.5)*2*Rp*(.35+x),ge=c*oe,be={"--helix-base-w":M(ge),...L?{"--helix-base-h":M(R)}:{}},Re={top:M(Z+pe),...be,...$d(N,ha(de+le))},Ee=S>0?{borderRadius:M(S)}:{},Te=L?{...Ee,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"}:Ee,we=Zw(Le)?a.jsx("video",{className:`${o}-media`,style:Te,src:Le.assetId,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:`${o}-media`,style:Te,src:Le.assetId,alt:Le.name??"",loading:"lazy",decoding:"async"});return a.jsx("div",{ref:m=>{O.current[ue]=m},className:L?`${o}-item ${o}-item-cover`:`${o}-item`,style:Re,children:L?a.jsx("div",{className:`${o}-cover`,style:Ee,children:we}):we},`${p}-${u}-${ee}`)})})]})}const m$=`import { useEffect, useMemo, useRef, type CSSProperties } from 'react';
23936
+ `}function Ep(e){return Number(e.toFixed(4))}function wd(e,t,n,i){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,Math.round(r))):t}function Is(e,t,n=0,i=9999){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,r)):t}function Kw(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 Qw(e){const[t,n]=e.ratioValue.split(":").map(Number),i=e.reversed?n:t;return(e.reversed?t:n)/i}function Zw(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.name??"")||/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.assetId??"")}function kp(e,t){return(1-e)/(1-e*Math.cos(t))}function Jw(e){let t=0;for(let n=0;n<360;n+=1){const i=n*Math.PI/180;t=Math.max(t,Math.abs(Math.sin(i)*kp(e,i)))}return t||1}function e$(e,t){return e?1:1+Rp*(.35+t)}function t$(e,t,n,i){const o=t*e$(n,i);return Math.max(0,(e-o)/2)}function n$(e,t,n){const i=kp(e,n);return{offset:Math.sin(n)*i/t,scale:i}}function i$(e,t,n){return e/2+t*n}function o$(e,t,n){return`translate(calc(${e(t)} - var(--helix-base-w) / 2), -50%) scale(${Ep(n)})`}function r$(e){return Math.round(e*1e3)}function Ap(e,t,n){const i=Math.cos(e),o=Math.cos(qw*Math.PI/2);if(i>=o)return n;const r=(i+1)/(o+1);return Ep(t+(n-t)*r)}function a$(e){return Ap(e,Vw,Gw)}function s$(e){return Ap(e,Xw,Uw)}function l$(e,t){if(!t)return"none";const n=s$(e);return n<=0?"none":`blur(${n}px)`}function $d(e,t){const n=t*Math.PI*2,{offset:i,scale:o}=n$(e.depthFactor,e.spreadFactor,n),r=i$(e.width,e.orbitRadius,i);return{transform:o$(e.scaled,r,o),zIndex:r$(o),opacity:a$(n),filter:l$(n,e.blurEnabled)}}function Fp(e,t){return(e%t+t)%t}function c$(e,t){return Xl(e,t)/t}function Xl(e,t){return Fp(e,t)}function d$(e,t){return Math.floor(e/t)}function u$(e,t,n,i){return d$(e,t)*n+Xl(e,t)*i}function Cd(e){const t=Math.sin(e*12.9898)*43758.5453;return t-Math.floor(t)}function ha(e){const t=e%1;return t<0?t+1:t}function p$(e,t,n){const i=t/Mp,o=n==="left"?-e*i:e*i;return ha(o)}function g$({settings:e,content:t,isEditor:n,isPreviewMode:i}){const{prefix:o}=E.useScopedStyles(),r=s.useRef(null),l=Is((e==null?void 0:e.width)??(e==null?void 0:e.spread)??(e==null?void 0:e.wrapperWidth),_w),c=Is(e==null?void 0:e.imageWidth,Hw),d=Is(e==null?void 0:e.turnHeight,Ww),u=wd(e==null?void 0:e.itemsPerTurn,Ow,3,40),p=wd(e==null?void 0:e.turns,Dw,1,30),y=Math.min(jw,Math.max(0,zw)),x=Math.min(1,Math.max(0,Bw)),g=Math.max(0,(e==null?void 0:e.speed)??Mp),h=(e==null?void 0:e.direction)==="left"?"left":"right",b=(e==null?void 0:e.playback)==="scroll"?"scroll":"autoplay",S=(e==null?void 0:e.cornerRadius)??0,_=(e==null?void 0:e.blur)!=="off",v=s.useMemo(()=>Kw(e==null?void 0:e.imageDisplay),[e==null?void 0:e.imageDisplay]),L=v.display==="cover",P=I=>E.scalingValue(I,n??!1),q=s.useMemo(()=>Jw(y),[y]),X=s.useMemo(()=>t$(l,c,L,x),[l,c,L,x]),B=s.useMemo(()=>Yw(o),[o]),H=s.useMemo(()=>({scaled:I=>E.scalingValue(I,n??!1),width:l,orbitRadius:X,depthFactor:y,spreadFactor:q,blurEnabled:_}),[n,l,X,y,q,_]),O=s.useRef([]),C=s.useRef(0),$=s.useMemo(()=>(t??[]).filter(I=>{var ue;return!!((ue=I.image)!=null&&ue.assetId)}),[t]),Q=d/u,R=c*Qw(v),T=Math.min(Fw,p*u),w=Nw*u,V=T+w*2,U=Math.max(0,p-1)*d+(u-1)*Q,M=g>0,f=b==="scroll"&&M,K=b==="autoplay"&&M&&(n?!!i:!0),G=K?360/(g*Aw):0,ge=$.length===0?0:V,k=s.useMemo(()=>Array.from({length:ge},(I,ue)=>c$(ue-w,u)),[ge,w,u]);s.useEffect(()=>{if(!K&&!f)return;const I=r.current;if(!I)return;const ue=ie=>{C.current=ie,k.forEach((me,ve)=>{const Ee=O.current[ve];if(!Ee)return;const Re=$d(H,ha(me+ie));Ee.style.transform=Re.transform,Ee.style.zIndex=String(Re.zIndex),Ee.style.opacity=String(Re.opacity),Ee.style.filter=Re.filter})};if(f){const ie=I.ownerDocument.defaultView??window,me=()=>{const Ee=I.getBoundingClientRect(),Re=ie.innerHeight||I.ownerDocument.documentElement.clientHeight,Ce=Re+Ee.height;if(Ce<=0)return;const $e=Math.min(1,Math.max(0,(Re-Ee.top)/Ce));ue(p$($e,g,h))};me(),ie.addEventListener("scroll",me,{passive:!0,capture:!0}),ie.addEventListener("resize",me);const ve=new ResizeObserver(me);return ve.observe(I),()=>{ie.removeEventListener("scroll",me,{capture:!0}),ie.removeEventListener("resize",me),ve.disconnect()}}const ee=h==="left"?-1:1;let xe=null,Le=null;const se=ie=>{if(Le!==null){const me=(ie-Le)/1e3/G*ee;C.current=ha(C.current+me)}Le=ie,ue(C.current),xe=requestAnimationFrame(se)},de=()=>{xe===null&&(Le=null,xe=requestAnimationFrame(se))},Z=()=>{xe!==null&&cancelAnimationFrame(xe),xe=null},pe=new IntersectionObserver(([ie])=>{ie!=null&&ie.isIntersecting?de():Z()});return pe.observe(I),()=>{Z(),pe.disconnect()}},[K,f,k,H,G,g,h]);const ce=K||f?C.current:0;return $.length===0?a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:B}}),a.jsx("div",{className:`${o}-wrapper`,style:{width:P(l)}})]}):a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:B}}),a.jsx("div",{ref:r,className:`${o}-wrapper`,style:{width:P(l),height:P(U)},children:Array.from({length:V},(I,ue)=>{const ee=ue-w,Le=$[Fp(ee,$.length)].image,se=Xl(ee,u),de=k[ue],Z=u$(ee,u,d,Q),pe=x===0?0:(Cd(se+7.3)-.5)*x*Q,ie=L?1:1+(Cd(se+3.1)-.5)*2*Rp*(.35+x),me=c*ie,ve={"--helix-base-w":P(me),...L?{"--helix-base-h":P(R)}:{}},Ee={top:P(Z+pe),...ve,...$d(H,ha(de+ce))},Re=S>0?{borderRadius:P(S)}:{},Ce=L?{...Re,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"}:Re,$e=Zw(Le)?a.jsx("video",{className:`${o}-media`,style:Ce,src:Le.assetId,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:`${o}-media`,style:Ce,src:Le.assetId,alt:Le.name??"",loading:"lazy",decoding:"async"});return a.jsx("div",{ref:m=>{O.current[ue]=m},className:L?`${o}-item ${o}-item-cover`:`${o}-item`,style:Ee,children:L?a.jsx("div",{className:`${o}-cover`,style:Re,children:$e}):$e},`${p}-${u}-${ee}`)})})]})}const m$=`import { useEffect, useMemo, useRef, type CSSProperties } from 'react';
23937
23937
  import { CommonComponentProps } from '../props';
23938
23938
  import { scalingValue } from '../utils/scalingValue';
23939
23939
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -24493,7 +24493,7 @@ export function Helix({
24493
24493
  </>
24494
24494
  );
24495
24495
  }
24496
- `,h$=["01M3QM74XEA13H9Z3AZF1NGY48","01M3QM74XEZJJC5STVP0WF2GN3","01M3QM74XE170PHTE4A34MKNP3","01M3QM74XEZD3SDVVQZ1TF9JPA","01M3QM74XEPJWV4ZR7R3JPS67H"],f$={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]}}}}},default:h$.map(e=>({image:{assetId:e,name:""}}))},settings:{sizing:"auto auto",properties:{width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},turnHeight:{type:"number",scope:"layout",title:"Turn height",display:{type:"numeric-input"},min:0,max:9999},itemsPerTurn:{type:"number",scope:"common",title:"Per turn",display:{type:"common-numeric-input"},min:3,max:40},turns:{type:"number",scope:"common",title:"Turns",display:{type:"common-numeric-input"},min:1,max:30},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},playback:{type:"string",scope:"common",title:"Playback",display:{type:"toggle-cycle",enum:["autoplay","scroll"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},blur:{type:"string",scope:"common",title:"Blur",display:{type:"toggle-cycle",enum:["on","off"]}}},defaults:{itemsPerTurn:14,turns:3,direction:"right",playback:"autoplay",blur:"off",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1}},layoutDefaults:{d:{defaultPaddingTop:30/1440,width:800/1440,imageWidth:160/1440,turnHeight:380/1440,speed:2.2,cornerRadius:0},m:{defaultPaddingTop:10/375,width:320/375,imageWidth:75/375,turnHeight:310/375,speed:2.8,cornerRadius:0},t:{defaultPaddingTop:20/768,width:620/768,imageWidth:100/768,turnHeight:280/768,speed:2.8,cornerRadius:0}},layout:["__componentName__","width","imageWidth","turnHeight","itemsPerTurn","turns","playback","speed","direction","imageDisplay","cornerRadius","blur"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",items:["direction","speed"]},{type:"row",items:["width"]},{type:"row",items:["imageWidth","turnHeight"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",items:["itemsPerTurn","turns"]},{type:"row",items:["playback","blur"]}]}]},y$={element:g$,id:"helix",name:"Helix",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Helix.mp4"},version:1,defaultSize:{d:{width:720,height:540}},schema:f$,sourceCode:m$,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Tn=300,rn=300,v$=8/1440,fo=.004,x$=50,b$=1440,Xi=x$/b$;function S$(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 $$(e){return e==="left"||e==="right"?e:"center"}function C$(e,t,n){const i=E.scalingValue(t,n);return e==="center"?`translateX(calc(-50% + ${i}))`:`translateX(${i})`}function T$(e,t){if(e&&typeof e=="object"){if(t&&typeof e[t]=="string")return e[t];for(const n in e)if(typeof e[n]=="string")return e[n];return}return e}function Np(e,t){const n=(T$(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 I$(e,t,n){switch(Np(e.showIn,n)){case"open only":return!1;case"open and compact":return t==="compact";case"default and compact":return!0;case"default and open":return t==="default";default:return!0}}function L$(e,t){switch(Np(e.showIn,t)){case"default and compact":return!1;default:return!0}}function P$(e){return(e==null?void 0:e.find(t=>t.slug===""))??(e==null?void 0:e[0])}function M$(e,t){const n=e?t==null?void 0:t.find(i=>i.id===e):P$(t);return!e&&!n?"":n?n.slug===""?"/":`/${n.slug}`:e.startsWith("/")||e.startsWith("#")||/^[a-z][a-z\d+\-.]*:/i.test(e)?e:t?`/${e}`:e}function Td(e){const t=(e??"").toLowerCase();return t==="blank"||t==="_blank"||t.includes("new")}function _p(e){const t=e.link;if(t&&typeof t=="object"){const i=Td(t.target)?"_blank":void 0;if(t.type==="url")return{type:"url",value:t.value??t.url??"",target:i};if(t.type==="anchor")return{type:"anchor",value:t.value??"",target:i};if(t.type==="page")return{type:"page",value:t.value??"",target:i,anchor:t.anchor};if(typeof t.url=="string")return{type:"url",value:t.url,target:i}}const n=Td(e.openIn)?"_blank":void 0;return e.mode==="url"?{type:"url",value:e.url??"",target:n}:{type:"page",value:e.page??"",target:n,anchor:e.anchor}}function Ks(e,t){const n=e.label||"Link",i=_p(e);if(i.type==="url")return{label:n,href:i.value,target:i.target};if(i.type==="anchor"){const c=i.value.replace(/^#/,"");return{label:n,href:c?`#${c}`:"",target:i.target}}const o=M$(i.value,t),r=(i.anchor??"").replace(/^#/,""),l=r?o?`${o}#${r}`:`#${r}`:o;return{label:n,href:l,target:i.target}}const $i=24,wi=$i*.125,Hp=$i*.125,Ls=($i-(3*wi+2*Hp))/2,Id=wi+Hp;function R$({className:e,lineClassName:t}){return a.jsxs("svg",{className:e,viewBox:`0 0 ${$i} ${$i}`,"aria-hidden":"true",children:[a.jsx("rect",{className:`${t} ${t}-top`,x:"0",y:Ls,width:$i,height:wi,rx:wi/2}),a.jsx("rect",{className:`${t} ${t}-mid`,x:"0",y:Ls+Id,width:$i,height:wi,rx:wi/2}),a.jsx("rect",{className:`${t} ${t}-bot`,x:"0",y:Ls+2*Id,width:$i,height:wi,rx:wi/2})]})}function E$(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function k$(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:E.scalingValue((o-t)/2,i)}}const Wp=.004;let er;function A$(){return er!==void 0?er:typeof document>"u"?(er=null,null):(er=document.createElement("canvas").getContext("2d"),er)}function F$(e){const t=getComputedStyle(e),n=parseFloat(t.fontSize)||0;if(n<=0)return 0;const i=A$();if(!i)return 0;i.font=`${t.fontStyle} ${t.fontWeight} ${n}px ${t.fontFamily}`;const o=i.measureText("H"),r=o.actualBoundingBoxAscent>0?o.actualBoundingBoxAscent:0,l=Math.max(0,o.actualBoundingBoxDescent||0),c=o.fontBoundingBoxAscent||0,d=o.fontBoundingBoxDescent||0;return r<=0||c<=0&&d<=0?0:(d-l-(c-r))/2/n}function Ld(e,t){const[n,i]=s.useState(0);return s.useLayoutEffect(()=>{const o=e.current;if(!o)return;const r=()=>{const d=F$(o);i(u=>Math.abs(u-d)<Wp?u:d)};r();const l=document.fonts;l.ready.then(r).catch(()=>{}),l.addEventListener("loadingdone",r);const c=new ResizeObserver(r);return c.observe(o),()=>{l.removeEventListener("loadingdone",r),c.disconnect()}},[e,t]),n}function Pd(e){if(!(Math.abs(e)<Wp))return`translateY(${e}em)`}function Md(e){var t,n;return[e.fontFamily??"",((t=e.fontSettings)==null?void 0:t.fontWeight)??400,((n=e.fontSettings)==null?void 0:n.fontStyle)??"normal",e.fontSize??"",e.lineHeight??""].join("\0")}function Rd(e){return{fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontSize:e.fontSize,lineHeight:e.lineHeight,position:"absolute",top:0,left:0,visibility:"hidden",pointerEvents:"none",whiteSpace:"nowrap"}}function Ed(e,t={}){return{fontFamily:e.fontFamily??t.fontFamily,fontSettings:e.fontSettings??t.fontSettings,fontSize:e.fontSize??t.fontSize,lineHeight:e.lineHeight??t.lineHeight,letterSpacing:e.letterSpacing??t.letterSpacing??0,wordSpacing:e.wordSpacing??t.wordSpacing??0,textAlign:e.textAlign??t.textAlign??"left",textAppearance:e.textAppearance??t.textAppearance}}function kd(e,t,n){var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??.01,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing??0,wordSpacing:t.wordSpacing??0,textAlign:t.textAlign,textAppearance:t.textAppearance,color:""};return{css:{...pn(nn(i,n)),...k$(t.fontSize,t.lineHeight,e,n)},className:E$(t.fontSize,t.lineHeight,`${e}-link-text`,`${e}-text-tight-leading`)}}function Ad(e){const t=e.split(/\r?\n/);return t.length===1?e:t.map((n,i)=>a.jsxs(s.Fragment,{children:[n,i<t.length-1?a.jsx("br",{}):null]},i))}function Fd(e,t,n,i){const o=Math.max(0,n-i),r=e+t;if(r<=o||r<=0)return{start:e,end:t};const l=o/r;return{start:e*l,end:t*l}}function Op(e){const n=Math.max(Xi,e.fontSize??Xi),{start:i,end:o}=Fd(e.textPaddingTop,e.textPaddingBottom,1,n),{start:r,end:l}=Fd(e.textPaddingLeft,e.textPaddingRight,1,Xi);return{effectivePaddingLeft:r,effectivePaddingRight:l,effectivePaddingTop:i,effectivePaddingBottom:o,panelSize:1}}function N$(e){if(e==="center"||e==="center-center")return{horizontalAlign:"center",verticalAlign:"center"};const[t,n]=e.split("-");return{horizontalAlign:t,verticalAlign:n}}function _$(e){return e.position?N$(e.position):{horizontalAlign:e.horizontalAlign??"left",verticalAlign:e.verticalAlign??"top"}}function H$(e,t){return e.textPaddingLeft!==t.textPaddingLeft||e.textPaddingRight!==t.textPaddingRight||e.textPaddingTop!==t.textPaddingTop||e.textPaddingBottom!==t.textPaddingBottom}const W$=[["onScrollIconColor","compactIconColor"],["onScrollLinkColor","compactLinkColor"],["onScrollLogoColor","compactLogoColor"],["onScrollBackgroundColor","compactBackgroundColor"],["onScrollPanelColor","compactBackgroundColor"],["onScrollLogoMaxWidth","compactLogoMaxWidth"],["onScrollLogoMaxHeight","compactLogoMaxHeight"],["onScrollLogoPosition","compactLogoPosition"],["onScrollPanelHeight","compactPanelHeight"],["onScrollIconSize","compactIconSize"],["onScrollNavTextWidth","compactNavTextWidth"],["onScrollNavGap","compactNavGap"],["onScrollNavPaddingLeft","compactNavPaddingLeft"],["onScrollNavPaddingRight","compactNavPaddingRight"],["onScrollFontFamily","compactFontFamily"],["onScrollFontSettings","compactFontSettings"],["onScrollFontSize","compactFontSize"],["onScrollLineHeight","compactLineHeight"],["onScrollLetterSpacing","compactLetterSpacing"],["onScrollWordSpacing","compactWordSpacing"],["onScrollTextAlign","compactTextAlign"],["onScrollTextAppearance","compactTextAppearance"]];function Dp(e){var o,r;const t=e,n={};for(const[l,c]of W$)e[c]!==void 0||t[l]===void 0||(n[c]=t[l]);const i=t.stateOverrides;return i&&(i.onScroll!==void 0||i["onScroll-hover"]!==void 0)&&(n.stateOverrides={...e.stateOverrides},i.onScroll!==void 0&&((o=e.stateOverrides)==null?void 0:o.compact)===void 0&&(n.stateOverrides.compact=i.onScroll),i["onScroll-hover"]!==void 0&&((r=e.stateOverrides)==null?void 0:r["compact-hover"])===void 0&&(n.stateOverrides["compact-hover"]=i["onScroll-hover"])),Object.keys(n).length===0?e:{...e,...n}}function Nd(e){var o,r,l,c,d,u,p,y,x,g,f,b,S,W,v,L;e=Dp(e);const t=e,n={};if(e.backgroundColor===void 0&&t.panelColor!==void 0&&(n.backgroundColor=t.panelColor),e.openFontFamily===void 0&&e.fontFamily!==void 0&&(n.openFontFamily=e.fontFamily),e.openFontSettings===void 0&&e.fontSettings!==void 0&&(n.openFontSettings=e.fontSettings),e.openFontSize===void 0&&e.fontSize!==void 0&&(n.openFontSize=e.fontSize),e.openLineHeight===void 0&&e.lineHeight!==void 0&&(n.openLineHeight=e.lineHeight),e.openLetterSpacing===void 0&&e.letterSpacing!==void 0&&(n.openLetterSpacing=e.letterSpacing),e.openWordSpacing===void 0&&e.wordSpacing!==void 0&&(n.openWordSpacing=e.wordSpacing),e.openTextAlign===void 0&&e.textAlign!==void 0&&(n.openTextAlign=e.textAlign),e.openTextAppearance===void 0&&e.textAppearance!==void 0&&(n.openTextAppearance=e.textAppearance),e.openLinkColor===void 0){const M=((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;M!==void 0&&(n.openLinkColor=M)}if(e.compactIconColor===void 0){const M=((u=(d=e.stateOverrides)==null?void 0:d.compact)==null?void 0:u.iconColor)??e.iconColor;M!==void 0&&(n.compactIconColor=M)}if(e.compactLinkColor===void 0){const M=((y=(p=e.stateOverrides)==null?void 0:p.compact)==null?void 0:y.linkColor)??e.linkColor;M!==void 0&&(n.compactLinkColor=M)}if(e.compactLogoColor===void 0){const M=((g=(x=e.stateOverrides)==null?void 0:x.compact)==null?void 0:g.logoColor)??e.logoColor;M!==void 0&&(n.compactLogoColor=M)}if(e.openLogoColor===void 0){const M=((b=(f=e.stateOverrides)==null?void 0:f.open)==null?void 0:b.logoColor)??e.logoColor;M!==void 0&&(n.openLogoColor=M)}if(e.compactBackgroundColor===void 0){const M=((W=(S=e.stateOverrides)==null?void 0:S.compact)==null?void 0:W.backgroundColor)??((L=(v=t.stateOverrides)==null?void 0:v.compact)==null?void 0:L.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,U)=>{if(e[M]!==void 0)return;const G=e[U];G!==void 0&&(n[M]=G)};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 O$(e,t){const n=Op({textPaddingLeft:e.textPaddingLeft??0,textPaddingRight:e.textPaddingRight??0,textPaddingTop:e.textPaddingTop??0,textPaddingBottom:e.textPaddingBottom??0,fontSize:e.openFontSize??e.fontSize??t.openFontSize??t.fontSize}),i={};return(e.textPaddingLeft??0)!==n.effectivePaddingLeft&&(i.textPaddingLeft=n.effectivePaddingLeft),(e.textPaddingRight??0)!==n.effectivePaddingRight&&(i.textPaddingRight=n.effectivePaddingRight),(e.textPaddingTop??0)!==n.effectivePaddingTop&&(i.textPaddingTop=n.effectivePaddingTop),(e.textPaddingBottom??0)!==n.effectivePaddingBottom&&(i.textPaddingBottom=n.effectivePaddingBottom),Object.keys(i).length===0?e:{...e,...i}}function D$(e,t){return{paddingLeft:E.scalingValue(e.effectivePaddingLeft,t),paddingRight:E.scalingValue(e.effectivePaddingRight,t),paddingTop:E.scalingValue(e.effectivePaddingTop,t),paddingBottom:E.scalingValue(e.effectivePaddingBottom,t)}}function z$(e,t,n,i){const o=Math.max(Xi,n??Xi),r=Math.max(t.effectivePaddingTop,fo),l=Math.max(t.effectivePaddingBottom,fo),c=Math.max(0,t.panelSize-t.effectivePaddingBottom-o),d=Math.max(0,t.panelSize-t.effectivePaddingTop-o),u=Math.max(t.effectivePaddingLeft,fo),p=Math.max(t.effectivePaddingRight,fo),y=Math.max(0,t.panelSize-t.effectivePaddingRight-Xi),x=Math.max(0,t.panelSize-t.effectivePaddingLeft-Xi);return a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"textPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-max-fraction":String(c),className:`${e}-control-anchor`,style:{top:0,left:0,width:"100%",height:i(r)}}),a.jsx("div",{"data-controls":"textPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(d),className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:i(l)}}),a.jsx("div",{"data-controls":"textPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(y),className:`${e}-control-anchor`,style:{top:0,left:0,width:i(u),height:"100%"}}),a.jsx("div",{"data-controls":"textPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(x),className:`${e}-control-anchor`,style:{top:0,right:0,width:i(p),height:"100%"}})]})}const B$={iconColor:"icon-color",closeButtonColor:"close-button-color",linkColor:"link-color",openLinkColor:"menu-link-color",compactIconColor:"compact-icon-color",compactLinkColor:"compact-link-color",compactLogoColor:"compact-logo-color",compactBackgroundColor:"compact-background-color",openLogoColor:"open-logo-color",menuBackgroundColor:"menu-background-color",overlayColor:"overlay-color",backgroundColor:"background-color",logoColor:"logo-color"},j$=["hover","open"],V$={top:"flex-start",center:"center",bottom:"flex-end"},G$={left:"flex-start",center:"center",right:"flex-end"};function X$(e){return`
24496
+ `,h$=["01M3QM74XEA13H9Z3AZF1NGY48","01M3QM74XEZJJC5STVP0WF2GN3","01M3QM74XE170PHTE4A34MKNP3","01M3QM74XEZD3SDVVQZ1TF9JPA","01M3QM74XEPJWV4ZR7R3JPS67H"],f$={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]}}}}},default:h$.map(e=>({image:{assetId:e,name:""}}))},settings:{sizing:"auto auto",properties:{width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},turnHeight:{type:"number",scope:"layout",title:"Turn height",display:{type:"numeric-input"},min:0,max:9999},itemsPerTurn:{type:"number",scope:"common",title:"Per turn",display:{type:"common-numeric-input"},min:3,max:40},turns:{type:"number",scope:"common",title:"Turns",display:{type:"common-numeric-input"},min:1,max:30},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},playback:{type:"string",scope:"common",title:"Playback",display:{type:"toggle-cycle",enum:["autoplay","scroll"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},blur:{type:"string",scope:"common",title:"Blur",display:{type:"toggle-cycle",enum:["on","off"]}}},defaults:{itemsPerTurn:14,turns:3,direction:"right",playback:"autoplay",blur:"off",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1}},layoutDefaults:{d:{defaultPaddingTop:30/1440,width:800/1440,imageWidth:160/1440,turnHeight:380/1440,speed:2.2,cornerRadius:0},m:{defaultPaddingTop:10/375,width:320/375,imageWidth:75/375,turnHeight:310/375,speed:2.8,cornerRadius:0},t:{defaultPaddingTop:20/768,width:620/768,imageWidth:100/768,turnHeight:280/768,speed:2.8,cornerRadius:0}},layout:["__componentName__","width","imageWidth","turnHeight","itemsPerTurn","turns","playback","speed","direction","imageDisplay","cornerRadius","blur"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",items:["direction","speed"]},{type:"row",items:["width"]},{type:"row",items:["imageWidth","turnHeight"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",items:["itemsPerTurn","turns"]},{type:"row",items:["playback","blur"]}]}]},y$={element:g$,id:"helix",name:"Helix",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Helix.mp4"},version:1,defaultSize:{d:{width:720,height:540}},schema:f$,sourceCode:m$,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Tn=300,rn=300,v$=8/1440,fo=.004,x$=50,b$=1440,Xi=x$/b$;function S$(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 $$(e){return e==="left"||e==="right"?e:"center"}function C$(e,t,n){const i=E.scalingValue(t,n);return e==="center"?`translateX(calc(-50% + ${i}))`:`translateX(${i})`}function T$(e,t){if(e&&typeof e=="object"){if(t&&typeof e[t]=="string")return e[t];for(const n in e)if(typeof e[n]=="string")return e[n];return}return e}function Np(e,t){const n=(T$(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 I$(e,t,n){switch(Np(e.showIn,n)){case"open only":return!1;case"open and compact":return t==="compact";case"default and compact":return!0;case"default and open":return t==="default";default:return!0}}function L$(e,t){switch(Np(e.showIn,t)){case"default and compact":return!1;default:return!0}}function P$(e){return(e==null?void 0:e.find(t=>t.slug===""))??(e==null?void 0:e[0])}function M$(e,t){const n=e?t==null?void 0:t.find(i=>i.id===e):P$(t);return!e&&!n?"":n?n.slug===""?"/":`/${n.slug}`:e.startsWith("/")||e.startsWith("#")||/^[a-z][a-z\d+\-.]*:/i.test(e)?e:t?`/${e}`:e}function Td(e){const t=(e??"").toLowerCase();return t==="blank"||t==="_blank"||t.includes("new")}function _p(e){const t=e.link;if(t&&typeof t=="object"){const i=Td(t.target)?"_blank":void 0;if(t.type==="url")return{type:"url",value:t.value??t.url??"",target:i};if(t.type==="anchor")return{type:"anchor",value:t.value??"",target:i};if(t.type==="page")return{type:"page",value:t.value??"",target:i,anchor:t.anchor};if(typeof t.url=="string")return{type:"url",value:t.url,target:i}}const n=Td(e.openIn)?"_blank":void 0;return e.mode==="url"?{type:"url",value:e.url??"",target:n}:{type:"page",value:e.page??"",target:n,anchor:e.anchor}}function Ks(e,t){const n=e.label||"Link",i=_p(e);if(i.type==="url")return{label:n,href:i.value,target:i.target};if(i.type==="anchor"){const c=i.value.replace(/^#/,"");return{label:n,href:c?`#${c}`:"",target:i.target}}const o=M$(i.value,t),r=(i.anchor??"").replace(/^#/,""),l=r?o?`${o}#${r}`:`#${r}`:o;return{label:n,href:l,target:i.target}}const $i=24,wi=$i*.125,Hp=$i*.125,Ls=($i-(3*wi+2*Hp))/2,Id=wi+Hp;function R$({className:e,lineClassName:t}){return a.jsxs("svg",{className:e,viewBox:`0 0 ${$i} ${$i}`,"aria-hidden":"true",children:[a.jsx("rect",{className:`${t} ${t}-top`,x:"0",y:Ls,width:$i,height:wi,rx:wi/2}),a.jsx("rect",{className:`${t} ${t}-mid`,x:"0",y:Ls+Id,width:$i,height:wi,rx:wi/2}),a.jsx("rect",{className:`${t} ${t}-bot`,x:"0",y:Ls+2*Id,width:$i,height:wi,rx:wi/2})]})}function E$(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function k$(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:E.scalingValue((o-t)/2,i)}}const Wp=.004;let er;function A$(){return er!==void 0?er:typeof document>"u"?(er=null,null):(er=document.createElement("canvas").getContext("2d"),er)}function F$(e){const t=getComputedStyle(e),n=parseFloat(t.fontSize)||0;if(n<=0)return 0;const i=A$();if(!i)return 0;i.font=`${t.fontStyle} ${t.fontWeight} ${n}px ${t.fontFamily}`;const o=i.measureText("H"),r=o.actualBoundingBoxAscent>0?o.actualBoundingBoxAscent:0,l=Math.max(0,o.actualBoundingBoxDescent||0),c=o.fontBoundingBoxAscent||0,d=o.fontBoundingBoxDescent||0;return r<=0||c<=0&&d<=0?0:(d-l-(c-r))/2/n}function Ld(e,t){const[n,i]=s.useState(0);return s.useLayoutEffect(()=>{const o=e.current;if(!o)return;const r=()=>{const d=F$(o);i(u=>Math.abs(u-d)<Wp?u:d)};r();const l=document.fonts;l.ready.then(r).catch(()=>{}),l.addEventListener("loadingdone",r);const c=new ResizeObserver(r);return c.observe(o),()=>{l.removeEventListener("loadingdone",r),c.disconnect()}},[e,t]),n}function Pd(e){if(!(Math.abs(e)<Wp))return`translateY(${e}em)`}function Md(e){var t,n;return[e.fontFamily??"",((t=e.fontSettings)==null?void 0:t.fontWeight)??400,((n=e.fontSettings)==null?void 0:n.fontStyle)??"normal",e.fontSize??"",e.lineHeight??""].join("\0")}function Rd(e){return{fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontSize:e.fontSize,lineHeight:e.lineHeight,position:"absolute",top:0,left:0,visibility:"hidden",pointerEvents:"none",whiteSpace:"nowrap"}}function Ed(e,t={}){return{fontFamily:e.fontFamily??t.fontFamily,fontSettings:e.fontSettings??t.fontSettings,fontSize:e.fontSize??t.fontSize,lineHeight:e.lineHeight??t.lineHeight,letterSpacing:e.letterSpacing??t.letterSpacing??0,wordSpacing:e.wordSpacing??t.wordSpacing??0,textAlign:e.textAlign??t.textAlign??"left",textAppearance:e.textAppearance??t.textAppearance}}function kd(e,t,n){var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??.01,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing??0,wordSpacing:t.wordSpacing??0,textAlign:t.textAlign,textAppearance:t.textAppearance,color:""};return{css:{...pn(nn(i,n)),...k$(t.fontSize,t.lineHeight,e,n)},className:E$(t.fontSize,t.lineHeight,`${e}-link-text`,`${e}-text-tight-leading`)}}function Ad(e){const t=e.split(/\r?\n/);return t.length===1?e:t.map((n,i)=>a.jsxs(s.Fragment,{children:[n,i<t.length-1?a.jsx("br",{}):null]},i))}function Fd(e,t,n,i){const o=Math.max(0,n-i),r=e+t;if(r<=o||r<=0)return{start:e,end:t};const l=o/r;return{start:e*l,end:t*l}}function Op(e){const n=Math.max(Xi,e.fontSize??Xi),{start:i,end:o}=Fd(e.textPaddingTop,e.textPaddingBottom,1,n),{start:r,end:l}=Fd(e.textPaddingLeft,e.textPaddingRight,1,Xi);return{effectivePaddingLeft:r,effectivePaddingRight:l,effectivePaddingTop:i,effectivePaddingBottom:o,panelSize:1}}function N$(e){if(e==="center"||e==="center-center")return{horizontalAlign:"center",verticalAlign:"center"};const[t,n]=e.split("-");return{horizontalAlign:t,verticalAlign:n}}function _$(e){return e.position?N$(e.position):{horizontalAlign:e.horizontalAlign??"left",verticalAlign:e.verticalAlign??"top"}}function H$(e,t){return e.textPaddingLeft!==t.textPaddingLeft||e.textPaddingRight!==t.textPaddingRight||e.textPaddingTop!==t.textPaddingTop||e.textPaddingBottom!==t.textPaddingBottom}const W$=[["onScrollIconColor","compactIconColor"],["onScrollLinkColor","compactLinkColor"],["onScrollLogoColor","compactLogoColor"],["onScrollBackgroundColor","compactBackgroundColor"],["onScrollPanelColor","compactBackgroundColor"],["onScrollLogoMaxWidth","compactLogoMaxWidth"],["onScrollLogoMaxHeight","compactLogoMaxHeight"],["onScrollLogoPosition","compactLogoPosition"],["onScrollPanelHeight","compactPanelHeight"],["onScrollIconSize","compactIconSize"],["onScrollNavTextWidth","compactNavTextWidth"],["onScrollNavGap","compactNavGap"],["onScrollNavPaddingLeft","compactNavPaddingLeft"],["onScrollNavPaddingRight","compactNavPaddingRight"],["onScrollFontFamily","compactFontFamily"],["onScrollFontSettings","compactFontSettings"],["onScrollFontSize","compactFontSize"],["onScrollLineHeight","compactLineHeight"],["onScrollLetterSpacing","compactLetterSpacing"],["onScrollWordSpacing","compactWordSpacing"],["onScrollTextAlign","compactTextAlign"],["onScrollTextAppearance","compactTextAppearance"]];function Dp(e){var o,r;const t=e,n={};for(const[l,c]of W$)e[c]!==void 0||t[l]===void 0||(n[c]=t[l]);const i=t.stateOverrides;return i&&(i.onScroll!==void 0||i["onScroll-hover"]!==void 0)&&(n.stateOverrides={...e.stateOverrides},i.onScroll!==void 0&&((o=e.stateOverrides)==null?void 0:o.compact)===void 0&&(n.stateOverrides.compact=i.onScroll),i["onScroll-hover"]!==void 0&&((r=e.stateOverrides)==null?void 0:r["compact-hover"])===void 0&&(n.stateOverrides["compact-hover"]=i["onScroll-hover"])),Object.keys(n).length===0?e:{...e,...n}}function Nd(e){var o,r,l,c,d,u,p,y,x,g,h,b,S,_,v,L;e=Dp(e);const t=e,n={};if(e.backgroundColor===void 0&&t.panelColor!==void 0&&(n.backgroundColor=t.panelColor),e.openFontFamily===void 0&&e.fontFamily!==void 0&&(n.openFontFamily=e.fontFamily),e.openFontSettings===void 0&&e.fontSettings!==void 0&&(n.openFontSettings=e.fontSettings),e.openFontSize===void 0&&e.fontSize!==void 0&&(n.openFontSize=e.fontSize),e.openLineHeight===void 0&&e.lineHeight!==void 0&&(n.openLineHeight=e.lineHeight),e.openLetterSpacing===void 0&&e.letterSpacing!==void 0&&(n.openLetterSpacing=e.letterSpacing),e.openWordSpacing===void 0&&e.wordSpacing!==void 0&&(n.openWordSpacing=e.wordSpacing),e.openTextAlign===void 0&&e.textAlign!==void 0&&(n.openTextAlign=e.textAlign),e.openTextAppearance===void 0&&e.textAppearance!==void 0&&(n.openTextAppearance=e.textAppearance),e.openLinkColor===void 0){const P=((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;P!==void 0&&(n.openLinkColor=P)}if(e.compactIconColor===void 0){const P=((u=(d=e.stateOverrides)==null?void 0:d.compact)==null?void 0:u.iconColor)??e.iconColor;P!==void 0&&(n.compactIconColor=P)}if(e.compactLinkColor===void 0){const P=((y=(p=e.stateOverrides)==null?void 0:p.compact)==null?void 0:y.linkColor)??e.linkColor;P!==void 0&&(n.compactLinkColor=P)}if(e.compactLogoColor===void 0){const P=((g=(x=e.stateOverrides)==null?void 0:x.compact)==null?void 0:g.logoColor)??e.logoColor;P!==void 0&&(n.compactLogoColor=P)}if(e.openLogoColor===void 0){const P=((b=(h=e.stateOverrides)==null?void 0:h.open)==null?void 0:b.logoColor)??e.logoColor;P!==void 0&&(n.openLogoColor=P)}if(e.compactBackgroundColor===void 0){const P=((_=(S=e.stateOverrides)==null?void 0:S.compact)==null?void 0:_.backgroundColor)??((L=(v=t.stateOverrides)==null?void 0:v.compact)==null?void 0:L.panelColor)??t.compactPanelColor??t.onScrollPanelColor??e.backgroundColor??n.backgroundColor;P!==void 0&&(n.compactBackgroundColor=P)}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=(P,q)=>{if(e[P]!==void 0)return;const X=e[q];X!==void 0&&(n[P]=X)};return i("compactLogoMaxHeight","logoMaxHeight"),i("compactLogoPosition","logoPosition"),i("compactPanelHeight","panelHeight"),i("compactShowIcon","showIcon"),i("compactIconSize","iconSize"),i("compactNavTextWidth","navTextWidth"),i("compactNavTextPosition","navTextPosition"),i("compactNavTextOffset","navTextOffset"),i("compactNavGap","navGap"),i("compactNavPaddingLeft","navPaddingLeft"),i("compactNavPaddingRight","navPaddingRight"),i("compactFontFamily","fontFamily"),i("compactFontSettings","fontSettings"),i("compactFontSize","fontSize"),i("compactLineHeight","lineHeight"),i("compactLetterSpacing","letterSpacing"),i("compactWordSpacing","wordSpacing"),i("compactTextAlign","textAlign"),i("compactTextAppearance","textAppearance"),Object.keys(n).length===0?e:{...e,...n}}function O$(e,t){const n=Op({textPaddingLeft:e.textPaddingLeft??0,textPaddingRight:e.textPaddingRight??0,textPaddingTop:e.textPaddingTop??0,textPaddingBottom:e.textPaddingBottom??0,fontSize:e.openFontSize??e.fontSize??t.openFontSize??t.fontSize}),i={};return(e.textPaddingLeft??0)!==n.effectivePaddingLeft&&(i.textPaddingLeft=n.effectivePaddingLeft),(e.textPaddingRight??0)!==n.effectivePaddingRight&&(i.textPaddingRight=n.effectivePaddingRight),(e.textPaddingTop??0)!==n.effectivePaddingTop&&(i.textPaddingTop=n.effectivePaddingTop),(e.textPaddingBottom??0)!==n.effectivePaddingBottom&&(i.textPaddingBottom=n.effectivePaddingBottom),Object.keys(i).length===0?e:{...e,...i}}function D$(e,t){return{paddingLeft:E.scalingValue(e.effectivePaddingLeft,t),paddingRight:E.scalingValue(e.effectivePaddingRight,t),paddingTop:E.scalingValue(e.effectivePaddingTop,t),paddingBottom:E.scalingValue(e.effectivePaddingBottom,t)}}function z$(e,t,n,i){const o=Math.max(Xi,n??Xi),r=Math.max(t.effectivePaddingTop,fo),l=Math.max(t.effectivePaddingBottom,fo),c=Math.max(0,t.panelSize-t.effectivePaddingBottom-o),d=Math.max(0,t.panelSize-t.effectivePaddingTop-o),u=Math.max(t.effectivePaddingLeft,fo),p=Math.max(t.effectivePaddingRight,fo),y=Math.max(0,t.panelSize-t.effectivePaddingRight-Xi),x=Math.max(0,t.panelSize-t.effectivePaddingLeft-Xi);return a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"textPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-max-fraction":String(c),className:`${e}-control-anchor`,style:{top:0,left:0,width:"100%",height:i(r)}}),a.jsx("div",{"data-controls":"textPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(d),className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:i(l)}}),a.jsx("div",{"data-controls":"textPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(y),className:`${e}-control-anchor`,style:{top:0,left:0,width:i(u),height:"100%"}}),a.jsx("div",{"data-controls":"textPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(x),className:`${e}-control-anchor`,style:{top:0,right:0,width:i(p),height:"100%"}})]})}const B$={iconColor:"icon-color",closeButtonColor:"close-button-color",linkColor:"link-color",openLinkColor:"menu-link-color",compactIconColor:"compact-icon-color",compactLinkColor:"compact-link-color",compactLogoColor:"compact-logo-color",compactBackgroundColor:"compact-background-color",openLogoColor:"open-logo-color",menuBackgroundColor:"menu-background-color",overlayColor:"overlay-color",backgroundColor:"background-color",logoColor:"logo-color"},j$=["hover","open"],V$={top:"flex-start",center:"center",bottom:"flex-end"},G$={left:"flex-start",center:"center",right:"flex-end"};function X$(e){return`
24497
24497
  .${e}-root {
24498
24498
  position: relative;
24499
24499
  display: block;
@@ -25153,7 +25153,7 @@ export function Helix({
25153
25153
  word-spacing ${rn}ms ease,
25154
25154
  padding ${rn}ms ease;
25155
25155
  }
25156
- `}function Qs(e){return e?!e.startsWith("http://")&&!e.startsWith("https://")&&!e.startsWith("blob:")&&!e.startsWith("data:"):!1}function U$(e,t){var i;const n=(i=e.logo)==null?void 0:i.icon;return!e.logo||Qs(n)||!t?e:{...e,logo:{...e.logo,icon:t}}}function q$(e){return`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`}function Y$(e){const t=e.trim().toLowerCase();return t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")?!0:t.includes(".svg")}function K$(e){const t=Y$(e),[n,i]=s.useState(!1);return s.useEffect(()=>{if(t||!e.startsWith("blob:")){i(!1);return}let o=!1;return fetch(e).then(r=>r.blob()).then(async r=>{if(o)return;if(r.type.includes("svg")){i(!0);return}if(r.type.startsWith("image/")&&!r.type.includes("svg")){i(!1);return}const l=await r.text();o||i(/<svg[\s>]/i.test(l.trim()))}).catch(()=>{o||i(!1)}),()=>{o=!0}},[t,e]),t||n}function Q$(e,t){const[n,i]=s.useState(yr(e)?e:null);return s.useEffect(()=>{if(!t||!e){i(null);return}if(yr(e)){i(e);return}let o=!1;return qu(e).then(r=>{o||i(r)}).catch(()=>{o||i(null)}),()=>{o=!0}},[t,e]),t?n:null}function Z$(e){const t=e.indexOf("#");if(t===-1)return"";try{return decodeURIComponent(e.slice(t+1))}catch{return e.slice(t+1)}}function J$(e){if(!e||e.startsWith("#"))return!0;try{return new URL(e,window.location.href).pathname===window.location.pathname}catch{return!1}}function zp(e){if(!e)return null;const t=document.getElementById(e),n=document.querySelector(`[data-section-id="${CSS.escape(e)}"]`),i=t??n;return i instanceof HTMLElement?i:null}function _d(e){const t=zp(e);return t?(t.scrollIntoView({behavior:"smooth",block:"start"}),!0):!1}function eC(e,t,n={}){const{isEditor:i,isPreviewMode:o,item:r,pages:l,onLinkNavigate:c}=n,d=n.runAfterClose??(x=>x()),u=e.currentTarget.getAttribute("href")??"",p=Z$(u),y=e.currentTarget.target==="_blank";if(r&&c){e.preventDefault(),e.stopPropagation();const x=Ks(r,l),g=_p(r),f={mode:g.type==="url"?"url":"page",href:x.href||u,page:g.type==="page"?g.value:void 0,url:g.type==="url"?g.value:void 0,anchor:g.type==="anchor"?g.value.replace(/^#/,""):(g.anchor??"").replace(/^#/,""),target:x.target};f.target==="_blank"?c(f):d(()=>c(f)),t();return}if(i){e.preventDefault(),d(()=>_d(p)),t();return}!y&&p&&J$(u)&&zp(p)&&(e.preventDefault(),d(()=>_d(p))),t()}const tC=["--cntrl-article-width","--cntrl-article-top","--cntrl-article-left","--cntrl-viewport-height"];function nC(e){let t=e;for(;t;){if(getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim())return t;t=t.parentElement}return e}function iC(e){const t={},n=nC(e);if(!n)return t;const i=getComputedStyle(n);for(const o of tC){const r=i.getPropertyValue(o).trim();r&&(t[o]=r)}return t}function Hd(e,t,n,i,o){return a.jsx("span",{className:`${e}-link-text-box`,style:{width:o(n),maxWidth:"100%"},children:a.jsx("span",{className:i?`${e}-link-text-inner`:`${e}-link-text-inner-hidden`,style:{width:"100%"},children:t})})}function oC({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,activeEvent:o,currentState:r,isSwitchClone:l=!1,unavailableStates:c=[],layoutId:d,pages:u,onLinkNavigate:p,onUpdateSettings:y,onOpenChange:x}){var tc;const{prefix:g}=E.useScopedStyles(),f=s.useRef(null),b=s.useRef(null),S=s.useRef(null),W=s.useRef(null),v=s.useRef(null),L=s.useRef(0),M=s.useRef(null),U=s.useRef(null),G=s.useRef(d),B=s.useMemo(()=>X$(g),[g]),[N,O]=s.useState(!1),[C,$]=s.useState(!1),[K,R]=s.useState(!1),w=S$(r),T=s.useMemo(()=>new Set(c),[c]),j=_t=>!!(_t&&T.has(_t)),Q=!!(t&&!i&&w==="open"&&!j("open"))||!(t&&!i)&&N,P=!!(t&&!i),h=Q&&!P;jl(h),s.useEffect(()=>{if(!Q||!P)return;const _t=document.documentElement,Yt=_t.style.overflow;return _t.style.overflow="hidden",()=>{_t.style.overflow=Yt}},[Q,P]);const J=!j("compact")&&!j("onScroll"),V=!t||!!i&&!n,me=o&&o!=="default"?o:void 0,k=J&&w==="compact"?"compact":"default",[le,I]=s.useState(k),[ue,ee]=s.useState(!1),xe=!n;k!==le&&(I(k),xe&&ee(!0));const Le=Dp(e),{logo:ce,logoMaxHeight:de=120/1440,logoPosition:Z="left",panelHeight:pe=60/1440,backgroundColor:oe="#b3b3b3",logoColor:ge="#000000",position:be,horizontalAlign:Re,verticalAlign:Ee,iconColor:Te="#000000",showIcon:we="on",iconSize:m=16/1440,linkColor:Y="#000000",openLinkColor:te="#000000",compactIconColor:ae="#000000",compactLinkColor:fe="#000000",compactLogoColor:F="#000000",compactBackgroundColor:H="#ffffff",compactLogoMaxHeight:ne=120/1440,compactLogoPosition:q,compactPanelHeight:ie=60/1440,compactShowIcon:z="on",compactIconSize:$e=16/1440,compactNavTextWidth:re,compactNavTextPosition:X,compactNavTextOffset:Ce,compactNavGap:He,compactNavPaddingLeft:Ye=10/1440,compactNavPaddingRight:De=10/1440,compactFontFamily:ze,compactFontSettings:Ze,compactFontSize:Ue,compactLineHeight:ye,compactLetterSpacing:Ne=0,compactWordSpacing:Ve=0,compactTextAlign:Je="left",compactTextAppearance:et,openLogoColor:ot="#000000",menuBackgroundColor:lt="#ffffff",overlayColor:Ke="rgba(0, 0, 0, 0.45)",closeButtonColor:ht="#000000",effect:tt="fade",openPanelSize:Ge=100,textWidth:We=280/1440,navTextWidth:Fe,navTextPosition:ve="center",navTextOffset:_e=0,gap:Xe=0,navGap:ct,navPaddingLeft:rt=10/1440,navPaddingRight:xt=10/1440,textPaddingLeft:pt=10/1440,textPaddingRight:It=10/1440,textPaddingTop:nt=10/1440,textPaddingBottom:bt=10/1440,fontFamily:Lt,fontSettings:Ut,fontSize:Ft,lineHeight:Me,letterSpacing:Oe=0,wordSpacing:St=0,textAlign:Mt="left",textAppearance:Qe,openFontFamily:kt,openFontSettings:Bt,openFontSize:Wt,openLineHeight:At,openLetterSpacing:Ae,openWordSpacing:ft,openTextAlign:gt,openTextAppearance:dt,stateOverrides:yt,link:ut}=Le,{horizontalAlign:it,verticalAlign:Nt}=_$({position:be,horizontalAlign:Re,verticalAlign:Ee}),$t=k==="compact",Qt=$t?ne:de,Xt=w$($t?q:Z),Ot=$t?ie:pe,jt=$t?$e:m,Dt=$t?re:Fe,zt=$$($t?X:ve),D=($t?Ce:_e)??0,Ie=$t?He:ct,Be=$t?Ye:rt,ke=$t?De:xt,vt=Dt??We,Ct=Q||($t?z:we)!=="off",at=E.buildColorVars(g,{iconColor:Te,closeButtonColor:ht,linkColor:Y,openLinkColor:te,compactIconColor:ae,compactLinkColor:fe,compactLogoColor:F,compactBackgroundColor:H,openLogoColor:ot,menuBackgroundColor:lt,overlayColor:Ke,backgroundColor:oe,logoColor:ge},B$,j$,yt),Tt=Ed($t?{fontFamily:ze,fontSettings:Ze,fontSize:Ue,lineHeight:ye,letterSpacing:Ne,wordSpacing:Ve,textAlign:Je,textAppearance:et}:{fontFamily:Lt,fontSettings:Ut,fontSize:Ft,lineHeight:Me,letterSpacing:Oe,wordSpacing:St,textAlign:Mt,textAppearance:Qe}),Vt=Ed({fontFamily:kt,fontSettings:Bt,fontSize:Wt,lineHeight:At,letterSpacing:Ae,wordSpacing:ft,textAlign:gt,textAppearance:dt},Tt),Pt=kd(g,Tt,t),Zt=kd(g,Vt,t),on=Ld(S,Md(Tt)),Wn=Ld(W,Md(Vt)),xn={...Zt.css,whiteSpace:"pre-wrap",transform:Pd(Wn)},ui=Zt.className,dn=_t=>E.scalingValue(_t,t),pi=Ie??Xe,Kn=Math.max(Be,fo),bn=Math.max(ke,fo),gi=Math.max(0,1-jt),eo=Math.max(0,1-jt),Sn=n??!1,Qn=Sn&&!Q,to=s.useMemo(()=>Op({textPaddingLeft:pt,textPaddingRight:It,textPaddingTop:nt,textPaddingBottom:bt,fontSize:Vt.fontSize}),[pt,It,nt,bt,Vt.fontSize]),no=_t=>{const Yt=a.jsx("span",{className:ui,style:xn,children:Ad(_t)});return Hd(g,Yt,We,Sn,dn)},qe=tt==="left"||tt==="right"?{width:`${Ge}%`}:{height:`${Ge}%`},A={...D$(to,t),...qe,alignItems:G$[it],justifyContent:V$[Nt]},se=s.useRef(e),he=s.useRef(d),Pe=s.useRef(null);Qs((tc=e.logo)==null?void 0:tc.icon)&&(Pe.current=e.logo.icon),s.useEffect(()=>{var Nr;if(!y||!t){se.current=e,he.current=d;return}const _t=(Nr=e.logo)==null?void 0:Nr.icon;if(e.logo&&!Qs(_t)&&!Pe.current){se.current=e,he.current=d;return}const Yt=_r=>{y(U$(_r,Pe.current))};if(he.current!==d){se.current=e,he.current=d;const _r=Nd(e);_r!==e&&Yt(_r);return}const cn=Nd(e),fn=se.current,wn=fn!==e,An=wn?O$(cn,fn):cn;se.current=e;const io=cn!==e,Uo=wn&&H$(cn,An);!io&&!Uo||Yt(An)},[e,y,t,d]);const je=E.scalingValue(jt,t),mt={width:je,height:je,minWidth:je,minHeight:je,maxWidth:je,maxHeight:je},Ht={...Pt.css,textDecoration:"none",transform:Pd(on)},qt=Pt.className,sn=(ce==null?void 0:ce.mode)!=="Off",en=(ce==null?void 0:ce.icon)??"",mi=K$(en),kn=Q$(en,mi),Zn=!!kn,kr=dn(Math.min(Qt,Ot)),Xo=!!(sn&&en&&Xt==="right")?"left":"right",Ql=Array.isArray(ut)?ut:[],Ga=[k!=="default"?`${g}-state-${k}`:"",Q||w==="open"?`${g}-state-open`:"",me&&me!==k&&me!==w?`${g}-state-${me}`:""].filter(Boolean).join(" "),Zp=t&&!i?`${g}-editor`:"",Zl=V?`${g}-interactive`:"",Jp=xe&&(k!==le||ue)?`${g}-nav-state-anim`:"",eg=Q?`${g}-open`:"",tg=s.useMemo(()=>iC(f.current),[C,Q,d]),Xa=()=>{O(!1)},Ua=!t||i,ng=_t=>{if(h){U.current=_t;return}_t()};s.useEffect(()=>{if(Q)return;const _t=U.current;U.current=null,_t==null||_t()},[Q]);const Jl=(_t,Yt)=>{eC(_t,Xa,{isEditor:t,isPreviewMode:i,item:Yt,pages:u,onLinkNavigate:p,runAfterClose:ng})},ig=()=>{t&&!i||O(_t=>!_t)},og=_t=>{_t.pointerType==="touch"&&_t.currentTarget.blur()},Ar=()=>{M.current!==null&&(window.clearTimeout(M.current),M.current=null)};s.useEffect(()=>{if(!ue)return;const _t=window.setTimeout(()=>{ee(!1)},rn);return()=>window.clearTimeout(_t)},[ue,k]),s.useEffect(()=>{if(Q){Ar(),$(!0);return}return L.current+=1,R(!1),Ar(),M.current=window.setTimeout(()=>{M.current=null,$(!1)},Tn),Ar},[Q]),s.useLayoutEffect(()=>{G.current!==d&&(G.current=d,L.current+=1,Ar(),O(!1),R(!1),$(!1))},[d]),s.useLayoutEffect(()=>{var cn;if(!C||!Q)return;const _t=L.current+1;L.current=_t,R(!1),(cn=b.current)==null||cn.offsetHeight;const Yt=requestAnimationFrame(()=>{L.current===_t&&R(!0)});return()=>{cancelAnimationFrame(Yt)}},[C,Q]),s.useLayoutEffect(()=>{if(!h||!C)return;const _t=v.current;if(!_t)return;const Yt=getComputedStyle(_t).backgroundColor;if(!Yt)return;const cn=document.documentElement,{body:fn}=document,wn=cn.style.backgroundColor,An=fn.style.backgroundColor;return cn.style.backgroundColor=Yt,fn.style.backgroundColor=Yt,()=>{cn.style.backgroundColor=wn,fn.style.backgroundColor=An}},[h,C,Ga,lt,yt]),s.useEffect(()=>{x==null||x(Q)},[Q,x]),s.useEffect(()=>{if(!Q)return;const _t=Yt=>{Yt.key==="Escape"&&(t&&i||Xa())};return window.addEventListener("keydown",_t),()=>window.removeEventListener("keydown",_t)},[Q,t,i]),s.useEffect(()=>{t&&!i&&w!=="open"&&O(!1)},[t,i,w]),s.useEffect(()=>{i&&O(!1)},[i]);const ec=Sn&&Q,rg=_t=>Ql.filter(Yt=>L$(Yt,d)).map((Yt,cn)=>{const{label:fn,href:wn,target:An}=Ks(Yt,u),io=wn?a.jsx("a",{href:wn,target:An,rel:An==="_blank"?"noopener noreferrer":void 0,className:`${_t} ${g}-has-href`,onClick:Uo=>Jl(Uo,Yt),children:no(fn)}):a.jsx("span",{className:_t,children:no(fn)});return a.jsxs(s.Fragment,{children:[cn>0&&a.jsx("div",{"data-controls":ec?"gap":void 0,"data-controls-axis":"y",className:ec?`${g}-gap-control`:void 0,style:{height:dn(Xe)}}),io]},cn)}),ag=C?a.jsxs("div",{ref:b,"data-selection":"none",className:[`${g}-lightbox`,`${g}-full-lightbox ${g}-effect-${tt}`,K?`${g}-lightbox-active`:"",`${g}-lightbox-editor`,n?`${g}-lightbox-edit-mode`:"",Zl,Ga].filter(Boolean).join(" "),style:{...at,...tg},"aria-hidden":!K,children:[a.jsx("div",{className:[`${g}-backdrop`,Ua?`${g}-backdrop-clickable`:""].filter(Boolean).join(" "),"aria-hidden":"true",onClick:Ua?Xa:void 0}),a.jsxs("nav",{className:[`${g}-panel`,Ua?`${g}-panel-blocking`:""].filter(Boolean).join(" "),style:A,"aria-label":"Menu","data-lightbox-scrollable":"",children:[Sn&&z$(g,to,Vt.fontSize,dn),rg(`${g}-link`)]}),h?a.jsx("div",{ref:v,className:`${g}-safari-tint`,"aria-hidden":"true"}):null]}):null,sg=()=>a.jsx("button",{type:"button",className:`${g}-toggle`,onClick:ig,onPointerUp:og,"aria-expanded":Q,"aria-label":Q?"Close menu":"Open menu",children:a.jsx(R$,{className:`${g}-icon`,lineClassName:`${g}-icon-line`})}),Fr=_t=>{const Yt=_t==="left",cn=Yt?Be:ke,fn=Yt?Kn:bn,wn=Yt?gi:eo,An=$t?Yt?"compactNavPaddingLeft":"compactNavPaddingRight":Yt?"navPaddingLeft":"navPaddingRight";return a.jsx("div",{className:Yt?`${g}-nav-padding-left`:`${g}-nav-padding-right`,style:{width:dn(cn),flexShrink:0},children:Qn?a.jsx("div",{"data-controls":An,"data-controls-axis":"x","data-controls-variant":"column-padding",...Yt?{}:{"data-controls-reverse":""},"data-controls-min":"0","data-controls-max-fraction":String(wn),className:`${g}-control-anchor`,style:{top:0,[Yt?"left":"right"]:0,width:dn(fn),height:"100%"}}):null})},lg=(_t,Yt)=>{const{label:cn,href:fn,target:wn}=Ks(_t,u),An=a.jsx("span",{className:qt,style:Ht,children:Ad(cn)}),io=Hd(g,An,vt,Qn,dn),Uo=fn?a.jsx("a",{href:fn,target:wn,rel:wn==="_blank"?"noopener noreferrer":void 0,className:`${g}-nav-link ${g}-has-href`,onClick:Nr=>Jl(Nr,_t),children:io}):a.jsx("span",{className:`${g}-nav-link`,children:io});return a.jsxs(s.Fragment,{children:[Yt>0&&a.jsx("div",{"data-controls":Qn?$t?"compactNavGap":"navGap":void 0,"data-controls-axis":"x",className:Qn?`${g}-gap-control ${g}-nav-gap-control`:`${g}-nav-gap-control}`,style:{width:dn(pi),flexShrink:0}}),Uo]},Yt)},cg={...at,height:E.scalingValue(Ot,t),minHeight:E.scalingValue(Ot,t),[`--${g}-panel-height`]:E.scalingValue(Ot,t)},dg=l&&k==="default"&&w!=="open"&&!i?dn(pe+v$):"0px";return a.jsxs("div",{ref:f,className:`${g}-root ${Ga} ${Zp} ${Zl} ${Jp}`.trim(),style:{width:"100%",height:"100%",lineHeight:0,fontSize:0,marginTop:dg,...at},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:B}}),a.jsx("span",{ref:S,"aria-hidden":!0,style:Rd(Pt.css),children:"H"}),a.jsx("span",{ref:W,"aria-hidden":!0,style:Rd(Zt.css),children:"H"}),a.jsx("div",{className:`${g}-nav-slide`,children:a.jsxs("div",{className:`${g}-nav-bar`,style:cg,children:[sn&&en?a.jsxs("div",{className:`${g}-nav-logo ${g}-nav-logo-${Xt}`,children:[Xt==="left"?Fr("left"):null,a.jsxs("div",{className:`${g}-nav-logo-inner${Zn?` ${g}-nav-logo-tinted`:""}`,style:{height:kr,...Zn&&kn?{[`--${g}-logo-image`]:q$(kn)}:{}},children:[a.jsx("img",{src:Zn&&kn?kn:en,alt:"",className:`${g}-nav-logo-img`}),Zn?a.jsx("span",{className:`${g}-nav-logo-tint`,"aria-hidden":"true"}):null]}),Xt==="right"?Fr("right"):null]}):null,a.jsx("nav",{className:`${g}-nav-links ${g}-nav-links-${zt}`,style:{transform:C$(zt,D,t)},"aria-label":"Navigation",children:a.jsx("div",{className:`${g}-nav-links-inner`,children:Ql.filter(_t=>I$(_t,k,d)).map((_t,Yt)=>lg(_t,Yt))})})]})}),ag,a.jsxs("div",{className:`${g}-nav-toggle-wrap ${g}-nav-toggle-wrap-${Xo}`,children:[Xo==="left"?Fr("left"):null,Ct?a.jsx("div",{className:`${g}-root ${eg}`.trim(),style:mt,children:sg()}):null,Xo==="right"?Fr("right"):null]})]})}const rC=`import { Fragment, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type MouseEvent, type PointerEvent, type ReactNode } from 'react';
25156
+ `}function Qs(e){return e?!e.startsWith("http://")&&!e.startsWith("https://")&&!e.startsWith("blob:")&&!e.startsWith("data:"):!1}function U$(e,t){var i;const n=(i=e.logo)==null?void 0:i.icon;return!e.logo||Qs(n)||!t?e:{...e,logo:{...e.logo,icon:t}}}function q$(e){return`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`}function Y$(e){const t=e.trim().toLowerCase();return t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")?!0:t.includes(".svg")}function K$(e){const t=Y$(e),[n,i]=s.useState(!1);return s.useEffect(()=>{if(t||!e.startsWith("blob:")){i(!1);return}let o=!1;return fetch(e).then(r=>r.blob()).then(async r=>{if(o)return;if(r.type.includes("svg")){i(!0);return}if(r.type.startsWith("image/")&&!r.type.includes("svg")){i(!1);return}const l=await r.text();o||i(/<svg[\s>]/i.test(l.trim()))}).catch(()=>{o||i(!1)}),()=>{o=!0}},[t,e]),t||n}function Q$(e,t){const[n,i]=s.useState(yr(e)?e:null);return s.useEffect(()=>{if(!t||!e){i(null);return}if(yr(e)){i(e);return}let o=!1;return qu(e).then(r=>{o||i(r)}).catch(()=>{o||i(null)}),()=>{o=!0}},[t,e]),t?n:null}function Z$(e){const t=e.indexOf("#");if(t===-1)return"";try{return decodeURIComponent(e.slice(t+1))}catch{return e.slice(t+1)}}function J$(e){if(!e||e.startsWith("#"))return!0;try{return new URL(e,window.location.href).pathname===window.location.pathname}catch{return!1}}function zp(e){if(!e)return null;const t=document.getElementById(e),n=document.querySelector(`[data-section-id="${CSS.escape(e)}"]`),i=t??n;return i instanceof HTMLElement?i:null}function _d(e){const t=zp(e);return t?(t.scrollIntoView({behavior:"smooth",block:"start"}),!0):!1}function eC(e,t,n={}){const{isEditor:i,isPreviewMode:o,item:r,pages:l,onLinkNavigate:c}=n,d=n.runAfterClose??(x=>x()),u=e.currentTarget.getAttribute("href")??"",p=Z$(u),y=e.currentTarget.target==="_blank";if(r&&c){e.preventDefault(),e.stopPropagation();const x=Ks(r,l),g=_p(r),h={mode:g.type==="url"?"url":"page",href:x.href||u,page:g.type==="page"?g.value:void 0,url:g.type==="url"?g.value:void 0,anchor:g.type==="anchor"?g.value.replace(/^#/,""):(g.anchor??"").replace(/^#/,""),target:x.target};h.target==="_blank"?c(h):d(()=>c(h)),t();return}if(i){e.preventDefault(),d(()=>_d(p)),t();return}!y&&p&&J$(u)&&zp(p)&&(e.preventDefault(),d(()=>_d(p))),t()}const tC=["--cntrl-article-width","--cntrl-article-top","--cntrl-article-left","--cntrl-viewport-height"];function nC(e){let t=e;for(;t;){if(getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim())return t;t=t.parentElement}return e}function iC(e){const t={},n=nC(e);if(!n)return t;const i=getComputedStyle(n);for(const o of tC){const r=i.getPropertyValue(o).trim();r&&(t[o]=r)}return t}function Hd(e,t,n,i,o){return a.jsx("span",{className:`${e}-link-text-box`,style:{width:o(n),maxWidth:"100%"},children:a.jsx("span",{className:i?`${e}-link-text-inner`:`${e}-link-text-inner-hidden`,style:{width:"100%"},children:t})})}function oC({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,activeEvent:o,currentState:r,isSwitchClone:l=!1,unavailableStates:c=[],layoutId:d,pages:u,onLinkNavigate:p,onUpdateSettings:y,onOpenChange:x}){var tc;const{prefix:g}=E.useScopedStyles(),h=s.useRef(null),b=s.useRef(null),S=s.useRef(null),_=s.useRef(null),v=s.useRef(null),L=s.useRef(0),P=s.useRef(null),q=s.useRef(null),X=s.useRef(d),B=s.useMemo(()=>X$(g),[g]),[H,O]=s.useState(!1),[C,$]=s.useState(!1),[Q,R]=s.useState(!1),T=S$(r),w=s.useMemo(()=>new Set(c),[c]),V=_t=>!!(_t&&w.has(_t)),U=!!(t&&!i&&T==="open"&&!V("open"))||!(t&&!i)&&H,M=!!(t&&!i),f=U&&!M;jl(f),s.useEffect(()=>{if(!U||!M)return;const _t=document.documentElement,Yt=_t.style.overflow;return _t.style.overflow="hidden",()=>{_t.style.overflow=Yt}},[U,M]);const K=!V("compact")&&!V("onScroll"),G=!t||!!i&&!n,ge=o&&o!=="default"?o:void 0,k=K&&T==="compact"?"compact":"default",[ce,I]=s.useState(k),[ue,ee]=s.useState(!1),xe=!n;k!==ce&&(I(k),xe&&ee(!0));const Le=Dp(e),{logo:se,logoMaxHeight:de=120/1440,logoPosition:Z="left",panelHeight:pe=60/1440,backgroundColor:ie="#b3b3b3",logoColor:me="#000000",position:ve,horizontalAlign:Ee,verticalAlign:Re,iconColor:Ce="#000000",showIcon:$e="on",iconSize:m=16/1440,linkColor:Y="#000000",openLinkColor:te="#000000",compactIconColor:oe="#000000",compactLinkColor:fe="#000000",compactLogoColor:N="#000000",compactBackgroundColor:F="#ffffff",compactLogoMaxHeight:ne=120/1440,compactLogoPosition:re,compactPanelHeight:J=60/1440,compactShowIcon:W="on",compactIconSize:Se=16/1440,compactNavTextWidth:le,compactNavTextPosition:j,compactNavTextOffset:Te,compactNavGap:Fe,compactNavPaddingLeft:Ye=10/1440,compactNavPaddingRight:De=10/1440,compactFontFamily:ze,compactFontSettings:Ze,compactFontSize:Ue,compactLineHeight:ye,compactLetterSpacing:_e=0,compactWordSpacing:Ve=0,compactTextAlign:Je="left",compactTextAppearance:et,openLogoColor:ot="#000000",menuBackgroundColor:lt="#ffffff",overlayColor:Ke="rgba(0, 0, 0, 0.45)",closeButtonColor:ht="#000000",effect:tt="fade",openPanelSize:Ge=100,textWidth:We=280/1440,navTextWidth:Ne,navTextPosition:be="center",navTextOffset:He=0,gap:Xe=0,navGap:ct,navPaddingLeft:rt=10/1440,navPaddingRight:xt=10/1440,textPaddingLeft:pt=10/1440,textPaddingRight:It=10/1440,textPaddingTop:nt=10/1440,textPaddingBottom:bt=10/1440,fontFamily:Lt,fontSettings:Ut,fontSize:Ft,lineHeight:Me,letterSpacing:Oe=0,wordSpacing:St=0,textAlign:Mt="left",textAppearance:Qe,openFontFamily:kt,openFontSettings:Bt,openFontSize:Wt,openLineHeight:At,openLetterSpacing:Ae,openWordSpacing:ft,openTextAlign:gt,openTextAppearance:dt,stateOverrides:yt,link:ut}=Le,{horizontalAlign:it,verticalAlign:Nt}=_$({position:ve,horizontalAlign:Ee,verticalAlign:Re}),$t=k==="compact",Qt=$t?ne:de,Xt=w$($t?re:Z),Ot=$t?J:pe,jt=$t?Se:m,Dt=$t?le:Ne,zt=$$($t?j:be),D=($t?Te:He)??0,Ie=$t?Fe:ct,Be=$t?Ye:rt,ke=$t?De:xt,vt=Dt??We,Ct=U||($t?W:$e)!=="off",at=E.buildColorVars(g,{iconColor:Ce,closeButtonColor:ht,linkColor:Y,openLinkColor:te,compactIconColor:oe,compactLinkColor:fe,compactLogoColor:N,compactBackgroundColor:F,openLogoColor:ot,menuBackgroundColor:lt,overlayColor:Ke,backgroundColor:ie,logoColor:me},B$,j$,yt),Tt=Ed($t?{fontFamily:ze,fontSettings:Ze,fontSize:Ue,lineHeight:ye,letterSpacing:_e,wordSpacing:Ve,textAlign:Je,textAppearance:et}:{fontFamily:Lt,fontSettings:Ut,fontSize:Ft,lineHeight:Me,letterSpacing:Oe,wordSpacing:St,textAlign:Mt,textAppearance:Qe}),Vt=Ed({fontFamily:kt,fontSettings:Bt,fontSize:Wt,lineHeight:At,letterSpacing:Ae,wordSpacing:ft,textAlign:gt,textAppearance:dt},Tt),Pt=kd(g,Tt,t),Zt=kd(g,Vt,t),on=Ld(S,Md(Tt)),Wn=Ld(_,Md(Vt)),xn={...Zt.css,whiteSpace:"pre-wrap",transform:Pd(Wn)},ui=Zt.className,dn=_t=>E.scalingValue(_t,t),pi=Ie??Xe,Kn=Math.max(Be,fo),bn=Math.max(ke,fo),gi=Math.max(0,1-jt),eo=Math.max(0,1-jt),Sn=n??!1,Qn=Sn&&!U,to=s.useMemo(()=>Op({textPaddingLeft:pt,textPaddingRight:It,textPaddingTop:nt,textPaddingBottom:bt,fontSize:Vt.fontSize}),[pt,It,nt,bt,Vt.fontSize]),no=_t=>{const Yt=a.jsx("span",{className:ui,style:xn,children:Ad(_t)});return Hd(g,Yt,We,Sn,dn)},qe=tt==="left"||tt==="right"?{width:`${Ge}%`}:{height:`${Ge}%`},A={...D$(to,t),...qe,alignItems:G$[it],justifyContent:V$[Nt]},ae=s.useRef(e),he=s.useRef(d),Pe=s.useRef(null);Qs((tc=e.logo)==null?void 0:tc.icon)&&(Pe.current=e.logo.icon),s.useEffect(()=>{var Nr;if(!y||!t){ae.current=e,he.current=d;return}const _t=(Nr=e.logo)==null?void 0:Nr.icon;if(e.logo&&!Qs(_t)&&!Pe.current){ae.current=e,he.current=d;return}const Yt=_r=>{y(U$(_r,Pe.current))};if(he.current!==d){ae.current=e,he.current=d;const _r=Nd(e);_r!==e&&Yt(_r);return}const cn=Nd(e),fn=ae.current,wn=fn!==e,An=wn?O$(cn,fn):cn;ae.current=e;const io=cn!==e,Uo=wn&&H$(cn,An);!io&&!Uo||Yt(An)},[e,y,t,d]);const je=E.scalingValue(jt,t),mt={width:je,height:je,minWidth:je,minHeight:je,maxWidth:je,maxHeight:je},Ht={...Pt.css,textDecoration:"none",transform:Pd(on)},qt=Pt.className,sn=(se==null?void 0:se.mode)!=="Off",en=(se==null?void 0:se.icon)??"",mi=K$(en),kn=Q$(en,mi),Zn=!!kn,kr=dn(Math.min(Qt,Ot)),Xo=!!(sn&&en&&Xt==="right")?"left":"right",Ql=Array.isArray(ut)?ut:[],Ga=[k!=="default"?`${g}-state-${k}`:"",U||T==="open"?`${g}-state-open`:"",ge&&ge!==k&&ge!==T?`${g}-state-${ge}`:""].filter(Boolean).join(" "),Zp=t&&!i?`${g}-editor`:"",Zl=G?`${g}-interactive`:"",Jp=xe&&(k!==ce||ue)?`${g}-nav-state-anim`:"",eg=U?`${g}-open`:"",tg=s.useMemo(()=>iC(h.current),[C,U,d]),Xa=()=>{O(!1)},Ua=!t||i,ng=_t=>{if(f){q.current=_t;return}_t()};s.useEffect(()=>{if(U)return;const _t=q.current;q.current=null,_t==null||_t()},[U]);const Jl=(_t,Yt)=>{eC(_t,Xa,{isEditor:t,isPreviewMode:i,item:Yt,pages:u,onLinkNavigate:p,runAfterClose:ng})},ig=()=>{t&&!i||O(_t=>!_t)},og=_t=>{_t.pointerType==="touch"&&_t.currentTarget.blur()},Ar=()=>{P.current!==null&&(window.clearTimeout(P.current),P.current=null)};s.useEffect(()=>{if(!ue)return;const _t=window.setTimeout(()=>{ee(!1)},rn);return()=>window.clearTimeout(_t)},[ue,k]),s.useEffect(()=>{if(U){Ar(),$(!0);return}return L.current+=1,R(!1),Ar(),P.current=window.setTimeout(()=>{P.current=null,$(!1)},Tn),Ar},[U]),s.useLayoutEffect(()=>{X.current!==d&&(X.current=d,L.current+=1,Ar(),O(!1),R(!1),$(!1))},[d]),s.useLayoutEffect(()=>{var cn;if(!C||!U)return;const _t=L.current+1;L.current=_t,R(!1),(cn=b.current)==null||cn.offsetHeight;const Yt=requestAnimationFrame(()=>{L.current===_t&&R(!0)});return()=>{cancelAnimationFrame(Yt)}},[C,U]),s.useLayoutEffect(()=>{if(!f||!C)return;const _t=v.current;if(!_t)return;const Yt=getComputedStyle(_t).backgroundColor;if(!Yt)return;const cn=document.documentElement,{body:fn}=document,wn=cn.style.backgroundColor,An=fn.style.backgroundColor;return cn.style.backgroundColor=Yt,fn.style.backgroundColor=Yt,()=>{cn.style.backgroundColor=wn,fn.style.backgroundColor=An}},[f,C,Ga,lt,yt]),s.useEffect(()=>{x==null||x(U)},[U,x]),s.useEffect(()=>{if(!U)return;const _t=Yt=>{Yt.key==="Escape"&&(t&&i||Xa())};return window.addEventListener("keydown",_t),()=>window.removeEventListener("keydown",_t)},[U,t,i]),s.useEffect(()=>{t&&!i&&T!=="open"&&O(!1)},[t,i,T]),s.useEffect(()=>{i&&O(!1)},[i]);const ec=Sn&&U,rg=_t=>Ql.filter(Yt=>L$(Yt,d)).map((Yt,cn)=>{const{label:fn,href:wn,target:An}=Ks(Yt,u),io=wn?a.jsx("a",{href:wn,target:An,rel:An==="_blank"?"noopener noreferrer":void 0,className:`${_t} ${g}-has-href`,onClick:Uo=>Jl(Uo,Yt),children:no(fn)}):a.jsx("span",{className:_t,children:no(fn)});return a.jsxs(s.Fragment,{children:[cn>0&&a.jsx("div",{"data-controls":ec?"gap":void 0,"data-controls-axis":"y",className:ec?`${g}-gap-control`:void 0,style:{height:dn(Xe)}}),io]},cn)}),ag=C?a.jsxs("div",{ref:b,"data-selection":"none",className:[`${g}-lightbox`,`${g}-full-lightbox ${g}-effect-${tt}`,Q?`${g}-lightbox-active`:"",`${g}-lightbox-editor`,n?`${g}-lightbox-edit-mode`:"",Zl,Ga].filter(Boolean).join(" "),style:{...at,...tg},"aria-hidden":!Q,children:[a.jsx("div",{className:[`${g}-backdrop`,Ua?`${g}-backdrop-clickable`:""].filter(Boolean).join(" "),"aria-hidden":"true",onClick:Ua?Xa:void 0}),a.jsxs("nav",{className:[`${g}-panel`,Ua?`${g}-panel-blocking`:""].filter(Boolean).join(" "),style:A,"aria-label":"Menu","data-lightbox-scrollable":"",children:[Sn&&z$(g,to,Vt.fontSize,dn),rg(`${g}-link`)]}),f?a.jsx("div",{ref:v,className:`${g}-safari-tint`,"aria-hidden":"true"}):null]}):null,sg=()=>a.jsx("button",{type:"button",className:`${g}-toggle`,onClick:ig,onPointerUp:og,"aria-expanded":U,"aria-label":U?"Close menu":"Open menu",children:a.jsx(R$,{className:`${g}-icon`,lineClassName:`${g}-icon-line`})}),Fr=_t=>{const Yt=_t==="left",cn=Yt?Be:ke,fn=Yt?Kn:bn,wn=Yt?gi:eo,An=$t?Yt?"compactNavPaddingLeft":"compactNavPaddingRight":Yt?"navPaddingLeft":"navPaddingRight";return a.jsx("div",{className:Yt?`${g}-nav-padding-left`:`${g}-nav-padding-right`,style:{width:dn(cn),flexShrink:0},children:Qn?a.jsx("div",{"data-controls":An,"data-controls-axis":"x","data-controls-variant":"column-padding",...Yt?{}:{"data-controls-reverse":""},"data-controls-min":"0","data-controls-max-fraction":String(wn),className:`${g}-control-anchor`,style:{top:0,[Yt?"left":"right"]:0,width:dn(fn),height:"100%"}}):null})},lg=(_t,Yt)=>{const{label:cn,href:fn,target:wn}=Ks(_t,u),An=a.jsx("span",{className:qt,style:Ht,children:Ad(cn)}),io=Hd(g,An,vt,Qn,dn),Uo=fn?a.jsx("a",{href:fn,target:wn,rel:wn==="_blank"?"noopener noreferrer":void 0,className:`${g}-nav-link ${g}-has-href`,onClick:Nr=>Jl(Nr,_t),children:io}):a.jsx("span",{className:`${g}-nav-link`,children:io});return a.jsxs(s.Fragment,{children:[Yt>0&&a.jsx("div",{"data-controls":Qn?$t?"compactNavGap":"navGap":void 0,"data-controls-axis":"x",className:Qn?`${g}-gap-control ${g}-nav-gap-control`:`${g}-nav-gap-control}`,style:{width:dn(pi),flexShrink:0}}),Uo]},Yt)},cg={...at,height:E.scalingValue(Ot,t),minHeight:E.scalingValue(Ot,t),[`--${g}-panel-height`]:E.scalingValue(Ot,t)},dg=l&&k==="default"&&T!=="open"&&!i?dn(pe+v$):"0px";return a.jsxs("div",{ref:h,className:`${g}-root ${Ga} ${Zp} ${Zl} ${Jp}`.trim(),style:{width:"100%",height:"100%",lineHeight:0,fontSize:0,marginTop:dg,...at},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:B}}),a.jsx("span",{ref:S,"aria-hidden":!0,style:Rd(Pt.css),children:"H"}),a.jsx("span",{ref:_,"aria-hidden":!0,style:Rd(Zt.css),children:"H"}),a.jsx("div",{className:`${g}-nav-slide`,children:a.jsxs("div",{className:`${g}-nav-bar`,style:cg,children:[sn&&en?a.jsxs("div",{className:`${g}-nav-logo ${g}-nav-logo-${Xt}`,children:[Xt==="left"?Fr("left"):null,a.jsxs("div",{className:`${g}-nav-logo-inner${Zn?` ${g}-nav-logo-tinted`:""}`,style:{height:kr,...Zn&&kn?{[`--${g}-logo-image`]:q$(kn)}:{}},children:[a.jsx("img",{src:Zn&&kn?kn:en,alt:"",className:`${g}-nav-logo-img`}),Zn?a.jsx("span",{className:`${g}-nav-logo-tint`,"aria-hidden":"true"}):null]}),Xt==="right"?Fr("right"):null]}):null,a.jsx("nav",{className:`${g}-nav-links ${g}-nav-links-${zt}`,style:{transform:C$(zt,D,t)},"aria-label":"Navigation",children:a.jsx("div",{className:`${g}-nav-links-inner`,children:Ql.filter(_t=>I$(_t,k,d)).map((_t,Yt)=>lg(_t,Yt))})})]})}),ag,a.jsxs("div",{className:`${g}-nav-toggle-wrap ${g}-nav-toggle-wrap-${Xo}`,children:[Xo==="left"?Fr("left"):null,Ct?a.jsx("div",{className:`${g}-root ${eg}`.trim(),style:mt,children:sg()}):null,Xo==="right"?Fr("right"):null]})]})}const rC=`import { Fragment, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type MouseEvent, type PointerEvent, type ReactNode } from 'react';
25157
25157
  import { CommonComponentProps } from '../props';
25158
25158
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
25159
25159
  import { useLightboxScrollLock } from '../utils/useLightboxScrollLock';
@@ -27794,8 +27794,8 @@ export function Burger({
27794
27794
  </div>
27795
27795
  );
27796
27796
  }
27797
- `;function tr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const ji={fontSettings:{type:"object",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function bi(e,t){return e?`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`:t}function Ul(e){return{[bi(e,"fontFamily")]:{type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},[bi(e,"fontSettings")]:{...ji.fontSettings,scope:"common",title:""},[bi(e,"fontSize")]:{...ji.fontSize,scope:"layout",title:""},[bi(e,"lineHeight")]:{...ji.lineHeight,scope:"layout",title:""},[bi(e,"letterSpacing")]:{...ji.letterSpacing,scope:"layout",title:""},[bi(e,"wordSpacing")]:{...ji.wordSpacing,scope:"layout",title:""},[bi(e,"textAlign")]:{...ji.textAlign,scope:"layout",title:""},[bi(e,"textAppearance")]:{...ji.textAppearance,scope:"layout",title:""}}}const aC=Ul(""),sC=Ul("open"),lC=Ul("compact"),cC=["__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"],dC=["__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"],uC=["__componentName__",{type:"row",title:"Text",items:["textWidth","position"]},{type:"row",title:"Menu",items:["openPanelSize","effect"]},"openFontFamily","openFontSettings",{type:"row",items:["openFontSize","openLineHeight","openLetterSpacing","openWordSpacing"]},"openTextAlign","openTextAppearance"],ei={textTransform:"none",textDecoration:"none",fontVariant:"normal"},Ps={fontWeight:400,fontStyle:"normal"},ea={d:"Always",t:"Open Only",m:"Open Only"},pC=["left-top","center-top","right-top","left-center","center","right-center","left-bottom","center-bottom","right-bottom"],gC=["iconColor","logoColor","linkColor","backgroundColor"],mC={type:"object",version:1,settings:{sizing:"auto manual",properties:{link:{type:"array",scope:"common",display:{type:"page-url-link"},items:{type:"object",properties:{link:{type:"object",properties:{type:{type:"string",enum:["url","page","anchor"]},value:{type:"string",message:"Paste URL here..."},target:{type:"string",enum:["blank","self"]},anchor:{type:"string"}}},label:{type:"string"},showIn:{type:"string",scope:"layout",enum:["Always","Open Only","Open and Compact","Default and Open","Default and Compact"]}}}},logo:{type:"object",scope:"common",title:"Logo",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Logo",display:{type:"settings-image-input"}}}},logoMaxHeight:{type:"number",scope:"layout",title:"Max Height",display:{type:"numeric-input"},min:0,max:9999},logoPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},compactLogoPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},logoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{default:"Logo Default",hover:"Logo Hover"},display:{type:"palette-color-picker"}},panelHeight:{type:"number",scope:"layout",title:"Menu Height",display:{type:"numeric-input"},min:0,max:9999},backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{default:"Icon Default",hover:"Icon Hover"},display:{type:"palette-color-picker"}},showIcon:{type:"string",scope:"layout",title:"Show",display:{type:"toggle-cycle",enum:["on","off"]}},iconSize:{type:"number",scope:"layout",title:"Size",display:{type:"numeric-input"},min:0,max:9999},linkColor:{type:"string",scope:"common",title:"Text Default",titleByState:{default:"Text Default",hover:"Text Hover"},display:{type:"palette-color-picker"}},compactShowIcon:{type:"string",scope:"layout",title:"Show",display:{type:"toggle-cycle",enum:["on","off"]}},compactIconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{compact:"Icon Default","compact-hover":"Icon Hover"},display:{type:"palette-color-picker"}},compactLinkColor:{type:"string",scope:"common",title:"Text Default",titleByState:{compact:"Text Default","compact-hover":"Text Hover"},display:{type:"palette-color-picker"}},compactLogoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{compact:"Logo Default","compact-hover":"Logo Hover"},display:{type:"palette-color-picker"}},compactBackgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},openLinkColor:{type:"string",scope:"common",title:"Text Default",titleByState:{open:"Text Default","open-hover":"Text Hover"},display:{type:"palette-color-picker"}},openLogoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{open:"Logo Default","open-hover":"Logo Hover"},display:{type:"palette-color-picker"}},menuBackgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},overlayColor:{type:"string",scope:"common",title:"Overlay Default",display:{type:"palette-color-picker"}},closeButtonColor:{type:"string",scope:"common",title:"Close Default",titleByState:{open:"Close Default","open-hover":"Close Hover"},display:{type:"palette-color-picker"}},effect:{type:"string",scope:"layout",title:"Effect",display:{type:"toggle-cycle",enum:["fade","left","top","right","bottom"]}},openPanelSize:{type:"number",scope:"layout",title:"Height",display:{type:"percentage-input"},min:0,max:100},textWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},navTextWidth:{type:"number",scope:"layout",title:"Text width",display:{type:"numeric-input"},min:0,max:9999},navTextPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},navTextOffset:{type:"number",scope:"layout",title:"Offset",display:{type:"numeric-input"},min:-9999,max:9999},position:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:[...pC]}},stateOverrides:{type:"object",scope:"common"},gap:tr("Gap"),navGap:{type:"number",scope:"layout",title:"Nav gap",min:0,max:100,display:{type:"range-control",visible:!1}},navPaddingLeft:{type:"number",scope:"layout",title:"Nav padding left",min:0,max:100,display:{type:"range-control",visible:!1}},navPaddingRight:{type:"number",scope:"layout",title:"Nav padding right",min:0,max:100,display:{type:"range-control",visible:!1}},textPaddingLeft:tr("Text padding left"),textPaddingRight:tr("Text padding right"),textPaddingTop:tr("Text padding top"),textPaddingBottom:tr("Text padding bottom"),compactLogoMaxHeight:{type:"number",scope:"layout",title:"Max Height",display:{type:"numeric-input"},min:0,max:9999},compactPanelHeight:{type:"number",scope:"layout",title:"Menu Height",display:{type:"numeric-input"},min:0,max:9999},compactIconSize:{type:"number",scope:"layout",title:"Size",display:{type:"numeric-input"},min:0,max:9999},compactNavTextWidth:{type:"number",scope:"layout",title:"Text width",display:{type:"numeric-input"},min:0,max:9999},compactNavTextPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},compactNavTextOffset:{type:"number",scope:"layout",title:"Offset",display:{type:"numeric-input"},min:-9999,max:9999},compactNavGap:{type:"number",scope:"layout",title:"Nav gap",min:0,max:100,display:{type:"range-control",visible:!1}},compactNavPaddingLeft:{type:"number",scope:"layout",title:"Nav padding left",min:0,max:100,display:{type:"range-control",visible:!1}},compactNavPaddingRight:{type:"number",scope:"layout",title:"Nav padding right",min:0,max:100,display:{type:"range-control",visible:!1}},...aC,...sC,...lC},defaults:{link:[{link:{type:"page",value:"",target:"self"},label:"Home",showIn:ea},{link:{type:"page",value:"",target:"self"},label:"Works",showIn:ea},{link:{type:"page",value:"",target:"self"},label:"About",showIn:ea},{link:{type:"page",value:"",target:"self"},label:"Contact",showIn:ea}],logo:{mode:"On",icon:"01M3QM74XE09DSJCWGD1XM6Y45"},backgroundColor:"#ffffff",logoColor:"#000000",iconColor:"#000000",linkColor:"#000000",openLinkColor:"#000000",compactIconColor:"#000000",compactLinkColor:"#000000",compactLogoColor:"#000000",compactBackgroundColor:"#ffffff",openLogoColor:"#000000",menuBackgroundColor:"#ffffff",overlayColor:"rgba(0, 0, 0, 0.45)",closeButtonColor:"#000000",effect:"fade",showIcon:"on",compactShowIcon:"on",logoPosition:"left",compactLogoPosition:"left",navTextPosition:"center",compactNavTextPosition:"center",navTextOffset:0,compactNavTextOffset:0,position:"left-top",fontFamily:"Goudy Bookletter 1911",fontSettings:Ps,textAlign:"left",openFontFamily:"Goudy Bookletter 1911",openFontSettings:Ps,openTextAlign:"left",compactFontFamily:"Goudy Bookletter 1911",compactFontSettings:Ps,compactTextAlign:"left",stateOverrides:{hover:{linkColor:"#666666",iconColor:"#666666",logoColor:"#666666"},"open-hover":{closeButtonColor:"#666666"}}},displayRules:[{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoMaxHeight.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoPosition.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoMaxHeight.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoPosition.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoColor.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoColor.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.openLogoColor.display.visible",value:!1}},{if:{name:"effect",value:"left"},then:{name:"properties.openPanelSize.title",value:"Width"}},{if:{name:"effect",value:"right"},then:{name:"properties.openPanelSize.title",value:"Width"}},{if:{name:"showIcon",value:"off"},then:{name:"properties.iconSize.display.visible",value:!1}},{if:{name:"showIcon",value:"off"},then:{name:"properties.iconColor.display.visible",value:!1}},{if:{name:"compactShowIcon",value:"off"},then:{name:"properties.compactIconSize.display.visible",value:!1}},{if:{name:"compactShowIcon",value:"off"},then:{name:"properties.compactIconColor.display.visible",value:!1}}],layoutDefaults:{m:{position:"center",panelHeight:50/375,logoMaxHeight:30/375,logoPosition:"center",compactLogoPosition:"left",navTextPosition:"center",navTextOffset:0,compactNavTextPosition:"center",compactNavTextOffset:0,showIcon:"on",iconSize:30/375,textWidth:240/375,openPanelSize:100,navTextWidth:120/375,gap:24/375,navGap:24/375,navPaddingLeft:20/375,navPaddingRight:20/375,textPaddingLeft:10/375,textPaddingRight:10/375,textPaddingTop:10/375,textPaddingBottom:10/375,fontSize:16/375,lineHeight:20/375,letterSpacing:0,wordSpacing:0,textAppearance:ei,openFontSize:34/375,openLineHeight:20/375,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:ei,openTextAlign:"center",compactPanelHeight:40/375,compactLogoMaxHeight:20/375,compactShowIcon:"on",compactIconSize:16/375,compactNavTextWidth:80/375,compactNavGap:24/375,compactNavPaddingLeft:20/375,compactNavPaddingRight:20/375,compactFontSize:16/375,compactLineHeight:20/375,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:ei},t:{textAlign:"center",position:"center",panelHeight:60/768,logoMaxHeight:30/768,logoPosition:"left",compactLogoPosition:"left",navTextPosition:"center",navTextOffset:0,compactNavTextPosition:"center",compactNavTextOffset:0,showIcon:"on",iconSize:16/768,textWidth:300/768,openPanelSize:100,navTextWidth:90/768,gap:32/768,navGap:32/768,navPaddingLeft:20/768,navPaddingRight:20/768,textPaddingLeft:10/768,textPaddingRight:10/768,textPaddingTop:10/768,textPaddingBottom:10/768,fontSize:18/768,lineHeight:20/768,letterSpacing:0,wordSpacing:0,textAppearance:ei,openFontSize:75/768,openLineHeight:20/768,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:ei,openTextAlign:"center",compactTextAlign:"center",compactPanelHeight:40/768,compactLogoMaxHeight:20/768,compactShowIcon:"on",compactIconSize:16/768,compactNavTextWidth:80/768,compactNavGap:32/768,compactNavPaddingLeft:20/768,compactNavPaddingRight:20/768,compactFontSize:16/768,compactLineHeight:20/768,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:ei},d:{position:"center",panelHeight:50/1440,logoMaxHeight:30/1440,logoPosition:"left",compactLogoPosition:"left",navTextPosition:"center",navTextOffset:0,compactNavTextPosition:"center",compactNavTextOffset:0,showIcon:"on",iconSize:20/1440,textWidth:300/1440,openPanelSize:100,navTextWidth:60/1440,gap:12/1440,navGap:64/1440,navPaddingLeft:10/1440,navPaddingRight:10/1440,textPaddingLeft:10/1440,textPaddingRight:10/1440,textPaddingTop:10/1440,textPaddingBottom:10/1440,fontSize:16/1440,lineHeight:16/1440,letterSpacing:0,wordSpacing:0,textAppearance:ei,textAlign:"center",openFontSize:90/1440,openLineHeight:16/1440,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:ei,openTextAlign:"center",compactPanelHeight:30/1440,compactLogoMaxHeight:20/1440,compactShowIcon:"on",compactIconSize:20/1440,compactNavTextWidth:60/1440,compactNavGap:20/1440,compactNavPaddingLeft:10/1440,compactNavPaddingRight:10/1440,compactFontSize:16/1440,compactLineHeight:16/1440,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:ei,compactTextAlign:"center"}},layout:["__componentName__","link","logo","logoMaxHeight","logoPosition","panelHeight","backgroundColor","logoColor","iconColor","showIcon","iconSize","linkColor","openLinkColor","compactShowIcon","compactIconColor","compactLinkColor","compactLogoColor","compactBackgroundColor","compactLogoMaxHeight","compactLogoPosition","compactPanelHeight","compactIconSize","compactNavTextWidth","compactNavTextPosition","compactNavTextOffset","compactNavGap","compactNavPaddingLeft","compactNavPaddingRight","compactFontFamily","compactFontSettings","compactFontSize","compactLineHeight","compactLetterSpacing","compactWordSpacing","compactTextAlign","compactTextAppearance","openLogoColor","menuBackgroundColor","overlayColor","closeButtonColor","effect","textWidth","navTextWidth","navTextPosition","navTextOffset","position","gap","navGap","navPaddingLeft","navPaddingRight","textPaddingLeft","textPaddingRight","textPaddingTop","textPaddingBottom","fontFamily","fontSettings","fontSize","lineHeight","letterSpacing","wordSpacing","textAlign","textAppearance","openFontFamily","openFontSettings","openFontSize","openLineHeight","openLetterSpacing","openWordSpacing","openTextAlign","openTextAppearance"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","logo"]},{id:"default",icon:"default",title:"Default",tooltip:"Default State",layout:cC},{id:"compact",icon:"compact",title:"Compact",tooltip:"Compact State",layout:dC,availableWhen:{navigationPosition:["switch"]}},{id:"open",icon:"open",title:"Open",tooltip:"Open State",layout:uC},{id:"links",icon:"content",title:"Links",tooltip:"Link Settings",layout:["__componentName__","link"]}],paletteBookmark:{items:[...gC],panelIds:["default","compact","open"],stateItems:{default:["iconColor","logoColor","linkColor","backgroundColor"],hover:["iconColor","logoColor","linkColor"],compact:["compactIconColor","compactLogoColor","compactLinkColor","compactBackgroundColor"],"compact-hover":["compactIconColor","compactLogoColor","compactLinkColor"],open:["closeButtonColor","openLogoColor","openLinkColor","menuBackgroundColor","overlayColor"],"open-hover":["closeButtonColor","openLogoColor","openLinkColor"]}},states:["default","hover"],statePanels:["default","compact","open"]},hC={element:oC,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:mC,sourceCode:rC,assetsPaths:{content:[],parameters:[{path:"logo.icon",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"},{path:"openFontFamily"},{path:"compactFontFamily"}]},fontRelations:{fontSettings:"fontFamily",openFontSettings:"openFontFamily",compactFontSettings:"compactFontFamily"}},Wd=120,Od=3,fC=.12,ql={x:0,y:0,width:100,height:100};function Co(e,t){return e.map(n=>n.map(i=>({x:(i.x-t.x)/t.width,y:(i.y-t.y)/t.height})))}function Ia(e){return e<0?0:e>1?1:e}function Dd(e,t){return e.filter(n=>n.length>0).map(n=>`M ${n.map(i=>`${i.x*t.width} ${i.y*t.height}`).join(" L ")} Z`).join(" ")}function yC(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 vC(e){return e.map(([t,n])=>({x:t,y:n}))}function Ms(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 xC(e,t){const n=[];for(const o of e)for(let r=0;r<o.length;r+=1){const l=o[r],c=o[(r+1)%o.length];(l.y<=t&&c.y>t||c.y<=t&&l.y>t)&&n.push(l.x+(t-l.y)/(c.y-l.y)*(c.x-l.x))}n.sort((o,r)=>o-r);const i=[];for(let o=0;o+1<n.length;o+=2){const r=Ia(n[o]),l=Ia(n[o+1]);l>r&&i.push({x0:r,x1:l})}return bC(i)}function bC(e){if(e.length<2)return e;const t=[...e].sort((i,o)=>i.x0-o.x0),n=[t[0]];for(let i=1;i<t.length;i+=1){const o=n[n.length-1],r=t[i];r.x0<=o.x1?o.x1=Math.max(o.x1,r.x1):n.push({...r})}return n}function SC(e,t){const n=[];let i=0,o=0;for(;i<e.length&&o<t.length;){const r=Math.max(e[i].x0,t[o].x0),l=Math.min(e[i].x1,t[o].x1);l>r&&n.push({x0:r,x1:l}),e[i].x1<t[o].x1?i+=1:o+=1}return n}function wC(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 $C(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 CC(e,t,n,i){let o=null;for(let r=0;r<Od;r+=1){const l=Ia(t+(n-t)*r/Math.max(1,Od-1)),c=xC(e,l),d=i==="avoid"?wC(c):c;if(o=o===null?d:SC(o,d),o.length===0)return[]}return o??[]}function zd(e,t="stretch",n=ql){const i=e.trim();if(!i)return null;if(/^[Mm]/.test(i)){const l=ki(i),c=$r(l);if(c.length)return t==="viewbox"?Co(c,n):Ms(c);if(typeof document>"u")return null;const d=i.split(/(?=[Mm])/).map(y=>y.trim()).filter(Boolean),u=document.createElementNS("http://www.w3.org/2000/svg","svg"),p=[];for(const y of d){const x=document.createElementNS("http://www.w3.org/2000/svg","path");x.setAttribute("d",y),u.appendChild(x);let g=0;try{g=x.getTotalLength()}catch{g=0}if(!g)continue;const f=[];for(let b=0;b<Wd;b+=1){const S=x.getPointAtLength(b/Wd*g);f.push({x:S.x,y:S.y})}p.push(f)}return p.length?t==="viewbox"?Co(p,n):Ms(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"?Co([r],n):Ms([r])}const Yl={bobbin:"M57.63,0 L57.63,37.24 L74.66,37.24 L74.66,56.07 L57.63,100 L33.84,100 L16.81,56.07 L16.81,37.24 L33.84,37.24 L33.84,0 Z",circle:"M50,0 C77.61,0 100,22.39 100,50 C100,77.61 77.61,100 50,100 C22.39,100 0,77.61 0,50 C0,22.39 22.39,0 50,0 Z",shield:"M0,0 L100,0 L100,50 L50,100 L0,50 Z",vase:"M25.37,0 L91.55,0 C91.55,0 74.8,25.14 83.07,50.03 C91.34,74.92 74.61,100 74.61,100 L8.43,100 C8.43,100 32.3,75.08 23.9,50 C15.5,24.92 25.37,0 25.37,0 Z",parallelogram:"M25.37,0 L91.55,0 L74.61,100 L8.43,100 Z",diamond:"M50,0 L80,50 L50,100 L20,50 Z"},Zs="0 0 100 100",La=100,Js=16,TC=12,IC=16,Rs=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,LC=/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g,Bd=Math.PI/4,PC=8,MC=Math.PI/18,RC=8,yo=24,vo=[];function EC(){return[{closed:!0,nodes:[{p:{x:0,y:0},in:null,out:null},{p:{x:1,y:0},in:null,out:null},{p:{x:1,y:1},in:null,out:null},{p:{x:0,y:1},in:null,out:null}]}]}function Es(e,t){return un(e,n=>({x:(n.x-t.x)/t.width,y:(n.y-t.y)/t.height}))}function kC(e){const t=Li(e),n=t.maxX-t.minX,i=t.maxY-t.minY;return!isFinite(n)||!isFinite(i)||n<=0||i<=0?e:un(e,o=>({x:(o.x-t.minX)/n,y:(o.y-t.minY)/i}))}function AC(e,t){if(!(t.width>0)||!(t.height>0))return e;const n=Math.min(t.width,t.height),i=(t.width-n)/2,o=(t.height-n)/2;return un(e,r=>({x:(i+r.x*n)/t.width,y:(o+r.y*n)/t.height}))}function jd(e,t,n,i,o,r){let l=[];if(t&&t.length)l=Es(t,i);else{const c=e.trim();if(c&&/^[Mm]/.test(c)){const d=ki(c);d.length&&(l=n==="viewbox"?Es(d,i):kC(d))}if(!l.length){const d=o!=="custom"?Yl[o]:void 0;d?l=Es(ki(d),ql):l=EC()}}return o==="circle"?AC(l,r):l}function Vd(e,t){return!(t.width>0)||!(t.height>0)||!e.length?"":Wo(un(e,n=>({x:n.x*t.width,y:n.y*t.height})))}function el(e){const t=e==="rectangle"||e==="custom"?void 0:Yl[e];return t?Co($r(ki(t)),ql):[vC([[0,0],[1,0],[1,1],[0,1]])]}function FC(e){const t=e.match(LC);return t?t.map(Number).filter(n=>!Number.isNaN(n)):[]}function In(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function tl(e,t){return{x:t.x*2-e.x,y:t.y*2-e.y}}function mn(e){return{x:e.x,y:e.y}}function NC(e){return{p:mn(e.p),in:e.in?mn(e.in):null,out:e.out?mn(e.out):null}}function Vn(e){return e.map(t=>({closed:t.closed,nodes:t.nodes.map(NC)}))}function un(e,t){return e.map(n=>({closed:n.closed,nodes:n.nodes.map(i=>({p:t(i.p),in:i.in?t(i.in):null,out:i.out?t(i.out):null}))}))}function Gd(e,t,n,i=n){return un(e,o=>({x:t.x+(o.x-t.x)*n,y:t.y+(o.y-t.y)*i}))}function _C(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:mn(e),c2:mn(l),p:mn(l)}];const u=i*Math.PI/180,p=Math.cos(u),y=Math.sin(u),x=(e.x-l.x)/2,g=(e.y-l.y)/2,f=p*x+y*g,b=-y*x+p*g,S=f*f/(c*c)+b*b/(d*d);if(S>1){const Q=Math.sqrt(S);c*=Q,d*=Q}const W=o===r?-1:1,v=c*c*b*b+d*d*f*f,L=Math.max(0,c*c*d*d-v),M=v===0?0:W*Math.sqrt(L/v),U=M*c*b/d,G=-M*d*f/c,B=p*U-y*G+(e.x+l.x)/2,N=y*U+p*G+(e.y+l.y)/2,O=Math.atan2((b-G)/d,(f-U)/c);let $=Math.atan2((-b-G)/d,(-f-U)/c)-O;!r&&$>0&&($-=Math.PI*2),r&&$<0&&($+=Math.PI*2);const K=Math.max(1,Math.ceil(Math.abs($)/(Math.PI/2))),R=$/K,w=4/3*Math.tan(R/4),T=(Q,P)=>({x:B+p*c*Q-y*d*P,y:N+y*c*Q+p*d*P}),j=[];let _=O;for(let Q=0;Q<K;Q+=1){const P=_+R,h=Math.cos(_),J=Math.sin(_),V=Math.cos(P),me=Math.sin(P);j.push({c1:T(h-w*J,J+w*h),c2:T(V+w*me,me-w*V),p:Q===K-1?mn(l):T(V,me)}),_=P}return j}function ki(e){const t=(e??"").trim();if(!t)return[];const n=[];let i=[],o=!1,r={x:0,y:0},l={x:0,y:0},c=null,d=null;const u=()=>{if(o&&i.length>2){const g=i[0],f=i[i.length-1];Math.abs(g.p.x-f.p.x)<1e-6&&Math.abs(g.p.y-f.p.y)<1e-6&&(g.in=f.in??g.in,i.pop())}i.length>1&&n.push({nodes:i,closed:o}),i=[],o=!1},p=(g,f)=>{i.push({p:g,in:Un(f??null,g),out:null}),r=g},y=g=>{if(!i.length)return;const f=i[i.length-1];f.out=Un(g,f.p)};Rs.lastIndex=0;let x=Rs.exec(t);for(;x!==null;){const g=x[1],f=g.toUpperCase(),b=g!==f,S=FC(x[2]),W=v=>b?{x:r.x+S[v],y:r.y+S[v+1]}:{x:S[v],y:S[v+1]};if(f==="Z")o=!0,u(),r=mn(l),c=null,d=null;else if(f==="M"){for(let v=0;v+1<S.length;v+=2){const L=W(v);v===0&&(u(),l=mn(L)),p(L)}c=null,d=null}else if(f==="L"){for(let v=0;v+1<S.length;v+=2)p(W(v));c=null,d=null}else if(f==="H"){for(const v of S)p({x:b?r.x+v:v,y:r.y});c=null,d=null}else if(f==="V"){for(const v of S)p({x:r.x,y:b?r.y+v:v});c=null,d=null}else if(f==="C"){for(let v=0;v+5<S.length;v+=6){const L=W(v),M=W(v+2),U=W(v+4);y(L),p(U,M),c=M}d=null}else if(f==="S"){for(let v=0;v+3<S.length;v+=4){const L=c?tl(c,r):mn(r),M=W(v),U=W(v+2);y(L),p(U,M),c=M}d=null}else if(f==="Q")for(let v=0;v+3<S.length;v+=4){const L=W(v),M=W(v+2);y(In(r,L,2/3)),p(M,In(M,L,2/3)),d=L,c=null}else if(f==="T")for(let v=0;v+1<S.length;v+=2){const L=d?tl(d,r):mn(r),M=W(v);y(In(r,L,2/3)),p(M,In(M,L,2/3)),d=L,c=null}else if(f==="A")for(let v=0;v+6<S.length;v+=7){const L=b?{x:r.x+S[v+5],y:r.y+S[v+6]}:{x:S[v+5],y:S[v+6]};for(const M of _C(r,S[v],S[v+1],S[v+2],S[v+3]!==0,S[v+4]!==0,L))y(M.c1),p(M.p,M.c2);c=null,d=null}x=Rs.exec(t)}return u(),n}function Bn(e){return`${Number(e.toFixed(2))}`}function Un(e,t){return!e||Math.abs(e.x-t.x)<1e-6&&Math.abs(e.y-t.y)<1e-6?null:e}function Bp(e){return!!(Un(e.in,e.p)||Un(e.out,e.p))}function Go(e,t){return!Un(e.out,e.p)&&!Un(t.in,t.p)}function Xd(e,t){if(Go(e,t))return`L${Bn(t.p.x)},${Bn(t.p.y)}`;const n=Un(e.out,e.p)??e.p,i=Un(t.in,t.p)??t.p;return`C${Bn(n.x)},${Bn(n.y)} ${Bn(i.x)},${Bn(i.y)} ${Bn(t.p.x)},${Bn(t.p.y)}`}function Wo(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const[i,...o]=n.nodes;t.push(`M${Bn(i.p.x)},${Bn(i.p.y)}`);let r=i;for(const l of o)t.push(Xd(r,l)),r=l;if(n.closed){const l=Xd(r,i);l.charAt(0)==="C"&&t.push(l),t.push("Z")}}return t.join(" ")}function jp(e){const t=[];for(let n=0;n+1<e.nodes.length;n+=1)t.push({from:e.nodes[n],to:e.nodes[n+1],index:n});if(e.closed&&e.nodes.length>2){const n=e.nodes.length-1;t.push({from:e.nodes[n],to:e.nodes[0],index:n})}return t}function nl(e,t,n){if(Go(e,t))return In(e.p,t.p,n);const i=e.out??e.p,o=t.in??t.p,r=1-n,l=r*r*r,c=3*r*r*n,d=3*r*n*n,u=n*n*n;return{x:l*e.p.x+c*i.x+d*o.x+u*t.p.x,y:l*e.p.y+c*i.y+d*o.y+u*t.p.y}}function $r(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const i=[];for(const o of jp(n)){if(Go(o.from,o.to)){i.push(mn(o.from.p));continue}for(let r=0;r<Js;r+=1)i.push(nl(o.from,o.to,r/Js))}n.closed||i.push(mn(n.nodes[n.nodes.length-1].p)),i.length>2&&t.push(i)}return t}function Li(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const r of $r(e))for(const l of r)l.x<t&&(t=l.x),l.x>i&&(i=l.x),l.y<n&&(n=l.y),l.y>o&&(o=l.y);return{minX:t,minY:n,maxX:i,maxY:o}}function HC(e){const t=Li(e);return!isFinite(t.minX)||!isFinite(t.maxX)||!isFinite(t.minY)||!isFinite(t.maxY)?null:{x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2}}function Vp(e,t,n){const i={x:(n.x-e.x)/6,y:(n.y-e.y)/6};return{in:{x:t.x-i.x,y:t.y-i.y},out:{x:t.x+i.x,y:t.y+i.y}}}function Gp(e){return e.filter(t=>t.length>2).map(t=>{if(t.length<=TC)return{closed:!0,nodes:t.map(r=>({p:mn(r),in:null,out:null}))};const n=Math.max(1,Math.round(t.length/IC)),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:mn(r),...Vp(i[(l-1+o)%o],r,i[(l+1)%o])}))}})}function Xp(e,t,n=1){if(!e.length)return!1;const i=Li(e);if(!isFinite(i.minX)||!isFinite(i.maxX))return!1;const o=i.maxX-i.minX,r=i.maxY-i.minY;if(o<=t.width*2.5&&r<=t.height*2.5)return!1;const l=Math.max(n,t.width*.5),c=Math.max(n,t.height*.5);return i.minX<t.x-l||i.minY<t.y-c||i.maxX>t.x+t.width+l||i.maxY>t.y+t.height+c}function WC(e,t,n,i,o,r,l){const c=t.width>0?n.width/t.width:1,d=t.height>0?n.height/t.height:1;return!(r>0)||!(l>0)||!(c>0)||!(d>0)?e:un(e,u=>{const p=i+(u.x-t.x)*r,y=o+(u.y-t.y)*l;return{x:t.x+p/c,y:t.y+y/d}})}function OC(e,t){if(!e.length)return e;const n=Li(e),i=n.maxX-n.minX,o=n.maxY-n.minY;if(!(i>0)||!(o>0)||n.minX>=t.x-1e-6&&n.minY>=t.y-1e-6&&n.maxX<=t.x+t.width+1e-6&&n.maxY<=t.y+t.height+1e-6)return e;const l=Math.min(t.width/i,t.height/o),c=t.x+(t.width-i*l)/2,d=t.y+(t.height-o*l)/2;return un(e,u=>({x:c+(u.x-n.minX)*l,y:d+(u.y-n.minY)*l}))}function Up(e){const t={x:0,y:0,width:La,height:La},n=e!=="custom"?Yl[e]:void 0,i=n?un(ki(n),r=>({x:r.x/100*t.width+t.x,y:r.y/100*t.height+t.y})):un(Gp(el("rectangle")),r=>({x:r.x*t.width+t.x,y:r.y*t.height+t.y})),o=OC(i,t);return{shape:e,customPath:Wo(o),pathFit:"viewbox",pathViewBox:Zs}}function ta(e,t){return t>0?Math.round(e/t)*t:e}function DC(e,t,n,i){var u;const o=(u=e[t])==null?void 0:u.nodes[n];if(!o)return e;const r=i.x-o.p.x,l=i.y-o.p.y,c=Vn(e),d=c[t].nodes[n];return d.p={x:o.p.x+r,y:o.p.y+l},d.in&&(d.in={x:d.in.x+r,y:d.in.y+l}),d.out&&(d.out={x:d.out.x+r,y:d.out.y+l}),c}function Ud(e,t,n,i){var r;if(!t.length)return e;const o=Vn(e);for(const{contour:l,node:c}of t){const d=(r=o[l])==null?void 0:r.nodes[c];d&&(d.p={x:d.p.x+n,y:d.p.y+i},d.in&&(d.in={x:d.in.x+n,y:d.in.y+i}),d.out&&(d.out={x:d.out.x+n,y:d.out.y+i}))}return o}function zC(e,t){const n=new Map;for(const{contour:o,node:r}of t){const l=n.get(o)??[];l.push(r),n.set(o,l)}let i=e;return n.forEach((o,r)=>{const l=[...o].sort((c,d)=>d-c);for(const c of l)i=qp(i,r,c)}),i}function BC(e,t,n,i,o,r){var u;if(!((u=e[t])==null?void 0:u.nodes[n]))return e;const c=Vn(e),d=c[t].nodes[n];if(d[i]=mn(o),r){const p=i==="in"?"out":"in";d[p]=tl(o,d.p)}return c}function jC(e,t,n,i){var l;const o=(l=e[t])==null?void 0:l.nodes[n];if(!o||!o[i])return e;const r=Vn(e);return r[t].nodes[n][i]=null,r}function VC(e,t,n,i){const o=e[t];if(!o)return{contours:e,nodeIndex:-1};const r=o.nodes[n],l=o.nodes[(n+1)%o.nodes.length];if(!r||!l)return{contours:e,nodeIndex:-1};const c=Vn(e),d=c[t].nodes,u=n+1;if(Go(r,l))return d.splice(u,0,{p:In(r.p,l.p,i),in:null,out:null}),{contours:c,nodeIndex:u};const p=r.out??r.p,y=l.in??l.p,x=In(r.p,p,i),g=In(p,y,i),f=In(y,l.p,i),b=In(x,g,i),S=In(g,f,i),W=In(b,S,i),v=(n+1)%o.nodes.length;return d[n].out=x,d[v].in=f,d.splice(u,0,{p:W,in:b,out:S}),{contours:c,nodeIndex:u}}function qp(e,t,n){const i=e[t];if(!i||i.nodes.length<=3)return e;const o=Vn(e);return o[t].nodes.splice(n,1),o}function qd(e,t,n){const i=e[t];if(!(i==null?void 0:i.nodes[n]))return e;const r=Vn(e),l=r[t].nodes,c=l[n],d=l.length,u=(n-1+d)%d,p=(n+1)%d,y=!!Un(l[u].out,l[u].p),x=!!Un(l[p].in,l[p].p);if(Bp(c)||y||x)return c.in=null,c.out=null,l[u].out=null,l[p].in=null,r;const g=Vp(l[u].p,c.p,l[p].p);return c.in=g.in,c.out=g.out,r}function GC(e,t,n){const i=n.x-t.x,o=n.y-t.y,r=i*i+o*o,l=r===0?0:Math.max(0,Math.min(1,((e.x-t.x)*i+(e.y-t.y)*o)/r)),c={x:t.x+i*l,y:t.y+o*l};return{t:l,distance:Math.hypot(e.x-c.x,e.y-c.y),point:c}}function Yd(e,t){let n=null;return e.forEach((i,o)=>{for(const r of jp(i)){const l=Go(r.from,r.to)?1:Js;for(let c=0;c<l;c+=1){const d=c/l,u=(c+1)/l,p=GC(t,nl(r.from,r.to,d),nl(r.from,r.to,u));(!n||p.distance<n.distance)&&(n={contour:o,segment:r.index,t:d+(u-d)*p.t,distance:p.distance,point:p.point})}}}),n}function XC(e,t){const n=[];return e.forEach((i,o)=>{i.nodes.forEach((r,l)=>{o===t.contour&&l===t.node||n.push(r.p)})}),n}function Kd(e,t,n){const i=t.filter((r,l)=>isFinite(r)&&t.findIndex(c=>Math.abs(c-r)<1e-6)===l),o=i.map(r=>({value:r,axis:r,from:null}));for(const r of e)o.push({value:r[n],axis:null,from:r});for(const r of i)for(const l of e)o.push({value:r*2-l[n],axis:r,from:l});return o}function Qd(e,t,n,i,o){const r=i(t)[n];let l=null,c=1/0;for(const d of e){const u=n==="x"?{x:d.value,y:t.y}:{x:t.x,y:d.value},p=Math.abs(i(u)[n]-r);p>o||l&&p>=c||(l=d,c=p)}return l}function UC(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 qC(e){const t=Math.PI*2;return((e+Math.PI)%t+t)%t-Math.PI}function il(e,t){const n=t.x-e.x,i=t.y-e.y,o=Math.hypot(n,i);return o<1e-6?null:{x:n/o,y:i/o}}function YC(e,t){const n=il(e,t);return n?{kind:"align",a:{x:e.x-n.x*yo,y:e.y-n.y*yo},b:{x:t.x+n.x*yo,y:t.y+n.y*yo}}:{kind:"align",a:e,b:t}}function ol(e,t,n){return t==="x"?{kind:"center",a:{x:e,y:0},b:{x:e,y:n.height}}:{kind:"center",a:{x:0,y:e},b:{x:n.width,y:e}}}function Zd(e,t,n,i,o){if(e.axis===null)return YC(n,o(e.from??n));const r=t==="x"?{x:e.axis,y:0}:{x:0,y:e.axis};return ol(o(r)[t],t,i)}function KC(e,t,n,i,o){const r=[],l=o(e);return t&&e.x===t.value&&r.push(Zd(t,"x",l,i,o)),n&&e.y===n.value&&r.push(Zd(n,"y",l,i,o)),r}function QC(e,t,n,i){const o=e==null?void 0:e.nodes[t];if(!e||!o)return null;const r=i(o.p),l=n==="in"?o.out:o.in;if(l)return il(i(l),r);const c=e.nodes.length,d=t+(n==="in"?1:-1);if(!e.closed&&(d<0||d>=c))return null;const u=e.nodes[(d+c)%c];if(!u)return null;const p=(n==="in"?u.in:u.out)??u.p;return il(i(p),r)}function ZC(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:vo};const x=Math.atan2(p,u),g=Math.round(x/Bd)*Bd;let f=o?g:null,b=!1;if(!o){const G=[];n&&G.push({angle:Math.atan2(n.y,n.x),smooth:!0}),G.push({angle:g,smooth:!1});for(const B of G){const N=qC(B.angle-x);if(!(Math.abs(N)>MC)&&!(Math.abs(Math.sin(N))*y>PC)){f=B.angle,b=B.smooth;break}}}const S=i!==null&&i>0&&Math.abs(y-i)<=RC;if(f===null&&!S)return{point:e,guides:vo};const W=f??x,v=S?i:y,L={x:Math.cos(W),y:Math.sin(W)},M=v+(f===null?0:yo),U=S?v:b?yo:0;return{point:l({x:c.x+L.x*v,y:c.y+L.y*v}),guides:[{kind:"angle",a:{x:c.x-L.x*U,y:c.y-L.y*U},b:{x:c.x+L.x*M,y:c.y+L.y*M}}]}}const rl=.1,al=8,JC=4,Jd=10,Pa=(e,t)=>{switch(t){case"nw":return{x:e.minX,y:e.minY};case"ne":return{x:e.maxX,y:e.minY};case"se":return{x:e.maxX,y:e.maxY};case"sw":return{x:e.minX,y:e.maxY}}},Yp=e=>{switch(e){case"nw":return"se";case"ne":return"sw";case"se":return"nw";case"sw":return"ne"}},sl=(e,t)=>{const n=Pa(e,t),i=t==="nw"||t==="sw"?-1:1,o=t==="nw"||t==="ne"?-1:1;return{x:n.x+i*Jd,y:n.y+o*Jd}},ll=(e,t)=>!(t.width>0)||!(t.height>0)||!(e.width>0)||!(e.height>0)?1:Math.max(e.width/t.width,e.height/t.height),Ui=(e,t,n)=>{const i=ll(e,t)*n;return{width:t.width*i,height:t.height*i}},jn=(e,t,n)=>(e-t)*n,xo=(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)<JC?.5:Ia(r)},eT=(e,t,n,i,o,r)=>{const l=Ui(e,n,r),c=e.x+jn(e.width,l.width,i),d=e.y+jn(e.height,l.height,o),u=ll(e,n),p=ll(t,n),y=Math.min(al,Math.max(rl,p>0?r*(u/p):r)),x=Ui(t,n,y);return{focalX:xo(t.width,x.width,c-t.x,{clamp:!1}),focalY:xo(t.height,x.height,d-t.y,{clamp:!1}),scale:y}},tT=6,nT=3,iT=2,ks="­",oT=new RegExp("\\p{L}","gu"),eu=20,rT={arb:"ar",azj:"az",bel:"be",bos:"bs",bul:"bg",ces:"cs",deu:"de",eng:"en",fas:"fa",fra:"fr",hau:"ha",hin:"hi",hrv:"hr",hun:"hu",ibo:"ig",ind:"id",ita:"it",jav:"jv",kaz:"kk",kin:"rw",lin:"ln",mar:"mr",nep:"ne",nld:"nl",nya:"ny",pol:"pl",por:"pt",ron:"ro",run:"rn",rus:"ru",som:"so",spa:"es",srp:"sr",sun:"su",swe:"sv",swh:"sw",tgl:"tl",tur:"tr",ukr:"uk",urd:"ur",uzn:"uz",vie:"vi",yor:"yo",zlm:"ms",zul:"zu"},cl={be:()=>Promise.resolve().then(()=>require("./index-B1vNL0m-.js")).then(e=>e.index),bg:()=>Promise.resolve().then(()=>require("./index-kFrlcZxC.js")).then(e=>e.index),cs:()=>Promise.resolve().then(()=>require("./index-B6E31HBG.js")).then(e=>e.index),de:()=>Promise.resolve().then(()=>require("./index-CNFsG2yO.js")).then(e=>e.index),en:()=>Promise.resolve().then(()=>require("./index-x_p4zv7D.js")).then(e=>e.index),"en-gb":()=>Promise.resolve().then(()=>require("./index-BkmSPu6z.js")).then(e=>e.index),es:()=>Promise.resolve().then(()=>require("./index-CADju5Cy.js")).then(e=>e.index),fr:()=>Promise.resolve().then(()=>require("./index-Rwqfce2n.js")).then(e=>e.index),hi:()=>Promise.resolve().then(()=>require("./index-HhE2sJlU.js")).then(e=>e.index),hr:()=>Promise.resolve().then(()=>require("./index-DapMA5nM.js")).then(e=>e.index),hu:()=>Promise.resolve().then(()=>require("./index-kjKI70JX.js")).then(e=>e.index),id:()=>Promise.resolve().then(()=>require("./index-BlAuAthm.js")).then(e=>e.index),it:()=>Promise.resolve().then(()=>require("./index-BK-G0i5L.js")).then(e=>e.index),mr:()=>Promise.resolve().then(()=>require("./index-CIgabTwE.js")).then(e=>e.index),nl:()=>Promise.resolve().then(()=>require("./index-BrL2zv3x.js")).then(e=>e.index),pl:()=>Promise.resolve().then(()=>require("./index-DehKWXGA.js")).then(e=>e.index),pt:()=>Promise.resolve().then(()=>require("./index-C0cxTf5o.js")).then(e=>e.index),ro:()=>Promise.resolve().then(()=>require("./index-CJ0NMfJ3.js")).then(e=>e.index),ru:()=>Promise.resolve().then(()=>require("./index-gBhj9Tcu.js")).then(e=>e.index),sr:()=>Promise.resolve().then(()=>require("./index-1HMblVmZ.js")).then(e=>e.index),sv:()=>Promise.resolve().then(()=>require("./index-CDO1-R3j.js")).then(e=>e.index),tr:()=>Promise.resolve().then(()=>require("./index-CG_43X7q.js")).then(e=>e.index),uk:()=>Promise.resolve().then(()=>require("./index-Ypt3vHbi.js")).then(e=>e.index)},aT=(e,t)=>{const n=e;return t(n)??t(n.default)??null};let tu=null;const sT=()=>(tu??(tu=Promise.resolve().then(()=>require("./index-2JTNRDR1.js")).then(e=>e.franc).catch(()=>null)),tu),nu=new Map,lT=e=>{let t=nu.get(e);return t||(t=cl[e]().then(n=>aT(n,i=>i==null?void 0:i.hyphenateSync)).catch(()=>null),nu.set(e,t)),t},iu=e=>{if(!e)return null;const t=e.toLowerCase();if(cl[t])return t;const n=t.split("-")[0];return cl[n]?n:null},cT=(e,t)=>{const n=t.trim();if(n.length<eu)return;const i=e(n,{minLength:eu});if(i!=="und")return rT[i]??i},dT={hyphenateSync:null};function uT(e,t){const[n,i]=s.useState(null);return s.useEffect(()=>{if(!e)return;let o=!1;return sT().then(async r=>{const l=r?cT(r,t):void 0,c=typeof document<"u"?document.documentElement.lang:"",d=iu(l)??iu(c)??"en",u=await lT(d);o||i({lang:l,hyphenateSync:u})}),()=>{o=!0}},[e,t]),e&&n?n:dT}const ou=e=>{var t;return((t=e.match(oT))==null?void 0:t.length)??0};function pT(e,t){if(e.length<2||e.includes(ks))return;const n=new Set;if(t){const o=t(e,{hyphenChar:ks,minWordLength:tT});let r=0;for(let l=0;l<o.length;l+=1)o[l]===ks?n.add(r):r+=1}for(let o=1;o<e.length-1;o+=1)e[o-1]==="-"&&n.add(o);const i=[...n].filter(o=>{const r=e[o-1]==="-";return o>0&&o<e.length&&ou(e.slice(0,o))>=(r?1:nT)&&ou(e.slice(o))>=(r?1:iT)}).sort((o,r)=>o-r);return i.length?i:void 0}const ru=1.08,na=14,ia=8;function gT({P:e,box:t,bounds:n,natural:i,imageUrl:o,maskPath:r,stage:l,onStageChange:c,focalX:d,focalY:u,scale:p,onChange:y,onCommit:x}){const g=s.useRef(null),f=`pretext-image-ghost-${s.useId().replace(/:/g,"")}`,b=s.useRef(null),S=s.useRef(null),W=s.useRef({focalX:d,focalY:u,scale:p});W.current={focalX:d,focalY:u,scale:p};const v=l==="image";s.useEffect(()=>{var R;v&&((R=g.current)==null||R.focus({preventScroll:!0}))},[v]);const L=s.useCallback((R,w)=>{var j;const T=(j=g.current)==null?void 0:j.getBoundingClientRect();return!T||T.width<=0||T.height<=0?{x:0,y:0}:{x:(R-T.left)/T.width*t.width,y:(w-T.top)/T.height*t.height}},[t.width,t.height]),M=R=>{var T,j;if(!i)return;R.stopPropagation(),R.preventDefault(),(T=g.current)==null||T.focus({preventScroll:!0});const w=Ui(n,i,p);b.current={pointerId:R.pointerId,origin:L(R.clientX,R.clientY),startX:jn(n.width,w.width,d),startY:jn(n.height,w.height,u),width:w.width,height:w.height,moved:!1},(j=g.current)==null||j.setPointerCapture(R.pointerId)},U=(R,w)=>{var V,me;if(!i)return;R.stopPropagation(),R.preventDefault(),(V=g.current)==null||V.focus({preventScroll:!0});const T=Ui(n,i,p),j=jn(n.width,T.width,d),_=jn(n.height,T.height,u),Q={minX:j,minY:_,maxX:j+T.width,maxY:_+T.height},P=Pa(Q,Yp(w)),h=Pa(Q,w),J=Math.hypot(h.x-P.x,h.y-P.y);!isFinite(J)||J<=0||(S.current={pointerId:R.pointerId,anchor:P,startDistance:J,startScale:p,startX:j,startY:_,moved:!1},(me=g.current)==null||me.setPointerCapture(R.pointerId))},G=R=>{if(!i)return;const w=S.current;if(w&&R.pointerId===w.pointerId){R.stopPropagation(),R.preventDefault();const j=L(R.clientX,R.clientY),_={x:j.x-n.x,y:j.y-n.y},Q=Math.hypot(_.x-w.anchor.x,_.y-w.anchor.y),P=Math.min(al,Math.max(rl,w.startScale*(Q/w.startDistance)));if(!w.moved&&Math.abs(P-w.startScale)<1e-4)return;w.moved=!0;const h=P/w.startScale,J=w.anchor.x+(w.startX-w.anchor.x)*h,V=w.anchor.y+(w.startY-w.anchor.y)*h,me=Ui(n,i,P);y({focalX:xo(n.width,me.width,J),focalY:xo(n.height,me.height,V),scale:P});return}const T=b.current;if(T&&R.pointerId===T.pointerId){R.stopPropagation(),R.preventDefault();const j=L(R.clientX,R.clientY),_=j.x-T.origin.x,Q=j.y-T.origin.y;if(!T.moved&&_===0&&Q===0)return;T.moved=!0,y({focalX:xo(n.width,T.width,T.startX+_),focalY:xo(n.height,T.height,T.startY+Q),scale:p})}},B=R=>{var j,_;const w=b.current;if(w&&R.pointerId===w.pointerId){b.current=null,R.stopPropagation(),(j=g.current)!=null&&j.hasPointerCapture(w.pointerId)&&g.current.releasePointerCapture(w.pointerId),w.moved&&x(W.current);return}const T=S.current;T&&R.pointerId===T.pointerId&&(S.current=null,R.stopPropagation(),(_=g.current)!=null&&_.hasPointerCapture(T.pointerId)&&g.current.releasePointerCapture(T.pointerId),T.moved&&x(W.current))},N=R=>{if(R.key==="Escape"){R.stopPropagation(),c("none");return}if(R.key==="="||R.key==="+"||R.key==="-"||R.key==="_"){R.preventDefault(),R.stopPropagation();const w=R.key==="="||R.key==="+",T=Math.min(al,Math.max(rl,p*(w?ru:1/ru))),j={focalX:d,focalY:u,scale:T};y(j),x(j)}},O=["nw","ne","se","sw"],C={minX:n.x,minY:n.y,maxX:n.x+n.width,maxY:n.y+n.height},$=s.useMemo(()=>{const R=i??{width:n.width,height:n.height},w=Ui(n,R,p);return!(w.width>0)||!(w.height>0)?null:{x:n.x+jn(n.width,w.width,d),y:n.y+jn(n.height,w.height,u),width:w.width,height:w.height}},[i,n.x,n.y,n.width,n.height,d,u,p]),K=$?{minX:$.x,minY:$.y,maxX:$.x+$.width,maxY:$.y+$.height}:C;return a.jsxs("svg",{ref:g,className:`${e}-editor${v?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:N,onPointerMove:G,onPointerUp:B,onPointerCancel:B,onLostPointerCapture:B,"data-pretext-image-editor":!0,children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>c("none")}),v&&o&&$&&r&&a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsxs("mask",{id:f,maskUnits:"userSpaceOnUse",x:$.x,y:$.y,width:$.width,height:$.height,children:[a.jsx("rect",{x:$.x,y:$.y,width:$.width,height:$.height,fill:"#FFFFFF"}),a.jsx("path",{d:r,fillRule:"evenodd",fill:"#000000"})]})}),a.jsx("image",{className:`${e}-editor-ghost`,href:o??void 0,x:$.x,y:$.y,width:$.width,height:$.height,preserveAspectRatio:"none",mask:`url(#${f})`}),a.jsx("rect",{className:`${e}-editor-image-bounds`,x:$.x,y:$.y,width:$.width,height:$.height})]}),v&&a.jsxs(a.Fragment,{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:n.x,y:n.y,width:n.width,height:n.height}),a.jsx("rect",{className:`${e}-editor-body`,x:n.x,y:n.y,width:n.width,height:n.height,onPointerDown:M}),O.map(R=>{const w=sl(K,R),T=R==="ne"||R==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:w.x-ia/2,y:w.y-ia/2,width:ia,height:ia}),a.jsx("rect",{className:`${e}-editor-scale-grab${T?` ${e}-editor-scale-grab-nesw`:""}`,x:w.x-na/2,y:w.y-na/2,width:na,height:na,onPointerDown:j=>U(j,R)})]},R)})]})]})}const dl=10,mT=dl*2,zn=7,hT=4,co=9,fT=3.5,au=1.08,yT=.05,oa=14,vT=1,ra=14,aa=8;function xT({P:e,box:t,viewBox:n,contours:i,snap:o,stretchToBox:r,uniformStretch:l=!1,stage:c,onStageChange:d,onSelectionChange:u,onChange:p,onCommit:y}){const x=s.useRef(null),g=s.useRef(null),f=s.useRef(i);f.current=i;const b=s.useRef(null),S=s.useRef(null),W=s.useRef(null),v=s.useRef(null),[L,M]=s.useState([]),[U,G]=s.useState(vo),[B,N]=s.useState(null),O=s.useCallback(m=>{G(Y=>UC(Y,m)?Y:m)},[]),C=c==="shape";s.useEffect(()=>{var m;C&&((m=x.current)==null||m.focus({preventScroll:!0}))},[C]),s.useEffect(()=>{C||M(m=>m.length?[]:m)},[C]);const $=L.length>0;s.useEffect(()=>{u==null||u($)},[$,u]),s.useEffect(()=>()=>u==null?void 0:u(!1),[u]);const K=n.width>0?t.width/n.width:1,R=n.height>0?t.height/n.height:1,w=Math.min(K,R),T=r&&l?w:K,j=r&&l?w:R,_=r&&l?(t.width-n.width*w)/2:0,Q=r&&l?(t.height-n.height*w)/2:0,P=s.useCallback(m=>r?{x:_+(m.x-n.x)*T,y:Q+(m.y-n.y)*j}:{x:m.x-n.x,y:m.y-n.y},[r,n,T,j,_,Q]),h=s.useCallback(m=>r?{x:n.x+(T>0?(m.x-_)/T:0),y:n.y+(j>0?(m.y-Q)/j:0)}:{x:n.x+m.x,y:n.y+m.y},[r,n,T,j,_,Q]),J=s.useMemo(()=>h({x:t.width/2,y:t.height/2}),[h,t.width,t.height]),V=s.useCallback((m,Y)=>{var ae;const te=(ae=x.current)==null?void 0:ae.getBoundingClientRect();if(!te||te.width<=0||te.height<=0)return{x:0,y:0};if(r){const fe=(m-te.left)/te.width*t.width,F=(Y-te.top)/te.height*t.height;return{x:n.x+(T>0?(fe-_)/T:0),y:n.y+(j>0?(F-Q)/j:0)}}return{x:n.x+(m-te.left),y:n.y+(Y-te.top)}},[r,n,t.width,t.height,T,j,_,Q]),me=s.useCallback((m,Y)=>{var ae;const te=(ae=x.current)==null?void 0:ae.getBoundingClientRect();return!te||te.width<=0||te.height<=0?{x:0,y:0}:{x:(m-te.left)/te.width*t.width,y:(Y-te.top)/te.height*t.height}},[t.width,t.height]),k=s.useCallback((m,Y)=>{const te=l&&!(Y!=null&&Y.preserveShape)?WC(m,n,t,_,Q,T,j):m;y(te,Y)},[y,l,n,t,_,Q,T,j]),le=s.useCallback(()=>{N(null)},[]),I=s.useCallback((m,Y,te)=>{if(!te||b.current||S.current||W.current||v.current){le();return}const ae=me(m,Y),fe=un(f.current,P);for(const z of fe)for(const $e of z.nodes)if(Math.hypot($e.p.x-ae.x,$e.p.y-ae.y)<=co){le();return}const F=Yd(fe,ae);if(!F||F.distance>dl){le();return}const H=fe[F.contour],ne=H==null?void 0:H.nodes[F.segment],q=H==null?void 0:H.nodes[(F.segment+1)%((H==null?void 0:H.nodes.length)??1)],ie=!!(ne&&q&&!Go(ne,q));N(z=>z&&z.curved===ie&&Math.hypot(z.point.x-F.point.x,z.point.y-F.point.y)<.25?z:{point:F.point,curved:ie})},[me,P,le]),ue=m=>{var He;const Y=m.metaKey||m.ctrlKey,te=W.current;if(te&&m.pointerId===te.pointerId){if(m.stopPropagation(),m.preventDefault(),te.startDistance<=0)return;const Ye=V(m.clientX,m.clientY),De=Math.hypot(Ye.x-te.origin.x,Ye.y-te.origin.y),ze=Math.max(yT,De/te.startDistance);if(!te.moved&&Math.abs(ze-1)<1e-4)return;te.moved=!0,p(Gd(te.startContours,te.origin,ze));return}const ae=S.current;if(ae&&m.pointerId===ae.pointerId){m.stopPropagation(),m.preventDefault();const Ye=V(m.clientX,m.clientY),{bbox:De}=ae,ze=De.maxX-De.minX,Ze=De.maxY-De.minY,Ue=Ye.x-ae.origin.x,ye=Ye.y-ae.origin.y;let Ne=Ue,Ve=ye;if(isFinite(ze)&&isFinite(Ze))if(r){let et=n.x,ot=n.x+n.width,lt=n.y,Ke=n.y+n.height;l&&(T>0&&(et=n.x+(0-_)/T,ot=n.x+(t.width-_)/T),j>0&&(lt=n.y+(0-Q)/j,Ke=n.y+(t.height-Q)/j));const ht=Math.min(et,ot-ze),tt=Math.max(et,ot-ze),Ge=Math.min(lt,Ke-Ze),We=Math.max(lt,Ke-Ze),Fe=Math.min(tt,Math.max(ht,De.minX+Ue)),ve=Math.min(We,Math.max(Ge,De.minY+ye));Ne=Fe-De.minX,Ve=ve-De.minY}else{const et=De.minX-n.x,ot=De.minY-n.y,lt=Math.min(0,t.width-ze),Ke=Math.max(0,t.width-ze),ht=Math.min(0,t.height-Ze),tt=Math.max(0,t.height-Ze),Ge=Math.min(Ke,Math.max(lt,et+Ue)),We=Math.min(tt,Math.max(ht,ot+ye));Ne=Ge-et,Ve=We-ot}const Je=[];if(!Y&&isFinite(ze)&&isFinite(Ze)){const et=P({x:De.minX+ze/2+Ne,y:De.minY+Ze/2+Ve}),ot={x:t.width/2,y:t.height/2};Math.abs(et.x-ot.x)<=oa&&(Ne=J.x-De.minX-ze/2,Je.push(ol(ot.x,"x",t))),Math.abs(et.y-ot.y)<=oa&&(Ve=J.y-De.minY-Ze/2,Je.push(ol(ot.y,"y",t)))}if(!ae.moved&&Ne===0&&Ve===0)return;ae.moved=!0,O(Je.length?Je:vo),p(un(ae.startContours,et=>({x:et.x+Ne,y:et.y+Ve})),{carryImage:!0});return}const fe=v.current;if(fe&&m.pointerId===fe.pointerId){m.stopPropagation(),m.preventDefault();const Ye=V(m.clientX,m.clientY);let De=Ye.x-fe.origin.x,ze=Ye.y-fe.origin.y;if(m.shiftKey&&(Math.abs(De)>Math.abs(ze)?ze=0:De=0),!fe.moved&&De===0&&ze===0)return;fe.moved=!0,p(Ud(fe.startContours,fe.selection,De,ze));return}const F=b.current;if(!F||m.pointerId!==F.pointerId){I(m.clientX,m.clientY,L.length>0||C);return}le(),m.stopPropagation(),m.preventDefault();const H=V(m.clientX,m.clientY);if(F.kind==="anchor"){const Ye={x:F.anchor.x+(H.x-F.origin.x),y:F.anchor.y+(H.y-F.origin.y)},De=Y?[]:XC(f.current,{contour:F.contour,node:F.node}),ze=Y||!F.center?[]:[F.center],Ze=Qd(Kd(De,ze.map(Ne=>Ne.x),"x"),Ye,"x",P,oa),Ue=Qd(Kd(De,ze.map(Ne=>Ne.y),"y"),Ye,"y",P,oa),ye=Y?Ye:{x:(Ze==null?void 0:Ze.value)??ta(Ye.x,o),y:(Ue==null?void 0:Ue.value)??ta(Ye.y,o)};if(m.shiftKey&&(Math.abs(ye.x-F.anchor.x)>Math.abs(ye.y-F.anchor.y)?ye.y=F.anchor.y:ye.x=F.anchor.x),!F.moved&&ye.x===F.anchor.x&&ye.y===F.anchor.y)return;F.moved=!0,O(KC(ye,Ze,Ue,t,P)),p(DC(f.current,F.contour,F.node,ye));return}const ne=(He=f.current[F.contour])==null?void 0:He.nodes[F.node],q=F.mirror&&!m.altKey,ie=q||Y?null:F.kind==="in"?ne==null?void 0:ne.out:ne==null?void 0:ne.in,z=ne?P(ne.p):null,$e=ie?P(ie):null,re=ne&&(!Y||m.shiftKey)?ZC(H,ne.p,q||Y?null:QC(f.current[F.contour],F.node,F.kind,P),z&&$e?Math.hypot($e.x-z.x,$e.y-z.y):null,m.shiftKey,P,h):{point:H,guides:vo},X=re.guides.length?re.point:Y?H:{x:ta(H.x,o),y:ta(H.y,o)},Ce=F.kind==="in"?ne==null?void 0:ne.in:ne==null?void 0:ne.out;!F.moved&&Ce&&X.x===Ce.x&&X.y===Ce.y||(F.moved=!0,O(re.guides),p(BC(f.current,F.contour,F.node,F.kind,X,q)))},ee=m=>{O(vo);const Y=W.current;if(Y&&m.pointerId===Y.pointerId){W.current=null,m.stopPropagation();const ie=x.current;ie!=null&&ie.hasPointerCapture(Y.pointerId)&&ie.releasePointerCapture(Y.pointerId),Y.moved&&k(f.current,{preserveShape:!0});return}const te=S.current;if(te&&m.pointerId===te.pointerId){S.current=null,m.stopPropagation();const ie=x.current;ie!=null&&ie.hasPointerCapture(te.pointerId)&&ie.releasePointerCapture(te.pointerId),te.moved?k(f.current,{preserveShape:!0}):M([]);return}const ae=v.current;if(ae&&m.pointerId===ae.pointerId){v.current=null,m.stopPropagation();const ie=x.current;ie!=null&&ie.hasPointerCapture(ae.pointerId)&&ie.releasePointerCapture(ae.pointerId),ae.moved&&k(f.current);return}const fe=b.current;if(!fe||m.pointerId!==fe.pointerId)return;b.current=null,m.stopPropagation();const F=x.current;F!=null&&F.hasPointerCapture(fe.pointerId)&&F.releasePointerCapture(fe.pointerId);const H=Math.hypot(m.clientX-fe.clientOrigin.x,m.clientY-fe.clientOrigin.y);if(fe.moved||H>hT){fe.moved&&k(f.current);return}if(!fe.toggleOnRelease||m.type!=="pointerup")return;const q=qd(f.current,fe.contour,fe.node);q!==f.current&&(p(q),k(q))},xe=m=>{m.stopPropagation()},Le=m=>{var Y,te;m.stopPropagation(),m.preventDefault(),le(),(Y=x.current)==null||Y.focus({preventScroll:!0}),S.current={pointerId:m.pointerId,origin:V(m.clientX,m.clientY),startContours:Vn(i),bbox:Li(i),moved:!1},(te=x.current)==null||te.setPointerCapture(m.pointerId)},ce=(m,Y)=>{var H,ne;m.stopPropagation(),m.preventDefault(),le(),(H=x.current)==null||H.focus({preventScroll:!0}),M([]),d("shape");const te=Li(i),ae=Pa(te,Yp(Y)),fe=sl(te,Y),F=Math.hypot(fe.x-ae.x,fe.y-ae.y);!isFinite(F)||F<=0||(W.current={pointerId:m.pointerId,corner:Y,origin:ae,startDistance:F,startContours:Vn(i),moved:!1},(ne=x.current)==null||ne.setPointerCapture(m.pointerId))},de=(m,Y,te,ae)=>{var H,ne,q,ie;m.stopPropagation(),m.preventDefault(),le(),(H=x.current)==null||H.focus({preventScroll:!0});const fe=(ne=i[te])==null?void 0:ne.nodes[ae];if(!fe)return;if(m.altKey){const z=Y==="anchor"?qp(i,te,ae):jC(i,te,ae,Y);if(z===i)return;M(Y==="anchor"?[]:[{contour:te,node:ae}]),p(z),k(z);return}const F=m.metaKey||m.ctrlKey;if(Y==="anchor"&&m.shiftKey&&!F){M(z=>z.some($e=>$e.contour===te&&$e.node===ae)?z.filter($e=>!($e.contour===te&&$e.node===ae)):[...z,{contour:te,node:ae}]);return}if(Y==="anchor"&&!F&&L.length>1&&L.some(z=>z.contour===te&&z.node===ae)){v.current={pointerId:m.pointerId,origin:V(m.clientX,m.clientY),startContours:Vn(i),selection:L,moved:!1},(q=x.current)==null||q.setPointerCapture(m.pointerId);return}M([{contour:te,node:ae}]),b.current={kind:Y,contour:te,node:ae,pointerId:m.pointerId,origin:V(m.clientX,m.clientY),clientOrigin:{x:m.clientX,y:m.clientY},anchor:fe.p,center:HC(i),mirror:Y!=="anchor"&&!!(fe.in&&fe.out),toggleOnRelease:F,moved:!1},(ie=x.current)==null||ie.setPointerCapture(m.pointerId)},Z=m=>{m.stopPropagation(),m.preventDefault(),le();const Y=un(i,P),te=Yd(Y,me(m.clientX,m.clientY));if(!te||te.distance>dl)return;const{contours:ae,nodeIndex:fe}=VC(i,te.contour,te.segment,te.t);fe<0||(M([{contour:te.contour,node:fe}]),p(ae),k(ae))},pe=m=>{if(m.key==="="||m.key==="+"||m.key==="-"||m.key==="_"){m.preventDefault(),m.stopPropagation();const F=Li(i);if(!isFinite(F.minX)||!isFinite(F.maxX))return;const H={x:(F.minX+F.maxX)/2,y:(F.minY+F.maxY)/2},q=m.key==="="||m.key==="+"?au:1/au,ie=Gd(i,H,q);p(ie),k(ie,{preserveShape:!0});return}if(m.key==="Escape"){m.stopPropagation(),M([]),d("none");return}if(!L.length)return;if(m.key==="Backspace"||m.key==="Delete"){m.preventDefault(),m.stopPropagation();const F=zC(i,L);if(F===i)return;M([]),p(F),k(F);return}const Y=o>0?o:vT,te=m.shiftKey?Y*10:Y,ae={ArrowLeft:[-te,0],ArrowRight:[te,0],ArrowUp:[0,-te],ArrowDown:[0,te]}[m.key];if(!ae)return;m.preventDefault(),m.stopPropagation();const fe=Ud(i,L,ae[0],ae[1]);p(fe),k(fe)},oe=s.useMemo(()=>Wo(un(i,P)),[i,P]),ge=s.useMemo(()=>Li(i),[i]),be=P({x:ge.minX,y:ge.minY}),Re={width:P({x:ge.maxX,y:ge.minY}).x-be.x,height:P({x:ge.minX,y:ge.maxY}).y-be.y},Ee=C&&L.length===0&&isFinite(ge.minX)&&isFinite(ge.maxX)&&ge.maxX>ge.minX&&ge.maxY>ge.minY,Te=L.length>0||C,we=Te;return a.jsxs("svg",{ref:x,className:`${e}-editor${Te?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:pe,onPointerDown:()=>{var m;return(m=x.current)==null?void 0:m.focus({preventScroll:!0})},onPointerMove:ue,onPointerLeave:le,onPointerUp:ee,onPointerCancel:ee,onLostPointerCapture:ee,onContextMenu:m=>{m.preventDefault()},"data-pretext-path-editor":!0,"data-selection":"none",children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>{M([]),d("none")},onClick:Z}),we&&a.jsx("path",{className:`${e}-editor-outline`,d:oe}),we&&U.map((m,Y)=>a.jsx("line",{className:`${e}-editor-snap ${e}-editor-snap-${m.kind}`,x1:m.a.x,y1:m.a.y,x2:m.b.x,y2:m.b.y},`${m.kind}-${Y}`)),a.jsx("path",{ref:g,className:`${e}-editor-body`,d:oe,fillRule:"evenodd",onPointerDown:Le,onClick:Z}),we&&a.jsx("path",{className:`${e}-editor-hit`,d:oe,style:{strokeWidth:mT},onClick:Z}),we&&B&&a.jsx("rect",{className:`${e}-editor-add-preview`,x:B.point.x-zn/2,y:B.point.y-zn/2,width:zn,height:zn,rx:B.curved?zn/2:0}),we&&i.map((m,Y)=>m.nodes.map((te,ae)=>{const fe=L.some(H=>H.contour===Y&&H.node===ae),F=P(te.p);return a.jsxs("g",{children:[fe&&L.length===1&&["in","out"].map(H=>{const ne=te[H];if(!ne)return null;const q=P(ne);return a.jsxs("g",{children:[a.jsx("line",{className:`${e}-editor-handle-line`,x1:F.x,y1:F.y,x2:q.x,y2:q.y}),a.jsx("circle",{className:`${e}-editor-handle`,cx:q.x,cy:q.y,r:fT}),a.jsx("circle",{className:`${e}-editor-grab`,cx:q.x,cy:q.y,r:co,onPointerDown:ie=>de(ie,H,Y,ae),onClick:xe})]},H)}),a.jsx("rect",{className:`${e}-editor-anchor${fe?` ${e}-editor-anchor-selected`:""}`,x:F.x-zn/2,y:F.y-zn/2,width:zn,height:zn,rx:Bp(te)?zn/2:0}),a.jsx("rect",{className:`${e}-editor-grab`,x:F.x-co,y:F.y-co,width:co*2,height:co*2,onPointerDown:H=>de(H,"anchor",Y,ae),onClick:xe,onDoubleClick:H=>{H.stopPropagation(),H.preventDefault();const ne=qd(i,Y,ae);p(ne),k(ne)}})]},`${Y}-${ae}`)})),Ee&&a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:be.x,y:be.y,width:Re.width,height:Re.height}),["nw","ne","se","sw"].map(m=>{const Y=P(sl(ge,m)),te=m==="ne"||m==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:Y.x-aa/2,y:Y.y-aa/2,width:aa,height:aa}),a.jsx("rect",{className:`${e}-editor-scale-grab${te?` ${e}-editor-scale-grab-nesw`:""}`,x:Y.x-ra/2,y:Y.y-ra/2,width:ra,height:ra,onPointerDown:ae=>ce(ae,m),onClick:xe})]},m)})]})]})}const bT=4e3,ST=/^(?:https?:|mailto:|tel:)/i;function Kp(e){return!!e&&typeof e=="object"&&e.type==="link"}function wT(e){if(!e)return;const t=e.replace(/\s+/g,"");if(!(/^[a-z][a-z0-9+.-]*:/i.test(t)&&!ST.test(t)))return t}function $T(e){const t=[];return e.forEach((n,i)=>{const o=(r,l,c)=>{for(const d of r){if(Kp(d)){o(d.children??[],wT(d.value),d.target);continue}const u=d,p=(u==null?void 0:u.text)??"";if(p.trim())for(const y of p.split(/\s+/))y&&t.push({text:y,leaf:u,href:l,target:c,para:i})}};o((n==null?void 0:n.children)??[])}),t}function su(e){return{...e.fontFamily&&{fontFamily:Bo(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 CT(e){return e.map(t=>{const n=[],i=o=>{for(const r of o){if(Kp(r)){i(r.children??[]);continue}n.push((r==null?void 0:r.text)??"")}};return i((t==null?void 0:t.children)??[]),n.join("")})}function TT(e,t,n,i,o){if(t<=0||!e.length||n<=0||i<=0)return e;const r=o==="avoid"?1:-1;return e.map(l=>{if(!l.length)return l;let c=1/0,d=-1/0,u=1/0,p=-1/0;for(const g of l){const f=g.x*n,b=g.y*i;f<c&&(c=f),f>d&&(d=f),b<u&&(u=b),b>p&&(p=b)}const y=(c+d)/2,x=(u+p)/2;return l.map(g=>{const f=g.x*n,b=g.y*i,S=f-y,W=b-x,v=Math.sqrt(S*S+W*W);if(v<1e-6)return g;const M=Math.max(0,v+r*t)/v;return{x:(y+S*M)/n,y:(x+W*M)/i}})})}const IT=.75;function lu(e,t,n,i,o,r){if(e.kind==="fragment"||!t)return null;const l=e.token.text,c=e.offset>0?t[e.offset-1]:0,d=n?n.map(u=>u-e.offset).filter(u=>u>=(e.offset>0?2:1)&&u<l.length):Array.from({length:l.length-1},(u,p)=>p+1);for(let u=d.length-1;u>=0;u-=1){const p=d[u];if(e.offset+p>t.length)continue;const y=!!n&&l[p-1]!=="-",x=t[e.offset+p-1]-c,g=x+(y?r:0);if(!(g*o>i))return{chars:p,fragmentText:y?`${l.slice(0,p)}-`:l.slice(0,p),remainderText:l.slice(p),fragmentWidth:g,remainderWidth:Math.max(0,e.width-x)}}return null}function cu(e){const{tokens:t,widths:n,rings:i,mode:o,align:r,scale:l,width:c,height:d,allowOverflow:u,capInset:p,capLines:y}=e,x=!!e.hyphenate,g=e.charWidths??[],f=e.hyphenPoints??[],b=e.hyphenWidth??0,S=e.lineHeight*l,W=e.spaceWidth*l,v=Math.max(0,e.shapeMargin??0),L=[],M=t.map((P,h)=>({token:P,originalIndex:h,width:n[h],kind:"whole",offset:0}));if(!M.length||c<=0||S<=0)return{segments:L,placed:0,height:0,capLeft:0,capTop:0,renderTokens:t};const U=Math.max(1,W*.5),G=S*fC,B=TT(i,v,c,d,o),N=Math.max(1,Math.floor(e.columns??1)),O=N>1?Math.max(0,e.columnGap??0):0,C=(c-O*(N-1))/N;let $=0,K=0,R=0,w=0,T=0,j=null;const _=(P,h,J)=>CC(B,(P+G)/d,(P+S-G)/d,o).map(V=>({x0:Math.max(h,V.x0*c),x1:Math.min(J,V.x1*c)})).filter(V=>V.x1>V.x0);for(let P=0;P<N&&$<M.length&&C>0;P+=1){const h=P*(C+O),J=h+C,V=u&&P===N-1;let me=0;for(let I=0;I+S<=d;I+=S)for(const ue of _(I,h,J))me=Math.max(me,ue.x1-ue.x0);let k=M[$].token.para,le=0;for(;$<M.length&&R<bT;){const I=le+S>d;if(I&&!V)break;const ue=M[$].token.para;if(ue>k+1){le+=S*(ue-k-1),k=ue-1,R+=1;continue}let ee=I?[{x0:h,x1:J}]:_(le,h,J);p>0&&y>0&&P===0&&!I&&ee.length&&(j===null&&(j=R,w=ee[0].x0,T=le),R-j<y&&(ee=$C(ee,{x0:w,x1:w+p})));const xe=ee.reduce((Le,ce)=>Math.max(Le,ce.x1-ce.x0),0);for(const Le of ee){const ce=Le.x1-Le.x0;if(ce<U)continue;if($>=M.length||M[$].token.para!==ue)break;const de=$;let Z=0;for(;$<M.length&&M[$].token.para===ue;){const pe=M[$],oe=$===de,ge=pe.width*l,be=oe?ge:W+ge;if(Z+be<=ce){Z+=be,$+=1;continue}const Re=ce-Z-(oe?0:W),Ee=oe&&ge>C-.5,Te=ce>=xe-.5&&ce>=me*IT,we=g[pe.originalIndex],m=f[pe.originalIndex],Y=(x&&m?lu(pe,we,m,Re,l,b):null)??(Ee&&Te?lu(pe,we,void 0,Re,l,b):null);if(Y){const te={token:{...pe.token,text:Y.fragmentText},originalIndex:pe.originalIndex,width:Y.fragmentWidth,kind:"fragment",offset:pe.offset},ae={token:{...pe.token,text:Y.remainderText},originalIndex:pe.originalIndex,width:Y.remainderWidth,kind:"remainder",offset:pe.offset+Y.chars};M.splice($,1,te,ae),Z+=(oe?0:W)+Y.fragmentWidth*l,$+=1;break}if(Ee&&N===1&&ce>=me-.5){Z+=be,$+=1;continue}break}if($>de){const pe=$>=M.length||M[$].token.para!==ue;L.push({top:le,left:Le.x0,width:ce,from:de,to:$,justify:r==="justify"&&!pe})}if($>=M.length||M[$].token.para!==ue)break}k=ue,le+=S,R+=1}K=Math.max(K,le)}let Q=0;if($>0){const P=M[$-1];Q=P.kind==="fragment"?P.originalIndex:P.originalIndex+1}return{segments:L,placed:Q,height:L.length?K:0,capLeft:w,capTop:T,renderTokens:M.map(P=>P.token)}}const LT=.12,PT=2,MT=10,As=.25,RT=e=>{const t=e.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}},ET=(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,kT=(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=RT(e);(!r||!ET(r,c))&&(r=c,i(c)),o=requestAnimationFrame(l)};return l(),()=>cancelAnimationFrame(o)},[e,t]),n},Fs=(e,t)=>{if(!(t.width>0)||!(t.height>0))return e;const n=Math.min(t.width,t.height),i=(t.width-n)/2,o=(t.height-n)/2;return e.map(r=>r.map(l=>({x:(i+l.x*n)/t.width,y:(o+l.y*n)/t.height})))},nr=typeof window>"u"?s.useEffect:s.useLayoutEffect;function AT(){return typeof document>"u"?null:document.body}function FT({P:e,item:t,shape:n,customPath:i,pathFit:o,viewBox:r,mode:l,align:c,allowOverflow:d,fitEnabled:u,scale:p,onFitScale:y,padding:x,columns:g,gutter:f,hyphenate:b,showOverflowIndicator:S,dropCapLines:W,dropCapSize:v,showGuides:L,typography:M,imageUrl:U,imageFocalX:G,imageFocalY:B,imageScale:N,imageCustomPath:O,imagePathEdited:C,pathDragActive:$,pathCarryImage:K,onCarryImageConsumed:R,pathEditor:w,imageEditor:T}){var Ut,Ft;const j=`pretext-shape-image-${s.useId().replace(/:/g,"")}`,[_,Q]=s.useState(null),P=s.useRef(null),[h,J]=s.useState({width:0,height:0}),[V,me]=s.useState(0),[k,le]=s.useState(0),[I,ue]=s.useState(null),[ee,xe]=s.useState(0),[Le,ce]=s.useState("none");s.useEffect(()=>{!w&&!T&&ce("none")},[w,T]);const[de,Z]=s.useState(null);s.useEffect(()=>{if(!U||typeof Image>"u"){Z(null);return}let Me=!1;const Oe=new Image;return Oe.onload=()=>{Me||Z({width:Oe.naturalWidth,height:Oe.naturalHeight})},Oe.src=U,()=>{Me=!0}},[U]);const pe=s.useMemo(()=>Array.isArray(t==null?void 0:t.text)?t.text:[],[t]),oe=s.useMemo(()=>$T(pe),[pe]),ge=s.useMemo(()=>CT(pe),[pe]),be=s.useMemo(()=>ge.join(`
27798
- `),[ge]),{lang:Re,hyphenateSync:Ee}=uT(b,be),Te=s.useMemo(()=>b?oe.map(Me=>pT(Me.text,Ee)):[],[b,oe,Ee]),we=W>0&&v>1?((Ft=(Ut=oe[0])==null?void 0:Ut.text)==null?void 0:Ft.charAt(0))??"":"",m=(w==null?void 0:w.contours)??null,Y=s.useMemo(()=>{let Me=[];if(m){const Oe=$r(m);Oe.length&&(Me=Co(Oe,r))}if(!Me.length){const Oe=i.trim(),St=Oe?zd(Oe,o,r):null;St&&St.length?Me=St:Me=el(n==="custom"?"rectangle":n)}return n==="circle"?Fs(Me,h):Me},[m,n,i,o,r,h.width,h.height]),te=w==null?void 0:w.onConvert,ae=(w==null?void 0:w.needsConversion)??!1,fe=s.useMemo(()=>{if(n==="circle")return!1;const Me=m??(i.trim()?ki(i):null);return!!(Me&&Xp(Me,r))},[m,i,r,n]),[F,H]=s.useState(null);nr(()=>{if(!fe){F&&H(null);return}!F&&h.width>0&&h.height>0&&H({width:h.width,height:h.height})},[fe,h.width,h.height,F]);const ne=s.useMemo(()=>{if(!fe||h.width<=0||h.height<=0)return Y;const Me=F??h,Oe=r.width/Me.width,St=r.height/Me.height;return Y.map(Mt=>Mt.map(Qe=>({x:Qe.x*Oe,y:Qe.y*St})))},[Y,fe,F,r.width,r.height,h.width,h.height]),q=s.useMemo(()=>{if(m){const Mt=$r(m);if(Mt.length){const Qe=Co(Mt,r);return n==="circle"?Fs(Qe,h):Qe}}const Me=O.trim(),Oe=Me?zd(Me,o,r):null,St=Oe&&Oe.length?Oe:el(n==="custom"?"rectangle":n);return n==="circle"?Fs(St,h):St},[m,n,O,o,r,h.width,h.height]),ie=s.useMemo(()=>{if(!fe||h.width<=0||h.height<=0)return q;const Me=F??h,Oe=r.width/Me.width,St=r.height/Me.height;return q.map(Mt=>Mt.map(Qe=>({x:Qe.x*Oe,y:Qe.y*St})))},[q,fe,F,r.width,r.height,h.width,h.height]),z=s.useRef(null),$e=s.useRef(!1);s.useEffect(()=>{if(!(!te||h.width<=0||h.height<=0)){if(fe){if(z.current===i)return;const Me=m??(i.trim()?ki(i):null);if(!(Me!=null&&Me.length))return;const Oe=un(Me,St=>({x:r.x+(St.x-r.x)/h.width*r.width,y:r.y+(St.y-r.y)/h.height*r.height}));z.current=Wo(Oe),te(Oe);return}!ae||!Y.length||$e.current||($e.current=!0,te(un(Gp(Y),Me=>({x:Me.x*La,y:Me.y*La}))))}},[ae,fe,te,Y,m,i,r,h.width,h.height]);const re=s.useCallback(()=>{const Me=_;if(!Me)return;const Oe=Me.getBoundingClientRect(),St=window.getComputedStyle(Me),Mt=parseFloat(St.paddingTop)||0;me(Bt=>Math.abs(Bt-Mt)<.5?Bt:Mt);const Qe=parseFloat(St.columnGap)||0;le(Bt=>Math.abs(Bt-Qe)<.5?Bt:Qe);const kt={width:Oe.width,height:Oe.height};J(Bt=>Math.abs(Bt.width-kt.width)<.5&&Math.abs(Bt.height-kt.height)<.5?Bt:kt)},[_]);nr(()=>{const Me=_;if(!Me||typeof ResizeObserver>"u")return;re();const Oe=new ResizeObserver(re);return Oe.observe(Me),()=>Oe.disconnect()},[_,re]),nr(()=>{re()},[x,f,re]),s.useEffect(()=>{const Me=typeof document<"u"?document.fonts:void 0;Me!=null&&Me.ready&&Me.ready.then(()=>{xe(Oe=>Oe+1)})},[]),nr(()=>{const Me=P.current;if(!Me)return;if(!oe.length){ue(null);return}const Oe=[],St=document.createDocumentFragment();for(const Pt of oe){const Zt=document.createElement("span");Object.assign(Zt.style,su(Pt.leaf)),Zt.textContent=Pt.text,St.appendChild(Zt),Oe.push(Zt)}const Mt=document.createElement("span");Mt.textContent=" ",St.appendChild(Mt);const Qe=document.createElement("span");Qe.textContent="-",St.appendChild(Qe);const kt=we||"H",Bt=document.createElement("span");Bt.textContent=kt,Bt.style.lineHeight="1",St.appendChild(Bt),Me.replaceChildren(St);const Wt=window.getComputedStyle(Me),At=parseFloat(Wt.fontSize)||16,Ae=parseFloat(Wt.lineHeight),ft=Number.isNaN(Ae)?At*1.2:Ae,gt=Math.max(ft,At),dt=document.createElement("span");dt.textContent=kt,dt.style.lineHeight=`${gt}px`;const yt=document.createElement("span");yt.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",dt.appendChild(yt),Me.appendChild(dt);const ut=dt.getBoundingClientRect().top,it=yt.getBoundingClientRect().top,Nt=Math.max(1,it-ut);dt.remove();let $t=Nt*.8;const Xt=document.createElement("canvas").getContext("2d"),Ot=Pt=>`${Wt.fontStyle} ${Wt.fontWeight} ${Pt}px ${Wt.fontFamily}`;if(Xt){Xt.font=Ot(At);const Pt=Xt.measureText(kt).actualBoundingBoxAscent;Pt>0&&($t=Pt)}const jt=v>1?(v-1)*gt+$t:$t;let Dt=At*(jt/$t);if(Xt){Xt.font=Ot(Dt);const Pt=Xt.measureText(kt).actualBoundingBoxAscent;Pt>0&&(Dt=Dt*(jt/Pt))}Bt.style.fontSize=`${Dt}px`,Bt.style.lineHeight=`${Dt}px`;const zt=document.createElement("span");zt.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",Bt.appendChild(zt);const D=Math.max(1,zt.getBoundingClientRect().top-Bt.getBoundingClientRect().top);zt.remove();const Be=(v-1)*gt+Nt-D,ke=Oe.map(Pt=>Pt.getBoundingClientRect().width),vt=Mt.getBoundingClientRect().width,Ct=Qe.getBoundingClientRect().width,at=we?Bt.getBoundingClientRect().width:0,Tt=(h.width-k*(g-1))/g,Vt=Oe.map((Pt,Zt)=>{var pi;const on=Pt.firstChild;if(!(on instanceof Text)||on.data.length<2||!(ke[Zt]>Tt-.5)&&!((pi=Te[Zt])!=null&&pi.length))return;const xn=document.createRange(),ui=Pt.getBoundingClientRect().left,dn=[];for(let Kn=1;Kn<=on.data.length;Kn+=1)xn.setStart(on,0),xn.setEnd(on,Kn),dn.push(xn.getBoundingClientRect().right-ui);return dn});Me.replaceChildren(),ue({widths:ke,spaceWidth:vt,dashWidth:Ct,charWidths:Vt,lineHeight:gt,capWidth:at,dropCapFontSize:Dt,dropCapTopAdjust:Be})},[oe,M,we,W,v,ee,h.width,b,Te,g,k]);const X=I&&we?I.capWidth+I.lineHeight*LT:0,Ce=Math.max(W,Math.ceil(v)),He=s.useMemo(()=>{if(!I||!oe.length||h.width<=0||h.height<=0||!u)return 1;const Me=Mt=>cu({tokens:oe,widths:I.widths,spaceWidth:I.spaceWidth,lineHeight:I.lineHeight,width:h.width,height:h.height,rings:ne,mode:l,align:c,scale:Mt,allowOverflow:!1,capInset:X*Mt,capLines:we?Ce:0,hyphenate:b,charWidths:I.charWidths,hyphenPoints:Te,hyphenWidth:I.dashWidth,shapeMargin:V,columns:g,columnGap:k});if(Me(1).placed>=oe.length)return 1;if(Me(As).placed<oe.length)return As;let Oe=As,St=1;for(let Mt=0;Mt<MT;Mt+=1){const Qe=(Oe+St)/2;Me(Qe).placed>=oe.length?Oe=Qe:St=Qe}return Oe},[I,oe,h.width,h.height,ne,l,c,u,X,we,Ce,b,Te,V,g,k]);s.useEffect(()=>{y(He)},[He,y]);const Ye=u?Math.min(p,He):1,De=s.useMemo(()=>!I||!oe.length||h.width<=0||h.height<=0?{segments:[],placed:0,height:0,capLeft:0,capTop:0,renderTokens:oe}:cu({tokens:oe,widths:I.widths,spaceWidth:I.spaceWidth,lineHeight:I.lineHeight,width:h.width,height:h.height,rings:ne,mode:l,align:c,scale:Ye,allowOverflow:d,capInset:X*Ye,capLines:we?Ce:0,hyphenate:b,charWidths:I.charWidths,hyphenPoints:Te,hyphenWidth:I.dashWidth,shapeMargin:V,columns:g,columnGap:k}),[I,oe,h.width,h.height,ne,l,c,Ye,d,X,we,Ce,b,Te,V,g,k]),ze=S&&oe.length>0&&De.placed<oe.length,Ze=I?I.dropCapFontSize*Ye:0,Ue=I?I.dropCapTopAdjust*Ye:0,ye=c==="justify"?"left":c,Ne=I?I.lineHeight*Ye:0,Ve=De.segments.length?De.segments[De.segments.length-1]:null,Je=Ve?{top:Ve.top+Ne,left:Ve.left+Ve.width/2}:{top:h.height,left:h.width/2},et=!!(w&&m&&h.width>0&&h.height>0),ot=!!T,lt=(et||ot)&&h.width>0&&h.height>0,Ke=kT(_,lt),ht=lt&&Ke?AT():null,tt=s.useRef(!1),Ge=s.useCallback(Me=>{tt.current=Me},[]);s.useEffect(()=>{if(!et&&!ot)return;const Me=Oe=>{const St=_;if(!St)return;const Mt=St.getBoundingClientRect();Oe.clientX>=Mt.left&&Oe.clientX<=Mt.right&&Oe.clientY>=Mt.top&&Oe.clientY<=Mt.bottom&&(Oe.preventDefault(),Oe.stopPropagation(),ce(kt=>kt==="shape"&&tt.current?kt:kt==="shape"&&ot?"image":et?"shape":"image"))};return document.addEventListener("dblclick",Me,!0),()=>document.removeEventListener("dblclick",Me,!0)},[et,ot,_]);const We=s.useMemo(()=>U&&h.width>0&&h.height>0?yC(ie,h):null,[U,ie,h.width,h.height]),Fe=s.useRef(null),ve=(()=>{const Me=Fe.current;return K||!C||!T||!de||!We||!Me||O===Me.customPath||Me.shape!==n&&n!=="custom"?null:eT(Me.bounds,We,de,Me.focalX,Me.focalY,Me.scale)})();nr(()=>{if(!T){Fe.current=null;return}if($||!de||!We)return;const Me=Fe.current,Oe=!!(Me&&O!==Me.customPath);Oe&&ve&&T.onCommit(ve),Oe&&K&&(R==null||R()),Fe.current={rings:ie,bounds:We,focalX:(ve==null?void 0:ve.focalX)??G,focalY:(ve==null?void 0:ve.focalY)??B,scale:(ve==null?void 0:ve.scale)??N,customPath:O,shape:n}},[$,K,O,n,ie,We,T,de,G,B,N,ve,R]);const _e=Fe.current,Xe=!!($&&!K&&_e&&!ve),ct=Xe&&_e?_e.focalX:(ve==null?void 0:ve.focalX)??G,rt=Xe&&_e?_e.focalY:(ve==null?void 0:ve.focalY)??B,xt=Xe&&_e?_e.scale:(ve==null?void 0:ve.scale)??N,pt=Xe&&_e?_e.bounds:We,It=s.useMemo(()=>{if(!(h.width>0)||!(h.height>0))return"";let Me=jd(i,m,o,r,n,h);if(fe){const Oe=F??h,St=r.width/Oe.width,Mt=r.height/Oe.height;Me=un(Me,Qe=>({x:Qe.x*St,y:Qe.y*Mt}))}return Vd(Me,h)||Dd(ne,h)},[i,m,o,r,n,h.width,h.height,fe,F,ne]),nt=s.useMemo(()=>{if(!U||!(h.width>0)||!(h.height>0))return"";let Me=jd(O,m,o,r,n,h);if(fe){const Oe=F??h,St=r.width/Oe.width,Mt=r.height/Oe.height;Me=un(Me,Qe=>({x:Qe.x*St,y:Qe.y*Mt}))}return Vd(Me,h)||Dd(ie,h)},[U,O,m,o,r,n,h.width,h.height,fe,F,ie]),bt=`${j}-clip`,Lt=s.useMemo(()=>{if(!pt)return null;const Me=de??{width:pt.width,height:pt.height},Oe=Ui(pt,Me,xt);return{x:jn(pt.width,Oe.width,ct),y:jn(pt.height,Oe.height,rt),width:Oe.width,height:Oe.height}},[pt,de,ct,rt,xt]);return a.jsxs("div",{className:`${e}-column`,style:{padding:x,columnGap:f},lang:Re,ref:Q,children:[It?a.jsxs("svg",{className:`${e}-shape-fill`,style:{top:0,left:0,width:h.width,height:h.height},viewBox:`0 0 ${h.width} ${h.height}`,preserveAspectRatio:"none","aria-hidden":!0,children:[a.jsx("path",{className:`${e}-shape-fill-path`,d:It,fillRule:"evenodd"}),U&&nt&&pt&&Lt?a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsx("clipPath",{id:bt,clipPathUnits:"userSpaceOnUse",children:a.jsx("path",{d:nt,fillRule:"evenodd"})})}),a.jsx("image",{href:U,x:pt.x+Lt.x,y:pt.y+Lt.y,width:Lt.width,height:Lt.height,preserveAspectRatio:"none",clipPath:`url(#${bt})`})]}):null]}):null,a.jsxs("div",{className:`${e}-flow${d?"":` ${e}-clip`}`,style:{...M,["--"+e+"-fit"]:Ye,top:0,left:0,width:h.width,height:h.height},children:[a.jsx("div",{className:`${e}-measure`,ref:P,style:M,"aria-hidden":!0}),De.segments.map((Me,Oe)=>{const St=De.renderTokens.slice(Me.from,Me.to),Mt=Oe===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:ye},children:St.map((Qe,kt)=>{const Wt=we&&Mt&&Me.from===0&&kt===0?Qe.text.slice(1):Qe.text,At=su(Qe.leaf),Ae=Qe.href?a.jsx("a",{className:`${e}-link`,href:Qe.href,target:Qe.target,rel:Qe.target?"noopener noreferrer":void 0,style:At,children:Wt}):a.jsx("span",{style:At,children:Wt});return a.jsxs("span",{children:[!Me.justify&&kt>0?" ":null,Ae]},kt)})},`${Me.from}-${Me.to}-${Oe}`)}),L&&!m&&a.jsx("svg",{className:`${e}-guides`,viewBox:"0 0 1 1",preserveAspectRatio:"none","aria-hidden":!0,children:ne.map((Me,Oe)=>a.jsx("polygon",{points:Me.map(St=>`${St.x},${St.y}`).join(" ")},Oe))})]}),we&&I&&a.jsx("div",{className:`${e}-drop-cap`,"aria-hidden":!0,style:{...M,top:`${De.capTop+Ue}px`,left:`${De.capLeft}px`,fontSize:`${Ze}px`,lineHeight:`${Ze}px`},children:we}),ht&&Ke&&(m&&w||T)&&qn.createPortal(a.jsxs("div",{"data-selection":"none",style:{position:"fixed",top:Ke.top,left:Ke.left,width:Ke.width,height:Ke.height,zIndex:PT,pointerEvents:"none"},children:[m&&w&&a.jsx(xT,{P:e,box:{width:Ke.width,height:Ke.height},viewBox:r,contours:m,snap:w.snap,stretchToBox:!fe,uniformStretch:n==="circle",stage:Le,onStageChange:ce,onSelectionChange:Ge,onChange:w.onChange,onCommit:w.onCommit}),T&&pt&&a.jsx(gT,{P:e,box:{width:Ke.width,height:Ke.height},bounds:pt,natural:de,imageUrl:U,maskPath:nt,stage:Le,onStageChange:ce,focalX:ct,focalY:rt,scale:xt,onChange:T.onChange,onCommit:T.onCommit})]}),ht),a.jsx("div",{className:`${e}-a11y`,children:ge.map((Me,Oe)=>a.jsx("p",{children:Me},Oe))}),ze&&a.jsxs("svg",{className:`${e}-overflow-icon`,width:"33",height:"24",viewBox:"0 0 33 24",style:{top:Je.top,left:Je.left},"aria-hidden":!0,children:[a.jsx("path",{d:"M12.8,4 L20.2,4 C24.68042,4 26.9206301,4 28.631924,4.87194781 C31.3123488,6.23769248 33,8.99168887 33,12 C33,15.0083111 31.3123488,17.7623075 28.631924,19.1280522 C26.9206301,20 24.68042,20 20.2,20 L12.8,20 C8.31957995,20 6.07936993,20 4.368076,19.1280522 C1.68765116,17.7623075 0,15.0083111 0,12 C0,8.99168887 1.68765116,6.23769248 4.368076,4.87194781 C6.07936993,4 8.31957995,4 12.8,4 Z",fill:"#FF4400"}),a.jsx("path",{transform:"translate(5, 0)",fill:"#FFFFFF",d:"M12,5.625 C12.3846269,5.625 12.7016304,5.91453014 12.7449542,6.28753416 L12.75,6.375 L12.75,11.25 L17.625,11.25 C18.0392136,11.25 18.375,11.5857864 18.375,12 C18.375,12.3846269 18.0854699,12.7016304 17.7124658,12.7449542 L17.625,12.75 L12.75,12.75 L12.75,17.625 C12.75,18.0392136 12.4142136,18.375 12,18.375 C11.6153731,18.375 11.2983696,18.0854699 11.2550458,17.7124658 L11.25,17.625 L11.25,12.75 L6.375,12.75 C5.96078644,12.75 5.625,12.4142136 5.625,12 C5.625,11.6153731 5.91453014,11.2983696 6.28753416,11.2550458 L6.375,11.25 L11.25,11.25 L11.25,6.375 C11.25,5.96078644 11.5857864,5.625 12,5.625 Z"})]})]})}const Qp=["diamond","parallelogram","vase","circle","shield","bobbin","custom"],NT={x:0,y:0,width:100,height:100},_T=e=>{const t=(e??"").trim().split(/[\s,]+/).map(Number).filter(n=>!Number.isNaN(n));return t.length<4||t[2]<=0||t[3]<=0?NT:{x:t[0],y:t[1],width:t[2],height:t[3]}},HT=e=>`
27797
+ `;function tr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const ji={fontSettings:{type:"object",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function bi(e,t){return e?`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`:t}function Ul(e){return{[bi(e,"fontFamily")]:{type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},[bi(e,"fontSettings")]:{...ji.fontSettings,scope:"common",title:""},[bi(e,"fontSize")]:{...ji.fontSize,scope:"layout",title:""},[bi(e,"lineHeight")]:{...ji.lineHeight,scope:"layout",title:""},[bi(e,"letterSpacing")]:{...ji.letterSpacing,scope:"layout",title:""},[bi(e,"wordSpacing")]:{...ji.wordSpacing,scope:"layout",title:""},[bi(e,"textAlign")]:{...ji.textAlign,scope:"layout",title:""},[bi(e,"textAppearance")]:{...ji.textAppearance,scope:"layout",title:""}}}const aC=Ul(""),sC=Ul("open"),lC=Ul("compact"),cC=["__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"],dC=["__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"],uC=["__componentName__",{type:"row",title:"Text",items:["textWidth","position"]},{type:"row",title:"Menu",items:["openPanelSize","effect"]},"openFontFamily","openFontSettings",{type:"row",items:["openFontSize","openLineHeight","openLetterSpacing","openWordSpacing"]},"openTextAlign","openTextAppearance"],ei={textTransform:"none",textDecoration:"none",fontVariant:"normal"},Ps={fontWeight:400,fontStyle:"normal"},ea={d:"Always",t:"Open Only",m:"Open Only"},pC=["left-top","center-top","right-top","left-center","center","right-center","left-bottom","center-bottom","right-bottom"],gC=["iconColor","logoColor","linkColor","backgroundColor"],mC={type:"object",version:1,settings:{sizing:"auto manual",properties:{link:{type:"array",scope:"common",display:{type:"page-url-link"},items:{type:"object",properties:{link:{type:"object",properties:{type:{type:"string",enum:["url","page","anchor"]},value:{type:"string",message:"Paste URL here..."},target:{type:"string",enum:["blank","self"]},anchor:{type:"string"}}},label:{type:"string"},showIn:{type:"string",scope:"layout",enum:["Always","Open Only","Open and Compact","Default and Open","Default and Compact"]}}}},logo:{type:"object",scope:"common",title:"Logo",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Logo",display:{type:"settings-image-input"}}}},logoMaxHeight:{type:"number",scope:"layout",title:"Max Height",display:{type:"numeric-input"},min:0,max:9999},logoPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},compactLogoPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},logoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{default:"Logo Default",hover:"Logo Hover"},display:{type:"palette-color-picker"}},panelHeight:{type:"number",scope:"layout",title:"Menu Height",display:{type:"numeric-input"},min:0,max:9999},backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{default:"Icon Default",hover:"Icon Hover"},display:{type:"palette-color-picker"}},showIcon:{type:"string",scope:"layout",title:"Show",display:{type:"toggle-cycle",enum:["on","off"]}},iconSize:{type:"number",scope:"layout",title:"Size",display:{type:"numeric-input"},min:0,max:9999},linkColor:{type:"string",scope:"common",title:"Text Default",titleByState:{default:"Text Default",hover:"Text Hover"},display:{type:"palette-color-picker"}},compactShowIcon:{type:"string",scope:"layout",title:"Show",display:{type:"toggle-cycle",enum:["on","off"]}},compactIconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{compact:"Icon Default","compact-hover":"Icon Hover"},display:{type:"palette-color-picker"}},compactLinkColor:{type:"string",scope:"common",title:"Text Default",titleByState:{compact:"Text Default","compact-hover":"Text Hover"},display:{type:"palette-color-picker"}},compactLogoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{compact:"Logo Default","compact-hover":"Logo Hover"},display:{type:"palette-color-picker"}},compactBackgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},openLinkColor:{type:"string",scope:"common",title:"Text Default",titleByState:{open:"Text Default","open-hover":"Text Hover"},display:{type:"palette-color-picker"}},openLogoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{open:"Logo Default","open-hover":"Logo Hover"},display:{type:"palette-color-picker"}},menuBackgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},overlayColor:{type:"string",scope:"common",title:"Overlay Default",display:{type:"palette-color-picker"}},closeButtonColor:{type:"string",scope:"common",title:"Close Default",titleByState:{open:"Close Default","open-hover":"Close Hover"},display:{type:"palette-color-picker"}},effect:{type:"string",scope:"layout",title:"Effect",display:{type:"toggle-cycle",enum:["fade","left","top","right","bottom"]}},openPanelSize:{type:"number",scope:"layout",title:"Height",display:{type:"percentage-input"},min:0,max:100},textWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},navTextWidth:{type:"number",scope:"layout",title:"Text width",display:{type:"numeric-input"},min:0,max:9999},navTextPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},navTextOffset:{type:"number",scope:"layout",title:"Offset",display:{type:"numeric-input"},min:-9999,max:9999},position:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:[...pC]}},stateOverrides:{type:"object",scope:"common"},gap:tr("Gap"),navGap:{type:"number",scope:"layout",title:"Nav gap",min:0,max:100,display:{type:"range-control",visible:!1}},navPaddingLeft:{type:"number",scope:"layout",title:"Nav padding left",min:0,max:100,display:{type:"range-control",visible:!1}},navPaddingRight:{type:"number",scope:"layout",title:"Nav padding right",min:0,max:100,display:{type:"range-control",visible:!1}},textPaddingLeft:tr("Text padding left"),textPaddingRight:tr("Text padding right"),textPaddingTop:tr("Text padding top"),textPaddingBottom:tr("Text padding bottom"),compactLogoMaxHeight:{type:"number",scope:"layout",title:"Max Height",display:{type:"numeric-input"},min:0,max:9999},compactPanelHeight:{type:"number",scope:"layout",title:"Menu Height",display:{type:"numeric-input"},min:0,max:9999},compactIconSize:{type:"number",scope:"layout",title:"Size",display:{type:"numeric-input"},min:0,max:9999},compactNavTextWidth:{type:"number",scope:"layout",title:"Text width",display:{type:"numeric-input"},min:0,max:9999},compactNavTextPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},compactNavTextOffset:{type:"number",scope:"layout",title:"Offset",display:{type:"numeric-input"},min:-9999,max:9999},compactNavGap:{type:"number",scope:"layout",title:"Nav gap",min:0,max:100,display:{type:"range-control",visible:!1}},compactNavPaddingLeft:{type:"number",scope:"layout",title:"Nav padding left",min:0,max:100,display:{type:"range-control",visible:!1}},compactNavPaddingRight:{type:"number",scope:"layout",title:"Nav padding right",min:0,max:100,display:{type:"range-control",visible:!1}},...aC,...sC,...lC},defaults:{link:[{link:{type:"page",value:"",target:"self"},label:"Home",showIn:ea},{link:{type:"page",value:"",target:"self"},label:"Works",showIn:ea},{link:{type:"page",value:"",target:"self"},label:"About",showIn:ea},{link:{type:"page",value:"",target:"self"},label:"Contact",showIn:ea}],logo:{mode:"On",icon:"01M3QM74XE09DSJCWGD1XM6Y45"},backgroundColor:"#ffffff",logoColor:"#000000",iconColor:"#000000",linkColor:"#000000",openLinkColor:"#000000",compactIconColor:"#000000",compactLinkColor:"#000000",compactLogoColor:"#000000",compactBackgroundColor:"#ffffff",openLogoColor:"#000000",menuBackgroundColor:"#ffffff",overlayColor:"rgba(0, 0, 0, 0.45)",closeButtonColor:"#000000",effect:"fade",showIcon:"on",compactShowIcon:"on",logoPosition:"left",compactLogoPosition:"left",navTextPosition:"center",compactNavTextPosition:"center",navTextOffset:0,compactNavTextOffset:0,position:"left-top",fontFamily:"Goudy Bookletter 1911",fontSettings:Ps,textAlign:"left",openFontFamily:"Goudy Bookletter 1911",openFontSettings:Ps,openTextAlign:"left",compactFontFamily:"Goudy Bookletter 1911",compactFontSettings:Ps,compactTextAlign:"left",stateOverrides:{hover:{linkColor:"#666666",iconColor:"#666666",logoColor:"#666666"},"open-hover":{closeButtonColor:"#666666"}}},displayRules:[{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoMaxHeight.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoPosition.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoMaxHeight.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoPosition.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoColor.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoColor.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.openLogoColor.display.visible",value:!1}},{if:{name:"effect",value:"left"},then:{name:"properties.openPanelSize.title",value:"Width"}},{if:{name:"effect",value:"right"},then:{name:"properties.openPanelSize.title",value:"Width"}},{if:{name:"showIcon",value:"off"},then:{name:"properties.iconSize.display.visible",value:!1}},{if:{name:"showIcon",value:"off"},then:{name:"properties.iconColor.display.visible",value:!1}},{if:{name:"compactShowIcon",value:"off"},then:{name:"properties.compactIconSize.display.visible",value:!1}},{if:{name:"compactShowIcon",value:"off"},then:{name:"properties.compactIconColor.display.visible",value:!1}}],layoutDefaults:{m:{position:"center",panelHeight:50/375,logoMaxHeight:30/375,logoPosition:"center",compactLogoPosition:"left",navTextPosition:"center",navTextOffset:0,compactNavTextPosition:"center",compactNavTextOffset:0,showIcon:"on",iconSize:30/375,textWidth:240/375,openPanelSize:100,navTextWidth:120/375,gap:24/375,navGap:24/375,navPaddingLeft:20/375,navPaddingRight:20/375,textPaddingLeft:10/375,textPaddingRight:10/375,textPaddingTop:10/375,textPaddingBottom:10/375,fontSize:16/375,lineHeight:20/375,letterSpacing:0,wordSpacing:0,textAppearance:ei,openFontSize:34/375,openLineHeight:20/375,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:ei,openTextAlign:"center",compactPanelHeight:40/375,compactLogoMaxHeight:20/375,compactShowIcon:"on",compactIconSize:16/375,compactNavTextWidth:80/375,compactNavGap:24/375,compactNavPaddingLeft:20/375,compactNavPaddingRight:20/375,compactFontSize:16/375,compactLineHeight:20/375,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:ei},t:{textAlign:"center",position:"center",panelHeight:60/768,logoMaxHeight:30/768,logoPosition:"left",compactLogoPosition:"left",navTextPosition:"center",navTextOffset:0,compactNavTextPosition:"center",compactNavTextOffset:0,showIcon:"on",iconSize:16/768,textWidth:300/768,openPanelSize:100,navTextWidth:90/768,gap:32/768,navGap:32/768,navPaddingLeft:20/768,navPaddingRight:20/768,textPaddingLeft:10/768,textPaddingRight:10/768,textPaddingTop:10/768,textPaddingBottom:10/768,fontSize:18/768,lineHeight:20/768,letterSpacing:0,wordSpacing:0,textAppearance:ei,openFontSize:75/768,openLineHeight:20/768,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:ei,openTextAlign:"center",compactTextAlign:"center",compactPanelHeight:40/768,compactLogoMaxHeight:20/768,compactShowIcon:"on",compactIconSize:16/768,compactNavTextWidth:80/768,compactNavGap:32/768,compactNavPaddingLeft:20/768,compactNavPaddingRight:20/768,compactFontSize:16/768,compactLineHeight:20/768,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:ei},d:{position:"center",panelHeight:50/1440,logoMaxHeight:30/1440,logoPosition:"left",compactLogoPosition:"left",navTextPosition:"center",navTextOffset:0,compactNavTextPosition:"center",compactNavTextOffset:0,showIcon:"on",iconSize:20/1440,textWidth:300/1440,openPanelSize:100,navTextWidth:60/1440,gap:12/1440,navGap:64/1440,navPaddingLeft:10/1440,navPaddingRight:10/1440,textPaddingLeft:10/1440,textPaddingRight:10/1440,textPaddingTop:10/1440,textPaddingBottom:10/1440,fontSize:16/1440,lineHeight:16/1440,letterSpacing:0,wordSpacing:0,textAppearance:ei,textAlign:"center",openFontSize:90/1440,openLineHeight:16/1440,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:ei,openTextAlign:"center",compactPanelHeight:30/1440,compactLogoMaxHeight:20/1440,compactShowIcon:"on",compactIconSize:20/1440,compactNavTextWidth:60/1440,compactNavGap:20/1440,compactNavPaddingLeft:10/1440,compactNavPaddingRight:10/1440,compactFontSize:16/1440,compactLineHeight:16/1440,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:ei,compactTextAlign:"center"}},layout:["__componentName__","link","logo","logoMaxHeight","logoPosition","panelHeight","backgroundColor","logoColor","iconColor","showIcon","iconSize","linkColor","openLinkColor","compactShowIcon","compactIconColor","compactLinkColor","compactLogoColor","compactBackgroundColor","compactLogoMaxHeight","compactLogoPosition","compactPanelHeight","compactIconSize","compactNavTextWidth","compactNavTextPosition","compactNavTextOffset","compactNavGap","compactNavPaddingLeft","compactNavPaddingRight","compactFontFamily","compactFontSettings","compactFontSize","compactLineHeight","compactLetterSpacing","compactWordSpacing","compactTextAlign","compactTextAppearance","openLogoColor","menuBackgroundColor","overlayColor","closeButtonColor","effect","textWidth","navTextWidth","navTextPosition","navTextOffset","position","gap","navGap","navPaddingLeft","navPaddingRight","textPaddingLeft","textPaddingRight","textPaddingTop","textPaddingBottom","fontFamily","fontSettings","fontSize","lineHeight","letterSpacing","wordSpacing","textAlign","textAppearance","openFontFamily","openFontSettings","openFontSize","openLineHeight","openLetterSpacing","openWordSpacing","openTextAlign","openTextAppearance"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","logo"]},{id:"default",icon:"default",title:"Default",tooltip:"Default State",layout:cC},{id:"compact",icon:"compact",title:"Compact",tooltip:"Compact State",layout:dC,availableWhen:{navigationPosition:["switch"]}},{id:"open",icon:"open",title:"Open",tooltip:"Open State",layout:uC},{id:"links",icon:"content",title:"Links",tooltip:"Link Settings",layout:["__componentName__","link"]}],paletteBookmark:{items:[...gC],panelIds:["default","compact","open"],stateItems:{default:["iconColor","logoColor","linkColor","backgroundColor"],hover:["iconColor","logoColor","linkColor"],compact:["compactIconColor","compactLogoColor","compactLinkColor","compactBackgroundColor"],"compact-hover":["compactIconColor","compactLogoColor","compactLinkColor"],open:["closeButtonColor","openLogoColor","openLinkColor","menuBackgroundColor","overlayColor"],"open-hover":["closeButtonColor","openLogoColor","openLinkColor"]}},states:["default","hover"],statePanels:["default","compact","open"]},hC={element:oC,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:mC,sourceCode:rC,assetsPaths:{content:[],parameters:[{path:"logo.icon",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"},{path:"openFontFamily"},{path:"compactFontFamily"}]},fontRelations:{fontSettings:"fontFamily",openFontSettings:"openFontFamily",compactFontSettings:"compactFontFamily"}},Wd=120,Od=3,fC=.12,ql={x:0,y:0,width:100,height:100};function Co(e,t){return e.map(n=>n.map(i=>({x:(i.x-t.x)/t.width,y:(i.y-t.y)/t.height})))}function Ia(e){return e<0?0:e>1?1:e}function Dd(e,t){return e.filter(n=>n.length>0).map(n=>`M ${n.map(i=>`${i.x*t.width} ${i.y*t.height}`).join(" L ")} Z`).join(" ")}function yC(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 vC(e){return e.map(([t,n])=>({x:t,y:n}))}function Ms(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 xC(e,t){const n=[];for(const o of e)for(let r=0;r<o.length;r+=1){const l=o[r],c=o[(r+1)%o.length];(l.y<=t&&c.y>t||c.y<=t&&l.y>t)&&n.push(l.x+(t-l.y)/(c.y-l.y)*(c.x-l.x))}n.sort((o,r)=>o-r);const i=[];for(let o=0;o+1<n.length;o+=2){const r=Ia(n[o]),l=Ia(n[o+1]);l>r&&i.push({x0:r,x1:l})}return bC(i)}function bC(e){if(e.length<2)return e;const t=[...e].sort((i,o)=>i.x0-o.x0),n=[t[0]];for(let i=1;i<t.length;i+=1){const o=n[n.length-1],r=t[i];r.x0<=o.x1?o.x1=Math.max(o.x1,r.x1):n.push({...r})}return n}function SC(e,t){const n=[];let i=0,o=0;for(;i<e.length&&o<t.length;){const r=Math.max(e[i].x0,t[o].x0),l=Math.min(e[i].x1,t[o].x1);l>r&&n.push({x0:r,x1:l}),e[i].x1<t[o].x1?i+=1:o+=1}return n}function wC(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 $C(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 CC(e,t,n,i){let o=null;for(let r=0;r<Od;r+=1){const l=Ia(t+(n-t)*r/Math.max(1,Od-1)),c=xC(e,l),d=i==="avoid"?wC(c):c;if(o=o===null?d:SC(o,d),o.length===0)return[]}return o??[]}function zd(e,t="stretch",n=ql){const i=e.trim();if(!i)return null;if(/^[Mm]/.test(i)){const l=ki(i),c=$r(l);if(c.length)return t==="viewbox"?Co(c,n):Ms(c);if(typeof document>"u")return null;const d=i.split(/(?=[Mm])/).map(y=>y.trim()).filter(Boolean),u=document.createElementNS("http://www.w3.org/2000/svg","svg"),p=[];for(const y of d){const x=document.createElementNS("http://www.w3.org/2000/svg","path");x.setAttribute("d",y),u.appendChild(x);let g=0;try{g=x.getTotalLength()}catch{g=0}if(!g)continue;const h=[];for(let b=0;b<Wd;b+=1){const S=x.getPointAtLength(b/Wd*g);h.push({x:S.x,y:S.y})}p.push(h)}return p.length?t==="viewbox"?Co(p,n):Ms(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"?Co([r],n):Ms([r])}const Yl={bobbin:"M57.63,0 L57.63,37.24 L74.66,37.24 L74.66,56.07 L57.63,100 L33.84,100 L16.81,56.07 L16.81,37.24 L33.84,37.24 L33.84,0 Z",circle:"M50,0 C77.61,0 100,22.39 100,50 C100,77.61 77.61,100 50,100 C22.39,100 0,77.61 0,50 C0,22.39 22.39,0 50,0 Z",shield:"M0,0 L100,0 L100,50 L50,100 L0,50 Z",vase:"M25.37,0 L91.55,0 C91.55,0 74.8,25.14 83.07,50.03 C91.34,74.92 74.61,100 74.61,100 L8.43,100 C8.43,100 32.3,75.08 23.9,50 C15.5,24.92 25.37,0 25.37,0 Z",parallelogram:"M25.37,0 L91.55,0 L74.61,100 L8.43,100 Z",diamond:"M50,0 L80,50 L50,100 L20,50 Z"},Zs="0 0 100 100",La=100,Js=16,TC=12,IC=16,Rs=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,LC=/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g,Bd=Math.PI/4,PC=8,MC=Math.PI/18,RC=8,yo=24,vo=[];function EC(){return[{closed:!0,nodes:[{p:{x:0,y:0},in:null,out:null},{p:{x:1,y:0},in:null,out:null},{p:{x:1,y:1},in:null,out:null},{p:{x:0,y:1},in:null,out:null}]}]}function Es(e,t){return un(e,n=>({x:(n.x-t.x)/t.width,y:(n.y-t.y)/t.height}))}function kC(e){const t=Li(e),n=t.maxX-t.minX,i=t.maxY-t.minY;return!isFinite(n)||!isFinite(i)||n<=0||i<=0?e:un(e,o=>({x:(o.x-t.minX)/n,y:(o.y-t.minY)/i}))}function AC(e,t){if(!(t.width>0)||!(t.height>0))return e;const n=Math.min(t.width,t.height),i=(t.width-n)/2,o=(t.height-n)/2;return un(e,r=>({x:(i+r.x*n)/t.width,y:(o+r.y*n)/t.height}))}function jd(e,t,n,i,o,r){let l=[];if(t&&t.length)l=Es(t,i);else{const c=e.trim();if(c&&/^[Mm]/.test(c)){const d=ki(c);d.length&&(l=n==="viewbox"?Es(d,i):kC(d))}if(!l.length){const d=o!=="custom"?Yl[o]:void 0;d?l=Es(ki(d),ql):l=EC()}}return o==="circle"?AC(l,r):l}function Vd(e,t){return!(t.width>0)||!(t.height>0)||!e.length?"":Wo(un(e,n=>({x:n.x*t.width,y:n.y*t.height})))}function el(e){const t=e==="rectangle"||e==="custom"?void 0:Yl[e];return t?Co($r(ki(t)),ql):[vC([[0,0],[1,0],[1,1],[0,1]])]}function FC(e){const t=e.match(LC);return t?t.map(Number).filter(n=>!Number.isNaN(n)):[]}function In(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function tl(e,t){return{x:t.x*2-e.x,y:t.y*2-e.y}}function mn(e){return{x:e.x,y:e.y}}function NC(e){return{p:mn(e.p),in:e.in?mn(e.in):null,out:e.out?mn(e.out):null}}function Vn(e){return e.map(t=>({closed:t.closed,nodes:t.nodes.map(NC)}))}function un(e,t){return e.map(n=>({closed:n.closed,nodes:n.nodes.map(i=>({p:t(i.p),in:i.in?t(i.in):null,out:i.out?t(i.out):null}))}))}function Gd(e,t,n,i=n){return un(e,o=>({x:t.x+(o.x-t.x)*n,y:t.y+(o.y-t.y)*i}))}function _C(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:mn(e),c2:mn(l),p:mn(l)}];const u=i*Math.PI/180,p=Math.cos(u),y=Math.sin(u),x=(e.x-l.x)/2,g=(e.y-l.y)/2,h=p*x+y*g,b=-y*x+p*g,S=h*h/(c*c)+b*b/(d*d);if(S>1){const U=Math.sqrt(S);c*=U,d*=U}const _=o===r?-1:1,v=c*c*b*b+d*d*h*h,L=Math.max(0,c*c*d*d-v),P=v===0?0:_*Math.sqrt(L/v),q=P*c*b/d,X=-P*d*h/c,B=p*q-y*X+(e.x+l.x)/2,H=y*q+p*X+(e.y+l.y)/2,O=Math.atan2((b-X)/d,(h-q)/c);let $=Math.atan2((-b-X)/d,(-h-q)/c)-O;!r&&$>0&&($-=Math.PI*2),r&&$<0&&($+=Math.PI*2);const Q=Math.max(1,Math.ceil(Math.abs($)/(Math.PI/2))),R=$/Q,T=4/3*Math.tan(R/4),w=(U,M)=>({x:B+p*c*U-y*d*M,y:H+y*c*U+p*d*M}),V=[];let z=O;for(let U=0;U<Q;U+=1){const M=z+R,f=Math.cos(z),K=Math.sin(z),G=Math.cos(M),ge=Math.sin(M);V.push({c1:w(f-T*K,K+T*f),c2:w(G+T*ge,ge-T*G),p:U===Q-1?mn(l):w(G,ge)}),z=M}return V}function ki(e){const t=(e??"").trim();if(!t)return[];const n=[];let i=[],o=!1,r={x:0,y:0},l={x:0,y:0},c=null,d=null;const u=()=>{if(o&&i.length>2){const g=i[0],h=i[i.length-1];Math.abs(g.p.x-h.p.x)<1e-6&&Math.abs(g.p.y-h.p.y)<1e-6&&(g.in=h.in??g.in,i.pop())}i.length>1&&n.push({nodes:i,closed:o}),i=[],o=!1},p=(g,h)=>{i.push({p:g,in:Un(h??null,g),out:null}),r=g},y=g=>{if(!i.length)return;const h=i[i.length-1];h.out=Un(g,h.p)};Rs.lastIndex=0;let x=Rs.exec(t);for(;x!==null;){const g=x[1],h=g.toUpperCase(),b=g!==h,S=FC(x[2]),_=v=>b?{x:r.x+S[v],y:r.y+S[v+1]}:{x:S[v],y:S[v+1]};if(h==="Z")o=!0,u(),r=mn(l),c=null,d=null;else if(h==="M"){for(let v=0;v+1<S.length;v+=2){const L=_(v);v===0&&(u(),l=mn(L)),p(L)}c=null,d=null}else if(h==="L"){for(let v=0;v+1<S.length;v+=2)p(_(v));c=null,d=null}else if(h==="H"){for(const v of S)p({x:b?r.x+v:v,y:r.y});c=null,d=null}else if(h==="V"){for(const v of S)p({x:r.x,y:b?r.y+v:v});c=null,d=null}else if(h==="C"){for(let v=0;v+5<S.length;v+=6){const L=_(v),P=_(v+2),q=_(v+4);y(L),p(q,P),c=P}d=null}else if(h==="S"){for(let v=0;v+3<S.length;v+=4){const L=c?tl(c,r):mn(r),P=_(v),q=_(v+2);y(L),p(q,P),c=P}d=null}else if(h==="Q")for(let v=0;v+3<S.length;v+=4){const L=_(v),P=_(v+2);y(In(r,L,2/3)),p(P,In(P,L,2/3)),d=L,c=null}else if(h==="T")for(let v=0;v+1<S.length;v+=2){const L=d?tl(d,r):mn(r),P=_(v);y(In(r,L,2/3)),p(P,In(P,L,2/3)),d=L,c=null}else if(h==="A")for(let v=0;v+6<S.length;v+=7){const L=b?{x:r.x+S[v+5],y:r.y+S[v+6]}:{x:S[v+5],y:S[v+6]};for(const P of _C(r,S[v],S[v+1],S[v+2],S[v+3]!==0,S[v+4]!==0,L))y(P.c1),p(P.p,P.c2);c=null,d=null}x=Rs.exec(t)}return u(),n}function Bn(e){return`${Number(e.toFixed(2))}`}function Un(e,t){return!e||Math.abs(e.x-t.x)<1e-6&&Math.abs(e.y-t.y)<1e-6?null:e}function Bp(e){return!!(Un(e.in,e.p)||Un(e.out,e.p))}function Go(e,t){return!Un(e.out,e.p)&&!Un(t.in,t.p)}function Xd(e,t){if(Go(e,t))return`L${Bn(t.p.x)},${Bn(t.p.y)}`;const n=Un(e.out,e.p)??e.p,i=Un(t.in,t.p)??t.p;return`C${Bn(n.x)},${Bn(n.y)} ${Bn(i.x)},${Bn(i.y)} ${Bn(t.p.x)},${Bn(t.p.y)}`}function Wo(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const[i,...o]=n.nodes;t.push(`M${Bn(i.p.x)},${Bn(i.p.y)}`);let r=i;for(const l of o)t.push(Xd(r,l)),r=l;if(n.closed){const l=Xd(r,i);l.charAt(0)==="C"&&t.push(l),t.push("Z")}}return t.join(" ")}function jp(e){const t=[];for(let n=0;n+1<e.nodes.length;n+=1)t.push({from:e.nodes[n],to:e.nodes[n+1],index:n});if(e.closed&&e.nodes.length>2){const n=e.nodes.length-1;t.push({from:e.nodes[n],to:e.nodes[0],index:n})}return t}function nl(e,t,n){if(Go(e,t))return In(e.p,t.p,n);const i=e.out??e.p,o=t.in??t.p,r=1-n,l=r*r*r,c=3*r*r*n,d=3*r*n*n,u=n*n*n;return{x:l*e.p.x+c*i.x+d*o.x+u*t.p.x,y:l*e.p.y+c*i.y+d*o.y+u*t.p.y}}function $r(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const i=[];for(const o of jp(n)){if(Go(o.from,o.to)){i.push(mn(o.from.p));continue}for(let r=0;r<Js;r+=1)i.push(nl(o.from,o.to,r/Js))}n.closed||i.push(mn(n.nodes[n.nodes.length-1].p)),i.length>2&&t.push(i)}return t}function Li(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const r of $r(e))for(const l of r)l.x<t&&(t=l.x),l.x>i&&(i=l.x),l.y<n&&(n=l.y),l.y>o&&(o=l.y);return{minX:t,minY:n,maxX:i,maxY:o}}function HC(e){const t=Li(e);return!isFinite(t.minX)||!isFinite(t.maxX)||!isFinite(t.minY)||!isFinite(t.maxY)?null:{x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2}}function Vp(e,t,n){const i={x:(n.x-e.x)/6,y:(n.y-e.y)/6};return{in:{x:t.x-i.x,y:t.y-i.y},out:{x:t.x+i.x,y:t.y+i.y}}}function Gp(e){return e.filter(t=>t.length>2).map(t=>{if(t.length<=TC)return{closed:!0,nodes:t.map(r=>({p:mn(r),in:null,out:null}))};const n=Math.max(1,Math.round(t.length/IC)),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:mn(r),...Vp(i[(l-1+o)%o],r,i[(l+1)%o])}))}})}function Xp(e,t,n=1){if(!e.length)return!1;const i=Li(e);if(!isFinite(i.minX)||!isFinite(i.maxX))return!1;const o=i.maxX-i.minX,r=i.maxY-i.minY;if(o<=t.width*2.5&&r<=t.height*2.5)return!1;const l=Math.max(n,t.width*.5),c=Math.max(n,t.height*.5);return i.minX<t.x-l||i.minY<t.y-c||i.maxX>t.x+t.width+l||i.maxY>t.y+t.height+c}function WC(e,t,n,i,o,r,l){const c=t.width>0?n.width/t.width:1,d=t.height>0?n.height/t.height:1;return!(r>0)||!(l>0)||!(c>0)||!(d>0)?e:un(e,u=>{const p=i+(u.x-t.x)*r,y=o+(u.y-t.y)*l;return{x:t.x+p/c,y:t.y+y/d}})}function OC(e,t){if(!e.length)return e;const n=Li(e),i=n.maxX-n.minX,o=n.maxY-n.minY;if(!(i>0)||!(o>0)||n.minX>=t.x-1e-6&&n.minY>=t.y-1e-6&&n.maxX<=t.x+t.width+1e-6&&n.maxY<=t.y+t.height+1e-6)return e;const l=Math.min(t.width/i,t.height/o),c=t.x+(t.width-i*l)/2,d=t.y+(t.height-o*l)/2;return un(e,u=>({x:c+(u.x-n.minX)*l,y:d+(u.y-n.minY)*l}))}function Up(e){const t={x:0,y:0,width:La,height:La},n=e!=="custom"?Yl[e]:void 0,i=n?un(ki(n),r=>({x:r.x/100*t.width+t.x,y:r.y/100*t.height+t.y})):un(Gp(el("rectangle")),r=>({x:r.x*t.width+t.x,y:r.y*t.height+t.y})),o=OC(i,t);return{shape:e,customPath:Wo(o),pathFit:"viewbox",pathViewBox:Zs}}function ta(e,t){return t>0?Math.round(e/t)*t:e}function DC(e,t,n,i){var u;const o=(u=e[t])==null?void 0:u.nodes[n];if(!o)return e;const r=i.x-o.p.x,l=i.y-o.p.y,c=Vn(e),d=c[t].nodes[n];return d.p={x:o.p.x+r,y:o.p.y+l},d.in&&(d.in={x:d.in.x+r,y:d.in.y+l}),d.out&&(d.out={x:d.out.x+r,y:d.out.y+l}),c}function Ud(e,t,n,i){var r;if(!t.length)return e;const o=Vn(e);for(const{contour:l,node:c}of t){const d=(r=o[l])==null?void 0:r.nodes[c];d&&(d.p={x:d.p.x+n,y:d.p.y+i},d.in&&(d.in={x:d.in.x+n,y:d.in.y+i}),d.out&&(d.out={x:d.out.x+n,y:d.out.y+i}))}return o}function zC(e,t){const n=new Map;for(const{contour:o,node:r}of t){const l=n.get(o)??[];l.push(r),n.set(o,l)}let i=e;return n.forEach((o,r)=>{const l=[...o].sort((c,d)=>d-c);for(const c of l)i=qp(i,r,c)}),i}function BC(e,t,n,i,o,r){var u;if(!((u=e[t])==null?void 0:u.nodes[n]))return e;const c=Vn(e),d=c[t].nodes[n];if(d[i]=mn(o),r){const p=i==="in"?"out":"in";d[p]=tl(o,d.p)}return c}function jC(e,t,n,i){var l;const o=(l=e[t])==null?void 0:l.nodes[n];if(!o||!o[i])return e;const r=Vn(e);return r[t].nodes[n][i]=null,r}function VC(e,t,n,i){const o=e[t];if(!o)return{contours:e,nodeIndex:-1};const r=o.nodes[n],l=o.nodes[(n+1)%o.nodes.length];if(!r||!l)return{contours:e,nodeIndex:-1};const c=Vn(e),d=c[t].nodes,u=n+1;if(Go(r,l))return d.splice(u,0,{p:In(r.p,l.p,i),in:null,out:null}),{contours:c,nodeIndex:u};const p=r.out??r.p,y=l.in??l.p,x=In(r.p,p,i),g=In(p,y,i),h=In(y,l.p,i),b=In(x,g,i),S=In(g,h,i),_=In(b,S,i),v=(n+1)%o.nodes.length;return d[n].out=x,d[v].in=h,d.splice(u,0,{p:_,in:b,out:S}),{contours:c,nodeIndex:u}}function qp(e,t,n){const i=e[t];if(!i||i.nodes.length<=3)return e;const o=Vn(e);return o[t].nodes.splice(n,1),o}function qd(e,t,n){const i=e[t];if(!(i==null?void 0:i.nodes[n]))return e;const r=Vn(e),l=r[t].nodes,c=l[n],d=l.length,u=(n-1+d)%d,p=(n+1)%d,y=!!Un(l[u].out,l[u].p),x=!!Un(l[p].in,l[p].p);if(Bp(c)||y||x)return c.in=null,c.out=null,l[u].out=null,l[p].in=null,r;const g=Vp(l[u].p,c.p,l[p].p);return c.in=g.in,c.out=g.out,r}function GC(e,t,n){const i=n.x-t.x,o=n.y-t.y,r=i*i+o*o,l=r===0?0:Math.max(0,Math.min(1,((e.x-t.x)*i+(e.y-t.y)*o)/r)),c={x:t.x+i*l,y:t.y+o*l};return{t:l,distance:Math.hypot(e.x-c.x,e.y-c.y),point:c}}function Yd(e,t){let n=null;return e.forEach((i,o)=>{for(const r of jp(i)){const l=Go(r.from,r.to)?1:Js;for(let c=0;c<l;c+=1){const d=c/l,u=(c+1)/l,p=GC(t,nl(r.from,r.to,d),nl(r.from,r.to,u));(!n||p.distance<n.distance)&&(n={contour:o,segment:r.index,t:d+(u-d)*p.t,distance:p.distance,point:p.point})}}}),n}function XC(e,t){const n=[];return e.forEach((i,o)=>{i.nodes.forEach((r,l)=>{o===t.contour&&l===t.node||n.push(r.p)})}),n}function Kd(e,t,n){const i=t.filter((r,l)=>isFinite(r)&&t.findIndex(c=>Math.abs(c-r)<1e-6)===l),o=i.map(r=>({value:r,axis:r,from:null}));for(const r of e)o.push({value:r[n],axis:null,from:r});for(const r of i)for(const l of e)o.push({value:r*2-l[n],axis:r,from:l});return o}function Qd(e,t,n,i,o){const r=i(t)[n];let l=null,c=1/0;for(const d of e){const u=n==="x"?{x:d.value,y:t.y}:{x:t.x,y:d.value},p=Math.abs(i(u)[n]-r);p>o||l&&p>=c||(l=d,c=p)}return l}function UC(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 qC(e){const t=Math.PI*2;return((e+Math.PI)%t+t)%t-Math.PI}function il(e,t){const n=t.x-e.x,i=t.y-e.y,o=Math.hypot(n,i);return o<1e-6?null:{x:n/o,y:i/o}}function YC(e,t){const n=il(e,t);return n?{kind:"align",a:{x:e.x-n.x*yo,y:e.y-n.y*yo},b:{x:t.x+n.x*yo,y:t.y+n.y*yo}}:{kind:"align",a:e,b:t}}function ol(e,t,n){return t==="x"?{kind:"center",a:{x:e,y:0},b:{x:e,y:n.height}}:{kind:"center",a:{x:0,y:e},b:{x:n.width,y:e}}}function Zd(e,t,n,i,o){if(e.axis===null)return YC(n,o(e.from??n));const r=t==="x"?{x:e.axis,y:0}:{x:0,y:e.axis};return ol(o(r)[t],t,i)}function KC(e,t,n,i,o){const r=[],l=o(e);return t&&e.x===t.value&&r.push(Zd(t,"x",l,i,o)),n&&e.y===n.value&&r.push(Zd(n,"y",l,i,o)),r}function QC(e,t,n,i){const o=e==null?void 0:e.nodes[t];if(!e||!o)return null;const r=i(o.p),l=n==="in"?o.out:o.in;if(l)return il(i(l),r);const c=e.nodes.length,d=t+(n==="in"?1:-1);if(!e.closed&&(d<0||d>=c))return null;const u=e.nodes[(d+c)%c];if(!u)return null;const p=(n==="in"?u.in:u.out)??u.p;return il(i(p),r)}function ZC(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:vo};const x=Math.atan2(p,u),g=Math.round(x/Bd)*Bd;let h=o?g:null,b=!1;if(!o){const X=[];n&&X.push({angle:Math.atan2(n.y,n.x),smooth:!0}),X.push({angle:g,smooth:!1});for(const B of X){const H=qC(B.angle-x);if(!(Math.abs(H)>MC)&&!(Math.abs(Math.sin(H))*y>PC)){h=B.angle,b=B.smooth;break}}}const S=i!==null&&i>0&&Math.abs(y-i)<=RC;if(h===null&&!S)return{point:e,guides:vo};const _=h??x,v=S?i:y,L={x:Math.cos(_),y:Math.sin(_)},P=v+(h===null?0:yo),q=S?v:b?yo:0;return{point:l({x:c.x+L.x*v,y:c.y+L.y*v}),guides:[{kind:"angle",a:{x:c.x-L.x*q,y:c.y-L.y*q},b:{x:c.x+L.x*P,y:c.y+L.y*P}}]}}const rl=.1,al=8,JC=4,Jd=10,Pa=(e,t)=>{switch(t){case"nw":return{x:e.minX,y:e.minY};case"ne":return{x:e.maxX,y:e.minY};case"se":return{x:e.maxX,y:e.maxY};case"sw":return{x:e.minX,y:e.maxY}}},Yp=e=>{switch(e){case"nw":return"se";case"ne":return"sw";case"se":return"nw";case"sw":return"ne"}},sl=(e,t)=>{const n=Pa(e,t),i=t==="nw"||t==="sw"?-1:1,o=t==="nw"||t==="ne"?-1:1;return{x:n.x+i*Jd,y:n.y+o*Jd}},ll=(e,t)=>!(t.width>0)||!(t.height>0)||!(e.width>0)||!(e.height>0)?1:Math.max(e.width/t.width,e.height/t.height),Ui=(e,t,n)=>{const i=ll(e,t)*n;return{width:t.width*i,height:t.height*i}},jn=(e,t,n)=>(e-t)*n,xo=(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)<JC?.5:Ia(r)},eT=(e,t,n,i,o,r)=>{const l=Ui(e,n,r),c=e.x+jn(e.width,l.width,i),d=e.y+jn(e.height,l.height,o),u=ll(e,n),p=ll(t,n),y=Math.min(al,Math.max(rl,p>0?r*(u/p):r)),x=Ui(t,n,y);return{focalX:xo(t.width,x.width,c-t.x,{clamp:!1}),focalY:xo(t.height,x.height,d-t.y,{clamp:!1}),scale:y}},tT=6,nT=3,iT=2,ks="­",oT=new RegExp("\\p{L}","gu"),eu=20,rT={arb:"ar",azj:"az",bel:"be",bos:"bs",bul:"bg",ces:"cs",deu:"de",eng:"en",fas:"fa",fra:"fr",hau:"ha",hin:"hi",hrv:"hr",hun:"hu",ibo:"ig",ind:"id",ita:"it",jav:"jv",kaz:"kk",kin:"rw",lin:"ln",mar:"mr",nep:"ne",nld:"nl",nya:"ny",pol:"pl",por:"pt",ron:"ro",run:"rn",rus:"ru",som:"so",spa:"es",srp:"sr",sun:"su",swe:"sv",swh:"sw",tgl:"tl",tur:"tr",ukr:"uk",urd:"ur",uzn:"uz",vie:"vi",yor:"yo",zlm:"ms",zul:"zu"},cl={be:()=>Promise.resolve().then(()=>require("./index-B1vNL0m-.js")).then(e=>e.index),bg:()=>Promise.resolve().then(()=>require("./index-kFrlcZxC.js")).then(e=>e.index),cs:()=>Promise.resolve().then(()=>require("./index-B6E31HBG.js")).then(e=>e.index),de:()=>Promise.resolve().then(()=>require("./index-CNFsG2yO.js")).then(e=>e.index),en:()=>Promise.resolve().then(()=>require("./index-x_p4zv7D.js")).then(e=>e.index),"en-gb":()=>Promise.resolve().then(()=>require("./index-BkmSPu6z.js")).then(e=>e.index),es:()=>Promise.resolve().then(()=>require("./index-CADju5Cy.js")).then(e=>e.index),fr:()=>Promise.resolve().then(()=>require("./index-Rwqfce2n.js")).then(e=>e.index),hi:()=>Promise.resolve().then(()=>require("./index-HhE2sJlU.js")).then(e=>e.index),hr:()=>Promise.resolve().then(()=>require("./index-DapMA5nM.js")).then(e=>e.index),hu:()=>Promise.resolve().then(()=>require("./index-kjKI70JX.js")).then(e=>e.index),id:()=>Promise.resolve().then(()=>require("./index-BlAuAthm.js")).then(e=>e.index),it:()=>Promise.resolve().then(()=>require("./index-BK-G0i5L.js")).then(e=>e.index),mr:()=>Promise.resolve().then(()=>require("./index-CIgabTwE.js")).then(e=>e.index),nl:()=>Promise.resolve().then(()=>require("./index-BrL2zv3x.js")).then(e=>e.index),pl:()=>Promise.resolve().then(()=>require("./index-DehKWXGA.js")).then(e=>e.index),pt:()=>Promise.resolve().then(()=>require("./index-C0cxTf5o.js")).then(e=>e.index),ro:()=>Promise.resolve().then(()=>require("./index-CJ0NMfJ3.js")).then(e=>e.index),ru:()=>Promise.resolve().then(()=>require("./index-gBhj9Tcu.js")).then(e=>e.index),sr:()=>Promise.resolve().then(()=>require("./index-1HMblVmZ.js")).then(e=>e.index),sv:()=>Promise.resolve().then(()=>require("./index-CDO1-R3j.js")).then(e=>e.index),tr:()=>Promise.resolve().then(()=>require("./index-CG_43X7q.js")).then(e=>e.index),uk:()=>Promise.resolve().then(()=>require("./index-Ypt3vHbi.js")).then(e=>e.index)},aT=(e,t)=>{const n=e;return t(n)??t(n.default)??null};let tu=null;const sT=()=>(tu??(tu=Promise.resolve().then(()=>require("./index-2JTNRDR1.js")).then(e=>e.franc).catch(()=>null)),tu),nu=new Map,lT=e=>{let t=nu.get(e);return t||(t=cl[e]().then(n=>aT(n,i=>i==null?void 0:i.hyphenateSync)).catch(()=>null),nu.set(e,t)),t},iu=e=>{if(!e)return null;const t=e.toLowerCase();if(cl[t])return t;const n=t.split("-")[0];return cl[n]?n:null},cT=(e,t)=>{const n=t.trim();if(n.length<eu)return;const i=e(n,{minLength:eu});if(i!=="und")return rT[i]??i},dT={hyphenateSync:null};function uT(e,t){const[n,i]=s.useState(null);return s.useEffect(()=>{if(!e)return;let o=!1;return sT().then(async r=>{const l=r?cT(r,t):void 0,c=typeof document<"u"?document.documentElement.lang:"",d=iu(l)??iu(c)??"en",u=await lT(d);o||i({lang:l,hyphenateSync:u})}),()=>{o=!0}},[e,t]),e&&n?n:dT}const ou=e=>{var t;return((t=e.match(oT))==null?void 0:t.length)??0};function pT(e,t){if(e.length<2||e.includes(ks))return;const n=new Set;if(t){const o=t(e,{hyphenChar:ks,minWordLength:tT});let r=0;for(let l=0;l<o.length;l+=1)o[l]===ks?n.add(r):r+=1}for(let o=1;o<e.length-1;o+=1)e[o-1]==="-"&&n.add(o);const i=[...n].filter(o=>{const r=e[o-1]==="-";return o>0&&o<e.length&&ou(e.slice(0,o))>=(r?1:nT)&&ou(e.slice(o))>=(r?1:iT)}).sort((o,r)=>o-r);return i.length?i:void 0}const ru=1.08,na=14,ia=8;function gT({P:e,box:t,bounds:n,natural:i,imageUrl:o,maskPath:r,stage:l,onStageChange:c,focalX:d,focalY:u,scale:p,onChange:y,onCommit:x}){const g=s.useRef(null),h=`pretext-image-ghost-${s.useId().replace(/:/g,"")}`,b=s.useRef(null),S=s.useRef(null),_=s.useRef({focalX:d,focalY:u,scale:p});_.current={focalX:d,focalY:u,scale:p};const v=l==="image";s.useEffect(()=>{var R;v&&((R=g.current)==null||R.focus({preventScroll:!0}))},[v]);const L=s.useCallback((R,T)=>{var V;const w=(V=g.current)==null?void 0:V.getBoundingClientRect();return!w||w.width<=0||w.height<=0?{x:0,y:0}:{x:(R-w.left)/w.width*t.width,y:(T-w.top)/w.height*t.height}},[t.width,t.height]),P=R=>{var w,V;if(!i)return;R.stopPropagation(),R.preventDefault(),(w=g.current)==null||w.focus({preventScroll:!0});const T=Ui(n,i,p);b.current={pointerId:R.pointerId,origin:L(R.clientX,R.clientY),startX:jn(n.width,T.width,d),startY:jn(n.height,T.height,u),width:T.width,height:T.height,moved:!1},(V=g.current)==null||V.setPointerCapture(R.pointerId)},q=(R,T)=>{var G,ge;if(!i)return;R.stopPropagation(),R.preventDefault(),(G=g.current)==null||G.focus({preventScroll:!0});const w=Ui(n,i,p),V=jn(n.width,w.width,d),z=jn(n.height,w.height,u),U={minX:V,minY:z,maxX:V+w.width,maxY:z+w.height},M=Pa(U,Yp(T)),f=Pa(U,T),K=Math.hypot(f.x-M.x,f.y-M.y);!isFinite(K)||K<=0||(S.current={pointerId:R.pointerId,anchor:M,startDistance:K,startScale:p,startX:V,startY:z,moved:!1},(ge=g.current)==null||ge.setPointerCapture(R.pointerId))},X=R=>{if(!i)return;const T=S.current;if(T&&R.pointerId===T.pointerId){R.stopPropagation(),R.preventDefault();const V=L(R.clientX,R.clientY),z={x:V.x-n.x,y:V.y-n.y},U=Math.hypot(z.x-T.anchor.x,z.y-T.anchor.y),M=Math.min(al,Math.max(rl,T.startScale*(U/T.startDistance)));if(!T.moved&&Math.abs(M-T.startScale)<1e-4)return;T.moved=!0;const f=M/T.startScale,K=T.anchor.x+(T.startX-T.anchor.x)*f,G=T.anchor.y+(T.startY-T.anchor.y)*f,ge=Ui(n,i,M);y({focalX:xo(n.width,ge.width,K),focalY:xo(n.height,ge.height,G),scale:M});return}const w=b.current;if(w&&R.pointerId===w.pointerId){R.stopPropagation(),R.preventDefault();const V=L(R.clientX,R.clientY),z=V.x-w.origin.x,U=V.y-w.origin.y;if(!w.moved&&z===0&&U===0)return;w.moved=!0,y({focalX:xo(n.width,w.width,w.startX+z),focalY:xo(n.height,w.height,w.startY+U),scale:p})}},B=R=>{var V,z;const T=b.current;if(T&&R.pointerId===T.pointerId){b.current=null,R.stopPropagation(),(V=g.current)!=null&&V.hasPointerCapture(T.pointerId)&&g.current.releasePointerCapture(T.pointerId),T.moved&&x(_.current);return}const w=S.current;w&&R.pointerId===w.pointerId&&(S.current=null,R.stopPropagation(),(z=g.current)!=null&&z.hasPointerCapture(w.pointerId)&&g.current.releasePointerCapture(w.pointerId),w.moved&&x(_.current))},H=R=>{if(R.key==="Escape"){R.stopPropagation(),c("none");return}if(R.key==="="||R.key==="+"||R.key==="-"||R.key==="_"){R.preventDefault(),R.stopPropagation();const T=R.key==="="||R.key==="+",w=Math.min(al,Math.max(rl,p*(T?ru:1/ru))),V={focalX:d,focalY:u,scale:w};y(V),x(V)}},O=["nw","ne","se","sw"],C={minX:n.x,minY:n.y,maxX:n.x+n.width,maxY:n.y+n.height},$=s.useMemo(()=>{const R=i??{width:n.width,height:n.height},T=Ui(n,R,p);return!(T.width>0)||!(T.height>0)?null:{x:n.x+jn(n.width,T.width,d),y:n.y+jn(n.height,T.height,u),width:T.width,height:T.height}},[i,n.x,n.y,n.width,n.height,d,u,p]),Q=$?{minX:$.x,minY:$.y,maxX:$.x+$.width,maxY:$.y+$.height}:C;return a.jsxs("svg",{ref:g,className:`${e}-editor${v?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:H,onPointerMove:X,onPointerUp:B,onPointerCancel:B,onLostPointerCapture:B,"data-pretext-image-editor":!0,children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>c("none")}),v&&o&&$&&r&&a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsxs("mask",{id:h,maskUnits:"userSpaceOnUse",x:$.x,y:$.y,width:$.width,height:$.height,children:[a.jsx("rect",{x:$.x,y:$.y,width:$.width,height:$.height,fill:"#FFFFFF"}),a.jsx("path",{d:r,fillRule:"evenodd",fill:"#000000"})]})}),a.jsx("image",{className:`${e}-editor-ghost`,href:o??void 0,x:$.x,y:$.y,width:$.width,height:$.height,preserveAspectRatio:"none",mask:`url(#${h})`}),a.jsx("rect",{className:`${e}-editor-image-bounds`,x:$.x,y:$.y,width:$.width,height:$.height})]}),v&&a.jsxs(a.Fragment,{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:n.x,y:n.y,width:n.width,height:n.height}),a.jsx("rect",{className:`${e}-editor-body`,x:n.x,y:n.y,width:n.width,height:n.height,onPointerDown:P}),O.map(R=>{const T=sl(Q,R),w=R==="ne"||R==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:T.x-ia/2,y:T.y-ia/2,width:ia,height:ia}),a.jsx("rect",{className:`${e}-editor-scale-grab${w?` ${e}-editor-scale-grab-nesw`:""}`,x:T.x-na/2,y:T.y-na/2,width:na,height:na,onPointerDown:V=>q(V,R)})]},R)})]})]})}const dl=10,mT=dl*2,zn=7,hT=4,co=9,fT=3.5,au=1.08,yT=.05,oa=14,vT=1,ra=14,aa=8;function xT({P:e,box:t,viewBox:n,contours:i,snap:o,stretchToBox:r,uniformStretch:l=!1,stage:c,onStageChange:d,onSelectionChange:u,onChange:p,onCommit:y}){const x=s.useRef(null),g=s.useRef(null),h=s.useRef(i);h.current=i;const b=s.useRef(null),S=s.useRef(null),_=s.useRef(null),v=s.useRef(null),[L,P]=s.useState([]),[q,X]=s.useState(vo),[B,H]=s.useState(null),O=s.useCallback(m=>{X(Y=>UC(Y,m)?Y:m)},[]),C=c==="shape";s.useEffect(()=>{var m;C&&((m=x.current)==null||m.focus({preventScroll:!0}))},[C]),s.useEffect(()=>{C||P(m=>m.length?[]:m)},[C]);const $=L.length>0;s.useEffect(()=>{u==null||u($)},[$,u]),s.useEffect(()=>()=>u==null?void 0:u(!1),[u]);const Q=n.width>0?t.width/n.width:1,R=n.height>0?t.height/n.height:1,T=Math.min(Q,R),w=r&&l?T:Q,V=r&&l?T:R,z=r&&l?(t.width-n.width*T)/2:0,U=r&&l?(t.height-n.height*T)/2:0,M=s.useCallback(m=>r?{x:z+(m.x-n.x)*w,y:U+(m.y-n.y)*V}:{x:m.x-n.x,y:m.y-n.y},[r,n,w,V,z,U]),f=s.useCallback(m=>r?{x:n.x+(w>0?(m.x-z)/w:0),y:n.y+(V>0?(m.y-U)/V:0)}:{x:n.x+m.x,y:n.y+m.y},[r,n,w,V,z,U]),K=s.useMemo(()=>f({x:t.width/2,y:t.height/2}),[f,t.width,t.height]),G=s.useCallback((m,Y)=>{var oe;const te=(oe=x.current)==null?void 0:oe.getBoundingClientRect();if(!te||te.width<=0||te.height<=0)return{x:0,y:0};if(r){const fe=(m-te.left)/te.width*t.width,N=(Y-te.top)/te.height*t.height;return{x:n.x+(w>0?(fe-z)/w:0),y:n.y+(V>0?(N-U)/V:0)}}return{x:n.x+(m-te.left),y:n.y+(Y-te.top)}},[r,n,t.width,t.height,w,V,z,U]),ge=s.useCallback((m,Y)=>{var oe;const te=(oe=x.current)==null?void 0:oe.getBoundingClientRect();return!te||te.width<=0||te.height<=0?{x:0,y:0}:{x:(m-te.left)/te.width*t.width,y:(Y-te.top)/te.height*t.height}},[t.width,t.height]),k=s.useCallback((m,Y)=>{const te=l&&!(Y!=null&&Y.preserveShape)?WC(m,n,t,z,U,w,V):m;y(te,Y)},[y,l,n,t,z,U,w,V]),ce=s.useCallback(()=>{H(null)},[]),I=s.useCallback((m,Y,te)=>{if(!te||b.current||S.current||_.current||v.current){ce();return}const oe=ge(m,Y),fe=un(h.current,M);for(const W of fe)for(const Se of W.nodes)if(Math.hypot(Se.p.x-oe.x,Se.p.y-oe.y)<=co){ce();return}const N=Yd(fe,oe);if(!N||N.distance>dl){ce();return}const F=fe[N.contour],ne=F==null?void 0:F.nodes[N.segment],re=F==null?void 0:F.nodes[(N.segment+1)%((F==null?void 0:F.nodes.length)??1)],J=!!(ne&&re&&!Go(ne,re));H(W=>W&&W.curved===J&&Math.hypot(W.point.x-N.point.x,W.point.y-N.point.y)<.25?W:{point:N.point,curved:J})},[ge,M,ce]),ue=m=>{var Fe;const Y=m.metaKey||m.ctrlKey,te=_.current;if(te&&m.pointerId===te.pointerId){if(m.stopPropagation(),m.preventDefault(),te.startDistance<=0)return;const Ye=G(m.clientX,m.clientY),De=Math.hypot(Ye.x-te.origin.x,Ye.y-te.origin.y),ze=Math.max(yT,De/te.startDistance);if(!te.moved&&Math.abs(ze-1)<1e-4)return;te.moved=!0,p(Gd(te.startContours,te.origin,ze));return}const oe=S.current;if(oe&&m.pointerId===oe.pointerId){m.stopPropagation(),m.preventDefault();const Ye=G(m.clientX,m.clientY),{bbox:De}=oe,ze=De.maxX-De.minX,Ze=De.maxY-De.minY,Ue=Ye.x-oe.origin.x,ye=Ye.y-oe.origin.y;let _e=Ue,Ve=ye;if(isFinite(ze)&&isFinite(Ze))if(r){let et=n.x,ot=n.x+n.width,lt=n.y,Ke=n.y+n.height;l&&(w>0&&(et=n.x+(0-z)/w,ot=n.x+(t.width-z)/w),V>0&&(lt=n.y+(0-U)/V,Ke=n.y+(t.height-U)/V));const ht=Math.min(et,ot-ze),tt=Math.max(et,ot-ze),Ge=Math.min(lt,Ke-Ze),We=Math.max(lt,Ke-Ze),Ne=Math.min(tt,Math.max(ht,De.minX+Ue)),be=Math.min(We,Math.max(Ge,De.minY+ye));_e=Ne-De.minX,Ve=be-De.minY}else{const et=De.minX-n.x,ot=De.minY-n.y,lt=Math.min(0,t.width-ze),Ke=Math.max(0,t.width-ze),ht=Math.min(0,t.height-Ze),tt=Math.max(0,t.height-Ze),Ge=Math.min(Ke,Math.max(lt,et+Ue)),We=Math.min(tt,Math.max(ht,ot+ye));_e=Ge-et,Ve=We-ot}const Je=[];if(!Y&&isFinite(ze)&&isFinite(Ze)){const et=M({x:De.minX+ze/2+_e,y:De.minY+Ze/2+Ve}),ot={x:t.width/2,y:t.height/2};Math.abs(et.x-ot.x)<=oa&&(_e=K.x-De.minX-ze/2,Je.push(ol(ot.x,"x",t))),Math.abs(et.y-ot.y)<=oa&&(Ve=K.y-De.minY-Ze/2,Je.push(ol(ot.y,"y",t)))}if(!oe.moved&&_e===0&&Ve===0)return;oe.moved=!0,O(Je.length?Je:vo),p(un(oe.startContours,et=>({x:et.x+_e,y:et.y+Ve})),{carryImage:!0});return}const fe=v.current;if(fe&&m.pointerId===fe.pointerId){m.stopPropagation(),m.preventDefault();const Ye=G(m.clientX,m.clientY);let De=Ye.x-fe.origin.x,ze=Ye.y-fe.origin.y;if(m.shiftKey&&(Math.abs(De)>Math.abs(ze)?ze=0:De=0),!fe.moved&&De===0&&ze===0)return;fe.moved=!0,p(Ud(fe.startContours,fe.selection,De,ze));return}const N=b.current;if(!N||m.pointerId!==N.pointerId){I(m.clientX,m.clientY,L.length>0||C);return}ce(),m.stopPropagation(),m.preventDefault();const F=G(m.clientX,m.clientY);if(N.kind==="anchor"){const Ye={x:N.anchor.x+(F.x-N.origin.x),y:N.anchor.y+(F.y-N.origin.y)},De=Y?[]:XC(h.current,{contour:N.contour,node:N.node}),ze=Y||!N.center?[]:[N.center],Ze=Qd(Kd(De,ze.map(_e=>_e.x),"x"),Ye,"x",M,oa),Ue=Qd(Kd(De,ze.map(_e=>_e.y),"y"),Ye,"y",M,oa),ye=Y?Ye:{x:(Ze==null?void 0:Ze.value)??ta(Ye.x,o),y:(Ue==null?void 0:Ue.value)??ta(Ye.y,o)};if(m.shiftKey&&(Math.abs(ye.x-N.anchor.x)>Math.abs(ye.y-N.anchor.y)?ye.y=N.anchor.y:ye.x=N.anchor.x),!N.moved&&ye.x===N.anchor.x&&ye.y===N.anchor.y)return;N.moved=!0,O(KC(ye,Ze,Ue,t,M)),p(DC(h.current,N.contour,N.node,ye));return}const ne=(Fe=h.current[N.contour])==null?void 0:Fe.nodes[N.node],re=N.mirror&&!m.altKey,J=re||Y?null:N.kind==="in"?ne==null?void 0:ne.out:ne==null?void 0:ne.in,W=ne?M(ne.p):null,Se=J?M(J):null,le=ne&&(!Y||m.shiftKey)?ZC(F,ne.p,re||Y?null:QC(h.current[N.contour],N.node,N.kind,M),W&&Se?Math.hypot(Se.x-W.x,Se.y-W.y):null,m.shiftKey,M,f):{point:F,guides:vo},j=le.guides.length?le.point:Y?F:{x:ta(F.x,o),y:ta(F.y,o)},Te=N.kind==="in"?ne==null?void 0:ne.in:ne==null?void 0:ne.out;!N.moved&&Te&&j.x===Te.x&&j.y===Te.y||(N.moved=!0,O(le.guides),p(BC(h.current,N.contour,N.node,N.kind,j,re)))},ee=m=>{O(vo);const Y=_.current;if(Y&&m.pointerId===Y.pointerId){_.current=null,m.stopPropagation();const J=x.current;J!=null&&J.hasPointerCapture(Y.pointerId)&&J.releasePointerCapture(Y.pointerId),Y.moved&&k(h.current,{preserveShape:!0});return}const te=S.current;if(te&&m.pointerId===te.pointerId){S.current=null,m.stopPropagation();const J=x.current;J!=null&&J.hasPointerCapture(te.pointerId)&&J.releasePointerCapture(te.pointerId),te.moved?k(h.current,{preserveShape:!0}):P([]);return}const oe=v.current;if(oe&&m.pointerId===oe.pointerId){v.current=null,m.stopPropagation();const J=x.current;J!=null&&J.hasPointerCapture(oe.pointerId)&&J.releasePointerCapture(oe.pointerId),oe.moved&&k(h.current);return}const fe=b.current;if(!fe||m.pointerId!==fe.pointerId)return;b.current=null,m.stopPropagation();const N=x.current;N!=null&&N.hasPointerCapture(fe.pointerId)&&N.releasePointerCapture(fe.pointerId);const F=Math.hypot(m.clientX-fe.clientOrigin.x,m.clientY-fe.clientOrigin.y);if(fe.moved||F>hT){fe.moved&&k(h.current);return}if(!fe.toggleOnRelease||m.type!=="pointerup")return;const re=qd(h.current,fe.contour,fe.node);re!==h.current&&(p(re),k(re))},xe=m=>{m.stopPropagation()},Le=m=>{var Y,te;m.stopPropagation(),m.preventDefault(),ce(),(Y=x.current)==null||Y.focus({preventScroll:!0}),S.current={pointerId:m.pointerId,origin:G(m.clientX,m.clientY),startContours:Vn(i),bbox:Li(i),moved:!1},(te=x.current)==null||te.setPointerCapture(m.pointerId)},se=(m,Y)=>{var F,ne;m.stopPropagation(),m.preventDefault(),ce(),(F=x.current)==null||F.focus({preventScroll:!0}),P([]),d("shape");const te=Li(i),oe=Pa(te,Yp(Y)),fe=sl(te,Y),N=Math.hypot(fe.x-oe.x,fe.y-oe.y);!isFinite(N)||N<=0||(_.current={pointerId:m.pointerId,corner:Y,origin:oe,startDistance:N,startContours:Vn(i),moved:!1},(ne=x.current)==null||ne.setPointerCapture(m.pointerId))},de=(m,Y,te,oe)=>{var F,ne,re,J;m.stopPropagation(),m.preventDefault(),ce(),(F=x.current)==null||F.focus({preventScroll:!0});const fe=(ne=i[te])==null?void 0:ne.nodes[oe];if(!fe)return;if(m.altKey){const W=Y==="anchor"?qp(i,te,oe):jC(i,te,oe,Y);if(W===i)return;P(Y==="anchor"?[]:[{contour:te,node:oe}]),p(W),k(W);return}const N=m.metaKey||m.ctrlKey;if(Y==="anchor"&&m.shiftKey&&!N){P(W=>W.some(Se=>Se.contour===te&&Se.node===oe)?W.filter(Se=>!(Se.contour===te&&Se.node===oe)):[...W,{contour:te,node:oe}]);return}if(Y==="anchor"&&!N&&L.length>1&&L.some(W=>W.contour===te&&W.node===oe)){v.current={pointerId:m.pointerId,origin:G(m.clientX,m.clientY),startContours:Vn(i),selection:L,moved:!1},(re=x.current)==null||re.setPointerCapture(m.pointerId);return}P([{contour:te,node:oe}]),b.current={kind:Y,contour:te,node:oe,pointerId:m.pointerId,origin:G(m.clientX,m.clientY),clientOrigin:{x:m.clientX,y:m.clientY},anchor:fe.p,center:HC(i),mirror:Y!=="anchor"&&!!(fe.in&&fe.out),toggleOnRelease:N,moved:!1},(J=x.current)==null||J.setPointerCapture(m.pointerId)},Z=m=>{m.stopPropagation(),m.preventDefault(),ce();const Y=un(i,M),te=Yd(Y,ge(m.clientX,m.clientY));if(!te||te.distance>dl)return;const{contours:oe,nodeIndex:fe}=VC(i,te.contour,te.segment,te.t);fe<0||(P([{contour:te.contour,node:fe}]),p(oe),k(oe))},pe=m=>{if(m.key==="="||m.key==="+"||m.key==="-"||m.key==="_"){m.preventDefault(),m.stopPropagation();const N=Li(i);if(!isFinite(N.minX)||!isFinite(N.maxX))return;const F={x:(N.minX+N.maxX)/2,y:(N.minY+N.maxY)/2},re=m.key==="="||m.key==="+"?au:1/au,J=Gd(i,F,re);p(J),k(J,{preserveShape:!0});return}if(m.key==="Escape"){m.stopPropagation(),P([]),d("none");return}if(!L.length)return;if(m.key==="Backspace"||m.key==="Delete"){m.preventDefault(),m.stopPropagation();const N=zC(i,L);if(N===i)return;P([]),p(N),k(N);return}const Y=o>0?o:vT,te=m.shiftKey?Y*10:Y,oe={ArrowLeft:[-te,0],ArrowRight:[te,0],ArrowUp:[0,-te],ArrowDown:[0,te]}[m.key];if(!oe)return;m.preventDefault(),m.stopPropagation();const fe=Ud(i,L,oe[0],oe[1]);p(fe),k(fe)},ie=s.useMemo(()=>Wo(un(i,M)),[i,M]),me=s.useMemo(()=>Li(i),[i]),ve=M({x:me.minX,y:me.minY}),Ee={width:M({x:me.maxX,y:me.minY}).x-ve.x,height:M({x:me.minX,y:me.maxY}).y-ve.y},Re=C&&L.length===0&&isFinite(me.minX)&&isFinite(me.maxX)&&me.maxX>me.minX&&me.maxY>me.minY,Ce=L.length>0||C,$e=Ce;return a.jsxs("svg",{ref:x,className:`${e}-editor${Ce?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:pe,onPointerDown:()=>{var m;return(m=x.current)==null?void 0:m.focus({preventScroll:!0})},onPointerMove:ue,onPointerLeave:ce,onPointerUp:ee,onPointerCancel:ee,onLostPointerCapture:ee,onContextMenu:m=>{m.preventDefault()},"data-pretext-path-editor":!0,"data-selection":"none",children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>{P([]),d("none")},onClick:Z}),$e&&a.jsx("path",{className:`${e}-editor-outline`,d:ie}),$e&&q.map((m,Y)=>a.jsx("line",{className:`${e}-editor-snap ${e}-editor-snap-${m.kind}`,x1:m.a.x,y1:m.a.y,x2:m.b.x,y2:m.b.y},`${m.kind}-${Y}`)),a.jsx("path",{ref:g,className:`${e}-editor-body`,d:ie,fillRule:"evenodd",onPointerDown:Le,onClick:Z}),$e&&a.jsx("path",{className:`${e}-editor-hit`,d:ie,style:{strokeWidth:mT},onClick:Z}),$e&&B&&a.jsx("rect",{className:`${e}-editor-add-preview`,x:B.point.x-zn/2,y:B.point.y-zn/2,width:zn,height:zn,rx:B.curved?zn/2:0}),$e&&i.map((m,Y)=>m.nodes.map((te,oe)=>{const fe=L.some(F=>F.contour===Y&&F.node===oe),N=M(te.p);return a.jsxs("g",{children:[fe&&L.length===1&&["in","out"].map(F=>{const ne=te[F];if(!ne)return null;const re=M(ne);return a.jsxs("g",{children:[a.jsx("line",{className:`${e}-editor-handle-line`,x1:N.x,y1:N.y,x2:re.x,y2:re.y}),a.jsx("circle",{className:`${e}-editor-handle`,cx:re.x,cy:re.y,r:fT}),a.jsx("circle",{className:`${e}-editor-grab`,cx:re.x,cy:re.y,r:co,onPointerDown:J=>de(J,F,Y,oe),onClick:xe})]},F)}),a.jsx("rect",{className:`${e}-editor-anchor${fe?` ${e}-editor-anchor-selected`:""}`,x:N.x-zn/2,y:N.y-zn/2,width:zn,height:zn,rx:Bp(te)?zn/2:0}),a.jsx("rect",{className:`${e}-editor-grab`,x:N.x-co,y:N.y-co,width:co*2,height:co*2,onPointerDown:F=>de(F,"anchor",Y,oe),onClick:xe,onDoubleClick:F=>{F.stopPropagation(),F.preventDefault();const ne=qd(i,Y,oe);p(ne),k(ne)}})]},`${Y}-${oe}`)})),Re&&a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:ve.x,y:ve.y,width:Ee.width,height:Ee.height}),["nw","ne","se","sw"].map(m=>{const Y=M(sl(me,m)),te=m==="ne"||m==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:Y.x-aa/2,y:Y.y-aa/2,width:aa,height:aa}),a.jsx("rect",{className:`${e}-editor-scale-grab${te?` ${e}-editor-scale-grab-nesw`:""}`,x:Y.x-ra/2,y:Y.y-ra/2,width:ra,height:ra,onPointerDown:oe=>se(oe,m),onClick:xe})]},m)})]})]})}const bT=4e3,ST=/^(?:https?:|mailto:|tel:)/i;function Kp(e){return!!e&&typeof e=="object"&&e.type==="link"}function wT(e){if(!e)return;const t=e.replace(/\s+/g,"");if(!(/^[a-z][a-z0-9+.-]*:/i.test(t)&&!ST.test(t)))return t}function $T(e){const t=[];return e.forEach((n,i)=>{const o=(r,l,c)=>{for(const d of r){if(Kp(d)){o(d.children??[],wT(d.value),d.target);continue}const u=d,p=(u==null?void 0:u.text)??"";if(p.trim())for(const y of p.split(/\s+/))y&&t.push({text:y,leaf:u,href:l,target:c,para:i})}};o((n==null?void 0:n.children)??[])}),t}function su(e){return{...e.fontFamily&&{fontFamily:Bo(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 CT(e){return e.map(t=>{const n=[],i=o=>{for(const r of o){if(Kp(r)){i(r.children??[]);continue}n.push((r==null?void 0:r.text)??"")}};return i((t==null?void 0:t.children)??[]),n.join("")})}function TT(e,t,n,i,o){if(t<=0||!e.length||n<=0||i<=0)return e;const r=o==="avoid"?1:-1;return e.map(l=>{if(!l.length)return l;let c=1/0,d=-1/0,u=1/0,p=-1/0;for(const g of l){const h=g.x*n,b=g.y*i;h<c&&(c=h),h>d&&(d=h),b<u&&(u=b),b>p&&(p=b)}const y=(c+d)/2,x=(u+p)/2;return l.map(g=>{const h=g.x*n,b=g.y*i,S=h-y,_=b-x,v=Math.sqrt(S*S+_*_);if(v<1e-6)return g;const P=Math.max(0,v+r*t)/v;return{x:(y+S*P)/n,y:(x+_*P)/i}})})}const IT=.75;function lu(e,t,n,i,o,r){if(e.kind==="fragment"||!t)return null;const l=e.token.text,c=e.offset>0?t[e.offset-1]:0,d=n?n.map(u=>u-e.offset).filter(u=>u>=(e.offset>0?2:1)&&u<l.length):Array.from({length:l.length-1},(u,p)=>p+1);for(let u=d.length-1;u>=0;u-=1){const p=d[u];if(e.offset+p>t.length)continue;const y=!!n&&l[p-1]!=="-",x=t[e.offset+p-1]-c,g=x+(y?r:0);if(!(g*o>i))return{chars:p,fragmentText:y?`${l.slice(0,p)}-`:l.slice(0,p),remainderText:l.slice(p),fragmentWidth:g,remainderWidth:Math.max(0,e.width-x)}}return null}function cu(e){const{tokens:t,widths:n,rings:i,mode:o,align:r,scale:l,width:c,height:d,allowOverflow:u,capInset:p,capLines:y}=e,x=!!e.hyphenate,g=e.charWidths??[],h=e.hyphenPoints??[],b=e.hyphenWidth??0,S=e.lineHeight*l,_=e.spaceWidth*l,v=Math.max(0,e.shapeMargin??0),L=[],P=t.map((M,f)=>({token:M,originalIndex:f,width:n[f],kind:"whole",offset:0}));if(!P.length||c<=0||S<=0)return{segments:L,placed:0,height:0,capLeft:0,capTop:0,renderTokens:t};const q=Math.max(1,_*.5),X=S*fC,B=TT(i,v,c,d,o),H=Math.max(1,Math.floor(e.columns??1)),O=H>1?Math.max(0,e.columnGap??0):0,C=(c-O*(H-1))/H;let $=0,Q=0,R=0,T=0,w=0,V=null;const z=(M,f,K)=>CC(B,(M+X)/d,(M+S-X)/d,o).map(G=>({x0:Math.max(f,G.x0*c),x1:Math.min(K,G.x1*c)})).filter(G=>G.x1>G.x0);for(let M=0;M<H&&$<P.length&&C>0;M+=1){const f=M*(C+O),K=f+C,G=u&&M===H-1;let ge=0;for(let I=0;I+S<=d;I+=S)for(const ue of z(I,f,K))ge=Math.max(ge,ue.x1-ue.x0);let k=P[$].token.para,ce=0;for(;$<P.length&&R<bT;){const I=ce+S>d;if(I&&!G)break;const ue=P[$].token.para;if(ue>k+1){ce+=S*(ue-k-1),k=ue-1,R+=1;continue}let ee=I?[{x0:f,x1:K}]:z(ce,f,K);p>0&&y>0&&M===0&&!I&&ee.length&&(V===null&&(V=R,T=ee[0].x0,w=ce),R-V<y&&(ee=$C(ee,{x0:T,x1:T+p})));const xe=ee.reduce((Le,se)=>Math.max(Le,se.x1-se.x0),0);for(const Le of ee){const se=Le.x1-Le.x0;if(se<q)continue;if($>=P.length||P[$].token.para!==ue)break;const de=$;let Z=0;for(;$<P.length&&P[$].token.para===ue;){const pe=P[$],ie=$===de,me=pe.width*l,ve=ie?me:_+me;if(Z+ve<=se){Z+=ve,$+=1;continue}const Ee=se-Z-(ie?0:_),Re=ie&&me>C-.5,Ce=se>=xe-.5&&se>=ge*IT,$e=g[pe.originalIndex],m=h[pe.originalIndex],Y=(x&&m?lu(pe,$e,m,Ee,l,b):null)??(Re&&Ce?lu(pe,$e,void 0,Ee,l,b):null);if(Y){const te={token:{...pe.token,text:Y.fragmentText},originalIndex:pe.originalIndex,width:Y.fragmentWidth,kind:"fragment",offset:pe.offset},oe={token:{...pe.token,text:Y.remainderText},originalIndex:pe.originalIndex,width:Y.remainderWidth,kind:"remainder",offset:pe.offset+Y.chars};P.splice($,1,te,oe),Z+=(ie?0:_)+Y.fragmentWidth*l,$+=1;break}if(Re&&H===1&&se>=ge-.5){Z+=ve,$+=1;continue}break}if($>de){const pe=$>=P.length||P[$].token.para!==ue;L.push({top:ce,left:Le.x0,width:se,from:de,to:$,justify:r==="justify"&&!pe})}if($>=P.length||P[$].token.para!==ue)break}k=ue,ce+=S,R+=1}Q=Math.max(Q,ce)}let U=0;if($>0){const M=P[$-1];U=M.kind==="fragment"?M.originalIndex:M.originalIndex+1}return{segments:L,placed:U,height:L.length?Q:0,capLeft:T,capTop:w,renderTokens:P.map(M=>M.token)}}const LT=.12,PT=2,MT=10,As=.25,RT=e=>{const t=e.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}},ET=(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,kT=(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=RT(e);(!r||!ET(r,c))&&(r=c,i(c)),o=requestAnimationFrame(l)};return l(),()=>cancelAnimationFrame(o)},[e,t]),n},Fs=(e,t)=>{if(!(t.width>0)||!(t.height>0))return e;const n=Math.min(t.width,t.height),i=(t.width-n)/2,o=(t.height-n)/2;return e.map(r=>r.map(l=>({x:(i+l.x*n)/t.width,y:(o+l.y*n)/t.height})))},nr=typeof window>"u"?s.useEffect:s.useLayoutEffect;function AT(){return typeof document>"u"?null:document.body}function FT({P:e,item:t,shape:n,customPath:i,pathFit:o,viewBox:r,mode:l,align:c,allowOverflow:d,fitEnabled:u,scale:p,onFitScale:y,padding:x,columns:g,gutter:h,hyphenate:b,showOverflowIndicator:S,dropCapLines:_,dropCapSize:v,showGuides:L,typography:P,imageUrl:q,imageFocalX:X,imageFocalY:B,imageScale:H,imageCustomPath:O,imagePathEdited:C,pathDragActive:$,pathCarryImage:Q,onCarryImageConsumed:R,pathEditor:T,imageEditor:w}){var Ut,Ft;const V=`pretext-shape-image-${s.useId().replace(/:/g,"")}`,[z,U]=s.useState(null),M=s.useRef(null),[f,K]=s.useState({width:0,height:0}),[G,ge]=s.useState(0),[k,ce]=s.useState(0),[I,ue]=s.useState(null),[ee,xe]=s.useState(0),[Le,se]=s.useState("none");s.useEffect(()=>{!T&&!w&&se("none")},[T,w]);const[de,Z]=s.useState(null);s.useEffect(()=>{if(!q||typeof Image>"u"){Z(null);return}let Me=!1;const Oe=new Image;return Oe.onload=()=>{Me||Z({width:Oe.naturalWidth,height:Oe.naturalHeight})},Oe.src=q,()=>{Me=!0}},[q]);const pe=s.useMemo(()=>Array.isArray(t==null?void 0:t.text)?t.text:[],[t]),ie=s.useMemo(()=>$T(pe),[pe]),me=s.useMemo(()=>CT(pe),[pe]),ve=s.useMemo(()=>me.join(`
27798
+ `),[me]),{lang:Ee,hyphenateSync:Re}=uT(b,ve),Ce=s.useMemo(()=>b?ie.map(Me=>pT(Me.text,Re)):[],[b,ie,Re]),$e=_>0&&v>1?((Ft=(Ut=ie[0])==null?void 0:Ut.text)==null?void 0:Ft.charAt(0))??"":"",m=(T==null?void 0:T.contours)??null,Y=s.useMemo(()=>{let Me=[];if(m){const Oe=$r(m);Oe.length&&(Me=Co(Oe,r))}if(!Me.length){const Oe=i.trim(),St=Oe?zd(Oe,o,r):null;St&&St.length?Me=St:Me=el(n==="custom"?"rectangle":n)}return n==="circle"?Fs(Me,f):Me},[m,n,i,o,r,f.width,f.height]),te=T==null?void 0:T.onConvert,oe=(T==null?void 0:T.needsConversion)??!1,fe=s.useMemo(()=>{if(n==="circle")return!1;const Me=m??(i.trim()?ki(i):null);return!!(Me&&Xp(Me,r))},[m,i,r,n]),[N,F]=s.useState(null);nr(()=>{if(!fe){N&&F(null);return}!N&&f.width>0&&f.height>0&&F({width:f.width,height:f.height})},[fe,f.width,f.height,N]);const ne=s.useMemo(()=>{if(!fe||f.width<=0||f.height<=0)return Y;const Me=N??f,Oe=r.width/Me.width,St=r.height/Me.height;return Y.map(Mt=>Mt.map(Qe=>({x:Qe.x*Oe,y:Qe.y*St})))},[Y,fe,N,r.width,r.height,f.width,f.height]),re=s.useMemo(()=>{if(m){const Mt=$r(m);if(Mt.length){const Qe=Co(Mt,r);return n==="circle"?Fs(Qe,f):Qe}}const Me=O.trim(),Oe=Me?zd(Me,o,r):null,St=Oe&&Oe.length?Oe:el(n==="custom"?"rectangle":n);return n==="circle"?Fs(St,f):St},[m,n,O,o,r,f.width,f.height]),J=s.useMemo(()=>{if(!fe||f.width<=0||f.height<=0)return re;const Me=N??f,Oe=r.width/Me.width,St=r.height/Me.height;return re.map(Mt=>Mt.map(Qe=>({x:Qe.x*Oe,y:Qe.y*St})))},[re,fe,N,r.width,r.height,f.width,f.height]),W=s.useRef(null),Se=s.useRef(!1);s.useEffect(()=>{if(!(!te||f.width<=0||f.height<=0)){if(fe){if(W.current===i)return;const Me=m??(i.trim()?ki(i):null);if(!(Me!=null&&Me.length))return;const Oe=un(Me,St=>({x:r.x+(St.x-r.x)/f.width*r.width,y:r.y+(St.y-r.y)/f.height*r.height}));W.current=Wo(Oe),te(Oe);return}!oe||!Y.length||Se.current||(Se.current=!0,te(un(Gp(Y),Me=>({x:Me.x*La,y:Me.y*La}))))}},[oe,fe,te,Y,m,i,r,f.width,f.height]);const le=s.useCallback(()=>{const Me=z;if(!Me)return;const Oe=Me.getBoundingClientRect(),St=window.getComputedStyle(Me),Mt=parseFloat(St.paddingTop)||0;ge(Bt=>Math.abs(Bt-Mt)<.5?Bt:Mt);const Qe=parseFloat(St.columnGap)||0;ce(Bt=>Math.abs(Bt-Qe)<.5?Bt:Qe);const kt={width:Oe.width,height:Oe.height};K(Bt=>Math.abs(Bt.width-kt.width)<.5&&Math.abs(Bt.height-kt.height)<.5?Bt:kt)},[z]);nr(()=>{const Me=z;if(!Me||typeof ResizeObserver>"u")return;le();const Oe=new ResizeObserver(le);return Oe.observe(Me),()=>Oe.disconnect()},[z,le]),nr(()=>{le()},[x,h,le]),s.useEffect(()=>{const Me=typeof document<"u"?document.fonts:void 0;Me!=null&&Me.ready&&Me.ready.then(()=>{xe(Oe=>Oe+1)})},[]),nr(()=>{const Me=M.current;if(!Me)return;if(!ie.length){ue(null);return}const Oe=[],St=document.createDocumentFragment();for(const Pt of ie){const Zt=document.createElement("span");Object.assign(Zt.style,su(Pt.leaf)),Zt.textContent=Pt.text,St.appendChild(Zt),Oe.push(Zt)}const Mt=document.createElement("span");Mt.textContent=" ",St.appendChild(Mt);const Qe=document.createElement("span");Qe.textContent="-",St.appendChild(Qe);const kt=$e||"H",Bt=document.createElement("span");Bt.textContent=kt,Bt.style.lineHeight="1",St.appendChild(Bt),Me.replaceChildren(St);const Wt=window.getComputedStyle(Me),At=parseFloat(Wt.fontSize)||16,Ae=parseFloat(Wt.lineHeight),ft=Number.isNaN(Ae)?At*1.2:Ae,gt=Math.max(ft,At),dt=document.createElement("span");dt.textContent=kt,dt.style.lineHeight=`${gt}px`;const yt=document.createElement("span");yt.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",dt.appendChild(yt),Me.appendChild(dt);const ut=dt.getBoundingClientRect().top,it=yt.getBoundingClientRect().top,Nt=Math.max(1,it-ut);dt.remove();let $t=Nt*.8;const Xt=document.createElement("canvas").getContext("2d"),Ot=Pt=>`${Wt.fontStyle} ${Wt.fontWeight} ${Pt}px ${Wt.fontFamily}`;if(Xt){Xt.font=Ot(At);const Pt=Xt.measureText(kt).actualBoundingBoxAscent;Pt>0&&($t=Pt)}const jt=v>1?(v-1)*gt+$t:$t;let Dt=At*(jt/$t);if(Xt){Xt.font=Ot(Dt);const Pt=Xt.measureText(kt).actualBoundingBoxAscent;Pt>0&&(Dt=Dt*(jt/Pt))}Bt.style.fontSize=`${Dt}px`,Bt.style.lineHeight=`${Dt}px`;const zt=document.createElement("span");zt.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",Bt.appendChild(zt);const D=Math.max(1,zt.getBoundingClientRect().top-Bt.getBoundingClientRect().top);zt.remove();const Be=(v-1)*gt+Nt-D,ke=Oe.map(Pt=>Pt.getBoundingClientRect().width),vt=Mt.getBoundingClientRect().width,Ct=Qe.getBoundingClientRect().width,at=$e?Bt.getBoundingClientRect().width:0,Tt=(f.width-k*(g-1))/g,Vt=Oe.map((Pt,Zt)=>{var pi;const on=Pt.firstChild;if(!(on instanceof Text)||on.data.length<2||!(ke[Zt]>Tt-.5)&&!((pi=Ce[Zt])!=null&&pi.length))return;const xn=document.createRange(),ui=Pt.getBoundingClientRect().left,dn=[];for(let Kn=1;Kn<=on.data.length;Kn+=1)xn.setStart(on,0),xn.setEnd(on,Kn),dn.push(xn.getBoundingClientRect().right-ui);return dn});Me.replaceChildren(),ue({widths:ke,spaceWidth:vt,dashWidth:Ct,charWidths:Vt,lineHeight:gt,capWidth:at,dropCapFontSize:Dt,dropCapTopAdjust:Be})},[ie,P,$e,_,v,ee,f.width,b,Ce,g,k]);const j=I&&$e?I.capWidth+I.lineHeight*LT:0,Te=Math.max(_,Math.ceil(v)),Fe=s.useMemo(()=>{if(!I||!ie.length||f.width<=0||f.height<=0||!u)return 1;const Me=Mt=>cu({tokens:ie,widths:I.widths,spaceWidth:I.spaceWidth,lineHeight:I.lineHeight,width:f.width,height:f.height,rings:ne,mode:l,align:c,scale:Mt,allowOverflow:!1,capInset:j*Mt,capLines:$e?Te:0,hyphenate:b,charWidths:I.charWidths,hyphenPoints:Ce,hyphenWidth:I.dashWidth,shapeMargin:G,columns:g,columnGap:k});if(Me(1).placed>=ie.length)return 1;if(Me(As).placed<ie.length)return As;let Oe=As,St=1;for(let Mt=0;Mt<MT;Mt+=1){const Qe=(Oe+St)/2;Me(Qe).placed>=ie.length?Oe=Qe:St=Qe}return Oe},[I,ie,f.width,f.height,ne,l,c,u,j,$e,Te,b,Ce,G,g,k]);s.useEffect(()=>{y(Fe)},[Fe,y]);const Ye=u?Math.min(p,Fe):1,De=s.useMemo(()=>!I||!ie.length||f.width<=0||f.height<=0?{segments:[],placed:0,height:0,capLeft:0,capTop:0,renderTokens:ie}:cu({tokens:ie,widths:I.widths,spaceWidth:I.spaceWidth,lineHeight:I.lineHeight,width:f.width,height:f.height,rings:ne,mode:l,align:c,scale:Ye,allowOverflow:d,capInset:j*Ye,capLines:$e?Te:0,hyphenate:b,charWidths:I.charWidths,hyphenPoints:Ce,hyphenWidth:I.dashWidth,shapeMargin:G,columns:g,columnGap:k}),[I,ie,f.width,f.height,ne,l,c,Ye,d,j,$e,Te,b,Ce,G,g,k]),ze=S&&ie.length>0&&De.placed<ie.length,Ze=I?I.dropCapFontSize*Ye:0,Ue=I?I.dropCapTopAdjust*Ye:0,ye=c==="justify"?"left":c,_e=I?I.lineHeight*Ye:0,Ve=De.segments.length?De.segments[De.segments.length-1]:null,Je=Ve?{top:Ve.top+_e,left:Ve.left+Ve.width/2}:{top:f.height,left:f.width/2},et=!!(T&&m&&f.width>0&&f.height>0),ot=!!w,lt=(et||ot)&&f.width>0&&f.height>0,Ke=kT(z,lt),ht=lt&&Ke?AT():null,tt=s.useRef(!1),Ge=s.useCallback(Me=>{tt.current=Me},[]);s.useEffect(()=>{if(!et&&!ot)return;const Me=Oe=>{const St=z;if(!St)return;const Mt=St.getBoundingClientRect();Oe.clientX>=Mt.left&&Oe.clientX<=Mt.right&&Oe.clientY>=Mt.top&&Oe.clientY<=Mt.bottom&&(Oe.preventDefault(),Oe.stopPropagation(),se(kt=>kt==="shape"&&tt.current?kt:kt==="shape"&&ot?"image":et?"shape":"image"))};return document.addEventListener("dblclick",Me,!0),()=>document.removeEventListener("dblclick",Me,!0)},[et,ot,z]);const We=s.useMemo(()=>q&&f.width>0&&f.height>0?yC(J,f):null,[q,J,f.width,f.height]),Ne=s.useRef(null),be=(()=>{const Me=Ne.current;return Q||!C||!w||!de||!We||!Me||O===Me.customPath||Me.shape!==n&&n!=="custom"?null:eT(Me.bounds,We,de,Me.focalX,Me.focalY,Me.scale)})();nr(()=>{if(!w){Ne.current=null;return}if($||!de||!We)return;const Me=Ne.current,Oe=!!(Me&&O!==Me.customPath);Oe&&be&&w.onCommit(be),Oe&&Q&&(R==null||R()),Ne.current={rings:J,bounds:We,focalX:(be==null?void 0:be.focalX)??X,focalY:(be==null?void 0:be.focalY)??B,scale:(be==null?void 0:be.scale)??H,customPath:O,shape:n}},[$,Q,O,n,J,We,w,de,X,B,H,be,R]);const He=Ne.current,Xe=!!($&&!Q&&He&&!be),ct=Xe&&He?He.focalX:(be==null?void 0:be.focalX)??X,rt=Xe&&He?He.focalY:(be==null?void 0:be.focalY)??B,xt=Xe&&He?He.scale:(be==null?void 0:be.scale)??H,pt=Xe&&He?He.bounds:We,It=s.useMemo(()=>{if(!(f.width>0)||!(f.height>0))return"";let Me=jd(i,m,o,r,n,f);if(fe){const Oe=N??f,St=r.width/Oe.width,Mt=r.height/Oe.height;Me=un(Me,Qe=>({x:Qe.x*St,y:Qe.y*Mt}))}return Vd(Me,f)||Dd(ne,f)},[i,m,o,r,n,f.width,f.height,fe,N,ne]),nt=s.useMemo(()=>{if(!q||!(f.width>0)||!(f.height>0))return"";let Me=jd(O,m,o,r,n,f);if(fe){const Oe=N??f,St=r.width/Oe.width,Mt=r.height/Oe.height;Me=un(Me,Qe=>({x:Qe.x*St,y:Qe.y*Mt}))}return Vd(Me,f)||Dd(J,f)},[q,O,m,o,r,n,f.width,f.height,fe,N,J]),bt=`${V}-clip`,Lt=s.useMemo(()=>{if(!pt)return null;const Me=de??{width:pt.width,height:pt.height},Oe=Ui(pt,Me,xt);return{x:jn(pt.width,Oe.width,ct),y:jn(pt.height,Oe.height,rt),width:Oe.width,height:Oe.height}},[pt,de,ct,rt,xt]);return a.jsxs("div",{className:`${e}-column`,style:{padding:x,columnGap:h},lang:Ee,ref:U,children:[It?a.jsxs("svg",{className:`${e}-shape-fill`,style:{top:0,left:0,width:f.width,height:f.height},viewBox:`0 0 ${f.width} ${f.height}`,preserveAspectRatio:"none","aria-hidden":!0,children:[a.jsx("path",{className:`${e}-shape-fill-path`,d:It,fillRule:"evenodd"}),q&&nt&&pt&&Lt?a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsx("clipPath",{id:bt,clipPathUnits:"userSpaceOnUse",children:a.jsx("path",{d:nt,fillRule:"evenodd"})})}),a.jsx("image",{href:q,x:pt.x+Lt.x,y:pt.y+Lt.y,width:Lt.width,height:Lt.height,preserveAspectRatio:"none",clipPath:`url(#${bt})`})]}):null]}):null,a.jsxs("div",{className:`${e}-flow${d?"":` ${e}-clip`}`,style:{...P,["--"+e+"-fit"]:Ye,top:0,left:0,width:f.width,height:f.height},children:[a.jsx("div",{className:`${e}-measure`,ref:M,style:P,"aria-hidden":!0}),De.segments.map((Me,Oe)=>{const St=De.renderTokens.slice(Me.from,Me.to),Mt=Oe===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:ye},children:St.map((Qe,kt)=>{const Wt=$e&&Mt&&Me.from===0&&kt===0?Qe.text.slice(1):Qe.text,At=su(Qe.leaf),Ae=Qe.href?a.jsx("a",{className:`${e}-link`,href:Qe.href,target:Qe.target,rel:Qe.target?"noopener noreferrer":void 0,style:At,children:Wt}):a.jsx("span",{style:At,children:Wt});return a.jsxs("span",{children:[!Me.justify&&kt>0?" ":null,Ae]},kt)})},`${Me.from}-${Me.to}-${Oe}`)}),L&&!m&&a.jsx("svg",{className:`${e}-guides`,viewBox:"0 0 1 1",preserveAspectRatio:"none","aria-hidden":!0,children:ne.map((Me,Oe)=>a.jsx("polygon",{points:Me.map(St=>`${St.x},${St.y}`).join(" ")},Oe))})]}),$e&&I&&a.jsx("div",{className:`${e}-drop-cap`,"aria-hidden":!0,style:{...P,top:`${De.capTop+Ue}px`,left:`${De.capLeft}px`,fontSize:`${Ze}px`,lineHeight:`${Ze}px`},children:$e}),ht&&Ke&&(m&&T||w)&&qn.createPortal(a.jsxs("div",{"data-selection":"none",style:{position:"fixed",top:Ke.top,left:Ke.left,width:Ke.width,height:Ke.height,zIndex:PT,pointerEvents:"none"},children:[m&&T&&a.jsx(xT,{P:e,box:{width:Ke.width,height:Ke.height},viewBox:r,contours:m,snap:T.snap,stretchToBox:!fe,uniformStretch:n==="circle",stage:Le,onStageChange:se,onSelectionChange:Ge,onChange:T.onChange,onCommit:T.onCommit}),w&&pt&&a.jsx(gT,{P:e,box:{width:Ke.width,height:Ke.height},bounds:pt,natural:de,imageUrl:q,maskPath:nt,stage:Le,onStageChange:se,focalX:ct,focalY:rt,scale:xt,onChange:w.onChange,onCommit:w.onCommit})]}),ht),a.jsx("div",{className:`${e}-a11y`,children:me.map((Me,Oe)=>a.jsx("p",{children:Me},Oe))}),ze&&a.jsxs("svg",{className:`${e}-overflow-icon`,width:"33",height:"24",viewBox:"0 0 33 24",style:{top:Je.top,left:Je.left},"aria-hidden":!0,children:[a.jsx("path",{d:"M12.8,4 L20.2,4 C24.68042,4 26.9206301,4 28.631924,4.87194781 C31.3123488,6.23769248 33,8.99168887 33,12 C33,15.0083111 31.3123488,17.7623075 28.631924,19.1280522 C26.9206301,20 24.68042,20 20.2,20 L12.8,20 C8.31957995,20 6.07936993,20 4.368076,19.1280522 C1.68765116,17.7623075 0,15.0083111 0,12 C0,8.99168887 1.68765116,6.23769248 4.368076,4.87194781 C6.07936993,4 8.31957995,4 12.8,4 Z",fill:"#FF4400"}),a.jsx("path",{transform:"translate(5, 0)",fill:"#FFFFFF",d:"M12,5.625 C12.3846269,5.625 12.7016304,5.91453014 12.7449542,6.28753416 L12.75,6.375 L12.75,11.25 L17.625,11.25 C18.0392136,11.25 18.375,11.5857864 18.375,12 C18.375,12.3846269 18.0854699,12.7016304 17.7124658,12.7449542 L17.625,12.75 L12.75,12.75 L12.75,17.625 C12.75,18.0392136 12.4142136,18.375 12,18.375 C11.6153731,18.375 11.2983696,18.0854699 11.2550458,17.7124658 L11.25,17.625 L11.25,12.75 L6.375,12.75 C5.96078644,12.75 5.625,12.4142136 5.625,12 C5.625,11.6153731 5.91453014,11.2983696 6.28753416,11.2550458 L6.375,11.25 L11.25,11.25 L11.25,6.375 C11.25,5.96078644 11.5857864,5.625 12,5.625 Z"})]})]})}const Qp=["diamond","parallelogram","vase","circle","shield","bobbin","custom"],NT={x:0,y:0,width:100,height:100},_T=e=>{const t=(e??"").trim().split(/[\s,]+/).map(Number).filter(n=>!Number.isNaN(n));return t.length<4||t[2]<=0||t[3]<=0?NT:{x:t[0],y:t[1],width:t[2],height:t[3]}},HT=e=>`
27799
27799
  .${e}-wrapper {
27800
27800
  box-sizing: border-box;
27801
27801
  display: flex;
@@ -28024,7 +28024,7 @@ export function Burger({
28024
28024
  clip-path: inset(50%);
28025
28025
  white-space: nowrap;
28026
28026
  }
28027
- `,WT=1;function OT({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,isSelected:r,onUpdateSettings:l}){const{prefix:c}=E.useScopedStyles(),d=s.useMemo(()=>HT(c),[c]),u=n??!1,p=!!r||!!o,y=s.useMemo(()=>Array.isArray(t)?t[0]??{}:{},[t]),x=(e==null?void 0:e.shape)??"custom",g=(e==null?void 0:e.customPath)??"",f=(e==null?void 0:e.pathFit)??"stretch",b=s.useMemo(()=>_T(e==null?void 0:e.pathViewBox),[e==null?void 0:e.pathViewBox]),S=(e==null?void 0:e.shapeMode)==="B"?"avoid":"contain",W=(e==null?void 0:e.textAlign)??"left",v=((e==null?void 0:e.overflowMode)??"clip")==="visible",L=((e==null?void 0:e.fitText)??"off")==="on",M=((e==null?void 0:e.hyphenate)??"off")==="on",U=E.scalingValue((e==null?void 0:e.padding)??0,u),G=Math.max(1,Math.round((e==null?void 0:e.columns)??1)),B=E.scalingValue((e==null?void 0:e.columnGutter)??0,u),N=(e==null?void 0:e.dropCapSize)??WT,O=Math.max(1,Math.round((e==null?void 0:e.dropCapLines)??N)),C=u&&p&&!i,$=u&&!i,[K,R]=s.useState(!1);s.useEffect(()=>{if(!u||!p){R(!1);return}const q=()=>R(!0),ie=()=>R(!1),z=["ArticleEditor.Item:drag-start","ArticleEditor.Selection:resize-start","ArticleEditor.Selection:move-start"],$e=["ArticleEditor.Item:drag-end","ArticleEditor.Selection:resize-end","ArticleEditor.Selection:move-end"];for(const re of z)window.addEventListener(re,q);for(const re of $e)window.addEventListener(re,ie);return()=>{for(const re of z)window.removeEventListener(re,q);for(const re of $e)window.removeEventListener(re,ie)}},[u,p]);const w=u&&p&&!i&&typeof l=="function",T=!K,j=Math.max(0,(e==null?void 0:e.pathSnap)??0),_=s.useRef(e??{}),Q=s.useRef(""),P=[e==null?void 0:e.customPath,e==null?void 0:e.shape,e==null?void 0:e.pathFit,e==null?void 0:e.pathViewBox,e==null?void 0:e.imageScale,e==null?void 0:e.imageFocalX,e==null?void 0:e.imageFocalY,e==null?void 0:e.image].join("\0");if(P!==Q.current)Q.current=P,_.current=e??{};else if(e){const{customPath:q,shape:ie,pathFit:z,pathViewBox:$e,imageScale:re,imageFocalX:X,imageFocalY:Ce,image:He,...Ye}=e,De=_.current;for(const ze of Object.keys(Ye))if(De[ze]!==Ye[ze]){_.current={...De,...Ye};break}}const[h,J]=s.useState(null),[V,me]=s.useState(!1),[k,le]=s.useState(!1),I=s.useCallback(()=>le(!1),[]),ue=_.current.shape??x,ee=!!(h&&(h.base===g||h.serialized===g)),xe=ee&&h?h.serialized:g;s.useEffect(()=>{w||(me(!1),le(!1))},[w]),s.useEffect(()=>{!h||V||h.serialized===g&&J(null)},[h,g,V]);const Le=s.useMemo(()=>{if(!w)return null;if(h&&(h.base===g||h.serialized===g))return h.contours;const q=ki(g);return q.length?q:null},[w,h,g]),ce=!!(f==="viewbox"&&((e==null?void 0:e.pathViewBox)??"")===Zs&&Le&&(x==="circle"||!Xp(Le,b))),de=s.useCallback((q,ie,z)=>{const $e=Wo(q);if(J(re=>({base:re&&(re.base===g||re.serialized===g)?re.base:g,serialized:$e,contours:q})),ie){const re=_.current,X=z!=null&&z.preserveShape?re.shape:"custom",Ce={...re,shape:X,customPath:$e};_.current=Ce,l==null||l(Ce)}},[g,l]),Z=s.useMemo(()=>w?{contours:ce?Le:null,snap:j,needsConversion:!ce,onConvert:q=>{const ie=Wo(q);J({base:ie,serialized:ie,contours:q});const z={..._.current,pathFit:"viewbox",pathViewBox:Zs,customPath:ie};_.current=z,l==null||l(z)},onChange:(q,ie)=>{me(!0),le(!!(ie!=null&&ie.carryImage)),de(q,!1)},onCommit:(q,ie)=>{de(q,!0,ie),me(!1)}}:null,[w,ce,Le,j,l,de]),pe=S==="avoid"&&!!(e!=null&&e.image),oe=s.useMemo(()=>({focalX:(e==null?void 0:e.imageFocalX)??.5,focalY:(e==null?void 0:e.imageFocalY)??.5,scale:(e==null?void 0:e.imageScale)??1}),[e==null?void 0:e.imageFocalX,e==null?void 0:e.imageFocalY,e==null?void 0:e.imageScale]),[ge,be]=s.useState(null),Re=ge??oe,Ee=s.useCallback(q=>be(q),[]),Te=s.useCallback(q=>{be(q);const ie={..._.current,imageFocalX:q.focalX,imageFocalY:q.focalY,imageScale:q.scale};_.current=ie,l==null||l(ie)},[l]);s.useEffect(()=>{ge&&Math.abs(ge.focalX-oe.focalX)<1e-9&&Math.abs(ge.focalY-oe.focalY)<1e-9&&Math.abs(ge.scale-oe.scale)<1e-9&&be(null)},[ge,oe]);const we=s.useMemo(()=>!w||!pe?null:{onChange:Ee,onCommit:Te},[w,pe,Ee,Te]),[m,Y]=s.useState(void 0),te=s.useRef(void 0),ae=s.useCallback(q=>{const ie=te.current;ie!==void 0&&Math.abs(ie-q)<.005||(te.current=q,Y(q))},[]),fe=s.useMemo(()=>L&&typeof m=="number"?m:1,[m,L]),F=q=>`calc(${q} * var(--${c}-fit, 1))`,H=s.useMemo(()=>{var z,$e,re,X,Ce;const q=(e==null?void 0:e.textFontSize)??.012,ie=Math.max((e==null?void 0:e.textLineHeight)??q,q);return{fontFamily:Bo(e==null?void 0:e.textFontFamily),fontWeight:(z=e==null?void 0:e.textFontSettings)==null?void 0:z.fontWeight,fontStyle:($e=e==null?void 0:e.textFontSettings)==null?void 0:$e.fontStyle,fontSize:F(E.scalingValue(q,u)),lineHeight:F(E.scalingValue(ie,u)),letterSpacing:F(E.scalingValue((e==null?void 0:e.textLetterSpacing)??0,u)),wordSpacing:F(E.scalingValue((e==null?void 0:e.textWordSpacing)??0,u)),textTransform:(re=e==null?void 0:e.textTextAppearance)==null?void 0:re.textTransform,textDecoration:(X=e==null?void 0:e.textTextAppearance)==null?void 0:X.textDecoration,fontVariant:(Ce=e==null?void 0:e.textTextAppearance)==null?void 0:Ce.fontVariant}},[e,u,c]),ne={[`--${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:{...ne},children:a.jsx(FT,{P:c,item:y,shape:ue,customPath:g,pathFit:f,viewBox:b,mode:S,align:W,allowOverflow:v,fitEnabled:L,scale:fe,onFitScale:ae,padding:U,columns:G,gutter:B,hyphenate:M,showOverflowIndicator:$,dropCapLines:O,dropCapSize:N,showGuides:(C||w)&&T,typography:H,imageUrl:S==="avoid"?e==null?void 0:e.image:null,imageFocalX:Re.focalX,imageFocalY:Re.focalY,imageScale:Re.scale,imageCustomPath:xe,imagePathEdited:ee,pathDragActive:V,pathCarryImage:k,onCarryImageConsumed:I,pathEditor:T?Z:null,imageEditor:T?we:null})})]})}const DT=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
28027
+ `,WT=1;function OT({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,isSelected:r,isUIHidden:l,onUpdateSettings:c}){const{prefix:d}=E.useScopedStyles(),u=s.useMemo(()=>HT(d),[d]),p=n??!1,y=!!r||!!o,x=s.useMemo(()=>Array.isArray(t)?t[0]??{}:{},[t]),g=(e==null?void 0:e.shape)??"custom",h=(e==null?void 0:e.customPath)??"",b=(e==null?void 0:e.pathFit)??"stretch",S=s.useMemo(()=>_T(e==null?void 0:e.pathViewBox),[e==null?void 0:e.pathViewBox]),_=(e==null?void 0:e.shapeMode)==="B"?"avoid":"contain",v=(e==null?void 0:e.textAlign)??"left",L=((e==null?void 0:e.overflowMode)??"clip")==="visible",P=((e==null?void 0:e.fitText)??"off")==="on",q=((e==null?void 0:e.hyphenate)??"off")==="on",X=E.scalingValue((e==null?void 0:e.padding)??0,p),B=Math.max(1,Math.round((e==null?void 0:e.columns)??1)),H=E.scalingValue((e==null?void 0:e.columnGutter)??0,p),O=(e==null?void 0:e.dropCapSize)??WT,C=Math.max(1,Math.round((e==null?void 0:e.dropCapLines)??O)),$=p&&y&&!i,Q=p&&!i&&!l,[R,T]=s.useState(!1);s.useEffect(()=>{if(!p||!y){T(!1);return}const J=()=>T(!0),W=()=>T(!1),Se=["ArticleEditor.Item:drag-start","ArticleEditor.Selection:resize-start","ArticleEditor.Selection:move-start"],le=["ArticleEditor.Item:drag-end","ArticleEditor.Selection:resize-end","ArticleEditor.Selection:move-end"];for(const j of Se)window.addEventListener(j,J);for(const j of le)window.addEventListener(j,W);return()=>{for(const j of Se)window.removeEventListener(j,J);for(const j of le)window.removeEventListener(j,W)}},[p,y]);const w=p&&y&&!i&&typeof c=="function",V=!R&&!l,z=Math.max(0,(e==null?void 0:e.pathSnap)??0),U=s.useRef(e??{}),M=s.useRef(""),f=[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(f!==M.current)M.current=f,U.current=e??{};else if(e){const{customPath:J,shape:W,pathFit:Se,pathViewBox:le,imageScale:j,imageFocalX:Te,imageFocalY:Fe,image:Ye,...De}=e,ze=U.current;for(const Ze of Object.keys(De))if(ze[Ze]!==De[Ze]){U.current={...ze,...De};break}}const[K,G]=s.useState(null),[ge,k]=s.useState(!1),[ce,I]=s.useState(!1),ue=s.useCallback(()=>I(!1),[]),ee=U.current.shape??g,xe=!!(K&&(K.base===h||K.serialized===h)),Le=xe&&K?K.serialized:h;s.useEffect(()=>{w||(k(!1),I(!1))},[w]),s.useEffect(()=>{!K||ge||K.serialized===h&&G(null)},[K,h,ge]);const se=s.useMemo(()=>{if(!w)return null;if(K&&(K.base===h||K.serialized===h))return K.contours;const J=ki(h);return J.length?J:null},[w,K,h]),de=!!(b==="viewbox"&&((e==null?void 0:e.pathViewBox)??"")===Zs&&se&&(g==="circle"||!Xp(se,S))),Z=s.useCallback((J,W,Se)=>{const le=Wo(J);if(G(j=>({base:j&&(j.base===h||j.serialized===h)?j.base:h,serialized:le,contours:J})),W){const j=U.current,Te=Se!=null&&Se.preserveShape?j.shape:"custom",Fe={...j,shape:Te,customPath:le};U.current=Fe,c==null||c(Fe)}},[h,c]),pe=s.useMemo(()=>w?{contours:de?se:null,snap:z,needsConversion:!de,onConvert:J=>{const W=Wo(J);G({base:W,serialized:W,contours:J});const Se={...U.current,pathFit:"viewbox",pathViewBox:Zs,customPath:W};U.current=Se,c==null||c(Se)},onChange:(J,W)=>{k(!0),I(!!(W!=null&&W.carryImage)),Z(J,!1)},onCommit:(J,W)=>{Z(J,!0,W),k(!1)}}:null,[w,de,se,z,c,Z]),ie=_==="avoid"&&!!(e!=null&&e.image),me=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]),[ve,Ee]=s.useState(null),Re=ve??me,Ce=s.useCallback(J=>Ee(J),[]),$e=s.useCallback(J=>{Ee(J);const W={...U.current,imageFocalX:J.focalX,imageFocalY:J.focalY,imageScale:J.scale};U.current=W,c==null||c(W)},[c]);s.useEffect(()=>{ve&&Math.abs(ve.focalX-me.focalX)<1e-9&&Math.abs(ve.focalY-me.focalY)<1e-9&&Math.abs(ve.scale-me.scale)<1e-9&&Ee(null)},[ve,me]);const m=s.useMemo(()=>!w||!ie?null:{onChange:Ce,onCommit:$e},[w,ie,Ce,$e]),[Y,te]=s.useState(void 0),oe=s.useRef(void 0),fe=s.useCallback(J=>{const W=oe.current;W!==void 0&&Math.abs(W-J)<.005||(oe.current=J,te(J))},[]),N=s.useMemo(()=>P&&typeof Y=="number"?Y:1,[Y,P]),F=J=>`calc(${J} * var(--${d}-fit, 1))`,ne=s.useMemo(()=>{var Se,le,j,Te,Fe;const J=(e==null?void 0:e.textFontSize)??.012,W=Math.max((e==null?void 0:e.textLineHeight)??J,J);return{fontFamily:Bo(e==null?void 0:e.textFontFamily),fontWeight:(Se=e==null?void 0:e.textFontSettings)==null?void 0:Se.fontWeight,fontStyle:(le=e==null?void 0:e.textFontSettings)==null?void 0:le.fontStyle,fontSize:F(E.scalingValue(J,p)),lineHeight:F(E.scalingValue(W,p)),letterSpacing:F(E.scalingValue((e==null?void 0:e.textLetterSpacing)??0,p)),wordSpacing:F(E.scalingValue((e==null?void 0:e.textWordSpacing)??0,p)),textTransform:(j=e==null?void 0:e.textTextAppearance)==null?void 0:j.textTransform,textDecoration:(Te=e==null?void 0:e.textTextAppearance)==null?void 0:Te.textDecoration,fontVariant:(Fe=e==null?void 0:e.textTextAppearance)==null?void 0:Fe.fontVariant}},[e,p,d]),re={[`--${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:u}}),a.jsx("div",{className:`${d}-wrapper`,style:{...re},children:a.jsx(FT,{P:d,item:x,shape:ee,customPath:h,pathFit:b,viewBox:S,mode:_,align:v,allowOverflow:L,fitEnabled:P,scale:N,onFitScale:fe,padding:X,columns:B,gutter:H,hyphenate:q,showOverflowIndicator:Q,dropCapLines:C,dropCapSize:O,showGuides:($||w)&&V,typography:ne,imageUrl:_==="avoid"?e==null?void 0:e.image:null,imageFocalX:Re.focalX,imageFocalY:Re.focalY,imageScale:Re.scale,imageCustomPath:Le,imagePathEdited:xe,pathDragActive:ge,pathCarryImage:ce,onCarryImageConsumed:ue,pathEditor:V?pe:null,imageEditor:V?m:null})})]})}const DT=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
28028
28028
  import type React from 'react';
28029
28029
  import { CommonComponentProps } from '../props';
28030
28030
  import { scalingValue, useScopedStyles } from '../utils/index';
@@ -28121,6 +28121,7 @@ export type PretextProps = {
28121
28121
  isPreviewMode?: boolean;
28122
28122
  isEditMode?: boolean;
28123
28123
  isSelected?: boolean;
28124
+ isUIHidden?: boolean;
28124
28125
  onUpdateSettings?: (settings: PretextSettings) => void;
28125
28126
  } & CommonComponentProps;
28126
28127
 
@@ -28560,7 +28561,7 @@ export {
28560
28561
  nearestSegmentHit,
28561
28562
  } from './vecContours';
28562
28563
 
28563
- export function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode, isSelected, onUpdateSettings }: PretextProps) {
28564
+ export function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode, isSelected, isUIHidden, onUpdateSettings }: PretextProps) {
28564
28565
  const { prefix: P } = useScopedStyles();
28565
28566
  const scopedCss = useMemo(() => getCSS(P), [P]);
28566
28567
  const editor = isEditor ?? false;
@@ -28586,7 +28587,7 @@ export function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode
28586
28587
  const dropCapSize = settings?.dropCapSize ?? DROP_CAP_SIZE_DEFAULT;
28587
28588
  const dropCapLines = Math.max(1, Math.round(settings?.dropCapLines ?? dropCapSize));
28588
28589
  const showGuides = editor && selected && !isPreviewMode;
28589
- const showOverflowIndicator = editor && !isPreviewMode;
28590
+ const showOverflowIndicator = editor && !isPreviewMode && !isUIHidden;
28590
28591
 
28591
28592
  const [isItemTransforming, setIsItemTransforming] = useState(false);
28592
28593
  useEffect(() => {
@@ -28616,7 +28617,7 @@ export function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode
28616
28617
 
28617
28618
  const pathEditing = editor && selected && !isPreviewMode
28618
28619
  && typeof onUpdateSettings === 'function';
28619
- const shapeOverlayVisible = !isItemTransforming;
28620
+ const shapeOverlayVisible = !isItemTransforming && !isUIHidden;
28620
28621
  const pathSnap = Math.max(0, settings?.pathSnap ?? 0);
28621
28622
  const settingsRef = useRef(settings ?? {});
28622
28623
  const settingsPropsKeyRef = useRef('');